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

420 lines
1.1 MiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[68,5,7,8,17],{"+ua5":function(vt,$e,q){},"49sm":function(vt,$e){var q={}.toString;vt.exports=Array.isArray||function(ve){return q.call(ve)=="[object Array]"}},"55Ip":function(vt,$e,q){"use strict";q.d($e,"a",function(){return n});var ve=q("Ty5D"),V=q("dI71"),O=q("q1tI"),z=q.n(O),D=q("YS25"),I=q("17x9"),G=q.n(I),P=q("wx14"),L=q("zLVn"),S=q("9R94"),_=function(e){Object(V.a)(a,e);function a(){for(var g,p=arguments.length,f=new Array(p),R=0;R<p;R++)f[R]=arguments[R];return g=e.call.apply(e,[this].concat(f))||this,g.history=Object(D.a)(g.props),g}var l=a.prototype;return l.render=function(){return z.a.createElement(ve.c,{history:this.history,children:this.props.children})},a}(z.a.Component),b=function(e){Object(V.a)(a,e);function a(){for(var g,p=arguments.length,f=new Array(p),R=0;R<p;R++)f[R]=arguments[R];return g=e.call.apply(e,[this].concat(f))||this,g.history=Object(D.b)(g.props),g}var l=a.prototype;return l.render=function(){return z.a.createElement(ve.c,{history:this.history,children:this.props.children})},a}(z.a.Component),u=function(a,l){return typeof a=="function"?a(l):a},o=function(a,l){return typeof a=="string"?Object(D.c)(a,null,null,l):a},r=function(a){return a},A=z.a.forwardRef;typeof A=="undefined"&&(A=r);function s(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var t=A(function(e,a){var l=e.innerRef,g=e.navigate,p=e.onClick,f=Object(L.a)(e,["innerRef","navigate","onClick"]),R=f.target,U=Object(P.a)({},f,{onClick:function(j){try{p&&p(j)}catch(J){throw j.preventDefault(),J}!j.defaultPrevented&&j.button===0&&(!R||R==="_self")&&!s(j)&&(j.preventDefault(),g())}});return r!==A?U.ref=a||l:U.ref=l,z.a.createElement("a",U)}),n=A(function(e,a){var l=e.component,g=l===void 0?t:l,p=e.replace,f=e.to,R=e.innerRef,U=Object(L.a)(e,["component","replace","to","innerRef"]);return z.a.createElement(ve.e.Consumer,null,function(Q){Q||Object(S.a)(!1);var j=Q.history,J=o(u(f,Q.location),Q.location),k=J?j.createHref(J):"",Y=Object(P.a)({},U,{href:k,navigate:function(){var me=u(f,Q.location),_e=p?j.replace:j.push;_e(me)}});return r!==A?Y.ref=a||R:Y.innerRef=R,z.a.createElement(g,Y)})});if(!1)var i,B;var w=function(a){return a},y=z.a.forwardRef;typeof y=="undefined"&&(y=w);function x(){for(var e=arguments.length,a=new Array(e),l=0;l<e;l++)a[l]=arguments[l];return a.filter(function(g){return g}).join(" ")}var E=y(function(e,a){var l=e["aria-current"],g=l===void 0?"page":l,p=e.activeClassName,f=p===void 0?"active":p,R=e.activeStyle,U=e.className,Q=e.exact,j=e.isActive,J=e.location,k=e.sensitive,Y=e.strict,ne=e.style,me=e.to,_e=e.innerRef,Oe=Object(L.a)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return z.a.createElement(ve.e.Consumer,null,function(xe){xe||Object(S.a)(!1);var Se=J||xe.location,Fe=o(u(me,Se),Se),Pe=Fe.pathname,Ee=Pe&&Pe.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),he=Ee?Object(ve.f)(Se.pathname,{path:Ee,exact:Q,sensitive:k,strict:Y}):null,Ge=!!(j?j(he,Se):he),lt=Ge?x(U,f):U,at=Ge?Object(P.a)({},ne,{},R):ne,je=Object(P.a)({"aria-current":Ge&&g||null,className:lt,style:at,to:Fe},Oe);return w!==y?je.ref=a||_e:je.innerRef=_e,z.a.createElement(n,je)})});if(!1)var c},"5VLF":function(vt,$e,q){"use strict";var ve,V;function O(z,D,I){var G=function(P,L){return z.js_beautify(P,L)};return G.js=z.js_beautify,G.css=D.css_beautify,G.html=I.html_beautify,G.js_beautify=z.js_beautify,G.css_beautify=D.css_beautify,G.html_beautify=I.html_beautify,G}!(ve=[q("6UM0"),q("TXwP"),q("psGv")],V=function(z,D,I){return O(z,D,I)}.apply($e,ve),V!==void 0&&(vt.exports=V))},"6+eU":function(vt,$e,q){"use strict";q.d($e,"a",function(){return y});var ve=q("wx14"),V=q("rePB"),O=q("VTBJ"),z=q("1OyB"),D=q("vuIU"),I=q("Ji7U"),G=q("LK+K"),P=q("q1tI"),L=q.n(P),S=q("TSYQ"),_=q.n(S),b=function(E){var c,e="".concat(E.rootPrefixCls,"-item"),a=_()(e,"".concat(e,"-").concat(E.page),(c={},Object(V.a)(c,"".concat(e,"-active"),E.active),Object(V.a)(c,E.className,!!E.className),Object(V.a)(c,"".concat(e,"-disabled"),!E.page),c)),l=function(){E.onClick(E.page)},g=function(f){E.onKeyPress(f,E.onClick,E.page)};return L.a.createElement("li",{title:E.showTitle?E.page:null,className:a,onClick:l,onKeyPress:g,tabIndex:"0"},E.itemRender(E.page,"page",L.a.createElement("a",{rel:"nofollow"},E.page)))},u=b,o={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},r=function(x){Object(I.a)(c,x);var E=Object(G.a)(c);function c(){var e;Object(z.a)(this,c);for(var a=arguments.length,l=new Array(a),g=0;g<a;g++)l[g]=arguments[g];return e=E.call.apply(E,[this].concat(l)),e.state={goInputText:""},e.buildOptionText=function(p){return"".concat(p," ").concat(e.props.locale.items_per_page)},e.changeSize=function(p){e.props.changeSize(Number(p))},e.handleChange=function(p){e.setState({goInputText:p.target.value})},e.handleBlur=function(p){var f=e.props,R=f.goButton,U=f.quickGo,Q=f.rootPrefixCls,j=e.state.goInputText;if(R||j==="")return;if(p.relatedTarget&&(p.relatedTarget.className.indexOf("".concat(Q,"-prev"))>=0||p.relatedTarget.className.indexOf("".concat(Q,"-next"))>=0))return;e.setState({goInputText:""}),U(e.getValidValue())},e.go=function(p){var f=e.state.goInputText;if(f==="")return;(p.keyCode===o.ENTER||p.type==="click")&&(e.setState({goInputText:""}),e.props.quickGo(e.getValidValue()))},e}return Object(D.a)(c,[{key:"getValidValue",value:function(){var a=this.state,l=a.goInputText,g=a.current;return!l||isNaN(l)?g:Number(l)}},{key:"getPageSizeOptions",value:function(){var a=this.props,l=a.pageSize,g=a.pageSizeOptions;return g.some(function(p){return p.toString()===l.toString()})?g:g.concat([l.toString()]).sort(function(p,f){var R=isNaN(Number(p))?0:Number(p),U=isNaN(Number(f))?0:Number(f);return R-U})}},{key:"render",value:function(){var a=this,l=this.props,g=l.pageSize,p=l.locale,f=l.rootPrefixCls,R=l.changeSize,U=l.quickGo,Q=l.goButton,j=l.selectComponentClass,J=l.buildOptionText,k=l.selectPrefixCls,Y=l.disabled,ne=this.state.goInputText,me="".concat(f,"-options"),_e=j,Oe=null,xe=null,Se=null;if(!R&&!U)return null;var Fe=this.getPageSizeOptions();if(R&&_e){var Pe=Fe.map(function(Ee,he){return L.a.createElement(_e.Option,{key:he,value:Ee.toString()},(J||a.buildOptionText)(Ee))});Oe=L.a.createElement(_e,{disabled:Y,prefixCls:k,showSearch:!1,className:"".concat(me,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(g||Fe[0]).toString(),onChange:this.changeSize,getPopupContainer:function(he){return he.parentNode}},Pe)}return U&&(Q&&(Se=typeof Q=="boolean"?L.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:Y,className:"".concat(me,"-quick-jumper-button")},p.jump_to_confirm):L.a.createElement("span",{onClick:this.go,onKeyUp:this.go},Q)),xe=L.a.createElement("div",{className:"".concat(me,"-quick-jumper")},p.jump_to,L.a.createElement("input",{disabled:Y,type:"text",value:ne,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),p.page,Se)),L.a.createElement("li",{className:"".concat(me)},Oe,xe)}}]),c}(L.a.Component);r.defaultProps={pageSizeOptions:["10","20","50","100"]};var A=r,s=q("N2Kk");function t(){}function n(x){return typeof x=="number"&&isFinite(x)&&Math.floor(x)===x}function i(x,E,c){return c}function B(x,E,c){var e=typeof x=="undefined"?E.pageSize:x;return Math.floor((c.total-1)/e)+1}var w=function(x){Object(I.a)(c,x);var E=Object(G.a)(c);function c(e){var a;Object(z.a)(this,c),a=E.call(this,e),a.getJumpPrevPage=function(){return Math.max(1,a.state.current-(a.props.showLessItems?3:5))},a.getJumpNextPage=function(){return Math.min(B(void 0,a.state,a.props),a.state.current+(a.props.showLessItems?3:5))},a.getItemIcon=function(R,U){var Q=a.props.prefixCls,j=R||L.a.createElement("button",{type:"button","aria-label":U,className:"".concat(Q,"-item-link")});return typeof R=="function"&&(j=L.a.createElement(R,Object(O.a)({},a.props))),j},a.savePaginationNode=function(R){a.paginationNode=R},a.isValid=function(R){return n(R)&&R!==a.state.current},a.shouldDisplayQuickJumper=function(){var R=a.props,U=R.showQuickJumper,Q=R.pageSize,j=R.total;return j<=Q?!1:U},a.handleKeyDown=function(R){(R.keyCode===o.ARROW_UP||R.keyCode===o.ARROW_DOWN)&&R.preventDefault()},a.handleKeyUp=function(R){var U=a.getValidValue(R),Q=a.state.currentInputValue;U!==Q&&a.setState({currentInputValue:U}),R.keyCode===o.ENTER?a.handleChange(U):R.keyCode===o.ARROW_UP?a.handleChange(U-1):R.keyCode===o.ARROW_DOWN&&a.handleChange(U+1)},a.changePageSize=function(R){var U=a.state.current,Q=B(R,a.state,a.props);U=U>Q?Q:U,Q===0&&(U=a.state.current),typeof R=="number"&&("pageSize"in a.props||a.setState({pageSize:R}),"current"in a.props||a.setState({current:U,currentInputValue:U})),a.props.onShowSizeChange(U,R),"onChange"in a.props&&a.props.onChange&&a.props.onChange(U,R)},a.handleChange=function(R){var U=a.props.disabled,Q=R;if(a.isValid(Q)&&!U){var j=B(void 0,a.state,a.props);Q>j?Q=j:Q<1&&(Q=1),"current"in a.props||a.setState({current:Q,currentInputValue:Q});var J=a.state.pageSize;return a.props.onChange(Q,J),Q}return a.state.current},a.prev=function(){a.hasPrev()&&a.handleChange(a.state.current-1)},a.next=function(){a.hasNext()&&a.handleChange(a.state.current+1)},a.jumpPrev=function(){a.handleChange(a.getJumpPrevPage())},a.jumpNext=function(){a.handleChange(a.getJumpNextPage())},a.hasPrev=function(){return a.state.current>1},a.hasNext=function(){return a.state.current<B(void 0,a.state,a.props)},a.runIfEnter=function(R,U){if(R.key==="Enter"||R.charCode===13){for(var Q=arguments.length,j=new Array(Q>2?Q-2:0),J=2;J<Q;J++)j[J-2]=arguments[J];U.apply(void 0,j)}},a.runIfEnterPrev=function(R){a.runIfEnter(R,a.prev)},a.runIfEnterNext=function(R){a.runIfEnter(R,a.next)},a.runIfEnterJumpPrev=function(R){a.runIfEnter(R,a.jumpPrev)},a.runIfEnterJumpNext=function(R){a.runIfEnter(R,a.jumpNext)},a.handleGoTO=function(R){(R.keyCode===o.ENTER||R.type==="click")&&a.handleChange(a.state.currentInputValue)};var l=e.onChange!==t,g="current"in e;g&&!l&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var p=e.defaultCurrent;"current"in e&&(p=e.current);var f=e.defaultPageSize;return"pageSize"in e&&(f=e.pageSize),p=Math.min(p,B(f,void 0,e)),a.state={current:p,currentInputValue:p,pageSize:f},a}return Object(D.a)(c,[{key:"componentDidUpdate",value:function(a,l){var g=this.props.prefixCls;if(l.current!==this.state.current&&this.paginationNode){var p=this.paginationNode.querySelector(".".concat(g,"-item-").concat(l.current));p&&document.activeElement===p&&p.blur()}}},{key:"getValidValue",value:function(a){var l=a.target.value,g=B(void 0,this.state,this.props),p=this.state.currentInputValue,f;return l===""?f=l:isNaN(Number(l))?f=p:l>=g?f=g:f=Number(l),f}},{key:"getShowSizeChanger",value:function(){var a=this.props,l=a.showSizeChanger,g=a.total,p=a.totalBoundaryShowSizeChanger;return typeof l!="undefined"?l:g>p}},{key:"renderPrev",value:function(a){var l=this.props,g=l.prevIcon,p=l.itemRender,f=p(a,"prev",this.getItemIcon(g,"prev page")),R=!this.hasPrev();return Object(P.isValidElement)(f)?Object(P.cloneElement)(f,{disabled:R}):f}},{key:"renderNext",value:function(a){var l=this.props,g=l.nextIcon,p=l.itemRender,f=p(a,"next",this.getItemIcon(g,"next page")),R=!this.hasNext();return Object(P.isValidElement)(f)?Object(P.cloneElement)(f,{disabled:R}):f}},{key:"render",value:function(){var a=this,l=this.props,g=l.prefixCls,p=l.className,f=l.style,R=l.disabled,U=l.hideOnSinglePage,Q=l.total,j=l.locale,J=l.showQuickJumper,k=l.showLessItems,Y=l.showTitle,ne=l.showTotal,me=l.simple,_e=l.itemRender,Oe=l.showPrevNextJumpers,xe=l.jumpPrevIcon,Se=l.jumpNextIcon,Fe=l.selectComponentClass,Pe=l.selectPrefixCls,Ee=l.pageSizeOptions,he=this.state,Ge=he.current,lt=he.pageSize,at=he.currentInputValue;if(U===!0&&Q<=lt)return null;var je=B(void 0,this.state,this.props),it=[],ee=null,W=null,F=null,oe=null,re=null,we=J&&J.goButton,be=k?1:2,nt=Ge-1>0?Ge-1:0,tt=Ge+1<je?Ge+1:je,Ye=Object.keys(this.props).reduce(function(Z,te){return(te.substr(0,5)==="data-"||te.substr(0,5)==="aria-"||te==="role")&&(Z[te]=a.props[te]),Z},{});if(me)return we&&(typeof we=="boolean"?re=L.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},j.jump_to_confirm):re=L.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},we),re=L.a.createElement("li",{title:Y?"".concat(j.jump_to).concat(Ge,"/").concat(je):null,className:"".concat(g,"-simple-pager")},re)),L.a.createElement("ul",Object(ve.a)({className:_()(g,"".concat(g,"-simple"),Object(V.a)({},"".concat(g,"-disabled"),R),p),style:f,ref:this.savePaginationNode},Ye),L.a.createElement("li",{title:Y?j.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:_()("".concat(g,"-prev"),Object(V.a)({},"".concat(g,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(nt)),L.a.createElement("li",{title:Y?"".concat(Ge,"/").concat(je):null,className:"".concat(g,"-simple-pager")},L.a.createElement("input",{type:"text",value:at,disabled:R,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),L.a.createElement("span",{className:"".concat(g,"-slash")},"/"),je),L.a.createElement("li",{title:Y?j.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:_()("".concat(g,"-next"),Object(V.a)({},"".concat(g,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(tt)),re);if(je<=3+be*2){var qe={locale:j,rootPrefixCls:g,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:Y,itemRender:_e};je||it.push(L.a.createElement(u,Object(ve.a)({},qe,{key:"noPager",page:je,className:"".concat(g,"-disabled")})));for(var At=1;At<=je;At+=1){var ft=Ge===At;it.push(L.a.createElement(u,Object(ve.a)({},qe,{key:At,page:At,active:ft})))}}else{var Ce=k?j.prev_3:j.prev_5,Ue=k?j.next_3:j.next_5;Oe&&(ee=L.a.createElement("li",{title:Y?Ce:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:_()("".concat(g,"-jump-prev"),Object(V.a)({},"".concat(g,"-jump-prev-custom-icon"),!!xe))},_e(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(xe,"prev page"))),W=L.a.createElement("li",{title:Y?Ue:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:_()("".concat(g,"-jump-next"),Object(V.a)({},"".concat(g,"-jump-next-custom-icon"),!!Se))},_e(this.getJumpNextPage(),"jump-next",this.getItemIcon(Se,"next page")))),oe=L.a.createElement(u,{locale:j,last:!0,rootPrefixCls:g,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:je,page:je,active:!1,showTitle:Y,itemRender:_e}),F=L.a.createElement(u,{locale:j,rootPrefixCls:g,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:Y,itemRender:_e});var Qe=Math.max(1,Ge-be),He=Math.min(Ge+be,je);Ge-1<=be&&(He=1+be*2),je-Ge<=be&&(Qe=je-be*2);for(var Ie=Qe;Ie<=He;Ie+=1){var Me=Ge===Ie;it.push(L.a.createElement(u,{locale:j,rootPrefixCls:g,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ie,page:Ie,active:Me,showTitle:Y,itemRender:_e}))}Ge-1>=be*2&&Ge!==1+2&&(it[0]=Object(P.cloneElement)(it[0],{className:"".concat(g,"-item-after-jump-prev")}),it.unshift(ee)),je-Ge>=be*2&&Ge!==je-2&&(it[it.length-1]=Object(P.cloneElement)(it[it.length-1],{className:"".concat(g,"-item-before-jump-next")}),it.push(W)),Qe!==1&&it.unshift(F),He!==je&&it.push(oe)}var ye=null;ne&&(ye=L.a.createElement("li",{className:"".concat(g,"-total-text")},ne(Q,[Q===0?0:(Ge-1)*lt+1,Ge*lt>Q?Q:Ge*lt])));var le=!this.hasPrev()||!je,ue=!this.hasNext()||!je;return L.a.createElement("ul",Object(ve.a)({className:_()(g,p,Object(V.a)({},"".concat(g,"-disabled"),R)),style:f,unselectable:"unselectable",ref:this.savePaginationNode},Ye),ye,L.a.createElement("li",{title:Y?j.prev_page:null,onClick:this.prev,tabIndex:le?null:0,onKeyPress:this.runIfEnterPrev,className:_()("".concat(g,"-prev"),Object(V.a)({},"".concat(g,"-disabled"),le)),"aria-disabled":le},this.renderPrev(nt)),it,L.a.createElement("li",{title:Y?j.next_page:null,onClick:this.next,tabIndex:ue?null:0,onKeyPress:this.runIfEnterNext,className:_()("".concat(g,"-next"),Object(V.a)({},"".concat(g,"-disabled"),ue)),"aria-disabled":ue},this.renderNext(tt)),L.a.createElement(A,{disabled:R,locale:j,rootPrefixCls:g,selectComponentClass:Fe,selectPrefixCls:Pe,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Ge,pageSize:lt,pageSizeOptions:Ee,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:we}))}}],[{key:"getDerivedStateFromProps",value:function(a,l){var g={};if("current"in a&&(g.current=a.current,a.current!==l.current&&(g.currentInputValue=g.current)),"pageSize"in a&&a.pageSize!==l.pageSize){var p=l.current,f=B(a.pageSize,l,a);p=p>f?f:p,"current"in a||(g.current=p,g.currentInputValue=p),g.pageSize=a.pageSize}return g}}]),c}(L.a.Component);w.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:t,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:t,locale:s.a,style:{},itemRender:i,totalBoundaryShowSizeChanger:50};var y=w},"6RRn":function(vt,$e,q){"use strict";var ve=q("wCXF"),V=q("n6Qo");q.d($e,"b",function(){return V.a});var O=q("IBYe"),z=q("6eGT"),D=q("hW8S");q.d($e,"a",function(){return D.a}),$e.c=ve.b},"6UM0":function(vt,$e,q){var ve,V;(function(){var O;(function(){"use strict";var D=[function(L,S,_){var b=_(1).Beautifier,u=_(5).Options;function o(r,A){var s=new b(r,A);return s.beautify()}L.exports=o,L.exports.defaultOptions=function(){return new u}},function(L,S,_){var b=_(2).Output,u=_(3).Token,o=_(4),r=_(5).Options,A=_(7).Tokenizer,s=_(7).line_starters,t=_(7).positionable_operators,n=_(7).TOKEN;function i(k,Y){return Y.indexOf(k)!==-1}function B(k){return k.replace(/^\s+/g,"")}function w(k){for(var Y={},ne=0;ne<k.length;ne++)Y[k[ne].replace(/-/g,"_")]=k[ne];return Y}function y(k,Y){return k&&k.type===n.RESERVED&&k.text===Y}function x(k,Y){return k&&k.type===n.RESERVED&&i(k.text,Y)}var E=["case","return","do","if","throw","else","await","break","continue","async"],c=["before-newline","after-newline","preserve-newline"],e=w(c),a=[e.before_newline,e.preserve_newline],l={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function g(k,Y){if(Y.multiline_frame||Y.mode===l.ForInitializer||Y.mode===l.Conditional)return;k.remove_indent(Y.start_line_index)}function p(k){k=k.replace(o.allLineBreaks,`
`);for(var Y=[],ne=k.indexOf(`
`);ne!==-1;)Y.push(k.substring(0,ne)),k=k.substring(ne+1),ne=k.indexOf(`
`);return k.length&&Y.push(k),Y}function f(k){return k===l.ArrayLiteral}function R(k){return i(k,[l.Expression,l.ForInitializer,l.Conditional])}function U(k,Y){for(var ne=0;ne<k.length;ne++){var me=k[ne].trim();if(me.charAt(0)!==Y)return!1}return!0}function Q(k,Y){for(var ne=0,me=k.length,_e;ne<me;ne++)if(_e=k[ne],_e&&_e.indexOf(Y)!==0)return!1;return!0}function j(k,Y){Y=Y||{},this._source_text=k||"",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 r(Y)}j.prototype.create_flags=function(k,Y){var ne=0;k&&(ne=k.indentation_level,!this._output.just_added_newline()&&k.line_indent_level>ne&&(ne=k.line_indent_level));var me={mode:Y,parent:k,last_token:k?k.last_token:new u(n.START_BLOCK,""),last_word:k?k.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:ne,alignment:0,line_indent_level:k?k.line_indent_level:ne,start_line_index:this._output.get_line_number(),ternary_depth:0};return me},j.prototype._reset=function(k){var Y=k.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new b(this._options,Y),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(l.BlockStatement);var ne=new A(k,this._options);return this._tokens=ne.tokenize(),k},j.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var k,Y=this._reset(this._source_text),ne=this._options.eol;this._options.eol==="auto"&&(ne=`
`,Y&&o.lineBreak.test(Y||"")&&(ne=Y.match(o.lineBreak)[0]));for(var me=this._tokens.next();me;)this.handle_token(me),this._last_last_text=this._flags.last_token.text,this._flags.last_token=me,me=this._tokens.next();return k=this._output.get_code(ne),k},j.prototype.handle_token=function(k,Y){k.type===n.START_EXPR?this.handle_start_expr(k):k.type===n.END_EXPR?this.handle_end_expr(k):k.type===n.START_BLOCK?this.handle_start_block(k):k.type===n.END_BLOCK?this.handle_end_block(k):k.type===n.WORD?this.handle_word(k):k.type===n.RESERVED?this.handle_word(k):k.type===n.SEMICOLON?this.handle_semicolon(k):k.type===n.STRING?this.handle_string(k):k.type===n.EQUALS?this.handle_equals(k):k.type===n.OPERATOR?this.handle_operator(k):k.type===n.COMMA?this.handle_comma(k):k.type===n.BLOCK_COMMENT?this.handle_block_comment(k,Y):k.type===n.COMMENT?this.handle_comment(k,Y):k.type===n.DOT?this.handle_dot(k):k.type===n.EOF?this.handle_eof(k):k.type===n.UNKNOWN?this.handle_unknown(k,Y):this.handle_unknown(k,Y)},j.prototype.handle_whitespace_and_comments=function(k,Y){var ne=k.newlines,me=this._options.keep_array_indentation&&f(this._flags.mode);if(k.comments_before)for(var _e=k.comments_before.next();_e;)this.handle_whitespace_and_comments(_e,Y),this.handle_token(_e,Y),_e=k.comments_before.next();if(me)for(var Oe=0;Oe<ne;Oe+=1)this.print_newline(Oe>0,Y);else if(this._options.max_preserve_newlines&&ne>this._options.max_preserve_newlines&&(ne=this._options.max_preserve_newlines),this._options.preserve_newlines&&ne>1){this.print_newline(!1,Y);for(var xe=1;xe<ne;xe+=1)this.print_newline(!0,Y)}};var J=["async","break","continue","return","throw","yield"];j.prototype.allow_wrap_or_preserved_newline=function(k,Y){if(Y=Y===void 0?!1:Y,this._output.just_added_newline())return;var ne=this._options.preserve_newlines&&k.newlines||Y,me=i(this._flags.last_token.text,t)||i(k.text,t);if(me){var _e=i(this._flags.last_token.text,t)&&i(this._options.operator_position,a)||i(k.text,t);ne=ne&&_e}if(ne)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(x(this._flags.last_token,J))return;this._output.set_wrap_point()}},j.prototype.print_newline=function(k,Y){if(!Y&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==n.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var ne=this._tokens.peek();this._flags.mode===l.Statement&&!(this._flags.if_block&&y(ne,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(k)&&(this._flags.multiline_frame=!0)},j.prototype.print_token_line_indentation=function(k){this._output.just_added_newline()&&(this._options.keep_array_indentation&&k.newlines&&(k.text==="["||f(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(k.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))},j.prototype.print_token=function(k){if(this._output.raw){this._output.add_raw_token(k);return}if(this._options.comma_first&&k.previous&&k.previous.type===n.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(k),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(k),this._output.non_breaking_space=!0,this._output.add_token(k.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},j.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},j.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))},j.prototype.set_mode=function(k){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,k),this._flags=this.create_flags(this._previous_flags,k),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},j.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===l.Statement&&g(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},j.prototype.start_of_object_property=function(){return this._flags.parent.mode===l.ObjectLiteral&&this._flags.mode===l.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||x(this._flags.last_token,["get","set"]))},j.prototype.start_of_statement=function(k){var Y=!1;return Y=Y||x(this._flags.last_token,["var","let","const"])&&k.type===n.WORD,Y=Y||y(this._flags.last_token,"do"),Y=Y||!(this._flags.parent.mode===l.ObjectLiteral&&this._flags.mode===l.Statement)&&x(this._flags.last_token,J)&&!k.newlines,Y=Y||y(this._flags.last_token,"else")&&!(y(k,"if")&&!k.comments_before),Y=Y||this._flags.last_token.type===n.END_EXPR&&(this._previous_flags.mode===l.ForInitializer||this._previous_flags.mode===l.Conditional),Y=Y||this._flags.last_token.type===n.WORD&&this._flags.mode===l.BlockStatement&&!this._flags.in_case&&!(k.text==="--"||k.text==="++")&&this._last_last_text!=="function"&&k.type!==n.WORD&&k.type!==n.RESERVED,Y=Y||this._flags.mode===l.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||x(this._flags.last_token,["get","set"])),Y?(this.set_mode(l.Statement),this.indent(),this.handle_whitespace_and_comments(k,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(k,x(k,["do","for","if","while"])),!0):!1},j.prototype.handle_start_expr=function(k){this.start_of_statement(k)||this.handle_whitespace_and_comments(k);var Y=l.Expression;if(k.text==="["){if(this._flags.last_token.type===n.WORD||this._flags.last_token.text===")"){x(this._flags.last_token,s)&&(this._output.space_before_token=!0),this.print_token(k),this.set_mode(Y),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}Y=l.ArrayLiteral,f(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),i(this._flags.last_token.type,[n.START_EXPR,n.END_EXPR,n.WORD,n.OPERATOR,n.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===n.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,Y=l.ForInitializer):i(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,Y=l.Conditional):i(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&k.whitespace_before===""?this._output.space_before_token=!1:(i(this._flags.last_token.text,s)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===n.EQUALS||this._flags.last_token.type===n.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(k);else if(this._flags.last_token.type===n.WORD){this._output.space_before_token=!1;var ne=this._tokens.peek(-3);if(this._options.space_after_named_function&&ne){var me=this._tokens.peek(-4);x(ne,["async","function"])||ne.text==="*"&&x(me,["async","function"])?this._output.space_before_token=!0:this._flags.mode===l.ObjectLiteral?(ne.text==="{"||ne.text===","||ne.text==="*"&&(me.text==="{"||me.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(k);(this._flags.last_token.type===n.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(i(this._last_last_text,["function","yield"])||this._flags.mode===l.ObjectLiteral&&i(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===n.START_BLOCK?this.print_newline():(this._flags.last_token.type===n.END_EXPR||this._flags.last_token.type===n.START_EXPR||this._flags.last_token.type===n.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===n.COMMA)&&this.allow_wrap_or_preserved_newline(k,k.newlines),this.print_token(k),this.set_mode(Y),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},j.prototype.handle_end_expr=function(k){for(;this._flags.mode===l.Statement;)this.restore_mode();this.handle_whitespace_and_comments(k),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(k,k.text==="]"&&f(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===n.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(k),this.restore_mode(),g(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===l.Conditional&&(this._previous_flags.mode=l.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},j.prototype.handle_start_block=function(k){this.handle_whitespace_and_comments(k);var Y=this._tokens.peek(),ne=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===n.END_EXPR?(this.set_mode(l.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(l.BlockStatement):ne&&(i(ne.text,[":",","])&&i(Y.type,[n.STRING,n.WORD,n.RESERVED])||i(Y.text,["get","set","..."])&&i(ne.type,[n.WORD,n.RESERVED]))?i(this._last_last_text,["class","interface"])&&!i(ne.text,[":",","])?this.set_mode(l.BlockStatement):this.set_mode(l.ObjectLiteral):this._flags.last_token.type===n.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(l.BlockStatement):i(this._flags.last_token.type,[n.EQUALS,n.START_EXPR,n.COMMA,n.OPERATOR])||x(this._flags.last_token,["return","throw","import","default"])?this.set_mode(l.ObjectLiteral):this.set_mode(l.BlockStatement),this._flags.last_token&&(x(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var me=!Y.comments_before&&Y.text==="}",_e=me&&this._flags.last_word==="function"&&this._flags.last_token.type===n.END_EXPR;if(this._options.brace_preserve_inline){var Oe=0,xe=null;this._flags.inline_frame=!0;do if(Oe+=1,xe=this._tokens.peek(Oe-1),xe.newlines){this._flags.inline_frame=!1;break}while(xe.type!==n.EOF&&!(xe.type===n.END_BLOCK&&xe.opened===k))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&k.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==n.OPERATOR&&(_e||this._flags.last_token.type===n.EQUALS||x(this._flags.last_token,E)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(f(this._previous_flags.mode)&&(this._flags.last_token.type===n.START_EXPR||this._flags.last_token.type===n.COMMA)&&((this._flags.last_token.type===n.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===n.COMMA||this._flags.last_token.type===n.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(k),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==n.OPERATOR&&this._flags.last_token.type!==n.START_EXPR&&(this._flags.last_token.type===n.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(k),this.indent(),!me&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},j.prototype.handle_end_block=function(k){for(this.handle_whitespace_and_comments(k);this._flags.mode===l.Statement;)this.restore_mode();var Y=this._flags.last_token.type===n.START_BLOCK;this._flags.inline_frame&&!Y?this._output.space_before_token=!0:this._options.brace_style==="expand"?Y||this.print_newline():Y||(f(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(k)},j.prototype.handle_word=function(k){if(k.type===n.RESERVED){if(i(k.text,["set","get"])&&this._flags.mode!==l.ObjectLiteral)k.type=n.WORD;else if(k.text==="import"&&i(this._tokens.peek().text,["(","."]))k.type=n.WORD;else if(i(k.text,["as","from"])&&!this._flags.import_block)k.type=n.WORD;else if(this._flags.mode===l.ObjectLiteral){var Y=this._tokens.peek();Y.text===":"&&(k.type=n.WORD)}}if(this.start_of_statement(k)?x(this._flags.last_token,["var","let","const"])&&k.type===n.WORD&&(this._flags.declaration_statement=!0):k.newlines&&!R(this._flags.mode)&&(this._flags.last_token.type!==n.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==n.EQUALS&&(this._options.preserve_newlines||!x(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(k),this.print_newline()):this.handle_whitespace_and_comments(k),this._flags.do_block&&!this._flags.do_while)if(y(k,"while")){this._output.space_before_token=!0,this.print_token(k),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&&y(k,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===l.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&x(k,["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(k),this._flags.in_case=!0;return}if((this._flags.last_token.type===n.COMMA||this._flags.last_token.type===n.START_EXPR||this._flags.last_token.type===n.EQUALS||this._flags.last_token.type===n.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(k)),y(k,"function")){(i(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(i(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===n.OPERATOR))&&(!this._output.just_added_blankline()&&!k.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===n.RESERVED||this._flags.last_token.type===n.WORD?x(this._flags.last_token,["get","set","new","export"])||x(this._flags.last_token,J)?this._output.space_before_token=!0:y(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===n.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(R(this._flags.mode)||f(this._flags.mode))||this.print_newline(),this.print_token(k),this._flags.last_word=k.text;return}var ne="NONE";if(this._flags.last_token.type===n.END_BLOCK?this._previous_flags.inline_frame?ne="SPACE":x(k,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&k.newlines?ne="NEWLINE":(ne="SPACE",this._output.space_before_token=!0):ne="NEWLINE":this._flags.last_token.type===n.SEMICOLON&&this._flags.mode===l.BlockStatement?ne="NEWLINE":this._flags.last_token.type===n.SEMICOLON&&R(this._flags.mode)?ne="SPACE":this._flags.last_token.type===n.STRING?ne="NEWLINE":this._flags.last_token.type===n.RESERVED||this._flags.last_token.type===n.WORD||this._flags.last_token.text==="*"&&(i(this._last_last_text,["function","yield"])||this._flags.mode===l.ObjectLiteral&&i(this._last_last_text,["{",","]))?ne="SPACE":this._flags.last_token.type===n.START_BLOCK?this._flags.inline_frame?ne="SPACE":ne="NEWLINE":this._flags.last_token.type===n.END_EXPR&&(this._output.space_before_token=!0,ne="NEWLINE"),x(k,s)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?ne="SPACE":ne="NEWLINE"),x(k,["else","catch","finally"]))if((!(this._flags.last_token.type===n.END_BLOCK&&this._previous_flags.mode===l.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&k.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var me=this._output.current_line;me.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else ne==="NEWLINE"?x(this._flags.last_token,E)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&x(k,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==n.END_EXPR?(this._flags.last_token.type!==n.START_EXPR||!x(k,["var","let","const"]))&&this._flags.last_token.text!==":"&&(y(k,"if")&&y(k.previous,"else")?this._output.space_before_token=!0:this.print_newline()):x(k,s)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&f(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():ne==="SPACE"&&(this._output.space_before_token=!0);k.previous&&(k.previous.type===n.WORD||k.previous.type===n.RESERVED)&&(this._output.space_before_token=!0),this.print_token(k),this._flags.last_word=k.text,k.type===n.RESERVED&&(k.text==="do"?this._flags.do_block=!0:k.text==="if"?this._flags.if_block=!0:k.text==="import"?this._flags.import_block=!0:this._flags.import_block&&y(k,"from")&&(this._flags.import_block=!1))},j.prototype.handle_semicolon=function(k){this.start_of_statement(k)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(k);for(var Y=this._tokens.peek();this._flags.mode===l.Statement&&!(this._flags.if_block&&y(Y,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(k)},j.prototype.handle_string=function(k){k.text.startsWith("`")&&k.newlines===0&&k.whitespace_before===""&&(k.previous.text===")"||this._flags.last_token.type===n.WORD)||(this.start_of_statement(k)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(k),this._flags.last_token.type===n.RESERVED||this._flags.last_token.type===n.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===n.COMMA||this._flags.last_token.type===n.START_EXPR||this._flags.last_token.type===n.EQUALS||this._flags.last_token.type===n.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(k):k.text.startsWith("`")&&this._flags.last_token.type===n.END_EXPR&&(k.previous.text==="]"||k.previous.text===")")&&k.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(k)},j.prototype.handle_equals=function(k){this.start_of_statement(k)||this.handle_whitespace_and_comments(k),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(k),this._output.space_before_token=!0},j.prototype.handle_comma=function(k){this.handle_whitespace_and_comments(k,!0),this.print_token(k),this._output.space_before_token=!0,this._flags.declaration_statement?(R(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(k)):this._flags.mode===l.ObjectLiteral||this._flags.mode===l.Statement&&this._flags.parent.mode===l.ObjectLiteral?(this._flags.mode===l.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(k)},j.prototype.handle_operator=function(k){var Y=k.text==="*"&&(x(this._flags.last_token,["function","yield"])||i(this._flags.last_token.type,[n.START_BLOCK,n.COMMA,n.END_BLOCK,n.SEMICOLON])),ne=i(k.text,["-","+"])&&(i(this._flags.last_token.type,[n.START_BLOCK,n.START_EXPR,n.EQUALS,n.OPERATOR])||i(this._flags.last_token.text,s)||this._flags.last_token.text===",");if(!this.start_of_statement(k)){var me=!Y;this.handle_whitespace_and_comments(k,me)}if(k.text==="*"&&this._flags.last_token.type===n.DOT){this.print_token(k);return}if(k.text==="::"){this.print_token(k);return}if(this._flags.last_token.type===n.OPERATOR&&i(this._options.operator_position,a)&&this.allow_wrap_or_preserved_newline(k),k.text===":"&&this._flags.in_case){this.print_token(k),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==n.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var _e=!0,Oe=!0,xe=!1;if(k.text===":"?this._flags.ternary_depth===0?_e=!1:(this._flags.ternary_depth-=1,xe=!0):k.text==="?"&&(this._flags.ternary_depth+=1),!ne&&!Y&&this._options.preserve_newlines&&i(k.text,t)){var Se=k.text===":",Fe=Se&&xe,Pe=Se&&!xe;switch(this._options.operator_position){case e.before_newline:this._output.space_before_token=!Pe,this.print_token(k),(!Se||Fe)&&this.allow_wrap_or_preserved_newline(k),this._output.space_before_token=!0;return;case e.after_newline:this._output.space_before_token=!0,!Se||Fe?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(k):this._output.space_before_token=!1,this.print_token(k),this._output.space_before_token=!0;return;case e.preserve_newline:Pe||this.allow_wrap_or_preserved_newline(k),_e=!(this._output.just_added_newline()||Pe),this._output.space_before_token=_e,this.print_token(k),this._output.space_before_token=!0;return}}if(Y){this.allow_wrap_or_preserved_newline(k),_e=!1;var Ee=this._tokens.peek();Oe=Ee&&i(Ee.type,[n.WORD,n.RESERVED])}else if(k.text==="...")this.allow_wrap_or_preserved_newline(k),_e=this._flags.last_token.type===n.START_BLOCK,Oe=!1;else if(i(k.text,["--","++","!","~"])||ne){if((this._flags.last_token.type===n.COMMA||this._flags.last_token.type===n.START_EXPR)&&this.allow_wrap_or_preserved_newline(k),_e=!1,Oe=!1,k.newlines&&(k.text==="--"||k.text==="++"||k.text==="~")){var he=x(this._flags.last_token,E)&&k.newlines;he&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(he,!0)}this._flags.last_token.text===";"&&R(this._flags.mode)&&(_e=!0),this._flags.last_token.type===n.RESERVED?_e=!0:this._flags.last_token.type===n.END_EXPR?_e=!(this._flags.last_token.text==="]"&&(k.text==="--"||k.text==="++")):this._flags.last_token.type===n.OPERATOR&&(_e=i(k.text,["--","-","++","+"])&&i(this._flags.last_token.text,["--","-","++","+"]),i(k.text,["+","-"])&&i(this._flags.last_token.text,["--","++"])&&(Oe=!0)),(this._flags.mode===l.BlockStatement&&!this._flags.inline_frame||this._flags.mode===l.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||_e,this.print_token(k),this._output.space_before_token=Oe},j.prototype.handle_block_comment=function(k,Y){if(this._output.raw){this._output.add_raw_token(k),k.directives&&k.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(k.directives){this.print_newline(!1,Y),this.print_token(k),k.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!o.newline.test(k.text)&&!k.newlines){this._output.space_before_token=!0,this.print_token(k),this._output.space_before_token=!0;return}else this.print_block_commment(k,Y)},j.prototype.print_block_commment=function(k,Y){var ne=p(k.text),me,_e=!1,Oe=!1,xe=k.whitespace_before,Se=xe.length;if(this.print_newline(!1,Y),this.print_token_line_indentation(k),this._output.add_token(ne[0]),this.print_newline(!1,Y),ne.length>1){for(ne=ne.slice(1),_e=U(ne,"*"),Oe=Q(ne,xe),_e&&(this._flags.alignment=1),me=0;me<ne.length;me++)_e?(this.print_token_line_indentation(k),this._output.add_token(B(ne[me]))):Oe&&ne[me]?(this.print_token_line_indentation(k),this._output.add_token(ne[me].substring(Se))):(this._output.current_line.set_indent(-1),this._output.add_token(ne[me])),this.print_newline(!1,Y);this._flags.alignment=0}},j.prototype.handle_comment=function(k,Y){k.newlines?this.print_newline(!1,Y):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(k),this.print_newline(!1,Y)},j.prototype.handle_dot=function(k){this.start_of_statement(k)||this.handle_whitespace_and_comments(k,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),x(this._flags.last_token,E)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(k,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(k)},j.prototype.handle_unknown=function(k,Y){this.print_token(k),k.text[k.text.length-1]===`
`&&this.print_newline(!1,Y)},j.prototype.handle_eof=function(k){for(;this._flags.mode===l.Statement;)this.restore_mode();this.handle_whitespace_and_comments(k)},L.exports.Beautifier=j},function(L){function S(u){this.__parent=u,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}S.prototype.clone_empty=function(){var u=new S(this.__parent);return u.set_indent(this.__indent_count,this.__alignment_count),u},S.prototype.item=function(u){return u<0?this.__items[this.__items.length+u]:this.__items[u]},S.prototype.has_match=function(u){for(var o=this.__items.length-1;o>=0;o--)if(this.__items[o].match(u))return!0;return!1},S.prototype.set_indent=function(u,o){this.is_empty()&&(this.__indent_count=u||0,this.__alignment_count=o||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},S.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},S.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},S.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var u=this.__parent.current_line;return u.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),u.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),u.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,u.__items[0]===" "&&(u.__items.splice(0,1),u.__character_count-=1),!0}return!1},S.prototype.is_empty=function(){return this.__items.length===0},S.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},S.prototype.push=function(u){this.__items.push(u);var o=u.lastIndexOf(`
`);o!==-1?this.__character_count=u.length-o:this.__character_count+=u.length},S.prototype.pop=function(){var u=null;return this.is_empty()||(u=this.__items.pop(),this.__character_count-=u.length),u},S.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},S.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},S.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},S.prototype.toString=function(){var u="";return this.is_empty()?this.__parent.indent_empty_lines&&(u=this.__parent.get_indent_string(this.__indent_count)):(u=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),u+=this.__items.join("")),u};function _(u,o){this.__cache=[""],this.__indent_size=u.indent_size,this.__indent_string=u.indent_char,u.indent_with_tabs||(this.__indent_string=new Array(u.indent_size+1).join(u.indent_char)),o=o||"",u.indent_level>0&&(o=new Array(u.indent_level+1).join(this.__indent_string)),this.__base_string=o,this.__base_string_length=o.length}_.prototype.get_indent_size=function(u,o){var r=this.__base_string_length;return o=o||0,u<0&&(r=0),r+=u*this.__indent_size,r+=o,r},_.prototype.get_indent_string=function(u,o){var r=this.__base_string;return o=o||0,u<0&&(u=0,r=""),o+=u*this.__indent_size,this.__ensure_cache(o),r+=this.__cache[o],r},_.prototype.__ensure_cache=function(u){for(;u>=this.__cache.length;)this.__add_column()},_.prototype.__add_column=function(){var u=this.__cache.length,o=0,r="";this.__indent_size&&u>=this.__indent_size&&(o=Math.floor(u/this.__indent_size),u-=o*this.__indent_size,r=new Array(o+1).join(this.__indent_string)),u&&(r+=new Array(u+1).join(" ")),this.__cache.push(r)};function b(u,o){this.__indent_cache=new _(u,o),this.raw=!1,this._end_with_newline=u.end_with_newline,this.indent_size=u.indent_size,this.wrap_line_length=u.wrap_line_length,this.indent_empty_lines=u.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new S(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}b.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},b.prototype.get_line_number=function(){return this.__lines.length},b.prototype.get_indent_string=function(u,o){return this.__indent_cache.get_indent_string(u,o)},b.prototype.get_indent_size=function(u,o){return this.__indent_cache.get_indent_size(u,o)},b.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},b.prototype.add_new_line=function(u){return this.is_empty()||!u&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},b.prototype.get_code=function(u){this.trim(!0);var o=this.current_line.pop();o&&(o[o.length-1]===`
`&&(o=o.replace(/\n+$/g,"")),this.current_line.push(o)),this._end_with_newline&&this.__add_outputline();var r=this.__lines.join(`
`);return u!==`
`&&(r=r.replace(/[\n]/g,u)),r},b.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},b.prototype.set_indent=function(u,o){return u=u||0,o=o||0,this.next_line.set_indent(u,o),this.__lines.length>1?(this.current_line.set_indent(u,o),!0):(this.current_line.set_indent(),!1)},b.prototype.add_raw_token=function(u){for(var o=0;o<u.newlines;o++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(u.whitespace_before),this.current_line.push(u.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},b.prototype.add_token=function(u){this.__add_space_before_token(),this.current_line.push(u),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},b.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(" "))},b.prototype.remove_indent=function(u){for(var o=this.__lines.length;u<o;)this.__lines[u]._remove_indent(),u++;this.current_line._remove_wrap_indent()},b.prototype.trim=function(u){for(u=u===void 0?!1:u,this.current_line.trim();u&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},b.prototype.just_added_newline=function(){return this.current_line.is_empty()},b.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},b.prototype.ensure_empty_line_above=function(u,o){for(var r=this.__lines.length-2;r>=0;){var A=this.__lines[r];if(A.is_empty())break;if(A.item(0).indexOf(u)!==0&&A.item(-1)!==o){this.__lines.splice(r+1,0,new S(this)),this.previous_line=this.__lines[this.__lines.length-2];break}r--}},L.exports.Output=b},function(L){function S(_,b,u,o){this.type=_,this.text=b,this.comments_before=null,this.newlines=u||0,this.whitespace_before=o||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}L.exports.Token=S},function(L,S){var _="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",b="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",u="\\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",o="\\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",r="(?:\\\\u[0-9a-fA-F]{4}|["+_+u+"])",A="(?:\\\\u[0-9a-fA-F]{4}|["+b+u+o+"])*";S.identifier=new RegExp(r+A,"g"),S.identifierStart=new RegExp(r),S.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+b+u+o+"])+");var s=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;S.newline=/[\n\r\u2028\u2029]/,S.lineBreak=new RegExp(`\r
|`+S.newline.source),S.allLineBreaks=new RegExp(S.lineBreak.source,"g")},function(L,S,_){var b=_(6).Options,u=["before-newline","after-newline","preserve-newline"];function o(r){b.call(this,r,"js");var A=this.raw_options.brace_style||null;A==="expand-strict"?this.raw_options.brace_style="expand":A==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var s=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var t=0;t<s.length;t++)s[t]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=s[t];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",u),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}o.prototype=new b,L.exports.Options=o},function(L){function S(u,o){this.raw_options=_(u,o),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","django","erb","handlebars","php","smarty"],["auto"])}S.prototype._get_array=function(u,o){var r=this.raw_options[u],A=o||[];return typeof r=="object"?r!==null&&typeof r.concat=="function"&&(A=r.concat()):typeof r=="string"&&(A=r.split(/[^a-zA-Z0-9_\/\-]+/)),A},S.prototype._get_boolean=function(u,o){var r=this.raw_options[u],A=r===void 0?!!o:!!r;return A},S.prototype._get_characters=function(u,o){var r=this.raw_options[u],A=o||"";return typeof r=="string"&&(A=r.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),A},S.prototype._get_number=function(u,o){var r=this.raw_options[u];o=parseInt(o,10),isNaN(o)&&(o=0);var A=parseInt(r,10);return isNaN(A)&&(A=o),A},S.prototype._get_selection=function(u,o,r){var A=this._get_selection_list(u,o,r);if(A.length!==1)throw new Error("Invalid Option Value: The option '"+u+`' can only be one of the following values:
`+o+`
You passed in: '`+this.raw_options[u]+"'");return A[0]},S.prototype._get_selection_list=function(u,o,r){if(!o||o.length===0)throw new Error("Selection list cannot be empty.");if(r=r||[o[0]],!this._is_valid_selection(r,o))throw new Error("Invalid Default Value!");var A=this._get_array(u,r);if(!this._is_valid_selection(A,o))throw new Error("Invalid Option Value: The option '"+u+`' can contain only the following values:
`+o+`
You passed in: '`+this.raw_options[u]+"'");return A},S.prototype._is_valid_selection=function(u,o){return u.length&&o.length&&!u.some(function(r){return o.indexOf(r)===-1})};function _(u,o){var r={};u=b(u);var A;for(A in u)A!==o&&(r[A]=u[A]);if(o&&u[o])for(A in u[o])r[A]=u[o][A];return r}function b(u){var o={},r;for(r in u){var A=r.replace(/-/g,"_");o[A]=u[r]}return o}L.exports.Options=S,L.exports.normalizeOpts=b,L.exports.mergeOpts=_},function(L,S,_){var b=_(8).InputScanner,u=_(9).Tokenizer,o=_(9).TOKEN,r=_(13).Directives,A=_(4),s=_(12).Pattern,t=_(14).TemplatablePattern;function n(U,Q){return Q.indexOf(U)!==-1}var i={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:o.START,RAW:o.RAW,EOF:o.EOF},B=new r(/\/\*/,/\*\//),w=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,y=/[0-9]/,x=/[^\d\.]/,E=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),c=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";c=c.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),c="\\?\\.(?!\\d) "+c,c=c.replace(/ /g,"|");var e=new RegExp(c),a="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),l=a.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),g=new RegExp("^(?:"+l.join("|")+")$"),p,f=function(U,Q){u.call(this,U,Q),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var j=new s(this._input),J=new t(this._input).read_options(this._options);this.__patterns={template:J,identifier:J.starting_with(A.identifier).matching(A.identifierMatch),number:j.matching(w),punct:j.matching(e),comment:j.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:j.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:j.matching(/<!--/),html_comment_end:j.matching(/-->/),include:j.starting_with(/#include/).until_after(A.lineBreak),shebang:j.starting_with(/#!/).until_after(A.lineBreak),xml:j.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:J.until(/['\\\n\r\u2028\u2029]/),double_quote:J.until(/["\\\n\r\u2028\u2029]/),template_text:J.until(/[`\\$]/),template_expression:J.until(/[`}\\]/)}};f.prototype=new u,f.prototype._is_comment=function(U){return U.type===i.COMMENT||U.type===i.BLOCK_COMMENT||U.type===i.UNKNOWN},f.prototype._is_opening=function(U){return U.type===i.START_BLOCK||U.type===i.START_EXPR},f.prototype._is_closing=function(U,Q){return(U.type===i.END_BLOCK||U.type===i.END_EXPR)&&Q&&(U.text==="]"&&Q.text==="["||U.text===")"&&Q.text==="("||U.text==="}"&&Q.text==="{")},f.prototype._reset=function(){p=!1},f.prototype._get_next_token=function(U,Q){var j=null;this._readWhitespace();var J=this._input.peek();return J===null?this._create_token(i.EOF,""):(j=j||this._read_non_javascript(J),j=j||this._read_string(J),j=j||this._read_word(U),j=j||this._read_singles(J),j=j||this._read_comment(J),j=j||this._read_regexp(J,U),j=j||this._read_xml(J,U),j=j||this._read_punctuation(),j=j||this._create_token(i.UNKNOWN,this._input.next()),j)},f.prototype._read_word=function(U){var Q;if(Q=this.__patterns.identifier.read(),Q!=="")return Q=Q.replace(A.allLineBreaks,`
`),!(U.type===i.DOT||U.type===i.RESERVED&&(U.text==="set"||U.text==="get"))&&g.test(Q)?(Q==="in"||Q==="of")&&(U.type===i.WORD||U.type===i.STRING)?this._create_token(i.OPERATOR,Q):this._create_token(i.RESERVED,Q):this._create_token(i.WORD,Q);if(Q=this.__patterns.number.read(),Q!=="")return this._create_token(i.WORD,Q)},f.prototype._read_singles=function(U){var Q=null;return U==="("||U==="["?Q=this._create_token(i.START_EXPR,U):U===")"||U==="]"?Q=this._create_token(i.END_EXPR,U):U==="{"?Q=this._create_token(i.START_BLOCK,U):U==="}"?Q=this._create_token(i.END_BLOCK,U):U===";"?Q=this._create_token(i.SEMICOLON,U):U==="."&&x.test(this._input.peek(1))?Q=this._create_token(i.DOT,U):U===","&&(Q=this._create_token(i.COMMA,U)),Q&&this._input.next(),Q},f.prototype._read_punctuation=function(){var U=this.__patterns.punct.read();if(U!=="")return U==="="?this._create_token(i.EQUALS,U):U==="?."?this._create_token(i.DOT,U):this._create_token(i.OPERATOR,U)},f.prototype._read_non_javascript=function(U){var Q="";if(U==="#"){if(this._is_first_token()&&(Q=this.__patterns.shebang.read(),Q))return this._create_token(i.UNKNOWN,Q.trim()+`
`);if(Q=this.__patterns.include.read(),Q)return this._create_token(i.UNKNOWN,Q.trim()+`
`);U=this._input.next();var j="#";if(this._input.hasNext()&&this._input.testChar(y)){do U=this._input.next(),j+=U;while(this._input.hasNext()&&U!=="#"&&U!=="=");return U==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(j+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(j+="{}",this._input.next(),this._input.next())),this._create_token(i.WORD,j)}this._input.back()}else if(U==="<"&&this._is_first_token()){if(Q=this.__patterns.html_comment_start.read(),Q){for(;this._input.hasNext()&&!this._input.testChar(A.newline);)Q+=this._input.next();return p=!0,this._create_token(i.COMMENT,Q)}}else if(p&&U==="-"&&(Q=this.__patterns.html_comment_end.read(),Q))return p=!1,this._create_token(i.COMMENT,Q);return null},f.prototype._read_comment=function(U){var Q=null;if(U==="/"){var j="";if(this._input.peek(1)==="*"){j=this.__patterns.block_comment.read();var J=B.get_directives(j);J&&J.ignore==="start"&&(j+=B.readIgnored(this._input)),j=j.replace(A.allLineBreaks,`
`),Q=this._create_token(i.BLOCK_COMMENT,j),Q.directives=J}else this._input.peek(1)==="/"&&(j=this.__patterns.comment.read(),Q=this._create_token(i.COMMENT,j))}return Q},f.prototype._read_string=function(U){if(U==="`"||U==="'"||U==='"'){var Q=this._input.next();return this.has_char_escapes=!1,U==="`"?Q+=this._read_string_recursive("`",!0,"${"):Q+=this._read_string_recursive(U),this.has_char_escapes&&this._options.unescape_strings&&(Q=R(Q)),this._input.peek()===U&&(Q+=this._input.next()),Q=Q.replace(A.allLineBreaks,`
`),this._create_token(i.STRING,Q)}return null},f.prototype._allow_regexp_or_xml=function(U){return U.type===i.RESERVED&&n(U.text,["return","case","throw","else","do","typeof","yield"])||U.type===i.END_EXPR&&U.text===")"&&U.opened.previous.type===i.RESERVED&&n(U.opened.previous.text,["if","while","for"])||n(U.type,[i.COMMENT,i.START_EXPR,i.START_BLOCK,i.START,i.END_BLOCK,i.OPERATOR,i.EQUALS,i.EOF,i.SEMICOLON,i.COMMA])},f.prototype._read_regexp=function(U,Q){if(U==="/"&&this._allow_regexp_or_xml(Q)){for(var j=this._input.next(),J=!1,k=!1;this._input.hasNext()&&(J||k||this._input.peek()!==U)&&!this._input.testChar(A.newline);)j+=this._input.peek(),J?J=!1:(J=this._input.peek()==="\\",this._input.peek()==="["?k=!0:this._input.peek()==="]"&&(k=!1)),this._input.next();return this._input.peek()===U&&(j+=this._input.next(),j+=this._input.read(A.identifier)),this._create_token(i.STRING,j)}return null},f.prototype._read_xml=function(U,Q){if(this._options.e4x&&U==="<"&&this._allow_regexp_or_xml(Q)){var j="",J=this.__patterns.xml.read_match();if(J){for(var k=J[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),Y=k.indexOf("{")===0,ne=0;J;){var me=!!J[1],_e=J[2],Oe=!!J[J.length-1]||_e.slice(0,8)==="![CDATA[";if(!Oe&&(_e===k||Y&&_e.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(me?--ne:++ne),j+=J[0],ne<=0)break;J=this.__patterns.xml.read_match()}return J||(j+=this._input.match(/[\s\S]*/g)[0]),j=j.replace(A.allLineBreaks,`
`),this._create_token(i.STRING,j)}}return null};function R(U){for(var Q="",j=0,J=new b(U),k=null;J.hasNext();)if(k=J.match(/([\s]|[^\\]|\\\\)+/g),k&&(Q+=k[0]),J.peek()==="\\"){if(J.next(),J.peek()==="x")k=J.match(/x([0-9A-Fa-f]{2})/g);else if(J.peek()==="u")k=J.match(/u([0-9A-Fa-f]{4})/g);else{Q+="\\",J.hasNext()&&(Q+=J.next());continue}if(!k)return U;if(j=parseInt(k[1],16),j>126&&j<=255&&k[0].indexOf("x")===0)return U;if(j>=0&&j<32){Q+="\\"+k[0];continue}else j===34||j===39||j===92?Q+="\\"+String.fromCharCode(j):Q+=String.fromCharCode(j)}return Q}f.prototype._read_string_recursive=function(U,Q,j){var J,k;U==="'"?k=this.__patterns.single_quote:U==='"'?k=this.__patterns.double_quote:U==="`"?k=this.__patterns.template_text:U==="}"&&(k=this.__patterns.template_expression);for(var Y=k.read(),ne="";this._input.hasNext();){if(ne=this._input.next(),ne===U||!Q&&A.newline.test(ne)){this._input.back();break}else ne==="\\"&&this._input.hasNext()?(J=this._input.peek(),J==="x"||J==="u"?this.has_char_escapes=!0:J==="\r"&&this._input.peek(1)===`
`&&this._input.next(),ne+=this._input.next()):j&&(j==="${"&&ne==="$"&&this._input.peek()==="{"&&(ne+=this._input.next()),j===ne&&(U==="`"?ne+=this._read_string_recursive("}",Q,"`"):ne+=this._read_string_recursive("`",Q,"${"),this._input.hasNext()&&(ne+=this._input.next())));ne+=k.read(),Y+=ne}return Y},L.exports.Tokenizer=f,L.exports.TOKEN=i,L.exports.positionable_operators=E.slice(),L.exports.line_starters=a.slice()},function(L){var S=RegExp.prototype.hasOwnProperty("sticky");function _(b){this.__input=b||"",this.__input_length=this.__input.length,this.__position=0}_.prototype.restart=function(){this.__position=0},_.prototype.back=function(){this.__position>0&&(this.__position-=1)},_.prototype.hasNext=function(){return this.__position<this.__input_length},_.prototype.next=function(){var b=null;return this.hasNext()&&(b=this.__input.charAt(this.__position),this.__position+=1),b},_.prototype.peek=function(b){var u=null;return b=b||0,b+=this.__position,b>=0&&b<this.__input_length&&(u=this.__input.charAt(b)),u},_.prototype.__match=function(b,u){b.lastIndex=u;var o=b.exec(this.__input);return o&&!(S&&b.sticky)&&(o.index!==u&&(o=null)),o},_.prototype.test=function(b,u){return u=u||0,u+=this.__position,u>=0&&u<this.__input_length?!!this.__match(b,u):!1},_.prototype.testChar=function(b,u){var o=this.peek(u);return b.lastIndex=0,o!==null&&b.test(o)},_.prototype.match=function(b){var u=this.__match(b,this.__position);return u?this.__position+=u[0].length:u=null,u},_.prototype.read=function(b,u,o){var r="",A;return b&&(A=this.match(b),A&&(r+=A[0])),u&&(A||!b)&&(r+=this.readUntil(u,o)),r},_.prototype.readUntil=function(b,u){var o="",r=this.__position;b.lastIndex=this.__position;var A=b.exec(this.__input);return A?(r=A.index,u&&(r+=A[0].length)):r=this.__input_length,o=this.__input.substring(this.__position,r),this.__position=r,o},_.prototype.readUntilAfter=function(b){return this.readUntil(b,!0)},_.prototype.get_regexp=function(b,u){var o=null,r="g";return u&&S&&(r="y"),typeof b=="string"&&b!==""?o=new RegExp(b,r):b&&(o=new RegExp(b.source,r)),o},_.prototype.get_literal_regexp=function(b){return RegExp(b.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},_.prototype.peekUntilAfter=function(b){var u=this.__position,o=this.readUntilAfter(b);return this.__position=u,o},_.prototype.lookBack=function(b){var u=this.__position-1;return u>=b.length&&this.__input.substring(u-b.length,u).toLowerCase()===b},L.exports.InputScanner=_},function(L,S,_){var b=_(8).InputScanner,u=_(3).Token,o=_(10).TokenStream,r=_(11).WhitespacePattern,A={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},s=function(t,n){this._input=new b(t),this._options=n||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new r(this._input)};s.prototype.tokenize=function(){this._input.restart(),this.__tokens=new o,this._reset();for(var t,n=new u(A.START,""),i=null,B=[],w=new o;n.type!==A.EOF;){for(t=this._get_next_token(n,i);this._is_comment(t);)w.add(t),t=this._get_next_token(n,i);w.isEmpty()||(t.comments_before=w,w=new o),t.parent=i,this._is_opening(t)?(B.push(i),i=t):i&&this._is_closing(t,i)&&(t.opened=i,i.closed=t,i=B.pop(),t.parent=i),t.previous=n,n.next=t,this.__tokens.add(t),n=t}return this.__tokens},s.prototype._is_first_token=function(){return this.__tokens.isEmpty()},s.prototype._reset=function(){},s.prototype._get_next_token=function(t,n){this._readWhitespace();var i=this._input.read(/.+/g);return i?this._create_token(A.RAW,i):this._create_token(A.EOF,"")},s.prototype._is_comment=function(t){return!1},s.prototype._is_opening=function(t){return!1},s.prototype._is_closing=function(t,n){return!1},s.prototype._create_token=function(t,n){var i=new u(t,n,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return i},s.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},L.exports.Tokenizer=s,L.exports.TOKEN=A},function(L){function S(_){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=_}S.prototype.restart=function(){this.__position=0},S.prototype.isEmpty=function(){return this.__tokens_length===0},S.prototype.hasNext=function(){return this.__position<this.__tokens_length},S.prototype.next=function(){var _=null;return this.hasNext()&&(_=this.__tokens[this.__position],this.__position+=1),_},S.prototype.peek=function(_){var b=null;return _=_||0,_+=this.__position,_>=0&&_<this.__tokens_length&&(b=this.__tokens[_]),b},S.prototype.add=function(_){this.__parent_token&&(_.parent=this.__parent_token),this.__tokens.push(_),this.__tokens_length+=1},L.exports.TokenStream=S},function(L,S,_){var b=_(12).Pattern;function u(o,r){b.call(this,o,r),r?this._line_regexp=this._input.get_regexp(r._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}u.prototype=new b,u.prototype.__set_whitespace_patterns=function(o,r){o+="\\t ",r+="\\n\\r",this._match_pattern=this._input.get_regexp("["+o+r+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+r+"]")},u.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var o=this._input.read(this._match_pattern);if(o===" ")this.whitespace_before_token=" ";else if(o){var r=this.__split(this._newline_regexp,o);this.newline_count=r.length-1,this.whitespace_before_token=r[this.newline_count]}return o},u.prototype.matching=function(o,r){var A=this._create();return A.__set_whitespace_patterns(o,r),A._update(),A},u.prototype._create=function(){return new u(this._input,this)},u.prototype.__split=function(o,r){o.lastIndex=0;for(var A=0,s=[],t=o.exec(r);t;)s.push(r.substring(A,t.index)),A=t.index+t[0].length,t=o.exec(r);return A<r.length?s.push(r.substring(A,r.length)):s.push(""),s},L.exports.WhitespacePattern=u},function(L){function S(_,b){this._input=_,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,b&&(this._starting_pattern=this._input.get_regexp(b._starting_pattern,!0),this._match_pattern=this._input.get_regexp(b._match_pattern,!0),this._until_pattern=this._input.get_regexp(b._until_pattern),this._until_after=b._until_after)}S.prototype.read=function(){var _=this._input.read(this._starting_pattern);return(!this._starting_pattern||_)&&(_+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),_},S.prototype.read_match=function(){return this._input.match(this._match_pattern)},S.prototype.until_after=function(_){var b=this._create();return b._until_after=!0,b._until_pattern=this._input.get_regexp(_),b._update(),b},S.prototype.until=function(_){var b=this._create();return b._until_after=!1,b._until_pattern=this._input.get_regexp(_),b._update(),b},S.prototype.starting_with=function(_){var b=this._create();return b._starting_pattern=this._input.get_regexp(_,!0),b._update(),b},S.prototype.matching=function(_){var b=this._create();return b._match_pattern=this._input.get_regexp(_,!0),b._update(),b},S.prototype._create=function(){return new S(this._input,this)},S.prototype._update=function(){},L.exports.Pattern=S},function(L){function S(_,b){_=typeof _=="string"?_:_.source,b=typeof b=="string"?b:b.source,this.__directives_block_pattern=new RegExp(_+/ beautify( \w+[:]\w+)+ /.source+b,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(_+/\sbeautify\signore:end\s/.source+b,"g")}S.prototype.get_directives=function(_){if(!_.match(this.__directives_block_pattern))return null;var b={};this.__directive_pattern.lastIndex=0;for(var u=this.__directive_pattern.exec(_);u;)b[u[1]]=u[2],u=this.__directive_pattern.exec(_);return b},S.prototype.readIgnored=function(_){return _.readUntilAfter(this.__directives_end_ignore_pattern)},L.exports.Directives=S},function(L,S,_){var b=_(12).Pattern,u={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function o(r,A){b.call(this,r,A),this.__template_pattern=null,this._disabled=Object.assign({},u),this._excluded=Object.assign({},u),A&&(this.__template_pattern=this._input.get_regexp(A.__template_pattern),this._excluded=Object.assign(this._excluded,A._excluded),this._disabled=Object.assign(this._disabled,A._disabled));var s=new b(r);this.__patterns={handlebars_comment:s.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:s.starting_with(/{{{/).until_after(/}}}/),handlebars:s.starting_with(/{{/).until_after(/}}/),php:s.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:s.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:s.starting_with(/{%/).until_after(/%}/),django_value:s.starting_with(/{{/).until_after(/}}/),django_comment:s.starting_with(/{#/).until_after(/#}/),smarty:s.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:s.starting_with(/{\*/).until_after(/\*}/),smarty_literal:s.starting_with(/{literal}/).until_after(/{\/literal}/)}}o.prototype=new b,o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){this.__set_templated_pattern()},o.prototype.disable=function(r){var A=this._create();return A._disabled[r]=!0,A._update(),A},o.prototype.read_options=function(r){var A=this._create();for(var s in u)A._disabled[s]=r.templating.indexOf(s)===-1;return A._update(),A},o.prototype.exclude=function(r){var A=this._create();return A._excluded[r]=!0,A._update(),A},o.prototype.read=function(){var r="";this._match_pattern?r=this._input.read(this._starting_pattern):r=this._input.read(this._starting_pattern,this.__template_pattern);for(var A=this._read_template();A;)this._match_pattern?A+=this._input.read(this._match_pattern):A+=this._input.readUntil(this.__template_pattern),r+=A,A=this._read_template();return this._until_after&&(r+=this._input.readUntilAfter(this._until_pattern)),r},o.prototype.__set_templated_pattern=function(){var r=[];this._disabled.php||r.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||r.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||r.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(r.push(this.__patterns.django._starting_pattern.source),r.push(this.__patterns.django_value._starting_pattern.source),r.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||r.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&r.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+r.join("|")+")")},o.prototype._read_template=function(){var r="",A=this._input.peek();if(A==="<"){var s=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&s==="?"&&(r=r||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&s==="%"&&(r=r||this.__patterns.erb.read())}else A==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(r=r||this.__patterns.handlebars_comment.read(),r=r||this.__patterns.handlebars_unescaped.read(),r=r||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(r=r||this.__patterns.django_value.read()),this._excluded.django||(r=r||this.__patterns.django_comment.read(),r=r||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(r=r||this.__patterns.smarty_comment.read(),r=r||this.__patterns.smarty_literal.read(),r=r||this.__patterns.smarty.read()));return r},L.exports.TemplatablePattern=o}],I={};function G(L){var S=I[L];if(S!==void 0)return S.exports;var _=I[L]={exports:{}};return D[L](_,_.exports,G),_.exports}var P=G(0);O=P})();var z=O;!(ve=[],V=function(){return{js_beautify:z}}.apply($e,ve),V!==void 0&&(vt.exports=V))})()},"6eGT":function(vt,$e,q){"use strict";function ve(V){return null}$e.a=ve},"815F":function(vt,$e,q){"use strict";q.d($e,"e",function(){return G}),q.d($e,"c",function(){return L}),q.d($e,"d",function(){return S}),q.d($e,"a",function(){return b}),q.d($e,"f",function(){return u}),q.d($e,"b",function(){return o});var ve=q("KQm4"),V=q("VTBJ"),O=q("Ff2n"),z=q("Zm9Q"),D=q("Kwbf"),I=q("OZM5");function G(r,A){return r!=null?r:A}function P(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],A=new Map;function s(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(t||[]).forEach(function(i){var B=i.key,w=i.children;Object(D.a)(B!=null,"Tree node must have a certain key: [".concat(n).concat(B,"]"));var y=String(B);Object(D.a)(!A.has(y)||B===null||B===void 0,"Same 'key' exist in the Tree: ".concat(y)),A.set(y,!0),s(w,"".concat(n).concat(y," > "))})}s(r)}function L(r){function A(s){var t=Object(z.a)(s);return t.map(function(n){if(!Object(I.i)(n))return Object(D.a)(!n,"Tree/TreeNode can only accept TreeNode as children."),null;var i=n.key,B=n.props,w=B.children,y=Object(O.a)(B,["children"]),x=Object(V.a)({key:i},y),E=A(w);return E.length&&(x.children=E),x}).filter(function(n){return n})}return A(r)}function S(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],s=new Set(A===!0?[]:A),t=[];function n(i){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return i.map(function(w,y){var x=Object(I.h)(B?B.pos:"0",y),E=G(w.key,x),c=Object(V.a)(Object(V.a)({},w),{},{parent:B,pos:x,children:null,data:w,isStart:[].concat(Object(ve.a)(B?B.isStart:[]),[y===0]),isEnd:[].concat(Object(ve.a)(B?B.isEnd:[]),[y===i.length-1])});return t.push(c),A===!0||s.has(E)?c.children=n(w.children||[],c):c.children=[],c})}return n(r),t}function _(r,A,s){var t;s?typeof s=="string"?t=function(B){return B[s]}:typeof s=="function"&&(t=function(B){return s(B)}):t=function(B,w){return G(B.key,w)};function n(i,B,w){var y=i?i.children:r,x=i?Object(I.h)(w.pos,B):"0";if(i){var E=t(i,x),c={node:i,index:B,pos:x,key:E,parentPos:w.node?w.pos:null,level:w.level+1};A(c)}y&&y.forEach(function(e,a){n(e,a,{node:i,pos:x,level:w?w.level+1:-1})})}n(null)}function b(r){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=A.initWrapper,t=A.processEntity,n=A.onProcessFinished,i=arguments.length>2?arguments[2]:void 0,B={},w={},y={posEntities:B,keyEntities:w};return s&&(y=s(y)||y),_(r,function(x){var E=x.node,c=x.index,e=x.pos,a=x.key,l=x.parentPos,g=x.level,p={node:E,index:c,key:a,pos:e,level:g},f=G(a,e);B[e]=p,w[f]=p,p.parent=B[l],p.parent&&(p.parent.children=p.parent.children||[],p.parent.children.push(p)),t&&t(p,y)},i),n&&n(y),y}function u(r,A){var s=A.expandedKeys,t=A.selectedKeys,n=A.loadedKeys,i=A.loadingKeys,B=A.checkedKeys,w=A.halfCheckedKeys,y=A.dragOverNodeKey,x=A.dropPosition,E=A.keyEntities,c=E[r],e={eventKey:r,expanded:s.indexOf(r)!==-1,selected:t.indexOf(r)!==-1,loaded:n.indexOf(r)!==-1,loading:i.indexOf(r)!==-1,checked:B.indexOf(r)!==-1,halfChecked:w.indexOf(r)!==-1,pos:String(c?c.pos:""),dragOver:y===r&&x===0,dragOverGapTop:y===r&&x===-1,dragOverGapBottom:y===r&&x===1};return e}function o(r){var A=r.data,s=r.expanded,t=r.selected,n=r.checked,i=r.loaded,B=r.loading,w=r.halfChecked,y=r.dragOver,x=r.dragOverGapTop,E=r.dragOverGapBottom,c=r.pos,e=r.active,a=Object(V.a)(Object(V.a)({},A),{},{expanded:s,selected:t,checked:n,loaded:i,loading:B,halfChecked:w,dragOver:y,dragOverGapTop:x,dragOverGapBottom:E,pos:c,active:e});return"props"in a||Object.defineProperty(a,"props",{get:function(){return Object(D.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),r}}),a}},"8hTe":function(vt,$e,q){vt.exports={button:"button___1wy9m"}},"9Bee":function(vt,$e,q){"use strict";var ve=q("DYRE"),V=q("zeV3"),O=q("+L6B"),z=q("2/Rp"),D=q("k1fw"),I=q("9og8"),G=q("tJVT"),P=q("WmNS"),L=q.n(P),S=q("q1tI"),_=q.n(S),b=q("vg9a"),u=q("DlQD"),o=q.n(u),r=q("rUJ1");function A(M,d){var m=M.match(/^(\s+)(?:```)/);if(m===null)return d;var N=m[1];return d.split(`
`).map(function(X){var H=X.match(/^\s+/);if(H===null)return X;var fe=Object(G.a)(H,1),ke=fe[0];return ke.length>=N.length?X.slice(N.length):X}).join(`
`)}var s=[],t=["<ul>"],n=new o.a.Renderer,i=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function B(){s.length=0,t=["<ul>"]}var w={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function y(M,d,m,N){if(d>=M.length||M[d].level<=m)return d;var X=M[d];N.push("<li><a href='#"+X.anchor+"'>"+X.text+"</a>"),d++;var H=[];return d=y(M,d,X.level,H),H.length>0&&(N.push("<ul>"),H.forEach(function(fe){N.push(fe)}),N.push("</ul>")),N.push("</li>"),d=y(M,d,m,N),d}function x(){return y(s,0,0,t),t.push("</ul>"),t.join("")}var E={heading:function(d){var m=i.exec(d);if(m)return{type:"heading",raw:m[0],depth:m[1].length,text:m[2]}},fences:function(d){var m=this.rules.block.fences.exec(d);if(m){var N=m[0],X=A(N,m[3]||""),H=m[2]?m[2].trim():m[2];if(["latex","katex","math"].indexOf(H)>=0){var fe=a(),ke=X;X=fe,l[fe]={type:"block",expression:ke}}return{type:"code",raw:N,lang:H,text:X}}}},c=/(?:\${2})([^\n`]+?)(?:\${2})/gi,e=0,a=function(){return"__special_katext_id_".concat(e++,"__")},l={};function g(){return l}function p(){e=0,l={}}function f(M){return M=M.replace(c,function(d,m){var N=a();return l[N]={type:"inline",expression:m},N}),M}var R=n.listitem;n.listitem=function(M){return R(f(M))};var U=n.paragraph;n.paragraph=function(M){return U(f(M))};var Q=n.tablecell;n.tablecell=function(M,d){return Q(f(M),d)},n.code=function(M,d,m){var N=(d||"").match(/\S*/)[0];return N?["latex","katex","math"].indexOf(N)>=0?"<p class='editormd-tex'>".concat(M,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(d,'">').concat(m?M:Object(r.escape)(M,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(m?M:Object(r.escape)(M,!0))+"</code></pre>"},n.heading=function(M,d,m){var N=this.options.headerPrefix+m.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return s.push({anchor:N,level:d,text:M}),"<h"+d+' id="'+N+'">'+M+"</h"+d+">"},o.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),o.a.use({tokenizer:E,renderer:n});var j=o.a,J=q("SJMd"),k=q("ulZh"),Y=q.n(k),ne=q("m3rI"),me=q("Oy/b"),_e=q("p5ED"),Oe=q("ErOA");/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var xe=function(M,d){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,N){m.__proto__=N}||function(m,N){for(var X in N)Object.prototype.hasOwnProperty.call(N,X)&&(m[X]=N[X])})(M,d)};function Se(M,d){function m(){this.constructor=M}xe(M,d),M.prototype=d===null?Object.create(d):(m.prototype=d.prototype,new m)}function Fe(M,d,m,N){return new(m||(m=Promise))(function(X,H){function fe(ot){try{rt(N.next(ot))}catch(Ke){H(Ke)}}function ke(ot){try{rt(N.throw(ot))}catch(Ke){H(Ke)}}function rt(ot){var Ke;ot.done?X(ot.value):(Ke=ot.value,Ke instanceof m?Ke:new m(function(_t){_t(Ke)})).then(fe,ke)}rt((N=N.apply(M,d||[])).next())})}function Pe(M,d){var m,N,X,H,fe={label:0,sent:function(){if(1&X[0])throw X[1];return X[1]},trys:[],ops:[]};return H={next:ke(0),throw:ke(1),return:ke(2)},typeof Symbol=="function"&&(H[Symbol.iterator]=function(){return this}),H;function ke(rt){return function(ot){return function(Ke){if(m)throw new TypeError("Generator is already executing.");for(;fe;)try{if(m=1,N&&(X=2&Ke[0]?N.return:Ke[0]?N.throw||((X=N.return)&&X.call(N),0):N.next)&&!(X=X.call(N,Ke[1])).done)return X;switch(N=0,X&&(Ke=[2&Ke[0],X.value]),Ke[0]){case 0:case 1:X=Ke;break;case 4:return fe.label++,{value:Ke[1],done:!1};case 5:fe.label++,N=Ke[1],Ke=[0];continue;case 7:Ke=fe.ops.pop(),fe.trys.pop();continue;default:if(!(X=fe.trys,(X=X.length>0&&X[X.length-1])||Ke[0]!==6&&Ke[0]!==2)){fe=0;continue}if(Ke[0]===3&&(!X||Ke[1]>X[0]&&Ke[1]<X[3])){fe.label=Ke[1];break}if(Ke[0]===6&&fe.label<X[1]){fe.label=X[1],X=Ke;break}if(X&&fe.label<X[2]){fe.label=X[2],fe.ops.push(Ke);break}X[2]&&fe.ops.pop(),fe.trys.pop();continue}Ke=d.call(M,fe)}catch(_t){Ke=[6,_t],N=0}finally{m=X=0}if(5&Ke[0])throw Ke[1];return{value:Ke[0]?Ke[1]:void 0,done:!0}}([rt,ot])}}}function Ee(){for(var M=0,d=0,m=arguments.length;d<m;d++)M+=arguments[d].length;var N=Array(M),X=0;for(d=0;d<m;d++)for(var H=arguments[d],fe=0,ke=H.length;fe<ke;fe++,X++)N[X]=H[fe];return N}var he=function(){function M(){}return M.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},M.setAttributes=function(d,m){for(var N=0,X=m;N<X.length;N++){var H=X[N],fe=H[0],ke=H[1];d.setAttribute(fe,ke)}},M.createRect=function(d,m,N){var X=document.createElementNS("http://www.w3.org/2000/svg","rect");return X.setAttribute("width",d.toString()),X.setAttribute("height",m.toString()),N&&M.setAttributes(X,N),X},M.createLine=function(d,m,N,X,H){var fe=document.createElementNS("http://www.w3.org/2000/svg","line");return fe.setAttribute("x1",d.toString()),fe.setAttribute("y1",m.toString()),fe.setAttribute("x2",N.toString()),fe.setAttribute("y2",X.toString()),H&&M.setAttributes(fe,H),fe},M.createPolygon=function(d,m){var N=document.createElementNS("http://www.w3.org/2000/svg","polygon");return N.setAttribute("points",d),m&&M.setAttributes(N,m),N},M.createCircle=function(d,m){var N=document.createElementNS("http://www.w3.org/2000/svg","circle");return N.setAttribute("cx",(d/2).toString()),N.setAttribute("cy",(d/2).toString()),N.setAttribute("r",d.toString()),m&&M.setAttributes(N,m),N},M.createEllipse=function(d,m,N){var X=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return X.setAttribute("cx",(d/2).toString()),X.setAttribute("cy",(m/2).toString()),X.setAttribute("rx",(d/2).toString()),X.setAttribute("ry",(m/2).toString()),N&&M.setAttributes(X,N),X},M.createGroup=function(d){var m=document.createElementNS("http://www.w3.org/2000/svg","g");return d&&M.setAttributes(m,d),m},M.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},M.createMarker=function(d,m,N,X,H,fe,ke){var rt=document.createElementNS("http://www.w3.org/2000/svg","marker");return M.setAttributes(rt,[["id",d],["orient",m],["markerWidth",N.toString()],["markerHeight",X.toString()],["refX",H.toString()],["refY",fe.toString()]]),rt.appendChild(ke),rt},M.createText=function(d){var m=document.createElementNS("http://www.w3.org/2000/svg","text");return m.setAttribute("x","0"),m.setAttribute("y","0"),d&&M.setAttributes(m,d),m},M.createTSpan=function(d,m){var N=document.createElementNS("http://www.w3.org/2000/svg","tspan");return N.textContent=d,m&&M.setAttributes(N,m),N},M.createImage=function(d){var m=document.createElementNS("http://www.w3.org/2000/svg","image");return d&&M.setAttributes(m,d),m},M.createPoint=function(d,m){var N=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return N.x=d,N.y=m,N},M.createPath=function(d,m){var N=document.createElementNS("http://www.w3.org/2000/svg","path");return N.setAttribute("d",d),m&&M.setAttributes(N,m),N},M}(),Ge=function(){function M(){}return M.addKey=function(d){M.key=d},Object.defineProperty(M,"isLicensed",{get:function(){return!!M.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(M.key)},enumerable:!1,configurable:!0}),M}(),lt=function(){function M(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return M.prototype.rasterize=function(d,m,N){var X=this;return new Promise(function(H){var fe=N!==void 0?N:document.createElement("canvas");d===null&&(X.markersOnly=!0,X.naturalSize=!1);var ke=document.createElementNS("http://www.w3.org/2000/svg","svg");ke.setAttribute("xmlns","http://www.w3.org/2000/svg"),ke.setAttribute("width",m.width.baseVal.valueAsString),ke.setAttribute("height",m.height.baseVal.valueAsString),ke.setAttribute("viewBox","0 0 "+m.viewBox.baseVal.width.toString()+" "+m.viewBox.baseVal.height.toString()),ke.innerHTML=m.innerHTML,X.naturalSize===!0?(ke.width.baseVal.value=d.naturalWidth,ke.height.baseVal.value=d.naturalHeight):X.width!==void 0&&X.height!==void 0&&(ke.width.baseVal.value=X.width,ke.height.baseVal.value=X.height),fe.width=ke.width.baseVal.value,fe.height=ke.height.baseVal.value;var rt=ke.outerHTML,ot=fe.getContext("2d");X.markersOnly!==!0&&ot.drawImage(d,0,0,fe.width,fe.height);var Ke=window.URL,_t=new Image(fe.width,fe.height);_t.setAttribute("crossOrigin","anonymous");var gt=new Blob([rt],{type:"image/svg+xml"}),Bt=Ke.createObjectURL(gt);_t.onload=function(){ot.drawImage(_t,0,0),Ke.revokeObjectURL(Bt);var Mt=fe.toDataURL(X.imageType,X.imageQuality);H(Mt)},_t.src=Bt})},M}(),at=function(){},je=function(){function M(d){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+d+"_"}return Object.defineProperty(M.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),M.prototype.addClass=function(d){return this.styleSheet===void 0&&this.addStyleSheet(),d.name=""+this.classNamePrefix+d.localName,this.classes.push(d),this.styleSheet.sheet.insertRule("."+d.name+" {"+d.style+"}",this.styleSheet.sheet.cssRules.length),d},M.prototype.addRule=function(d){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(d),this.styleSheet.sheet.insertRule(d.selector+" {"+d.style+"}",this.styleSheet.sheet.cssRules.length)},M.prototype.addStyleSheet=function(){var d;this.styleSheet=document.createElement("style"),((d=this.styleSheetRoot)!==null&&d!==void 0?d:document.head).appendChild(this.styleSheet),this.addRule(new it("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new it("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new it("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new ee("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new ee("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},M.prototype.removeStyleSheet=function(){var d;this.styleSheet&&(((d=this.styleSheetRoot)!==null&&d!==void 0?d:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},M}(),it=function(M,d){this.selector=M,this.style=d},ee=function(M,d){this.localName=M,this.style=d},W=function(){function M(d,m,N,X,H){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=d,this.displayMode=m,this.markerItems=N,this.uiStyleSettings=X,this.styles=H,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return M.prototype.show=function(d){var m=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=d,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var N=document.createElement("div");N.className=this.toolbarBlockStyleClass.name,N.style.whiteSpace="nowrap",this.uiContainer.appendChild(N),this.addActionButton(N,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(N,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(N,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(N,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(N,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(N,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(N,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(N,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(H){var fe=document.createElement("div");fe.className=""+m.toolbarButtonStyleClass.name,fe.setAttribute("data-type-name",H.typeName),fe.innerHTML=H.icon,fe.addEventListener("click",function(){m.markerToolbarButtonClicked(fe,H)}),m.buttons.push(fe),m.markerButtons.push(fe)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var X=document.createElement("div");X.className=this.toolbarBlockStyleClass.name,X.style.whiteSpace="nowrap",X.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(X),this.addActionButton(X,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(X,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},M.prototype.addButtonClickListener=function(d){this.buttonClickListeners.push(d)},M.prototype.removeButtonClickListener=function(d){this.buttonClickListeners.indexOf(d)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(d),1)},M.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},M.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var d=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var m=0;m<this.markerButtons.length;m++)m<d||m===d&&this.markerButtons.length-1===d?this.markerButtonBlock.appendChild(this.markerButtons[m]):(m===d&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[m]))}},M.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},M.prototype.resetButtonStyles=function(){var d=this;this.buttons.forEach(function(m){m.className=m.className.replace(d.uiStyleSettings.toolbarButtonStyleColorsClassName?d.uiStyleSettings.toolbarButtonStyleColorsClassName:d.toolbarButtonStyleColorsClass.name,"").trim(),m.className=m.className.replace(d.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?d.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:d.toolbarActiveButtonStyleColorsClass.name,"").trim(),m.className+=" "+(d.uiStyleSettings.toolbarButtonStyleColorsClassName?d.uiStyleSettings.toolbarButtonStyleColorsClassName:d.toolbarButtonStyleColorsClass.name)})},M.prototype.addActionButton=function(d,m,N){var X=this,H=document.createElement("div");switch(H.className=""+this.toolbarButtonStyleClass.name,H.innerHTML=m,H.setAttribute("data-action",N),H.addEventListener("click",function(){X.actionToolbarButtonClicked(H,N)}),N){case"select":H.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":H.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":H.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":H.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":H.style.fill=this.uiStyleSettings.closeButtonColor}d.appendChild(H),this.buttons.push(H)},M.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ee("toolbar",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.uiStyleSettings.toolbarHeight+`px;
box-sizing: content-box;
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new ee("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ee("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ee("toolbar-overflow-block",`
position: absolute;
top: `+this.uiStyleSettings.toolbarHeight+`px;
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
z-index: 10;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new ee("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var d=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ee("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*d)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*d)+`px;
padding: `+d+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ee("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ee("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new it("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new it("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},M.prototype.markerToolbarButtonClicked=function(d,m){this.setActiveButton(d),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(N){return N("marker",m)}),this.markerButtonOverflowBlock.style.display="none"},M.prototype.actionToolbarButtonClicked=function(d,m){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(N){return N("action",m)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},M.prototype.setActiveButton=function(d){this.resetButtonStyles(),d.className=d.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),d.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},M.prototype.setActiveMarkerButton=function(d){var m=this.markerButtons.find(function(N){return N.getAttribute("data-type-name")===d});m&&this.setActiveButton(m)},M.prototype.setCurrentMarker=function(d){var m=this;this.currentMarker=d,this.buttons.filter(function(N){return/delete|notes/.test(N.getAttribute("data-action"))}).forEach(function(N){m.currentMarker===void 0?(N.style.fillOpacity="0.4",N.style.pointerEvents="none"):(N.style.fillOpacity="1",N.style.pointerEvents="all")})},M}(),F=function(){function M(d,m,N,X){this.panels=[],this.panelButtons=[],this.markerjsContainer=d,this.displayMode=m,this.uiStyleSettings=N,this.styles=X,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return M.prototype.addStyles=function(){var d;this.toolboxStyleClass=this.styles.addClass(new ee("toolbox",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: column;
font-family: sans-serif;
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
box-sizing: content-box;
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolboxStyleColorsClass=this.styles.addClass(new ee("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var m=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ee("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ee("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ee("toolbox-panel-row",`
display: flex;
`+(this.displayMode==="inline"?"position: absolute;":"")+`
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
cursor: default;
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
`+(this.displayMode==="inline"?"width: 100%;":"")+`
box-sizing: content-box;
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new ee("toolbox-panel-row_colors",`
background-color: `+((d=this.uiStyleSettings.toolboxBackgroundColor)!==null&&d!==void 0?d:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ee("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*m)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*m)+`px;
padding: `+m+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ee("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ee("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new it("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new it("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},M.prototype.show=function(d){var m;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=d,this.uiContainer.className=this.toolboxStyleClass.name+" "+((m=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&m!==void 0?m:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},M.prototype.setPanelButtons=function(d){var m,N,X=this;this.panels=d,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((m=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&m!==void 0?m:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((N=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&N!==void 0?N:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(H){var fe;H.uiStyleSettings=X.uiStyleSettings;var ke=document.createElement("div");ke.className=X.toolboxButtonStyleClass.name+" "+((fe=X.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&fe!==void 0?fe:X.toolboxButtonStyleColorsClass.name),ke.innerHTML=H.icon,ke.title=H.title,ke.addEventListener("click",function(){X.panelButtonClick(H)}),X.panelButtons.push(ke),X.buttonRow.appendChild(ke)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},M.prototype.panelButtonClick=function(d){var m=this,N=-1;if(d!==this.activePanel){N=this.panels.indexOf(d),this.panelRow.innerHTML="";var X=d.getUi();X.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(X),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=d}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){m.displayMode==="inline"?m.panelRow.style.display="none":m.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(H,fe){var ke,rt;H.className=m.toolboxButtonStyleClass.name+" "+(fe===N?""+((ke=m.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&ke!==void 0?ke:m.toolboxActiveButtonStyleColorsClass.name):""+((rt=m.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&rt!==void 0?rt:m.toolboxButtonStyleColorsClass.name))})},M}(),oe=function(M,d){this.title=M,this.icon=d},re=function(M){function d(m,N,X,H){var fe=M.call(this,m,H||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return fe.colors=[],fe.addTransparent=!1,fe.colorBoxes=[],fe.colors=N,fe.currentColor=X,fe.setCurrentColor=fe.setCurrentColor.bind(fe),fe.getColorBox=fe.getColorBox.bind(fe),fe}return Se(d,M),d.prototype.getUi=function(){var m=this,N=document.createElement("div");return N.style.overflow="hidden",N.style.whiteSpace="nowrap",this.colors.forEach(function(X){var H=m.getColorBox(X);N.appendChild(H),m.colorBoxes.push(H)}),N},d.prototype.getColorBox=function(m){var N=this,X=this.uiStyleSettings.toolbarHeight/4,H=this.uiStyleSettings.toolbarHeight-X,fe=document.createElement("div");fe.style.display="inline-block",fe.style.boxSizing="content-box",fe.style.width=H-2+"px",fe.style.height=H-2+"px",fe.style.padding="1px",fe.style.marginRight="2px",fe.style.marginBottom="2px",fe.style.borderWidth="2px",fe.style.borderStyle="solid",fe.style.borderRadius=(H+2)/2+"px",fe.style.borderColor=m===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",fe.addEventListener("click",function(){N.setCurrentColor(m,fe)});var ke=document.createElement("div");return ke.style.display="inline-block",ke.style.width=H-2+"px",ke.style.height=H-2+"px",ke.style.backgroundColor=m,ke.style.borderRadius=H/2+"px",m==="transparent"&&(ke.style.fill=this.uiStyleSettings.toolboxAccentColor,ke.innerHTML=`<svg viewBox="0 0 24 24">
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
</svg>`),fe.appendChild(ke),fe},d.prototype.setCurrentColor=function(m,N){var X=this;this.currentColor=m,this.colorBoxes.forEach(function(H){H.style.borderColor=H===N?X.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(m)},d}(oe),we=function(){function M(d,m,N){this._state="new",this._isSelected=!1,this._container=d,this._overlayContainer=m,this.globalSettings=N,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(M.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),M.prototype.ownsTarget=function(d){return!1},Object.defineProperty(M.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),M.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},M.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},M.prototype.pointerDown=function(d,m){},M.prototype.dblClick=function(d,m){},M.prototype.manipulate=function(d){},M.prototype.pointerUp=function(d){this.stateChanged()},M.prototype.dispose=function(){},M.prototype.addMarkerVisualToContainer=function(d){this.container.childNodes.length>0?this.container.insertBefore(d,this.container.childNodes[0]):this.container.appendChild(d)},M.prototype.getState=function(){return{typeName:M.typeName,state:this.state,notes:this.notes}},M.prototype.restoreState=function(d){this._state=d.state,this.notes=d.notes},M.prototype.scale=function(d,m){},M.prototype.colorChanged=function(d){this.onColorChanged&&this.onColorChanged(d),this.stateChanged()},M.prototype.fillColorChanged=function(d){this.onFillColorChanged&&this.onFillColorChanged(d),this.stateChanged()},M.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var d=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),d.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(d)&&this.onStateChanged(this)}},M.typeName="MarkerBase",M}(),be=function(){function M(){this.findGripByVisual=this.findGripByVisual.bind(this)}return M.prototype.findGripByVisual=function(d){return this.topLeft.ownsTarget(d)?this.topLeft:this.topCenter.ownsTarget(d)?this.topCenter:this.topRight.ownsTarget(d)?this.topRight:this.centerLeft.ownsTarget(d)?this.centerLeft:this.centerRight.ownsTarget(d)?this.centerRight:this.bottomLeft.ownsTarget(d)?this.bottomLeft:this.bottomCenter.ownsTarget(d)?this.bottomCenter:this.bottomRight.ownsTarget(d)?this.bottomRight:void 0},M}(),nt=function(){function M(){this.GRIP_SIZE=10,this.visual=he.createGroup(),this.visual.appendChild(he.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(he.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return M.prototype.ownsTarget=function(d){return d===this.visual||d===this.visual.childNodes[0]||d===this.visual.childNodes[1]},M}(),tt=function(){function M(){}return M.toITransformMatrix=function(d){return{a:d.a,b:d.b,c:d.c,d:d.d,e:d.e,f:d.f}},M.toSVGMatrix=function(d,m){return d.a=m.a,d.b=m.b,d.c=m.c,d.d=m.d,d.e=m.e,d.f=m.f,d},M}(),Ye=function(M){function d(m,N,X){var H=M.call(this,m,N,X)||this;return H.left=0,H.top=0,H.width=0,H.height=0,H.defaultSize={x:50,y:20},H.offsetX=0,H.offsetY=0,H.rotationAngle=0,H.CB_DISTANCE=10,H._suppressMarkerCreateEvent=!1,H.container.transform.baseVal.appendItem(he.createTransform()),H.setupControlBox(),H}return Se(d,M),Object.defineProperty(d.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"visual",{get:function(){return this._visual},set:function(m){this._visual=m;var N=he.createTransform();this._visual.transform.baseVal.appendItem(N)},enumerable:!1,configurable:!0}),d.prototype.ownsTarget=function(m){return!!M.prototype.ownsTarget.call(this,m)||!!(this.controlGrips.findGripByVisual(m)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(m))},d.prototype.pointerDown=function(m,N){M.prototype.pointerDown.call(this,m,N),this.state==="new"&&(this.left=m.x,this.top=m.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var X=this.unrotatePoint(m);if(this.manipulationStartX=X.x,this.manipulationStartY=X.y,this.offsetX=X.x-this.left,this.offsetY=X.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(N),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(N)){this.activeGrip=this.rotatorGrip;var H=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=H.x-this.width/2,this.top=H.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var fe=this.container.transform.baseVal.getItem(0);fe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(fe,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},d.prototype.pointerUp=function(m){var N=this.state;M.prototype.pointerUp.call(this,m),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(m),this._state="select",N==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},d.prototype.moveVisual=function(m){this.visual.style.transform="translate("+m.x+"px, "+m.y+"px)"},d.prototype.manipulate=function(m){var N=this.unrotatePoint(m);this.state==="creating"?this.resize(m):this.state==="move"?(this.left=this.manipulationStartLeft+(N.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(N.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(N):this.state==="rotate"&&this.rotate(m)},d.prototype.resize=function(m){var N=this.manipulationStartLeft,X=this.manipulationStartWidth,H=this.manipulationStartTop,fe=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:N=this.manipulationStartLeft+m.x-this.manipulationStartX,X=this.manipulationStartWidth+this.manipulationStartLeft-N;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:X=this.manipulationStartWidth+m.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:H=this.manipulationStartTop+m.y-this.manipulationStartY,fe=this.manipulationStartHeight+this.manipulationStartTop-H;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:fe=this.manipulationStartHeight+m.y-this.manipulationStartY}X>=0?(this.left=N,this.width=X):(this.left=N+X,this.width=-X),fe>=0?(this.top=H,this.height=fe):(this.top=H+fe,this.height=-fe),this.setSize()},d.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},d.prototype.rotate=function(m){if(Math.abs(m.x-this.centerX)>.1){var N=Math.sign(m.x-this.centerX);this.rotationAngle=180*Math.atan((m.y-this.centerY)/(m.x-this.centerX))/Math.PI+90*N,this.applyRotation()}},d.prototype.applyRotation=function(){var m=this.container.transform.baseVal.getItem(0);m.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(m,0)},d.prototype.rotatePoint=function(m){if(this.rotationAngle===0)return m;var N=this.container.getCTM(),X=he.createPoint(m.x,m.y);return{x:(X=X.matrixTransform(N)).x,y:X.y}},d.prototype.unrotatePoint=function(m){if(this.rotationAngle===0)return m;var N=this.container.getCTM();N=N.inverse();var X=he.createPoint(m.x,m.y);return{x:(X=X.matrixTransform(N)).x,y:X.y}},d.prototype.select=function(){M.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},d.prototype.deselect=function(){M.prototype.deselect.call(this),this.controlBox.style.display="none"},d.prototype.setupControlBox=function(){this.controlBox=he.createGroup();var m=he.createTransform();m.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(m),this.container.appendChild(this.controlBox),this.controlRect=he.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=he.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new be,this.addControlGrips(),this.controlBox.style.display="none"},d.prototype.adjustControlBox=function(){var m=this.controlBox.transform.baseVal.getItem(0);m.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(m,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},d.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},d.prototype.createGrip=function(){var m=new nt;return m.visual.transform.baseVal.appendItem(he.createTransform()),this.controlBox.appendChild(m.visual),m},d.prototype.positionGrips=function(){var m=this.controlGrips.topLeft.GRIP_SIZE,N=-m/2,X=N,H=(this.width+this.CB_DISTANCE)/2-m/2,fe=(this.height+this.CB_DISTANCE)/2-m/2,ke=this.height+this.CB_DISTANCE-m/2,rt=this.width+this.CB_DISTANCE-m/2;this.positionGrip(this.controlGrips.topLeft.visual,N,X),this.positionGrip(this.controlGrips.topCenter.visual,H,X),this.positionGrip(this.controlGrips.topRight.visual,rt,X),this.positionGrip(this.controlGrips.centerLeft.visual,N,fe),this.positionGrip(this.controlGrips.centerRight.visual,rt,fe),this.positionGrip(this.controlGrips.bottomLeft.visual,N,ke),this.positionGrip(this.controlGrips.bottomCenter.visual,H,ke),this.positionGrip(this.controlGrips.bottomRight.visual,rt,ke),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,H,X-3*this.CB_DISTANCE)},d.prototype.positionGrip=function(m,N,X){var H=m.transform.baseVal.getItem(0);H.setTranslate(N,X),m.transform.baseVal.replaceItem(H,0)},d.prototype.hideControlBox=function(){this.controlBox.style.display="none"},d.prototype.showControlBox=function(){this.controlBox.style.display=""},d.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:tt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:tt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},M.prototype.getState.call(this))},d.prototype.restoreState=function(m){M.prototype.restoreState.call(this,m);var N=m;this.left=N.left,this.top=N.top,this.width=N.width,this.height=N.height,this.rotationAngle=N.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(tt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,N.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(tt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,N.containerTransformMatrix))},d.prototype.scale=function(m,N){M.prototype.scale.call(this,m,N);var X=this.rotatePoint({x:this.left,y:this.top}),H=this.unrotatePoint({x:X.x*m,y:X.y*N});this.left=H.x,this.top=H.y,this.width=this.width*m,this.height=this.height*N,this.adjustControlBox()},d}(we),qe=function(M){function d(m,N,X){var H=M.call(this,m,N,X)||this;return H.fillColor="transparent",H.strokeColor="transparent",H.strokeWidth=0,H.strokeDasharray="",H.opacity=1,H.setStrokeColor=H.setStrokeColor.bind(H),H.setFillColor=H.setFillColor.bind(H),H.setStrokeWidth=H.setStrokeWidth.bind(H),H.setStrokeDasharray=H.setStrokeDasharray.bind(H),H.createVisual=H.createVisual.bind(H),H}return Se(d,M),d.prototype.ownsTarget=function(m){return!(!M.prototype.ownsTarget.call(this,m)&&m!==this.visual)},d.prototype.createVisual=function(){this.visual=he.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},d.prototype.pointerDown=function(m,N){M.prototype.pointerDown.call(this,m,N),this.state==="new"&&(this.createVisual(),this.moveVisual(m),this._state="creating")},d.prototype.manipulate=function(m){M.prototype.manipulate.call(this,m)},d.prototype.resize=function(m){M.prototype.resize.call(this,m),this.setSize()},d.prototype.setSize=function(){M.prototype.setSize.call(this),he.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},d.prototype.pointerUp=function(m){M.prototype.pointerUp.call(this,m),this.setSize()},d.prototype.setStrokeColor=function(m){this.strokeColor=m,this.visual&&he.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(m),this.stateChanged()},d.prototype.setFillColor=function(m){this.fillColor=m,this.visual&&he.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},d.prototype.setStrokeWidth=function(m){this.strokeWidth=m,this.visual&&he.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},d.prototype.setStrokeDasharray=function(m){this.strokeDasharray=m,this.visual&&he.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},d.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},M.prototype.getState.call(this))},d.prototype.restoreState=function(m){var N=m;this.fillColor=N.fillColor,this.strokeColor=N.strokeColor,this.strokeWidth=N.strokeWidth,this.strokeDasharray=N.strokeDasharray,this.opacity=N.opacity,this.createVisual(),M.prototype.restoreState.call(this,m),this.setSize()},d.prototype.scale=function(m,N){M.prototype.scale.call(this,m,N),this.setSize()},d.title="Rectangle marker",d}(Ye),At=function(M){function d(m,N,X,H){var fe=M.call(this,m,H||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return fe.widths=[],fe.widthBoxes=[],fe.widths=N,fe.currentWidth=X,fe.setCurrentWidth=fe.setCurrentWidth.bind(fe),fe}return Se(d,M),d.prototype.getUi=function(){var m=this,N=document.createElement("div");return N.style.display="flex",N.style.overflow="hidden",N.style.flexGrow="2",this.widths.forEach(function(X){var H=document.createElement("div");H.style.display="flex",H.style.flexGrow="2",H.style.alignItems="center",H.style.justifyContent="space-between",H.style.padding="5px",H.style.borderWidth="2px",H.style.borderStyle="solid",H.style.borderColor=X===m.currentWidth?m.uiStyleSettings.toolboxAccentColor:"transparent",H.addEventListener("click",function(){m.setCurrentWidth(X,H)}),N.appendChild(H);var fe=document.createElement("div");fe.innerText=X.toString(),fe.style.marginRight="5px",H.appendChild(fe);var ke=document.createElement("div");ke.style.minHeight="20px",ke.style.flexGrow="2",ke.style.display="flex",ke.style.alignItems="center";var rt=document.createElement("hr");rt.style.minWidth="20px",rt.style.border="0px",rt.style.borderTop=X+"px solid "+m.uiStyleSettings.toolboxColor,rt.style.flexGrow="2",ke.appendChild(rt),H.appendChild(ke),m.widthBoxes.push(H)}),N},d.prototype.setCurrentWidth=function(m,N){var X=this;this.currentWidth=m,this.widthBoxes.forEach(function(H){H.style.borderColor=H===N?X.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},d}(oe),ft=function(M){function d(m,N,X,H){var fe=M.call(this,m,H||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return fe.styles=[],fe.styleBoxes=[],fe.styles=N,fe.currentStyle=X,fe.setCurrentStyle=fe.setCurrentStyle.bind(fe),fe}return Se(d,M),d.prototype.getUi=function(){var m=this,N=document.createElement("div");return N.style.display="flex",N.style.overflow="hidden",N.style.flexGrow="2",this.styles.forEach(function(X){var H=document.createElement("div");H.style.display="flex",H.style.alignItems="center",H.style.justifyContent="space-between",H.style.padding="5px",H.style.borderWidth="2px",H.style.borderStyle="solid",H.style.overflow="hidden",H.style.maxWidth=100/m.styles.length-5+"%",H.style.borderColor=X===m.currentStyle?m.uiStyleSettings.toolboxAccentColor:"transparent",H.addEventListener("click",function(){m.setCurrentStyle(X,H)}),N.appendChild(H);var fe=document.createElement("div");fe.style.minHeight="20px",fe.style.flexGrow="2",fe.style.overflow="hidden";var ke=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+m.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(X!==""?'stroke-dasharray="'+X+'"':"")+` />
</svg>`;fe.innerHTML=ke,H.appendChild(fe),m.styleBoxes.push(H)}),N},d.prototype.setCurrentStyle=function(m,N){var X=this;this.currentStyle=m,this.styleBoxes.forEach(function(H){H.style.borderColor=H===N?X.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},d}(oe),Ce=function(M){function d(m,N,X){var H=M.call(this,m,N,X)||this;return H.strokeColor=X.defaultColor,H.strokeWidth=X.defaultStrokeWidth,H.strokeDasharray=X.defaultStrokeDasharray,H.strokePanel=new re("Line color",X.defaultColorSet,X.defaultColor),H.strokePanel.onColorChanged=H.setStrokeColor,H.strokeWidthPanel=new At("Line width",X.defaultStrokeWidths,X.defaultStrokeWidth),H.strokeWidthPanel.onWidthChanged=H.setStrokeWidth,H.strokeStylePanel=new ft("Line style",X.defaultStrokeDasharrays,X.defaultStrokeDasharray),H.strokeStylePanel.onStyleChanged=H.setStrokeDasharray,H}return Se(d,M),Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var m=M.prototype.getState.call(this);return m.typeName=d.typeName,m},d.typeName="FrameMarker",d.title="Frame marker",d.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',d}(qe),Ue=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},Qe=function(M){function d(m,N,X){var H=M.call(this,m,N,X)||this;return H.x1=0,H.y1=0,H.x2=0,H.y2=0,H.defaultLength=50,H.manipulationStartX=0,H.manipulationStartY=0,H.manipulationStartX1=0,H.manipulationStartY1=0,H.manipulationStartX2=0,H.manipulationStartY2=0,H.setupControlBox(),H}return Se(d,M),d.prototype.ownsTarget=function(m){return!!M.prototype.ownsTarget.call(this,m)||!(!this.grip1.ownsTarget(m)&&!this.grip2.ownsTarget(m))},d.prototype.pointerDown=function(m,N){M.prototype.pointerDown.call(this,m,N),this.manipulationStartX=m.x,this.manipulationStartY=m.y,this.state==="new"&&(this.x1=m.x,this.y1=m.y,this.x2=m.x,this.y2=m.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(N)?this.activeGrip=this.grip1:this.grip2.ownsTarget(N)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},d.prototype.pointerUp=function(m){var N=this.state;M.prototype.pointerUp.call(this,m),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(m),this._state="select",N==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},d.prototype.adjustVisual=function(){},d.prototype.manipulate=function(m){this.state==="creating"?this.resize(m):this.state==="move"?(this.x1=this.manipulationStartX1+m.x-this.manipulationStartX,this.y1=this.manipulationStartY1+m.y-this.manipulationStartY,this.x2=this.manipulationStartX2+m.x-this.manipulationStartX,this.y2=this.manipulationStartY2+m.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(m)},d.prototype.resize=function(m){switch(this.activeGrip){case this.grip1:this.x1=m.x,this.y1=m.y;break;case this.grip2:case void 0:this.x2=m.x,this.y2=m.y}this.adjustVisual(),this.adjustControlBox()},d.prototype.select=function(){M.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},d.prototype.deselect=function(){M.prototype.deselect.call(this),this.controlBox.style.display="none"},d.prototype.setupControlBox=function(){this.controlBox=he.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},d.prototype.adjustControlBox=function(){this.positionGrips()},d.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},d.prototype.createGrip=function(){var m=new nt;return m.visual.transform.baseVal.appendItem(he.createTransform()),this.controlBox.appendChild(m.visual),m},d.prototype.positionGrips=function(){var m=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-m/2,this.y1-m/2),this.positionGrip(this.grip2.visual,this.x2-m/2,this.y2-m/2)},d.prototype.positionGrip=function(m,N,X){var H=m.transform.baseVal.getItem(0);H.setTranslate(N,X),m.transform.baseVal.replaceItem(H,0)},d.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},M.prototype.getState.call(this))},d.prototype.restoreState=function(m){M.prototype.restoreState.call(this,m);var N=m;this.x1=N.x1,this.y1=N.y1,this.x2=N.x2,this.y2=N.y2},d.prototype.scale=function(m,N){M.prototype.scale.call(this,m,N),this.x1=this.x1*m,this.y1=this.y1*N,this.x2=this.x2*m,this.y2=this.y2*N,this.adjustVisual(),this.adjustControlBox()},d}(we),He=function(M){function d(m,N,X){var H=M.call(this,m,N,X)||this;return H.strokeColor="transparent",H.strokeWidth=0,H.strokeDasharray="",H.setStrokeColor=H.setStrokeColor.bind(H),H.setStrokeWidth=H.setStrokeWidth.bind(H),H.setStrokeDasharray=H.setStrokeDasharray.bind(H),H.strokeColor=X.defaultColor,H.strokeWidth=X.defaultStrokeWidth,H.strokeDasharray=X.defaultStrokeDasharray,H.strokePanel=new re("Line color",X.defaultColorSet,X.defaultColor),H.strokePanel.onColorChanged=H.setStrokeColor,H.strokeWidthPanel=new At("Line width",X.defaultStrokeWidths,X.defaultStrokeWidth),H.strokeWidthPanel.onWidthChanged=H.setStrokeWidth,H.strokeStylePanel=new ft("Line style",X.defaultStrokeDasharrays,X.defaultStrokeDasharray),H.strokeStylePanel.onStyleChanged=H.setStrokeDasharray,H}return Se(d,M),d.prototype.ownsTarget=function(m){return!(!M.prototype.ownsTarget.call(this,m)&&m!==this.visual&&m!==this.selectorLine&&m!==this.visibleLine)},d.prototype.createVisual=function(){this.visual=he.createGroup(),this.selectorLine=he.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=he.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},d.prototype.pointerDown=function(m,N){M.prototype.pointerDown.call(this,m,N),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},d.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),he.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),he.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),he.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},d.prototype.setStrokeColor=function(m){this.strokeColor=m,this.adjustVisual(),this.colorChanged(m)},d.prototype.setStrokeWidth=function(m){this.strokeWidth=m,this.adjustVisual()},d.prototype.setStrokeDasharray=function(m){this.strokeDasharray=m,this.adjustVisual(),this.stateChanged()},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var m=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},M.prototype.getState.call(this));return m.typeName=d.typeName,m},d.prototype.restoreState=function(m){M.prototype.restoreState.call(this,m);var N=m;this.strokeColor=N.strokeColor,this.strokeWidth=N.strokeWidth,this.strokeDasharray=N.strokeDasharray,this.createVisual(),this.adjustVisual()},d.typeName="LineMarker",d.title="Line marker",d.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',d}(Qe),Ie=function(M){function d(m,N,X,H){var fe=M.call(this,m,H||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return fe.fonts=[],fe.fontBoxes=[],fe.fonts=N,fe.currentFont=X,fe.setCurrentFont=fe.setCurrentFont.bind(fe),fe}return Se(d,M),d.prototype.getUi=function(){var m=this,N=document.createElement("div");return N.style.overflow="hidden",N.style.flexGrow="2",this.fonts.forEach(function(X){var H=document.createElement("div");H.style.display="inline-block",H.style.alignItems="center",H.style.justifyContent="space-between",H.style.padding="5px",H.style.borderWidth="2px",H.style.borderStyle="solid",H.style.overflow="hidden",H.style.maxWidth=100/m.fonts.length-5+"%",H.style.borderColor=X===m.currentFont?m.uiStyleSettings.toolboxAccentColor:"transparent",H.addEventListener("click",function(){m.setCurrentFont(X,H)}),N.appendChild(H);var fe=document.createElement("div");fe.style.display="flex",fe.style.minHeight="20px",fe.style.flexGrow="2",fe.style.fontFamily=X,fe.style.overflow="hidden";var ke=document.createElement("div");ke.style.whiteSpace="nowrap",ke.style.overflow="hidden",ke.style.textOverflow="ellipsis",ke.innerHTML="The quick brown fox jumps over the lazy dog",fe.appendChild(ke),H.appendChild(fe),m.fontBoxes.push(H)}),N},d.prototype.setCurrentFont=function(m,N){var X=this;this.currentFont=m,this.fontBoxes.forEach(function(H){H.style.borderColor=H===N?X.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},d}(oe),Me=function(M){function d(m,N,X){var H=M.call(this,m,N,X)||this;return H.color="transparent",H.padding=5,H.DEFAULT_TEXT="your text here",H.text=H.DEFAULT_TEXT,H.isMoved=!1,H.color=X.defaultColor,H.fontFamily=X.defaultFontFamily,H.defaultSize={x:100,y:30},H.setColor=H.setColor.bind(H),H.setFont=H.setFont.bind(H),H.renderText=H.renderText.bind(H),H.sizeText=H.sizeText.bind(H),H.textEditDivClicked=H.textEditDivClicked.bind(H),H.showTextEditor=H.showTextEditor.bind(H),H.setSize=H.setSize.bind(H),H.positionTextEditor=H.positionTextEditor.bind(H),H.colorPanel=new re("Color",X.defaultColorSet,X.defaultColor),H.colorPanel.onColorChanged=H.setColor,H.fontFamilyPanel=new Ie("Font",X.defaultFontFamilies,X.defaultFontFamily),H.fontFamilyPanel.onFontChanged=H.setFont,H}return Se(d,M),d.prototype.ownsTarget=function(m){if(M.prototype.ownsTarget.call(this,m)||m===this.visual||m===this.textElement||m===this.bgRectangle)return!0;var N=!1;return this.textElement.childNodes.forEach(function(X){X===m&&(N=!0)}),N},d.prototype.createVisual=function(){this.visual=he.createGroup(),this.bgRectangle=he.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=he.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(he.createTransform()),this.textElement.transform.baseVal.appendItem(he.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},d.prototype.pointerDown=function(m,N){M.prototype.pointerDown.call(this,m,N),this.isMoved=!1,this.pointerDownPoint=m,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(m),this._state="creating")},d.prototype.renderText=function(){var m=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(N){m.textElement.appendChild(he.createTSpan(N.trim()===""?" ":N.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},d.prototype.getTextScale=function(){var m=this.textElement.getBBox(),N=1;if(m.width>0&&m.height>0){var X=(1*this.width-this.width*this.padding*2/100)/m.width,H=(1*this.height-this.height*this.padding*2/100)/m.height;N=Math.min(X,H)}return N},d.prototype.getTextPosition=function(m){var N=this.textElement.getBBox(),X=0,H=0;return N.width>0&&N.height>0&&(X=(this.width-N.width*m)/2,H=this.height/2-N.height*m/2),{x:X,y:H}},d.prototype.sizeText=function(){var m=this.textElement.getBBox(),N=this.getTextScale(),X=this.getTextPosition(N);X.y-=m.y*N,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+X.x+"px, "+X.y+"px) scale("+N+", "+N+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(X.x,X.y),this.textElement.transform.baseVal.getItem(1).setScale(N,N))},d.prototype.manipulate=function(m){M.prototype.manipulate.call(this,m),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(m.x-this.pointerDownPoint.x)>5||Math.abs(m.y-this.pointerDownPoint.y)>5)},d.prototype.resize=function(m){M.prototype.resize.call(this,m),this.isMoved=!0,this.setSize(),this.sizeText()},d.prototype.setSize=function(){M.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(he.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),he.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},d.prototype.pointerUp=function(m){var N=this.state;N==="creating"&&(this._suppressMarkerCreateEvent=!0),M.prototype.pointerUp.call(this,m),this.setSize(),(N==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},d.prototype.showTextEditor=function(){var m=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(N){N.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var N=Number.parseFloat(m.textEditor.style.fontSize);m.textEditor.clientWidth>=Number.parseInt(m.textEditor.style.maxWidth)&&N>.9;)N-=.1,m.textEditor.style.fontSize=Math.max(N,.9)+"em"}),this.textEditor.addEventListener("keyup",function(N){N.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(N){if(N.clipboardData){var X=N.clipboardData.getData("text"),H=window.getSelection();if(!H.rangeCount)return!1;H.deleteFromDocument(),H.getRangeAt(0).insertNode(document.createTextNode(X)),N.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){m.textEditDivClicked(m.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},d.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var m=this.getTextScale(),N=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),X=this.textElement.getBBox(),H={x:X.width*m,y:X.height*m};N.x-=H.x/2,N.y-=H.y/2,this.textEditor.style.top=N.y+"px",this.textEditor.style.left=N.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-N.x+"px",this.textEditor.style.fontSize=Math.max(16*m,12)+"px",this.textElement.style.display="none"}},d.prototype.textEditDivClicked=function(m){this.text=m.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},d.prototype.select=function(){M.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},d.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),M.prototype.deselect.call(this)},d.prototype.dblClick=function(m,N){M.prototype.dblClick.call(this,m,N),this.showTextEditor()},d.prototype.setColor=function(m){this.textElement&&he.setAttributes(this.textElement,[["fill",m]]),this.color=m,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(m)},d.prototype.setFont=function(m){this.textElement&&he.setAttributes(this.textElement,[["font-family",m]]),this.fontFamily=m,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},d.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},d.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var m=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},M.prototype.getState.call(this));return m.typeName=d.typeName,m},d.prototype.restoreState=function(m){var N=m;this.color=N.color,this.fontFamily=N.fontFamily,this.padding=N.padding,this.text=N.text,this.createVisual(),M.prototype.restoreState.call(this,m),this.setSize()},d.prototype.scale=function(m,N){M.prototype.scale.call(this,m,N),this.setSize(),this.sizeText(),this.positionTextEditor()},d.typeName="TextMarker",d.title="Text marker",d.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',d}(Ye),ye=function(M){function d(m,N,X){var H=M.call(this,m,N,X)||this;return H.color="transparent",H.lineWidth=3,H.drawing=!1,H.pixelRatio=1,H.color=X.defaultColor,H.lineWidth=X.defaultStrokeWidth,H.pixelRatio=X.freehandPixelRatio,H.setColor=H.setColor.bind(H),H.addCanvas=H.addCanvas.bind(H),H.finishCreation=H.finishCreation.bind(H),H.setLineWidth=H.setLineWidth.bind(H),H.colorPanel=new re("Color",X.defaultColorSet,X.defaultColor),H.colorPanel.onColorChanged=H.setColor,H.lineWidthPanel=new At("Line width",X.defaultStrokeWidths,X.defaultStrokeWidth),H.lineWidthPanel.onWidthChanged=H.setLineWidth,H}return Se(d,M),d.prototype.ownsTarget=function(m){return!(!M.prototype.ownsTarget.call(this,m)&&m!==this.visual&&m!==this.drawingImage)},d.prototype.createVisual=function(){this.visual=he.createGroup(),this.drawingImage=he.createImage(),this.visual.appendChild(this.drawingImage);var m=he.createTransform();this.visual.transform.baseVal.appendItem(m),this.addMarkerVisualToContainer(this.visual)},d.prototype.pointerDown=function(m,N){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(m.x,m.y),this.drawing=!0):M.prototype.pointerDown.call(this,m,N)},d.prototype.manipulate=function(m){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(m.x,m.y),this.canvasContext.stroke()):M.prototype.manipulate.call(this,m)},d.prototype.resize=function(m){M.prototype.resize.call(this,m),he.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),he.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},d.prototype.pointerUp=function(m){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):M.prototype.pointerUp.call(this,m)},d.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},d.prototype.select=function(){this.state==="creating"&&this.finishCreation(),M.prototype.select.call(this)},d.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),M.prototype.deselect.call(this)},d.prototype.finishCreation=function(){for(var m=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),N=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],X=N[0],H=N[1],fe=N[2],ke=N[3],rt=!1,ot=0;ot<this.canvasElement.height;ot++)for(var Ke=0;Ke<this.canvasElement.width;Ke++)m.data[ot*this.canvasElement.width*4+4*Ke+3]>0&&(rt=!0,ot<H&&(H=ot),Ke<X&&(X=Ke),ot>ke&&(ke=ot),Ke>fe&&(fe=Ke));if(rt){this.left=X/this.pixelRatio,this.top=H/this.pixelRatio,this.width=(fe-X)/this.pixelRatio,this.height=(ke-H)/this.pixelRatio;var _t=document.createElement("canvas");_t.width=fe-X,_t.height=ke-H,_t.getContext("2d").putImageData(this.canvasContext.getImageData(X,H,fe-X,ke-H),0,0),this.drawingImgUrl=_t.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},d.prototype.setDrawingImage=function(){he.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),he.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},d.prototype.setColor=function(m){this.color=m,this.colorChanged(m)},d.prototype.setLineWidth=function(m){this.lineWidth=m},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var m=Object.assign({drawingImgUrl:this.drawingImgUrl},M.prototype.getState.call(this));return m.typeName=d.typeName,m},d.prototype.restoreState=function(m){this.createVisual(),M.prototype.restoreState.call(this,m),this.drawingImgUrl=m.drawingImgUrl,this.setDrawingImage()},d.prototype.scale=function(m,N){M.prototype.scale.call(this,m,N),this.setDrawingImage()},d.typeName="FreehandMarker",d.title="Freehand marker",d.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',d}(Ye),le=function(M){function d(m,N,X){var H=M.call(this,m,X||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return H.typeBoxes=[],H.currentType=N,H.setCurrentType=H.setCurrentType.bind(H),H}return Se(d,M),d.prototype.getUi=function(){var m=this,N=document.createElement("div");N.style.display="flex",N.style.overflow="hidden",N.style.flexGrow="2";for(var X=function(ke){var rt="both";switch(ke){case 0:rt="both";break;case 1:rt="start";break;case 2:rt="end";break;case 3:rt="none"}var ot=document.createElement("div");if(ot.style.display="flex",ot.style.flexGrow="2",ot.style.alignItems="center",ot.style.justifyContent="space-between",ot.style.padding="5px",ot.style.borderWidth="2px",ot.style.borderStyle="solid",ot.style.borderColor=rt===H.currentType?H.uiStyleSettings.toolboxAccentColor:"transparent",ot.addEventListener("click",function(){m.setCurrentType(rt,ot)}),N.appendChild(ot),rt==="both"||rt==="start"){var Ke=document.createElement("div");Ke.style.display="flex",Ke.style.alignItems="center",Ke.style.minHeight="20px",Ke.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(H.uiStyleSettings!==void 0?H.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Ke.style.marginLeft="5px",ot.appendChild(Ke)}var _t=document.createElement("div");_t.style.display="flex",_t.style.alignItems="center",_t.style.minHeight="20px",_t.style.flexGrow="2";var gt=document.createElement("hr");if(gt.style.minWidth="20px",gt.style.border="0px",gt.style.borderTop="3px solid "+(H.uiStyleSettings!==void 0?H.uiStyleSettings.toolboxColor:"#eeeeee"),gt.style.flexGrow="2",_t.appendChild(gt),ot.appendChild(_t),rt==="both"||rt==="end"){var Bt=document.createElement("div");Bt.style.display="flex",Bt.style.alignItems="center",Bt.style.minHeight="20px",Bt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(H.uiStyleSettings!==void 0?H.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Bt.style.marginRight="5px",ot.appendChild(Bt)}H.typeBoxes.push(ot)},H=this,fe=0;fe<4;fe++)X(fe);return N},d.prototype.setCurrentType=function(m,N){var X=this;this.currentType=m,this.typeBoxes.forEach(function(H){H.style.borderColor=H===N?X.uiStyleSettings!==void 0?X.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},d}(oe),ue=function(M){function d(m,N,X){var H=M.call(this,m,N,X)||this;return H.arrowType="end",H.arrowBaseHeight=10,H.arrowBaseWidth=10,H.getArrowPoints=H.getArrowPoints.bind(H),H.setArrowType=H.setArrowType.bind(H),H.arrowTypePanel=new le("Arrow type","end"),H.arrowTypePanel.onArrowTypeChanged=H.setArrowType,H}return Se(d,M),d.prototype.ownsTarget=function(m){return!(!M.prototype.ownsTarget.call(this,m)&&m!==this.arrow1&&m!==this.arrow2)},d.prototype.getArrowPoints=function(m,N){var X=this.arrowBaseWidth+2*this.strokeWidth,H=this.arrowBaseHeight+2*this.strokeWidth;return m-X/2+","+(N+H/2)+" "+m+","+(N-H/2)+" "+(m+X/2)+","+(N+H/2)},d.prototype.createTips=function(){this.arrow1=he.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(he.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=he.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(he.createTransform()),this.visual.appendChild(this.arrow2)},d.prototype.pointerDown=function(m,N){M.prototype.pointerDown.call(this,m,N),this.state==="creating"&&this.createTips()},d.prototype.adjustVisual=function(){if(M.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",he.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),he.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var m=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),N=this.arrow1.transform.baseVal.getItem(0);N.setRotate(m,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(N,0);var X=this.arrow2.transform.baseVal.getItem(0);X.setRotate(m+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(X,0)}},d.prototype.setArrowType=function(m){this.arrowType=m,this.adjustVisual(),this.stateChanged()},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var m=Object.assign({arrowType:this.arrowType},M.prototype.getState.call(this));return m.typeName=d.typeName,m},d.prototype.restoreState=function(m){M.prototype.restoreState.call(this,m);var N=m;this.arrowType=N.arrowType,this.createTips(),this.adjustVisual()},d.typeName="ArrowMarker",d.title="Arrow marker",d.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',d}(He),Z=function(M){function d(m,N,X){var H=M.call(this,m,N,X)||this;return H.fillColor=X.defaultFillColor,H.strokeWidth=0,H.fillPanel=new re("Color",X.defaultColorSet,X.defaultFillColor),H.fillPanel.onColorChanged=H.setFillColor,H}return Se(d,M),Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var m=M.prototype.getState.call(this);return m.typeName=d.typeName,m},d.typeName="CoverMarker",d.title="Cover marker",d.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',d}(qe),te=function(M){function d(m,N,X,H){var fe=M.call(this,m,H||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return fe.opacities=[],fe.opacityBoxes=[],fe.opacities=N,fe.currentOpacity=X,fe.setCurrentOpacity=fe.setCurrentOpacity.bind(fe),fe}return Se(d,M),d.prototype.getUi=function(){var m=this,N=document.createElement("div");return N.style.display="flex",N.style.overflow="hidden",N.style.flexGrow="2",N.style.justifyContent="space-between",this.opacities.forEach(function(X){var H=document.createElement("div");H.style.display="flex",H.style.alignItems="center",H.style.justifyContent="center",H.style.padding="5px",H.style.borderWidth="2px",H.style.borderStyle="solid",H.style.borderColor=X===m.currentOpacity?m.uiStyleSettings.toolboxAccentColor:"transparent",H.addEventListener("click",function(){m.setCurrentOpacity(X,H)}),N.appendChild(H);var fe=document.createElement("div");fe.innerText=100*X+"%",H.appendChild(fe),m.opacityBoxes.push(H)}),N},d.prototype.setCurrentOpacity=function(m,N){var X=this;this.currentOpacity=m,this.opacityBoxes.forEach(function(H){H.style.borderColor=H===N?X.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},d}(oe),Ae=function(M){function d(m,N,X){var H=M.call(this,m,N,X)||this;return H.setOpacity=H.setOpacity.bind(H),H.fillColor=X.defaultHighlightColor,H.strokeWidth=0,H.opacity=X.defaultHighlightOpacity,H.fillPanel=new re("Color",X.defaultColorSet,H.fillColor),H.fillPanel.onColorChanged=H.setFillColor,H.opacityPanel=new te("Opacity",X.defaultOpacitySteps,H.opacity),H.opacityPanel.onOpacityChanged=H.setOpacity,H}return Se(d,M),d.prototype.setOpacity=function(m){this.opacity=m,this.visual&&he.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var m=M.prototype.getState.call(this);return m.typeName=d.typeName,m},d.typeName="HighlightMarker",d.title="Highlight marker",d.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',d}(Z),de='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',Be=function(M){function d(m,N,X){var H=M.call(this,m,N,X)||this;return H.bgColor="transparent",H.tipPosition={x:0,y:0},H.tipBase1Position={x:0,y:0},H.tipBase2Position={x:0,y:0},H.tipMoving=!1,H.color=X.defaultStrokeColor,H.bgColor=X.defaultFillColor,H.fontFamily=X.defaultFontFamily,H.defaultSize={x:100,y:30},H.setBgColor=H.setBgColor.bind(H),H.getTipPoints=H.getTipPoints.bind(H),H.positionTip=H.positionTip.bind(H),H.setTipPoints=H.setTipPoints.bind(H),H.colorPanel=new re("Text color",X.defaultColorSet,H.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),H.colorPanel.onColorChanged=H.setColor,H.bgColorPanel=new re("Fill color",X.defaultColorSet,H.bgColor,de),H.bgColorPanel.onColorChanged=H.setBgColor,H.fontFamilyPanel=new Ie("Font",X.defaultFontFamilies,X.defaultFontFamily),H.fontFamilyPanel.onFontChanged=H.setFont,H.tipGrip=new nt,H.tipGrip.visual.transform.baseVal.appendItem(he.createTransform()),H.controlBox.appendChild(H.tipGrip.visual),H}return Se(d,M),d.prototype.ownsTarget=function(m){return M.prototype.ownsTarget.call(this,m)||this.tipGrip.ownsTarget(m)||this.tip===m},d.prototype.createTip=function(){he.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=he.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},d.prototype.pointerDown=function(m,N){this.state==="new"&&M.prototype.pointerDown.call(this,m,N),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(N)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):M.prototype.pointerDown.call(this,m,N)},d.prototype.pointerUp=function(m){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,M.prototype.pointerUp.call(this,m);else{var N=this.state==="creating";M.prototype.pointerUp.call(this,m),this.setTipPoints(N),this.positionTip()}},d.prototype.manipulate=function(m){if(this.tipMoving){var N=this.unrotatePoint(m);this.tipPosition={x:N.x-this.manipulationStartLeft,y:N.y-this.manipulationStartTop},this.positionTip()}else M.prototype.manipulate.call(this,m)},d.prototype.setBgColor=function(m){this.bgRectangle&&this.tip&&(he.setAttributes(this.bgRectangle,[["fill",m]]),he.setAttributes(this.tip,[["fill",m]])),this.bgColor=m,this.fillColorChanged(m)},d.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},d.prototype.setTipPoints=function(m){m===void 0&&(m=!1);var N=Math.min(this.height/2,15),X=this.height/5;m&&(this.tipPosition={x:N+X/2,y:this.height+20});var H=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?H<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(X=this.width/5,N=Math.min(this.width/2,15),this.tipBase1Position={x:N,y:0},this.tipBase2Position={x:N+X,y:0}):(this.tipBase1Position={x:0,y:N},this.tipBase2Position={x:0,y:N+X}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?H<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(X=this.width/5,N=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-N-X,y:0},this.tipBase2Position={x:this.width-N,y:0}):(this.tipBase1Position={x:this.width,y:N},this.tipBase2Position={x:this.width,y:N+X}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?H<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(X=this.width/5,N=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-N-X,y:this.height},this.tipBase2Position={x:this.width-N,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-N-X},this.tipBase2Position={x:this.width,y:this.height-N}):H<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(X=this.width/5,N=Math.min(this.width/2,15),this.tipBase1Position={x:N,y:this.height},this.tipBase2Position={x:N+X,y:this.height}):(this.tipBase1Position={x:0,y:this.height-N},this.tipBase2Position={x:0,y:this.height-N-X})},d.prototype.resize=function(m){M.prototype.resize.call(this,m),this.positionTip()},d.prototype.positionTip=function(){he.setAttributes(this.tip,[["points",this.getTipPoints()]]);var m=this.tipGrip.visual.transform.baseVal.getItem(0);m.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(m,0)},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),d.prototype.select=function(){this.positionTip(),M.prototype.select.call(this)},d.prototype.getState=function(){var m=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},M.prototype.getState.call(this));return m.typeName=d.typeName,m},d.prototype.restoreState=function(m){var N=m;this.bgColor=N.bgColor,this.tipPosition=N.tipPosition,M.prototype.restoreState.call(this,m),this.createTip(),this.setTipPoints()},d.prototype.scale=function(m,N){M.prototype.scale.call(this,m,N),this.tipPosition={x:this.tipPosition.x*m,y:this.tipPosition.y*N},this.positionTip()},d.typeName="CalloutMarker",d.title="Callout marker",d.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',d}(Me),Ne=function(M){function d(m,N,X){var H=M.call(this,m,N,X)||this;return H.fillColor="transparent",H.strokeColor="transparent",H.strokeWidth=0,H.strokeDasharray="",H.opacity=1,H.strokeColor=X.defaultColor,H.strokeWidth=X.defaultStrokeWidth,H.strokeDasharray=X.defaultStrokeDasharray,H.fillColor=X.defaultFillColor,H.setStrokeColor=H.setStrokeColor.bind(H),H.setFillColor=H.setFillColor.bind(H),H.setStrokeWidth=H.setStrokeWidth.bind(H),H.setStrokeDasharray=H.setStrokeDasharray.bind(H),H.setOpacity=H.setOpacity.bind(H),H.createVisual=H.createVisual.bind(H),H.strokePanel=new re("Line color",Ee(X.defaultColorSet,["transparent"]),X.defaultColor),H.strokePanel.onColorChanged=H.setStrokeColor,H.fillPanel=new re("Fill color",Ee(X.defaultColorSet,["transparent"]),H.fillColor,de),H.fillPanel.onColorChanged=H.setFillColor,H.strokeWidthPanel=new At("Line width",X.defaultStrokeWidths,X.defaultStrokeWidth),H.strokeWidthPanel.onWidthChanged=H.setStrokeWidth,H.strokeStylePanel=new ft("Line style",X.defaultStrokeDasharrays,X.defaultStrokeDasharray),H.strokeStylePanel.onStyleChanged=H.setStrokeDasharray,H.opacityPanel=new te("Opacity",X.defaultOpacitySteps,H.opacity),H.opacityPanel.onOpacityChanged=H.setOpacity,H}return Se(d,M),d.prototype.ownsTarget=function(m){return!(!M.prototype.ownsTarget.call(this,m)&&m!==this.visual)},d.prototype.createVisual=function(){this.visual=he.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},d.prototype.pointerDown=function(m,N){M.prototype.pointerDown.call(this,m,N),this.state==="new"&&(this.createVisual(),this.moveVisual(m),this._state="creating")},d.prototype.manipulate=function(m){M.prototype.manipulate.call(this,m)},d.prototype.resize=function(m){M.prototype.resize.call(this,m),this.setSize()},d.prototype.setSize=function(){M.prototype.setSize.call(this),he.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},d.prototype.pointerUp=function(m){M.prototype.pointerUp.call(this,m),this.setSize()},d.prototype.setStrokeColor=function(m){this.strokeColor=m,this.visual&&he.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(m),this.stateChanged()},d.prototype.setFillColor=function(m){this.fillColor=m,this.visual&&he.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(m),this.stateChanged()},d.prototype.setStrokeWidth=function(m){this.strokeWidth=m,this.visual&&he.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},d.prototype.setStrokeDasharray=function(m){this.strokeDasharray=m,this.visual&&he.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},d.prototype.setOpacity=function(m){this.opacity=m,this.visual&&he.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var m=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},M.prototype.getState.call(this));return m.typeName=d.typeName,m},d.prototype.restoreState=function(m){var N=m;this.fillColor=N.fillColor,this.strokeColor=N.strokeColor,this.strokeWidth=N.strokeWidth,this.strokeDasharray=N.strokeDasharray,this.opacity=N.opacity,this.createVisual(),M.prototype.restoreState.call(this,m),this.setSize()},d.prototype.scale=function(m,N){M.prototype.scale.call(this,m,N),this.setSize()},d.typeName="EllipseMarker",d.title="Ellipse marker",d.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',d}(Ye),Xe=function(M){function d(m,N,X){return M.call(this,m,N,X)||this}return Se(d,M),Object.defineProperty(d.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),d.prototype.ownsTarget=function(m){return!(!M.prototype.ownsTarget.call(this,m)&&m!==this.tip1&&m!==this.tip2)},d.prototype.createTips=function(){this.tip1=he.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(he.createTransform()),this.visual.appendChild(this.tip1),this.tip2=he.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(he.createTransform()),this.visual.appendChild(this.tip2)},d.prototype.pointerDown=function(m,N){M.prototype.pointerDown.call(this,m,N),this.state==="creating"&&this.createTips()},d.prototype.adjustVisual=function(){if(M.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(he.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),he.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var m=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),N=this.tip1.transform.baseVal.getItem(0);N.setRotate(m,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(N,0);var X=this.tip2.transform.baseVal.getItem(0);X.setRotate(m+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(X,0)}},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var m=M.prototype.getState.call(this);return m.typeName=d.typeName,m},d.prototype.restoreState=function(m){M.prototype.restoreState.call(this,m),this.createTips(),this.adjustVisual()},d.typeName="MeasurementMarker",d.title="Measurement marker",d.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',d}(He),ct=function(M){function d(m,N,X){var H=M.call(this,m,N,X)||this;return H.strokePanel.colors=X.defaultColorSet,H.fillColor="transparent",H}return Se(d,M),Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var m=M.prototype.getState.call(this);return m.typeName=d.typeName,m},d.typeName="EllipseFrameMarker",d.title="Ellipse frame marker",d.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',d}(Ne),ut=function(){function M(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(M.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),M.prototype.addUndoStep=function(d){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(d)||(this.undoStack.push(d),JSON.stringify(this.lastRedoStep)!==JSON.stringify(d)&&this.redoStack.splice(0,this.redoStack.length))},M.prototype.replaceLastUndoStep=function(d){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=d)},M.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},M.prototype.undo=function(){if(this.undoStack.length>1){var d=this.undoStack.pop();return d!==void 0&&this.redoStack.push(d),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},M.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},M}(),st=function(M){function d(m,N,X){var H=M.call(this,m,N,X)||this;return H.strokeColor="transparent",H.strokeWidth=0,H.strokeDasharray="",H.curveX=0,H.curveY=0,H.manipulationStartCurveX=0,H.manipulationStartCurveY=0,H.setStrokeColor=H.setStrokeColor.bind(H),H.setStrokeWidth=H.setStrokeWidth.bind(H),H.setStrokeDasharray=H.setStrokeDasharray.bind(H),H.positionGrips=H.positionGrips.bind(H),H.addControlGrips=H.addControlGrips.bind(H),H.adjustVisual=H.adjustVisual.bind(H),H.setupControlBox=H.setupControlBox.bind(H),H.resize=H.resize.bind(H),H.strokeColor=X.defaultColor,H.strokeWidth=X.defaultStrokeWidth,H.strokeDasharray=X.defaultStrokeDasharray,H.strokePanel=new re("Line color",X.defaultColorSet,X.defaultColor),H.strokePanel.onColorChanged=H.setStrokeColor,H.strokeWidthPanel=new At("Line width",X.defaultStrokeWidths,X.defaultStrokeWidth),H.strokeWidthPanel.onWidthChanged=H.setStrokeWidth,H.strokeStylePanel=new ft("Line style",X.defaultStrokeDasharrays,X.defaultStrokeDasharray),H.strokeStylePanel.onStyleChanged=H.setStrokeDasharray,H}return Se(d,M),d.prototype.ownsTarget=function(m){return!(!M.prototype.ownsTarget.call(this,m)&&m!==this.visual&&m!==this.selectorCurve&&m!==this.visibleCurve&&!this.curveGrip.ownsTarget(m))},d.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},d.prototype.createVisual=function(){this.visual=he.createGroup(),this.selectorCurve=he.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=he.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},d.prototype.pointerDown=function(m,N){M.prototype.pointerDown.call(this,m,N),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=m.x,this.curveY=m.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(N)&&(this.activeGrip=this.curveGrip,this._state="resize")},d.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),he.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),he.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),he.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},d.prototype.setupControlBox=function(){M.prototype.setupControlBox.call(this),this.curveControlLine1=he.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=he.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},d.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,M.prototype.addControlGrips.call(this)},d.prototype.positionGrips=function(){M.prototype.positionGrips.call(this);var m=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-m/2,this.curveY-m/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},d.prototype.manipulate=function(m){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+m.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+m.y-this.manipulationStartY),M.prototype.manipulate.call(this,m)},d.prototype.resize=function(m){this.activeGrip===this.curveGrip&&(this.curveX=m.x,this.curveY=m.y),M.prototype.resize.call(this,m),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},d.prototype.setStrokeColor=function(m){this.strokeColor=m,this.adjustVisual(),this.colorChanged(m)},d.prototype.setStrokeWidth=function(m){this.strokeWidth=m,this.adjustVisual()},d.prototype.setStrokeDasharray=function(m){this.strokeDasharray=m,this.adjustVisual()},d.prototype.scale=function(m,N){this.curveX=this.curveX*m,this.curveY=this.curveY*N,M.prototype.scale.call(this,m,N)},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var m=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},M.prototype.getState.call(this));return m.typeName=d.typeName,m},d.prototype.restoreState=function(m){M.prototype.restoreState.call(this,m);var N=m;this.strokeColor=N.strokeColor,this.strokeWidth=N.strokeWidth,this.strokeDasharray=N.strokeDasharray,this.curveX=N.curveX,this.curveY=N.curveY,this.createVisual(),this.adjustVisual()},d.typeName="CurveMarker",d.title="Curve marker",d.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',d}(Qe),Nt=function(){function M(d,m){m===void 0&&(m=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=d,this.cancelable=m}return Object.defineProperty(M.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),M.prototype.preventDefault=function(){this._defaultPrevented=!0},M}(),pt=function(M){function d(m,N,X){var H=M.call(this,m,!1)||this;return H.dataUrl=N,H.state=X,H}return Se(d,M),d}(Nt),et=function(M){function d(m,N,X){X===void 0&&(X=!1);var H=M.call(this,m,X)||this;return H.marker=N,H}return Se(d,M),d}(Nt),er=function(){function M(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return M.prototype.addEventListener=function(d,m){this[d].push(m)},M.prototype.removeEventListener=function(d,m){var N=this[d].indexOf(m);N>-1&&this[d].splice(N,1)},M}(),qt=function(){function M(d){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ue,this._isOpen=!1,this.undoRedoManager=new ut,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new er,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=M.instanceCounter++,this.styles=new je(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=d,this.targetRoot=document.body,this.width=d.clientWidth,this.height=d.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(M.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ce,ye,ue,Me,ct,Ne,Ae,Be,Xe,Z,He,st]},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ce,ye,ue,Me,Ne,Ae,Be]},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ce,ye,ue,Me,Ae]},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(d){var m=this;this._availableMarkerTypes.splice(0),d.forEach(function(N){if(typeof N=="string"){var X=m.ALL_MARKER_TYPES.find(function(H){return H.typeName===N});X!==void 0&&m._availableMarkerTypes.push(X)}else m._availableMarkerTypes.push(N)})},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(d){this._zoomLevel=d,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),M.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Ge.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},M.prototype.show=function(){var d=this;this.styles.styleSheetRoot===void 0&&at.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=at.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(m){return m(new Nt(d))})},M.prototype.render=function(){return Fe(this,void 0,void 0,function(){var d;return Pe(this,function(m){switch(m.label){case 0:return this.setCurrentMarker(),(d=new lt).naturalSize=this.renderAtNaturalSize,d.imageType=this.renderImageType,d.imageQuality=this.renderImageQuality,d.markersOnly=this.renderMarkersOnly,d.width=this.renderWidth,d.height=this.renderHeight,[4,d.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return m.sent(),[4,d.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,m.sent()]}})})},M.prototype.close=function(d){var m=this;if(d===void 0&&(d=!1),this.isOpen){var N=!1;d||this.eventListeners.beforeclose.forEach(function(X){var H=new Nt(m,!0);X(H),H.defaultPrevented&&(N=!0)}),N||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(X){return X(new Nt(m))}),this.detachEvents(),this._isOpen=!1)}},M.prototype.addMarkersToToolbar=function(){for(var d,m=[],N=0;N<arguments.length;N++)m[N]=arguments[N];(d=this._availableMarkerTypes).push.apply(d,m)},M.prototype.addRenderEventListener=function(d){this.addEventListener("render",function(m){d(m.dataUrl,m.state)})},M.prototype.removeRenderEventListener=function(d){},M.prototype.addCloseEventListener=function(d){this.addEventListener("close",function(){d()})},M.prototype.removeCloseEventListener=function(d){},M.prototype.setupResizeObserver=function(){var d=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){d.resize(d.target.clientWidth,d.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return d.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},M.prototype.onPopupTargetResize=function(){var d=1*this.target.clientWidth/this.target.clientHeight,m=this.editorCanvas.clientWidth/d>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*d:this.editorCanvas.clientWidth,N=m<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/d;this.resize(m,N)},M.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},M.prototype.resize=function(d,m){this._isResizing=!0;var N=d/this.imageWidth,X=m/this.imageHeight;this.imageWidth=Math.round(d),this.imageHeight=Math.round(m),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(N,X),this._isResizing=!1},M.prototype.scaleMarkers=function(d,m){var N,X=this;this._currentMarker&&this._currentMarker instanceof Me?this._currentMarker.scale(d,m):(N=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(H){H!==X._currentMarker&&H.scale(d,m)}),N!==void 0&&this.setCurrentMarker(N)},M.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},M.prototype.setTopLeft=function(){var d=this.editingTarget.getBoundingClientRect(),m=this.editorCanvas.getBoundingClientRect();this.left=d.left-m.left,this.top=d.top-m.top},M.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},M.prototype.addDefs=function(){for(var d,m=[],N=0;N<arguments.length;N++)m[N]=arguments[N];this.defs=he.createDefs(),this.addDefsToImage(),(d=this.defs).append.apply(d,m)},M.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},M.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},M.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},M.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},M.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},M.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},M.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},M.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var d=document.createElement("a");d.href="https://markerjs.com/",d.target="_blank",d.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',d.title="Powered by marker.js",d.style.display="grid",d.style.alignItems="center",d.style.justifyItems="center",d.style.padding="3px",d.style.width="20px",d.style.height="20px",this.logoUI.appendChild(d),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},M.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},M.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},M.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},M.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var d=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=d+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new W(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new F(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},M.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},M.prototype.removeMarker=function(d){this.markerImage.removeChild(d.container),this.markers.indexOf(d)>-1&&this.markers.splice(this.markers.indexOf(d),1),d.dispose()},M.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},M.prototype.toolbarButtonClicked=function(d,m){if(d==="marker"&&m!==void 0)this.createNewMarker(m);else if(d==="action")switch(m){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},M.prototype.deleteSelectedMarker=function(){var d=this;if(this._currentMarker!==void 0){var m=!1;if(this.eventListeners.markerbeforedelete.forEach(function(X){var H=new et(d,d._currentMarker,!0);X(H),H.defaultPrevented&&(m=!0)}),!m){var N=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(X){return X(new et(d,N))})}}},M.prototype.clear=function(){var d=this,m=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(fe){var ke=new et(d,void 0,!0);fe(ke),ke.defaultPrevented&&(m=!0)}),!m)){this.setCurrentMarker();for(var N=function(fe){var ke=X.markers[fe];X.setCurrentMarker(X.markers[fe]),X._currentMarker.dispose(),X.markerImage.removeChild(X._currentMarker.container),X.markers.splice(X.markers.indexOf(X._currentMarker),1),X.eventListeners.markerdelete.forEach(function(rt){return rt(new et(d,ke))})},X=this,H=this.markers.length-1;H>=0;H--)N(H);this.addUndoStep()}},Object.defineProperty(M.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),M.prototype.showNotesEditor=function(){var d;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(d=this._currentMarker.notes)!==null&&d!==void 0?d:"",this.overlayContainer.appendChild(this.notesArea))},M.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},M.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},M.prototype.addUndoStep=function(){var d=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var m=this.getState(),N=this.undoRedoManager.getLastUndoStep();if(!N||N.width===m.width&&N.height===m.height){var X=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(m),X<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(H){return H(new Nt(d))})}else this.undoRedoManager.replaceLastUndoStep(m),this.eventListeners.statechange.forEach(function(H){return H(new Nt(d))})}},M.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},M.prototype.undoStep=function(){var d=this,m=this.undoRedoManager.undo();m!==void 0&&(this.restoreState(m),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(N){return N(new Nt(d))}))},M.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},M.prototype.redoStep=function(){var d=this,m=this.undoRedoManager.redo();m!==void 0&&(this.restoreState(m),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(N){return N(new Nt(d))}))},M.prototype.stepZoom=function(){var d=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=d<this.zoomSteps.length-1?this.zoomSteps[d+1]:this.zoomSteps[0]},M.prototype.panTo=function(d){this.contentDiv.scrollBy({left:this.prevPanPoint.x-d.x,top:this.prevPanPoint.y-d.y}),this.prevPanPoint=d},M.prototype.startRenderAndClose=function(){return Fe(this,void 0,void 0,function(){var d,m,N=this;return Pe(this,function(X){switch(X.label){case 0:return[4,this.render()];case 1:return d=X.sent(),m=this.getState(),this.eventListeners.render.forEach(function(H){return H(new pt(N,d,m))}),this.close(!0),[2]}})})},M.prototype.getState=function(d){d===!0&&this.setCurrentMarker();var m={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(N){return m.markers.push(N.getState())}),m},M.prototype.restoreState=function(d){var m=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);d.markers.forEach(function(N){var X=m._availableMarkerTypes.find(function(fe){return fe.typeName===N.typeName});if(X!==void 0){var H=m.addNewMarker(X);H.restoreState(N),m.markers.push(H)}}),d.width&&d.height&&(d.width!==this.imageWidth||d.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/d.width,this.imageHeight/d.height),this.eventListeners.restorestate.forEach(function(N){return N(new Nt(m))})},M.prototype.addNewMarker=function(d){var m=he.createGroup();return this.markerImage.appendChild(m),new d(m,this.overlayContainer,this.settings)},M.prototype.createNewMarker=function(d){var m,N=this;(m=typeof d=="string"?this._availableMarkerTypes.find(function(X){return X.typeName===d}):d)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(m),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(m.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(X){return X(new et(N,N._currentMarker))}))},M.prototype.markerCreated=function(d){var m=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(d),this.setCurrentMarker(d),d instanceof ye&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(ye):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(N){return N(new et(m,m._currentMarker))})},M.prototype.colorChanged=function(d){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=d,this.settings.defaultStrokeColor=d)},M.prototype.fillColorChanged=function(d){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=d)},M.prototype.markerStateChanged=function(d){var m=this;this.eventListeners.markerchange.forEach(function(N){return N(new et(m,d))})},M.prototype.setCurrentMarker=function(d){var m=this;this._currentMarker!==d&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(N){return N(new et(m,m._currentMarker))})),this._currentMarker=d,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(N){return N(new et(m,m._currentMarker))}))},M.prototype.onPointerDown=function(d){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||d.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var m=this.markers.find(function(N){return N.ownsTarget(d.target)});m!==void 0?(this.setCurrentMarker(m),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(d.clientX,d.clientY),d.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:d.clientX,y:d.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(d.clientX,d.clientY))},M.prototype.onDblClick=function(d){if(this._isFocused||this.focus(),this.mode==="select"){var m=this.markers.find(function(N){return N.ownsTarget(d.target)});m!==void 0&&m!==this._currentMarker&&this.setCurrentMarker(m),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(d.clientX,d.clientY),d.target):this.setCurrentMarker()}},M.prototype.onPointerMove=function(d){this.touchPoints!==1&&d.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||d.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(d.clientX,d.clientY)):this.zoomLevel>1&&this.panTo({x:d.clientX,y:d.clientY}))},M.prototype.onPointerUp=function(d){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(d.clientX,d.clientY)),this.isDragging=!1,this.addUndoStep()},M.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},M.prototype.onKeyUp=function(d){this._currentMarker===void 0||this.notesArea!==void 0||d.key!=="Delete"&&d.key!=="Backspace"||this.deleteSelectedMarker()},M.prototype.clientToLocalCoordinates=function(d,m){var N=this.markerImage.getBoundingClientRect();return{x:(d-N.left)/this.zoomLevel,y:(m-N.top)/this.zoomLevel}},M.prototype.onWindowResize=function(){this.positionUI()},M.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var d=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=d+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},M.prototype.addLicenseKey=function(d){Ge.addKey(d)},M.prototype.addEventListener=function(d,m){this.eventListeners.addEventListener(d,m)},M.prototype.removeEventListener=function(d,m){this.eventListeners.removeEventListener(d,m)},M.prototype.renderState=function(d){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(d),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(M.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),M.prototype.focus=function(){var d=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(m){return m(new Nt(d))}))},M.prototype.blur=function(){var d=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(m){return m(new Nt(d))}))},M.instanceCounter=0,M}();/* **********************************
cropro version 1.2.0
@license SEE LICENSE IN LICENSE
copyright Alan Mendelevich
see README and LICENSE for details
********************************** *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Ot=function(M,d){return(Ot=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,N){m.__proto__=N}||function(m,N){for(var X in N)Object.prototype.hasOwnProperty.call(N,X)&&(m[X]=N[X])})(M,d)};function mt(M,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function m(){this.constructor=M}Ot(M,d),M.prototype=d===null?Object.create(d):(m.prototype=d.prototype,new m)}function yt(M,d,m,N){return new(m||(m=Promise))(function(X,H){function fe(ot){try{rt(N.next(ot))}catch(Ke){H(Ke)}}function ke(ot){try{rt(N.throw(ot))}catch(Ke){H(Ke)}}function rt(ot){var Ke;ot.done?X(ot.value):(Ke=ot.value,Ke instanceof m?Ke:new m(function(_t){_t(Ke)})).then(fe,ke)}rt((N=N.apply(M,d||[])).next())})}function wt(M,d){var m,N,X,H,fe={label:0,sent:function(){if(1&X[0])throw X[1];return X[1]},trys:[],ops:[]};return H={next:ke(0),throw:ke(1),return:ke(2)},typeof Symbol=="function"&&(H[Symbol.iterator]=function(){return this}),H;function ke(rt){return function(ot){return function(Ke){if(m)throw new TypeError("Generator is already executing.");for(;fe;)try{if(m=1,N&&(X=2&Ke[0]?N.return:Ke[0]?N.throw||((X=N.return)&&X.call(N),0):N.next)&&!(X=X.call(N,Ke[1])).done)return X;switch(N=0,X&&(Ke=[2&Ke[0],X.value]),Ke[0]){case 0:case 1:X=Ke;break;case 4:return fe.label++,{value:Ke[1],done:!1};case 5:fe.label++,N=Ke[1],Ke=[0];continue;case 7:Ke=fe.ops.pop(),fe.trys.pop();continue;default:if(!(X=fe.trys,(X=X.length>0&&X[X.length-1])||Ke[0]!==6&&Ke[0]!==2)){fe=0;continue}if(Ke[0]===3&&(!X||Ke[1]>X[0]&&Ke[1]<X[3])){fe.label=Ke[1];break}if(Ke[0]===6&&fe.label<X[1]){fe.label=X[1],X=Ke;break}if(X&&fe.label<X[2]){fe.label=X[2],fe.ops.push(Ke);break}X[2]&&fe.ops.pop(),fe.trys.pop();continue}Ke=d.call(M,fe)}catch(_t){Ke=[6,_t],N=0}finally{m=X=0}if(5&Ke[0])throw Ke[1];return{value:Ke[0]?Ke[1]:void 0,done:!0}}([rt,ot])}}}var Pt=function(){function M(){}return M.addKey=function(d){M.key=d},Object.defineProperty(M,"isLicensed",{get:function(){return!!M.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(M.key)},enumerable:!1,configurable:!0}),M}(),Je=function(){function M(){}return M.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},M.setAttributes=function(d,m){for(var N=0,X=m;N<X.length;N++){var H=X[N],fe=H[0],ke=H[1];d.setAttribute(fe,ke)}},M.createRect=function(d,m,N){var X=document.createElementNS("http://www.w3.org/2000/svg","rect");return X.setAttribute("width",d.toString()),X.setAttribute("height",m.toString()),N&&M.setAttributes(X,N),X},M.createLine=function(d,m,N,X,H){var fe=document.createElementNS("http://www.w3.org/2000/svg","line");return fe.setAttribute("x1",d.toString()),fe.setAttribute("y1",m.toString()),fe.setAttribute("x2",N.toString()),fe.setAttribute("y2",X.toString()),H&&M.setAttributes(fe,H),fe},M.createPolygon=function(d,m){var N=document.createElementNS("http://www.w3.org/2000/svg","polygon");return N.setAttribute("points",d),m&&M.setAttributes(N,m),N},M.createCircle=function(d,m){var N=document.createElementNS("http://www.w3.org/2000/svg","circle");return N.setAttribute("cx",(d/2).toString()),N.setAttribute("cy",(d/2).toString()),N.setAttribute("r",d.toString()),m&&M.setAttributes(N,m),N},M.createEllipse=function(d,m,N){var X=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return X.setAttribute("cx",(d/2).toString()),X.setAttribute("cy",(m/2).toString()),X.setAttribute("rx",(d/2).toString()),X.setAttribute("ry",(m/2).toString()),N&&M.setAttributes(X,N),X},M.createGroup=function(d){var m=document.createElementNS("http://www.w3.org/2000/svg","g");return d&&M.setAttributes(m,d),m},M.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},M.createMarker=function(d,m,N,X,H,fe,ke){var rt=document.createElementNS("http://www.w3.org/2000/svg","marker");return M.setAttributes(rt,[["id",d],["orient",m],["markerWidth",N.toString()],["markerHeight",X.toString()],["refX",H.toString()],["refY",fe.toString()]]),rt.appendChild(ke),rt},M.createText=function(d){var m=document.createElementNS("http://www.w3.org/2000/svg","text");return m.setAttribute("x","0"),m.setAttribute("y","0"),d&&M.setAttributes(m,d),m},M.createTSpan=function(d,m){var N=document.createElementNS("http://www.w3.org/2000/svg","tspan");return N.textContent=d,m&&M.setAttributes(N,m),N},M.createImage=function(d){var m=document.createElementNS("http://www.w3.org/2000/svg","image");return d&&M.setAttributes(m,d),m},M.createPoint=function(d,m){var N=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return N.x=d,N.y=m,N},M.createPath=function(d,m){var N=document.createElementNS("http://www.w3.org/2000/svg","path");return N.setAttribute("d",d),m&&M.setAttributes(N,m),N},M.createElement=function(d,m){var N=document.createElementNS("http://www.w3.org/2000/svg",d);return m&&M.setAttributes(N,m),N},M.getHollowRectanglePath=function(d,m,N,X,H,fe,ke,rt){return"M"+d+","+m+"V"+(m+X)+"H"+(d+N)+"V"+m+"H"+H+"V"+fe+"H"+(H+ke)+"V"+(fe+rt)+"H"+H+"V"+m+"Z"},M}(),bt=function(){function M(d){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+d+"_"}return Object.defineProperty(M.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),M.prototype.addClass=function(d){return this.styleSheet===void 0&&this.addStyleSheet(),d.name=""+this.classNamePrefix+d.localName,this.classes.push(d),this.styleSheet.sheet.insertRule("."+d.name+" {"+d.style+"}",this.styleSheet.sheet.cssRules.length),d},M.prototype.addRule=function(d){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(d),this.styleSheet.sheet.insertRule(d.selector+" {"+d.style+"}",this.styleSheet.sheet.cssRules.length)},M.prototype.addStyleSheet=function(){var d;this.styleSheet=document.createElement("style"),((d=this.styleSheetRoot)!==null&&d!==void 0?d:document.head).appendChild(this.styleSheet),this.addRule(new dt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new dt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new dt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Lt("_fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Lt("_fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},M.prototype.removeStyleSheet=function(){var d;this.styleSheet&&(((d=this.styleSheetRoot)!==null&&d!==void 0?d:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},M}(),dt=function(M,d){this.selector=M,this.style=d},Lt=function(M,d){this.localName=M,this.style=d},Yt=function(){function M(){this.blocks=[],this.display=""}return M.prototype.addButtonBlock=function(d){d.className=this.blockClassName,d.buttonClassName=this.buttonClassName,d.buttonColorsClassName=this.buttonColorsClassName,d.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(d)},M.prototype.addElementBlock=function(d){d.className===void 0&&(d.className=this.blockClassName),this.blocks.push(d)},M.prototype.getUI=function(){var d=document.createElement("div");return d.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,d.style.display=this.display,this.blocks.forEach(function(m){return d.appendChild(m.getUI())}),d},M}(),Er=function(){function M(){}return M.prototype.getUI=function(){var d=document.createElement("div");if(d.className=this.className,this.minWidth!==void 0&&(d.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":d.style.justifyContent="flex-start";break;case"center":d.style.justifyContent="center";break;case"end":d.style.justifyContent="flex-end"}return d.style.whiteSpace="nowrap",d},M}(),Rr=function(M){function d(){var m=M!==null&&M.apply(this,arguments)||this;return m.buttons=[],m}return mt(d,M),d.prototype.addButton=function(m){m.className=this.buttonClassName,m.colorsClassName=this.buttonColorsClassName,m.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(m)},d.prototype.getUI=function(){var m=M.prototype.getUI.call(this);return this.buttons.forEach(function(N){return m.appendChild(N.getUI())}),m},d}(Er),Tr=function(){function M(d,m){this._isActive=!1,this._isHidden=!1,this._icon=d,this.title=m,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(M.prototype,"icon",{get:function(){return this._icon},set:function(d){this._icon=d,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"isActive",{get:function(){return this._isActive},set:function(d){this._isActive=d,this.adjustClassName()},enumerable:!1,configurable:!0}),M.prototype.getUI=function(){var d=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return d.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},M.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},M.prototype.hide=function(){this._isHidden=!0},M}(),Sr=function(M){function d(){var m=M!==null&&M.apply(this,arguments)||this;return m.elements=[],m}return mt(d,M),d.prototype.addElement=function(m){this.elements.push(m)},d.prototype.getUI=function(){var m=M.prototype.getUI.call(this);return this.elements.forEach(function(N){return m.appendChild(N)}),m},d}(Er),Fr=function(){function M(d,m){this.horizontal=d,this.vertical=m}return Object.defineProperty(M.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),M.prototype.getVerticalLength=function(d){return d/this.ratio},M.prototype.getHorizontalLength=function(d){return d*this.ratio},M}(),lr=function(){function M(){}return M.getIcon=function(d,m){if(d>0&&m>0){var N=new Fr(d,m),X=N.ratio>=1?20:N.getHorizontalLength(20),H=N.ratio<1?20:N.getVerticalLength(20),fe=document.createElementNS("http://www.w3.org/2000/svg","svg");fe.setAttribute("xmlns","http://www.w3.org/2000/svg"),fe.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(fe);var ke=Je.createDefs();fe.appendChild(ke);var rt=Je.createElement("clipPath",[["id","text-bg-clip"]]);ke.appendChild(rt);var ot=Je.createPath(Je.getHollowRectanglePath((24-X)/2,(24-H)/2,X,H,(24-X)/2+2,(24-H)/2+2,X-4,H-4));fe.appendChild(ot);var Ke=Je.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Ke.appendChild(Je.createTSpan(d+":"+m)),fe.appendChild(Ke);var _t=Ke.getBBox();Je.setAttributes(Ke,[["x",((24-_t.width)/2).toString()],["y",((24-_t.height)/2-_t.y).toString()]]);var gt=Je.createPath(Je.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(_t.width))/2,(24-Math.ceil(_t.height))/2,Math.ceil(_t.width),Math.ceil(_t.height)));return rt.appendChild(gt),Je.setAttributes(ot,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(fe),fe.outerHTML}return'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},M}(),Ir=function(M){function d(m,N,X){var H=M.call(this,m,N)||this;return H.isDropdownOpen=!1,H.onClick=H.dropdownButtonClicked,H.dropdownButtons=X,H}return mt(d,M),d.prototype.setupDropdown=function(){var m=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(N){N.className=m.className,N.colorsClassName=m.colorsClassName,m.dropdownBlock.appendChild(N.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},d.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},d.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},d.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},d.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},d.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},d}(Tr),kr=function(){function M(d,m){this.GRIP_SIZE=10,this.color=d,this.fillColor=m,this.visual=Je.createGroup(),this.visual.appendChild(Je.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Je.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return M.prototype.ownsTarget=function(d){return d===this.visual||d===this.visual.childNodes[0]||d===this.visual.childNodes[1]},M.prototype.setCenter=function(d,m){this.visual.childNodes.forEach(function(N){return Je.setAttributes(N,[["cx",d.toString()],["cy",m.toString()]])})},M}(),Or=function(){function M(d,m,N,X){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=d,this.canvasHeight=m,this.margin=N,this.container=X,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(M.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(d){this._aspectRatio=d,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(d){this._isGridVisible=d,this.gridContainer&&Je.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(d){this._zoomFactor=d,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),M.prototype.open=function(){var d=this;this.cropShadeElement=Je.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Je.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var m=0;m<this.numberOfGridLines;m++)this.horizontalGridLines.push(Je.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(Je.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(N){return d.gridContainer.appendChild(N)}),this.verticalGridLines.forEach(function(N){return d.gridContainer.appendChild(N)}),this.cropRectElement=Je.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new kr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new kr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new kr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new kr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},M.prototype.setCropRectangle=function(d){this.cropRect=d;var m=Object.assign({},this.cropRect);this.zoomFactor!==1&&(m.width=this.cropRect.width*this.zoomFactor,m.height=this.cropRect.height*this.zoomFactor,m.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-m.width/2,m.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-m.height/2),Je.setAttributes(this.cropRectElement,[["x",m.x.toString()],["y",m.y.toString()],["width",m.width.toString()],["height",m.height.toString()]]);var N=m.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(H,fe){var ke=m.y+N*(fe+1);Je.setAttributes(H,[["x1",""+m.x],["y1",""+ke],["x2",""+(m.x+m.width)],["y2",""+ke]])});var X=m.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(H,fe){var ke=m.x+X*(fe+1);Je.setAttributes(H,[["x1",""+ke],["y1",""+m.y],["x2",""+ke],["y2",""+(m.y+m.height)]])}),Je.setAttributes(this.cropShadeElement,[["d",Je.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,m.x,m.y,m.width,m.height)]]),this.topLeftGrip.setCenter(m.x,m.y),this.topRightGrip.setCenter(m.x+m.width,m.y),this.bottomLeftGrip.setCenter(m.x,m.y+m.height),this.bottomRightGrip.setCenter(m.x+m.width,m.y+m.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},M.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},M.prototype.clientToLocalCoordinates=function(d,m){var N=this.container.getBoundingClientRect();return{x:d-N.left+this.margin,y:m-N.top+this.margin}},M.prototype.onPointerDown=function(d){this.container.setPointerCapture(d.pointerId),this.previousPoint=this.clientToLocalCoordinates(d.clientX,d.clientY),this.cropRectElement===d.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(d.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(d.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(d.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(d.target)&&(this.activeGrip=this.bottomRightGrip)},M.prototype.onPointerMove=function(d){if(this.isMoving)this.move(this.clientToLocalCoordinates(d.clientX,d.clientY));else if(this.activeGrip){var m=this.clientToLocalCoordinates(d.clientX,d.clientY);this.resize(m)}d.preventDefault()},M.prototype.onPointerUp=function(d){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(d.pointerId)},M.prototype.move=function(d){var m=d.x-this.previousPoint.x,N=d.y-this.previousPoint.y;this.zoomFactor!==1&&(m=-m/this.zoomFactor,N=-N/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+m),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+N),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=d},M.prototype.resize=function(d){var m=Object.assign({},this.cropRect),N=d.x-this.previousPoint.x,X=d.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:m.x+N<this.margin&&(N=this.margin-m.x),m.x+=N,m.width=this.cropRect.x+this.cropRect.width-m.x;break;case this.bottomRightGrip:case this.topRightGrip:m.width+N>this.canvasWidth*this.zoomFactor&&(N=this.canvasWidth*this.zoomFactor-m.width),m.width+=N}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(m.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(N),m.height=this.aspectRatio.getVerticalLength(m.width)):(m.y+=X,m.height=this.cropRect.y+this.cropRect.height-m.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?m.height=this.aspectRatio.getVerticalLength(m.width):m.height+=X}m.width<10&&(m.x=this.cropRect.x,m.width=10),m.height<10&&(m.y=this.cropRect.y,m.height=10),this.previousPoint=d,m.x>=this.margin&&m.y>=this.margin&&m.x-this.margin+m.width<=this.canvasWidth&&m.y-this.margin+m.height<=this.canvasHeight&&(this.cropRect=m,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},M.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var d=this.cropRect.x+this.cropRect.width/2,m=this.cropRect.y+this.cropRect.height/2,N=this.aspectRatio.getHorizontalLength(this.cropRect.height),X=this.aspectRatio.getVerticalLength(this.cropRect.width);N/this.canvasWidth<X/this.canvasHeight?this.cropRect.width=N:this.cropRect.height=X,this.cropRect.width>this.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=d-this.cropRect.width/2,this.cropRect.y=m-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},M.prototype.getRescaledRect=function(d,m,N,X,H,fe){var ke=N/d,rt=X/m;return{x:(H.x-fe)*ke+fe,y:(H.y-fe)*rt+fe,width:H.width*ke,height:H.height*rt}},M.prototype.scaleCanvas=function(d,m){var N=this.getRescaledRect(this.canvasWidth,this.canvasHeight,d,m,this.cropRect,this.margin);this.canvasWidth=d,this.canvasHeight=m,this.onCropChange&&this.onCropChange(N),this.setCropRectangle(N)},M}(),Jr=function(){function M(d){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=d,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(M.prototype,"angle",{get:function(){return this._angle},set:function(d){this._angle=d,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),M.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},M.prototype.onPointerDown=function(d){this.controlContainer.setPointerCapture(d.pointerId),this.isDragging=!0,this.previousPoint={x:d.clientX,y:d.clientY}},M.prototype.onPointerMove=function(d){this.isDragging&&(this.onAngleChange&&this.onAngleChange((d.clientX-this.previousPoint.x)/5),this.previousPoint.x=d.clientX)},M.prototype.onPointerUp=function(d){this.isDragging&&this.onAngleChange&&this.onAngleChange((d.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(d.pointerId)},M.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var d=this.angleLabelText.getBBox();Je.setAttributes(this.angleLabelElement,[["x",((this.width-d.width)/2).toString()],["y",(this.height/2).toString()]])}},M.prototype.positionScaleShape=function(){if(this.scaleShape){var d=this.scaleShape.transform.baseVal.getItem(0);d.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(d,0)}},M.prototype.getVisual=function(){var d=document.createElementNS("http://www.w3.org/2000/svg","svg");d.setAttribute("xmlns","http://www.w3.org/2000/svg"),d.setAttribute("width",this.width+"px"),d.setAttribute("height",this.height+"px"),d.setAttribute("viewBox","0 0 "+this.width+" "+this.height),d.style.flexShrink="0",document.body.appendChild(d);for(var m="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,N=1;N<=this.width/5+10;N++){var X=N%5==0?this.height/3:this.height/6;m+="h4v"+-X+"h1v"+X}m+="v1H0Z",this.scaleShape=Je.createPath(m);var H=Je.createTransform();this.scaleShape.transform.baseVal.appendItem(H),d.appendChild(this.scaleShape),this.angleLabelElement=Je.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Je.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var fe=Je.createTSpan("");return fe.innerHTML="&deg;",this.angleLabelElement.appendChild(fe),d.appendChild(this.angleLabelElement),document.body.removeChild(d),d},M}(),jr=function(){function M(){this.naturalSize=!1,this.imageType="image/png"}return M.prototype.rasterize=function(d,m,N,X,H,fe,ke){var rt=this;return new Promise(function(ot){var Ke=document.createElement("canvas");Ke.width=d.width.baseVal.value-2*X,Ke.height=d.height.baseVal.value-2*X;var _t=1,gt=1;rt.naturalSize===!0?(_t=m.naturalWidth/(d.width.baseVal.value-2*X)/fe,gt=m.naturalHeight/(d.height.baseVal.value-2*X)/ke,Ke.width=m.naturalWidth/fe,Ke.height=m.naturalHeight/ke):rt.width!==void 0&&rt.height!==void 0&&(_t=rt.width/N.width,gt=rt.height/N.height,Ke.width*=_t,Ke.height*=gt);var Bt=Ke.getContext("2d");Bt.translate(Ke.width/2,Ke.height/2),Bt.rotate(H*Math.PI/180),Bt.scale(fe,ke),Bt.translate(-Ke.width/2,-Ke.height/2),Bt.drawImage(m,0,0,Ke.width,Ke.height);var Mt=document.createElement("canvas");Mt.width=N.width*_t,Mt.height=N.height*gt,Mt.getContext("2d").putImageData(Bt.getImageData((N.x-X)*_t,(N.y-X)*gt,N.width*_t,N.height*gt),0,0),ot(Mt.toDataURL(rt.imageType,rt.imageQuality))})},M}(),ie=function(){function M(d){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=M.instanceCounter++,this.styles=new bt(this.instanceNo),this.target=d,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(M.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(d){this._zoomToCropEnabled=d,d?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(d){this._isGridVisible=d,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"gridLines",{get:function(){return this._gridLines},set:function(d){this._gridLines=d,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(d){this._rotationAngle=d,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"aspectRatio",{get:function(){var d;return(d=this._aspectRatio)!==null&&d!==void 0?d:this.aspectRatios[0]},set:function(d){this._aspectRatio=d},enumerable:!1,configurable:!0}),M.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},M.prototype.show=function(){this.showUI(),this.open()},M.prototype.close=function(d){d===void 0&&(d=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),d||this.closeEventListeners.forEach(function(m){return m()}),this._isOpen=!1)},M.prototype.addRenderEventListener=function(d){this.renderEventListeners.push(d)},M.prototype.removeRenderEventListener=function(d){this.renderEventListeners.indexOf(d)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(d),1)},M.prototype.addCloseEventListener=function(d){this.closeEventListeners.push(d)},M.prototype.removeCloseEventListener=function(d){this.closeEventListeners.indexOf(d)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(d),1)},M.prototype.setupResizeObserver=function(){var d=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){d.resize(d.target.clientWidth,d.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},M.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var d=1*this.target.clientWidth/this.target.clientHeight,m=this.contentDiv.clientWidth/d>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*d:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,N=m+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/d;this.resize(m,N)}},M.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},M.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",Je.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},M.prototype.resize=function(d,m){this.imageWidth=Math.round(d),this.imageHeight=Math.round(m),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.displayMode!=="popup"?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},M.prototype.setEditingTarget=function(){var d=document.createElement("canvas");d.width=this.target.naturalWidth,d.height=this.target.naturalHeight,d.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var m=d.toDataURL();Je.setAttributes(this.editingTarget,[["href",m]]),this.setEditingTargetSize()},M.prototype.setTopLeft=function(){var d=this.target.getBoundingClientRect(),m=this.editorCanvas.getBoundingClientRect();this.left=d.left-m.left-this.CANVAS_MARGIN,this.top=d.top-m.top-this.CANVAS_MARGIN},M.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=Je.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=Je.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=Je.createGroup(),this.editingTargetRotationScaleContainer=Je.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var d=Je.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(d);var m=Je.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(m),this.editingTargetContainer=Je.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},M.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},M.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=Je.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Or(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},M.prototype.zoomToCrop=function(){if(this.cropRect){var d=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,m=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=d+"px "+m+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-d+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-m+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},M.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},M.prototype.cropRectChanged=function(d){this.cropRect=d,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},M.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},M.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},M.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},M.prototype.showUI=function(){switch(this.addStyles(),this.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var d=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,m=this.target.offsetTop>d+this.CANVAS_MARGIN?this.target.offsetTop-(d+this.CANVAS_MARGIN):0;this.coverDiv.style.top=m+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},M.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},M.prototype.addTopToolbar=function(){var d=this;this.topToolbar=new Yt,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var m=new Rr;m.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(m);var N=[];this.aspectRatios.forEach(function(gt){var Bt=new Tr(lr.getIcon(gt.horizontal,gt.vertical),gt.horizontal===0&&gt.vertical===0?"FREE":gt.horizontal+":"+gt.vertical);Bt.onClick=function(){return d.ratioButtonClicked(gt)},N.push(Bt)}),this.aspectRatioButton=new Ir(lr.getIcon(0,0),"Aspect ratio",N),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,m.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var X=new Tr('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");X.isActive=this.isGridVisible,X.onClick=function(){d.isGridVisible=!d.isGridVisible,X.isActive=d.isGridVisible},m.addButton(X);var H=new Tr('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(H.isActive=this.zoomToCropEnabled,H.onClick=function(){d.zoomToCropEnabled=!d.zoomToCropEnabled,H.isActive=d.zoomToCropEnabled},m.addButton(H),!Pt.isLicensed){var fe=new Sr;this.topToolbar.addElementBlock(fe);var ke=document.createElement("div");ke.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var rt=document.createElement("a");rt.style.color="currentColor",rt.href="https://markerjs.com/products/cropro",rt.target="_blank",rt.innerHTML='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',ke.appendChild(rt),fe.addElement(ke)}var ot=new Rr;ot.minWidth=3*this.toolbarHeight+"px",ot.contentAlign="end",this.topToolbar.addButtonBlock(ot);var Ke=new Tr('<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"OK");Ke.onClick=this.startRenderAndClose,ot.addButton(Ke),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Ke.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var _t=new Tr('<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"Close");_t.onClick=this.close,ot.addButton(_t),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(_t.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},M.prototype.addBottomToolbar=function(){var d=this;this.bottomToolbar=new Yt,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var m=new Rr;m.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(m);var N=new Tr('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");N.onClick=this.rotateLeftButtonClicked,m.addButton(N);var X=new Tr('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");X.onClick=this.rotateRightButtonClicked,m.addButton(X);var H=new Sr;H.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(H),this.straightener=new Jr("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(ot){d.rotateBy(ot),d.straightener.angle=d.rotationAngle},H.addElement(this.straightener.getUI());var fe=new Rr;fe.minWidth=2*this.toolbarHeight+"px",fe.contentAlign="end",this.bottomToolbar.addButtonBlock(fe);var ke=new Tr('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");ke.onClick=this.flipHorizontallyButtonClicked,fe.addButton(ke);var rt=new Tr('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");rt.onClick=this.flipVerticallyButtonClicked,fe.addButton(rt)},M.prototype.ratioButtonClicked=function(d){this.aspectRatio=d,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},M.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=lr.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},M.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Fr(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},M.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},M.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},M.prototype.restoreState=function(d){if(d){var m=this.cropLayer.getRescaledRect(d.width,d.height,this.imageWidth,this.imageHeight,d.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(m),this.cropRectChanged(m),this.flippedHorizontally=d.flippedHorizontally,this.flippedVertically=d.flippedVertically,this.applyFlip(),this.rotationAngle=d.rotationAngle,this.applyRotation()}},M.prototype.clientToLocalCoordinates=function(d,m){var N=this.cropImage.getBoundingClientRect();return{x:d-N.left,y:m-N.top}},M.prototype.onWindowResize=function(){this.positionUI()},M.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var d=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=d+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},M.prototype.rotateLeftButtonClicked=function(){var d=this.rotationAngle-90;this.rotationAngle%90!=0&&(d+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(d)},M.prototype.rotateRightButtonClicked=function(){var d=this.rotationAngle+90;this.rotationAngle%90!=0&&(d-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(d)},M.prototype.rotateTo=function(d){d=(d=d>180?d-360:d)<=-180?d+360:d,this.rotationAngle=d,this.applyRotation()},M.prototype.rotateBy=function(d){this.rotateTo((this.rotationAngle+d)%360)},M.prototype.applyRotation=function(){var d=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var m=this.editingTargetRotationContainer.transform.baseVal.getItem(0);m.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(m,0);var N=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/N.width,this.imageHeight/N.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=d},M.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},M.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},M.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},M.prototype.startRenderAndClose=function(){return yt(this,void 0,void 0,function(){var d,m;return wt(this,function(N){switch(N.label){case 0:return[4,this.render()];case 1:return d=N.sent(),m=this.getState(),this.renderEventListeners.forEach(function(X){return X(d,m)}),this.close(!0),[2]}})})},M.prototype.render=function(){return yt(this,void 0,void 0,function(){var d;return wt(this,function(m){switch(m.label){case 0:return(d=new jr).naturalSize=this.renderAtNaturalSize,d.imageType=this.renderImageType,d.imageQuality=this.renderImageQuality,d.width=this.renderWidth,d.height=this.renderHeight,this.unzoomFromCrop(),Je.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,d.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return m.sent(),[4,d.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,m.sent()]}})})},M.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Lt("toolbar",`
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.toolbarHeight+`px;
box-sizing: content-box;
overflow: hidden;
line-height: 0px;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new Lt("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Lt("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var d=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Lt("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*d)+`px;
height: `+(this.toolbarHeight-2*d)+`px;
padding: `+d+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Lt("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Lt("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new dt("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new dt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Lt("toolbar_dropdown",`
position: absolute;
max-width: `+4*this.toolbarHeight+`px;
z-index: 20;
white-space: normal;
box-sizing: content-box;
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
line-height: 0px;
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new Lt("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Lt("toolbar_straightener_block",`
display: flex;
overflow: hidden;
justify-content: center;
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new Lt("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*d)+`px;
padding: `+d+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Lt("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},M.instanceCounter=0,M}(),ae=q("8hTe"),ce=q.n(ae),Te=/<pre[^>]*>/g;function We(M){var d=document.createElement("div");return d.innerHTML=M,d.childNodes.length===0?"":d.childNodes[0].nodeValue}var Ze=$e.a=function(M){var d=M.value,m=d===void 0?"":d,N=M.edit,X=N===void 0?!1:N,H=M.className,fe=M.showTextOnly,ke=M.showLines,rt=M.replaces,ot=M.zoomImg,Ke=M.hasMask,_t=M.style,gt=_t===void 0?{}:_t,Bt=M.stylesPrev,Mt=Bt===void 0?{}:Bt,Ar=String(m),Wt=Object(S.useRef)(),ir=Object(S.useRef)(),kt=Object(S.useState)(""),br=Object(G.a)(kt,2),fr=br[0],Jt=br[1],Le=Object(S.useState)("office"),Ht=Object(G.a)(Le,2),Gt=Ht[0],Ut=Ht[1],Kt=function(){var Ft=new ie(ir.current);Ft.displayMode="popup",Ft.addRenderEventListener(function(){var tr=Object(I.a)(L.a.mark(function $t(_r){var Zt;return L.a.wrap(function(pr){for(;;)switch(pr.prev=pr.next){case 0:return Wt.current.style.display="none",pr.next=3,Object(Oe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:_r}});case 3:Zt=pr.sent,Zt!=null&&Zt.id&&rt(ir.current.getAttribute("src").replace(ne.a.API_SERVER,""),"/api/attachments/".concat(Zt==null?void 0:Zt.id,"?type=").concat(Zt.content_type));case 5:case"end":return pr.stop()}},$t)}));return function($t){return tr.apply(this,arguments)}}()),Ft.show()},Qt=function(){var Ft=new qt(ir.current);Ft.settings.displayMode="popup",Ft.addEventListener("render",function(){var tr=Object(I.a)(L.a.mark(function $t(_r){var Zt;return L.a.wrap(function(pr){for(;;)switch(pr.prev=pr.next){case 0:if(Wt.current.style.display="none",!ir.current){pr.next=6;break}return pr.next=4,Object(Oe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:_r.dataUrl}});case 4:Zt=pr.sent,Zt!=null&&Zt.id&&rt(ir.current.getAttribute("src").replace(ne.a.API_SERVER,""),"/api/attachments/".concat(Zt==null?void 0:Zt.id,"?type=").concat(Zt.content_type));case 6:case"end":return pr.stop()}},$t)}));return function($t){return tr.apply(this,arguments)}}()),Ft.show(),window.markerArea=Ft},or=Object(S.useMemo)(function(){Wt.current&&(Wt.current.style.zIndex=-1);try{var jt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Ft=/\"\/api\/attachments\/|\"\/attachments\/download\//g,tr=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Ar=Ar.replace(jt,"("+ne.a.API_SERVER+"/api/attachments/").replace(Ft,'"'+ne.a.API_SERVER+"/api/attachments/").replace(tr,'"'+ne.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`)}catch(Lr){}var $t=j(Ar),_r=g();if(Ar.match(/\[TOC\]/)&&($t=$t.replace("<p>[TOC]</p>",x()),B()),$t=$t.replace(/(__special_katext_id_\d+__)/g,function(Lr,pr){var Hr=_r[pr],Nr=Hr.type,Ur=Hr.expression;return Object(me.renderToString)(We(Ur)||"",{displayMode:Nr==="block",throwOnError:!1,output:"html"})}),$t=$t.replace(/▁/g,"\u2581\u2581\u2581"),p(),fe){var Zt=document.createElement("div");return Zt.innerHTML=$t,Zt.innerText}return setTimeout(function(){return rr()},500),$t},[Ar]),Vt=Object(S.useRef)();w.WebkitLineClamp=ke,ke&&(gt=Object(D.a)(Object(D.a)({},gt),w));function ar(jt){var Ft=jt.target;if(Ft.tagName.toUpperCase()==="IMG"){if(ot){var tr=Ft.getAttribute("src");Jt(tr),Ut("image")}}else if(Ft.tagName.toUpperCase()==="A"){var $t=Ft.getAttribute("href");if($t.indexOf("office")>-1)jt.preventDefault(),Jt($t),Ut("office");else if($t.indexOf("application/pdf")>-1)jt.preventDefault(),Jt($t),Ut("pdf");else if($t.indexOf("text/html")>-1)jt.preventDefault(),Jt($t),Ut("html");else if($t.startsWith("#")){jt.preventDefault();var _r=document.getElementById($t.replace("#",""));_r&&_r.scrollIntoView(!0)}}}var rr=function(){var Ft,tr=(Ft=Vt.current)===null||Ft===void 0?void 0:Ft.querySelectorAll("video");tr==null||tr.forEach(function($t){if($t.oncontextmenu=function(){return!1},$t.src.indexOf(".m3u8")>-1&&!$t.canPlayType("application/vnd.apple.mpegurl")){if(Y.a.isSupported()){var _r=new Y.a;_r.loadSource($t.src),_r.attachMedia($t)}}})};Object(S.useEffect)(function(){if(Vt.current&&or&&(or.match(Te)&&window.PR.prettyPrint()),Vt.current)return Vt.current.addEventListener("click",ar),function(){Vt.current.removeEventListener("click",ar),p(),B()}},[or,Vt.current,ar]);var Dt=function(Ft){if(!X)return;Ft.target.nodeName==="IMG"?(Wt.current.style.zIndex=1,Wt.current.style.display="flex",Wt.current.style.width=Ft.target.clientWidth+"px",Wt.current.style.height=Ft.target.clientHeight+"px",Wt.current.style.top=Ft.target.offsetTop+"px",Wt.current.style.left=Ft.target.offsetLeft+"px",ir.current.src=Ft.target.getAttribute("src")):Wt.current.style.display="none"};return _.a.createElement("div",{style:{position:"relative"}},_.a.createElement("div",{ref:Vt,style:Object(D.a)({},gt),className:"".concat(H||""," markdown-body ").concat(ce.a.mdBody),onMouseOver:Dt,dangerouslySetInnerHTML:{__html:or}}),_.a.createElement("div",{ref:Wt,className:ce.a.button},_.a.createElement(V.a,null,_.a.createElement(z.a,{onClick:function(){return Kt()}},"\u88C1\u526A"),_.a.createElement(z.a,{onClick:function(){return Qt()}},"\u7F16\u8F91"))),_.a.createElement("img",{ref:ir,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),_.a.createElement(_e.a,{close:!0,data:fr,type:fr!=null&&fr.length?Gt:"",style:Object(D.a)({},Mt),onClose:function(){return Jt("")}}))}},BU3w:function(vt,$e,q){"use strict";q.d($e,"a",function(){return I});var ve=q("MNnm"),V="rc-util-key";function O(G){if(G.attachTo)return G.attachTo;var P=document.querySelector("head");return P||document.body}function z(G){var P,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(ve.a)())return null;var S=document.createElement("style");if((P=L.csp)===null||P===void 0?void 0:P.nonce){var _;S.nonce=(_=L.csp)===null||_===void 0?void 0:_.nonce}S.innerHTML=G;var b=O(L),u=b.firstChild;return L.prepend&&b.prepend?b.prepend(S):L.prepend&&u?b.insertBefore(S,u):b.appendChild(S),S}var D=new Map;function I(G,P){var L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},S=O(L);if(!D.has(S)){var _=z("",L),b=_.parentNode;D.set(S,b),b.removeChild(_)}var u=Array.from(D.get(S).children).find(function(t){return t.tagName==="STYLE"&&t[V]===P});if(u){var o,r;if(((o=L.csp)===null||o===void 0?void 0:o.nonce)&&u.nonce!==((r=L.csp)===null||r===void 0?void 0:r.nonce)){var A;u.nonce=(A=L.csp)===null||A===void 0?void 0:A.nonce}return u.innerHTML!==G&&(u.innerHTML=G),u}var s=z(G,L);return s[V]=P,s}},DlQD:function(vt,$e,q){(function(ve,V){vt.exports=V()})(this,function(){"use strict";function ve(ye,le){for(var ue=0;ue<le.length;ue++){var Z=le[ue];Z.enumerable=Z.enumerable||!1,Z.configurable=!0,"value"in Z&&(Z.writable=!0),Object.defineProperty(ye,Z.key,Z)}}function V(ye,le,ue){return le&&ve(ye.prototype,le),ue&&ve(ye,ue),ye}function O(ye,le){if(!ye)return;if(typeof ye=="string")return z(ye,le);var ue=Object.prototype.toString.call(ye).slice(8,-1);if(ue==="Object"&&ye.constructor&&(ue=ye.constructor.name),ue==="Map"||ue==="Set")return Array.from(ye);if(ue==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ue))return z(ye,le)}function z(ye,le){(le==null||le>ye.length)&&(le=ye.length);for(var ue=0,Z=new Array(le);ue<le;ue++)Z[ue]=ye[ue];return Z}function D(ye,le){var ue;if(typeof Symbol=="undefined"||ye[Symbol.iterator]==null){if(Array.isArray(ye)||(ue=O(ye))||le&&ye&&typeof ye.length=="number"){ue&&(ye=ue);var Z=0;return function(){return Z>=ye.length?{done:!0}:{done:!1,value:ye[Z++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return ue=ye[Symbol.iterator](),ue.next.bind(ue)}function I(ye,le){return le={exports:{}},ye(le,le.exports),le.exports}var G=I(function(ye){function le(){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 ue(Z){ye.exports.defaults=Z}ye.exports={defaults:le(),getDefaults:le,changeDefaults:ue}}),P=G.defaults,L=G.getDefaults,S=G.changeDefaults,_=/[&<>"']/,b=/[&<>"']/g,u=/[<>"']|&(?!#?\w+;)/,o=/[<>"']|&(?!#?\w+;)/g,r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},A=function(le){return r[le]};function s(ye,le){if(le){if(_.test(ye))return ye.replace(b,A)}else if(u.test(ye))return ye.replace(o,A);return ye}var t=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function n(ye){return ye.replace(t,function(le,ue){return ue=ue.toLowerCase(),ue==="colon"?":":ue.charAt(0)==="#"?ue.charAt(1)==="x"?String.fromCharCode(parseInt(ue.substring(2),16)):String.fromCharCode(+ue.substring(1)):""})}var i=/(^|[^\[])\^/g;function B(ye,le){ye=ye.source||ye,le=le||"";var ue={replace:function(te,Ae){return Ae=Ae.source||Ae,Ae=Ae.replace(i,"$1"),ye=ye.replace(te,Ae),ue},getRegex:function(){return new RegExp(ye,le)}};return ue}var w=/[^\w:]/g,y=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function x(ye,le,ue){if(ye){var Z;try{Z=decodeURIComponent(n(ue)).replace(w,"").toLowerCase()}catch(te){return null}if(Z.indexOf("javascript:")===0||Z.indexOf("vbscript:")===0||Z.indexOf("data:")===0)return null}le&&!y.test(ue)&&(ue=l(le,ue));try{ue=encodeURI(ue).replace(/%25/g,"%")}catch(te){return null}return ue}var E={},c=/^[^:]+:\/*[^/]*$/,e=/^([^:]+:)[\s\S]*$/,a=/^([^:]+:\/*[^/]*)[\s\S]*$/;function l(ye,le){E[" "+ye]||(c.test(ye)?E[" "+ye]=ye+"/":E[" "+ye]=R(ye,"/",!0)),ye=E[" "+ye];var ue=ye.indexOf(":")===-1;return le.substring(0,2)==="//"?ue?le:ye.replace(e,"$1")+le:le.charAt(0)==="/"?ue?le:ye.replace(a,"$1")+le:ye+le}var g={exec:function(){}};function p(ye){for(var le=1,ue,Z;le<arguments.length;le++){ue=arguments[le];for(Z in ue)Object.prototype.hasOwnProperty.call(ue,Z)&&(ye[Z]=ue[Z])}return ye}function f(ye,le){var ue=ye.replace(/\|/g,function(Ae,de,Be){for(var Ne=!1,Xe=de;--Xe>=0&&Be[Xe]==="\\";)Ne=!Ne;return Ne?"|":" |"}),Z=ue.split(/ \|/),te=0;if(Z.length>le)Z.splice(le);else for(;Z.length<le;)Z.push("");for(;te<Z.length;te++)Z[te]=Z[te].trim().replace(/\\\|/g,"|");return Z}function R(ye,le,ue){var Z=ye.length;if(Z===0)return"";for(var te=0;te<Z;){var Ae=ye.charAt(Z-te-1);if(Ae===le&&!ue)te++;else if(Ae!==le&&ue)te++;else break}return ye.substr(0,Z-te)}function U(ye,le){if(ye.indexOf(le[1])===-1)return-1;for(var ue=ye.length,Z=0,te=0;te<ue;te++)if(ye[te]==="\\")te++;else if(ye[te]===le[0])Z++;else if(ye[te]===le[1]&&(Z--,Z<0))return te;return-1}function Q(ye){ye&&ye.sanitize&&!ye.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var j={escape:s,unescape:n,edit:B,cleanUrl:x,resolveUrl:l,noopTest:g,merge:p,splitCells:f,rtrim:R,findClosingBracket:U,checkSanitizeDeprecation:Q},J=G.defaults,k=j.rtrim,Y=j.splitCells,ne=j.escape,me=j.findClosingBracket;function _e(ye,le,ue){var Z=le.href,te=le.title?ne(le.title):null,Ae=ye[1].replace(/\\([\[\]])/g,"$1");return ye[0].charAt(0)!=="!"?{type:"link",raw:ue,href:Z,title:te,text:Ae}:{type:"image",raw:ue,href:Z,title:te,text:ne(Ae)}}function Oe(ye,le){var ue=ye.match(/^(\s+)(?:```)/);if(ue===null)return le;var Z=ue[1];return le.split(`
`).map(function(te){var Ae=te.match(/^\s+/);if(Ae===null)return te;var de=Ae[0];return de.length>=Z.length?te.slice(Z.length):te}).join(`
`)}var xe=function(){function ye(ue){this.options=ue||J}var le=ye.prototype;return le.space=function(Z){var te=this.rules.block.newline.exec(Z);if(te)return te[0].length>1?{type:"space",raw:te[0]}:{raw:`
`}},le.code=function(Z,te){var Ae=this.rules.block.code.exec(Z);if(Ae){var de=te[te.length-1];if(de&&de.type==="paragraph")return{raw:Ae[0],text:Ae[0].trimRight()};var Be=Ae[0].replace(/^ {4}/gm,"");return{type:"code",raw:Ae[0],codeBlockStyle:"indented",text:this.options.pedantic?Be:k(Be,`
`)}}},le.fences=function(Z){var te=this.rules.block.fences.exec(Z);if(te){var Ae=te[0],de=Oe(Ae,te[3]||"");return{type:"code",raw:Ae,lang:te[2]?te[2].trim():te[2],text:de}}},le.heading=function(Z){var te=this.rules.block.heading.exec(Z);if(te)return{type:"heading",raw:te[0],depth:te[1].length,text:te[2]}},le.nptable=function(Z){var te=this.rules.block.nptable.exec(Z);if(te){var Ae={type:"table",header:Y(te[1].replace(/^ *| *\| *$/g,"")),align:te[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:te[3]?te[3].replace(/\n$/,"").split(`
`):[],raw:te[0]};if(Ae.header.length===Ae.align.length){var de=Ae.align.length,Be;for(Be=0;Be<de;Be++)/^ *-+: *$/.test(Ae.align[Be])?Ae.align[Be]="right":/^ *:-+: *$/.test(Ae.align[Be])?Ae.align[Be]="center":/^ *:-+ *$/.test(Ae.align[Be])?Ae.align[Be]="left":Ae.align[Be]=null;for(de=Ae.cells.length,Be=0;Be<de;Be++)Ae.cells[Be]=Y(Ae.cells[Be],Ae.header.length);return Ae}}},le.hr=function(Z){var te=this.rules.block.hr.exec(Z);if(te)return{type:"hr",raw:te[0]}},le.blockquote=function(Z){var te=this.rules.block.blockquote.exec(Z);if(te){var Ae=te[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:te[0],text:Ae}}},le.list=function(Z){var te=this.rules.block.list.exec(Z);if(te){for(var Ae=te[0],de=te[2],Be=de.length>1,Ne=de[de.length-1]===")",Xe={type:"list",raw:Ae,ordered:Be,start:Be?+de.slice(0,-1):"",loose:!1,items:[]},ct=te[0].match(this.rules.block.item),ut=!1,st,Nt,pt,et,er,qt,Ot,mt=ct.length,yt=0;yt<mt;yt++)st=ct[yt],Ae=st,Nt=st.length,st=st.replace(/^ *([*+-]|\d+[.)]) */,""),~st.indexOf(`
`)&&(Nt-=st.length,st=this.options.pedantic?st.replace(/^ {1,4}/gm,""):st.replace(new RegExp("^ {1,"+Nt+"}","gm"),"")),yt!==mt-1&&(pt=this.rules.block.bullet.exec(ct[yt+1])[0],(Be?pt.length===1||!Ne&&pt[pt.length-1]===")":pt.length>1||this.options.smartLists&&pt!==de)&&(et=ct.slice(yt+1).join(`
`),Xe.raw=Xe.raw.substring(0,Xe.raw.length-et.length),yt=mt-1)),er=ut||/\n\n(?!\s*$)/.test(st),yt!==mt-1&&(ut=st.charAt(st.length-1)===`
`,er||(er=ut)),er&&(Xe.loose=!0),qt=/^\[[ xX]\] /.test(st),Ot=void 0,qt&&(Ot=st[1]!==" ",st=st.replace(/^\[[ xX]\] +/,"")),Xe.items.push({type:"list_item",raw:Ae,task:qt,checked:Ot,loose:er,text:st});return Xe}},le.html=function(Z){var te=this.rules.block.html.exec(Z);if(te)return{type:this.options.sanitize?"paragraph":"html",raw:te[0],pre:!this.options.sanitizer&&(te[1]==="pre"||te[1]==="script"||te[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(te[0]):ne(te[0]):te[0]}},le.def=function(Z){var te=this.rules.block.def.exec(Z);if(te){te[3]&&(te[3]=te[3].substring(1,te[3].length-1));var Ae=te[1].toLowerCase().replace(/\s+/g," ");return{tag:Ae,raw:te[0],href:te[2],title:te[3]}}},le.table=function(Z){var te=this.rules.block.table.exec(Z);if(te){var Ae={type:"table",header:Y(te[1].replace(/^ *| *\| *$/g,"")),align:te[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:te[3]?te[3].replace(/\n$/,"").split(`
`):[]};if(Ae.header.length===Ae.align.length){Ae.raw=te[0];var de=Ae.align.length,Be;for(Be=0;Be<de;Be++)/^ *-+: *$/.test(Ae.align[Be])?Ae.align[Be]="right":/^ *:-+: *$/.test(Ae.align[Be])?Ae.align[Be]="center":/^ *:-+ *$/.test(Ae.align[Be])?Ae.align[Be]="left":Ae.align[Be]=null;for(de=Ae.cells.length,Be=0;Be<de;Be++)Ae.cells[Be]=Y(Ae.cells[Be].replace(/^ *\| *| *\| *$/g,""),Ae.header.length);return Ae}}},le.lheading=function(Z){var te=this.rules.block.lheading.exec(Z);if(te)return{type:"heading",raw:te[0],depth:te[2].charAt(0)==="="?1:2,text:te[1]}},le.paragraph=function(Z){var te=this.rules.block.paragraph.exec(Z);if(te)return{type:"paragraph",raw:te[0],text:te[1].charAt(te[1].length-1)===`
`?te[1].slice(0,-1):te[1]}},le.text=function(Z,te){var Ae=this.rules.block.text.exec(Z);if(Ae){var de=te[te.length-1];return de&&de.type==="text"?{raw:Ae[0],text:Ae[0]}:{type:"text",raw:Ae[0],text:Ae[0]}}},le.escape=function(Z){var te=this.rules.inline.escape.exec(Z);if(te)return{type:"escape",raw:te[0],text:ne(te[1])}},le.tag=function(Z,te,Ae){var de=this.rules.inline.tag.exec(Z);if(de)return!te&&/^<a /i.test(de[0])?te=!0:te&&/^<\/a>/i.test(de[0])&&(te=!1),!Ae&&/^<(pre|code|kbd|script)(\s|>)/i.test(de[0])?Ae=!0:Ae&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(de[0])&&(Ae=!1),{type:this.options.sanitize?"text":"html",raw:de[0],inLink:te,inRawBlock:Ae,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(de[0]):ne(de[0]):de[0]}},le.link=function(Z){var te=this.rules.inline.link.exec(Z);if(te){var Ae=me(te[2],"()");if(Ae>-1){var de=te[0].indexOf("!")===0?5:4,Be=de+te[1].length+Ae;te[2]=te[2].substring(0,Ae),te[0]=te[0].substring(0,Be).trim(),te[3]=""}var Ne=te[2],Xe="";if(this.options.pedantic){var ct=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ne);ct?(Ne=ct[1],Xe=ct[3]):Xe=""}else Xe=te[3]?te[3].slice(1,-1):"";Ne=Ne.trim().replace(/^<([\s\S]*)>$/,"$1");var ut=_e(te,{href:Ne&&Ne.replace(this.rules.inline._escapes,"$1"),title:Xe&&Xe.replace(this.rules.inline._escapes,"$1")},te[0]);return ut}},le.reflink=function(Z,te){var Ae;if((Ae=this.rules.inline.reflink.exec(Z))||(Ae=this.rules.inline.nolink.exec(Z))){var de=(Ae[2]||Ae[1]).replace(/\s+/g," ");if(de=te[de.toLowerCase()],!de||!de.href){var Be=Ae[0].charAt(0);return{type:"text",raw:Be,text:Be}}var Ne=_e(Ae,de,Ae[0]);return Ne}},le.strong=function(Z,te,Ae){Ae===void 0&&(Ae="");var de=this.rules.inline.strong.start.exec(Z);if(de&&(!de[1]||de[1]&&(Ae===""||this.rules.inline.punctuation.exec(Ae)))){te=te.slice(-1*Z.length);var Be=de[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Be.lastIndex=0;for(var Ne;(de=Be.exec(te))!=null;)if(Ne=this.rules.inline.strong.middle.exec(te.slice(0,de.index+3)),Ne)return{type:"strong",raw:Z.slice(0,Ne[0].length),text:Z.slice(2,Ne[0].length-2)}}},le.em=function(Z,te,Ae){Ae===void 0&&(Ae="");var de=this.rules.inline.em.start.exec(Z);if(de&&(!de[1]||de[1]&&(Ae===""||this.rules.inline.punctuation.exec(Ae)))){te=te.slice(-1*Z.length);var Be=de[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Be.lastIndex=0;for(var Ne;(de=Be.exec(te))!=null;)if(Ne=this.rules.inline.em.middle.exec(te.slice(0,de.index+2)),Ne)return{type:"em",raw:Z.slice(0,Ne[0].length),text:Z.slice(1,Ne[0].length-1)}}},le.codespan=function(Z){var te=this.rules.inline.code.exec(Z);if(te){var Ae=te[2].replace(/\n/g," "),de=/[^ ]/.test(Ae),Be=Ae.startsWith(" ")&&Ae.endsWith(" ");return de&&Be&&(Ae=Ae.substring(1,Ae.length-1)),Ae=ne(Ae,!0),{type:"codespan",raw:te[0],text:Ae}}},le.br=function(Z){var te=this.rules.inline.br.exec(Z);if(te)return{type:"br",raw:te[0]}},le.del=function(Z){var te=this.rules.inline.del.exec(Z);if(te)return{type:"del",raw:te[0],text:te[1]}},le.autolink=function(Z,te){var Ae=this.rules.inline.autolink.exec(Z);if(Ae){var de,Be;return Ae[2]==="@"?(de=ne(this.options.mangle?te(Ae[1]):Ae[1]),Be="mailto:"+de):(de=ne(Ae[1]),Be=de),{type:"link",raw:Ae[0],text:de,href:Be,tokens:[{type:"text",raw:de,text:de}]}}},le.url=function(Z,te){var Ae;if(Ae=this.rules.inline.url.exec(Z)){var de,Be;if(Ae[2]==="@")de=ne(this.options.mangle?te(Ae[0]):Ae[0]),Be="mailto:"+de;else{var Ne;do Ne=Ae[0],Ae[0]=this.rules.inline._backpedal.exec(Ae[0])[0];while(Ne!==Ae[0]);de=ne(Ae[0]),Ae[1]==="www."?Be="http://"+de:Be=de}return{type:"link",raw:Ae[0],text:de,href:Be,tokens:[{type:"text",raw:de,text:de}]}}},le.inlineText=function(Z,te,Ae){var de=this.rules.inline.text.exec(Z);if(de){var Be;return te?Be=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(de[0]):ne(de[0]):de[0]:Be=ne(this.options.smartypants?Ae(de[0]):de[0]),{type:"text",raw:de[0],text:Be}}},ye}(),Se=j.noopTest,Fe=j.edit,Pe=j.merge,Ee={newline:/^\n+/,code:/^( {4}[^\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}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\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{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:Se,table:Se,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};Ee._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Ee._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Ee.def=Fe(Ee.def).replace("label",Ee._label).replace("title",Ee._title).getRegex(),Ee.bullet=/(?:[*+-]|\d{1,9}[.)])/,Ee.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,Ee.item=Fe(Ee.item,"gm").replace(/bull/g,Ee.bullet).getRegex(),Ee.list=Fe(Ee.list).replace(/bull/g,Ee.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Ee.def.source+")").getRegex(),Ee._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",Ee._comment=/<!--(?!-?>)[\s\S]*?-->/,Ee.html=Fe(Ee.html,"i").replace("comment",Ee._comment).replace("tag",Ee._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ee.paragraph=Fe(Ee._paragraph).replace("hr",Ee.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",Ee._tag).getRegex(),Ee.blockquote=Fe(Ee.blockquote).replace("paragraph",Ee.paragraph).getRegex(),Ee.normal=Pe({},Ee),Ee.gfm=Pe({},Ee.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),Ee.gfm.nptable=Fe(Ee.gfm.nptable).replace("hr",Ee.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",Ee._tag).getRegex(),Ee.gfm.table=Fe(Ee.gfm.table).replace("hr",Ee.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",Ee._tag).getRegex(),Ee.pedantic=Pe({},Ee.normal,{html:Fe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ee._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]+?) *(?:#+ *)?(?:\n+|$)/,fences:Se,paragraph:Fe(Ee.normal._paragraph).replace("hr",Ee.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",Ee.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var he={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Se,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(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Se,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};he._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",he.punctuation=Fe(he.punctuation).replace(/punctuation/g,he._punctuation).getRegex(),he._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",he._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",he.em.start=Fe(he.em.start).replace(/punctuation/g,he._punctuation).getRegex(),he.em.middle=Fe(he.em.middle).replace(/punctuation/g,he._punctuation).replace(/overlapSkip/g,he._overlapSkip).getRegex(),he.em.endAst=Fe(he.em.endAst,"g").replace(/punctuation/g,he._punctuation).getRegex(),he.em.endUnd=Fe(he.em.endUnd,"g").replace(/punctuation/g,he._punctuation).getRegex(),he.strong.start=Fe(he.strong.start).replace(/punctuation/g,he._punctuation).getRegex(),he.strong.middle=Fe(he.strong.middle).replace(/punctuation/g,he._punctuation).replace(/blockSkip/g,he._blockSkip).getRegex(),he.strong.endAst=Fe(he.strong.endAst,"g").replace(/punctuation/g,he._punctuation).getRegex(),he.strong.endUnd=Fe(he.strong.endUnd,"g").replace(/punctuation/g,he._punctuation).getRegex(),he.blockSkip=Fe(he._blockSkip,"g").getRegex(),he.overlapSkip=Fe(he._overlapSkip,"g").getRegex(),he._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,he._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,he._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])?)+(?![-_])/,he.autolink=Fe(he.autolink).replace("scheme",he._scheme).replace("email",he._email).getRegex(),he._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,he.tag=Fe(he.tag).replace("comment",Ee._comment).replace("attribute",he._attribute).getRegex(),he._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,he._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,he._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,he.link=Fe(he.link).replace("label",he._label).replace("href",he._href).replace("title",he._title).getRegex(),he.reflink=Fe(he.reflink).replace("label",he._label).getRegex(),he.reflinkSearch=Fe(he.reflinkSearch,"g").replace("reflink",he.reflink).replace("nolink",he.nolink).getRegex(),he.normal=Pe({},he),he.pedantic=Pe({},he.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:Fe(/^!?\[(label)\]\((.*?)\)/).replace("label",he._label).getRegex(),reflink:Fe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",he._label).getRegex()}),he.gfm=Pe({},he.normal,{escape:Fe(he.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)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),he.gfm.url=Fe(he.gfm.url,"i").replace("email",he.gfm._extended_email).getRegex(),he.breaks=Pe({},he.gfm,{br:Fe(he.br).replace("{2,}","*").getRegex(),text:Fe(he.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Ge={block:Ee,inline:he},lt=G.defaults,at=Ge.block,je=Ge.inline;function it(ye){return ye.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function ee(ye){var le="",ue,Z,te=ye.length;for(ue=0;ue<te;ue++)Z=ye.charCodeAt(ue),Math.random()>.5&&(Z="x"+Z.toString(16)),le+="&#"+Z+";";return le}var W=function(){function ye(ue){this.tokens=[],this.tokens.links=Object.create(null),this.options=ue||lt,this.options.tokenizer=this.options.tokenizer||new xe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var Z={block:at.normal,inline:je.normal};this.options.pedantic?(Z.block=at.pedantic,Z.inline=je.pedantic):this.options.gfm&&(Z.block=at.gfm,this.options.breaks?Z.inline=je.breaks:Z.inline=je.gfm),this.tokenizer.rules=Z}ye.lex=function(Z,te){var Ae=new ye(te);return Ae.lex(Z)};var le=ye.prototype;return le.lex=function(Z){return Z=Z.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(Z,this.tokens,!0),this.inline(this.tokens),this.tokens},le.blockTokens=function(Z,te,Ae){te===void 0&&(te=[]),Ae===void 0&&(Ae=!0),Z=Z.replace(/^ +$/gm,"");for(var de,Be,Ne,Xe;Z;){if(de=this.tokenizer.space(Z)){Z=Z.substring(de.raw.length),de.type&&te.push(de);continue}if(de=this.tokenizer.code(Z,te)){Z=Z.substring(de.raw.length),de.type?te.push(de):(Xe=te[te.length-1],Xe.raw+=`
`+de.raw,Xe.text+=`
`+de.text);continue}if(de=this.tokenizer.fences(Z)){Z=Z.substring(de.raw.length),te.push(de);continue}if(de=this.tokenizer.heading(Z)){Z=Z.substring(de.raw.length),te.push(de);continue}if(de=this.tokenizer.nptable(Z)){Z=Z.substring(de.raw.length),te.push(de);continue}if(de=this.tokenizer.hr(Z)){Z=Z.substring(de.raw.length),te.push(de);continue}if(de=this.tokenizer.blockquote(Z)){Z=Z.substring(de.raw.length),de.tokens=this.blockTokens(de.text,[],Ae),te.push(de);continue}if(de=this.tokenizer.list(Z)){for(Z=Z.substring(de.raw.length),Ne=de.items.length,Be=0;Be<Ne;Be++)de.items[Be].tokens=this.blockTokens(de.items[Be].text,[],!1);te.push(de);continue}if(de=this.tokenizer.html(Z)){Z=Z.substring(de.raw.length),te.push(de);continue}if(Ae&&(de=this.tokenizer.def(Z))){Z=Z.substring(de.raw.length),this.tokens.links[de.tag]||(this.tokens.links[de.tag]={href:de.href,title:de.title});continue}if(de=this.tokenizer.table(Z)){Z=Z.substring(de.raw.length),te.push(de);continue}if(de=this.tokenizer.lheading(Z)){Z=Z.substring(de.raw.length),te.push(de);continue}if(Ae&&(de=this.tokenizer.paragraph(Z))){Z=Z.substring(de.raw.length),te.push(de);continue}if(de=this.tokenizer.text(Z,te)){Z=Z.substring(de.raw.length),de.type?te.push(de):(Xe=te[te.length-1],Xe.raw+=`
`+de.raw,Xe.text+=`
`+de.text);continue}if(Z){var ct="Infinite loop on byte: "+Z.charCodeAt(0);if(this.options.silent){console.error(ct);break}else throw new Error(ct)}}return te},le.inline=function(Z){var te,Ae,de,Be,Ne,Xe,ct=Z.length;for(te=0;te<ct;te++){Xe=Z[te];switch(Xe.type){case"paragraph":case"text":case"heading":{Xe.tokens=[],this.inlineTokens(Xe.text,Xe.tokens);break}case"table":{for(Xe.tokens={header:[],cells:[]},Be=Xe.header.length,Ae=0;Ae<Be;Ae++)Xe.tokens.header[Ae]=[],this.inlineTokens(Xe.header[Ae],Xe.tokens.header[Ae]);for(Be=Xe.cells.length,Ae=0;Ae<Be;Ae++)for(Ne=Xe.cells[Ae],Xe.tokens.cells[Ae]=[],de=0;de<Ne.length;de++)Xe.tokens.cells[Ae][de]=[],this.inlineTokens(Ne[de],Xe.tokens.cells[Ae][de]);break}case"blockquote":{this.inline(Xe.tokens);break}case"list":{for(Be=Xe.items.length,Ae=0;Ae<Be;Ae++)this.inline(Xe.items[Ae].tokens);break}}}return Z},le.inlineTokens=function(Z,te,Ae,de,Be){te===void 0&&(te=[]),Ae===void 0&&(Ae=!1),de===void 0&&(de=!1),Be===void 0&&(Be="");var Ne,Xe=Z,ct;if(this.tokens.links){var ut=Object.keys(this.tokens.links);if(ut.length>0)for(;(ct=this.tokenizer.rules.inline.reflinkSearch.exec(Xe))!=null;)ut.includes(ct[0].slice(ct[0].lastIndexOf("[")+1,-1))&&(Xe=Xe.slice(0,ct.index)+"["+"a".repeat(ct[0].length-2)+"]"+Xe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ct=this.tokenizer.rules.inline.blockSkip.exec(Xe))!=null;)Xe=Xe.slice(0,ct.index)+"["+"a".repeat(ct[0].length-2)+"]"+Xe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;Z;){if(Ne=this.tokenizer.escape(Z)){Z=Z.substring(Ne.raw.length),te.push(Ne);continue}if(Ne=this.tokenizer.tag(Z,Ae,de)){Z=Z.substring(Ne.raw.length),Ae=Ne.inLink,de=Ne.inRawBlock,te.push(Ne);continue}if(Ne=this.tokenizer.link(Z)){Z=Z.substring(Ne.raw.length),Ne.type==="link"&&(Ne.tokens=this.inlineTokens(Ne.text,[],!0,de)),te.push(Ne);continue}if(Ne=this.tokenizer.reflink(Z,this.tokens.links)){Z=Z.substring(Ne.raw.length),Ne.type==="link"&&(Ne.tokens=this.inlineTokens(Ne.text,[],!0,de)),te.push(Ne);continue}if(Ne=this.tokenizer.strong(Z,Xe,Be)){Z=Z.substring(Ne.raw.length),Ne.tokens=this.inlineTokens(Ne.text,[],Ae,de),te.push(Ne);continue}if(Ne=this.tokenizer.em(Z,Xe,Be)){Z=Z.substring(Ne.raw.length),Ne.tokens=this.inlineTokens(Ne.text,[],Ae,de),te.push(Ne);continue}if(Ne=this.tokenizer.codespan(Z)){Z=Z.substring(Ne.raw.length),te.push(Ne);continue}if(Ne=this.tokenizer.br(Z)){Z=Z.substring(Ne.raw.length),te.push(Ne);continue}if(Ne=this.tokenizer.del(Z)){Z=Z.substring(Ne.raw.length),Ne.tokens=this.inlineTokens(Ne.text,[],Ae,de),te.push(Ne);continue}if(Ne=this.tokenizer.autolink(Z,ee)){Z=Z.substring(Ne.raw.length),te.push(Ne);continue}if(!Ae&&(Ne=this.tokenizer.url(Z,ee))){Z=Z.substring(Ne.raw.length),te.push(Ne);continue}if(Ne=this.tokenizer.inlineText(Z,de,it)){Z=Z.substring(Ne.raw.length),Be=Ne.raw.slice(-1),te.push(Ne);continue}if(Z){var st="Infinite loop on byte: "+Z.charCodeAt(0);if(this.options.silent){console.error(st);break}else throw new Error(st)}}return te},V(ye,null,[{key:"rules",get:function(){return{block:at,inline:je}}}]),ye}(),F=G.defaults,oe=j.cleanUrl,re=j.escape,we=function(){function ye(ue){this.options=ue||F}var le=ye.prototype;return le.code=function(Z,te,Ae){var de=(te||"").match(/\S*/)[0];if(this.options.highlight){var Be=this.options.highlight(Z,de);Be!=null&&Be!==Z&&(Ae=!0,Z=Be)}return de?'<pre><code class="'+this.options.langPrefix+re(de,!0)+'">'+(Ae?Z:re(Z,!0))+`</code></pre>
`:"<pre><code>"+(Ae?Z:re(Z,!0))+`</code></pre>
`},le.blockquote=function(Z){return`<blockquote>
`+Z+`</blockquote>
`},le.html=function(Z){return Z},le.heading=function(Z,te,Ae,de){return this.options.headerIds?"<h"+te+' id="'+this.options.headerPrefix+de.slug(Ae)+'">'+Z+"</h"+te+`>
`:"<h"+te+">"+Z+"</h"+te+`>
`},le.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},le.list=function(Z,te,Ae){var de=te?"ol":"ul",Be=te&&Ae!==1?' start="'+Ae+'"':"";return"<"+de+Be+`>
`+Z+"</"+de+`>
`},le.listitem=function(Z){return"<li>"+Z+`</li>
`},le.checkbox=function(Z){return"<input "+(Z?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},le.paragraph=function(Z){return"<p>"+Z+`</p>
`},le.table=function(Z,te){return te&&(te="<tbody>"+te+"</tbody>"),`<table>
<thead>
`+Z+`</thead>
`+te+`</table>
`},le.tablerow=function(Z){return`<tr>
`+Z+`</tr>
`},le.tablecell=function(Z,te){var Ae=te.header?"th":"td",de=te.align?"<"+Ae+' align="'+te.align+'">':"<"+Ae+">";return de+Z+"</"+Ae+`>
`},le.strong=function(Z){return"<strong>"+Z+"</strong>"},le.em=function(Z){return"<em>"+Z+"</em>"},le.codespan=function(Z){return"<code>"+Z+"</code>"},le.br=function(){return this.options.xhtml?"<br/>":"<br>"},le.del=function(Z){return"<del>"+Z+"</del>"},le.link=function(Z,te,Ae){if(Z=oe(this.options.sanitize,this.options.baseUrl,Z),Z===null)return Ae;var de='<a href="'+re(Z)+'"';return te&&(de+=' title="'+te+'"'),de+=">"+Ae+"</a>",de},le.image=function(Z,te,Ae){if(Z=oe(this.options.sanitize,this.options.baseUrl,Z),Z===null)return Ae;var de='<img src="'+Z+'" alt="'+Ae+'"';return te&&(de+=' title="'+te+'"'),de+=this.options.xhtml?"/>":">",de},le.text=function(Z){return Z},ye}(),be=function(){function ye(){}var le=ye.prototype;return le.strong=function(Z){return Z},le.em=function(Z){return Z},le.codespan=function(Z){return Z},le.del=function(Z){return Z},le.html=function(Z){return Z},le.text=function(Z){return Z},le.link=function(Z,te,Ae){return""+Ae},le.image=function(Z,te,Ae){return""+Ae},le.br=function(){return""},ye}(),nt=function(){function ye(){this.seen={}}var le=ye.prototype;return le.slug=function(Z){var te=Z.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(te)){var Ae=te;do this.seen[Ae]++,te=Ae+"-"+this.seen[Ae];while(this.seen.hasOwnProperty(te))}return this.seen[te]=0,te},ye}(),tt=G.defaults,Ye=j.unescape,qe=function(){function ye(ue){this.options=ue||tt,this.options.renderer=this.options.renderer||new we,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new be,this.slugger=new nt}ye.parse=function(Z,te){var Ae=new ye(te);return Ae.parse(Z)};var le=ye.prototype;return le.parse=function(Z,te){te===void 0&&(te=!0);var Ae="",de,Be,Ne,Xe,ct,ut,st,Nt,pt,et,er,qt,Ot,mt,yt,wt,Pt,Je,bt=Z.length;for(de=0;de<bt;de++){et=Z[de];switch(et.type){case"space":continue;case"hr":{Ae+=this.renderer.hr();continue}case"heading":{Ae+=this.renderer.heading(this.parseInline(et.tokens),et.depth,Ye(this.parseInline(et.tokens,this.textRenderer)),this.slugger);continue}case"code":{Ae+=this.renderer.code(et.text,et.lang,et.escaped);continue}case"table":{for(Nt="",st="",Xe=et.header.length,Be=0;Be<Xe;Be++)st+=this.renderer.tablecell(this.parseInline(et.tokens.header[Be]),{header:!0,align:et.align[Be]});for(Nt+=this.renderer.tablerow(st),pt="",Xe=et.cells.length,Be=0;Be<Xe;Be++){for(ut=et.tokens.cells[Be],st="",ct=ut.length,Ne=0;Ne<ct;Ne++)st+=this.renderer.tablecell(this.parseInline(ut[Ne]),{header:!1,align:et.align[Ne]});pt+=this.renderer.tablerow(st)}Ae+=this.renderer.table(Nt,pt);continue}case"blockquote":{pt=this.parse(et.tokens),Ae+=this.renderer.blockquote(pt);continue}case"list":{for(er=et.ordered,qt=et.start,Ot=et.loose,Xe=et.items.length,pt="",Be=0;Be<Xe;Be++)yt=et.items[Be],wt=yt.checked,Pt=yt.task,mt="",yt.task&&(Je=this.renderer.checkbox(wt),Ot?yt.tokens.length>0&&yt.tokens[0].type==="text"?(yt.tokens[0].text=Je+" "+yt.tokens[0].text,yt.tokens[0].tokens&&yt.tokens[0].tokens.length>0&&yt.tokens[0].tokens[0].type==="text"&&(yt.tokens[0].tokens[0].text=Je+" "+yt.tokens[0].tokens[0].text)):yt.tokens.unshift({type:"text",text:Je}):mt+=Je),mt+=this.parse(yt.tokens,Ot),pt+=this.renderer.listitem(mt,Pt,wt);Ae+=this.renderer.list(pt,er,qt);continue}case"html":{Ae+=this.renderer.html(et.text);continue}case"paragraph":{Ae+=this.renderer.paragraph(this.parseInline(et.tokens));continue}case"text":{for(pt=et.tokens?this.parseInline(et.tokens):et.text;de+1<bt&&Z[de+1].type==="text";)et=Z[++de],pt+=`
`+(et.tokens?this.parseInline(et.tokens):et.text);Ae+=te?this.renderer.paragraph(pt):pt;continue}default:{var dt='Token with "'+et.type+'" type was not found.';if(this.options.silent){console.error(dt);return}else throw new Error(dt)}}}return Ae},le.parseInline=function(Z,te){te=te||this.renderer;var Ae="",de,Be,Ne=Z.length;for(de=0;de<Ne;de++){Be=Z[de];switch(Be.type){case"escape":{Ae+=te.text(Be.text);break}case"html":{Ae+=te.html(Be.text);break}case"link":{Ae+=te.link(Be.href,Be.title,this.parseInline(Be.tokens,te));break}case"image":{Ae+=te.image(Be.href,Be.title,Be.text);break}case"strong":{Ae+=te.strong(this.parseInline(Be.tokens,te));break}case"em":{Ae+=te.em(this.parseInline(Be.tokens,te));break}case"codespan":{Ae+=te.codespan(Be.text);break}case"br":{Ae+=te.br();break}case"del":{Ae+=te.del(this.parseInline(Be.tokens,te));break}case"text":{Ae+=te.text(Be.text);break}default:{var Xe='Token with "'+Be.type+'" type was not found.';if(this.options.silent){console.error(Xe);return}else throw new Error(Xe)}}}return Ae},ye}(),At=j.merge,ft=j.checkSanitizeDeprecation,Ce=j.escape,Ue=G.getDefaults,Qe=G.changeDefaults,He=G.defaults;function Ie(ye,le,ue){if(typeof ye=="undefined"||ye===null)throw new Error("marked(): input parameter is undefined or null");if(typeof ye!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(ye)+", string expected");if(typeof le=="function"&&(ue=le,le=null),le=At({},Ie.defaults,le||{}),ft(le),ue){var Z=le.highlight,te;try{te=W.lex(ye,le)}catch(Ne){return ue(Ne)}var Ae=function(Xe){var ct;if(!Xe)try{ct=qe.parse(te,le)}catch(ut){Xe=ut}return le.highlight=Z,Xe?ue(Xe):ue(null,ct)};if(!Z||Z.length<3)return Ae();if(delete le.highlight,!te.length)return Ae();var de=0;Ie.walkTokens(te,function(Ne){Ne.type==="code"&&(de++,setTimeout(function(){Z(Ne.text,Ne.lang,function(Xe,ct){if(Xe)return Ae(Xe);ct!=null&&ct!==Ne.text&&(Ne.text=ct,Ne.escaped=!0),de--,de===0&&Ae()})},0))}),de===0&&Ae();return}try{var Be=W.lex(ye,le);return le.walkTokens&&Ie.walkTokens(Be,le.walkTokens),qe.parse(Be,le)}catch(Ne){if(Ne.message+=`
Please report this to https://github.com/markedjs/marked.`,le.silent)return"<p>An error occurred:</p><pre>"+Ce(Ne.message+"",!0)+"</pre>";throw Ne}}Ie.options=Ie.setOptions=function(ye){return At(Ie.defaults,ye),Qe(Ie.defaults),Ie},Ie.getDefaults=Ue,Ie.defaults=He,Ie.use=function(ye){var le=At({},ye);if(ye.renderer&&function(){var Z=Ie.defaults.renderer||new we,te=function(Be){var Ne=Z[Be];Z[Be]=function(){for(var Xe=arguments.length,ct=new Array(Xe),ut=0;ut<Xe;ut++)ct[ut]=arguments[ut];var st=ye.renderer[Be].apply(Z,ct);return st===!1&&(st=Ne.apply(Z,ct)),st}};for(var Ae in ye.renderer)te(Ae);le.renderer=Z}(),ye.tokenizer&&function(){var Z=Ie.defaults.tokenizer||new xe,te=function(Be){var Ne=Z[Be];Z[Be]=function(){for(var Xe=arguments.length,ct=new Array(Xe),ut=0;ut<Xe;ut++)ct[ut]=arguments[ut];var st=ye.tokenizer[Be].apply(Z,ct);return st===!1&&(st=Ne.apply(Z,ct)),st}};for(var Ae in ye.tokenizer)te(Ae);le.tokenizer=Z}(),ye.walkTokens){var ue=Ie.defaults.walkTokens;le.walkTokens=function(Z){ye.walkTokens(Z),ue&&ue(Z)}}Ie.setOptions(le)},Ie.walkTokens=function(ye,le){for(var ue=D(ye),Z;!(Z=ue()).done;){var te=Z.value;le(te);switch(te.type){case"table":{for(var Ae=D(te.tokens.header),de;!(de=Ae()).done;){var Be=de.value;Ie.walkTokens(Be,le)}for(var Ne=D(te.tokens.cells),Xe;!(Xe=Ne()).done;)for(var ct=Xe.value,ut=D(ct),st;!(st=ut()).done;){var Nt=st.value;Ie.walkTokens(Nt,le)}break}case"list":{Ie.walkTokens(te.items,le);break}default:te.tokens&&Ie.walkTokens(te.tokens,le)}}},Ie.Parser=qe,Ie.parser=qe.parse,Ie.Renderer=we,Ie.TextRenderer=be,Ie.Lexer=W,Ie.lexer=W.lex,Ie.Tokenizer=xe,Ie.Slugger=nt,Ie.parse=Ie;var Me=Ie;return Me})},H7XF:function(vt,$e,q){"use strict";$e.byteLength=P,$e.toByteArray=S,$e.fromByteArray=u;for(var ve=[],V=[],O=typeof Uint8Array!="undefined"?Uint8Array:Array,z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D=0,I=z.length;D<I;++D)ve[D]=z[D],V[z.charCodeAt(D)]=D;V["-".charCodeAt(0)]=62,V["_".charCodeAt(0)]=63;function G(o){var r=o.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var A=o.indexOf("=");A===-1&&(A=r);var s=A===r?0:4-A%4;return[A,s]}function P(o){var r=G(o),A=r[0],s=r[1];return(A+s)*3/4-s}function L(o,r,A){return(r+A)*3/4-A}function S(o){var r,A=G(o),s=A[0],t=A[1],n=new O(L(o,s,t)),i=0,B=t>0?s-4:s,w;for(w=0;w<B;w+=4)r=V[o.charCodeAt(w)]<<18|V[o.charCodeAt(w+1)]<<12|V[o.charCodeAt(w+2)]<<6|V[o.charCodeAt(w+3)],n[i++]=r>>16&255,n[i++]=r>>8&255,n[i++]=r&255;return t===2&&(r=V[o.charCodeAt(w)]<<2|V[o.charCodeAt(w+1)]>>4,n[i++]=r&255),t===1&&(r=V[o.charCodeAt(w)]<<10|V[o.charCodeAt(w+1)]<<4|V[o.charCodeAt(w+2)]>>2,n[i++]=r>>8&255,n[i++]=r&255),n}function _(o){return ve[o>>18&63]+ve[o>>12&63]+ve[o>>6&63]+ve[o&63]}function b(o,r,A){for(var s,t=[],n=r;n<A;n+=3)s=(o[n]<<16&16711680)+(o[n+1]<<8&65280)+(o[n+2]&255),t.push(_(s));return t.join("")}function u(o){for(var r,A=o.length,s=A%3,t=[],n=16383,i=0,B=A-s;i<B;i+=n)t.push(b(o,i,i+n>B?B:i+n));return s===1?(r=o[A-1],t.push(ve[r>>2]+ve[r<<4&63]+"==")):s===2&&(r=(o[A-2]<<8)+o[A-1],t.push(ve[r>>10]+ve[r>>4&63]+ve[r<<2&63]+"=")),t.join("")}},HDXh:function(vt,$e,q){"use strict";(function(ve){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/var V=q("H7XF"),O=q("kVK+"),z=q("49sm");$e.Buffer=P,$e.SlowBuffer=t,$e.INSPECT_MAX_BYTES=50,P.TYPED_ARRAY_SUPPORT=ve.TYPED_ARRAY_SUPPORT!==void 0?ve.TYPED_ARRAY_SUPPORT:D(),$e.kMaxLength=I();function D(){try{var ee=new Uint8Array(1);return ee.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ee.foo()===42&&typeof ee.subarray=="function"&&ee.subarray(1,1).byteLength===0}catch(W){return!1}}function I(){return P.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function G(ee,W){if(I()<W)throw new RangeError("Invalid typed array length");return P.TYPED_ARRAY_SUPPORT?(ee=new Uint8Array(W),ee.__proto__=P.prototype):(ee===null&&(ee=new P(W)),ee.length=W),ee}function P(ee,W,F){if(!P.TYPED_ARRAY_SUPPORT&&!(this instanceof P))return new P(ee,W,F);if(typeof ee=="number"){if(typeof W=="string")throw new Error("If encoding is specified then the first argument must be a string");return b(this,ee)}return L(this,ee,W,F)}P.poolSize=8192,P._augment=function(ee){return ee.__proto__=P.prototype,ee};function L(ee,W,F,oe){if(typeof W=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&W instanceof ArrayBuffer?r(ee,W,F,oe):typeof W=="string"?u(ee,W,F):A(ee,W)}P.from=function(ee,W,F){return L(null,ee,W,F)},P.TYPED_ARRAY_SUPPORT&&(P.prototype.__proto__=Uint8Array.prototype,P.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&P[Symbol.species]===P&&Object.defineProperty(P,Symbol.species,{value:null,configurable:!0}));function S(ee){if(typeof ee!="number")throw new TypeError('"size" argument must be a number');if(ee<0)throw new RangeError('"size" argument must not be negative')}function _(ee,W,F,oe){return S(W),W<=0?G(ee,W):F!==void 0?typeof oe=="string"?G(ee,W).fill(F,oe):G(ee,W).fill(F):G(ee,W)}P.alloc=function(ee,W,F){return _(null,ee,W,F)};function b(ee,W){if(S(W),ee=G(ee,W<0?0:s(W)|0),!P.TYPED_ARRAY_SUPPORT)for(var F=0;F<W;++F)ee[F]=0;return ee}P.allocUnsafe=function(ee){return b(null,ee)},P.allocUnsafeSlow=function(ee){return b(null,ee)};function u(ee,W,F){if((typeof F!="string"||F==="")&&(F="utf8"),!P.isEncoding(F))throw new TypeError('"encoding" must be a valid string encoding');var oe=n(W,F)|0;ee=G(ee,oe);var re=ee.write(W,F);return re!==oe&&(ee=ee.slice(0,re)),ee}function o(ee,W){var F=W.length<0?0:s(W.length)|0;ee=G(ee,F);for(var oe=0;oe<F;oe+=1)ee[oe]=W[oe]&255;return ee}function r(ee,W,F,oe){if(W.byteLength,F<0||W.byteLength<F)throw new RangeError("'offset' is out of bounds");if(W.byteLength<F+(oe||0))throw new RangeError("'length' is out of bounds");return F===void 0&&oe===void 0?W=new Uint8Array(W):oe===void 0?W=new Uint8Array(W,F):W=new Uint8Array(W,F,oe),P.TYPED_ARRAY_SUPPORT?(ee=W,ee.__proto__=P.prototype):ee=o(ee,W),ee}function A(ee,W){if(P.isBuffer(W)){var F=s(W.length)|0;return ee=G(ee,F),ee.length===0||W.copy(ee,0,0,F),ee}if(W){if(typeof ArrayBuffer!="undefined"&&W.buffer instanceof ArrayBuffer||"length"in W)return typeof W.length!="number"||it(W.length)?G(ee,0):o(ee,W);if(W.type==="Buffer"&&z(W.data))return o(ee,W.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function s(ee){if(ee>=I())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+I().toString(16)+" bytes");return ee|0}function t(ee){return+ee!=ee&&(ee=0),P.alloc(+ee)}P.isBuffer=function(W){return!!(W!=null&&W._isBuffer)},P.compare=function(W,F){if(!P.isBuffer(W)||!P.isBuffer(F))throw new TypeError("Arguments must be Buffers");if(W===F)return 0;for(var oe=W.length,re=F.length,we=0,be=Math.min(oe,re);we<be;++we)if(W[we]!==F[we]){oe=W[we],re=F[we];break}return oe<re?-1:re<oe?1:0},P.isEncoding=function(W){switch(String(W).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},P.concat=function(W,F){if(!z(W))throw new TypeError('"list" argument must be an Array of Buffers');if(W.length===0)return P.alloc(0);var oe;if(F===void 0)for(F=0,oe=0;oe<W.length;++oe)F+=W[oe].length;var re=P.allocUnsafe(F),we=0;for(oe=0;oe<W.length;++oe){var be=W[oe];if(!P.isBuffer(be))throw new TypeError('"list" argument must be an Array of Buffers');be.copy(re,we),we+=be.length}return re};function n(ee,W){if(P.isBuffer(ee))return ee.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(ee)||ee instanceof ArrayBuffer))return ee.byteLength;typeof ee!="string"&&(ee=""+ee);var F=ee.length;if(F===0)return 0;for(var oe=!1;;)switch(W){case"ascii":case"latin1":case"binary":return F;case"utf8":case"utf-8":case void 0:return he(ee).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F*2;case"hex":return F>>>1;case"base64":return at(ee).length;default:if(oe)return he(ee).length;W=(""+W).toLowerCase(),oe=!0}}P.byteLength=n;function i(ee,W,F){var oe=!1;if((W===void 0||W<0)&&(W=0),W>this.length)return"";if((F===void 0||F>this.length)&&(F=this.length),F<=0)return"";if(F>>>=0,W>>>=0,F<=W)return"";for(ee||(ee="utf8");;)switch(ee){case"hex":return j(this,W,F);case"utf8":case"utf-8":return p(this,W,F);case"ascii":return U(this,W,F);case"latin1":case"binary":return Q(this,W,F);case"base64":return g(this,W,F);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,W,F);default:if(oe)throw new TypeError("Unknown encoding: "+ee);ee=(ee+"").toLowerCase(),oe=!0}}P.prototype._isBuffer=!0;function B(ee,W,F){var oe=ee[W];ee[W]=ee[F],ee[F]=oe}P.prototype.swap16=function(){var W=this.length;if(W%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var F=0;F<W;F+=2)B(this,F,F+1);return this},P.prototype.swap32=function(){var W=this.length;if(W%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var F=0;F<W;F+=4)B(this,F,F+3),B(this,F+1,F+2);return this},P.prototype.swap64=function(){var W=this.length;if(W%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var F=0;F<W;F+=8)B(this,F,F+7),B(this,F+1,F+6),B(this,F+2,F+5),B(this,F+3,F+4);return this},P.prototype.toString=function(){var W=this.length|0;return W===0?"":arguments.length===0?p(this,0,W):i.apply(this,arguments)},P.prototype.equals=function(W){if(!P.isBuffer(W))throw new TypeError("Argument must be a Buffer");return this===W?!0:P.compare(this,W)===0},P.prototype.inspect=function(){var W="",F=$e.INSPECT_MAX_BYTES;return this.length>0&&(W=this.toString("hex",0,F).match(/.{2}/g).join(" "),this.length>F&&(W+=" ... ")),"<Buffer "+W+">"},P.prototype.compare=function(W,F,oe,re,we){if(!P.isBuffer(W))throw new TypeError("Argument must be a Buffer");if(F===void 0&&(F=0),oe===void 0&&(oe=W?W.length:0),re===void 0&&(re=0),we===void 0&&(we=this.length),F<0||oe>W.length||re<0||we>this.length)throw new RangeError("out of range index");if(re>=we&&F>=oe)return 0;if(re>=we)return-1;if(F>=oe)return 1;if(F>>>=0,oe>>>=0,re>>>=0,we>>>=0,this===W)return 0;for(var be=we-re,nt=oe-F,tt=Math.min(be,nt),Ye=this.slice(re,we),qe=W.slice(F,oe),At=0;At<tt;++At)if(Ye[At]!==qe[At]){be=Ye[At],nt=qe[At];break}return be<nt?-1:nt<be?1:0};function w(ee,W,F,oe,re){if(ee.length===0)return-1;if(typeof F=="string"?(oe=F,F=0):F>2147483647?F=2147483647:F<-2147483648&&(F=-2147483648),F=+F,isNaN(F)&&(F=re?0:ee.length-1),F<0&&(F=ee.length+F),F>=ee.length){if(re)return-1;F=ee.length-1}else if(F<0)if(re)F=0;else return-1;if(typeof W=="string"&&(W=P.from(W,oe)),P.isBuffer(W))return W.length===0?-1:y(ee,W,F,oe,re);if(typeof W=="number")return W=W&255,P.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?re?Uint8Array.prototype.indexOf.call(ee,W,F):Uint8Array.prototype.lastIndexOf.call(ee,W,F):y(ee,[W],F,oe,re);throw new TypeError("val must be string, number or Buffer")}function y(ee,W,F,oe,re){var we=1,be=ee.length,nt=W.length;if(oe!==void 0&&(oe=String(oe).toLowerCase(),oe==="ucs2"||oe==="ucs-2"||oe==="utf16le"||oe==="utf-16le")){if(ee.length<2||W.length<2)return-1;we=2,be/=2,nt/=2,F/=2}function tt(Ce,Ue){return we===1?Ce[Ue]:Ce.readUInt16BE(Ue*we)}var Ye;if(re){var qe=-1;for(Ye=F;Ye<be;Ye++)if(tt(ee,Ye)===tt(W,qe===-1?0:Ye-qe)){if(qe===-1&&(qe=Ye),Ye-qe+1===nt)return qe*we}else qe!==-1&&(Ye-=Ye-qe),qe=-1}else for(F+nt>be&&(F=be-nt),Ye=F;Ye>=0;Ye--){for(var At=!0,ft=0;ft<nt;ft++)if(tt(ee,Ye+ft)!==tt(W,ft)){At=!1;break}if(At)return Ye}return-1}P.prototype.includes=function(W,F,oe){return this.indexOf(W,F,oe)!==-1},P.prototype.indexOf=function(W,F,oe){return w(this,W,F,oe,!0)},P.prototype.lastIndexOf=function(W,F,oe){return w(this,W,F,oe,!1)};function x(ee,W,F,oe){F=Number(F)||0;var re=ee.length-F;oe?(oe=Number(oe),oe>re&&(oe=re)):oe=re;var we=W.length;if(we%2!==0)throw new TypeError("Invalid hex string");oe>we/2&&(oe=we/2);for(var be=0;be<oe;++be){var nt=parseInt(W.substr(be*2,2),16);if(isNaN(nt))return be;ee[F+be]=nt}return be}function E(ee,W,F,oe){return je(he(W,ee.length-F),ee,F,oe)}function c(ee,W,F,oe){return je(Ge(W),ee,F,oe)}function e(ee,W,F,oe){return c(ee,W,F,oe)}function a(ee,W,F,oe){return je(at(W),ee,F,oe)}function l(ee,W,F,oe){return je(lt(W,ee.length-F),ee,F,oe)}P.prototype.write=function(W,F,oe,re){if(F===void 0)re="utf8",oe=this.length,F=0;else if(oe===void 0&&typeof F=="string")re=F,oe=this.length,F=0;else if(isFinite(F))F=F|0,isFinite(oe)?(oe=oe|0,re===void 0&&(re="utf8")):(re=oe,oe=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var we=this.length-F;if((oe===void 0||oe>we)&&(oe=we),W.length>0&&(oe<0||F<0)||F>this.length)throw new RangeError("Attempt to write outside buffer bounds");re||(re="utf8");for(var be=!1;;)switch(re){case"hex":return x(this,W,F,oe);case"utf8":case"utf-8":return E(this,W,F,oe);case"ascii":return c(this,W,F,oe);case"latin1":case"binary":return e(this,W,F,oe);case"base64":return a(this,W,F,oe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l(this,W,F,oe);default:if(be)throw new TypeError("Unknown encoding: "+re);re=(""+re).toLowerCase(),be=!0}},P.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function g(ee,W,F){return W===0&&F===ee.length?V.fromByteArray(ee):V.fromByteArray(ee.slice(W,F))}function p(ee,W,F){F=Math.min(ee.length,F);for(var oe=[],re=W;re<F;){var we=ee[re],be=null,nt=we>239?4:we>223?3:we>191?2:1;if(re+nt<=F){var tt,Ye,qe,At;switch(nt){case 1:we<128&&(be=we);break;case 2:tt=ee[re+1],(tt&192)===128&&(At=(we&31)<<6|tt&63,At>127&&(be=At));break;case 3:tt=ee[re+1],Ye=ee[re+2],(tt&192)===128&&(Ye&192)===128&&(At=(we&15)<<12|(tt&63)<<6|Ye&63,At>2047&&(At<55296||At>57343)&&(be=At));break;case 4:tt=ee[re+1],Ye=ee[re+2],qe=ee[re+3],(tt&192)===128&&(Ye&192)===128&&(qe&192)===128&&(At=(we&15)<<18|(tt&63)<<12|(Ye&63)<<6|qe&63,At>65535&&At<1114112&&(be=At))}}be===null?(be=65533,nt=1):be>65535&&(be-=65536,oe.push(be>>>10&1023|55296),be=56320|be&1023),oe.push(be),re+=nt}return R(oe)}var f=4096;function R(ee){var W=ee.length;if(W<=f)return String.fromCharCode.apply(String,ee);for(var F="",oe=0;oe<W;)F+=String.fromCharCode.apply(String,ee.slice(oe,oe+=f));return F}function U(ee,W,F){var oe="";F=Math.min(ee.length,F);for(var re=W;re<F;++re)oe+=String.fromCharCode(ee[re]&127);return oe}function Q(ee,W,F){var oe="";F=Math.min(ee.length,F);for(var re=W;re<F;++re)oe+=String.fromCharCode(ee[re]);return oe}function j(ee,W,F){var oe=ee.length;(!W||W<0)&&(W=0),(!F||F<0||F>oe)&&(F=oe);for(var re="",we=W;we<F;++we)re+=Ee(ee[we]);return re}function J(ee,W,F){for(var oe=ee.slice(W,F),re="",we=0;we<oe.length;we+=2)re+=String.fromCharCode(oe[we]+oe[we+1]*256);return re}P.prototype.slice=function(W,F){var oe=this.length;W=~~W,F=F===void 0?oe:~~F,W<0?(W+=oe,W<0&&(W=0)):W>oe&&(W=oe),F<0?(F+=oe,F<0&&(F=0)):F>oe&&(F=oe),F<W&&(F=W);var re;if(P.TYPED_ARRAY_SUPPORT)re=this.subarray(W,F),re.__proto__=P.prototype;else{var we=F-W;re=new P(we,void 0);for(var be=0;be<we;++be)re[be]=this[be+W]}return re};function k(ee,W,F){if(ee%1!==0||ee<0)throw new RangeError("offset is not uint");if(ee+W>F)throw new RangeError("Trying to access beyond buffer length")}P.prototype.readUIntLE=function(W,F,oe){W=W|0,F=F|0,oe||k(W,F,this.length);for(var re=this[W],we=1,be=0;++be<F&&(we*=256);)re+=this[W+be]*we;return re},P.prototype.readUIntBE=function(W,F,oe){W=W|0,F=F|0,oe||k(W,F,this.length);for(var re=this[W+--F],we=1;F>0&&(we*=256);)re+=this[W+--F]*we;return re},P.prototype.readUInt8=function(W,F){return F||k(W,1,this.length),this[W]},P.prototype.readUInt16LE=function(W,F){return F||k(W,2,this.length),this[W]|this[W+1]<<8},P.prototype.readUInt16BE=function(W,F){return F||k(W,2,this.length),this[W]<<8|this[W+1]},P.prototype.readUInt32LE=function(W,F){return F||k(W,4,this.length),(this[W]|this[W+1]<<8|this[W+2]<<16)+this[W+3]*16777216},P.prototype.readUInt32BE=function(W,F){return F||k(W,4,this.length),this[W]*16777216+(this[W+1]<<16|this[W+2]<<8|this[W+3])},P.prototype.readIntLE=function(W,F,oe){W=W|0,F=F|0,oe||k(W,F,this.length);for(var re=this[W],we=1,be=0;++be<F&&(we*=256);)re+=this[W+be]*we;return we*=128,re>=we&&(re-=Math.pow(2,8*F)),re},P.prototype.readIntBE=function(W,F,oe){W=W|0,F=F|0,oe||k(W,F,this.length);for(var re=F,we=1,be=this[W+--re];re>0&&(we*=256);)be+=this[W+--re]*we;return we*=128,be>=we&&(be-=Math.pow(2,8*F)),be},P.prototype.readInt8=function(W,F){return F||k(W,1,this.length),this[W]&128?(255-this[W]+1)*-1:this[W]},P.prototype.readInt16LE=function(W,F){F||k(W,2,this.length);var oe=this[W]|this[W+1]<<8;return oe&32768?oe|4294901760:oe},P.prototype.readInt16BE=function(W,F){F||k(W,2,this.length);var oe=this[W+1]|this[W]<<8;return oe&32768?oe|4294901760:oe},P.prototype.readInt32LE=function(W,F){return F||k(W,4,this.length),this[W]|this[W+1]<<8|this[W+2]<<16|this[W+3]<<24},P.prototype.readInt32BE=function(W,F){return F||k(W,4,this.length),this[W]<<24|this[W+1]<<16|this[W+2]<<8|this[W+3]},P.prototype.readFloatLE=function(W,F){return F||k(W,4,this.length),O.read(this,W,!0,23,4)},P.prototype.readFloatBE=function(W,F){return F||k(W,4,this.length),O.read(this,W,!1,23,4)},P.prototype.readDoubleLE=function(W,F){return F||k(W,8,this.length),O.read(this,W,!0,52,8)},P.prototype.readDoubleBE=function(W,F){return F||k(W,8,this.length),O.read(this,W,!1,52,8)};function Y(ee,W,F,oe,re,we){if(!P.isBuffer(ee))throw new TypeError('"buffer" argument must be a Buffer instance');if(W>re||W<we)throw new RangeError('"value" argument is out of bounds');if(F+oe>ee.length)throw new RangeError("Index out of range")}P.prototype.writeUIntLE=function(W,F,oe,re){if(W=+W,F=F|0,oe=oe|0,!re){var we=Math.pow(2,8*oe)-1;Y(this,W,F,oe,we,0)}var be=1,nt=0;for(this[F]=W&255;++nt<oe&&(be*=256);)this[F+nt]=W/be&255;return F+oe},P.prototype.writeUIntBE=function(W,F,oe,re){if(W=+W,F=F|0,oe=oe|0,!re){var we=Math.pow(2,8*oe)-1;Y(this,W,F,oe,we,0)}var be=oe-1,nt=1;for(this[F+be]=W&255;--be>=0&&(nt*=256);)this[F+be]=W/nt&255;return F+oe},P.prototype.writeUInt8=function(W,F,oe){return W=+W,F=F|0,oe||Y(this,W,F,1,255,0),P.TYPED_ARRAY_SUPPORT||(W=Math.floor(W)),this[F]=W&255,F+1};function ne(ee,W,F,oe){W<0&&(W=65535+W+1);for(var re=0,we=Math.min(ee.length-F,2);re<we;++re)ee[F+re]=(W&255<<8*(oe?re:1-re))>>>(oe?re:1-re)*8}P.prototype.writeUInt16LE=function(W,F,oe){return W=+W,F=F|0,oe||Y(this,W,F,2,65535,0),P.TYPED_ARRAY_SUPPORT?(this[F]=W&255,this[F+1]=W>>>8):ne(this,W,F,!0),F+2},P.prototype.writeUInt16BE=function(W,F,oe){return W=+W,F=F|0,oe||Y(this,W,F,2,65535,0),P.TYPED_ARRAY_SUPPORT?(this[F]=W>>>8,this[F+1]=W&255):ne(this,W,F,!1),F+2};function me(ee,W,F,oe){W<0&&(W=4294967295+W+1);for(var re=0,we=Math.min(ee.length-F,4);re<we;++re)ee[F+re]=W>>>(oe?re:3-re)*8&255}P.prototype.writeUInt32LE=function(W,F,oe){return W=+W,F=F|0,oe||Y(this,W,F,4,4294967295,0),P.TYPED_ARRAY_SUPPORT?(this[F+3]=W>>>24,this[F+2]=W>>>16,this[F+1]=W>>>8,this[F]=W&255):me(this,W,F,!0),F+4},P.prototype.writeUInt32BE=function(W,F,oe){return W=+W,F=F|0,oe||Y(this,W,F,4,4294967295,0),P.TYPED_ARRAY_SUPPORT?(this[F]=W>>>24,this[F+1]=W>>>16,this[F+2]=W>>>8,this[F+3]=W&255):me(this,W,F,!1),F+4},P.prototype.writeIntLE=function(W,F,oe,re){if(W=+W,F=F|0,!re){var we=Math.pow(2,8*oe-1);Y(this,W,F,oe,we-1,-we)}var be=0,nt=1,tt=0;for(this[F]=W&255;++be<oe&&(nt*=256);)W<0&&tt===0&&this[F+be-1]!==0&&(tt=1),this[F+be]=(W/nt>>0)-tt&255;return F+oe},P.prototype.writeIntBE=function(W,F,oe,re){if(W=+W,F=F|0,!re){var we=Math.pow(2,8*oe-1);Y(this,W,F,oe,we-1,-we)}var be=oe-1,nt=1,tt=0;for(this[F+be]=W&255;--be>=0&&(nt*=256);)W<0&&tt===0&&this[F+be+1]!==0&&(tt=1),this[F+be]=(W/nt>>0)-tt&255;return F+oe},P.prototype.writeInt8=function(W,F,oe){return W=+W,F=F|0,oe||Y(this,W,F,1,127,-128),P.TYPED_ARRAY_SUPPORT||(W=Math.floor(W)),W<0&&(W=255+W+1),this[F]=W&255,F+1},P.prototype.writeInt16LE=function(W,F,oe){return W=+W,F=F|0,oe||Y(this,W,F,2,32767,-32768),P.TYPED_ARRAY_SUPPORT?(this[F]=W&255,this[F+1]=W>>>8):ne(this,W,F,!0),F+2},P.prototype.writeInt16BE=function(W,F,oe){return W=+W,F=F|0,oe||Y(this,W,F,2,32767,-32768),P.TYPED_ARRAY_SUPPORT?(this[F]=W>>>8,this[F+1]=W&255):ne(this,W,F,!1),F+2},P.prototype.writeInt32LE=function(W,F,oe){return W=+W,F=F|0,oe||Y(this,W,F,4,2147483647,-2147483648),P.TYPED_ARRAY_SUPPORT?(this[F]=W&255,this[F+1]=W>>>8,this[F+2]=W>>>16,this[F+3]=W>>>24):me(this,W,F,!0),F+4},P.prototype.writeInt32BE=function(W,F,oe){return W=+W,F=F|0,oe||Y(this,W,F,4,2147483647,-2147483648),W<0&&(W=4294967295+W+1),P.TYPED_ARRAY_SUPPORT?(this[F]=W>>>24,this[F+1]=W>>>16,this[F+2]=W>>>8,this[F+3]=W&255):me(this,W,F,!1),F+4};function _e(ee,W,F,oe,re,we){if(F+oe>ee.length)throw new RangeError("Index out of range");if(F<0)throw new RangeError("Index out of range")}function Oe(ee,W,F,oe,re){return re||_e(ee,W,F,4,34028234663852886e22,-34028234663852886e22),O.write(ee,W,F,oe,23,4),F+4}P.prototype.writeFloatLE=function(W,F,oe){return Oe(this,W,F,!0,oe)},P.prototype.writeFloatBE=function(W,F,oe){return Oe(this,W,F,!1,oe)};function xe(ee,W,F,oe,re){return re||_e(ee,W,F,8,17976931348623157e292,-17976931348623157e292),O.write(ee,W,F,oe,52,8),F+8}P.prototype.writeDoubleLE=function(W,F,oe){return xe(this,W,F,!0,oe)},P.prototype.writeDoubleBE=function(W,F,oe){return xe(this,W,F,!1,oe)},P.prototype.copy=function(W,F,oe,re){if(oe||(oe=0),!re&&re!==0&&(re=this.length),F>=W.length&&(F=W.length),F||(F=0),re>0&&re<oe&&(re=oe),re===oe)return 0;if(W.length===0||this.length===0)return 0;if(F<0)throw new RangeError("targetStart out of bounds");if(oe<0||oe>=this.length)throw new RangeError("sourceStart out of bounds");if(re<0)throw new RangeError("sourceEnd out of bounds");re>this.length&&(re=this.length),W.length-F<re-oe&&(re=W.length-F+oe);var we=re-oe,be;if(this===W&&oe<F&&F<re)for(be=we-1;be>=0;--be)W[be+F]=this[be+oe];else if(we<1e3||!P.TYPED_ARRAY_SUPPORT)for(be=0;be<we;++be)W[be+F]=this[be+oe];else Uint8Array.prototype.set.call(W,this.subarray(oe,oe+we),F);return we},P.prototype.fill=function(W,F,oe,re){if(typeof W=="string"){if(typeof F=="string"?(re=F,F=0,oe=this.length):typeof oe=="string"&&(re=oe,oe=this.length),W.length===1){var we=W.charCodeAt(0);we<256&&(W=we)}if(re!==void 0&&typeof re!="string")throw new TypeError("encoding must be a string");if(typeof re=="string"&&!P.isEncoding(re))throw new TypeError("Unknown encoding: "+re)}else typeof W=="number"&&(W=W&255);if(F<0||this.length<F||this.length<oe)throw new RangeError("Out of range index");if(oe<=F)return this;F=F>>>0,oe=oe===void 0?this.length:oe>>>0,W||(W=0);var be;if(typeof W=="number")for(be=F;be<oe;++be)this[be]=W;else{var nt=P.isBuffer(W)?W:he(new P(W,re).toString()),tt=nt.length;for(be=0;be<oe-F;++be)this[be+F]=nt[be%tt]}return this};var Se=/[^+\/0-9A-Za-z-_]/g;function Fe(ee){if(ee=Pe(ee).replace(Se,""),ee.length<2)return"";for(;ee.length%4!==0;)ee=ee+"=";return ee}function Pe(ee){return ee.trim?ee.trim():ee.replace(/^\s+|\s+$/g,"")}function Ee(ee){return ee<16?"0"+ee.toString(16):ee.toString(16)}function he(ee,W){W=W||Infinity;for(var F,oe=ee.length,re=null,we=[],be=0;be<oe;++be){if(F=ee.charCodeAt(be),F>55295&&F<57344){if(!re){if(F>56319){(W-=3)>-1&&we.push(239,191,189);continue}else if(be+1===oe){(W-=3)>-1&&we.push(239,191,189);continue}re=F;continue}if(F<56320){(W-=3)>-1&&we.push(239,191,189),re=F;continue}F=(re-55296<<10|F-56320)+65536}else re&&((W-=3)>-1&&we.push(239,191,189));if(re=null,F<128){if((W-=1)<0)break;we.push(F)}else if(F<2048){if((W-=2)<0)break;we.push(F>>6|192,F&63|128)}else if(F<65536){if((W-=3)<0)break;we.push(F>>12|224,F>>6&63|128,F&63|128)}else if(F<1114112){if((W-=4)<0)break;we.push(F>>18|240,F>>12&63|128,F>>6&63|128,F&63|128)}else throw new Error("Invalid code point")}return we}function Ge(ee){for(var W=[],F=0;F<ee.length;++F)W.push(ee.charCodeAt(F)&255);return W}function lt(ee,W){for(var F,oe,re,we=[],be=0;be<ee.length&&!((W-=2)<0);++be)F=ee.charCodeAt(be),oe=F>>8,re=F%256,we.push(re),we.push(oe);return we}function at(ee){return V.toByteArray(Fe(ee))}function je(ee,W,F,oe){for(var re=0;re<oe&&!(re+F>=W.length||re>=ee.length);++re)W[re+F]=ee[re];return re}function it(ee){return ee!==ee}}).call(this,q("IyRk"))},IBYe:function(vt,$e,q){"use strict";function ve(V){return null}$e.a=ve},J66h:function(vt,$e,q){(function(ve){var V,O;(function(z,D){vt.exports=D(z)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof ve!="undefined"?ve:this,function(z){"use strict";z=z||{};var D=z.Base64,I="2.6.4",G="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",P=function(f){for(var R={},U=0,Q=f.length;U<Q;U++)R[f.charAt(U)]=U;return R}(G),L=String.fromCharCode,S=function(f){if(f.length<2){var R=f.charCodeAt(0);return R<128?f:R<2048?L(192|R>>>6)+L(128|R&63):L(224|R>>>12&15)+L(128|R>>>6&63)+L(128|R&63)}else{var R=65536+(f.charCodeAt(0)-55296)*1024+(f.charCodeAt(1)-56320);return L(240|R>>>18&7)+L(128|R>>>12&63)+L(128|R>>>6&63)+L(128|R&63)}},_=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,b=function(f){return f.replace(_,S)},u=function(f){var R=[0,2,1][f.length%3],U=f.charCodeAt(0)<<16|(f.length>1?f.charCodeAt(1):0)<<8|(f.length>2?f.charCodeAt(2):0),Q=[G.charAt(U>>>18),G.charAt(U>>>12&63),R>=2?"=":G.charAt(U>>>6&63),R>=1?"=":G.charAt(U&63)];return Q.join("")},o=z.btoa&&typeof z.btoa=="function"?function(f){return z.btoa(f)}:function(f){if(f.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return f.replace(/[\s\S]{1,3}/g,u)},r=function(f){return o(b(String(f)))},A=function(f){return f.replace(/[+\/]/g,function(R){return R=="+"?"-":"_"}).replace(/=/g,"")},s=function(f,R){return R?A(r(f)):r(f)},t=function(f){return s(f,!0)},n;z.Uint8Array&&(n=function(f,R){for(var U="",Q=0,j=f.length;Q<j;Q+=3){var J=f[Q],k=f[Q+1],Y=f[Q+2],ne=J<<16|k<<8|Y;U+=G.charAt(ne>>>18)+G.charAt(ne>>>12&63)+(typeof k!="undefined"?G.charAt(ne>>>6&63):"=")+(typeof Y!="undefined"?G.charAt(ne&63):"=")}return R?A(U):U});var i=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,B=function(f){switch(f.length){case 4:var R=(7&f.charCodeAt(0))<<18|(63&f.charCodeAt(1))<<12|(63&f.charCodeAt(2))<<6|63&f.charCodeAt(3),U=R-65536;return L((U>>>10)+55296)+L((U&1023)+56320);case 3:return L((15&f.charCodeAt(0))<<12|(63&f.charCodeAt(1))<<6|63&f.charCodeAt(2));default:return L((31&f.charCodeAt(0))<<6|63&f.charCodeAt(1))}},w=function(f){return f.replace(i,B)},y=function(f){var R=f.length,U=R%4,Q=(R>0?P[f.charAt(0)]<<18:0)|(R>1?P[f.charAt(1)]<<12:0)|(R>2?P[f.charAt(2)]<<6:0)|(R>3?P[f.charAt(3)]:0),j=[L(Q>>>16),L(Q>>>8&255),L(Q&255)];return j.length-=[0,0,2,1][U],j.join("")},x=z.atob&&typeof z.atob=="function"?function(f){return z.atob(f)}:function(f){return f.replace(/\S{1,4}/g,y)},E=function(f){return x(String(f).replace(/[^A-Za-z0-9\+\/]/g,""))},c=function(f){return w(x(f))},e=function(f){return String(f).replace(/[-_]/g,function(R){return R=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},a=function(f){return c(e(f))},l;z.Uint8Array&&(l=function(f){return Uint8Array.from(E(e(f)),function(R){return R.charCodeAt(0)})});var g=function(){var f=z.Base64;return z.Base64=D,f};if(z.Base64={VERSION:I,atob:E,btoa:o,fromBase64:a,toBase64:s,utob:b,encode:s,encodeURI:t,btou:w,decode:a,noConflict:g,fromUint8Array:n,toUint8Array:l},typeof Object.defineProperty=="function"){var p=function(f){return{value:f,enumerable:!1,writable:!0,configurable:!0}};z.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",p(function(){return a(this)})),Object.defineProperty(String.prototype,"toBase64",p(function(f){return s(this,f)})),Object.defineProperty(String.prototype,"toBase64URI",p(function(){return s(this,!0)}))}}return z.Meteor&&(Base64=z.Base64),vt.exports?vt.exports.Base64=z.Base64:!(V=[],O=function(){return z.Base64}.apply($e,V),O!==void 0&&(vt.exports=O)),{Base64:z.Base64}})}).call(this,q("IyRk"))},LdHM:function(vt,$e,q){"use strict";q.d($e,"b",function(){return i}),q.d($e,"a",function(){return w});var ve=q("1OyB"),V=q("vuIU"),O=q("Ji7U"),z=q("LK+K"),D=q("q1tI"),I=q("rePB"),G=q("Ff2n"),P=q("ODXe"),L=q("4IlW"),S=q("bX4T"),_=q("YrtM"),b=q("TSYQ"),u=q.n(b),o=q("+nKL"),r=q("8OUc"),A=function(Y,ne){var me=Y.prefixCls,_e=Y.id,Oe=Y.flattenOptions,xe=Y.childrenAsData,Se=Y.values,Fe=Y.searchValue,Pe=Y.multiple,Ee=Y.defaultActiveFirstOption,he=Y.height,Ge=Y.itemHeight,lt=Y.notFoundContent,at=Y.open,je=Y.menuItemSelectedIcon,it=Y.virtual,ee=Y.onSelect,W=Y.onToggleOpen,F=Y.onActiveValue,oe=Y.onScroll,re=Y.onMouseEnter,we="".concat(me,"-item"),be=Object(_.a)(function(){return Oe},[at,Oe],function(Me,ye){return ye[0]&&Me[1]!==ye[1]}),nt=D.useRef(null),tt=function(ye){ye.preventDefault()},Ye=function(ye){nt.current&&nt.current.scrollTo({index:ye})},qe=function(ye){for(var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ue=be.length,Z=0;Z<ue;Z+=1){var te=(ye+Z*le+ue)%ue,Ae=be[te],de=Ae.group,Be=Ae.data;if(!de&&!Be.disabled)return te}return-1},At=D.useState(function(){return qe(0)}),ft=Object(P.a)(At,2),Ce=ft[0],Ue=ft[1],Qe=function(ye){Ue(ye);var le=be[ye];if(!le){F(null,-1);return}F(le.data.value,ye)};D.useEffect(function(){Qe(Ee!==!1?qe(0):-1)},[be.length,Fe]),D.useEffect(function(){var Me=setTimeout(function(){if(!Pe&&at&&Se.size===1){var ye=Array.from(Se)[0],le=be.findIndex(function(ue){var Z=ue.data;return Z.value===ye});Qe(le),Ye(le)}});return function(){return clearTimeout(Me)}},[at]);var He=function(ye){ye!==void 0&&ee(ye,{selected:!Se.has(ye)}),Pe||W(!1)};if(D.useImperativeHandle(ne,function(){return{onKeyDown:function(ye){var le=ye.which;switch(le){case L.a.UP:case L.a.DOWN:{var ue=0;if(le===L.a.UP?ue=-1:le===L.a.DOWN&&(ue=1),ue!==0){var Z=qe(Ce+ue,ue);Ye(Z),Qe(Z)}break}case L.a.ENTER:{var te=be[Ce];te&&!te.data.disabled?He(te.data.value):He(void 0),at&&ye.preventDefault();break}case L.a.ESC:W(!1)}},onKeyUp:function(){},scrollTo:function(ye){Ye(ye)}}}),be.length===0)return D.createElement("div",{role:"listbox",id:"".concat(_e,"_list"),className:"".concat(we,"-empty"),onMouseDown:tt},lt);function Ie(Me){var ye=be[Me];if(!ye)return null;var le=ye.data||{},ue=le.value,Z=le.label,te=le.children,Ae=Object(S.a)(le,!0),de=xe?te:Z;return ye?D.createElement("div",Object.assign({"aria-label":typeof de=="string"?de:null},Ae,{key:Me,role:"option",id:"".concat(_e,"_list_").concat(Me),"aria-selected":Se.has(ue)}),ue):null}return D.createElement(D.Fragment,null,D.createElement("div",{role:"listbox",id:"".concat(_e,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ie(Ce-1),Ie(Ce),Ie(Ce+1)),D.createElement(o.a,{itemKey:"key",ref:nt,data:be,height:he,itemHeight:Ge,fullHeight:!1,onMouseDown:tt,onScroll:oe,virtual:it,onMouseEnter:re},function(Me,ye){var le,ue=Me.group,Z=Me.groupOption,te=Me.data,Ae=te.label,de=te.key;if(ue)return D.createElement("div",{className:u()(we,"".concat(we,"-group"))},Ae!==void 0?Ae:de);var Be=te.disabled,Ne=te.value,Xe=te.title,ct=te.children,ut=te.style,st=te.className,Nt=Object(G.a)(te,["disabled","value","title","children","style","className"]),pt=Se.has(Ne),et="".concat(we,"-option"),er=u()(we,et,st,(le={},Object(I.a)(le,"".concat(et,"-grouped"),Z),Object(I.a)(le,"".concat(et,"-active"),Ce===ye&&!Be),Object(I.a)(le,"".concat(et,"-disabled"),Be),Object(I.a)(le,"".concat(et,"-selected"),pt),le)),qt=xe?ct:Ae,Ot=!je||typeof je=="function"||pt;return D.createElement("div",Object.assign({},Nt,{"aria-selected":pt,className:er,title:Xe,onMouseMove:function(){if(Ce===ye||Be)return;Qe(ye)},onClick:function(){Be||He(Ne)},style:ut}),D.createElement("div",{className:"".concat(et,"-content")},qt||Ne),D.isValidElement(je)||pt,Ot&&D.createElement(r.a,{className:"".concat(we,"-option-state"),customizeIcon:je,customizeIconProps:{isSelected:pt}},pt?"\u2713":null))}))},s=D.forwardRef(A);s.displayName="OptionList";var t=s,n=function(){return null};n.isSelectOption=!0;var i=n,B=function(){return null};B.isSelectOptGroup=!0;var w=B,y=q("VTBJ"),x=q("Zm9Q");function E(k){var Y=k.key,ne=k.props,me=ne.children,_e=ne.value,Oe=Object(G.a)(ne,["children","value"]);return Object(y.a)({key:Y,value:_e!==void 0?_e:Y,children:me},Oe)}function c(k){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(x.a)(k).map(function(ne,me){if(!D.isValidElement(ne)||!ne.type)return null;var _e=ne.type.isSelectOptGroup,Oe=ne.key,xe=ne.props,Se=xe.children,Fe=Object(G.a)(xe,["children"]);return Y||!_e?E(ne):Object(y.a)(Object(y.a)({key:"__RC_SELECT_GRP__".concat(Oe===null?me:Oe,"__"),label:Oe},Fe),{},{options:c(Se)})}).filter(function(ne){return ne})}var e=q("2Qr1"),a=q("qNPg"),l=q("U8pU"),g=q("Kwbf"),p=q("WKfj");function f(k){var Y=k.mode,ne=k.options,me=k.children,_e=k.backfill,Oe=k.allowClear,xe=k.placeholder,Se=k.getInputElement,Fe=k.showSearch,Pe=k.onSearch,Ee=k.defaultOpen,he=k.autoFocus,Ge=k.labelInValue,lt=k.value,at=k.inputValue,je=k.optionLabelProp,it=Y==="multiple"||Y==="tags",ee=Fe!==void 0?Fe:it||Y==="combobox",W=ne||c(me);if(Object(g.a)(Y!=="tags"||W.every(function(we){return!we.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Y==="tags"||Y==="combobox"){var F=W.some(function(we){return we.options?we.options.some(function(be){return typeof("value"in be?be.value:be.key)=="number"}):typeof("value"in we?we.value:we.key)=="number"});Object(g.a)(!F,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(g.a)(Y!=="combobox"||!je,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(g.a)(Y==="combobox"||!_e,"`backfill` only works with `combobox` mode."),Object(g.a)(Y==="combobox"||!Se,"`getInputElement` only work with `combobox` mode."),Object(g.b)(Y!=="combobox"||!Se||!Oe||!xe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Pe&&!ee&&Y!=="combobox"&&Y!=="tags"&&Object(g.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(g.b)(!Ee||he,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),lt!=null){var oe=Object(p.d)(lt);Object(g.a)(!Ge||oe.every(function(we){return Object(l.a)(we)==="object"&&("key"in we||"value"in we)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(g.a)(!it||Array.isArray(lt),"`value` should be array when `mode` is `multiple` or `tags`")}if(me){var re=null;Object(x.a)(me).some(function(we){if(!D.isValidElement(we)||!we.type)return!1;var be=we.type;if(be.isSelectOption)return!1;if(be.isSelectOptGroup){var nt=Object(x.a)(we.props.children).every(function(tt){return!D.isValidElement(tt)||!we.type||tt.type.isSelectOption?!0:(re=tt.type,!1)});return!nt}return re=be,!0}),re&&Object(g.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(re.displayName||re.name||re,"`.")),Object(g.a)(at===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var R=f,U=Object(a.a)({prefixCls:"rc-select",components:{optionList:t},convertChildrenToData:c,flattenOptions:e.d,getLabeledValue:e.e,filterOptions:e.b,isValueDisabled:e.g,findValueOption:e.c,warningProps:R,fillOptionsWithMissingValue:e.a}),Q=function(k){Object(O.a)(ne,k);var Y=Object(z.a)(ne);function ne(){var me;return Object(ve.a)(this,ne),me=Y.apply(this,arguments),me.selectRef=D.createRef(),me.focus=function(){me.selectRef.current.focus()},me.blur=function(){me.selectRef.current.blur()},me}return Object(V.a)(ne,[{key:"render",value:function(){return D.createElement(U,Object.assign({ref:this.selectRef},this.props))}}]),ne}(D.Component);Q.Option=i,Q.OptGroup=w;var j=Q,J=$e.c=j},NKYn:function(vt,$e,q){"use strict";q.d($e,"a",function(){return L});var ve=q("14J3"),V=q("BMrR"),O=q("jCWc"),z=q("kPKH"),D=q("tJVT"),I=q("q1tI"),G=q.n(I),P=q("9Bee"),L=function(_){var b=_.data,u=Object(I.useState)(!1),o=Object(D.a)(u,2),r=o[0],A=o[1],s=function(){var n,i;switch(b.question_type){case 3:return G.a.createElement("aside",{className:"mt20"},G.a.createElement("span",{style:{cursor:"pointer"},className:"font14 c-blue current",onClick:function(){A(!r)}},r?"\u9690\u85CF\u53C2\u8003\u7B54\u6848":"\u67E5\u770B\u53C2\u8003\u7B54\u6848"),r&&G.a.createElement("div",null,b==null||((n=b.standard_answer)===null||n===void 0)?void 0:n.map(function(B,w){var y;return G.a.createElement(V.a,{style:{alignItems:"baseline"},className:"mr20"},G.a.createElement(z.a,{flex:"50px"},G.a.createElement("span",{className:"mt10"},"\u586B\u7A7A",B.choice_id,":")),G.a.createElement(z.a,{flex:1},B==null||((y=B.answer_text)===null||y===void 0)?void 0:y.map(function(x,E){return G.a.createElement("div",null,x)})))})));case 4:return G.a.createElement("aside",{className:"mt20"},G.a.createElement("span",{style:{cursor:"pointer"},className:"font14 c-blue current",onClick:function(){A(!r)}},r?"\u9690\u85CF\u53C2\u8003\u7B54\u6848":"\u67E5\u770B\u53C2\u8003\u7B54\u6848"),r&&G.a.createElement("div",null,G.a.createElement(P.a,{value:b==null||((i=b.standard_answer)===null||i===void 0)?void 0:i.join(" ")})))}};return G.a.createElement("section",null,s())}},NvD2:function(vt,$e,q){"use strict";q.d($e,"a",function(){return I});var ve=q("Kwbf");function V(G,P){var L=new Set;return G.forEach(function(S){P.has(S)||L.add(S)}),L}function O(G){var P=G||{},L=P.disabled,S=P.disableCheckbox,_=P.checkable;return!!(L||S)||_===!1}function z(G,P,L,S){for(var _=new Set(G),b=new Set,u=0;u<=L;u+=1){var o=P.get(u)||new Set;o.forEach(function(t){var n=t.key,i=t.node,B=t.children,w=B===void 0?[]:B;_.has(n)&&!S(i)&&w.filter(function(y){return!S(y.node)}).forEach(function(y){_.add(y.key)})})}for(var r=new Set,A=L;A>=0;A-=1){var s=P.get(A)||new Set;s.forEach(function(t){var n=t.parent,i=t.node;if(S(i)||!t.parent||r.has(t.parent.key))return;if(S(t.parent.node)){r.add(n.key);return}var B=!0,w=!1;(n.children||[]).filter(function(y){return!S(y.node)}).forEach(function(y){var x=y.key,E=_.has(x);B&&!E&&(B=!1),!w&&(E||b.has(x))&&(w=!0)}),B&&_.add(n.key),w&&b.add(n.key),r.add(n.key)})}return{checkedKeys:Array.from(_),halfCheckedKeys:Array.from(V(b,_))}}function D(G,P,L,S,_){for(var b=new Set(G),u=new Set(P),o=0;o<=S;o+=1){var r=L.get(o)||new Set;r.forEach(function(n){var i=n.key,B=n.node,w=n.children,y=w===void 0?[]:w;!b.has(i)&&!u.has(i)&&!_(B)&&y.filter(function(x){return!_(x.node)}).forEach(function(x){b.delete(x.key)})})}u=new Set;for(var A=new Set,s=S;s>=0;s-=1){var t=L.get(s)||new Set;t.forEach(function(n){var i=n.parent,B=n.node;if(_(B)||!n.parent||A.has(n.parent.key))return;if(_(n.parent.node)){A.add(i.key);return}var w=!0,y=!1;(i.children||[]).filter(function(x){return!_(x.node)}).forEach(function(x){var E=x.key,c=b.has(E);w&&!c&&(w=!1),!y&&(c||u.has(E))&&(y=!0)}),w||b.delete(i.key),y&&u.add(i.key),A.add(i.key)})}return{checkedKeys:Array.from(b),halfCheckedKeys:Array.from(V(u,b))}}function I(G,P,L,S){var _=[],b;S?b=S:b=O;var u=new Set(G.filter(function(s){var t=!!L[s];return t||_.push(s),t})),o=new Map,r=0;Object.keys(L).forEach(function(s){var t=L[s],n=t.level,i=o.get(n);i||(i=new Set,o.set(n,i)),i.add(t),r=Math.max(r,n)}),Object(ve.a)(!_.length,"Tree missing follow keys: ".concat(_.slice(0,100).map(function(s){return"'".concat(s,"'")}).join(", ")));var A;return P===!0?A=z(u,o,r,b):A=D(u,P.halfCheckedKeys,o,r,b),A}},OZM5:function(vt,$e,q){"use strict";q.d($e,"b",function(){return S}),q.d($e,"a",function(){return _}),q.d($e,"k",function(){return b}),q.d($e,"h",function(){return u}),q.d($e,"i",function(){return o}),q.d($e,"g",function(){return r}),q.d($e,"c",function(){return A}),q.d($e,"d",function(){return s}),q.d($e,"j",function(){return i}),q.d($e,"e",function(){return B}),q.d($e,"f",function(){return w});var ve=q("KQm4"),V=q("U8pU"),O=q("Ff2n"),z=q("q1tI"),D=q.n(z),I=q("Kwbf"),G=q("WaYH"),P=.25,L=2;function S(y,x){var E=y.slice(),c=E.indexOf(x);return c>=0&&E.splice(c,1),E}function _(y,x){var E=y.slice();return E.indexOf(x)===-1&&E.push(x),E}function b(y){return y.split("-")}function u(y,x){return"".concat(y,"-").concat(x)}function o(y){return y&&y.type&&y.type.isTreeNode}function r(y,x){var E=[y],c=x[y];function e(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];a.forEach(function(l){var g=l.key,p=l.children;E.push(g),e(p)})}return e(c.children),E}function A(y,x){var E=y.clientY,c=x.selectHandle.getBoundingClientRect(),e=c.top,a=c.bottom,l=c.height,g=Math.max(l*P,L);return E<=e+g?-1:E>=a-g?1:0}function s(y,x){if(!y)return;var E=x.multiple;return E?y.slice():y.length?[y[0]]:y}var t=function(x){return x};function n(y,x){if(!y)return[];var E=x||{},c=E.processProps,e=c===void 0?t:c,a=Array.isArray(y)?y:[y];return a.map(function(l){var g=l.children,p=Object(O.a)(l,["children"]),f=n(g,x);return D.a.createElement(G.a,Object.assign({},e(p)),f)})}function i(y){if(!y)return null;var x;if(Array.isArray(y))x={checkedKeys:y,halfCheckedKeys:void 0};else if(Object(V.a)(y)==="object")x={checkedKeys:y.checked||void 0,halfCheckedKeys:y.halfChecked||void 0};else return Object(I.a)(!1,"`checkedKeys` is not an array or an object"),null;return x}function B(y,x){var E=new Set;function c(e){if(E.has(e))return;var a=x[e];if(!a)return;E.add(e);var l=a.parent,g=a.node;if(g.disabled)return;l&&c(l.key)}return(y||[]).forEach(function(e){c(e)}),Object(ve.a)(E)}function w(y){var x={};return Object.keys(y).forEach(function(E){(E.startsWith("data-")||E.startsWith("aria-"))&&(x[E]=y[E])}),x}},"SA+Z":function(vt,$e,q){var ve=q("wTVA"),V=q("EbDI"),O=q("ZhPi"),z=q("wkBT");function D(I){return ve(I)||V(I)||O(I)||z()}vt.exports=D,vt.exports.__esModule=!0,vt.exports.default=vt.exports},SJMd:function(vt,$e){/**
* @license
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var q,ve,V,O=!1,z,D;window.PR_SHOULD_USE_CONTINUATION=!0;var I,G;(function(){var P=window,L=["break,continue,do,else,for,if,return,while"],S=[L,"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"],_=[S,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],b=[_,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],u=[_,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],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"],r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",A=[_,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",t=[L,"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"],n=[L,"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"],i=[L,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],B=[b,o,u,A,s,t,n,i],w=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,y="str",x="kwd",E="com",c="typ",e="lit",a="pun",l="pln",g="tag",p="dec",f="src",R="atn",U="atv",Q="nocode",j="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function J(ee){for(var W=0,F=!1,oe=!1,re=0,we=ee.length;re<we;++re){var be=ee[re];if(be.ignoreCase)oe=!0;else if(/[a-z]/i.test(be.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){F=!0,oe=!1;break}}var nt={b:8,t:9,n:10,v:11,f:12,r:13};function tt(Ce){var Ue=Ce.charCodeAt(0);if(Ue!==92)return Ue;var Qe=Ce.charAt(1);return Ue=nt[Qe],Ue||("0"<=Qe&&Qe<="7"?parseInt(Ce.substring(1),8):Qe==="u"||Qe==="x"?parseInt(Ce.substring(2),16):Ce.charCodeAt(1))}function Ye(Ce){if(Ce<32)return(Ce<16?"\\x0":"\\x")+Ce.toString(16);var Ue=String.fromCharCode(Ce);return Ue==="\\"||Ue==="-"||Ue==="]"||Ue==="^"?"\\"+Ue:Ue}function qe(Ce){var Ue=Ce.substring(1,Ce.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")),Qe=[],He=Ue[0]==="^",Ie=["["];He&&Ie.push("^");for(var Me=He?1:0,ye=Ue.length;Me<ye;++Me){var le=Ue[Me];if(/\\[bdsw]/i.test(le))Ie.push(le);else{var ue=tt(le),Z;Me+2<ye&&Ue[Me+1]==="-"?(Z=tt(Ue[Me+2]),Me+=2):Z=ue,Qe.push([ue,Z]),Z<65||ue>122||(Z<65||ue>90||Qe.push([Math.max(65,ue)|32,Math.min(Z,90)|32]),Z<97||ue>122||Qe.push([Math.max(97,ue)&~32,Math.min(Z,122)&~32]))}}Qe.sort(function(Be,Ne){return Be[0]-Ne[0]||Ne[1]-Be[1]});for(var te=[],Ae=[],Me=0;Me<Qe.length;++Me){var de=Qe[Me];de[0]<=Ae[1]+1?Ae[1]=Math.max(Ae[1],de[1]):te.push(Ae=de)}for(var Me=0;Me<te.length;++Me){var de=te[Me];Ie.push(Ye(de[0])),de[1]>de[0]&&(de[1]+1>de[0]&&Ie.push("-"),Ie.push(Ye(de[1])))}return Ie.push("]"),Ie.join("")}function At(Ce){for(var Ue=Ce.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")),Qe=Ue.length,He=[],Ie=0,Me=0;Ie<Qe;++Ie){var ye=Ue[Ie];if(ye==="(")++Me;else if(ye.charAt(0)==="\\"){var le=+ye.substring(1);le&&(le<=Me?He[le]=-1:Ue[Ie]=Ye(le))}}for(var Ie=1;Ie<He.length;++Ie)He[Ie]===-1&&(He[Ie]=++W);for(var Ie=0,Me=0;Ie<Qe;++Ie){var ye=Ue[Ie];if(ye==="(")++Me,He[Me]||(Ue[Ie]="(?:");else if(ye.charAt(0)==="\\"){var le=+ye.substring(1);le&&le<=Me&&(Ue[Ie]="\\"+He[le])}}for(var Ie=0;Ie<Qe;++Ie)Ue[Ie]==="^"&&Ue[Ie+1]!=="^"&&(Ue[Ie]="");if(Ce.ignoreCase&&F)for(var Ie=0;Ie<Qe;++Ie){var ye=Ue[Ie],ue=ye.charAt(0);ye.length>=2&&ue==="["?Ue[Ie]=qe(ye):ue!=="\\"&&(Ue[Ie]=ye.replace(/[a-zA-Z]/g,function(Ae){var de=Ae.charCodeAt(0);return"["+String.fromCharCode(de&~32,de|32)+"]"}))}return Ue.join("")}for(var ft=[],re=0,we=ee.length;re<we;++re){var be=ee[re];if(be.global||be.multiline)throw new Error(""+be);ft.push("(?:"+At(be)+")")}return new RegExp(ft.join("|"),oe?"gi":"g")}function k(ee,W){var F=/(?:^|\s)nocode(?:\s|$)/,oe=[],re=0,we=[],be=0;function nt(tt){var Ye=tt.nodeType;if(Ye==1){if(F.test(tt.className))return;for(var qe=tt.firstChild;qe;qe=qe.nextSibling)nt(qe);var At=tt.nodeName.toLowerCase();(At==="br"||At==="li")&&(oe[be]=`
`,we[be<<1]=re++,we[be++<<1|1]=tt)}else if(Ye==3||Ye==4){var ft=tt.nodeValue;ft.length&&(W?ft=ft.replace(/\r\n?/g,`
`):ft=ft.replace(/[ \t\r\n]+/g," "),oe[be]=ft,we[be<<1]=re,re+=ft.length,we[be++<<1|1]=tt)}}return nt(ee),{sourceCode:oe.join("").replace(/\n$/,""),spans:we}}function Y(ee,W,F,oe,re){if(!F)return;var we={sourceNode:ee,pre:1,langExtension:null,numberLines:null,sourceCode:F,spans:null,basePos:W,decorations:null};oe(we),re.push.apply(re,we.decorations)}var ne=/\S/;function me(ee){for(var W=void 0,F=ee.firstChild;F;F=F.nextSibling){var oe=F.nodeType;W=oe===1?W?ee:F:oe===3&&ne.test(F.nodeValue)?ee:W}return W===ee?void 0:W}function _e(ee,W){var F={},oe;(function(){for(var be=ee.concat(W),nt=[],tt={},Ye=0,qe=be.length;Ye<qe;++Ye){var At=be[Ye],ft=At[3];if(ft)for(var Ce=ft.length;--Ce>=0;)F[ft.charAt(Ce)]=At;var Ue=At[1],Qe=""+Ue;tt.hasOwnProperty(Qe)||(nt.push(Ue),tt[Qe]=null)}nt.push(/[\0-\uffff]/),oe=J(nt)})();var re=W.length,we=function(be){for(var nt=be.sourceCode,tt=be.basePos,Ye=be.sourceNode,qe=[tt,l],At=0,ft=nt.match(oe)||[],Ce={},Ue=0,Qe=ft.length;Ue<Qe;++Ue){var He=ft[Ue],Ie=Ce[He],Me=void 0,ye;if(typeof Ie=="string")ye=!1;else{var le=F[He.charAt(0)];if(le)Me=He.match(le[1]),Ie=le[0];else{for(var ue=0;ue<re;++ue)if(le=W[ue],Me=He.match(le[1]),Me){Ie=le[0];break}Me||(Ie=l)}ye=Ie.length>=5&&Ie.substring(0,5)==="lang-",ye&&!(Me&&typeof Me[1]=="string")&&(ye=!1,Ie=f),ye||(Ce[He]=Ie)}var Z=At;if(At+=He.length,!ye)qe.push(tt+Z,Ie);else{var te=Me[1],Ae=He.indexOf(te),de=Ae+te.length;Me[2]&&(de=He.length-Me[2].length,Ae=de-te.length);var Be=Ie.substring(5);Y(Ye,tt+Z,He.substring(0,Ae),we,qe),Y(Ye,tt+Z+Ae,te,he(Be,te),qe),Y(Ye,tt+Z+de,He.substring(de),we,qe)}}be.decorations=qe};return we}function Oe(ee){var W=[],F=[];ee.tripleQuotedStrings?W.push([y,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ee.multiLineStrings?W.push([y,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):W.push([y,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ee.verbatimStrings&&F.push([y,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var oe=ee.hashComments;oe&&(ee.cStyleComments?(oe>1?W.push([E,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):W.push([E,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),F.push([y,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):W.push([E,/^#[^\r\n]*/,null,"#"])),ee.cStyleComments&&(F.push([E,/^\/\/[^\r\n]*/,null]),F.push([E,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var re=ee.regexLiterals;if(re){var we=re>1?"":`
\r`,be=we?".":"[\\S\\s]",nt="/(?=[^/*"+we+"])(?:[^/\\x5B\\x5C"+we+"]|\\x5C"+be+"|\\x5B(?:[^\\x5C\\x5D"+we+"]|\\x5C"+be+")*(?:\\x5D|$))+/";F.push(["lang-regex",RegExp("^"+j+"("+nt+")")])}var tt=ee.types;tt&&F.push([c,tt]);var Ye=(""+ee.keywords).replace(/^ | $/g,"");Ye.length&&F.push([x,new RegExp("^(?:"+Ye.replace(/[\s,]+/g,"|")+")\\b"),null]),W.push([l,/^\s+/,null,` \r
\xA0`]);var qe="^.[^\\s\\w.$@'\"`/\\\\]*";return ee.regexLiterals&&(qe+="(?!s*/)"),F.push([e,/^@[a-z_$][a-z_$@0-9]*/i,null],[c,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[l,/^[a-z_$][a-z_$@0-9]*/i,null],[e,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[l,/^\\[\s\S]?/,null],[a,new RegExp(qe),null]),_e(W,F)}var xe=Oe({keywords:B,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Se(ee,W,F){for(var oe=/(?:^|\s)nocode(?:\s|$)/,re=/\r\n?|\n/,we=ee.ownerDocument,be=we.createElement("li");ee.firstChild;)be.appendChild(ee.firstChild);var nt=[be];function tt(Ue){var Qe=Ue.nodeType;if(Qe==1&&!oe.test(Ue.className))if(Ue.nodeName==="br")Ye(Ue),Ue.parentNode&&Ue.parentNode.removeChild(Ue);else for(var He=Ue.firstChild;He;He=He.nextSibling)tt(He);else if((Qe==3||Qe==4)&&F){var Ie=Ue.nodeValue,Me=Ie.match(re);if(Me){var ye=Ie.substring(0,Me.index);Ue.nodeValue=ye;var le=Ie.substring(Me.index+Me[0].length);if(le){var ue=Ue.parentNode;ue.insertBefore(we.createTextNode(le),Ue.nextSibling)}Ye(Ue),ye||Ue.parentNode.removeChild(Ue)}}}function Ye(Ue){for(;!Ue.nextSibling;)if(Ue=Ue.parentNode,!Ue)return;function Qe(Me,ye){var le=ye?Me.cloneNode(!1):Me,ue=Me.parentNode;if(ue){var Z=Qe(ue,1),te=Me.nextSibling;Z.appendChild(le);for(var Ae=te;Ae;Ae=te)te=Ae.nextSibling,Z.appendChild(Ae)}return le}for(var He=Qe(Ue.nextSibling,0),Ie;(Ie=He.parentNode)&&Ie.nodeType===1;)He=Ie;nt.push(He)}for(var qe=0;qe<nt.length;++qe)tt(nt[qe]);W===(W|0)&&nt[0].setAttribute("value",W);var At=we.createElement("ol");At.className="linenums";for(var ft=Math.max(0,W-1|0)||0,qe=0,Ce=nt.length;qe<Ce;++qe)be=nt[qe],be.className="L"+(qe+ft)%10,be.firstChild||be.appendChild(we.createTextNode("\xA0")),At.appendChild(be);ee.appendChild(At)}function Fe(ee){var W=/\bMSIE\s(\d+)/.exec(navigator.userAgent);W=W&&+W[1]<=8;var F=/\n/g,oe=ee.sourceCode,re=oe.length,we=0,be=ee.spans,nt=be.length,tt=0,Ye=ee.decorations,qe=Ye.length,At=0;Ye[qe]=re;var ft,Ce;for(Ce=ft=0;Ce<qe;)Ye[Ce]!==Ye[Ce+2]?(Ye[ft++]=Ye[Ce++],Ye[ft++]=Ye[Ce++]):Ce+=2;for(qe=ft,Ce=ft=0;Ce<qe;){for(var Ue=Ye[Ce],Qe=Ye[Ce+1],He=Ce+2;He+2<=qe&&Ye[He+1]===Qe;)He+=2;Ye[ft++]=Ue,Ye[ft++]=Qe,Ce=He}qe=Ye.length=ft;var Ie=ee.sourceNode,Me="";Ie&&(Me=Ie.style.display,Ie.style.display="none");try{for(var ye=null;tt<nt;){var le=be[tt],ue=be[tt+2]||re,Z=Ye[At+2]||re,He=Math.min(ue,Z),te=be[tt+1],Ae;if(te.nodeType!==1&&(Ae=oe.substring(we,He))){W&&(Ae=Ae.replace(F,"\r")),te.nodeValue=Ae;var de=te.ownerDocument,Be=de.createElement("span");Be.className=Ye[At+1];var Ne=te.parentNode;Ne.replaceChild(Be,te),Be.appendChild(te),we<ue&&(be[tt+1]=te=de.createTextNode(oe.substring(He,ue)),Ne.insertBefore(te,Be.nextSibling))}we=He,we>=ue&&(tt+=2),we>=Z&&(At+=2)}}finally{Ie&&(Ie.style.display=Me)}}var Pe={};function Ee(ee,W){for(var F=W.length;--F>=0;){var oe=W[F];Pe.hasOwnProperty(oe)?P.console&&console.warn("cannot override language handler %s",oe):Pe[oe]=ee}}function he(ee,W){return ee&&Pe.hasOwnProperty(ee)||(ee=/^\s*</.test(W)?"default-markup":"default-code"),Pe[ee]}Ee(xe,["default-code"]),Ee(_e([],[[l,/^[^<?]+/],[p,/^<!\w[^>]*(?:>|$)/],[E,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[a,/^(?:<[%?]|[%?]>)/],["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"]),Ee(_e([[l,/^[\s]+/,null,` \r
`],[U,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[g,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[R,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[a,/^[=<>\/]+/],["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"]),Ee(_e([],[[U,/^[\s\S]+/]]),["uq.val"]),Ee(Oe({keywords:b,hashComments:!0,cStyleComments:!0,types:w}),["c","cc","cpp","cxx","cyc","m"]),Ee(Oe({keywords:"null,true,false"}),["json"]),Ee(Oe({keywords:o,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:w}),["cs"]),Ee(Oe({keywords:u,cStyleComments:!0}),["java"]),Ee(Oe({keywords:i,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),Ee(Oe({keywords:t,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),Ee(Oe({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),Ee(Oe({keywords:n,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),Ee(Oe({keywords:A,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),Ee(Oe({keywords:r,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),Ee(_e([],[[y,/^[\s\S]+/]]),["regex"]);function Ge(ee){var W=ee.langExtension;try{var F=k(ee.sourceNode,ee.pre),oe=F.sourceCode;ee.sourceCode=oe,ee.spans=F.spans,ee.basePos=0,he(W,oe)(ee),Fe(ee)}catch(re){P.console&&console.log(re&&re.stack||re)}}function lt(ee,W,F){var oe=F||!1,re=W||null,we=document.createElement("div");we.innerHTML="<pre>"+ee+"</pre>",we=we.firstChild,oe&&Se(we,oe,!0);var be={langExtension:re,numberLines:oe,sourceNode:we,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Ge(be),we.innerHTML}function at(ee,W){var F=W||document.body,oe=F.ownerDocument||document;function re(le){return F.getElementsByTagName(le)}for(var we=[re("pre"),re("code"),re("xmp")],be=[],nt=0;nt<we.length;++nt)for(var tt=0,Ye=we[nt].length;tt<Ye;++tt)be.push(we[nt][tt]);we=null;var qe=Date;qe.now||(qe={now:function(){return+new Date}});var At=0,ft=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ce=/\bprettyprint\b/,Ue=/\bprettyprinted\b/,Qe=/pre|xmp/i,He=/^code$/i,Ie=/^(?:pre|code|xmp)$/i,Me={};function ye(){for(var le=P.PR_SHOULD_USE_CONTINUATION?qe.now()+250:Infinity;At<be.length&&qe.now()<le;At++){for(var ue=be[At],Z=Me,te=ue;te=te.previousSibling;){var Ae=te.nodeType,de=(Ae===7||Ae===8)&&te.nodeValue;if(de?!/^\??prettify\b/.test(de):Ae!==3||/\S/.test(te.nodeValue))break;if(de){Z={},de.replace(/\b(\w+)=([\w:.%+-]+)/g,function(mt,yt,wt){Z[yt]=wt});break}}var Be=ue.className;if((Z!==Me||Ce.test(Be))&&!Ue.test(Be)){for(var Ne=!1,Xe=ue.parentNode;Xe;Xe=Xe.parentNode){var ct=Xe.tagName;if(Ie.test(ct)&&Xe.className&&Ce.test(Xe.className)){Ne=!0;break}}if(!Ne){ue.className+=" prettyprinted";var ut=Z.lang;if(!ut){ut=Be.match(ft);var st;!ut&&(st=me(ue))&&He.test(st.tagName)&&(ut=st.className.match(ft)),ut&&(ut=ut[1])}var Nt;if(Qe.test(ue.tagName))Nt=1;else{var pt=ue.currentStyle,et=oe.defaultView,er=pt?pt.whiteSpace:et&&et.getComputedStyle?et.getComputedStyle(ue,null).getPropertyValue("white-space"):0;Nt=er&&er.substring(0,3)==="pre"}var qt=Z.linenums;(qt=qt==="true"||+qt)||(qt=Be.match(/\blinenums\b(?::(\d+))?/),qt=qt?qt[1]&&qt[1].length?+qt[1]:!0:!1),qt&&Se(ue,qt,Nt);var Ot={langExtension:ut,sourceNode:ue,numberLines:qt,pre:Nt,sourceCode:null,basePos:null,spans:null,decorations:null};Ge(Ot)}}}At<be.length?P.setTimeout(ye,250):typeof ee=="function"&&ee()}ye()}var je=P.PR={createSimpleLexer:_e,registerLangHandler:Ee,sourceDecorator:Oe,PR_ATTRIB_NAME:R,PR_ATTRIB_VALUE:U,PR_COMMENT:E,PR_DECLARATION:p,PR_KEYWORD:x,PR_LITERAL:e,PR_NOCODE:Q,PR_PLAIN:l,PR_PUNCTUATION:a,PR_SOURCE:f,PR_STRING:y,PR_TAG:g,PR_TYPE:c,prettyPrintOne:O?P.prettyPrintOne=lt:I=lt,prettyPrint:G=O?P.prettyPrint=at:G=at},it=P.define;typeof it=="function"&&it.amd&&it("google-code-prettify",[],function(){return je})})()},TXwP:function(vt,$e,q){var ve,V;(function(){var O;(function(){"use strict";var D=[,,function(L){function S(u){this.__parent=u,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}S.prototype.clone_empty=function(){var u=new S(this.__parent);return u.set_indent(this.__indent_count,this.__alignment_count),u},S.prototype.item=function(u){return u<0?this.__items[this.__items.length+u]:this.__items[u]},S.prototype.has_match=function(u){for(var o=this.__items.length-1;o>=0;o--)if(this.__items[o].match(u))return!0;return!1},S.prototype.set_indent=function(u,o){this.is_empty()&&(this.__indent_count=u||0,this.__alignment_count=o||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},S.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},S.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},S.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var u=this.__parent.current_line;return u.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),u.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),u.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,u.__items[0]===" "&&(u.__items.splice(0,1),u.__character_count-=1),!0}return!1},S.prototype.is_empty=function(){return this.__items.length===0},S.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},S.prototype.push=function(u){this.__items.push(u);var o=u.lastIndexOf(`
`);o!==-1?this.__character_count=u.length-o:this.__character_count+=u.length},S.prototype.pop=function(){var u=null;return this.is_empty()||(u=this.__items.pop(),this.__character_count-=u.length),u},S.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},S.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},S.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},S.prototype.toString=function(){var u="";return this.is_empty()?this.__parent.indent_empty_lines&&(u=this.__parent.get_indent_string(this.__indent_count)):(u=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),u+=this.__items.join("")),u};function _(u,o){this.__cache=[""],this.__indent_size=u.indent_size,this.__indent_string=u.indent_char,u.indent_with_tabs||(this.__indent_string=new Array(u.indent_size+1).join(u.indent_char)),o=o||"",u.indent_level>0&&(o=new Array(u.indent_level+1).join(this.__indent_string)),this.__base_string=o,this.__base_string_length=o.length}_.prototype.get_indent_size=function(u,o){var r=this.__base_string_length;return o=o||0,u<0&&(r=0),r+=u*this.__indent_size,r+=o,r},_.prototype.get_indent_string=function(u,o){var r=this.__base_string;return o=o||0,u<0&&(u=0,r=""),o+=u*this.__indent_size,this.__ensure_cache(o),r+=this.__cache[o],r},_.prototype.__ensure_cache=function(u){for(;u>=this.__cache.length;)this.__add_column()},_.prototype.__add_column=function(){var u=this.__cache.length,o=0,r="";this.__indent_size&&u>=this.__indent_size&&(o=Math.floor(u/this.__indent_size),u-=o*this.__indent_size,r=new Array(o+1).join(this.__indent_string)),u&&(r+=new Array(u+1).join(" ")),this.__cache.push(r)};function b(u,o){this.__indent_cache=new _(u,o),this.raw=!1,this._end_with_newline=u.end_with_newline,this.indent_size=u.indent_size,this.wrap_line_length=u.wrap_line_length,this.indent_empty_lines=u.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new S(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}b.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},b.prototype.get_line_number=function(){return this.__lines.length},b.prototype.get_indent_string=function(u,o){return this.__indent_cache.get_indent_string(u,o)},b.prototype.get_indent_size=function(u,o){return this.__indent_cache.get_indent_size(u,o)},b.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},b.prototype.add_new_line=function(u){return this.is_empty()||!u&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},b.prototype.get_code=function(u){this.trim(!0);var o=this.current_line.pop();o&&(o[o.length-1]===`
`&&(o=o.replace(/\n+$/g,"")),this.current_line.push(o)),this._end_with_newline&&this.__add_outputline();var r=this.__lines.join(`
`);return u!==`
`&&(r=r.replace(/[\n]/g,u)),r},b.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},b.prototype.set_indent=function(u,o){return u=u||0,o=o||0,this.next_line.set_indent(u,o),this.__lines.length>1?(this.current_line.set_indent(u,o),!0):(this.current_line.set_indent(),!1)},b.prototype.add_raw_token=function(u){for(var o=0;o<u.newlines;o++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(u.whitespace_before),this.current_line.push(u.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},b.prototype.add_token=function(u){this.__add_space_before_token(),this.current_line.push(u),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},b.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(" "))},b.prototype.remove_indent=function(u){for(var o=this.__lines.length;u<o;)this.__lines[u]._remove_indent(),u++;this.current_line._remove_wrap_indent()},b.prototype.trim=function(u){for(u=u===void 0?!1:u,this.current_line.trim();u&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},b.prototype.just_added_newline=function(){return this.current_line.is_empty()},b.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},b.prototype.ensure_empty_line_above=function(u,o){for(var r=this.__lines.length-2;r>=0;){var A=this.__lines[r];if(A.is_empty())break;if(A.item(0).indexOf(u)!==0&&A.item(-1)!==o){this.__lines.splice(r+1,0,new S(this)),this.previous_line=this.__lines[this.__lines.length-2];break}r--}},L.exports.Output=b},,,,function(L){function S(u,o){this.raw_options=_(u,o),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","django","erb","handlebars","php","smarty"],["auto"])}S.prototype._get_array=function(u,o){var r=this.raw_options[u],A=o||[];return typeof r=="object"?r!==null&&typeof r.concat=="function"&&(A=r.concat()):typeof r=="string"&&(A=r.split(/[^a-zA-Z0-9_\/\-]+/)),A},S.prototype._get_boolean=function(u,o){var r=this.raw_options[u],A=r===void 0?!!o:!!r;return A},S.prototype._get_characters=function(u,o){var r=this.raw_options[u],A=o||"";return typeof r=="string"&&(A=r.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),A},S.prototype._get_number=function(u,o){var r=this.raw_options[u];o=parseInt(o,10),isNaN(o)&&(o=0);var A=parseInt(r,10);return isNaN(A)&&(A=o),A},S.prototype._get_selection=function(u,o,r){var A=this._get_selection_list(u,o,r);if(A.length!==1)throw new Error("Invalid Option Value: The option '"+u+`' can only be one of the following values:
`+o+`
You passed in: '`+this.raw_options[u]+"'");return A[0]},S.prototype._get_selection_list=function(u,o,r){if(!o||o.length===0)throw new Error("Selection list cannot be empty.");if(r=r||[o[0]],!this._is_valid_selection(r,o))throw new Error("Invalid Default Value!");var A=this._get_array(u,r);if(!this._is_valid_selection(A,o))throw new Error("Invalid Option Value: The option '"+u+`' can contain only the following values:
`+o+`
You passed in: '`+this.raw_options[u]+"'");return A},S.prototype._is_valid_selection=function(u,o){return u.length&&o.length&&!u.some(function(r){return o.indexOf(r)===-1})};function _(u,o){var r={};u=b(u);var A;for(A in u)A!==o&&(r[A]=u[A]);if(o&&u[o])for(A in u[o])r[A]=u[o][A];return r}function b(u){var o={},r;for(r in u){var A=r.replace(/-/g,"_");o[A]=u[r]}return o}L.exports.Options=S,L.exports.normalizeOpts=b,L.exports.mergeOpts=_},,function(L){var S=RegExp.prototype.hasOwnProperty("sticky");function _(b){this.__input=b||"",this.__input_length=this.__input.length,this.__position=0}_.prototype.restart=function(){this.__position=0},_.prototype.back=function(){this.__position>0&&(this.__position-=1)},_.prototype.hasNext=function(){return this.__position<this.__input_length},_.prototype.next=function(){var b=null;return this.hasNext()&&(b=this.__input.charAt(this.__position),this.__position+=1),b},_.prototype.peek=function(b){var u=null;return b=b||0,b+=this.__position,b>=0&&b<this.__input_length&&(u=this.__input.charAt(b)),u},_.prototype.__match=function(b,u){b.lastIndex=u;var o=b.exec(this.__input);return o&&!(S&&b.sticky)&&(o.index!==u&&(o=null)),o},_.prototype.test=function(b,u){return u=u||0,u+=this.__position,u>=0&&u<this.__input_length?!!this.__match(b,u):!1},_.prototype.testChar=function(b,u){var o=this.peek(u);return b.lastIndex=0,o!==null&&b.test(o)},_.prototype.match=function(b){var u=this.__match(b,this.__position);return u?this.__position+=u[0].length:u=null,u},_.prototype.read=function(b,u,o){var r="",A;return b&&(A=this.match(b),A&&(r+=A[0])),u&&(A||!b)&&(r+=this.readUntil(u,o)),r},_.prototype.readUntil=function(b,u){var o="",r=this.__position;b.lastIndex=this.__position;var A=b.exec(this.__input);return A?(r=A.index,u&&(r+=A[0].length)):r=this.__input_length,o=this.__input.substring(this.__position,r),this.__position=r,o},_.prototype.readUntilAfter=function(b){return this.readUntil(b,!0)},_.prototype.get_regexp=function(b,u){var o=null,r="g";return u&&S&&(r="y"),typeof b=="string"&&b!==""?o=new RegExp(b,r):b&&(o=new RegExp(b.source,r)),o},_.prototype.get_literal_regexp=function(b){return RegExp(b.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},_.prototype.peekUntilAfter=function(b){var u=this.__position,o=this.readUntilAfter(b);return this.__position=u,o},_.prototype.lookBack=function(b){var u=this.__position-1;return u>=b.length&&this.__input.substring(u-b.length,u).toLowerCase()===b},L.exports.InputScanner=_},,,,,function(L){function S(_,b){_=typeof _=="string"?_:_.source,b=typeof b=="string"?b:b.source,this.__directives_block_pattern=new RegExp(_+/ beautify( \w+[:]\w+)+ /.source+b,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(_+/\sbeautify\signore:end\s/.source+b,"g")}S.prototype.get_directives=function(_){if(!_.match(this.__directives_block_pattern))return null;var b={};this.__directive_pattern.lastIndex=0;for(var u=this.__directive_pattern.exec(_);u;)b[u[1]]=u[2],u=this.__directive_pattern.exec(_);return b},S.prototype.readIgnored=function(_){return _.readUntilAfter(this.__directives_end_ignore_pattern)},L.exports.Directives=S},,function(L,S,_){var b=_(16).Beautifier,u=_(17).Options;function o(r,A){var s=new b(r,A);return s.beautify()}L.exports=o,L.exports.defaultOptions=function(){return new u}},function(L,S,_){var b=_(17).Options,u=_(2).Output,o=_(8).InputScanner,r=_(13).Directives,A=new r(/\/\*/,/\*\//),s=/\r\n|[\r\n]/,t=/\r\n|[\r\n]/g,n=/\s/,i=/(?:\s|\n)+/g,B=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,w=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function y(x,E){this._source_text=x||"",this._options=new b(E),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"]}y.prototype.eatString=function(x){var E="";for(this._ch=this._input.next();this._ch;){if(E+=this._ch,this._ch==="\\")E+=this._input.next();else if(x.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return E},y.prototype.eatWhitespace=function(x){for(var E=n.test(this._input.peek()),c=0;n.test(this._input.peek());)this._ch=this._input.next(),x&&this._ch===`
`&&((c===0||c<this._options.max_preserve_newlines)&&(c++,this._output.add_new_line(!0)));return E},y.prototype.foundNestedPseudoClass=function(){for(var x=0,E=1,c=this._input.peek(E);c;){if(c==="{")return!0;if(c==="(")x+=1;else if(c===")"){if(x===0)return!1;x-=1}else if(c===";"||c==="}")return!1;E++,c=this._input.peek(E)}return!1},y.prototype.print_string=function(x){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(x)},y.prototype.preserveSingleSpace=function(x){x&&(this._output.space_before_token=!0)},y.prototype.indent=function(){this._indentLevel++},y.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},y.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var x=this._source_text,E=this._options.eol;E==="auto"&&(E=`
`,x&&s.test(x||"")&&(E=x.match(s)[0])),x=x.replace(t,`
`);var c=x.match(/^[\t ]*/)[0];this._output=new u(this._options,c),this._input=new o(x),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var e=0,a=!1,l=!1,g=!1,p=!1,f=!1,R=!1,U=this._ch,Q=!1,j,J,k;j=this._input.read(i),J=j!=="",k=U,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),U=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var Y=this._input.read(B),ne=A.get_directives(Y);ne&&ne.ignore==="start"&&(Y+=A.readIgnored(this._input)),this.print_string(Y),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(w)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(J),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var me=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);me.match(/[ :]$/)&&(me=this.eatString(": ").replace(/\s$/,""),this.print_string(me),this._output.space_before_token=!0),me=me.replace(/\s$/,""),me==="extend"?p=!0:me==="import"&&(f=!0),me in this.NESTED_AT_RULE?(this._nestedLevel+=1,me in this.CONDITIONAL_GROUP_RULE&&(g=!0)):!a&&e===0&&me.indexOf(":")!==-1&&(l=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(J),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")l&&(l=!1,this.outdent()),g?(g=!1,a=this._indentLevel>=this._nestedLevel):a=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&a&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(k==="("?this._output.space_before_token=!1:k!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),k==="{"&&this._output.trim(!0),f=!1,p=!1,l&&(this.outdent(),l=!1),this.print_string(this._ch),a=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var _e=0;_e<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;_e++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[_e])){Q=!0;break}(a||g)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!p&&e===0?(this.print_string(":"),l||(l=!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 Oe=k==='"'||k==="'";this.preserveSingleSpace(Oe||J),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")Q=!1,e===0?(l&&(this.outdent(),l=!1),p=!1,f=!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(),e++,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(")")),e&&(e--,this.outdent()));else{var xe=!1;this._input.lookBack("with")&&(xe=!0),this.preserveSingleSpace(J||xe),this.print_string(this._ch),l&&k==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),R=!0):(this.eatWhitespace(),e++,this.indent())}else if(this._ch===")")e&&(e--,this.outdent()),R&&this._input.peek()===";"&&this._options.selector_separator_newline&&(R=!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&&(!l||R)&&e===0&&!f&&!p?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!l&&e===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&&n.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(J),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),n.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 Se=k==='"'||k==="'";this.preserveSingleSpace(Se||J),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&Q&&this._output.add_new_line()}var Fe=this._output.get_code(E);return Fe},L.exports.Beautifier=y},function(L,S,_){var b=_(6).Options;function u(o){b.call(this,o,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var r=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||r;var A=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var s=0;s<A.length;s++)A[s]!=="expand"?this.brace_style="collapse":this.brace_style=A[s]}u.prototype=new b,L.exports.Options=u}],I={};function G(L){var S=I[L];if(S!==void 0)return S.exports;var _=I[L]={exports:{}};return D[L](_,_.exports,G),_.exports}var P=G(15);O=P})();var z=O;!(ve=[],V=function(){return{css_beautify:z}}.apply($e,ve),V!==void 0&&(vt.exports=V))})()},WaYH:function(vt,$e,q){"use strict";var ve=q("rePB"),V=q("Ff2n"),O=q("VTBJ"),z=q("1OyB"),D=q("vuIU"),I=q("JX7q"),G=q("Ji7U"),P=q("LK+K"),L=q("q1tI"),S=q("TSYQ"),_=q.n(S),b=q("sboe"),u=q("OZM5"),o=function(x){var E=x.prefixCls,c=x.level,e=x.isStart,a=x.isEnd;if(!c)return null;for(var l="".concat(E,"-indent-unit"),g=[],p=0;p<c;p+=1){var f;g.push(L.createElement("span",{key:p,className:_()(l,(f={},Object(ve.a)(f,"".concat(l,"-start"),e[p+1]),Object(ve.a)(f,"".concat(l,"-end"),a[p+1]),Object(ve.a)(f,"".concat(l,"-end-first-level"),!p&&a[0]),f))}))}return L.createElement("span",{"aria-hidden":"true",className:"".concat(E,"-indent")},g)},r=o,A=q("815F"),s="open",t="close",n="---",i=function(y){Object(G.a)(E,y);var x=Object(P.a)(E);function E(){var c;return Object(z.a)(this,E),c=x.apply(this,arguments),c.state={dragNodeHighlight:!1},c.onSelectorClick=function(e){var a=c.props.context.onNodeClick;a(e,Object(A.b)(c.props)),c.isSelectable()?c.onSelect(e):c.onCheck(e)},c.onSelectorDoubleClick=function(e){var a=c.props.context.onNodeDoubleClick;a(e,Object(A.b)(c.props))},c.onSelect=function(e){if(c.isDisabled())return;var a=c.props.context.onNodeSelect;e.preventDefault(),a(e,Object(A.b)(c.props))},c.onCheck=function(e){if(c.isDisabled())return;var a=c.props,l=a.disableCheckbox,g=a.checked,p=c.props.context.onNodeCheck;if(!c.isCheckable()||l)return;e.preventDefault();var f=!g;p(e,Object(A.b)(c.props),f)},c.onMouseEnter=function(e){var a=c.props.context.onNodeMouseEnter;a(e,Object(A.b)(c.props))},c.onMouseLeave=function(e){var a=c.props.context.onNodeMouseLeave;a(e,Object(A.b)(c.props))},c.onContextMenu=function(e){var a=c.props.context.onNodeContextMenu;a(e,Object(A.b)(c.props))},c.onDragStart=function(e){var a=c.props.context.onNodeDragStart;e.stopPropagation(),c.setState({dragNodeHighlight:!0}),a(e,Object(I.a)(c));try{e.dataTransfer.setData("text/plain","")}catch(l){}},c.onDragEnter=function(e){var a=c.props.context.onNodeDragEnter;e.preventDefault(),e.stopPropagation(),a(e,Object(I.a)(c))},c.onDragOver=function(e){var a=c.props.context.onNodeDragOver;e.preventDefault(),e.stopPropagation(),a(e,Object(I.a)(c))},c.onDragLeave=function(e){var a=c.props.context.onNodeDragLeave;e.stopPropagation(),a(e,Object(I.a)(c))},c.onDragEnd=function(e){var a=c.props.context.onNodeDragEnd;e.stopPropagation(),c.setState({dragNodeHighlight:!1}),a(e,Object(I.a)(c))},c.onDrop=function(e){var a=c.props.context.onNodeDrop;e.preventDefault(),e.stopPropagation(),c.setState({dragNodeHighlight:!1}),a(e,Object(I.a)(c))},c.onExpand=function(e){var a=c.props.context.onNodeExpand;a(e,Object(A.b)(c.props))},c.setSelectHandle=function(e){c.selectHandle=e},c.getNodeState=function(){var e=c.props.expanded;return c.isLeaf()?null:e?s:t},c.hasChildren=function(){var e=c.props.eventKey,a=c.props.context.keyEntities,l=a[e]||{},g=l.children;return!!(g||[]).length},c.isLeaf=function(){var e=c.props,a=e.isLeaf,l=e.loaded,g=c.props.context.loadData,p=c.hasChildren();return a===!1?!1:a||!g&&!p||g&&l&&!p},c.isDisabled=function(){var e=c.props.disabled,a=c.props.context.disabled;return!!(a||e)},c.isCheckable=function(){var e=c.props.checkable,a=c.props.context.checkable;return!a||e===!1?!1:a},c.syncLoadData=function(e){var a=e.expanded,l=e.loading,g=e.loaded,p=c.props.context,f=p.loadData,R=p.onNodeLoad;if(l)return;f&&a&&!c.isLeaf()&&(!c.hasChildren()&&!g&&R(Object(A.b)(c.props)))},c.renderSwitcher=function(){var e=c.props,a=e.expanded,l=e.switcherIcon,g=c.props.context,p=g.prefixCls,f=g.switcherIcon,R=l||f;if(c.isLeaf())return L.createElement("span",{className:_()("".concat(p,"-switcher"),"".concat(p,"-switcher-noop"))},typeof R=="function"?R(Object(O.a)(Object(O.a)({},c.props),{},{isLeaf:!0})):R);var U=_()("".concat(p,"-switcher"),"".concat(p,"-switcher_").concat(a?s:t));return L.createElement("span",{onClick:c.onExpand,className:U},typeof R=="function"?R(Object(O.a)(Object(O.a)({},c.props),{},{isLeaf:!1})):R)},c.renderCheckbox=function(){var e=c.props,a=e.checked,l=e.halfChecked,g=e.disableCheckbox,p=c.props.context.prefixCls,f=c.isDisabled(),R=c.isCheckable();if(!R)return null;var U=typeof R!="boolean"?R:null;return L.createElement("span",{className:_()("".concat(p,"-checkbox"),a&&"".concat(p,"-checkbox-checked"),!a&&l&&"".concat(p,"-checkbox-indeterminate"),(f||g)&&"".concat(p,"-checkbox-disabled")),onClick:c.onCheck},U)},c.renderIcon=function(){var e=c.props.loading,a=c.props.context.prefixCls;return L.createElement("span",{className:_()("".concat(a,"-iconEle"),"".concat(a,"-icon__").concat(c.getNodeState()||"docu"),e&&"".concat(a,"-icon_loading"))})},c.renderSelector=function(){var e=c.state.dragNodeHighlight,a=c.props,l=a.title,g=a.selected,p=a.icon,f=a.loading,R=a.data,U=c.props.context,Q=U.prefixCls,j=U.showIcon,J=U.icon,k=U.draggable,Y=U.loadData,ne=U.titleRender,me=c.isDisabled(),_e="".concat(Q,"-node-content-wrapper"),Oe;if(j){var xe=p||J;Oe=xe?L.createElement("span",{className:_()("".concat(Q,"-iconEle"),"".concat(Q,"-icon__customize"))},typeof xe=="function"?xe(c.props):xe):c.renderIcon()}else Y&&f&&(Oe=c.renderIcon());var Se;typeof l=="function"?Se=l(R):ne?Se=ne(R):Se=l;var Fe=L.createElement("span",{className:"".concat(Q,"-title")},Se);return L.createElement("span",{ref:c.setSelectHandle,title:typeof l=="string"?l:"",className:_()("".concat(_e),"".concat(_e,"-").concat(c.getNodeState()||"normal"),!me&&(g||e)&&"".concat(Q,"-node-selected"),!me&&k&&"draggable"),draggable:!me&&k||void 0,"aria-grabbed":!me&&k||void 0,onMouseEnter:c.onMouseEnter,onMouseLeave:c.onMouseLeave,onContextMenu:c.onContextMenu,onClick:c.onSelectorClick,onDoubleClick:c.onSelectorDoubleClick,onDragStart:k?c.onDragStart:void 0},Oe,Fe)},c}return Object(D.a)(E,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var e=this.props.selectable,a=this.props.context.selectable;return typeof e=="boolean"?e:a}},{key:"render",value:function(){var e,a=this.props,l=a.eventKey,g=a.className,p=a.style,f=a.dragOver,R=a.dragOverGapTop,U=a.dragOverGapBottom,Q=a.isLeaf,j=a.isStart,J=a.isEnd,k=a.expanded,Y=a.selected,ne=a.checked,me=a.halfChecked,_e=a.loading,Oe=a.domRef,xe=a.active,Se=a.onMouseMove,Fe=Object(V.a)(a,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),Pe=this.props.context,Ee=Pe.prefixCls,he=Pe.filterTreeNode,Ge=Pe.draggable,lt=Pe.keyEntities,at=this.isDisabled(),je=Object(u.f)(Fe),it=lt[l]||{},ee=it.level,W=J[J.length-1];return L.createElement("div",Object.assign({ref:Oe,className:_()(g,"".concat(Ee,"-treenode"),(e={},Object(ve.a)(e,"".concat(Ee,"-treenode-disabled"),at),Object(ve.a)(e,"".concat(Ee,"-treenode-switcher-").concat(k?"open":"close"),!Q),Object(ve.a)(e,"".concat(Ee,"-treenode-checkbox-checked"),ne),Object(ve.a)(e,"".concat(Ee,"-treenode-checkbox-indeterminate"),me),Object(ve.a)(e,"".concat(Ee,"-treenode-selected"),Y),Object(ve.a)(e,"".concat(Ee,"-treenode-loading"),_e),Object(ve.a)(e,"".concat(Ee,"-treenode-active"),xe),Object(ve.a)(e,"".concat(Ee,"-treenode-leaf-last"),W),Object(ve.a)(e,"drag-over",!at&&f),Object(ve.a)(e,"drag-over-gap-top",!at&&R),Object(ve.a)(e,"drag-over-gap-bottom",!at&&U),Object(ve.a)(e,"filter-node",he&&he(Object(A.b)(this.props))),e)),style:p,onDragEnter:Ge?this.onDragEnter:void 0,onDragOver:Ge?this.onDragOver:void 0,onDragLeave:Ge?this.onDragLeave:void 0,onDrop:Ge?this.onDrop:void 0,onDragEnd:Ge?this.onDragEnd:void 0,onMouseMove:Se},je),L.createElement(r,{prefixCls:Ee,level:ee,isStart:j,isEnd:J}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),E}(L.Component),B=function(x){return L.createElement(b.a.Consumer,null,function(E){return L.createElement(i,Object.assign({},x,{context:E}))})};B.displayName="TreeNode",B.defaultProps={title:n},B.isTreeNode=1;var w=$e.a=B},Y1PL:function(vt,$e,q){"use strict";q.r($e),q.d($e,"ResizableTextArea",function(){return me});var ve=q("wx14"),V=q("1OyB"),O=q("vuIU"),z=q("Ji7U"),D=q("LK+K"),I=q("q1tI"),G=q("VTBJ"),P=q("rePB"),L=q("Zm9Q"),S=q("Kwbf"),_=q("c+Xe"),b=q("m+aA"),u=q("bdgK"),o=new Map;function r(xe){xe.forEach(function(Se){var Fe,Pe=Se.target;(Fe=o.get(Pe))===null||Fe===void 0||Fe.forEach(function(Ee){return Ee(Pe)})})}var A=new u.default(r),s=null,t=null;function n(xe,Se){o.has(xe)||(o.set(xe,new Set),A.observe(xe)),o.get(xe).add(Se)}function i(xe,Se){o.has(xe)&&(o.get(xe).delete(Se),o.get(xe).size||(A.unobserve(xe),o.delete(xe)))}var B=function(xe){Object(z.a)(Fe,xe);var Se=Object(D.a)(Fe);function Fe(){return Object(V.a)(this,Fe),Se.apply(this,arguments)}return Object(O.a)(Fe,[{key:"render",value:function(){return this.props.children}}]),Fe}(I.Component),w=I.createContext(null);function y(xe){var Se=xe.children,Fe=xe.onBatchResize,Pe=I.useRef(0),Ee=I.useRef([]),he=I.useContext(w),Ge=I.useCallback(function(lt,at,je){Pe.current+=1;var it=Pe.current;Ee.current.push({size:lt,element:at,data:je}),Promise.resolve().then(function(){it===Pe.current&&(Fe==null||Fe(Ee.current),Ee.current=[])}),he==null||he(lt,at,je)},[Fe,he]);return I.createElement(w.Provider,{value:Ge},Se)}function x(xe){var Se=xe.children,Fe=xe.disabled,Pe=I.useRef(null),Ee=I.useRef(null),he=I.useContext(w),Ge=I.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),lt=I.isValidElement(Se)&&Object(_.c)(Se),at=lt?Se.ref:null,je=I.useMemo(function(){return Object(_.a)(at,Pe)},[at,Pe]),it=I.useRef(xe);it.current=xe;var ee=I.useCallback(function(W){var F=it.current,oe=F.onResize,re=F.data,we=W.getBoundingClientRect(),be=we.width,nt=we.height,tt=W.offsetWidth,Ye=W.offsetHeight,qe=Math.floor(be),At=Math.floor(nt);if(Ge.current.width!==qe||Ge.current.height!==At||Ge.current.offsetWidth!==tt||Ge.current.offsetHeight!==Ye){var ft={width:qe,height:At,offsetWidth:tt,offsetHeight:Ye};Ge.current=ft;var Ce=tt===Math.round(be)?be:tt,Ue=Ye===Math.round(nt)?nt:Ye,Qe=Object(G.a)(Object(G.a)({},ft),{},{offsetWidth:Ce,offsetHeight:Ue});he==null||he(Qe,W,re),oe&&Promise.resolve().then(function(){oe(Qe,W)})}},[]);return I.useEffect(function(){var W=Object(b.a)(Pe.current)||Object(b.a)(Ee.current);return W&&!Fe&&n(W,ee),function(){return i(W,ee)}},[Pe.current,Fe]),I.createElement(B,{ref:Ee},lt?I.cloneElement(Se,{ref:je}):Se)}var E="rc-observer-key";function c(xe){var Se=xe.children,Fe=Object(L.a)(Se);return Fe.map(function(Pe,Ee){var he=(Pe==null?void 0:Pe.key)||"".concat(E,"-").concat(Ee);return I.createElement(x,Object(ve.a)({},xe,{key:he}),Pe)})}c.Collection=y;var e=c,a=q("bT9E"),l=q("TSYQ"),g=q.n(l),p=`
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
`,f=["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"],R={},U;function Q(xe){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Fe=xe.getAttribute("id")||xe.getAttribute("data-reactid")||xe.getAttribute("name");if(Se&&R[Fe])return R[Fe];var Pe=window.getComputedStyle(xe),Ee=Pe.getPropertyValue("box-sizing")||Pe.getPropertyValue("-moz-box-sizing")||Pe.getPropertyValue("-webkit-box-sizing"),he=parseFloat(Pe.getPropertyValue("padding-bottom"))+parseFloat(Pe.getPropertyValue("padding-top")),Ge=parseFloat(Pe.getPropertyValue("border-bottom-width"))+parseFloat(Pe.getPropertyValue("border-top-width")),lt=f.map(function(je){return"".concat(je,":").concat(Pe.getPropertyValue(je))}).join(";"),at={sizingStyle:lt,paddingSize:he,borderSize:Ge,boxSizing:Ee};return Se&&Fe&&(R[Fe]=at),at}function j(xe){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Pe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;U||(U=document.createElement("textarea"),U.setAttribute("tab-index","-1"),U.setAttribute("aria-hidden","true"),document.body.appendChild(U)),xe.getAttribute("wrap")?U.setAttribute("wrap",xe.getAttribute("wrap")):U.removeAttribute("wrap");var Ee=Q(xe,Se),he=Ee.paddingSize,Ge=Ee.borderSize,lt=Ee.boxSizing,at=Ee.sizingStyle;U.setAttribute("style","".concat(at,";").concat(p)),U.value=xe.value||xe.placeholder||"";var je=Number.MIN_SAFE_INTEGER,it=Number.MAX_SAFE_INTEGER,ee=U.scrollHeight,W;if(lt==="border-box"?ee+=Ge:lt==="content-box"&&(ee-=he),Fe!==null||Pe!==null){U.value=" ";var F=U.scrollHeight-he;Fe!==null&&(je=F*Fe,lt==="border-box"&&(je=je+he+Ge),ee=Math.max(je,ee)),Pe!==null&&(it=F*Pe,lt==="border-box"&&(it=it+he+Ge),W=ee>it?"":"hidden",ee=Math.min(it,ee))}return{height:ee,minHeight:je,maxHeight:it,overflowY:W,resize:"none"}}var J=q("Gytx"),k=q.n(J),Y;(function(xe){xe[xe.NONE=0]="NONE",xe[xe.RESIZING=1]="RESIZING",xe[xe.RESIZED=2]="RESIZED"})(Y||(Y={}));var ne=function(xe){Object(z.a)(Fe,xe);var Se=Object(D.a)(Fe);function Fe(Pe){var Ee;return Object(V.a)(this,Fe),Ee=Se.call(this,Pe),Ee.nextFrameActionId=void 0,Ee.resizeFrameId=void 0,Ee.textArea=void 0,Ee.saveTextArea=function(he){Ee.textArea=he},Ee.handleResize=function(he){var Ge=Ee.state.resizeStatus,lt=Ee.props,at=lt.autoSize,je=lt.onResize;if(Ge!==Y.NONE)return;typeof je=="function"&&je(he),at&&Ee.resizeOnNextFrame()},Ee.resizeOnNextFrame=function(){cancelAnimationFrame(Ee.nextFrameActionId),Ee.nextFrameActionId=requestAnimationFrame(Ee.resizeTextarea)},Ee.resizeTextarea=function(){var he=Ee.props.autoSize;if(!he||!Ee.textArea)return;var Ge=he.minRows,lt=he.maxRows,at=j(Ee.textArea,!1,Ge,lt);Ee.setState({textareaStyles:at,resizeStatus:Y.RESIZING},function(){cancelAnimationFrame(Ee.resizeFrameId),Ee.resizeFrameId=requestAnimationFrame(function(){Ee.setState({resizeStatus:Y.RESIZED},function(){Ee.resizeFrameId=requestAnimationFrame(function(){Ee.setState({resizeStatus:Y.NONE}),Ee.fixFirefoxAutoScroll()})})})})},Ee.renderTextArea=function(){var he=Ee.props,Ge=he.prefixCls,lt=Ge===void 0?"rc-textarea":Ge,at=he.autoSize,je=he.onResize,it=he.className,ee=he.disabled,W=Ee.state,F=W.textareaStyles,oe=W.resizeStatus,re=Object(a.a)(Ee.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),we=g()(lt,it,Object(P.a)({},"".concat(lt,"-disabled"),ee));"value"in re&&(re.value=re.value||"");var be=Object(G.a)(Object(G.a)(Object(G.a)({},Ee.props.style),F),oe===Y.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return I.createElement(e,{onResize:Ee.handleResize,disabled:!(at||je)},I.createElement("textarea",Object(ve.a)({},re,{className:we,style:be,ref:Ee.saveTextArea})))},Ee.state={textareaStyles:{},resizeStatus:Y.NONE},Ee}return Object(O.a)(Fe,[{key:"componentDidUpdate",value:function(Ee){(Ee.value!==this.props.value||!k()(Ee.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var Ee=this.textArea.selectionStart,he=this.textArea.selectionEnd;this.textArea.setSelectionRange(Ee,he)}}catch(Ge){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Fe}(I.Component),me=ne,_e=function(xe){Object(z.a)(Fe,xe);var Se=Object(D.a)(Fe);function Fe(Pe){var Ee;Object(V.a)(this,Fe),Ee=Se.call(this,Pe),Ee.resizableTextArea=void 0,Ee.focus=function(){Ee.resizableTextArea.textArea.focus()},Ee.saveTextArea=function(Ge){Ee.resizableTextArea=Ge},Ee.handleChange=function(Ge){var lt=Ee.props.onChange;Ee.setValue(Ge.target.value,function(){Ee.resizableTextArea.resizeTextarea()}),lt&&lt(Ge)},Ee.handleKeyDown=function(Ge){var lt=Ee.props,at=lt.onPressEnter,je=lt.onKeyDown;Ge.keyCode===13&&at&&at(Ge),je&&je(Ge)};var he=typeof Pe.value=="undefined"||Pe.value===null?Pe.defaultValue:Pe.value;return Ee.state={value:he},Ee}return Object(O.a)(Fe,[{key:"setValue",value:function(Ee,he){"value"in this.props||this.setState({value:Ee},he)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return I.createElement(me,Object(ve.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(Ee){return"value"in Ee?{value:Ee.value}:null}}]),Fe}(I.Component),Oe=$e.default=_e},ZPm4:function(vt,$e,q){vt.exports={flex_box_center:"flex_box_center___3ePce",flex_space_between:"flex_space_between___kudFn",flex_box_vertical_center:"flex_box_vertical_center___2q7vR",flex_box_center_end:"flex_box_center_end___148Sb",flex_box_column:"flex_box_column___F25pb",bg:"bg___28cHV",circularBlue:"circularBlue___jIYhi",circularRed:"circularRed___11EBA",circularOrange:"circularOrange___3vass",circularGreen:"circularGreen___2FZOw",circularGrey:"circularGrey___1miQR",title:"title___26wjq",questionIcons:"questionIcons___QVCrf",grey:"grey___2G7cN",green:"green___2giUk",blue:"blue___ilI2M",orange:"orange___18xMh",red:"red___k052H",greenTip:"greenTip___3Uhcb",redTip:"redTip___Co_D9",cccTip:"cccTip___2JK_0",orangeTip:"orangeTip___1AIXz",flexRow:"flexRow___1V1Cl",simpleWrap:"simpleWrap___2cXGy",userPhoto:"userPhoto___3u-Jn",CCCIcons:"CCCIcons___3Ln3B",buttonFixed:"buttonFixed___1XM5C",typeTitle:"typeTitle___3R9ju",answerResult:"answerResult___26O14",questionsInfo:"questionsInfo___2vxH1",leftBar:"leftBar___3d8QX",greenBg:"greenBg____iB7N",blueBg:"blueBg___3qJqj",redBg:"redBg___ezJBz",orangeBg:"orangeBg___2DJpY",greyBg:"greyBg___18w2w",commentText:"commentText___ckWGZ",full:"full___1abk2"}},ZW9T:function(vt,$e,q){"use strict";q.d($e,"a",function(){return j});var ve=q("k1fw"),V=q("miYZ"),O=q("tsqr"),z=q("rAM+"),D=q("tJVT"),I=q("PpiC"),G=q("q1tI"),P=q.n(G),L=q("bdgK"),S=q("oBTY"),_=q("9og8"),b=q("WmNS"),u=q.n(b),o={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"]},r={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"]},A={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","for","friend","gcnew","generic","goto","if","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:"main",content:["int main () {"," $0","}"].join(`
`)},{label:"for",content:["for( ; ; ){"," $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 <sstream>",content:["#include <sstream>"].join(`
`)},{label:"#include <string>",content:["#include <string>"].join(`
`)},{label:"#include <cmath>",content:["#include <cmath>"].join(`
`)}]},s={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(`
`)}]},t=q("5VLF"),n=q.n(t),i={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=function(k,Y){return Y.map(function(ne){return{label:ne,kind:k.languages.CompletionItemKind.Keyword,insertText:ne}})},w=function(k){return Object.keys(i.tables).map(function(Y){return{label:Y,kind:k.languages.CompletionItemKind.Variable,insertText:Y}})},y=function(k,Y){var ne=i.tables[k];return ne?ne.map(function(me){return{label:me,kind:Y.languages.CompletionItemKind.Field,insertText:me}}):[]};function x(J,k,Y,ne,me){var _e=k.getWordUntilPosition(Y),Oe={startLineNumber:Y.lineNumber,endLineNumber:Y.lineNumber,startColumn:_e.startColumn,endColumn:_e.endColumn},xe=ne.map(function(Se){return{label:Se,kind:J.languages.CompletionItemKind.Keyword,insertText:Se,insertTextRules:J.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}});return me.map(function(Se){xe.push(Object(ve.a)(Object(ve.a)({},Se),{},{range:Oe}))}),xe}var E=function(J){i.languages.map(function(me){return J.languages.registerDocumentFormattingEditProvider(me,{provideDocumentFormattingEdits:function(Oe,xe,Se){return Object(_.a)(u.a.mark(function Fe(){var Pe;return u.a.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:return Pe=n()(Oe.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}),he.abrupt("return",[{range:Oe.getFullModelRange(),text:Pe}]);case 2:case"end":return he.stop()}},Fe)}))()}}),me});var k=A.quickKey.map(function(me){return{label:me.label,kind:J.languages.CompletionItemKind.Method,insertText:me.content,insertTextRules:J.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),Y=s.quickKey.map(function(me){return{label:me.label,kind:J.languages.CompletionItemKind.Method,insertText:me.content,insertTextRules:J.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),ne=r.quickKey.map(function(me){return{label:me.label,kind:J.languages.CompletionItemKind.Method,insertText:me.content,insertTextRules:J.languages.CompletionItemInsertTextRule.InsertAsSnippet}});J.languages.registerCompletionItemProvider("cpp",{triggerCharacters:["."," ","#"].concat(Object(S.a)(A.keywords),Object(S.a)(A.quickKey.map(function(me){return me.label}))),provideCompletionItems:function(_e,Oe){var xe=_e.getValueInRange({startLineNumber:Oe.lineNumber,startColumn:1,endLineNumber:Oe.lineNumber,endColumn:Oe.column}),Se=xe.match(/cu/gim);console.log("match:",Se,Oe,xe,_e);var Fe=[],Pe=Oe.lineNumber,Ee=Oe.column,he=_e.getValueInRange({startLineNumber:Pe,startColumn:0,endLineNumber:Pe,endColumn:Ee}),Ge=he.trim().split(/\s+/),lt=Ge[Ge.length-1];if(lt.endsWith(".")){var at=lt.slice(0,lt.length-1);Object.keys(i.tables).includes(at)&&(Fe=Object(S.a)(y(at,J)))}else lt==="."?Fe=[]:Fe=[].concat(Object(S.a)(w(J)),Object(S.a)(B(J,A.keywords)),Object(S.a)(k));return{suggestions:Fe}}}),J.languages.registerCompletionItemProvider("c",{triggerCharacters:["."," ","#"].concat(Object(S.a)(o.keywords)),provideCompletionItems:function(_e,Oe){var xe=_e.getValueInRange({startLineNumber:Oe.lineNumber,startColumn:1,endLineNumber:Oe.lineNumber,endColumn:Oe.column}),Se=xe.match(/cu/gim);console.log("match:",Se,Oe,xe,_e);var Fe=[],Pe=Oe.lineNumber,Ee=Oe.column,he=_e.getValueInRange({startLineNumber:Pe,startColumn:0,endLineNumber:Pe,endColumn:Ee}),Ge=he.trim().split(/\s+/),lt=Ge[Ge.length-1];if(lt.endsWith(".")){var at=lt.slice(0,lt.length-1);Object.keys(i.tables).includes(at)&&(Fe=Object(S.a)(y(at,J)))}else lt==="."?Fe=[]:Fe=[].concat(Object(S.a)(w(J)),Object(S.a)(B(J,o.keywords)));return{suggestions:Fe}}}),J.languages.registerCompletionItemProvider("java",{triggerCharacters:["."," "].concat(Object(S.a)(r.keywords)),provideCompletionItems:function(_e,Oe){var xe=[],Se=Oe.lineNumber,Fe=Oe.column,Pe=_e.getValueInRange({startLineNumber:Se,startColumn:0,endLineNumber:Se,endColumn:Fe}),Ee=Pe.trim().split(/\s+/),he=Ee[Ee.length-1];if(he.endsWith(".")){var Ge=he.slice(0,he.length-1);Object.keys(i.tables).includes(Ge)&&(xe=Object(S.a)(y(Ge,J)))}else he==="."?xe=[]:xe=[].concat(Object(S.a)(w(J)),Object(S.a)(B(J,r.keywords)),Object(S.a)(ne));return{suggestions:xe}}}),J.languages.registerCompletionItemProvider("python",{triggerCharacters:["."," "].concat(Object(S.a)(s.keywords)),provideCompletionItems:function(_e,Oe){var xe=[],Se=Oe.lineNumber,Fe=Oe.column,Pe=_e.getValueInRange({startLineNumber:Se,startColumn:0,endLineNumber:Se,endColumn:Fe}),Ee=Pe.trim().split(/\s+/),he=Ee[Ee.length-1];if(he.endsWith(".")){var Ge=he.slice(0,he.length-1);Object.keys(i.tables).includes(Ge)&&(xe=Object(S.a)(y(Ge,J)))}else he==="."?xe=[]:xe=[].concat(Object(S.a)(w(J)),Object(S.a)(B(J,s.keywords)),Object(S.a)(Y));return{suggestions:xe}}})},c="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",e=q("LvDl"),a=q("+ua5");function l(J){return/^\d+$/.test(J)?"".concat(J,"px"):J}function g(){}var p=!1,f={"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"};function R(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],k=J;if(Array.isArray(J)){for(var Y=0;Y<J.length;Y++){var ne=f[J[Y]];if(ne)return ne}return k[0]}return f[k]||k}var U=null,Q=$e.b=function(J){var k=J.width,Y=k===void 0?"100%":k,ne=J.height,me=ne===void 0?"100%":ne,_e=J.value,Oe=J.language,xe=Oe===void 0?"javascript":Oe,Se=J.style,Fe=Se===void 0?{}:Se,Pe=J.options,Ee=Pe===void 0?{}:Pe,he=J.overrideServices,Ge=he===void 0?{}:he,lt=J.theme,at=lt===void 0?"vs-dark":lt,je=J.onEditBlur,it=J.onSave,ee=J.autoHeight,W=ee===void 0?!1:ee,F=J.forbidCopy,oe=F===void 0?!1:F,re=J.onChange,we=re===void 0?g:re,be=J.editorDidMount,nt=be===void 0?g:be,tt=J.onFocus,Ye=tt===void 0?g:tt,qe=J.filename,At=qe===void 0?"educoder.txt":qe,ft=J.errorLine,Ce=J.errorContent,Ue=Ce===void 0?"":Ce,Qe=Object(I.a)(J,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),He=Object(G.useRef)(),Ie=Object(G.useRef)({}),Me=Object(G.useRef)(),ye=Object(G.useRef)(!1),le=Object(G.useRef)(),ue=Object(G.useState)(!1),Z=Object(D.a)(ue,2),te=Z[0],Ae=Z[1];function de(){var Je;return He.current&&(Je=new L.default(function(bt){var dt=Object(z.a)(bt),Lt;try{for(dt.s();!(Lt=dt.n()).done;){var Yt=Lt.value;(Yt.target.offsetHeight>0||Yt.target.offsetWidth>0)&&Ie.current.instance.layout()}}catch(Er){dt.e(Er)}finally{dt.f()}}),Je.observe(He.current)),Je}function Be(){O.b.warn(decodeURIComponent(c))}var Ne=function(){var bt=Ie.current.instance;if(_e!=null&&bt&&te){var dt=bt.getModel();dt&&_e!==dt.getValue()&&(p=!0,dt.setValue(_e),bt.layout(),p=!1)}};Object(G.useEffect)(function(){Me.current&&clearTimeout(Me.current),Me.current=setTimeout(function(){Ne()},500)},[_e,te,Ie.current]),Object(G.useEffect)(function(){if(ft&&Ie.current&&Ie.current.instance){var Je=Ie.current.instance;Je.changeViewZones(function(dt){var Lt=document.createElement("div");Lt.style.padding="10px 20px",Lt.style.width="calc(100% - 20px)",Lt.className="my-error-line-wrp",Lt.innerHTML=Ue,dt.addZone({afterLineNumber:ft||11,heightInLines:3,domNode:Lt})});var bt={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}};Je.addOverlayWidget(bt),Je.revealPositionInCenter({lineNumber:20,column:1})}},[ft,Ie.current,te]);function Xe(){var Je=Ie.current.instance;if(Je){var bt=Je.getSelection(),dt=Ie.current.pastePos||{},Lt=new U.Range(dt.startLineNumber||bt.endLineNumber,dt.startColumn||bt.endColumn,dt.endLineNumber||bt.endLineNumber,dt.endColumn||bt.endColumn);setTimeout(function(){Je.executeEdits("",[{range:Lt,text:""}])},300)}}function ct(Je){(window.navigator.platform.match("Mac")?Je.metaKey:Je.ctrlKey)&&Je.keyCode==83&&(Je.preventDefault(),it())}var ut=function(){if(W&&Ie.current.instance){var bt=Ie.current.instance.getContentHeight();wt(bt<me?me:bt)}else wt(me)};function st(Je){var bt=document.createEvent("MouseEvents");bt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Je.dispatchEvent(bt)}function Nt(Je,bt){var dt=window.URL||window.webkitURL||window,Lt=new Blob([bt]),Yt=document.createElementNS("http://www.w3.org/1999/xhtml","a");Yt.href=dt.createObjectURL(Lt),Yt.download=Je,st(Yt)}Object(G.useEffect)(function(){ut()},[ut]),Object(G.useEffect)(function(){He.current&&!te&&q.e(27).then(q.t.bind(null,"M/lh",7)).then(function(Je){try{U=Je,Ie.current.instance=U.editor.create(He.current,{value:_e,language:R(xe),theme:at,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},Ge);var bt=Ie.current.instance;if(nt(bt,U),setTimeout(function(){ut(),Ie.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Nt(At||"educoder.txt",bt.getValue())}})},500),Ie.current.subscription=bt.onDidChangeModelContent(function(Lt){ye.current?clearTimeout(le.current):(ut(),we(bt.getValue(),Lt)),le.current=setTimeout(function(){ye.current=!1},500)}),window.Monaco||E(U),oe&&(bt.addCommand(U.KeyMod.CtrlCmd|U.KeyMod.Shift|U.KeyCode.KEY_V,function(){return Be(),null}),bt.addCommand(U.KeyMod.CtrlCmd|U.KeyCode.KEY_C,function(){return Be(),null})),window.Monaco=U,je&&bt.onDidBlurEditorWidget(function(){je(bt.getValue())}),Ye&&bt.onDidFocusEditorText(function(){Ye(bt.getValue())}),oe){bt.addCommand(U.KeyMod.CtrlCmd|U.KeyCode.KEY_V,function(){return Be(),null}),bt.onDidPaste(function(Lt){Ie.current.pastePos=Lt});try{window.addEventListener("paste",Xe)}catch(Lt){}}var dt=de();return Ae(!0),function(){var Lt=Ie.current.instance;Lt.dispose();var Yt=Lt.getModel();Yt&&Yt.dispose(),Ie.current.subscription&&Ie.current.subscription.dispose(),oe&&window.removeEventListener("paste",Xe),dt.unobserve(He.current)}}catch(Lt){}})},[]),Object(G.useEffect)(function(){var Je=Ie.current.instance;if(Je&&te)return document.addEventListener("keydown",ct,!1),function(){document.removeEventListener("keydown",ct)}},[it,te]),Object(G.useEffect)(function(){var Je=Ie.current.instance;if(Je&&te){var bt=R(xe);U.editor.setModelLanguage(Je.getModel(),bt),console.log("language:",xe,Je.getModel(),bt)}},[xe,te]),Object(G.useEffect)(function(){var Je=Ie.current.instance;Je&&te&&U.editor.setTheme(at)},[at,te]),Object(G.useEffect)(function(){var Je=Ie.current.instance;Je&&te&&(Je.updateOptions(Object(ve.a)({},Ee)),setTimeout(function(){Je.getModel().updateOptions(Object(ve.a)({},Ee))},200))},[JSON.stringify(Ee),te]),Object(G.useEffect)(function(){var Je=Ie.current.instance;Je&&te&&Je.layout()},[Y,me,te]);var pt=Object(G.useState)(l(Y)),et=Object(D.a)(pt,2),er=et[0],qt=et[1],Ot=Object(G.useState)(l(me)),mt=Object(D.a)(Ot,2),yt=mt[0],wt=mt[1],Pt=Object(ve.a)(Object(ve.a)({},Fe),{},{width:er,height:yt});return P.a.createElement("div",{className:"my-monaco-editor",ref:He,style:Pt})};function j(J){var k=J.width,Y=k===void 0?"100%":k,ne=J.height,me=ne===void 0?"100%":ne,_e=J.original,Oe=J.modified,xe=J.language,Se=J.options,Fe=Se===void 0?{}:Se,Pe=Object(G.useRef)(),Ee=Object(G.useState)(null),he=Object(D.a)(Ee,2),Ge=he[0],lt=he[1];function at(W){var F;return Pe.current&&(F=new L.default(function(oe){var re=Object(z.a)(oe),we;try{for(re.s();!(we=re.n()).done;){var be=we.value;(be.target.offsetHeight>0||be.target.offsetWidth>0)&&W.layout()}}catch(nt){re.e(nt)}finally{re.f()}}),F.observe(Pe.current)),F}Object(G.useEffect)(function(){Pe.current&&q.e(27).then(q.t.bind(null,"M/lh",7)).then(function(W){U=W;var F=U.editor.createDiffEditor(Pe.current,Object(ve.a)(Object(ve.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Fe),{},{wordWrap:!0}));lt(F);var oe=at(F);return function(){F.dispose();var re=F.getModel();re&&re.dispose(),oe.unobserve(Pe.current)}})},[]),Object(G.useEffect)(function(){Ge&&Ge.setModel({original:U.editor.createModel(_e,xe),modified:U.editor.createModel(Oe,xe)})},[_e,Oe,xe,Ge]);var je=l(Y),it=l(me),ee={width:je,height:it};return P.a.createElement("div",{className:"my-diff-editor",ref:Pe,style:ee})}},bT9E:function(vt,$e,q){"use strict";q.d($e,"a",function(){return V});var ve=q("VTBJ");function V(O,z){var D=Object(ve.a)({},O);return Array.isArray(z)&&z.forEach(function(I){delete D[I]}),D}},biw7:function(vt,$e,q){"use strict";var ve=q("q1tI"),V=q.n(ve),O=ve.createContext(null);$e.a=O},crp1:function(vt,$e,q){"use strict";q.d($e,"b",function(){return Ot}),q.d($e,"a",function(){return Pt});var ve={},V=function(ie,ae,ce,Te,We){var Ze=ve[ae]||(ve[ae]=URL.createObjectURL(new Blob([ie],{type:"text/javascript"}))),M=new Worker(Ze);return M.onerror=function(d){return We(d.error,null)},M.onmessage=function(d){return We(null,d.data)},M.postMessage(ce,Te),M},O=Uint8Array,z=Uint16Array,D=Uint32Array,I=new O([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),G=new O([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),P=new O([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),L=function(ie,ae){for(var ce=new z(31),Te=0;Te<31;++Te)ce[Te]=ae+=1<<ie[Te-1];for(var We=new D(ce[30]),Te=1;Te<30;++Te)for(var Ze=ce[Te];Ze<ce[Te+1];++Ze)We[Ze]=Ze-ce[Te]<<5|Te;return[ce,We]},S=L(I,2),_=S[0],b=S[1];_[28]=258,b[258]=28;for(var u=L(G,0),o=u[0],r=u[1],A=new z(32768),s=0;s<32768;++s){var t=(s&43690)>>>1|(s&21845)<<1;t=(t&52428)>>>2|(t&13107)<<2,t=(t&61680)>>>4|(t&3855)<<4,A[s]=((t&65280)>>>8|(t&255)<<8)>>>1}for(var n=function(ie,ae,ce){for(var Te=ie.length,We=0,Ze=new z(ae);We<Te;++We)++Ze[ie[We]-1];var M=new z(ae);for(We=0;We<ae;++We)M[We]=M[We-1]+Ze[We-1]<<1;var d;if(ce){d=new z(1<<ae);var m=15-ae;for(We=0;We<Te;++We)if(ie[We])for(var N=We<<4|ie[We],X=ae-ie[We],H=M[ie[We]-1]++<<X,fe=H|(1<<X)-1;H<=fe;++H)d[A[H]>>>m]=N}else for(d=new z(Te),We=0;We<Te;++We)d[We]=A[M[ie[We]-1]++]>>>15-ie[We];return d},i=new O(288),s=0;s<144;++s)i[s]=8;for(var s=144;s<256;++s)i[s]=9;for(var s=256;s<280;++s)i[s]=7;for(var s=280;s<288;++s)i[s]=8;for(var B=new O(32),s=0;s<32;++s)B[s]=5;var w=n(i,9,0),y=n(i,9,1),x=n(B,5,0),E=n(B,5,1),c=function(ie){for(var ae=ie[0],ce=1;ce<ie.length;++ce)ie[ce]>ae&&(ae=ie[ce]);return ae},e=function(ie,ae,ce){var Te=ae/8>>0;return(ie[Te]|ie[Te+1]<<8)>>>(ae&7)&ce},a=function(ie,ae){var ce=ae/8>>0;return(ie[ce]|ie[ce+1]<<8|ie[ce+2]<<16)>>>(ae&7)},l=function(ie){return(ie/8>>0)+(ie&7&&1)},g=function(ie,ae,ce){(ae==null||ae<0)&&(ae=0),(ce==null||ce>ie.length)&&(ce=ie.length);var Te=new(ie instanceof z?z:ie instanceof D?D:O)(ce-ae);return Te.set(ie.subarray(ae,ce)),Te},p=function(ie,ae,ce){var Te=ie.length,We=!ae||ce,Ze=!ce||ce.i;ce||(ce={}),ae||(ae=new O(Te*3));var M=function($t){var _r=ae.length;if($t>_r){var Zt=new O(Math.max(_r*2,$t));Zt.set(ae),ae=Zt}},d=ce.f||0,m=ce.p||0,N=ce.b||0,X=ce.l,H=ce.d,fe=ce.m,ke=ce.n,rt=Te*8;do{if(!X){ce.f=d=e(ie,m,1);var ot=e(ie,m+1,3);if(m+=3,ot)if(ot==1)X=y,H=E,fe=9,ke=5;else if(ot==2){var Bt=e(ie,m,31)+257,Mt=e(ie,m+10,15)+4,Ar=Bt+e(ie,m+5,31)+1;m+=14;for(var Wt=new O(Ar),ir=new O(19),kt=0;kt<Mt;++kt)ir[P[kt]]=e(ie,m+kt*3,7);m+=Mt*3;var br=c(ir),fr=(1<<br)-1;if(!Ze&&m+Ar*(br+7)>rt)break;for(var Jt=n(ir,br,1),kt=0;kt<Ar;){var Le=Jt[e(ie,m,fr)];m+=Le&15;var Ke=Le>>>4;if(Ke<16)Wt[kt++]=Ke;else{var Ht=0,Gt=0;for(Ke==16?(Gt=3+e(ie,m,3),m+=2,Ht=Wt[kt-1]):Ke==17?(Gt=3+e(ie,m,7),m+=3):Ke==18&&(Gt=11+e(ie,m,127),m+=7);Gt--;)Wt[kt++]=Ht}}var Ut=Wt.subarray(0,Bt),Kt=Wt.subarray(Bt);fe=c(Ut),ke=c(Kt),X=n(Ut,fe,1),H=n(Kt,ke,1)}else throw"invalid block type";else{var Ke=l(m)+4,_t=ie[Ke-4]|ie[Ke-3]<<8,gt=Ke+_t;if(gt>Te){if(Ze)throw"unexpected EOF";break}We&&M(N+_t),ae.set(ie.subarray(Ke,gt),N),ce.b=N+=_t,ce.p=m=gt*8;continue}if(m>rt)throw"unexpected EOF"}We&&M(N+131072);for(var Qt=(1<<fe)-1,or=(1<<ke)-1,Vt=fe+ke+18;Ze||m+Vt<rt;){var Ht=X[a(ie,m)&Qt],ar=Ht>>>4;if(m+=Ht&15,m>rt)throw"unexpected EOF";if(!Ht)throw"invalid length/literal";if(ar<256)ae[N++]=ar;else if(ar==256){X=null;break}else{var rr=ar-254;if(ar>264){var kt=ar-257,Dt=I[kt];rr=e(ie,m,(1<<Dt)-1)+_[kt],m+=Dt}var jt=H[a(ie,m)&or],Ft=jt>>>4;if(!jt)throw"invalid distance";m+=jt&15;var Kt=o[Ft];if(Ft>3){var Dt=G[Ft];Kt+=a(ie,m)&(1<<Dt)-1,m+=Dt}if(m>rt)throw"unexpected EOF";We&&M(N+131072);for(var tr=N+rr;N<tr;N+=4)ae[N]=ae[N-Kt],ae[N+1]=ae[N+1-Kt],ae[N+2]=ae[N+2-Kt],ae[N+3]=ae[N+3-Kt];N=tr}}ce.l=X,ce.p=m,ce.b=N,X&&(d=1,ce.m=fe,ce.d=H,ce.n=ke)}while(!d);return N==ae.length?ae:g(ae,0,N)},f=function(ie,ae,ce){ce<<=ae&7;var Te=ae/8>>0;ie[Te]|=ce,ie[Te+1]|=ce>>>8},R=function(ie,ae,ce){ce<<=ae&7;var Te=ae/8>>0;ie[Te]|=ce,ie[Te+1]|=ce>>>8,ie[Te+2]|=ce>>>16},U=function(ie,ae){for(var ce=[],Te=0;Te<ie.length;++Te)ie[Te]&&ce.push({s:Te,f:ie[Te]});var We=ce.length,Ze=ce.slice();if(!We)return[new O(0),0];if(We==1){var M=new O(ce[0].s+1);return M[ce[0].s]=1,[M,1]}ce.sort(function(Ar,Wt){return Ar.f-Wt.f}),ce.push({s:-1,f:25001});var d=ce[0],m=ce[1],N=0,X=1,H=2;for(ce[0]={s:-1,f:d.f+m.f,l:d,r:m};X!=We-1;)d=ce[ce[N].f<ce[H].f?N++:H++],m=ce[N!=X&&ce[N].f<ce[H].f?N++:H++],ce[X++]={s:-1,f:d.f+m.f,l:d,r:m};for(var fe=Ze[0].s,Te=1;Te<We;++Te)Ze[Te].s>fe&&(fe=Ze[Te].s);var ke=new z(fe+1),rt=Q(ce[X-1],ke,0);if(rt>ae){var Te=0,ot=0,Ke=rt-ae,_t=1<<Ke;for(Ze.sort(function(Wt,ir){return ke[ir.s]-ke[Wt.s]||Wt.f-ir.f});Te<We;++Te){var gt=Ze[Te].s;if(ke[gt]>ae)ot+=_t-(1<<rt-ke[gt]),ke[gt]=ae;else break}for(ot>>>=Ke;ot>0;){var Bt=Ze[Te].s;ke[Bt]<ae?ot-=1<<ae-ke[Bt]++-1:++Te}for(;Te>=0&&ot;--Te){var Mt=Ze[Te].s;ke[Mt]==ae&&(--ke[Mt],++ot)}rt=ae}return[new O(ke),rt]},Q=function(ie,ae,ce){return ie.s==-1?Math.max(Q(ie.l,ae,ce+1),Q(ie.r,ae,ce+1)):ae[ie.s]=ce},j=function(ie){for(var ae=ie.length;ae&&!ie[--ae];);for(var ce=new z(++ae),Te=0,We=ie[0],Ze=1,M=function(m){ce[Te++]=m},d=1;d<=ae;++d)if(ie[d]==We&&d!=ae)++Ze;else{if(!We&&Ze>2){for(;Ze>138;Ze-=138)M(32754);Ze>2&&(M(Ze>10?Ze-11<<5|28690:Ze-3<<5|12305),Ze=0)}else if(Ze>3){for(M(We),--Ze;Ze>6;Ze-=6)M(8304);Ze>2&&(M(Ze-3<<5|8208),Ze=0)}for(;Ze--;)M(We);Ze=1,We=ie[d]}return[ce.subarray(0,Te),ae]},J=function(ie,ae){for(var ce=0,Te=0;Te<ae.length;++Te)ce+=ie[Te]*ae[Te];return ce},k=function(ie,ae,ce){var Te=ce.length,We=l(ae+2);ie[We]=Te&255,ie[We+1]=Te>>>8,ie[We+2]=ie[We]^255,ie[We+3]=ie[We+1]^255;for(var Ze=0;Ze<Te;++Ze)ie[We+Ze+4]=ce[Ze];return(We+4+Te)*8},Y=function(ie,ae,ce,Te,We,Ze,M,d,m,N,X){f(ae,X++,ce),++We[256];for(var H=U(We,15),fe=H[0],ke=H[1],rt=U(Ze,15),ot=rt[0],Ke=rt[1],_t=j(fe),gt=_t[0],Bt=_t[1],Mt=j(ot),Ar=Mt[0],Wt=Mt[1],ir=new z(19),kt=0;kt<gt.length;++kt)ir[gt[kt]&31]++;for(var kt=0;kt<Ar.length;++kt)ir[Ar[kt]&31]++;for(var br=U(ir,7),fr=br[0],Jt=br[1],Le=19;Le>4&&!fr[P[Le-1]];--Le);var Ht=N+5<<3,Gt=J(We,i)+J(Ze,B)+M,Ut=J(We,fe)+J(Ze,ot)+M+14+3*Le+J(ir,fr)+(2*ir[16]+3*ir[17]+7*ir[18]);if(Ht<=Gt&&Ht<=Ut)return k(ae,X,ie.subarray(m,m+N));var Kt,Qt,or,Vt;if(f(ae,X,1+(Ut<Gt)),X+=2,Ut<Gt){Kt=n(fe,ke,0),Qt=fe,or=n(ot,Ke,0),Vt=ot;var ar=n(fr,Jt,0);f(ae,X,Bt-257),f(ae,X+5,Wt-1),f(ae,X+10,Le-4),X+=14;for(var kt=0;kt<Le;++kt)f(ae,X+3*kt,fr[P[kt]]);X+=3*Le;for(var rr=[gt,Ar],Dt=0;Dt<2;++Dt)for(var jt=rr[Dt],kt=0;kt<jt.length;++kt){var Ft=jt[kt]&31;f(ae,X,ar[Ft]),X+=fr[Ft],Ft>15&&(f(ae,X,jt[kt]>>>5&127),X+=jt[kt]>>>12)}}else Kt=w,Qt=i,or=x,Vt=B;for(var kt=0;kt<d;++kt)if(Te[kt]>255){var Ft=Te[kt]>>>18&31;R(ae,X,Kt[Ft+257]),X+=Qt[Ft+257],Ft>7&&(f(ae,X,Te[kt]>>>23&31),X+=I[Ft]);var tr=Te[kt]&31;R(ae,X,or[tr]),X+=Vt[tr],tr>3&&(R(ae,X,Te[kt]>>>5&8191),X+=G[tr])}else R(ae,X,Kt[Te[kt]]),X+=Qt[Te[kt]];return R(ae,X,Kt[256]),X+Qt[256]},ne=new D([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),me=new O(0),_e=function(ie,ae,ce,Te,We,Ze){var M=ie.length,d=new O(Te+M+5*(1+Math.floor(M/7e3))+We),m=d.subarray(Te,d.length-We),N=0;if(!ae||M<8)for(var X=0;X<=M;X+=65535){var H=X+65535;H<M?N=k(m,N,ie.subarray(X,H)):(m[X]=Ze,N=k(m,N,ie.subarray(X,M)))}else{for(var fe=ne[ae-1],ke=fe>>>13,rt=fe&8191,ot=(1<<ce)-1,Ke=new z(32768),_t=new z(ot+1),gt=Math.ceil(ce/3),Bt=2*gt,Mt=function(dr){return(ie[dr]^ie[dr+1]<<gt^ie[dr+2]<<Bt)&ot},Ar=new D(25e3),Wt=new z(288),ir=new z(32),kt=0,br=0,X=0,fr=0,Jt=0,Le=0;X<M;++X){var Ht=Mt(X),Gt=X&32767,Ut=_t[Ht];if(Ke[Gt]=Ut,_t[Ht]=Gt,Jt<=X){var Kt=M-X;if((kt>7e3||fr>24576)&&Kt>423){N=Y(ie,m,0,Ar,Wt,ir,br,fr,Le,X-Le,N),fr=kt=br=0,Le=X;for(var Qt=0;Qt<286;++Qt)Wt[Qt]=0;for(var Qt=0;Qt<30;++Qt)ir[Qt]=0}var or=2,Vt=0,ar=rt,rr=Gt-Ut&32767;if(Kt>2&&Ht==Mt(X-rr))for(var Dt=Math.min(ke,Kt)-1,jt=Math.min(32767,X),Ft=Math.min(258,Kt);rr<=jt&&--ar&&Gt!=Ut;){if(ie[X+or]==ie[X+or-rr]){for(var tr=0;tr<Ft&&ie[X+tr]==ie[X+tr-rr];++tr);if(tr>or){if(or=tr,Vt=rr,tr>Dt)break;for(var $t=Math.min(rr,tr-2),_r=0,Qt=0;Qt<$t;++Qt){var Zt=X-rr+Qt+32768&32767,Lr=Ke[Zt],pr=Zt-Lr+32768&32767;pr>_r&&(_r=pr,Ut=Zt)}}}Gt=Ut,Ut=Ke[Gt],rr+=Gt-Ut+32768&32767}if(Vt){Ar[fr++]=268435456|b[or]<<18|r[Vt];var Hr=b[or]&31,Nr=r[Vt]&31;br+=I[Hr]+G[Nr],++Wt[257+Hr],++ir[Nr],Jt=X+or,++kt}else Ar[fr++]=ie[X],++Wt[ie[X]]}}N=Y(ie,m,Ze,Ar,Wt,ir,br,fr,Le,X-Le,N),Ze||(N=k(m,N,me))}return g(d,0,Te+l(N)+We)},Oe=function(){for(var ie=new D(256),ae=0;ae<256;++ae){for(var ce=ae,Te=9;--Te;)ce=(ce&1&&3988292384)^ce>>>1;ie[ae]=ce}return ie}(),xe=function(){var ie=4294967295;return{p:function(ae){for(var ce=ie,Te=0;Te<ae.length;++Te)ce=Oe[ce&255^ae[Te]]^ce>>>8;ie=ce},d:function(){return ie^4294967295}}},Se=function(){var ie=1,ae=0;return{p:function(ce){for(var Te=ie,We=ae,Ze=ce.length,M=0;M!=Ze;){for(var d=Math.min(M+5552,Ze);M<d;++M)Te+=ce[M],We+=Te;Te%=65521,We%=65521}ie=Te,ae=We},d:function(){return(ie>>>8<<16|(ae&255)<<8|ae>>>8)+((ie&255)<<23)*2}}},Fe=function(ie,ae,ce,Te,We){return _e(ie,ae.level==null?6:ae.level,ae.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(ie.length)))*1.5):12+ae.mem,ce,Te,!We)},Pe=function(ie,ae){var ce={};for(var Te in ie)ce[Te]=ie[Te];for(var Te in ae)ce[Te]=ae[Te];return ce},Ee=function(ie,ae,ce){for(var Te=ie(),We=ie.toString(),Ze=We.slice(We.indexOf("[")+1,We.lastIndexOf("]")).replace(/ /g,"").split(","),M=0;M<Te.length;++M){var d=Te[M],m=Ze[M];if(typeof d=="function"){ae+=";"+m+"=";var N=d.toString();if(d.prototype)if(N.indexOf("[native code]")!=-1){var X=N.indexOf(" ",8)+1;ae+=N.slice(X,N.indexOf("(",X))}else{ae+=N;for(var H in d.prototype)ae+=";"+m+".prototype."+H+"="+d.prototype[H].toString()}else ae+=N}else ce[m]=d}return[ae,ce]},he=[],Ge=function(ie){var ae=[];for(var ce in ie)(ie[ce]instanceof O||ie[ce]instanceof z||ie[ce]instanceof D)&&ae.push((ie[ce]=new ie[ce].constructor(ie[ce])).buffer);return ae},lt=function(ie,ae,ce,Te){var We;if(!he[ce]){for(var Ze="",M={},d=ie.length-1,m=0;m<d;++m)We=Ee(ie[m],Ze,M),Ze=We[0],M=We[1];he[ce]=Ee(ie[d],Ze,M)}var N=Pe({},he[ce][1]);return V(he[ce][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+ae.toString()+"}",ce,N,Ge(N),Te)},at=function(){return[O,z,D,I,G,P,_,o,y,E,A,n,c,e,a,l,g,p,de,oe,re]},je=function(){return[O,z,D,I,G,P,b,r,w,i,x,B,A,ne,me,n,f,R,U,Q,j,J,k,Y,l,g,_e,Fe,ue,oe]},it=function(){return[At,Ue,qe,xe,Oe]},ee=function(){return[ft,Ce]},W=function(){return[Qe,qe,Se]},F=function(){return[He]},oe=function(ie){return postMessage(ie,[ie.buffer])},re=function(ie){return ie&&ie.size&&new O(ie.size)},we=function(ie,ae,ce,Te,We,Ze){var M=lt(ce,Te,We,function(d,m){M.terminate(),Ze(d,m)});return ae.consume||(ie=new O(ie)),M.postMessage([ie,ae],[ie.buffer]),function(){M.terminate()}},be=function(ie){return ie.ondata=function(ae,ce){return postMessage([ae,ce],[ae.buffer])},function(ae){return ie.push(ae.data[0],ae.data[1])}},nt=function(ie,ae,ce,Te,We){var Ze,M=lt(ie,Te,We,function(d,m){d?(M.terminate(),ae.ondata.call(ae,d)):(m[1]&&M.terminate(),ae.ondata.call(ae,d,m[0],m[1]))});M.postMessage(ce),ae.push=function(d,m){if(Ze)throw"stream finished";if(!ae.ondata)throw"no stream handler";M.postMessage([d,Ze=m],[d.buffer])},ae.terminate=function(){M.terminate()}},tt=function(ie,ae){return ie[ae]|ie[ae+1]<<8},Ye=function(ie,ae){return(ie[ae]|ie[ae+1]<<8|ie[ae+2]<<16)+(ie[ae+3]<<23)*2},qe=function(ie,ae,ce){for(;ce;++ae)ie[ae]=ce,ce>>>=8},At=function(ie,ae){var ce=ae.filename;if(ie[0]=31,ie[1]=139,ie[2]=8,ie[8]=ae.level<2?4:ae.level==9?2:0,ie[9]=3,ae.mtime!=0&&qe(ie,4,Math.floor(new Date(ae.mtime||Date.now())/1e3)),ce){ie[3]=8;for(var Te=0;Te<=ce.length;++Te)ie[Te+10]=ce.charCodeAt(Te)}},ft=function(ie){if(ie[0]!=31||ie[1]!=139||ie[2]!=8)throw"invalid gzip data";var ae=ie[3],ce=10;ae&4&&(ce+=ie[10]|(ie[11]<<8)+2);for(var Te=(ae>>3&1)+(ae>>4&1);Te>0;Te-=!ie[ce++]);return ce+(ae&2)},Ce=function(ie){var ae=ie.length;return(ie[ae-4]|ie[ae-3]<<8|ie[ae-2]<<16)+2*(ie[ae-1]<<23)},Ue=function(ie){return 10+(ie.filename&&ie.filename.length+1||0)},Qe=function(ie,ae){var ce=ae.level,Te=ce==0?0:ce<6?1:ce==9?3:2;ie[0]=120,ie[1]=Te<<6|(Te?32-2*Te:1)},He=function(ie){if((ie[0]&15)!=8||ie[0]>>>4>7||(ie[0]<<8|ie[1])%31)throw"invalid zlib data";if(ie[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function Ie(ie,ae){return!ae&&typeof ie=="function"&&(ae=ie,ie={}),this.ondata=ae,ie}var Me=function(){function ie(ae,ce){!ce&&typeof ae=="function"&&(ce=ae,ae={}),this.ondata=ce,this.o=ae||{}}return ie.prototype.p=function(ae,ce){this.ondata(Fe(ae,this.o,0,0,!ce),ce)},ie.prototype.push=function(ae,ce){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";this.d=ce,this.p(ae,ce||!1)},ie}(),ye=function(){function ie(ae,ce){nt([je,function(){return[be,Me]}],this,Ie.call(this,ae,ce),function(Te){var We=new Me(Te.data);onmessage=be(We)},6)}return ie}();function le(ie,ae,ce){if(ce||(ce=ae,ae={}),typeof ce!="function")throw"no callback";return we(ie,ae,[je],function(Te){return oe(ue(Te.data[0],Te.data[1]))},0,ce)}function ue(ie,ae){return ae===void 0&&(ae={}),Fe(ie,ae,0,0)}var Z=function(){function ie(ae){this.s={},this.p=new O(0),this.ondata=ae}return ie.prototype.e=function(ae){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";var ce=this.p.length,Te=new O(ce+ae.length);Te.set(this.p),Te.set(ae,ce),this.p=Te},ie.prototype.c=function(ae){this.d=this.s.i=ae||!1;var ce=this.s.b,Te=p(this.p,this.o,this.s);this.ondata(g(Te,ce,this.s.b),this.d),this.o=g(Te,this.s.b-32768),this.s.b=this.o.length,this.p=g(this.p,this.s.p/8>>0),this.s.p&=7},ie.prototype.push=function(ae,ce){this.e(ae),this.c(ce)},ie}(),te=function(){function ie(ae){this.ondata=ae,nt([at,function(){return[be,Z]}],this,0,function(){var ce=new Z;onmessage=be(ce)},7)}return ie}();function Ae(ie,ae,ce){if(ce||(ce=ae,ae={}),typeof ce!="function")throw"no callback";return we(ie,ae,[at],function(Te){return oe(de(Te.data[0],re(Te.data[1])))},1,ce)}function de(ie,ae){return p(ie,ae)}var Be=function(){function ie(ae,ce){this.c=xe(),this.l=0,this.v=1,Me.call(this,ae,ce)}return ie.prototype.push=function(ae,ce){Me.prototype.push.call(this,ae,ce)},ie.prototype.p=function(ae,ce){this.c.p(ae),this.l+=ae.length;var Te=Fe(ae,this.o,this.v&&Ue(this.o),ce&&8,!ce);this.v&&(At(Te,this.o),this.v=0),ce&&(qe(Te,Te.length-8,this.c.d()),qe(Te,Te.length-4,this.l)),this.ondata(Te,ce)},ie}(),Ne=function(){function ie(ae,ce){nt([je,it,function(){return[be,Me,Be]}],this,Ie.call(this,ae,ce),function(Te){var We=new Be(Te.data);onmessage=be(We)},8)}return ie}();function Xe(ie,ae,ce){if(ce||(ce=ae,ae={}),typeof ce!="function")throw"no callback";return we(ie,ae,[je,it,function(){return[ct]}],function(Te){return oe(ct(Te.data[0],Te.data[1]))},2,ce)}function ct(ie,ae){ae===void 0&&(ae={});var ce=xe(),Te=ie.length;ce.p(ie);var We=Fe(ie,ae,Ue(ae),8),Ze=We.length;return At(We,ae),qe(We,Ze-8,ce.d()),qe(We,Ze-4,Te),We}var ut=function(){function ie(ae){this.v=1,Z.call(this,ae)}return ie.prototype.push=function(ae,ce){if(Z.prototype.e.call(this,ae),this.v){var Te=ft(this.p);if(Te>=this.p.length&&!ce)return;this.p=this.p.subarray(Te),this.v=0}if(ce){if(this.p.length<8)throw"invalid gzip stream";this.p=this.p.subarray(0,-8)}Z.prototype.c.call(this,ce)},ie}(),st=function(){function ie(ae){this.ondata=ae,nt([at,ee,function(){return[be,Z,ut]}],this,0,function(){var ce=new ut;onmessage=be(ce)},9)}return ie}();function Nt(ie,ae,ce){if(ce||(ce=ae,ae={}),typeof ce!="function")throw"no callback";return we(ie,ae,[at,ee,function(){return[pt]}],function(Te){return oe(pt(Te.data[0]))},3,ce)}function pt(ie,ae){return p(ie.subarray(ft(ie),-8),ae||new O(Ce(ie)))}var et=function(){function ie(ae,ce){this.c=Se(),this.v=1,Me.call(this,ae,ce)}return ie.prototype.push=function(ae,ce){Me.prototype.push.call(this,ae,ce)},ie.prototype.p=function(ae,ce){this.c.p(ae);var Te=Fe(ae,this.o,this.v&&2,ce&&4,!ce);this.v&&(Qe(Te,this.o),this.v=0),ce&&qe(Te,Te.length-4,this.c.d()),this.ondata(Te,ce)},ie}(),er=function(){function ie(ae,ce){nt([je,W,function(){return[be,Me,et]}],this,Ie.call(this,ae,ce),function(Te){var We=new et(Te.data);onmessage=be(We)},10)}return ie}();function qt(ie,ae,ce){if(ce||(ce=ae,ae={}),typeof ce!="function")throw"no callback";return we(ie,ae,[je,W,function(){return[Ot]}],function(Te){return oe(Ot(Te.data[0],Te.data[1]))},4,ce)}function Ot(ie,ae){ae===void 0&&(ae={});var ce=Se();ce.p(ie);var Te=Fe(ie,ae,2,4);return Qe(Te,ae),qe(Te,Te.length-4,ce.d()),Te}var mt=function(){function ie(ae){this.v=1,Z.call(this,ae)}return ie.prototype.push=function(ae,ce){if(Z.prototype.e.call(this,ae),this.v){if(this.p.length<2&&!ce)return;this.p=this.p.subarray(2),this.v=0}if(ce){if(this.p.length<4)throw"invalid zlib stream";this.p=this.p.subarray(0,-4)}Z.prototype.c.call(this,ce)},ie}(),yt=function(){function ie(ae){this.ondata=ae,nt([at,F,function(){return[be,Z,mt]}],this,0,function(){var ce=new mt;onmessage=be(ce)},11)}return ie}();function wt(ie,ae,ce){if(ce||(ce=ae,ae={}),typeof ce!="function")throw"no callback";return we(ie,ae,[at,F,function(){return[Pt]}],function(Te){return oe(Pt(Te.data[0],re(Te.data[1])))},5,ce)}function Pt(ie,ae){return p((He(ie),ie.subarray(2,-4)),ae)}var Je=function(){function ie(ae){this.G=ut,this.I=Z,this.Z=mt,this.ondata=ae}return ie.prototype.push=function(ae,ce){if(!this.ondata)throw"no stream handler";if(this.s)this.s.push(ae,ce);else{if(this.p&&this.p.length){var Te=new O(this.p.length+ae.length);Te.set(this.p),Te.set(ae,this.p.length)}else this.p=ae;if(this.p.length>2){var We=this,Ze=function(){We.ondata.apply(We,arguments)};this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(Ze):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(Ze):new this.Z(Ze),this.s.push(this.p,ce),this.p=null}}},ie}(),bt=function(){function ie(ae){this.G=st,this.I=te,this.Z=yt,this.ondata=ae}return ie.prototype.push=function(ae,ce){Je.prototype.push.call(this,ae,ce)},ie}();function dt(ie,ae,ce){if(ce||(ce=ae,ae={}),typeof ce!="function")throw"no callback";return ie[0]==31&&ie[1]==139&&ie[2]==8?Nt(ie,ae,ce):(ie[0]&15)!=8||ie[0]>>4>7||(ie[0]<<8|ie[1])%31?Ae(ie,ae,ce):wt(ie,ae,ce)}function Lt(ie,ae){return ie[0]==31&&ie[1]==139&&ie[2]==8?pt(ie,ae):(ie[0]&15)!=8||ie[0]>>4>7||(ie[0]<<8|ie[1])%31?de(ie,ae):Pt(ie,ae)}var Yt=function(ie,ae,ce,Te){for(var We in ie){var Ze=ie[We],M=ae+We;Ze instanceof O?ce[M]=[Ze,Te]:Array.isArray(Ze)?ce[M]=[Ze[0],Pe(Te,Ze[1])]:Yt(Ze,M+"/",ce,Te)}};function Er(ie,ae){var ce=ie.length;if(!ae&&typeof TextEncoder!="undefined")return new TextEncoder().encode(ie);for(var Te=new O(ie.length+(ie.length>>>1)),We=0,Ze=function(N){Te[We++]=N},M=0;M<ce;++M){if(We+5>Te.length){var d=new O(We+8+(ce-M<<1));d.set(Te),Te=d}var m=ie.charCodeAt(M);m<128||ae?Ze(m):m<2048?(Ze(192|m>>>6),Ze(128|m&63)):m>55295&&m<57344?(m=65536+(m&1023<<10)|ie.charCodeAt(++M)&1023,Ze(240|m>>>18),Ze(128|m>>>12&63),Ze(128|m>>>6&63),Ze(128|m&63)):(Ze(224|m>>>12),Ze(128|m>>>6&63),Ze(128|m&63))}return g(Te,0,We)}function Rr(ie,ae){var ce="";if(!ae&&typeof TextDecoder!="undefined")return new TextDecoder().decode(ie);for(var Te=0;Te<ie.length;){var We=ie[Te++];We<128||ae?ce+=String.fromCharCode(We):We<224?ce+=String.fromCharCode((We&31)<<6|ie[Te++]&63):We<240?ce+=String.fromCharCode((We&15)<<12|(ie[Te++]&63)<<6|ie[Te++]&63):(We=((We&15)<<18|(ie[Te++]&63)<<12|(ie[Te++]&63)<<6|ie[Te++]&63)-65536,ce+=String.fromCharCode(55296|We>>10,56320|We&1023))}return ce}var Tr=function(ie,ae){return ae+30+tt(ie,ae+26)+tt(ie,ae+28)},Sr=function(ie,ae,ce){var Te=tt(ie,ae+28),We=Rr(ie.subarray(ae+46,ae+46+Te),!(tt(ie,ae+8)&2048)),Ze=ae+46+Te,M=ce?Fr(ie,Ze):[Ye(ie,ae+20),Ye(ie,ae+24),Ye(ie,ae+42)],d=M[0],m=M[1],N=M[2];return[tt(ie,ae+10),d,m,We,Ze+tt(ie,ae+30)+tt(ie,ae+32),N]},Fr=function(ie,ae){for(;tt(ie,ae)!=1;ae+=4+tt(ie,ae+2));return[Ye(ie,ae+12),Ye(ie,ae+4),Ye(ie,ae+20)]},lr=function(ie,ae,ce,Te,We,Ze,M,d,m,N){var X=Ze.length,H=Te.length;qe(ie,ae,m!=null?33639248:67324752),ae+=4,m!=null&&(ie[ae]=20,ae+=2),ie[ae]=20,ae+=2,ie[ae++]=N==8&&(d.level==1?6:d.level<6?4:d.level==9?2:0),ie[ae++]=M&&8,ie[ae]=N,ae+=2;var fe=new Date(d.mtime||Date.now()),ke=fe.getFullYear()-1980;if(ke<0||ke>119)throw"date not in range 1980-2099";qe(ie,ae,(ke<<24)*2|fe.getMonth()+1<<21|fe.getDate()<<16|fe.getHours()<<11|fe.getMinutes()<<5|fe.getSeconds()>>>1),ae+=4,qe(ie,ae,ce),qe(ie,ae+4,H),qe(ie,ae+8,We),qe(ie,ae+12,X),ae+=16,m!=null&&(qe(ie,ae+=10,m),ae+=4),ie.set(Ze,ae),ae+=X,m==null&&ie.set(Te,ae)},Ir=function(ie,ae,ce,Te,We){qe(ie,ae,101010256),qe(ie,ae+8,ce),qe(ie,ae+10,ce),qe(ie,ae+12,Te),qe(ie,ae+16,We)};function kr(ie,ae,ce){if(ce||(ce=ae,ae={}),typeof ce!="function")throw"no callback";var Te={};Yt(ie,"",Te,ae);var We=Object.keys(Te),Ze=We.length,M=0,d=0,m=Ze,N=new Array(Ze),X=[],H=function(){for(var ot=0;ot<X.length;++ot)X[ot]()},fe=function(){var ot=new O(d+22),Ke=M,_t=d-M;d=0;for(var gt=0;gt<m;++gt){var Bt=N[gt];try{lr(ot,d,Bt.c,Bt.d,Bt.m,Bt.n,Bt.u,Bt.p,null,Bt.t),lr(ot,M,Bt.c,Bt.d,Bt.m,Bt.n,Bt.u,Bt.p,d,Bt.t),M+=46+Bt.n.length,d+=30+Bt.n.length+Bt.d.length}catch(Mt){return ce(Mt,null)}}Ir(ot,M,N.length,_t,Ke),ce(null,ot)};Ze||fe();for(var ke=function(ot){var Ke=We[ot],_t=Te[Ke],gt=_t[0],Bt=_t[1],Mt=xe(),Ar=gt.length;Mt.p(gt);var Wt=Er(Ke),ir=Wt.length,kt=Bt.level==0?0:8,br=function(fr,Jt){if(fr)H(),ce(fr,null);else{var Le=Jt.length;N[ot]={t:kt,d:Jt,m:Ar,c:Mt.d(),u:Ke.length!=Le,n:Wt,p:Bt},M+=30+ir+Le,d+=76+2*ir+Le,--Ze||fe()}};if(Wt.length>65535&&br("filename too long",null),!kt)br(null,gt);else if(Ar<16e4)try{br(null,ue(gt,Bt))}catch(fr){br(fr,null)}else X.push(le(gt,Bt,br))},rt=0;rt<m;++rt)ke(rt);return H}function Or(ie,ae){ae===void 0&&(ae={});var ce={},Te=[];Yt(ie,"",ce,ae);var We=0,Ze=0;for(var M in ce){var d=ce[M],m=d[0],N=d[1],X=N.level==0?0:8,H=Er(M),fe=H.length;if(H.length>65535)throw"filename too long";var ke=X?ue(m,N):m,rt=ke.length,ot=xe();ot.p(m),Te.push({t:X,d:ke,m:m.length,c:ot.d(),u:M.length!=fe,n:H,o:We,p:N}),We+=30+fe+rt,Ze+=76+2*fe+rt}for(var Ke=new O(Ze+22),_t=We,gt=Ze-We,Bt=0;Bt<Te.length;++Bt){var Mt=Te[Bt];lr(Ke,Mt.o,Mt.c,Mt.d,Mt.m,Mt.n,Mt.u,Mt.p,null,Mt.t),lr(Ke,We,Mt.c,Mt.d,Mt.m,Mt.n,Mt.u,Mt.p,Mt.o,Mt.t),We+=46+Mt.n.length}return Ir(Ke,We,Te.length,gt,_t),Ke}function Jr(ie,ae){if(typeof ae!="function")throw"no callback";for(var ce=[],Te=function(){for(var fe=0;fe<ce.length;++fe)ce[fe]()},We={},Ze=ie.length-22;Ye(ie,Ze)!=101010256;--Ze)if(!Ze||ie.length-Ze>65558){ae("invalid zip file",null);return}var M=tt(ie,Ze+8);M||ae(null,{});var d=M,m=Ye(ie,Ze+16),N=m==4294967295;if(N){if(Ze=Ye(ie,Ze-12),Ye(ie,Ze)!=101075792)throw"invalid zip file";d=M=Ye(ie,Ze+32),m=Ye(ie,Ze+48)}for(var X=function(fe){var ke=Sr(ie,m,N),rt=ke[0],ot=ke[1],Ke=ke[2],_t=ke[3],gt=ke[4],Bt=ke[5],Mt=Tr(ie,Bt);m=gt;var Ar=function(ir,kt){ir?(Te(),ae(ir,null)):(We[_t]=kt,--M||ae(null,We))};if(!rt)Ar(null,g(ie,Mt,Mt+ot));else if(rt==8){var Wt=ie.subarray(Mt,Mt+ot);if(ot<32e4)try{Ar(null,de(Wt,new O(Ke)))}catch(ir){Ar(ir,null)}else ce.push(Ae(Wt,{size:Ke},Ar))}else Ar("unknown compression type "+rt,null)},H=0;H<d;++H)X(H);return Te}function jr(ie){for(var ae={},ce=ie.length-22;Ye(ie,ce)!=101010256;--ce)if(!ce||ie.length-ce>65558)throw"invalid zip file";var Te=tt(ie,ce+8);if(!Te)return{};var We=Ye(ie,ce+16),Ze=We==4294967295;if(Ze){if(ce=Ye(ie,ce-12),Ye(ie,ce)!=101075792)throw"invalid zip file";Te=Ye(ie,ce+32),We=Ye(ie,ce+48)}for(var M=0;M<Te;++M){var d=Sr(ie,We,Ze),m=d[0],N=d[1],X=d[2],H=d[3],fe=d[4],ke=d[5],rt=Tr(ie,ke);if(We=fe,!m)ae[H]=g(ie,rt,rt+N);else if(m==8)ae[H]=de(ie.subarray(rt,rt+N),new O(X));else throw"unknown compression type "+m}return ae}},cw1j:function(vt,$e,q){"use strict";var ve=q("k1fw"),V=q("tJVT"),O=q("5NDa"),z=q("5rEg"),D=q("q1tI"),I=q.n(D),G=q("9Bee"),P=q("NKYn"),L=q("tJYV"),S=q.n(L),_=z.a.TextArea,b=function(o){var r=o.item,A=o.answerData,s=o.changeScoreData,t=o.textValue,n=o.textOnChange,i=n===void 0?function(){}:n,B=o.seeAnswerVisible,w=B===void 0?!0:B,y=Object(D.useState)([]),x=Object(V.a)(y,2),E=x[0],c=x[1],e=Object(D.useState)(!1),a=Object(V.a)(e,2),l=a[0],g=a[1];return Object(D.useEffect)(function(){s!=null&&s[r.q_position]?!l&&g(!0):l&&g(!1)},[s==null?void 0:s[r==null?void 0:r.q_position]]),Object(D.useEffect)(function(){for(var p=[],f=function(Q){var j,J=(r==null||((j=r.user_answer)===null||j===void 0)?void 0:j.find(function(k){return k.choice_id===Q+1}))||{choice_id:Q+1,answer_text:""};p.push(Object(ve.a)({},J))},R=0;R<(r==null?void 0:r.multi_count);R++)f(R);c(p)},[r==null?void 0:r.user_answer]),I.a.createElement("div",{className:S.a.fillBg},I.a.createElement("aside",{className:"font14 c-light-primary mb5"},"\u5B66\u751F\u7B54\u9898"),E==null?void 0:E.map(function(p,f){return I.a.createElement("div",null,I.a.createElement("span",null,"\u7B54\u6848(\u586B\u7A7A",f+1,"):"),I.a.createElement("div",null,I.a.createElement(G.a,{value:p==null?void 0:p.answer_text})))}),w&&I.a.createElement(P.a,{data:r}))};$e.a=b},dmUQ:function(vt,$e,q){"use strict";var ve=q("Ff2n"),V=q("rePB"),O=q("1OyB"),z=q("vuIU"),D=q("Ji7U"),I=q("md7G"),G=q("foSv"),P=q("q1tI"),L=q.n(P),S=q("TSYQ"),_=q.n(S),b=q("4IlW");function u(a,l){var g=Object.keys(a);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(a);l&&(p=p.filter(function(f){return Object.getOwnPropertyDescriptor(a,f).enumerable})),g.push.apply(g,p)}return g}function o(a){for(var l=1;l<arguments.length;l++){var g=arguments[l]!=null?arguments[l]:{};l%2?u(Object(g),!0).forEach(function(p){Object(V.a)(a,p,g[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(g)):u(Object(g)).forEach(function(p){Object.defineProperty(a,p,Object.getOwnPropertyDescriptor(g,p))})}return a}function r(a){var l=A();return function(){var p=Object(G.a)(a),f;if(l){var R=Object(G.a)(this).constructor;f=Reflect.construct(p,arguments,R)}else f=p.apply(this,arguments);return Object(I.a)(this,f)}}function A(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(a){return!1}}function s(){}function t(a){a.preventDefault()}var n=function(l){return l.replace(/[^\w.-]+/g,"")},i=200,B=600,w=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,y=function(l){return l!=null},x=function(l,g){return g===l||typeof g=="number"&&typeof l=="number"&&isNaN(g)&&isNaN(l)},E=function(a){Object(D.a)(g,a);var l=r(g);function g(p){var f;Object(O.a)(this,g),f=l.call(this,p),f.onKeyDown=function(Q){var j=f.props,J=j.onKeyDown,k=j.onPressEnter;if(Q.keyCode===b.a.UP){var Y=f.getRatio(Q);f.up(Q,Y,null),f.stop()}else if(Q.keyCode===b.a.DOWN){var ne=f.getRatio(Q);f.down(Q,ne,null),f.stop()}else Q.keyCode===b.a.ENTER&&k&&k(Q);if(f.recordCursorPosition(),f.lastKeyCode=Q.keyCode,J){for(var me=arguments.length,_e=new Array(me>1?me-1:0),Oe=1;Oe<me;Oe++)_e[Oe-1]=arguments[Oe];J.apply(void 0,[Q].concat(_e))}},f.onKeyUp=function(Q){var j=f.props.onKeyUp;if(f.stop(),f.recordCursorPosition(),j){for(var J=arguments.length,k=new Array(J>1?J-1:0),Y=1;Y<J;Y++)k[Y-1]=arguments[Y];j.apply(void 0,[Q].concat(k))}},f.onChange=function(Q){var j=f.props.onChange;f.state.focused&&(f.inputting=!0),f.rawInput=f.props.parser(f.getValueFromEvent(Q)),f.setState({inputValue:f.rawInput}),j(f.toNumber(f.rawInput))},f.onMouseUp=function(){var Q=f.props.onMouseUp;f.recordCursorPosition(),Q&&Q.apply(void 0,arguments)},f.onFocus=function(){var Q;f.setState({focused:!0}),(Q=f.props).onFocus.apply(Q,arguments)},f.onBlur=function(){var Q=f.props.onBlur;f.inputting=!1,f.setState({focused:!1});var j=f.getCurrentValidValue(f.state.inputValue),J=f.setValue(j,s);if(Q){var k=f.input.value,Y=f.getInputDisplayValue({focus:!1,value:J});f.input.value=Y&&Number(Y),Q.apply(void 0,arguments),f.input.value=k}},f.getRatio=function(Q){var j=1;return Q.metaKey||Q.ctrlKey?j=.1:Q.shiftKey&&(j=10),j},f.getFullNum=function(Q){return isNaN(Q)?Q:/e/i.test(String(Q))?Number(Q).toFixed(18).replace(/\.?0+$/,""):Q},f.getPrecision=function(Q){if(y(f.props.precision))return f.props.precision;var j=String(Q);if(j.indexOf("e-")>=0)return parseInt(j.slice(j.indexOf("e-")+2),10);var J=0;return j.indexOf(".")>=0&&(J=j.length-j.indexOf(".")-1),J},f.getInputDisplayValue=function(Q){var j=Q||f.state,J=j.focused,k=j.inputValue,Y=j.value,ne;J?ne=k:ne=f.toPrecisionAsStep(Y),ne==null&&(ne="");var me=f.formatWrapper(ne);return y(f.props.decimalSeparator)&&(me=me.toString().replace(".",f.props.decimalSeparator)),me},f.recordCursorPosition=function(){try{f.cursorStart=f.input.selectionStart,f.cursorEnd=f.input.selectionEnd,f.currentValue=f.input.value,f.cursorBefore=f.input.value.substring(0,f.cursorStart),f.cursorAfter=f.input.value.substring(f.cursorEnd)}catch(Q){}},f.restoreByAfter=function(Q){if(Q===void 0)return!1;var j=f.input.value,J=j.lastIndexOf(Q);if(J===-1)return!1;var k=f.cursorBefore.length;return f.lastKeyCode===b.a.DELETE&&f.cursorBefore.charAt(k-1)===Q[0]?(f.fixCaret(k,k),!0):J+Q.length===j.length?(f.fixCaret(J,J),!0):!1},f.partRestoreByAfter=function(Q){return Q===void 0?!1:Array.prototype.some.call(Q,function(j,J){var k=Q.substring(J);return f.restoreByAfter(k)})},f.isNotCompleteNumber=function(Q){return isNaN(Q)||Q===""||Q===null||Q&&Q.toString().indexOf(".")===Q.toString().length-1},f.stop=function(){f.autoStepTimer&&clearTimeout(f.autoStepTimer)},f.down=function(Q,j,J){f.pressingUpOrDown=!0,f.step("down",Q,j,J)},f.up=function(Q,j,J){f.pressingUpOrDown=!0,f.step("up",Q,j,J)},f.saveInput=function(Q){f.input=Q};var R=p.value;R===void 0&&(R=p.defaultValue),f.state={focused:p.autoFocus};var U=f.getValidValue(f.toNumber(R));return f.state=o(o({},f.state),{},{inputValue:f.toPrecisionAsStep(U),value:U}),f}return Object(z.a)(g,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(f){var R=this.props,U=R.value,Q=R.onChange,j=R.max,J=R.min,k=this.state.focused;if(f){if(!x(f.value,U)||!x(f.max,j)||!x(f.min,J)){var Y=k?U:this.getValidValue(U),ne;this.pressingUpOrDown?ne=Y:this.inputting?ne=this.rawInput:ne=this.toPrecisionAsStep(Y),this.setState({value:Y,inputValue:ne})}var me="value"in this.props?U:this.state.value;"max"in this.props&&f.max!==j&&typeof me=="number"&&me>j&&Q&&Q(j),"min"in this.props&&f.min!==J&&typeof me=="number"&&me<J&&Q&&Q(J)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var _e=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===b.a.BACKSPACE?_e=this.cursorStart-1:this.lastKeyCode===b.a.DELETE&&(_e=this.cursorStart):_e=this.input.value.length,this.fixCaret(_e,_e)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case b.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case b.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Oe){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(f){var R=f;return R===""?R="":this.isNotCompleteNumber(parseFloat(R))?R=this.state.value:R=this.getValidValue(R),this.toNumber(R)}},{key:"getValueFromEvent",value:function(f){var R=f.target.value.trim().replace(/。/g,".");return y(this.props.decimalSeparator)&&(R=R.replace(this.props.decimalSeparator,".")),R}},{key:"getValidValue",value:function(f){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,Q=parseFloat(f);return isNaN(Q)?f:(Q<R&&(Q=R),Q>U&&(Q=U),Q)}},{key:"setValue",value:function(f,R){var U=this.props.precision,Q=this.isNotCompleteNumber(parseFloat(f))?null:parseFloat(f),j=this.state.value,J=j===void 0?null:j,k=this.state.inputValue,Y=k===void 0?null:k,ne=typeof Q=="number"?Q.toFixed(U):"".concat(Q),me=Q!==J||ne!=="".concat(Y);return"value"in this.props?(Y=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:Y},R)):this.setState({value:Q,inputValue:this.toPrecisionAsStep(f)},R),me&&this.props.onChange(Q),Q}},{key:"getMaxPrecision",value:function(f){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,U=this.props,Q=U.precision,j=U.step;if(y(Q))return Q;var J=this.getPrecision(R),k=this.getPrecision(j),Y=this.getPrecision(f);return f?Math.max(Y,J+k):J+k}},{key:"getPrecisionFactor",value:function(f){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,U=this.getMaxPrecision(f,R);return Math.pow(10,U)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(f){return this.props.formatter?this.props.formatter(f):f}},{key:"toPrecisionAsStep",value:function(f){if(this.isNotCompleteNumber(f)||f==="")return f;var R=Math.abs(this.getMaxPrecision(f));return isNaN(R)?f.toString():Number(f).toFixed(R)}},{key:"toNumber",value:function(f){var R=this.props.precision,U=this.state.focused,Q=f&&f.length>16&&U;return this.isNotCompleteNumber(f)||Q?f:y(R)?Math.round(f*Math.pow(10,R))/Math.pow(10,R):Number(f)}},{key:"upStep",value:function(f,R){var U=this.props.step,Q=this.getPrecisionFactor(f,R),j=Math.abs(this.getMaxPrecision(f,R)),J=((Q*f+Q*U*R)/Q).toFixed(j);return this.toNumber(J)}},{key:"downStep",value:function(f,R){var U=this.props.step,Q=this.getPrecisionFactor(f,R),j=Math.abs(this.getMaxPrecision(f,R)),J=((Q*f-Q*U*R)/Q).toFixed(j);return this.toNumber(J)}},{key:"step",value:function(f,R){var U=this,Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=arguments.length>3?arguments[3]:void 0;this.stop(),R&&(R.persist(),R.preventDefault());var J=this.props;if(J.disabled)return;var k=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(k))return;var Y=this["".concat(f,"Step")](k,Q),ne=Y>J.max||Y<J.min;if(Y>J.max?Y=J.max:Y<J.min&&(Y=J.min),this.setValue(Y,null),this.setState({focused:!0},function(){U.pressingUpOrDown=!1}),ne)return;this.autoStepTimer=setTimeout(function(){U[f](R,Q,!0)},j?i:B)}},{key:"fixCaret",value:function(f,R){if(f===void 0||R===void 0||!this.input||!this.input.value)return;try{var U=this.input.selectionStart,Q=this.input.selectionEnd;(f!==U||R!==Q)&&this.input.setSelectionRange(f,R)}catch(j){}}},{key:"render",value:function(){var f,R=this.props,U=R.prefixCls,Q=R.disabled,j=R.readOnly,J=R.useTouch,k=R.autoComplete,Y=R.upHandler,ne=R.downHandler,me=R.className,_e=R.max,Oe=R.min,xe=R.style,Se=R.title,Fe=R.onMouseEnter,Pe=R.onMouseLeave,Ee=R.onMouseOver,he=R.onMouseOut,Ge=R.required,lt=R.onClick,at=R.tabIndex,je=R.type,it=R.placeholder,ee=R.id,W=R.inputMode,F=R.pattern,oe=R.step,re=R.maxLength,we=R.autoFocus,be=R.name,nt=R.onPaste,tt=R.onInput,Ye=Object(ve.a)(R,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),qe=this.state,At=qe.value,ft=qe.focused,Ce=_()(U,(f={},Object(V.a)(f,me,!!me),Object(V.a)(f,"".concat(U,"-disabled"),Q),Object(V.a)(f,"".concat(U,"-focused"),ft),f)),Ue={};Object.keys(Ye).forEach(function(de){(de.substr(0,5)==="data-"||de.substr(0,5)==="aria-"||de==="role")&&(Ue[de]=Ye[de])});var Qe=!j&&!Q,He=this.getInputDisplayValue(null),Ie=(At||At===0)&&(isNaN(At)||Number(At)>=_e),Me=(At||At===0)&&(isNaN(At)||Number(At)<=Oe),ye=Ie||Q||j,le=Me||Q||j,ue=_()("".concat(U,"-handler"),"".concat(U,"-handler-up"),Object(V.a)({},"".concat(U,"-handler-up-disabled"),ye)),Z=_()("".concat(U,"-handler"),"".concat(U,"-handler-down"),Object(V.a)({},"".concat(U,"-handler-down-disabled"),le)),te=J?{onTouchStart:ye?s:this.up,onTouchEnd:this.stop}:{onMouseDown:ye?s:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Ae=J?{onTouchStart:le?s:this.down,onTouchEnd:this.stop}:{onMouseDown:le?s:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return L.a.createElement("div",{className:Ce,style:xe,title:Se,onMouseEnter:Fe,onMouseLeave:Pe,onMouseOver:Ee,onMouseOut:he,onFocus:function(){return null},onBlur:function(){return null}},L.a.createElement("div",{className:"".concat(U,"-handler-wrap")},L.a.createElement("span",Object.assign({unselectable:"on"},te,{role:"button","aria-label":"Increase Value","aria-disabled":ye,className:ue}),Y||L.a.createElement("span",{unselectable:"on",className:"".concat(U,"-handler-up-inner"),onClick:t})),L.a.createElement("span",Object.assign({unselectable:"on"},Ae,{role:"button","aria-label":"Decrease Value","aria-disabled":le,className:Z}),ne||L.a.createElement("span",{unselectable:"on",className:"".concat(U,"-handler-down-inner"),onClick:t}))),L.a.createElement("div",{className:"".concat(U,"-input-wrap")},L.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Oe,"aria-valuemax":_e,"aria-valuenow":At,required:Ge,type:je,placeholder:it,onPaste:nt,onClick:lt,onMouseUp:this.onMouseUp,className:"".concat(U,"-input"),tabIndex:at,autoComplete:k,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Qe?this.onKeyDown:s,onKeyUp:Qe?this.onKeyUp:s,autoFocus:we,maxLength:re,readOnly:j,disabled:Q,max:_e,min:Oe,step:oe,name:be,title:Se,id:ee,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(He),pattern:F,inputMode:W,onInput:tt},Ue))))}}]),g}(L.a.Component);E.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:w,min:-w,step:1,style:{},onChange:s,onKeyDown:s,onPressEnter:s,onFocus:s,onBlur:s,parser:n,required:!1,autoComplete:"off"};var c=E,e=$e.a=c},fyJ8:function(vt,$e,q){"use strict";var ve=q("rePB"),V=q("VTBJ"),O=q("Ff2n"),z=q("U8pU"),D=q("q1tI"),I=q.n(D),G=q("TSYQ"),P=q.n(G),L=q("c+Xe"),S=q("sR1s");function _(A){return A&&Object(z.a)(A)==="object"&&!Array.isArray(A)&&!D.isValidElement(A)}function b(A){return typeof A=="string"?!0:Object(L.c)(A)}function u(A,s){var t,n=A.prefixCls,i=A.className,B=A.record,w=A.index,y=A.dataIndex,x=A.render,E=A.children,c=A.component,e=c===void 0?"td":c,a=A.colSpan,l=A.rowSpan,g=A.fixLeft,p=A.fixRight,f=A.firstFixLeft,R=A.lastFixLeft,U=A.firstFixRight,Q=A.lastFixRight,j=A.appendNode,J=A.additionalProps,k=J===void 0?{}:J,Y=A.ellipsis,ne=A.align,me=A.rowType,_e=A.isSticky,Oe="".concat(n,"-cell"),xe,Se;if(E)Se=E;else{var Fe=Object(S.b)(B,y);if(Se=Fe,x){var Pe=x(Fe,B,w);_(Pe)?(Se=Pe.children,xe=Pe.props):Se=Pe}}Object(z.a)(Se)==="object"&&!Array.isArray(Se)&&!D.isValidElement(Se)&&(Se=null),Y&&(R||U)&&(Se=D.createElement("span",{className:"".concat(Oe,"-content")},Se));var Ee=xe||{},he=Ee.colSpan,Ge=Ee.rowSpan,lt=Ee.style,at=Ee.className,je=Object(O.a)(Ee,["colSpan","rowSpan","style","className"]),it=he!==void 0?he:a,ee=Ge!==void 0?Ge:l;if(it===0||ee===0)return null;var W={},F=typeof g=="number",oe=typeof p=="number";F&&(W.position="sticky",W.left=g),oe&&(W.position="sticky",W.right=p);var re={};ne&&(re.textAlign=ne);var we,be=Y===!0?{showTitle:!0}:Y;be&&(be.showTitle||me==="header")&&(typeof Se=="string"||typeof Se=="number"?we=Se.toString():D.isValidElement(Se)&&typeof Se.props.children=="string"&&(we=Se.props.children));var nt=Object(V.a)(Object(V.a)(Object(V.a)({title:we},je),k),{},{colSpan:it&&it!==1?it:null,rowSpan:ee&&ee!==1?ee:null,className:P()(Oe,i,(t={},Object(ve.a)(t,"".concat(Oe,"-fix-left"),F),Object(ve.a)(t,"".concat(Oe,"-fix-left-first"),f),Object(ve.a)(t,"".concat(Oe,"-fix-left-last"),R),Object(ve.a)(t,"".concat(Oe,"-fix-right"),oe),Object(ve.a)(t,"".concat(Oe,"-fix-right-first"),U),Object(ve.a)(t,"".concat(Oe,"-fix-right-last"),Q),Object(ve.a)(t,"".concat(Oe,"-ellipsis"),Y),Object(ve.a)(t,"".concat(Oe,"-with-append"),j),Object(ve.a)(t,"".concat(Oe,"-fix-sticky"),(F||oe)&&_e),t),k.className,at),style:Object(V.a)(Object(V.a)(Object(V.a)(Object(V.a)({},k.style),re),W),lt),ref:b(e)?s:null});return D.createElement(e,Object.assign({},nt),j,Se)}var o=D.forwardRef(u);o.displayName="Cell";var r=D.memo(o,function(A,s){return s.shouldCellUpdate?!s.shouldCellUpdate(s.record,A.record):!1});$e.a=r},hQp1:function(vt,$e,q){"use strict";q.d($e,"a",function(){return V});var ve;(function(O){O.FirstPage="firstPage",O.PrevPage="prevPage",O.NextPage="nextPage"})(ve||(ve={}));var V;(function(O){O[O.Single=0]="Single",O[O.Multiple=1]="Multiple",O[O.Judge=2]="Judge",O[O.Fill=3]="Fill",O[O.Subjective=4]="Subjective",O[O.Shixun=5]="Shixun",O[O.Program=6]="Program",O[O.Combine=7]="Combine"})(V||(V={}))},hW8S:function(vt,$e,q){"use strict";q.d($e,"a",function(){return z}),q.d($e,"c",function(){return D}),q.d($e,"b",function(){return I});var ve=q("VTBJ"),V=q("Ff2n"),O=q("Kwbf"),z="RC_TABLE_INTERNAL_COL_DEFINE";function D(G){var P=G.expandable,L=Object(V.a)(G,["expandable"]);return"expandable"in G?Object(ve.a)(Object(ve.a)({},L),P):L}function I(G){return Object.keys(G).reduce(function(P,L){return(L.substr(0,5)==="data-"||L.substr(0,5)==="aria-")&&(P[L]=G[L]),P},{})}},k5F3:function(vt,$e,q){"use strict";var ve=q("g9YV"),V=q("wCAj"),O=q("9og8"),z=q("oBTY"),D=q("k1fw"),I=q("tJVT"),G=q("WmNS"),P=q.n(G),L=q("q1tI"),S=q.n(L),_=q("Ty5D"),b=q("9kvl"),u=q("uJ6K"),o=q.n(u),r=q("V0Rq"),A=q("9Bee"),s=q("1vsH"),t=function(i){var B,w,y,x,E=i.isPreview,c=E===void 0?!1:E,e=i.isExportBlank,a=e===void 0?!1:e,l=i.activeTabs,g=i.exercise,p=i.globalSetting,f=i.loading,R=i.user,U=i.dispatch,Q=Object(_.i)(),j=R.userInfo,J=Object(L.useState)(),k=Object(I.a)(J,2),Y=k[0],ne=k[1],me=Object(L.useState)(),_e=Object(I.a)(me,2),Oe=_e[0],xe=_e[1],Se=Object(L.useRef)(null),Fe=Object(L.useState)(21),Pe=Object(I.a)(Fe,2),Ee=Pe[0],he=Pe[1];Object(L.useEffect)(function(){Object(s.P)(l)||l==="2"&&Ge()},[Q.userId,Q.coursesId,Q.exerciseId,Q.categoryId,l]),Object(L.useEffect)(function(){Se.current&&he(Se.current.clientHeight)},[Se.current]),Object(L.useEffect)(function(){var it;if((it=g.exerciseExportHeadData)!==null&&it!==void 0&&it.title){var ee=g.exerciseExportHeadData;ne(Object(D.a)({},ee||{}));var W=ee||{},F=W.table,oe,re;(F!=null&&F.total_singles_scores||F!=null&&F.total_doubles_scores||F!=null&&F.total_nulls_scores||F!=null&&F.total_judges_scores||F!=null&&F.total_pros_scores||F!=null&&F.total_shixuns_scores||F!=null&&F.total_mains_scores||F!=null&&F.total_combination_scores)&&(oe=Number(F==null?void 0:F.total_singles_scores)+Number(F==null?void 0:F.total_doubles_scores)+Number(F==null?void 0:F.total_nulls_scores)+Number(F==null?void 0:F.total_judges_scores)+Number(F==null?void 0:F.total_pros_scores)+Number(F==null?void 0:F.total_shixuns_scores)+Number(F==null?void 0:F.total_mains_scores)+Number(F==null?void 0:F.total_combination_scores)),(F!=null&&F.singles_scores||F!=null&&F.doubles_scores||F!=null&&F.nulls_scores||F!=null&&F.judges_scores||F!=null&&F.pros_scores||F!=null&&F.shixuns_scores||F!=null&&F.mains_scores||F!=null&&F.combination_scores)&&(re=Number(F==null?void 0:F.singles_scores)+Number(F==null?void 0:F.doubles_scores)+Number(F==null?void 0:F.nulls_scores)+Number(F==null?void 0:F.judges_scores)+Number(F==null?void 0:F.pros_scores)+Number(F==null?void 0:F.shixuns_scores)+Number(F==null?void 0:F.mains_scores)+Number(F==null?void 0:F.combination_scores));var we=[{key:"1",name:"\u5E94\u5F97\u5206",singles_score:F==null?void 0:F.total_singles_scores,doubles_score:F==null?void 0:F.total_doubles_scores,nulls_score:F==null?void 0:F.total_nulls_scores,judges_score:F==null?void 0:F.total_judges_scores,pros_score:F==null?void 0:F.total_pros_scores,shixuns_score:F==null?void 0:F.total_shixuns_scores,mains_score:F==null?void 0:F.total_mains_scores,total_combination_scores:F==null?void 0:F.total_combination_scores,total_score:oe},{key:"2",name:"\u5B9E\u5F97\u5206",singles_score:F==null?void 0:F.singles_scores,doubles_score:F==null?void 0:F.doubles_scores,nulls_score:F==null?void 0:F.nulls_scores,judges_score:F==null?void 0:F.judges_scores,pros_score:F==null?void 0:F.pros_scores,shixuns_score:F==null?void 0:F.shixuns_scores,mains_score:F==null?void 0:F.mains_scores,total_combination_scores:F==null?void 0:F.combination_scores,total_score:re},{key:"3",name:"\u8BC4\u5377\u4EBA"}],be=[{key:"1",name:"\u5E94\u5F97\u5206",singles_score:F==null?void 0:F.total_singles_scores,doubles_score:F==null?void 0:F.total_doubles_scores,nulls_score:F==null?void 0:F.total_nulls_scores,judges_score:F==null?void 0:F.total_judges_scores,pros_score:F==null?void 0:F.total_pros_scores,shixuns_score:F==null?void 0:F.total_shixuns_scores,mains_score:F==null?void 0:F.total_mains_scores,total_combination_scores:F==null?void 0:F.total_combination_scores,total_score:oe},{key:"2",name:"\u5B9E\u5F97\u5206"},{key:"3",name:"\u8BC4\u5377\u4EBA"}];xe(Object(z.a)(a?be:we))}},[g.exerciseExportHeadData]);var Ge=function(){var it=Object(O.a)(P.a.mark(function ee(){var W,F,oe,re,we,be,nt,tt;return P.a.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return W={id:Q.exerciseId||Q.categoryId,identify:(j==null?void 0:j.login)||null},qe.next=3,Object(r.v)(W);case 3:F=qe.sent,ne(F||{}),oe=F||{},re=oe.table,(re!=null&&re.total_singles_scores||re!=null&&re.total_doubles_scores||re!=null&&re.total_nulls_scores||re!=null&&re.total_judges_scores||re!=null&&re.total_pros_scores||re!=null&&re.total_shixuns_scores||re!=null&&re.total_mains_scores||re!=null&&re.total_combination_scores)&&(we=Number(re==null?void 0:re.total_singles_scores)+Number(re==null?void 0:re.total_doubles_scores)+Number(re==null?void 0:re.total_nulls_scores)+Number(re==null?void 0:re.total_judges_scores)+Number(re==null?void 0:re.total_pros_scores)+Number(re==null?void 0:re.total_shixuns_scores)+Number(re==null?void 0:re.total_mains_scores)+Number(re==null?void 0:re.total_combination_scores)),(re!=null&&re.singles_scores||re!=null&&re.doubles_scores||re!=null&&re.nulls_scores||re!=null&&re.judges_scores||re!=null&&re.pros_scores||re!=null&&re.shixuns_scores||re!=null&&re.mains_scores||re!=null&&re.combination_scores)&&(be=Number(re==null?void 0:re.singles_scores)+Number(re==null?void 0:re.doubles_scores)+Number(re==null?void 0:re.nulls_scores)+Number(re==null?void 0:re.judges_scores)+Number(re==null?void 0:re.pros_scores)+Number(re==null?void 0:re.shixuns_scores)+Number(re==null?void 0:re.mains_scores)+Number(re==null?void 0:re.combination_scores)),nt=[{key:"1",name:"\u5E94\u5F97\u5206",singles_score:re==null?void 0:re.total_singles_scores,doubles_score:re==null?void 0:re.total_doubles_scores,nulls_score:re==null?void 0:re.total_nulls_scores,judges_score:re==null?void 0:re.total_judges_scores,pros_score:re==null?void 0:re.total_pros_scores,shixuns_score:re==null?void 0:re.total_shixuns_scores,mains_score:re==null?void 0:re.total_mains_scores,total_combination_scores:re==null?void 0:re.total_combination_scores,total_score:we},{key:"2",name:"\u5B9E\u5F97\u5206",singles_score:re==null?void 0:re.singles_scores,doubles_score:re==null?void 0:re.doubles_scores,nulls_score:re==null?void 0:re.nulls_scores,judges_score:re==null?void 0:re.judges_scores,pros_score:re==null?void 0:re.pros_scores,shixuns_score:re==null?void 0:re.shixuns_scores,mains_score:re==null?void 0:re.mains_scores,total_combination_scores:re==null?void 0:re.combination_scores,total_score:be},{key:"3",name:"\u8BC4\u5377\u4EBA"}],tt=[{key:"1",name:"\u5E94\u5F97\u5206"},{key:"2",name:"\u5B9E\u5F97\u5206"},{key:"3",name:"\u8BC4\u5377\u4EBA"}],xe(a?tt:nt);case 11:case"end":return qe.stop()}},ee)}));return function(){return it.apply(this,arguments)}}(),lt=[{width:"10%",title:"\u9898\u578B",align:"center",dataIndex:"name",render:function(ee){return S.a.createElement("a",null,ee)}},{width:"10%",title:"\u5355\u9009\u9898",align:"center",dataIndex:"singles_score",render:function(ee){return S.a.createElement("a",null,ee==="0.0"?0:ee)}},{width:"10%",title:"\u591A\u9009\u9898",align:"center",dataIndex:"doubles_score",render:function(ee){return S.a.createElement("a",null,ee==="0.0"?0:ee)}},{width:"10%",title:"\u586B\u7A7A\u9898",align:"center",dataIndex:"nulls_score",render:function(ee){return S.a.createElement("a",null,ee==="0.0"?0:ee)}},{width:140,title:"\u5224\u65AD\u9898",align:"center",dataIndex:"judges_score",render:function(ee){return S.a.createElement("a",null,ee==="0.0"?0:ee)}},{width:"10%",title:"\u7F16\u7A0B\u9898",align:"center",dataIndex:"pros_score",render:function(ee){return S.a.createElement("a",null,ee==="0.0"?0:ee)}},{width:"10%",title:"\u5B9E\u8BAD\u9898",align:"center",dataIndex:"shixuns_score",render:function(ee){return S.a.createElement("a",null,ee==="0.0"?0:ee)}},{width:"10%",title:"\u7B80\u7B54\u9898",align:"center",dataIndex:"mains_score",render:function(ee){return S.a.createElement("a",null,ee==="0.0"?0:ee)}},{width:"10%",title:"\u7EC4\u5408\u9898",align:"center",dataIndex:"total_combination_scores",render:function(ee){return S.a.createElement("a",null,ee==="0.0"?0:ee)}},{width:"10%",title:"\u603B\u5206",align:"center",dataIndex:"total_score",render:function(ee){return S.a.createElement("a",null,ee==="0.0"?0:ee)}}],at=Y||{},je=at.exercise_header;return S.a.createElement(S.a.Fragment,null,((je==null?void 0:je.show_user)||(je==null?void 0:je.show_no)||(je==null?void 0:je.show_group))&&S.a.createElement("section",{className:o.a.glassSeal},(je==null?void 0:je.show_user)&&S.a.createElement("span",null,"\u59D3\u540D\uFF1A",S.a.createElement("span",null,Y==null?void 0:Y.user)),(je==null?void 0:je.show_no)&&S.a.createElement("span",null,"\u5B66\u53F7\uFF1A",S.a.createElement("span",null,Y==null?void 0:Y.student_id)),(je==null?void 0:je.show_group)&&S.a.createElement("span",null,"\u4E13\u4E1A\u73ED\u7EA7\uFF1A",S.a.createElement("span",null,Y==null?void 0:Y.group_name))),S.a.createElement("section",{className:"".concat(o.a.wrap," ").concat(c?"pl20":""," ")},(Y==null?void 0:Y.photo_url)&&S.a.createElement("img",{className:o.a.img,src:Y==null?void 0:Y.photo_url}),(je==null?void 0:je.show_title)&&S.a.createElement("p",{className:"font16 tc c-grey-333"},S.a.createElement("strong",null,Y==null?void 0:Y.title)),(je==null?void 0:je.show_body)&&((g==null||((B=g.exerciseExportHeadData)===null||B===void 0)?void 0:B.exercise_description)||(g==null||((w=g.commonHeader)===null||w===void 0)?void 0:w.exercise_description))&&S.a.createElement("span",{ref:Se,style:{justifyContent:Ee===21?"center":"left",wordBreak:"break-all",display:"flex",textAlign:"left"},className:"tc c-grey-333"},"\u8BD5\u5377\u987B\u77E5\uFF1A".concat((g==null||((y=g.exerciseExportHeadData)===null||y===void 0)?void 0:y.exercise_description)||(g==null||((x=g.commonHeader)===null||x===void 0)?void 0:x.exercise_description))),(je==null?void 0:je.show_info)&&S.a.createElement("p",{className:"tc c-grey-666"},"\u5171:\u3010",Y==null?void 0:Y.large_counts,"\u5927\u9898\u3011\u3010",Y==null?void 0:Y.total_count,"\u5C0F\u9898\u3011\u3010 \u6EE1\u5206",Y==null?void 0:Y.score,"\u5206\u3011 \u8003\u8BD5\u65F6\u95F4\uFF1A\u3010",(Y==null?void 0:Y.time)>-1?"".concat(Y==null?void 0:Y.time,"\u5206\u949F"):"\u4E0D\u9650","\u3011"),(je==null?void 0:je.show_desc)&&S.a.createElement("div",{className:"mt10"},S.a.createElement("p",{className:"font16"},"\u8003\u8BD5\u8BF4\u660E\uFF1A"),S.a.createElement(A.a,{value:Y==null?void 0:Y.description})),(je==null?void 0:je.show_table)&&S.a.createElement("div",{className:"mt10"},S.a.createElement(V.a,{className:o.a.table,columns:lt,dataSource:Object(z.a)(Oe||[]),bordered:!0,pagination:!1}))))};$e.a=Object(b.a)(function(n){var i=n.exercise,B=n.loading,w=n.user,y=n.globalSetting;return{exercise:i,globalSetting:y,user:w,loading:B.effects}})(t)},"kVK+":function(vt,$e){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */$e.read=function(q,ve,V,O,z){var D,I,G=z*8-O-1,P=(1<<G)-1,L=P>>1,S=-7,_=V?z-1:0,b=V?-1:1,u=q[ve+_];for(_+=b,D=u&(1<<-S)-1,u>>=-S,S+=G;S>0;D=D*256+q[ve+_],_+=b,S-=8);for(I=D&(1<<-S)-1,D>>=-S,S+=O;S>0;I=I*256+q[ve+_],_+=b,S-=8);if(D===0)D=1-L;else{if(D===P)return I?NaN:(u?-1:1)*Infinity;I=I+Math.pow(2,O),D=D-L}return(u?-1:1)*I*Math.pow(2,D-O)},$e.write=function(q,ve,V,O,z,D){var I,G,P,L=D*8-z-1,S=(1<<L)-1,_=S>>1,b=z===23?Math.pow(2,-24)-Math.pow(2,-77):0,u=O?0:D-1,o=O?1:-1,r=ve<0||ve===0&&1/ve<0?1:0;for(ve=Math.abs(ve),isNaN(ve)||ve===Infinity?(G=isNaN(ve)?1:0,I=S):(I=Math.floor(Math.log(ve)/Math.LN2),ve*(P=Math.pow(2,-I))<1&&(I--,P*=2),I+_>=1?ve+=b/P:ve+=b*Math.pow(2,1-_),ve*P>=2&&(I++,P/=2),I+_>=S?(G=0,I=S):I+_>=1?(G=(ve*P-1)*Math.pow(2,z),I=I+_):(G=ve*Math.pow(2,_-1)*Math.pow(2,z),I=0));z>=8;q[V+u]=G&255,u+=o,G/=256,z-=8);for(I=I<<z|G,L+=z;L>0;q[V+u]=I&255,u+=o,I/=256,L-=8);q[V+u-o]|=r*128}},mrIW:function(vt,$e,q){"use strict";q.r($e);var ve=q("+L6B"),V=q("2/Rp"),O=q("sPJy"),z=q("bE4q"),D=q("oBTY"),I=q("/zsF"),G=q("PArb"),P=q("sRBo"),L=q("kaz8"),S=q("14J3"),_=q("BMrR"),b=q("jCWc"),u=q("kPKH"),o=q("7Kak"),r=q("9yH6"),A=q("2qtc"),s=q("kLXV"),t=q("k1fw"),n=q("9og8"),i=q("tJVT"),B=q("PpiC"),w=q("5NDa"),y=q("5rEg"),x=q("WmNS"),E=q.n(x),c=q("q1tI"),e=q.n(c),a=q("Ty5D"),l=q("55Ip"),g=q("9kvl"),p=q("xOOu"),f=q.n(p),R=q("jhfD"),U=q("dF/Y"),Q=q("q5bB"),j=q.n(Q),J=q("9Bee"),k=q("1vsH"),Y=q("cw1j"),ne=q("g9YV"),me=q("wCAj"),_e=q("giR+"),Oe=q("fyUT"),xe=q("miYZ"),Se=q("tsqr"),Fe=q("5Dmo"),Pe=q("3S7+"),Ee=q("xKgJ"),he=q("wd/R"),Ge=q.n(he),lt=q("ZW9T"),at=q("tJYV"),je=q.n(at),it=function(He){var Ie,Me,ye,le=He.item,ue=He.answerData,Z=He.hasChangeScore,te=Z===void 0?!0:Z,Ae=He.autoHeight,de=He.saveChangeScore,Be=de===void 0?function(){}:de,Ne=Object(c.useState)([]),Xe=Object(i.a)(Ne,2),ct=Xe[0],ut=Xe[1],st=Object(c.useState)([]),Nt=Object(i.a)(st,2),pt=Nt[0],et=Nt[1];Object(c.useEffect)(function(){var mt;if(!(le!=null&&(mt=le.shixun_details)!==null&&mt!==void 0&&mt.length))return;for(var yt=[],wt=[],Pt=0;Pt<(le==null||((Je=le.shixun_details)===null||Je===void 0)?void 0:Je.length);Pt++){for(var Je,bt,dt,Lt=0;Lt<(le==null?void 0:le.shixun_details[Pt].stage_list.length);Lt++){var Yt,Er,Rr,Tr,Sr,Fr=le==null?void 0:le.shixun_details[Pt].stage_list[Lt];yt.push(Object(t.a)(Object(t.a)({},Fr),{operation:le==null||((Yt=le.shixun_details)===null||Yt===void 0||((Er=Yt[Pt])===null||Er===void 0||((Rr=Er.shixun_detail)===null||Rr===void 0||((Tr=Rr[0])===null||Tr===void 0))))?void 0:Tr.game_identifier,shixun_challenge_id:le==null||((Sr=le.shixun_details[Pt])===null||Sr===void 0)?void 0:Sr.shixun_challenge_id}))}if(le!=null&&(bt=le.shixun_details)!==null&&bt!==void 0&&(dt=bt[Pt])!==null&&dt!==void 0&&dt.shixun_detail){var lr,Ir,kr;wt.push(le==null||((lr=le.shixun_details)===null||lr===void 0||((Ir=lr[Pt])===null||Ir===void 0||((kr=Ir.shixun_detail)===null||kr===void 0)))?void 0:kr[0])}}et(wt),ut([].concat(yt))},[le==null?void 0:le.shixun_details]);var er=[{title:"\u5173\u5361",dataIndex:"position",key:"position",align:"center"},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",key:"name",align:"center",ellipsis:!0,width:260,render:function(yt){return e.a.createElement(Pe.a,{title:yt},e.a.createElement("span",{className:"overflowHidden1",style:{maxWidth:"400px"},title:yt&&yt.length>25?yt:""},yt))}},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"evaluate_count",key:"evaluate_count",align:"center",render:function(yt,wt){return e.a.createElement("span",null,wt.evaluate_count?wt.evaluate_count:e.a.createElement("span",{className:"color-grey-9"},"--"))}},{title:"\u5B8C\u6210\u65F6\u95F4",key:"finished_time",dataIndex:"finished_time",align:"center",render:function(yt,wt){var Pt=!1;return wt.finished_time&&ue!==null&&ue!==void 0&&ue.exercise&&ue!==null&&ue!==void 0&&ue.exercise_answer_user&&((ue==null?void 0:ue.exercise.time)===-1?Pt=Ge()(ue==null?void 0:ue.exercise.end_time).isBefore(wt.finished_time):Pt=Ge()(ue==null?void 0:ue.exercise_answer_user.start_at).add(ue==null?void 0:ue.exercise.time,"m").isBefore(wt.finished_time)),e.a.createElement("span",null,wt.finished_time||e.a.createElement("span",{className:"c-grey-999"},"--"),e.a.createElement("span",{className:"c-orange-ff9 "},Pt?"\uFF08\u5DF2\u8D85\u65F6\uFF09":""))}},{title:"\u8017\u65F6",dataIndex:"time_consuming",key:"time_consuming",align:"center",render:function(yt,wt){return e.a.createElement("span",null,wt.time_consuming||e.a.createElement("span",{className:"color-grey-9"},"--"))}},{title:"\u67E5\u770B\u7B54\u6848",dataIndex:"view_answer",key:"view_answer",align:"center",render:function(yt,wt){return e.a.createElement("span",null,wt.view_answer?"\u5DF2\u67E5\u770B":"\u672A\u67E5\u770B")}},{title:"\u5F97\u5206/\u6EE1\u5206",dataIndex:"user_score",key:"user_score",align:"center",render:function(yt,wt){return e.a.createElement("span",null,e.a.createElement("span",{className:"c-orange"},wt.user_score),"/",wt.game_score)}},te&&{title:"\u8C03\u5206",dataIndex:"user_score",key:"user_score",align:"center",render:function(yt,wt,Pt){return e.a.createElement(Oe.a,{min:0,max:Number(wt.game_score),defaultValue:yt,onBlur:function(){var Je=Object(n.a)(E.a.mark(function bt(dt){var Lt;return E.a.wrap(function(Er){for(;;)switch(Er.prev=Er.next){case 0:if(!(dt.target.value!=yt)){Er.next=6;break}return Er.next=3,Be(Object(t.a)(Object(t.a)({},le),{shixun_challenge_id:wt.shixun_challenge_id,shixunScore:dt.target.value}));case 3:Lt=Er.sent,console.log("res: ",Lt),Lt!=null&&Lt.question_comments&&Se.b.success("\u5DF2\u4FEE\u6539\u5F53\u524D\u8BC4\u5206");case 6:case"end":return Er.stop()}},bt)}));return function(bt){return Je.apply(this,arguments)}}()})}}].filter(function(mt){return!!mt}),qt=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"key",width:"127px",key:"key",align:"center",render:function(yt,wt){return e.a.createElement("span",null,wt.key)}},{title:"\u8BE6\u7EC6\u4FE1\u606F",dataIndex:"error_msg",key:"error_msg",align:"center",render:function(yt,wt){return e.a.createElement("span",null,wt.error_msg?wt.error_msg:"--")}},{title:"\u8BC4\u6D4B\u65F6\u95F4",dataIndex:"updated_at",key:"updated_at",align:"center",width:200,render:function(yt,wt){return e.a.createElement("span",null,wt.updated_at?wt.updated_at:"--")}}],Ot={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1};return e.a.createElement(e.a.Fragment,null,((ue==null||((Ie=ue.exercise)===null||Ie===void 0)?void 0:Ie.student_commit_status)!==0||(ue==null||((Me=ue.exercise)===null||Me===void 0)?void 0:Me.user_exercise_status)!==0)&&e.a.createElement("div",{className:"mt15"},e.a.createElement("p",{className:"font16 c-grey-666"},"\u9636\u6BB5\u6210\u7EE9"),!!(ct!=null&&ct.length)&&e.a.createElement(me.a,{columns:er,dataSource:ct,pagination:!1})),!!(pt!=null&&pt.length)&&e.a.createElement(e.a.Fragment,null,e.a.createElement("p",{className:"font16 c-grey-666 mt10"},"\u5B9E\u8BAD\u8BE6\u60C5"),pt==null?void 0:pt.map(function(mt,yt){var wt;return e.a.createElement(e.a.Fragment,null,e.a.createElement("div",{className:"mt5"},e.a.createElement("span",{className:"font16 mr15"}," \u7B2C",mt.position,"\u5173"),e.a.createElement(l.a,{className:"current c-black font16",to:"/tasks/".concat(mt.game_identifier)},mt.name)),!!(mt!=null&&(wt=mt.outputs)!==null&&wt!==void 0&&wt.length)&&e.a.createElement(me.a,{bordered:!0,dataSource:mt.outputs.map(function(Pt){return{key:Pt.position,error_msg:Pt.output_detail,updated_at:Pt.updated_at}}),columns:qt,pagination:!1}),(mt==null?void 0:mt.st)===0&&mt.passed_code&&e.a.createElement("div",{className:je.a.shixunWrp},e.a.createElement("h2",null,"\u6700\u540E\u4E00\u6B21\u901A\u5173\u7684\u4EE3\u7801\uFF08\u672A\u901A\u5173\u5219\u4E3A\u6700\u540E\u4E00\u6B21\u63D0\u4EA4\u8BC4\u6D4B\u7684\u4EE3\u7801\uFF09",e.a.createElement("span",{className:"c-light-black"},mt.path)),e.a.createElement(lt.b,{height:300,autoHeight:Ae,language:"python",theme:"default",value:mt.passed_code,options:Ot})))})),Object(Ee.s)()&&e.a.createElement(J.a,{className:"c-grey-999 mt20 mb20",value:le==null?void 0:le.question_title}),le==null||((ye=le.shixun)===null||ye===void 0)?void 0:ye.map(function(mt,yt){return e.a.createElement("p",{className:"font16 c-grey-666 mb5"},e.a.createElement("span",{className:"mr20"},"\u7B2C",mt==null?void 0:mt.challenge_position,"\u5173 ",mt==null?void 0:mt.challenge_name),e.a.createElement("span",null,mt==null?void 0:mt.challenge_score,"\u5206"))}),e.a.createElement("div",{className:"mb15"}))},ee=it,W=q("J66h"),F=q("ZPm4"),oe=q.n(F),re=function(He){var Ie,Me,ye,le,ue,Z=He.item,te=He.answerData,Ae=He.autoHeight,de=Object(c.useState)([]),Be=Object(i.a)(de,2),Ne=Be[0],Xe=Be[1];Object(c.useEffect)(function(){var st;if((Z==null||((st=Z.evaluate_codes)===null||st===void 0)?void 0:st.length)>0){var Nt;Xe(Z==null||((Nt=Z.evaluate_codes)===null||Nt===void 0)?void 0:Nt.map(function(pt,et){return{key:et+1,error_msg:pt!=null&&pt.error_msg?W.Base64.decode(pt==null?void 0:pt.error_msg):"",created_at:pt.created_at}}))}else Xe([{key:"--",error_msg:"--"}])},[Z==null?void 0:Z.evaluate_codes]);var ct=[{title:"\u8BC4\u6D4B\u5E8F\u53F7",dataIndex:"key",width:"127px",key:"key",align:"center",render:function(Nt,pt){return e.a.createElement("span",null,pt.key)}},{title:"\u8BC4\u6D4B\u65F6\u95F4",dataIndex:"created_at",key:"created_at",align:"center",width:200,render:function(Nt,pt){return e.a.createElement("span",null,pt.created_at?Ge()(pt.created_at).format("YYYY-MM-DD HH:mm"):"--")}},{title:"\u8BC4\u6D4B\u7ED3\u679C",dataIndex:"error_msg",key:"error_msg",align:"center",render:function(Nt,pt){var et;return e.a.createElement("span",null,pt.error_msg?((et=pt.error_msg)===null||et===void 0?void 0:et.length)>1e3?pt.error_msg.substring(0,1e3)+"...":pt.error_msg:"--")}}],ut={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1};return e.a.createElement(e.a.Fragment,null,e.a.createElement("div",{className:"mt15 mb15"},e.a.createElement(J.a,{value:Z==null?void 0:Z.description})),(!!(te!=null&&(Ie=te.exercise)!==null&&Ie!==void 0&&Ie.student_commit_status)&&(te==null||((Me=te.exercise)===null||Me===void 0)?void 0:Me.student_commit_status)!==0||!!(te!=null&&(ye=te.exercise)!==null&&ye!==void 0&&ye.user_exercise_status)&&(te==null||((le=te.exercise)===null||le===void 0)?void 0:le.user_exercise_status)!==0)&&e.a.createElement(me.a,{className:"mt5",bordered:!0,dataSource:Ne,columns:ct,pagination:!1}),!!(Z!=null&&(ue=Z.user_answer)!==null&&ue!==void 0&&ue.length)&&(Z==null?void 0:Z.passed_code)&&e.a.createElement("aside",{className:oe.a.shixunWrp},e.a.createElement("h3",null,"\u7B2C\u4E00\u6B21\u8BC4\u6D4B\u901A\u8FC7\u7684\u4EE3\u7801\uFF08\u672A\u901A\u5173\u5219\u4E3A\u6700\u540E\u4E00\u6B21\u63D0\u4EA4\u8BC4\u6D4B\u7684\u4EE3\u7801\uFF09"),e.a.createElement(lt.b,{style:{border:"1px solid #ccc"},height:300,language:"python",theme:"vs-light",value:Z!=null&&Z.passed_code?W.Base64.decode(Z==null?void 0:Z.passed_code):"",autoHeight:Ae,options:ut})))},we=re,be=q("k5F3"),nt=q("1n7x"),tt=q.n(nt),Ye=q("hQp1"),qe=30,At=y.a.TextArea,ft=["\u5355\u9009\u9898","\u591A\u9009\u9898","\u5224\u65AD\u9898","\u586B\u7A7A\u9898","\u7B80\u7B54\u9898","\u5B9E\u8BAD\u9898","\u7F16\u7A0B\u9898"],Ce=function(He){var Ie,Me,ye,le,ue,Z,te,Ae=He.exercise,de=He.globalSetting,Be=He.loading,Ne=He.user,Xe=He.dispatch,ct=Object(B.a)(He,["exercise","globalSetting","loading","user","dispatch"]),ut=Object(a.i)(),st=Ne.userInfo,Nt=Object(c.useState)({}),pt=Object(i.a)(Nt,2),et=pt[0],er=pt[1],qt=Object(c.useRef)(),Ot=Object(c.useRef)(!1),mt=Object(c.useState)(!1),yt=Object(i.a)(mt,2),wt=yt[0],Pt=yt[1],Je=Object(c.useState)({}),bt=Object(i.a)(Je,2),dt=bt[0],Lt=bt[1],Yt=Object(c.useState)(new f.a),Er=Object(i.a)(Yt,2),Rr=Er[0],Tr=Er[1],Sr=Object(c.useState)([]),Fr=Object(i.a)(Sr,2),lr=Fr[0],Ir=Fr[1],kr=Object(c.useState)(!1),Or=Object(i.a)(kr,2),Jr=Or[0],jr=Or[1],ie=Object(c.useState)(!1),ae=Object(i.a)(ie,2),ce=ae[0],Te=ae[1],We=Object(c.useState)(!1),Ze=Object(i.a)(We,2),M=Ze[0],d=Ze[1],m=Object(c.useState)(!1),N=Object(i.a)(m,2),X=N[0],H=N[1],fe=Object(c.useState)(!1),ke=Object(i.a)(fe,2),rt=ke[0],ot=ke[1];Object(c.useEffect)(function(){st!=null&&st.login&&Bt();try{Ir(JSON.parse(localStorage.total_exercise_users))}catch(Jt){}},[ut.userId,ut.coursesId,ut.exerciseId,st]);var Ke=function(){document.querySelectorAll("canvas").forEach(function(Le){(!Le.clientWidth||!Le.clientHeight)&&Le.remove()})},_t=function(){document.body.scrollIntoView()},gt=function(Le){var Ht,Gt,Ut,Kt=Le==null||((Ht=Le.exercise_answer_user)===null||Ht===void 0)?void 0:Ht.user_id;if(Le!=null&&(Gt=Le.exercise)!==null&&Gt!==void 0&&Gt.question_random||Le!=null&&(Ut=Le.exercise)!==null&&Ut!==void 0&&Ut.choice_random){var Qt,or=1;Le.exercise.question_random=Le==null||((Qt=Le.exercise_question_types)===null||Qt===void 0)?void 0:Qt.map(function(Vt){var ar,rr;return Le!=null&&(ar=Le.exercise)!==null&&ar!==void 0&&ar.choice_random&&((Vt.question_type===0||Vt.question_type===1)&&Vt.items.map(function(Dt){return Dt.question_choices=Object(k.U)(Dt.question_choices,Kt),Dt}),Vt.question_type===7&&Vt.items.forEach(function(Dt){Dt.sub_exercise_questions.forEach(function(jt){jt.question_choices=Object(k.U)(jt.question_choices,Kt)})})),Le!=null&&(rr=Le.exercise)!==null&&rr!==void 0&&rr.question_random&&(Vt.items=Object(k.U)(Vt.items,Kt)),Vt.items.map(function(Dt){return Dt.question_num=or,or++,Dt}),Vt})}},Bt=function(){var Jt=Object(n.a)(E.a.mark(function Le(){var Ht;return E.a.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:if(Xe({type:"exercise/getExerciseExportHeadData",payload:{id:ut.exerciseId||ut.categoryId,identify:ut.userId||null}}),!ut.userId){Ut.next=9;break}return Ut.next=4,Xe({type:"exercise/getReviewExercise",payload:{exerciseId:ut.exerciseId,login:ut.userId}});case 4:Ht=Ut.sent,gt(Ht),Ot.current=!1,Ut.next=13;break;case 9:return Ut.next=11,Xe({type:"exercise/editExercise",payload:{coursesId:ut.coursesId,categoryId:ut.exerciseId}});case 11:Ht=Ut.sent,Ot.current=!0;case 13:Lt(Object(t.a)({},Ht||{})),setTimeout(function(){var Kt=1,Qt=document.getElementById("export-id-all"),or=860,Vt=0},1500);case 15:case"end":return Ut.stop()}},Le)}));return function(){return Jt.apply(this,arguments)}}(),Mt=function(){Rr.generateAsync({type:"blob"}).then(function(Le){var Ht,Gt,Ut,Kt=document.createElement("a");Kt.href=window.URL.createObjectURL(Le),Kt.download=Object.keys(Rr.files).length>1?dt==null||((Ht=dt.exercise)===null||Ht===void 0)?void 0:Ht.exercise_name:((Ae==null||((Gt=Ae.exerciseExportHeadData)===null||Gt===void 0)?void 0:Gt.user)||(dt==null||((Ut=dt.exercise)===null||Ut===void 0)?void 0:Ut.exercise_name))+".zip",document.body.appendChild(Kt);var Qt=document.createEvent("MouseEvents");Qt.initEvent("click",!1,!1),Kt.dispatchEvent(Qt),document.body.removeChild(Kt),Tr(new f.a)}),Te(!1),H(!1),d(!1),jr(!1)},Ar=function(){var Jt=Object(n.a)(E.a.mark(function Le(Ht){var Gt,Ut,Kt,Qt,or,Vt,ar,rr,Dt,jt,Ft,tr,$t;return E.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:return $t=function(){return $t=Object(n.a)(E.a.mark(function pr(){var Hr;return E.a.wrap(function(Ur){for(;;)switch(Ur.prev=Ur.next){case 0:return Ut++,Ot.current=!1,_t(),Ur.next=5,Xe({type:"exercise/getExerciseExportHeadData",payload:{id:ut.exerciseId||ut.categoryId,identify:lr[Ut-1].user_login}});case 5:return Ur.next=7,Xe({type:"exercise/getReviewExercise",payload:{exerciseId:ut.exerciseId,login:lr[Ut-1].user_login}});case 7:Hr=Ur.sent,gt(Hr),Lt(Object(t.a)({},Hr||{})),setTimeout(Object(n.a)(E.a.mark(function dr(){var qr,zt,Cr;return E.a.wrap(function($r){for(;;)switch($r.prev=$r.next){case 0:Ke(),qr=tt()(),zt=E.a.mark(function un(Xr){return E.a.wrap(function(gn){for(;;)switch(gn.prev=gn.next){case 0:return gn.next=2,qr.set(rr).from(Qt[Xr]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var Qn=Object(n.a)(E.a.mark(function Yr(cn){return E.a.wrap(function(mn){for(;;)switch(mn.prev=mn.next){case 0:if(!(Xr<Qt.length-1)){mn.next=3;break}return mn.next=3,cn.addPage();case 3:case"end":return mn.stop()}},Yr)}));return function(Yr){return Qn.apply(this,arguments)}}());case 2:case"end":return gn.stop()}},un)}),Cr=0;case 4:if(!(Cr<Qt.length)){$r.next=9;break}return $r.delegateYield(zt(Cr),"t0",6);case 6:Cr++,$r.next=4;break;case 9:Rr.file("".concat(lr[Ut-1].user_name,"-").concat(Ge()().format("YYYY-MM-DD HH:mm:ss"),".pdf"),qr.output("blob")),Kt.update({content:e.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",e.a.createElement("span",{className:"c-blue"},Ut+1),"/",lr==null?void 0:lr.length)}),Ut==(lr==null?void 0:lr.length)?(Kt.destroy(),Pt(!1),Mt()):tr();case 12:case"end":return $r.stop()}},dr)})),2600);case 11:case"end":return Ur.stop()}},pr)})),$t.apply(this,arguments)},tr=function(){return $t.apply(this,arguments)},Ht==="all"?Ot.current=!1:ut.userId||(Ot.current=!0),_t(),jr(!0),Ut=0,Ht!=="all"&&Pt(!0),Kt=s.a.info({width:460,title:e.a.createElement("div",null,"\u6B63\u5728\u5BFC\u51FA\u8BD5\u5377,",e.a.createElement("span",{className:"c-red"},"\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3")),content:Ht==="all"?e.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",e.a.createElement("span",{className:"c-blue"},Ut+1),"/",lr==null?void 0:lr.length):null,maskClosable:!1,className:j.a.modal,onOk:function(){}}),Ke(),Zt.next=11,new Promise(function(Lr,pr){setTimeout(function(){Lr("")},1e3)});case 11:Qt=qt.current.children,or="".concat(Ge()().format("YYYY-MM-DD HH:mm:ss")),(Gt=Ae.exerciseExportHeadData)!==null&&Gt!==void 0&&Gt.user&&(or="".concat(((Vt=Ae.exerciseExportHeadData)===null||Vt===void 0?void 0:Vt.student_id)||"").concat((ar=Ae.exerciseExportHeadData)===null||ar===void 0?void 0:ar.user)),rr={html2canvas:{letterRendering:!0,useCORS:!0,allowTaint:!1},jsPDF:{unit:"in",format:"letter",orientation:"portrait"}},Dt=tt()(),jt=E.a.mark(function Lr(pr){return E.a.wrap(function(Nr){for(;;)switch(Nr.prev=Nr.next){case 0:return Nr.next=2,Dt.set(rr).from(Qt[pr]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var Ur=Object(n.a)(E.a.mark(function dr(qr){return E.a.wrap(function(Cr){for(;;)switch(Cr.prev=Cr.next){case 0:if(!(pr<Qt.length-1)){Cr.next=3;break}return Cr.next=3,qr.addPage();case 3:case"end":return Cr.stop()}},dr)}));return function(dr){return Ur.apply(this,arguments)}}());case 2:case"end":return Nr.stop()}},Lr)}),Ft=0;case 18:if(!(Ft<Qt.length)){Zt.next=23;break}return Zt.delegateYield(jt(Ft),"t0",20);case 20:Ft++,Zt.next=18;break;case 23:!!(lr!=null&&lr.length)&&Ht==="all"?tr():(Rr.file("".concat(or,".pdf"),Dt.output("blob"),{base64:!1}),Kt.destroy(),Pt(!1),Mt());case 24:case"end":return Zt.stop()}},Le)}));return function(Ht){return Jt.apply(this,arguments)}}(),Wt=function(Le){for(var Ht=Le.internal.getNumberOfPages(),Gt=1;Gt<=Ht;Gt+=1)Le.setPage(Gt),Le.setFontSize(9),Le.setTextColor("#6a6a6a"),Le.text("".concat(Gt," / ").concat(Ht),Le.internal.pageSize.getWidth()-20,Le.internal.pageSize.getHeight()-6)},ir=function(Le,Ht){var Gt,Ut,Kt,Qt,or,Vt,ar,rr,Dt,jt,Ft,tr,$t,_r,Zt,Lr,pr,Hr,Nr,Ur,dr,qr;return e.a.createElement(e.a.Fragment,null,e.a.createElement("div",{style:{display:"flex"},className:j.a.programTitle},e.a.createElement("span",{style:{flexShrink:0},className:"font18"},Ht,"."),e.a.createElement(J.a,{value:Le.question_title}),e.a.createElement("span",{style:{flexShrink:0},className:"font16"},"\uFF08",(Le==null?void 0:Le.question_type)===7?"\u5171".concat(Le==null?void 0:Le.sub_q_count,"\u5C0F\u9898"):""," ",Le.question_score,"\u5206\uFF09")),Le.question_type===Ye.a.Single&&e.a.createElement(e.a.Fragment,null,(Gt=Le.question_choices)===null||Gt===void 0?void 0:Gt.map(function(zt,Cr){var Pr;return e.a.createElement(_.a,{key:Cr},e.a.createElement(u.a,{flex:"25px"},e.a.createElement("div",{style:{width:25,overflow:"hidden"}},e.a.createElement(r.a,{checked:(Pr=Le.user_answer)===null||Pr===void 0?void 0:Pr.includes(zt.choice_id),style:{width:25}}))),e.a.createElement(u.a,{flex:"1"},e.a.createElement(J.a,{value:zt.choice_text||""})))})),Le.question_type===Ye.a.Multiple&&e.a.createElement(e.a.Fragment,null,(Ut=Le.question_choices)===null||Ut===void 0?void 0:Ut.map(function(zt,Cr){var Pr;return e.a.createElement(_.a,{key:Cr},e.a.createElement(u.a,{flex:"25px"},e.a.createElement("div",{style:{width:25,overflow:"hidden"}},e.a.createElement(L.a,{checked:(Pr=Le.user_answer)===null||Pr===void 0?void 0:Pr.includes(zt.choice_id),style:{width:25}}))),e.a.createElement(u.a,{flex:"1"},e.a.createElement(J.a,{value:zt.choice_text||""})))})),Le.question_type===Ye.a.Judge&&e.a.createElement("div",{className:j.a.flexRow},(Kt=Le.question_choices)===null||Kt===void 0?void 0:Kt.map(function(zt,Cr){var Pr;return e.a.createElement(_.a,{key:Cr},e.a.createElement(u.a,{flex:"25px"},e.a.createElement("div",{style:{width:25,overflow:"hidden"}},e.a.createElement(r.a,{checked:(Pr=Le.user_answer)===null||Pr===void 0?void 0:Pr.includes(zt.choice_id),style:{width:25}}))),e.a.createElement(u.a,{flex:"1"},zt.choice_text))})),Le.question_type===Ye.a.Fill&&!Ot.current&&e.a.createElement(Y.a,{item:Le,answerData:dt,changeScoreData:et,textValue:(Qt=et[Le.q_position])===null||Qt===void 0?void 0:Qt.text,textOnChange:function(Cr){et[Le.q_position].text=Cr,er(Object(t.a)({},et))},seeAnswerVisible:!1}),Le.question_type===Ye.a.Shixun&&e.a.createElement(ee,{item:Le,answerData:dt,hasChangeScore:!1,autoHeight:Jr}),Le.question_type===Ye.a.Subjective&&Le!==null&&Le!==void 0&&(or=Le.user_answer)!==null&&or!==void 0&&or[0]?e.a.createElement("div",{className:j.a.simpleBg},e.a.createElement("aside",{className:"font14 c-light-primary mb5"},"\u5B66\u751F\u7B54\u9898"),e.a.createElement("div",null,X?e.a.createElement(J.a,{value:Le==null||((Vt=Le.user_answer_light)===null||Vt===void 0)?void 0:Vt[0]}):e.a.createElement(J.a,{value:Le==null||((ar=Le.user_answer)===null||ar===void 0)?void 0:ar[0]}))):null,Le.question_type===Ye.a.Program&&e.a.createElement(we,{item:Le,answerData:dt,autoHeight:Jr}),Le.question_type===Ye.a.Combine&&e.a.createElement(e.a.Fragment,null,(rr=Le.sub_exercise_questions)===null||rr===void 0?void 0:rr.map(function(zt,Cr){var Pr,$r;return e.a.createElement("div",{style:{marginLeft:10}},e.a.createElement("span",{style:{fontSize:"16px"}},Ht,".",Cr+1,"\uFF08\u5355\u9009\u9898\uFF09",zt==null?void 0:zt.question_title,"\uFF08",zt==null?void 0:zt.question_score,"\u5206\uFF09"),(Pr=zt.question_choices)===null||Pr===void 0?void 0:Pr.map(function(un,Xr){var rn;return e.a.createElement(_.a,{key:Xr},e.a.createElement(u.a,{flex:"25px"},e.a.createElement("div",{style:{width:25,overflow:"hidden"}},e.a.createElement(r.a,{checked:(rn=zt.user_answer)===null||rn===void 0?void 0:rn.includes(un.choice_id),style:{width:25}}))),e.a.createElement(u.a,{flex:"1"},e.a.createElement(J.a,{value:un.choice_text||""})))}),(zt==null?void 0:zt.standard_answer_show)&&ce&&e.a.createElement("span",{className:"font16 "},"\u6B63\u786E\u7B54\u6848\uFF1A",zt==null?void 0:zt.standard_answer_show),((zt==null?void 0:zt.standard_answer_show)||(zt==null||(($r=zt.standard_answer)===null||$r===void 0)?void 0:$r.length)>0)&&ce&&e.a.createElement(_.a,{style:{marginTop:14}},e.a.createElement("span",{className:"font16 "},"\u89E3\u6790\uFF1A"),e.a.createElement(J.a,{className:j.a.renderHtml,value:(zt==null?void 0:zt.analysis)||"\u6682\u65E0\u89E3\u6790"})))})),ce&&e.a.createElement("div",{style:{marginTop:10}},(Le==null?void 0:Le.question_type)<3&&(Le==null?void 0:Le.standard_answer_show)&&e.a.createElement("span",{className:"font16 "},"\u6B63\u786E\u7B54\u6848\uFF1A",Le==null?void 0:Le.standard_answer_show),!!(Le!=null&&(Dt=Le.standard_answer)!==null&&Dt!==void 0&&Dt.length)&&ce&&(Le==null?void 0:Le.question_type)===3&&e.a.createElement("div",null,Le==null||((jt=Le.standard_answer)===null||jt===void 0)?void 0:jt.map(function(zt,Cr){return e.a.createElement("div",null,e.a.createElement("span",null,"\u53C2\u8003\u7B54\u6848\uFF1A\uFF08\u586B\u7A7A",Cr+1,"\uFF09:"),e.a.createElement("div",null,e.a.createElement(At,{autoSize:!0,disabled:!0,value:zt==null?void 0:zt.answer_text[0]})))})),(Le==null?void 0:Le.standard_answer)&&(Le==null?void 0:Le.question_type)===4&&e.a.createElement("div",null,e.a.createElement("p",{className:"mt10 mb0"},"\u53C2\u8003\u7B54\u6848\uFF1A"),e.a.createElement("div",{style:{border:"1px solid #eee",background:"#f5f5f5",borderRadius:4,padding:5}},e.a.createElement(J.a,{value:Le==null||((Ft=Le.standard_answer)===null||Ft===void 0)?void 0:Ft[0]}))),(Le==null?void 0:Le.question_type)<=4&&((Le==null?void 0:Le.standard_answer_show)||(Le==null||((tr=Le.standard_answer)===null||tr===void 0)?void 0:tr.length)>0)&&e.a.createElement(_.a,{style:{marginTop:14}},e.a.createElement("span",{className:"font16 "},"\u89E3\u6790\uFF1A"),e.a.createElement(J.a,{className:j.a.renderHtml,value:(Le==null?void 0:Le.analysis)||"\u6682\u65E0\u89E3\u6790"}))),M&&!Number.isNaN(parseFloat(Le==null?void 0:Le.user_score))&&(Le==null?void 0:Le.question_type)!==Ye.a.Shixun&&e.a.createElement("span",null,e.a.createElement("span",{style:{color:"#0152d9"}},"\u5B66\u751F\u5F97\u5206\uFF1A"),Le==null?void 0:Le.user_score,"\u5206"),X&&((Le==null?void 0:Le.question_type)===4||(Le==null?void 0:Le.question_type)===3||(Le==null?void 0:Le.question_type)===6)&&e.a.createElement("div",{style:{display:"flex",flexFlow:"column"}},(Le==null||(($t=Le.answer_comments)===null||$t===void 0||((_r=$t[0])===null||_r===void 0||((Zt=_r.user)===null||Zt===void 0)))?void 0:Zt.name)&&e.a.createElement("span",null,"\u8BC4\u9605\u6559\u5E08\uFF1A",Le==null||((Lr=Le.answer_comments)===null||Lr===void 0||((pr=Lr[0])===null||pr===void 0||((Hr=pr.user)===null||Hr===void 0)))?void 0:Hr.name," "),(Le==null||((Nr=Le.answer_comments)===null||Nr===void 0||((Ur=Nr[0])===null||Ur===void 0))?void 0:Ur.comment)&&e.a.createElement("span",null,"\u6559\u5E08\u8BC4\u8BED\uFF1A",Le==null||((dr=Le.answer_comments)===null||dr===void 0||((qr=dr[0])===null||qr===void 0))?void 0:qr.comment," ")),e.a.createElement(G.a,{style:Ot.current?{marginTop:30}:{}}))},kt=function(Le){var Ht=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],Gt=["","\u5341","\u767E","\u5343","\u4E07"];Le=parseInt(Le);var Ut=function(Vt){for(var ar=Vt.toString().split("").reverse(),rr="",Dt=0;Dt<ar.length;Dt++)rr=(Dt==0&&ar[Dt]==0||Dt>0&&ar[Dt]==0&&ar[Dt-1]==0?"":Ht[ar[Dt]]+(ar[Dt]==0?Gt[0]:Gt[Dt]))+rr;return rr},Kt=Math.floor(Le/1e4),Qt=Le%1e4;return Qt.toString().length<4&&(Qt="0"+Qt),Kt?Ut(Kt)+"\u4E07"+Ut(Qt):Ut(Le)},br=function(Le,Ht){return Le.category?e.a.createElement("div",null,e.a.createElement("span",{className:"font16 c-light-primary"},kt(Le.key+1),"\u3001",Le.name),e.a.createElement("span",{className:"c-grey-999"},"\uFF08\u5171",Le.count,"\u9898\uFF0C",(Le==null?void 0:Le.question_type)===7?"\u5305\u542B".concat(Le==null?void 0:Le.sub_count,"\u5C0F\u9898\uFF1B"):"","\u5171",Le.score,"\u5206\uFF09")):ir(Le,Ht)},fr=Object(c.useCallback)(function(){var Jt,Le,Ht,Gt,Ut,Kt,Qt,or=(Ae==null||((Jt=Ae.exerciseExportHeadData)===null||Jt===void 0||((Le=Jt.exercise_header)===null||Le===void 0))?void 0:Le.export_page_num)||40,Vt=dt==null||((Ht=dt.exercise_question_types)===null||Ht===void 0||((Gt=Ht.map(function(rr,Dt){return[Object(t.a)(Object(t.a)({},rr),{},{items:null,category:1,key:Dt})].concat(Object(D.a)(rr.items))}))===null||Gt===void 0))?void 0:Gt.flat(),ar=0;return Vt!=null&&Vt.length?(Ut=new Array(Math.ceil((Vt==null?void 0:Vt.length)/or)))===null||Ut===void 0||((Kt=Ut.fill([]))===null||Kt===void 0||((Qt=Kt.map(function(rr,Dt){return Vt.slice(Dt*or,Dt*or+or)}))===null||Qt===void 0))?void 0:Qt.map(function(rr,Dt){return e.a.createElement("div",{className:"pl60 pr30",style:{minHeight:Dt===0?1e3:"auto"}},Dt===0&&e.a.createElement(e.a.Fragment,null,e.a.createElement(be.a,{isExportBlank:Ot.current}),e.a.createElement(G.a,{className:j.a.divider})),rr==null?void 0:rr.map(function(jt,Ft){return jt.question_title&&++ar,br(jt,ar)}))}):null},[dt==null?void 0:dt.exercise_question_types,Jr]);return e.a.createElement("section",{className:"edu-container"},e.a.createElement("section",{className:"animated fadeIn"},e.a.createElement("aside",{className:"mt10"},st&&e.a.createElement(z.a,{separator:">"},e.a.createElement(z.a.Item,null,e.a.createElement(l.a,{to:"/classrooms/".concat(ut.coursesId,"/exercise")},st==null||((Ie=st.course)===null||Ie===void 0)?void 0:Ie.course_name)),e.a.createElement(z.a.Item,null,e.a.createElement(l.a,{to:"/classrooms/".concat(ut.coursesId,"/exercise")},"\u8BD5\u5377\u5217\u8868")),e.a.createElement(z.a.Item,null,e.a.createElement(l.a,{to:"/classrooms/".concat(ut.coursesId,"/exercise/").concat(dt==null||((Me=dt.exercise)===null||Me===void 0)?void 0:Me.id,"/detail")},"\u8BD5\u5377\u8BE6\u60C5")),e.a.createElement(z.a.Item,null,(dt==null||((ye=dt.exercise_answer_user)===null||ye===void 0)?void 0:ye.user_name)||(dt==null||((le=dt.exercise)===null||le===void 0)?void 0:le.exercise_name)))),e.a.createElement("aside",{className:[j.a.title,"mt20"].join(" ")},e.a.createElement(_.a,{style:{width:"100%"}},e.a.createElement(u.a,{flex:"1",style:{lineHeight:"24px"}},e.a.createElement(l.a,{to:"/classrooms/".concat(ut.coursesId,"/exercise/").concat(dt==null||((ue=dt.exercise)===null||ue===void 0)?void 0:ue.id,"/detail")},e.a.createElement(R.a,{className:"font16 c-black"})),Object(k.A)((Z=dt.exercise)===null||Z===void 0?void 0:Z.exercise_status),e.a.createElement("strong",{className:"font20 ml5"},dt==null||((te=dt.exercise)===null||te===void 0)?void 0:te.exercise_name)),e.a.createElement(u.a,null,e.a.createElement(V.a,{type:"primary",onClick:function(){Te(!0),setTimeout(function(){Ar("")},500)}},e.a.createElement(U.a,null),"\u5BFC\u51FA\u7A7A\u767D\u8BD5\u5377+\u7B54\u6848"),e.a.createElement(V.a,{type:"primary",className:"ml10",onClick:function(){return Ar("")},loading:wt},e.a.createElement(U.a,null),"\u5BFC\u51FA\u7A7A\u767D\u8BD5\u5377"),Object(Ee.c)()&&e.a.createElement(V.a,{disabled:wt,className:"ml10",type:"primary",onClick:function(){ot(!0)}},e.a.createElement(U.a,null),"\u5BFC\u51FA\u6240\u6709\u5B66\u751F\u8BD5\u5377"))))),e.a.createElement(s.a,{title:"\u5BFC\u51FA\u8BD5\u5377\u9009\u62E9",visible:rt,footer:e.a.createElement("div",null,e.a.createElement(V.a,{type:"primary",onClick:function(){H(!0),d(!0),ot(!1),Ar("all")}},"\u662F"),e.a.createElement(V.a,{onClick:function(){d(!0),ot(!1),Ar("all")}},"\u5426")),onCancel:function(){return ot(!1)}},"\u662F\u5426\u8FDE\u540C\u8BC4\u9605\u6559\u5E08\u3001\u6559\u5E08\u8BC4\u8BED\u4E00\u8D77\u5BFC\u51FA\uFF1F"),e.a.createElement("section",{id:"export-all",className:[j.a.bg,"pt30","pb30","mt20","mb20","relative"].join(" "),ref:qt},fr()))},Ue=$e.default=Object(g.a)(function(Qe){var He=Qe.exercise,Ie=Qe.loading,Me=Qe.user,ye=Qe.globalSetting;return{exercise:He,globalSetting:ye,user:Me,loading:Ie.effects}})(Ce)},n6Qo:function(vt,$e,q){"use strict";q.d($e,"a",function(){return P});var ve=q("q1tI"),V=q("biw7"),O=q("fyJ8");function z(L){var S=L.className,_=L.index,b=L.children,u=L.colSpan,o=L.rowSpan,r=ve.useContext(V.a),A=r.prefixCls,s=r.fixedInfoList,t=s[_];return ve.createElement(O.a,Object.assign({className:S,index:_,component:"td",prefixCls:A,record:null,dataIndex:null,render:function(){return{children:b,props:{colSpan:u,rowSpan:o}}}},t))}function D(L){return ve.createElement("tr",Object.assign({},L))}function I(L){var S=L.children,_=ve.useContext(V.a),b=_.prefixCls;return ve.createElement("tfoot",{className:"".concat(b,"-summary")},S)}var G=$e.b=I,P={Cell:z,Row:D}},p5ED:function(vt,$e,q){"use strict";var ve=q("+L6B"),V=q("2/Rp"),O=q("5Dmo"),z=q("3S7+"),D=q("k1fw"),I=q("tJVT"),G=q("q1tI"),P=q.n(G),L=q("vHTk"),S=q.n(L),_=q("yEEn"),b=q("ZW9T"),u=q("1vsH");$e.a=function(o){var r=o.name,A=o.data,s=o.theme,t=o.type,n=o.filename,i=o.monacoEditor,B=o.className,w=o.style,y=o.close,x=o.onClose,E=o.hasMask,c=Object(G.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),e=Object(I.a)(c,2),a=e[0],l=e[1],g=Object(G.useState)(""),p=Object(I.a)(g,2),f=p[0],R=p[1],U,Q=1024*1024,j=10*Q,J=Object(G.useRef)();t==="office"&&(U=Object(u.T)(A).filesize,U>j&&(t="other")),n&&(i.filename=n),Object(G.useEffect)(function(){var ne,me,_e=(ne=document.cookie)===null||ne===void 0||((me=ne.replace(/\s/g,""))===null||me===void 0)?void 0:me.split(";");_e==null||_e.map(function(Oe){var xe=Oe.split("=");xe[0]==="_educoder_session"&&R(xe[1])})},[]);var k=function(){if(A.startsWith("http")||A.startsWith("/")){Y();return}Object(u.z)(n||"educoder",A,n)},Y=function(){Object(u.x)(n||r,A)};return console.log("data:",A,"fileanme:",n," name:",r),P.a.createElement("div",{style:Object(D.a)({},w||{}),className:"".concat(E&&S.a.bgBlack," ").concat(t?S.a.wrp:"hide")},y&&P.a.createElement("div",{className:S.a.close,ref:J},P.a.createElement(z.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return J.current}},P.a.createElement("span",{onClick:Y},P.a.createElement("i",{className:"icon-quxiaozhiding"}))),P.a.createElement(z.a,{title:"\u5173\u95ED",getPopupContainer:function(){return J.current}},P.a.createElement("span",{className:"",onClick:x},P.a.createElement("i",{className:"icon-guanbi1"})))),P.a.createElement("div",{className:"".concat(S.a[B]," ").concat(B," ").concat(S.a.monaco," ").concat(t==="txt"?"show":"hide")},t==="txt"&&P.a.createElement(b.b,i)),t==="audio"&&P.a.createElement("audio",{src:"".concat(A!=null&&A.startsWith("/")||(A==null?void 0:A.indexOf("https://"))>-1?A:"data:audio/mp3;base64,").concat(A),autoPlay:!0}),t==="video"&&P.a.createElement(P.a.Fragment,null,A!=null&&A.startsWith("/")?P.a.createElement("video",{controls:!0,src:"".concat(A),autoPlay:!0}):P.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(A),autoPlay:!0})),t==="html"&&P.a.createElement("iframe",{src:A+"&disposition=inline"}),t==="pdf"&&P.a.createElement("embed",{className:S.a.embed,src:A}),t==="image"&&P.a.createElement(P.a.Fragment,null,P.a.createElement("img",{src:"".concat(A!=null&&A.startsWith("/")||(A==null?void 0:A.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(A)})),t==="other"&&P.a.createElement("div",null,P.a.createElement(V.a,{type:"primary",size:"large",onClick:k},P.a.createElement(_.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(t==="download"||t==="office")&&P.a.createElement(V.a,{type:"primary",size:"large",onClick:k},P.a.createElement(_.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},psGv:function(vt,$e,q){var ve,V;(function(){var O;(function(){"use strict";var G=[,,function(_){function b(r){this.__parent=r,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 r=new b(this.__parent);return r.set_indent(this.__indent_count,this.__alignment_count),r},b.prototype.item=function(r){return r<0?this.__items[this.__items.length+r]:this.__items[r]},b.prototype.has_match=function(r){for(var A=this.__items.length-1;A>=0;A--)if(this.__items[A].match(r))return!0;return!1},b.prototype.set_indent=function(r,A){this.is_empty()&&(this.__indent_count=r||0,this.__alignment_count=A||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 r=this.__parent.current_line;return r.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),r.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),r.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,r.__items[0]===" "&&(r.__items.splice(0,1),r.__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(r){this.__items.push(r);var A=r.lastIndexOf(`
`);A!==-1?this.__character_count=r.length-A:this.__character_count+=r.length},b.prototype.pop=function(){var r=null;return this.is_empty()||(r=this.__items.pop(),this.__character_count-=r.length),r},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 r="";return this.is_empty()?this.__parent.indent_empty_lines&&(r=this.__parent.get_indent_string(this.__indent_count)):(r=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),r+=this.__items.join("")),r};function u(r,A){this.__cache=[""],this.__indent_size=r.indent_size,this.__indent_string=r.indent_char,r.indent_with_tabs||(this.__indent_string=new Array(r.indent_size+1).join(r.indent_char)),A=A||"",r.indent_level>0&&(A=new Array(r.indent_level+1).join(this.__indent_string)),this.__base_string=A,this.__base_string_length=A.length}u.prototype.get_indent_size=function(r,A){var s=this.__base_string_length;return A=A||0,r<0&&(s=0),s+=r*this.__indent_size,s+=A,s},u.prototype.get_indent_string=function(r,A){var s=this.__base_string;return A=A||0,r<0&&(r=0,s=""),A+=r*this.__indent_size,this.__ensure_cache(A),s+=this.__cache[A],s},u.prototype.__ensure_cache=function(r){for(;r>=this.__cache.length;)this.__add_column()},u.prototype.__add_column=function(){var r=this.__cache.length,A=0,s="";this.__indent_size&&r>=this.__indent_size&&(A=Math.floor(r/this.__indent_size),r-=A*this.__indent_size,s=new Array(A+1).join(this.__indent_string)),r&&(s+=new Array(r+1).join(" ")),this.__cache.push(s)};function o(r,A){this.__indent_cache=new u(r,A),this.raw=!1,this._end_with_newline=r.end_with_newline,this.indent_size=r.indent_size,this.wrap_line_length=r.wrap_line_length,this.indent_empty_lines=r.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()}o.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},o.prototype.get_line_number=function(){return this.__lines.length},o.prototype.get_indent_string=function(r,A){return this.__indent_cache.get_indent_string(r,A)},o.prototype.get_indent_size=function(r,A){return this.__indent_cache.get_indent_size(r,A)},o.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},o.prototype.add_new_line=function(r){return this.is_empty()||!r&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},o.prototype.get_code=function(r){this.trim(!0);var A=this.current_line.pop();A&&(A[A.length-1]===`
`&&(A=A.replace(/\n+$/g,"")),this.current_line.push(A)),this._end_with_newline&&this.__add_outputline();var s=this.__lines.join(`
`);return r!==`
`&&(s=s.replace(/[\n]/g,r)),s},o.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},o.prototype.set_indent=function(r,A){return r=r||0,A=A||0,this.next_line.set_indent(r,A),this.__lines.length>1?(this.current_line.set_indent(r,A),!0):(this.current_line.set_indent(),!1)},o.prototype.add_raw_token=function(r){for(var A=0;A<r.newlines;A++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(r.whitespace_before),this.current_line.push(r.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},o.prototype.add_token=function(r){this.__add_space_before_token(),this.current_line.push(r),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},o.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},o.prototype.remove_indent=function(r){for(var A=this.__lines.length;r<A;)this.__lines[r]._remove_indent(),r++;this.current_line._remove_wrap_indent()},o.prototype.trim=function(r){for(r=r===void 0?!1:r,this.current_line.trim();r&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},o.prototype.just_added_newline=function(){return this.current_line.is_empty()},o.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},o.prototype.ensure_empty_line_above=function(r,A){for(var s=this.__lines.length-2;s>=0;){var t=this.__lines[s];if(t.is_empty())break;if(t.item(0).indexOf(r)!==0&&t.item(-1)!==A){this.__lines.splice(s+1,0,new b(this)),this.previous_line=this.__lines[this.__lines.length-2];break}s--}},_.exports.Output=o},function(_){function b(u,o,r,A){this.type=u,this.text=o,this.comments_before=null,this.newlines=r||0,this.whitespace_before=A||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}_.exports.Token=b},,,function(_){function b(r,A){this.raw_options=u(r,A),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","django","erb","handlebars","php","smarty"],["auto"])}b.prototype._get_array=function(r,A){var s=this.raw_options[r],t=A||[];return typeof s=="object"?s!==null&&typeof s.concat=="function"&&(t=s.concat()):typeof s=="string"&&(t=s.split(/[^a-zA-Z0-9_\/\-]+/)),t},b.prototype._get_boolean=function(r,A){var s=this.raw_options[r],t=s===void 0?!!A:!!s;return t},b.prototype._get_characters=function(r,A){var s=this.raw_options[r],t=A||"";return typeof s=="string"&&(t=s.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),t},b.prototype._get_number=function(r,A){var s=this.raw_options[r];A=parseInt(A,10),isNaN(A)&&(A=0);var t=parseInt(s,10);return isNaN(t)&&(t=A),t},b.prototype._get_selection=function(r,A,s){var t=this._get_selection_list(r,A,s);if(t.length!==1)throw new Error("Invalid Option Value: The option '"+r+`' can only be one of the following values:
`+A+`
You passed in: '`+this.raw_options[r]+"'");return t[0]},b.prototype._get_selection_list=function(r,A,s){if(!A||A.length===0)throw new Error("Selection list cannot be empty.");if(s=s||[A[0]],!this._is_valid_selection(s,A))throw new Error("Invalid Default Value!");var t=this._get_array(r,s);if(!this._is_valid_selection(t,A))throw new Error("Invalid Option Value: The option '"+r+`' can contain only the following values:
`+A+`
You passed in: '`+this.raw_options[r]+"'");return t},b.prototype._is_valid_selection=function(r,A){return r.length&&A.length&&!r.some(function(s){return A.indexOf(s)===-1})};function u(r,A){var s={};r=o(r);var t;for(t in r)t!==A&&(s[t]=r[t]);if(A&&r[A])for(t in r[A])s[t]=r[A][t];return s}function o(r){var A={},s;for(s in r){var t=s.replace(/-/g,"_");A[t]=r[s]}return A}_.exports.Options=b,_.exports.normalizeOpts=o,_.exports.mergeOpts=u},,function(_){var b=RegExp.prototype.hasOwnProperty("sticky");function u(o){this.__input=o||"",this.__input_length=this.__input.length,this.__position=0}u.prototype.restart=function(){this.__position=0},u.prototype.back=function(){this.__position>0&&(this.__position-=1)},u.prototype.hasNext=function(){return this.__position<this.__input_length},u.prototype.next=function(){var o=null;return this.hasNext()&&(o=this.__input.charAt(this.__position),this.__position+=1),o},u.prototype.peek=function(o){var r=null;return o=o||0,o+=this.__position,o>=0&&o<this.__input_length&&(r=this.__input.charAt(o)),r},u.prototype.__match=function(o,r){o.lastIndex=r;var A=o.exec(this.__input);return A&&!(b&&o.sticky)&&(A.index!==r&&(A=null)),A},u.prototype.test=function(o,r){return r=r||0,r+=this.__position,r>=0&&r<this.__input_length?!!this.__match(o,r):!1},u.prototype.testChar=function(o,r){var A=this.peek(r);return o.lastIndex=0,A!==null&&o.test(A)},u.prototype.match=function(o){var r=this.__match(o,this.__position);return r?this.__position+=r[0].length:r=null,r},u.prototype.read=function(o,r,A){var s="",t;return o&&(t=this.match(o),t&&(s+=t[0])),r&&(t||!o)&&(s+=this.readUntil(r,A)),s},u.prototype.readUntil=function(o,r){var A="",s=this.__position;o.lastIndex=this.__position;var t=o.exec(this.__input);return t?(s=t.index,r&&(s+=t[0].length)):s=this.__input_length,A=this.__input.substring(this.__position,s),this.__position=s,A},u.prototype.readUntilAfter=function(o){return this.readUntil(o,!0)},u.prototype.get_regexp=function(o,r){var A=null,s="g";return r&&b&&(s="y"),typeof o=="string"&&o!==""?A=new RegExp(o,s):o&&(A=new RegExp(o.source,s)),A},u.prototype.get_literal_regexp=function(o){return RegExp(o.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},u.prototype.peekUntilAfter=function(o){var r=this.__position,A=this.readUntilAfter(o);return this.__position=r,A},u.prototype.lookBack=function(o){var r=this.__position-1;return r>=o.length&&this.__input.substring(r-o.length,r).toLowerCase()===o},_.exports.InputScanner=u},function(_,b,u){var o=u(8).InputScanner,r=u(3).Token,A=u(10).TokenStream,s=u(11).WhitespacePattern,t={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},n=function(i,B){this._input=new o(i),this._options=B||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new s(this._input)};n.prototype.tokenize=function(){this._input.restart(),this.__tokens=new A,this._reset();for(var i,B=new r(t.START,""),w=null,y=[],x=new A;B.type!==t.EOF;){for(i=this._get_next_token(B,w);this._is_comment(i);)x.add(i),i=this._get_next_token(B,w);x.isEmpty()||(i.comments_before=x,x=new A),i.parent=w,this._is_opening(i)?(y.push(w),w=i):w&&this._is_closing(i,w)&&(i.opened=w,w.closed=i,w=y.pop(),i.parent=w),i.previous=B,B.next=i,this.__tokens.add(i),B=i}return this.__tokens},n.prototype._is_first_token=function(){return this.__tokens.isEmpty()},n.prototype._reset=function(){},n.prototype._get_next_token=function(i,B){this._readWhitespace();var w=this._input.read(/.+/g);return w?this._create_token(t.RAW,w):this._create_token(t.EOF,"")},n.prototype._is_comment=function(i){return!1},n.prototype._is_opening=function(i){return!1},n.prototype._is_closing=function(i,B){return!1},n.prototype._create_token=function(i,B){var w=new r(i,B,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return w},n.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},_.exports.Tokenizer=n,_.exports.TOKEN=t},function(_){function b(u){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=u}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 u=null;return this.hasNext()&&(u=this.__tokens[this.__position],this.__position+=1),u},b.prototype.peek=function(u){var o=null;return u=u||0,u+=this.__position,u>=0&&u<this.__tokens_length&&(o=this.__tokens[u]),o},b.prototype.add=function(u){this.__parent_token&&(u.parent=this.__parent_token),this.__tokens.push(u),this.__tokens_length+=1},_.exports.TokenStream=b},function(_,b,u){var o=u(12).Pattern;function r(A,s){o.call(this,A,s),s?this._line_regexp=this._input.get_regexp(s._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}r.prototype=new o,r.prototype.__set_whitespace_patterns=function(A,s){A+="\\t ",s+="\\n\\r",this._match_pattern=this._input.get_regexp("["+A+s+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+s+"]")},r.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var A=this._input.read(this._match_pattern);if(A===" ")this.whitespace_before_token=" ";else if(A){var s=this.__split(this._newline_regexp,A);this.newline_count=s.length-1,this.whitespace_before_token=s[this.newline_count]}return A},r.prototype.matching=function(A,s){var t=this._create();return t.__set_whitespace_patterns(A,s),t._update(),t},r.prototype._create=function(){return new r(this._input,this)},r.prototype.__split=function(A,s){A.lastIndex=0;for(var t=0,n=[],i=A.exec(s);i;)n.push(s.substring(t,i.index)),t=i.index+i[0].length,i=A.exec(s);return t<s.length?n.push(s.substring(t,s.length)):n.push(""),n},_.exports.WhitespacePattern=r},function(_){function b(u,o){this._input=u,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,o&&(this._starting_pattern=this._input.get_regexp(o._starting_pattern,!0),this._match_pattern=this._input.get_regexp(o._match_pattern,!0),this._until_pattern=this._input.get_regexp(o._until_pattern),this._until_after=o._until_after)}b.prototype.read=function(){var u=this._input.read(this._starting_pattern);return(!this._starting_pattern||u)&&(u+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),u},b.prototype.read_match=function(){return this._input.match(this._match_pattern)},b.prototype.until_after=function(u){var o=this._create();return o._until_after=!0,o._until_pattern=this._input.get_regexp(u),o._update(),o},b.prototype.until=function(u){var o=this._create();return o._until_after=!1,o._until_pattern=this._input.get_regexp(u),o._update(),o},b.prototype.starting_with=function(u){var o=this._create();return o._starting_pattern=this._input.get_regexp(u,!0),o._update(),o},b.prototype.matching=function(u){var o=this._create();return o._match_pattern=this._input.get_regexp(u,!0),o._update(),o},b.prototype._create=function(){return new b(this._input,this)},b.prototype._update=function(){},_.exports.Pattern=b},function(_){function b(u,o){u=typeof u=="string"?u:u.source,o=typeof o=="string"?o:o.source,this.__directives_block_pattern=new RegExp(u+/ beautify( \w+[:]\w+)+ /.source+o,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(u+/\sbeautify\signore:end\s/.source+o,"g")}b.prototype.get_directives=function(u){if(!u.match(this.__directives_block_pattern))return null;var o={};this.__directive_pattern.lastIndex=0;for(var r=this.__directive_pattern.exec(u);r;)o[r[1]]=r[2],r=this.__directive_pattern.exec(u);return o},b.prototype.readIgnored=function(u){return u.readUntilAfter(this.__directives_end_ignore_pattern)},_.exports.Directives=b},function(_,b,u){var o=u(12).Pattern,r={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function A(s,t){o.call(this,s,t),this.__template_pattern=null,this._disabled=Object.assign({},r),this._excluded=Object.assign({},r),t&&(this.__template_pattern=this._input.get_regexp(t.__template_pattern),this._excluded=Object.assign(this._excluded,t._excluded),this._disabled=Object.assign(this._disabled,t._disabled));var n=new o(s);this.__patterns={handlebars_comment:n.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:n.starting_with(/{{{/).until_after(/}}}/),handlebars:n.starting_with(/{{/).until_after(/}}/),php:n.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:n.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:n.starting_with(/{%/).until_after(/%}/),django_value:n.starting_with(/{{/).until_after(/}}/),django_comment:n.starting_with(/{#/).until_after(/#}/),smarty:n.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:n.starting_with(/{\*/).until_after(/\*}/),smarty_literal:n.starting_with(/{literal}/).until_after(/{\/literal}/)}}A.prototype=new o,A.prototype._create=function(){return new A(this._input,this)},A.prototype._update=function(){this.__set_templated_pattern()},A.prototype.disable=function(s){var t=this._create();return t._disabled[s]=!0,t._update(),t},A.prototype.read_options=function(s){var t=this._create();for(var n in r)t._disabled[n]=s.templating.indexOf(n)===-1;return t._update(),t},A.prototype.exclude=function(s){var t=this._create();return t._excluded[s]=!0,t._update(),t},A.prototype.read=function(){var s="";this._match_pattern?s=this._input.read(this._starting_pattern):s=this._input.read(this._starting_pattern,this.__template_pattern);for(var t=this._read_template();t;)this._match_pattern?t+=this._input.read(this._match_pattern):t+=this._input.readUntil(this.__template_pattern),s+=t,t=this._read_template();return this._until_after&&(s+=this._input.readUntilAfter(this._until_pattern)),s},A.prototype.__set_templated_pattern=function(){var s=[];this._disabled.php||s.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||s.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||s.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(s.push(this.__patterns.django._starting_pattern.source),s.push(this.__patterns.django_value._starting_pattern.source),s.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||s.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&s.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+s.join("|")+")")},A.prototype._read_template=function(){var s="",t=this._input.peek();if(t==="<"){var n=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&n==="?"&&(s=s||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&n==="%"&&(s=s||this.__patterns.erb.read())}else t==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(s=s||this.__patterns.handlebars_comment.read(),s=s||this.__patterns.handlebars_unescaped.read(),s=s||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(s=s||this.__patterns.django_value.read()),this._excluded.django||(s=s||this.__patterns.django_comment.read(),s=s||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(s=s||this.__patterns.smarty_comment.read(),s=s||this.__patterns.smarty_literal.read(),s=s||this.__patterns.smarty.read()));return s},_.exports.TemplatablePattern=A},,,,function(_,b,u){var o=u(19).Beautifier,r=u(20).Options;function A(s,t,n,i){var B=new o(s,t,n,i);return B.beautify()}_.exports=A,_.exports.defaultOptions=function(){return new r}},function(_,b,u){var o=u(20).Options,r=u(2).Output,A=u(21).Tokenizer,s=u(21).TOKEN,t=/\r\n|[\r\n]/,n=/\r\n|[\r\n]/g,i=function(g,p){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=g.max_preserve_newlines,this.preserve_newlines=g.preserve_newlines,this._output=new r(g,p)};i.prototype.current_line_has_match=function(g){return this._output.current_line.has_match(g)},i.prototype.set_space_before_token=function(g,p){this._output.space_before_token=g,this._output.non_breaking_space=p},i.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},i.prototype.add_raw_token=function(g){this._output.add_raw_token(g)},i.prototype.print_preserved_newlines=function(g){var p=0;g.type!==s.TEXT&&g.previous.type!==s.TEXT&&(p=g.newlines?1:0),this.preserve_newlines&&(p=g.newlines<this.max_preserve_newlines+1?g.newlines:this.max_preserve_newlines+1);for(var f=0;f<p;f++)this.print_newline(f>0);return p!==0},i.prototype.traverse_whitespace=function(g){return g.whitespace_before||g.newlines?(this.print_preserved_newlines(g)||(this._output.space_before_token=!0),!0):!1},i.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},i.prototype.print_newline=function(g){this._output.add_new_line(g)},i.prototype.print_token=function(g){g.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(g.text))},i.prototype.indent=function(){this.indent_level++},i.prototype.get_full_indent=function(g){return g=this.indent_level+(g||0),g<1?"":this._output.get_indent_string(g)};var B=function(g){for(var p=null,f=g.next;f.type!==s.EOF&&g.closed!==f;){if(f.type===s.ATTRIBUTE&&f.text==="type"){f.next&&f.next.type===s.EQUALS&&f.next.next&&f.next.next.type===s.VALUE&&(p=f.next.next.text);break}f=f.next}return p},w=function(g,p){var f=null,R=null;return p.closed?(g==="script"?f="text/javascript":g==="style"&&(f="text/css"),f=B(p)||f,f.search("text/css")>-1?R="css":f.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?R="javascript":f.search(/(text|application|dojo)\/(x-)?(html)/)>-1?R="html":f.search(/test\/null/)>-1&&(R="null"),R):null};function y(g,p){return p.indexOf(g)!==-1}function x(g,p,f){this.parent=g||null,this.tag=p?p.tag_name:"",this.indent_level=f||0,this.parser_token=p||null}function E(g){this._printer=g,this._current_frame=null}E.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},E.prototype.record_tag=function(g){var p=new x(this._current_frame,g,this._printer.indent_level);this._current_frame=p},E.prototype._try_pop_frame=function(g){var p=null;return g&&(p=g.parser_token,this._printer.indent_level=g.indent_level,this._current_frame=g.parent),p},E.prototype._get_frame=function(g,p){for(var f=this._current_frame;f&&!(g.indexOf(f.tag)!==-1);){if(p&&p.indexOf(f.tag)!==-1){f=null;break}f=f.parent}return f},E.prototype.try_pop=function(g,p){var f=this._get_frame([g],p);return this._try_pop_frame(f)},E.prototype.indent_to_tag=function(g){var p=this._get_frame(g);p&&(this._printer.indent_level=p.indent_level)};function c(g,p,f,R){this._source_text=g||"",p=p||{},this._js_beautify=f,this._css_beautify=R,this._tag_stack=null;var U=new o(p,"html");this._options=U,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,"force".length)==="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,"preserve".length)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}c.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var g=this._source_text,p=this._options.eol;this._options.eol==="auto"&&(p=`
`,g&&t.test(g)&&(p=g.match(t)[0])),g=g.replace(n,`
`);var f=g.match(/^[\t ]*/)[0],R={text:"",type:""},U=new e,Q=new i(this._options,f),j=new A(g,this._options).tokenize();this._tag_stack=new E(Q);for(var J=null,k=j.next();k.type!==s.EOF;)k.type===s.TAG_OPEN||k.type===s.COMMENT?(J=this._handle_tag_open(Q,k,U,R),U=J):k.type===s.ATTRIBUTE||k.type===s.EQUALS||k.type===s.VALUE||k.type===s.TEXT&&!U.tag_complete?J=this._handle_inside_tag(Q,k,U,j):k.type===s.TAG_CLOSE?J=this._handle_tag_close(Q,k,U):k.type===s.TEXT?J=this._handle_text(Q,k,U):Q.add_raw_token(k),R=J,k=j.next();var Y=Q._output.get_code(p);return Y},c.prototype._handle_tag_close=function(g,p,f){var R={text:p.text,type:p.type};return g.alignment_size=0,f.tag_complete=!0,g.set_space_before_token(p.newlines||p.whitespace_before!=="",!0),f.is_unformatted?g.add_raw_token(p):(f.tag_start_char==="<"&&(g.set_space_before_token(p.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&f.has_wrapped_attrs&&g.print_newline(!1)),g.print_token(p)),f.indent_content&&!(f.is_unformatted||f.is_content_unformatted)&&(g.indent(),f.indent_content=!1),!f.is_inline_element&&!(f.is_unformatted||f.is_content_unformatted)&&g.set_wrap_point(),R},c.prototype._handle_inside_tag=function(g,p,f,R){var U=f.has_wrapped_attrs,Q={text:p.text,type:p.type};if(g.set_space_before_token(p.newlines||p.whitespace_before!=="",!0),f.is_unformatted)g.add_raw_token(p);else if(f.tag_start_char==="{"&&p.type===s.TEXT)g.print_preserved_newlines(p)?(p.newlines=0,g.add_raw_token(p)):g.print_token(p);else{if(p.type===s.ATTRIBUTE?(g.set_space_before_token(!0),f.attr_count+=1):(p.type===s.EQUALS||p.type===s.VALUE&&p.previous.type===s.EQUALS)&&g.set_space_before_token(!1),p.type===s.ATTRIBUTE&&f.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(g.traverse_whitespace(p),U=U||p.newlines!==0),this._is_wrap_attributes_force)){var j=f.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&f.attr_count===1){var J=!0,k=0,Y;do{if(Y=R.peek(k),Y.type===s.ATTRIBUTE){J=!1;break}k+=1}while(k<4&&Y.type!==s.EOF&&Y.type!==s.TAG_CLOSE);j=!J}j&&(g.print_newline(!1),U=!0)}g.print_token(p),U=U||g.previous_token_wrapped(),f.has_wrapped_attrs=U}return Q},c.prototype._handle_text=function(g,p,f){var R={text:p.text,type:"TK_CONTENT"};return f.custom_beautifier_name?this._print_custom_beatifier_text(g,p,f):f.is_unformatted||f.is_content_unformatted?g.add_raw_token(p):(g.traverse_whitespace(p),g.print_token(p)),R},c.prototype._print_custom_beatifier_text=function(g,p,f){var R=this;if(p.text!==""){var U=p.text,Q,j=1,J="",k="";f.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?Q=this._js_beautify:f.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?Q=this._css_beautify:f.custom_beautifier_name==="html"&&(Q=function(xe,Se){var Fe=new c(xe,Se,R._js_beautify,R._css_beautify);return Fe.beautify()}),this._options.indent_scripts==="keep"?j=0:this._options.indent_scripts==="separate"&&(j=-g.indent_level);var Y=g.get_full_indent(j);if(U=U.replace(/\n[ \t]*$/,""),f.custom_beautifier_name!=="html"&&U[0]==="<"&&U.match(/^(<!--|<!\[CDATA\[)/)){var ne=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(U);if(!ne){g.add_raw_token(p);return}J=Y+ne[1]+`
`,U=ne[4],ne[5]&&(k=Y+ne[5]),U=U.replace(/\n[ \t]*$/,""),(ne[2]||ne[3].indexOf(`
`)!==-1)&&(ne=ne[3].match(/[ \t]+$/),ne&&(p.whitespace_before=ne[0]))}if(U)if(Q){var me=function(){this.eol=`
`};me.prototype=this._options.raw_options;var _e=new me;U=Q(Y+U,_e)}else{var Oe=p.whitespace_before;Oe&&(U=U.replace(new RegExp(`
(`+Oe+")?","g"),`
`)),U=Y+U.replace(/\n/g,`
`+Y)}J&&(U?U=J+U+`
`+k:U=J+k),g.print_newline(!1),U&&(p.text=U,p.whitespace_before="",p.newlines=0,g.add_raw_token(p),g.print_newline(!0))}},c.prototype._handle_tag_open=function(g,p,f,R){var U=this._get_tag_open_token(p);return(f.is_unformatted||f.is_content_unformatted)&&!f.is_empty_element&&p.type===s.TAG_OPEN&&p.text.indexOf("</")===0?(g.add_raw_token(p),U.start_tag_token=this._tag_stack.try_pop(U.tag_name)):(g.traverse_whitespace(p),this._set_tag_position(g,p,U,f,R),U.is_inline_element||g.set_wrap_point(),g.print_token(p)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(U.alignment_size=p.text.length+1),!U.tag_complete&&!U.is_unformatted&&(g.alignment_size=U.alignment_size),U};var e=function(g,p){if(this.parent=g||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 f;this.tag_start_char=p.text[0],this.text=p.text,this.tag_start_char==="<"?(f=p.text.match(/^<([^\s>]*)/),this.tag_check=f?f[1]:""):(f=p.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=f?f[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===s.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 R=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(R=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(R)))}};c.prototype._get_tag_open_token=function(g){var p=new e(this._tag_stack.get_parser_token(),g);return p.alignment_size=this._options.wrap_attributes_indent_size,p.is_end_tag=p.is_end_tag||y(p.tag_check,this._options.void_elements),p.is_empty_element=p.tag_complete||p.is_start_tag&&p.is_end_tag,p.is_unformatted=!p.tag_complete&&y(p.tag_check,this._options.unformatted),p.is_content_unformatted=!p.is_empty_element&&y(p.tag_check,this._options.content_unformatted),p.is_inline_element=y(p.tag_name,this._options.inline)||p.tag_name.includes("-")||p.tag_start_char==="{",p},c.prototype._set_tag_position=function(g,p,f,R,U){if(f.is_empty_element||(f.is_end_tag?f.start_tag_token=this._tag_stack.try_pop(f.tag_name):(this._do_optional_end_element(f)&&(f.is_inline_element||g.print_newline(!1)),this._tag_stack.record_tag(f),(f.tag_name==="script"||f.tag_name==="style")&&!(f.is_unformatted||f.is_content_unformatted)&&(f.custom_beautifier_name=w(f.tag_check,p)))),y(f.tag_check,this._options.extra_liners)&&(g.print_newline(!1),g._output.just_added_blankline()||g.print_newline(!0)),f.is_empty_element){if(f.tag_start_char==="{"&&f.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),f.indent_content=!0;var Q=g.current_line_has_match(/{{#if/);Q||g.print_newline(!1)}f.tag_name==="!--"&&U.type===s.TAG_CLOSE&&R.is_end_tag&&f.text.indexOf(`
`)===-1||(f.is_inline_element||f.is_unformatted||g.print_newline(!1),this._calcluate_parent_multiline(g,f))}else if(f.is_end_tag){var j=!1;j=f.start_tag_token&&f.start_tag_token.multiline_content,j=j||!f.is_inline_element&&!(R.is_inline_element||R.is_unformatted)&&!(U.type===s.TAG_CLOSE&&f.start_tag_token===R)&&U.type!=="TK_CONTENT",(f.is_content_unformatted||f.is_unformatted)&&(j=!1),j&&g.print_newline(!1)}else f.indent_content=!f.custom_beautifier_name,f.tag_start_char==="<"&&(f.tag_name==="html"?f.indent_content=this._options.indent_inner_html:f.tag_name==="head"?f.indent_content=this._options.indent_head_inner_html:f.tag_name==="body"&&(f.indent_content=this._options.indent_body_inner_html)),!(f.is_inline_element||f.is_unformatted)&&(U.type!=="TK_CONTENT"||f.is_content_unformatted)&&g.print_newline(!1),this._calcluate_parent_multiline(g,f)},c.prototype._calcluate_parent_multiline=function(g,p){p.parent&&g._output.just_added_newline()&&!((p.is_inline_element||p.is_unformatted)&&p.parent.is_inline_element)&&(p.parent.multiline_content=!0)};var a=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],l=["a","audio","del","ins","map","noscript","video"];c.prototype._do_optional_end_element=function(g){var p=null;if(g.is_empty_element||!g.is_start_tag||!g.parent)return;if(g.tag_name==="body")p=p||this._tag_stack.try_pop("head");else if(g.tag_name==="li")p=p||this._tag_stack.try_pop("li",["ol","ul"]);else if(g.tag_name==="dd"||g.tag_name==="dt")p=p||this._tag_stack.try_pop("dt",["dl"]),p=p||this._tag_stack.try_pop("dd",["dl"]);else if(g.parent.tag_name==="p"&&a.indexOf(g.tag_name)!==-1){var f=g.parent.parent;(!f||l.indexOf(f.tag_name)===-1)&&(p=p||this._tag_stack.try_pop("p"))}else g.tag_name==="rp"||g.tag_name==="rt"?(p=p||this._tag_stack.try_pop("rt",["ruby","rtc"]),p=p||this._tag_stack.try_pop("rp",["ruby","rtc"])):g.tag_name==="optgroup"?p=p||this._tag_stack.try_pop("optgroup",["select"]):g.tag_name==="option"?p=p||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):g.tag_name==="colgroup"?p=p||this._tag_stack.try_pop("caption",["table"]):g.tag_name==="thead"?(p=p||this._tag_stack.try_pop("caption",["table"]),p=p||this._tag_stack.try_pop("colgroup",["table"])):g.tag_name==="tbody"||g.tag_name==="tfoot"?(p=p||this._tag_stack.try_pop("caption",["table"]),p=p||this._tag_stack.try_pop("colgroup",["table"]),p=p||this._tag_stack.try_pop("thead",["table"]),p=p||this._tag_stack.try_pop("tbody",["table"])):g.tag_name==="tr"?(p=p||this._tag_stack.try_pop("caption",["table"]),p=p||this._tag_stack.try_pop("colgroup",["table"]),p=p||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(g.tag_name==="th"||g.tag_name==="td")&&(p=p||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),p=p||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return g.parent=this._tag_stack.get_parser_token(),p},_.exports.Beautifier=c},function(_,b,u){var o=u(6).Options;function r(A){o.call(this,A,"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_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.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"])}r.prototype=new o,_.exports.Options=r},function(_,b,u){var o=u(9).Tokenizer,r=u(9).TOKEN,A=u(13).Directives,s=u(14).TemplatablePattern,t=u(12).Pattern,n={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:r.START,RAW:r.RAW,EOF:r.EOF},i=new A(/<\!--/,/-->/),B=function(w,y){o.call(this,w,y),this._current_tag_name="";var x=new s(this._input).read_options(this._options),E=new t(this._input);if(this.__patterns={word:x.until(/[\n\r\t <]/),single_quote:x.until_after(/'/),double_quote:x.until_after(/"/),attribute:x.until(/[\n\r\t =>]|\/>/),element_name:x.until(/[\n\r\t >\/]/),handlebars_comment:E.starting_with(/{{!--/).until_after(/--}}/),handlebars:E.starting_with(/{{/).until_after(/}}/),handlebars_open:E.until(/[\n\r\t }]/),handlebars_raw_close:E.until(/}}/),comment:E.starting_with(/<!--/).until_after(/-->/),cdata:E.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:E.starting_with(/<!\[/).until_after(/]>/),processing:E.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var c=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=E.matching(c).until_after(c)}};B.prototype=new o,B.prototype._is_comment=function(w){return!1},B.prototype._is_opening=function(w){return w.type===n.TAG_OPEN},B.prototype._is_closing=function(w,y){return w.type===n.TAG_CLOSE&&y&&((w.text===">"||w.text==="/>")&&y.text[0]==="<"||w.text==="}}"&&y.text[0]==="{"&&y.text[1]==="{")},B.prototype._reset=function(){this._current_tag_name=""},B.prototype._get_next_token=function(w,y){var x=null;this._readWhitespace();var E=this._input.peek();return E===null?this._create_token(n.EOF,""):(x=x||this._read_open_handlebars(E,y),x=x||this._read_attribute(E,w,y),x=x||this._read_close(E,y),x=x||this._read_raw_content(E,w,y),x=x||this._read_content_word(E),x=x||this._read_comment_or_cdata(E),x=x||this._read_processing(E),x=x||this._read_open(E,y),x=x||this._create_token(n.UNKNOWN,this._input.next()),x)},B.prototype._read_comment_or_cdata=function(w){var y=null,x=null,E=null;if(w==="<"){var c=this._input.peek(1);c==="!"&&(x=this.__patterns.comment.read(),x?(E=i.get_directives(x),E&&E.ignore==="start"&&(x+=i.readIgnored(this._input))):x=this.__patterns.cdata.read()),x&&(y=this._create_token(n.COMMENT,x),y.directives=E)}return y},B.prototype._read_processing=function(w){var y=null,x=null,E=null;if(w==="<"){var c=this._input.peek(1);(c==="!"||c==="?")&&(x=this.__patterns.conditional_comment.read(),x=x||this.__patterns.processing.read()),x&&(y=this._create_token(n.COMMENT,x),y.directives=E)}return y},B.prototype._read_open=function(w,y){var x=null,E=null;return y||w==="<"&&(x=this._input.next(),this._input.peek()==="/"&&(x+=this._input.next()),x+=this.__patterns.element_name.read(),E=this._create_token(n.TAG_OPEN,x)),E},B.prototype._read_open_handlebars=function(w,y){var x=null,E=null;return y||this._options.indent_handlebars&&w==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(x=this.__patterns.handlebars_comment.read(),x=x||this.__patterns.handlebars.read(),E=this._create_token(n.COMMENT,x)):(x=this.__patterns.handlebars_open.read(),E=this._create_token(n.TAG_OPEN,x))),E},B.prototype._read_close=function(w,y){var x=null,E=null;return y&&(y.text[0]==="<"&&(w===">"||w==="/"&&this._input.peek(1)===">")?(x=this._input.next(),w==="/"&&(x+=this._input.next()),E=this._create_token(n.TAG_CLOSE,x)):y.text[0]==="{"&&w==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),E=this._create_token(n.TAG_CLOSE,"}}"))),E},B.prototype._read_attribute=function(w,y,x){var E=null,c="";if(x&&x.text[0]==="<")if(w==="=")E=this._create_token(n.EQUALS,this._input.next());else if(w==='"'||w==="'"){var e=this._input.next();w==='"'?e+=this.__patterns.double_quote.read():e+=this.__patterns.single_quote.read(),E=this._create_token(n.VALUE,e)}else c=this.__patterns.attribute.read(),c&&(y.type===n.EQUALS?E=this._create_token(n.VALUE,c):E=this._create_token(n.ATTRIBUTE,c));return E},B.prototype._is_content_unformatted=function(w){return this._options.void_elements.indexOf(w)===-1&&(this._options.content_unformatted.indexOf(w)!==-1||this._options.unformatted.indexOf(w)!==-1)},B.prototype._read_raw_content=function(w,y,x){var E="";if(x&&x.text[0]==="{")E=this.__patterns.handlebars_raw_close.read();else if(y.type===n.TAG_CLOSE&&y.opened.text[0]==="<"&&y.text[0]!=="/"){var c=y.opened.text.substr(1).toLowerCase();if(c==="script"||c==="style"){var e=this._read_comment_or_cdata(w);if(e)return e.type=n.TEXT,e;E=this._input.readUntil(new RegExp("</"+c+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(c)&&(E=this._input.readUntil(new RegExp("</"+c+"[\\n\\r\\t ]*?>","ig")))}return E?this._create_token(n.TEXT,E):null},B.prototype._read_content_word=function(w){var y="";if(this._options.unformatted_content_delimiter&&(w===this._options.unformatted_content_delimiter[0]&&(y=this.__patterns.unformatted_content_delimiter.read())),y||(y=this.__patterns.word.read()),y)return this._create_token(n.TEXT,y)},_.exports.Tokenizer=B,_.exports.TOKEN=n}],P={};function L(_){var b=P[_];if(b!==void 0)return b.exports;var u=P[_]={exports:{}};return G[_](u,u.exports,L),u.exports}var S=L(18);O=S})();var z=O;if(!0)!(ve=[q,q("6UM0"),q("TXwP")],V=function(G){var P=q("6UM0"),L=q("TXwP");return{html_beautify:function(S,_){return z(S,_,P.js_beautify,L.css_beautify)}}}.apply($e,ve),V!==void 0&&(vt.exports=V));else var D,I})()},q5bB:function(vt,$e,q){vt.exports={flex_box_center:"flex_box_center___uTq5a",flex_space_between:"flex_space_between___LTVj-",flex_box_vertical_center:"flex_box_vertical_center___1L3z-",flex_box_center_end:"flex_box_center_end___3ghBL",flex_box_column:"flex_box_column___2bU1n",bg:"bg___2iXhR",title:"title___2PlPP",questionIcons:"questionIcons___3jZbU",green:"green___1msyJ",orange:"orange___1uebJ",greenTip:"greenTip___1th4S",redTip:"redTip___18tx7",orangeTip:"orangeTip___2T44_",flexRow:"flexRow___14mZI",simpleWrap:"simpleWrap___325ES",divider:"divider___33qYV",modal:"modal___B_owv",programTitle:"programTitle___1CfOY",simpleBg:"simpleBg___23Mrm"}},"rAM+":function(vt,$e,q){"use strict";q.d($e,"a",function(){return V});var ve=q("Qw5x");function V(O,z){var D;if(typeof Symbol=="undefined"||O[Symbol.iterator]==null){if(Array.isArray(O)||(D=Object(ve.a)(O))||z&&O&&typeof O.length=="number"){D&&(O=D);var I=0,G=function(){};return{s:G,n:function(){return I>=O.length?{done:!0}:{done:!1,value:O[I++]}},e:function(b){throw b},f:G}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var P=!0,L=!1,S;return{s:function(){D=O[Symbol.iterator]()},n:function(){var b=D.next();return P=b.done,b},e:function(b){L=!0,S=b},f:function(){try{!P&&D.return!=null&&D.return()}finally{if(L)throw S}}}}},rUJ1:function(vt,$e){const q=/[&<>"']/,ve=/[&<>"']/g,V=/[<>"']|&(?!#?\w+;)/,O=/[<>"']|&(?!#?\w+;)/g,z={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},D=E=>z[E];function I(E,c){if(c){if(q.test(E))return E.replace(ve,D)}else if(V.test(E))return E.replace(O,D);return E}const G=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function P(E){return E.replace(G,(c,e)=>(e=e.toLowerCase(),e==="colon"?":":e.charAt(0)==="#"?e.charAt(1)==="x"?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""))}const L=/(^|[^\[])\^/g;function S(E,c){E=E.source||E,c=c||"";const e={replace:(a,l)=>(l=l.source||l,l=l.replace(L,"$1"),E=E.replace(a,l),e),getRegex:()=>new RegExp(E,c)};return e}const _=/[^\w:]/g,b=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function u(E,c,e){if(E){let a;try{a=decodeURIComponent(P(e)).replace(_,"").toLowerCase()}catch(l){return null}if(a.indexOf("javascript:")===0||a.indexOf("vbscript:")===0||a.indexOf("data:")===0)return null}c&&!b.test(e)&&(e=t(c,e));try{e=encodeURI(e).replace(/%25/g,"%")}catch(a){return null}return e}const o={},r=/^[^:]+:\/*[^/]*$/,A=/^([^:]+:)[\s\S]*$/,s=/^([^:]+:\/*[^/]*)[\s\S]*$/;function t(E,c){o[" "+E]||(r.test(E)?o[" "+E]=E+"/":o[" "+E]=w(E,"/",!0)),E=o[" "+E];const e=E.indexOf(":")===-1;return c.substring(0,2)==="//"?e?c:E.replace(A,"$1")+c:c.charAt(0)==="/"?e?c:E.replace(s,"$1")+c:E+c}const n={exec:function(){}};function i(E){let c=1,e,a;for(;c<arguments.length;c++){e=arguments[c];for(a in e)Object.prototype.hasOwnProperty.call(e,a)&&(E[a]=e[a])}return E}function B(E,c){const e=E.replace(/\|/g,(g,p,f)=>{let R=!1,U=p;for(;--U>=0&&f[U]==="\\";)R=!R;return R?"|":" |"}),a=e.split(/ \|/);let l=0;if(a.length>c)a.splice(c);else for(;a.length<c;)a.push("");for(;l<a.length;l++)a[l]=a[l].trim().replace(/\\\|/g,"|");return a}function w(E,c,e){const a=E.length;if(a===0)return"";let l=0;for(;l<a;){const g=E.charAt(a-l-1);if(g===c&&!e)l++;else if(g!==c&&e)l++;else break}return E.substr(0,a-l)}function y(E,c){if(E.indexOf(c[1])===-1)return-1;const e=E.length;let a=0,l=0;for(;l<e;l++)if(E[l]==="\\")l++;else if(E[l]===c[0])a++;else if(E[l]===c[1]&&(a--,a<0))return l;return-1}function x(E){E&&E.sanitize&&!E.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")}vt.exports={escape:I,unescape:P,edit:S,cleanUrl:u,resolveUrl:t,noopTest:n,merge:i,splitCells:B,rtrim:w,findClosingBracket:y,checkSanitizeDeprecation:x}},sR1s:function(vt,$e,q){"use strict";q.d($e,"b",function(){return z}),q.d($e,"a",function(){return D}),q.d($e,"c",function(){return I}),q.d($e,"d",function(){return G});var ve=q("U8pU"),V="RC_TABLE_KEY";function O(P){return P==null?[]:Array.isArray(P)?P:[P]}function z(P,L){if(!L&&typeof L!="number")return P;for(var S=O(L),_=P,b=0;b<S.length;b+=1){if(!_)return null;var u=S[b];_=_[u]}return _}function D(P){var L=[],S={};return P.forEach(function(_){for(var b=_||{},u=b.key,o=b.dataIndex,r=u||O(o).join("-")||V;S[r];)r="".concat(r,"_next");S[r]=!0,L.push(r)}),L}function I(){var P={};function L(u,o){o&&Object.keys(o).forEach(function(r){var A=o[r];A&&Object(ve.a)(A)==="object"?(u[r]=u[r]||{},L(u[r],A)):u[r]=A})}for(var S=arguments.length,_=new Array(S),b=0;b<S;b++)_[b]=arguments[b];return _.forEach(function(u){L(P,u)}),P}function G(P){return P!=null}},sboe:function(vt,$e,q){"use strict";q.d($e,"a",function(){return O});var ve=q("q1tI"),V=q.n(ve),O=ve.createContext(null)},t23M:function(vt,$e,q){"use strict";var ve=q("VTBJ"),V=q("1OyB"),O=q("vuIU"),z=q("Ji7U"),D=q("LK+K"),I=q("q1tI"),G=q.n(I),P=q("m+aA"),L=q("Zm9Q"),S=q("Kwbf"),_=q("c+Xe"),b=q("bdgK"),u="rc-observer-key",o=function(r){Object(z.a)(s,r);var A=Object(D.a)(s);function s(){var t;return Object(V.a)(this,s),t=A.apply(this,arguments),t.resizeObserver=null,t.childNode=null,t.currentElement=null,t.state={width:0,height:0,offsetHeight:0,offsetWidth:0},t.onResize=function(n){var i=t.props.onResize,B=n[0].target,w=B.getBoundingClientRect(),y=w.width,x=w.height,E=B.offsetWidth,c=B.offsetHeight,e=Math.floor(y),a=Math.floor(x);if(t.state.width!==e||t.state.height!==a||t.state.offsetWidth!==E||t.state.offsetHeight!==c){var l={width:e,height:a,offsetWidth:E,offsetHeight:c};t.setState(l),i&&Promise.resolve().then(function(){i(Object(ve.a)(Object(ve.a)({},l),{},{offsetWidth:E,offsetHeight:c}))})}},t.setChildNode=function(n){t.childNode=n},t}return Object(O.a)(s,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var n=this.props.disabled;if(n){this.destroyObserver();return}var i=Object(P.a)(this.childNode||this),B=i!==this.currentElement;B&&(this.destroyObserver(),this.currentElement=i),!this.resizeObserver&&i&&(this.resizeObserver=new b.default(this.onResize),this.resizeObserver.observe(i))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var n=this.props.children,i=Object(L.a)(n);if(i.length>1)Object(S.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(i.length===0)return Object(S.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var B=i[0];if(I.isValidElement(B)&&Object(_.c)(B)){var w=B.ref;i[0]=I.cloneElement(B,{ref:Object(_.a)(w,this.setChildNode)})}return i.length===1?i[0]:i.map(function(y,x){return!I.isValidElement(y)||"key"in y&&y.key!==null?y:I.cloneElement(y,{key:"".concat(u,"-").concat(x)})})}}]),s}(I.Component);o.displayName="ResizeObserver",$e.a=o},tJYV:function(vt,$e,q){vt.exports={flex_box_center:"flex_box_center___xqm06",flex_space_between:"flex_space_between___3Nv20",flex_box_vertical_center:"flex_box_vertical_center___2FGP4",flex_box_center_end:"flex_box_center_end___387aA",flex_box_column:"flex_box_column___3bH33",shixunWrp:"shixunWrp___33Rqe",s:"s___vCKh9",fillComment:"fillComment___1WoJe",commentContent:"commentContent___Mjxd1",commentText:"commentText___2J3jh",simpleWrap:"simpleWrap___1avIc",fillBg:"fillBg___3dLKw",simpleBg:"simpleBg___1k27e"}},uJ6K:function(vt,$e,q){vt.exports={wrap:"wrap___1AALq",img:"img___20GEO",table:"table___26NT5",totalScore:"totalScore___1t1Bx",people:"people___BMR7K",glassSeal:"glassSeal___2woZ-"}},ulZh:function(vt,$e,q){typeof window!="undefined"&&function(V,O){vt.exports=O()}(this,function(){return function(ve){var V={};function O(z){if(V[z])return V[z].exports;var D=V[z]={i:z,l:!1,exports:{}};return ve[z].call(D.exports,D,D.exports,O),D.l=!0,D.exports}return O.m=ve,O.c=V,O.d=function(z,D,I){O.o(z,D)||Object.defineProperty(z,D,{enumerable:!0,get:I})},O.r=function(z){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(z,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(z,"__esModule",{value:!0})},O.t=function(z,D){if(D&1&&(z=O(z)),D&8)return z;if(D&4&&typeof z=="object"&&z&&z.__esModule)return z;var I=Object.create(null);if(O.r(I),Object.defineProperty(I,"default",{enumerable:!0,value:z}),D&2&&typeof z!="string")for(var G in z)O.d(I,G,function(P){return z[P]}.bind(null,G));return I},O.n=function(z){var D=z&&z.__esModule?function(){return z.default}:function(){return z};return O.d(D,"a",D),D},O.o=function(z,D){return Object.prototype.hasOwnProperty.call(z,D)},O.p="/dist/",O(O.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(ve,V,O){"use strict";var z=Object.prototype.hasOwnProperty,D="~";function I(){}Object.create&&(I.prototype=Object.create(null),new I().__proto__||(D=!1));function G(_,b,u){this.fn=_,this.context=b,this.once=u||!1}function P(_,b,u,o,r){if(typeof u!="function")throw new TypeError("The listener must be a function");var A=new G(u,o||_,r),s=D?D+b:b;return _._events[s]?_._events[s].fn?_._events[s]=[_._events[s],A]:_._events[s].push(A):(_._events[s]=A,_._eventsCount++),_}function L(_,b){--_._eventsCount===0?_._events=new I:delete _._events[b]}function S(){this._events=new I,this._eventsCount=0}S.prototype.eventNames=function(){var b=[],u,o;if(this._eventsCount===0)return b;for(o in u=this._events)z.call(u,o)&&b.push(D?o.slice(1):o);return Object.getOwnPropertySymbols?b.concat(Object.getOwnPropertySymbols(u)):b},S.prototype.listeners=function(b){var u=D?D+b:b,o=this._events[u];if(!o)return[];if(o.fn)return[o.fn];for(var r=0,A=o.length,s=new Array(A);r<A;r++)s[r]=o[r].fn;return s},S.prototype.listenerCount=function(b){var u=D?D+b:b,o=this._events[u];return o?o.fn?1:o.length:0},S.prototype.emit=function(b,u,o,r,A,s){var t=D?D+b:b;if(!this._events[t])return!1;var n=this._events[t],i=arguments.length,B,w;if(n.fn){n.once&&this.removeListener(b,n.fn,void 0,!0);switch(i){case 1:return n.fn.call(n.context),!0;case 2:return n.fn.call(n.context,u),!0;case 3:return n.fn.call(n.context,u,o),!0;case 4:return n.fn.call(n.context,u,o,r),!0;case 5:return n.fn.call(n.context,u,o,r,A),!0;case 6:return n.fn.call(n.context,u,o,r,A,s),!0}for(w=1,B=new Array(i-1);w<i;w++)B[w-1]=arguments[w];n.fn.apply(n.context,B)}else{var y=n.length,x;for(w=0;w<y;w++){n[w].once&&this.removeListener(b,n[w].fn,void 0,!0);switch(i){case 1:n[w].fn.call(n[w].context);break;case 2:n[w].fn.call(n[w].context,u);break;case 3:n[w].fn.call(n[w].context,u,o);break;case 4:n[w].fn.call(n[w].context,u,o,r);break;default:if(!B)for(x=1,B=new Array(i-1);x<i;x++)B[x-1]=arguments[x];n[w].fn.apply(n[w].context,B)}}}return!0},S.prototype.on=function(b,u,o){return P(this,b,u,o,!1)},S.prototype.once=function(b,u,o){return P(this,b,u,o,!0)},S.prototype.removeListener=function(b,u,o,r){var A=D?D+b:b;if(!this._events[A])return this;if(!u)return L(this,A),this;var s=this._events[A];if(s.fn)s.fn===u&&(!r||s.once)&&(!o||s.context===o)&&L(this,A);else{for(var t=0,n=[],i=s.length;t<i;t++)(s[t].fn!==u||r&&!s[t].once||o&&s[t].context!==o)&&n.push(s[t]);n.length?this._events[A]=n.length===1?n[0]:n:L(this,A)}return this},S.prototype.removeAllListeners=function(b){var u;return b?(u=D?D+b:b,this._events[u]&&L(this,u)):(this._events=new I,this._eventsCount=0),this},S.prototype.off=S.prototype.removeListener,S.prototype.addListener=S.prototype.on,S.prefixed=D,S.EventEmitter=S,ve.exports=S},"./node_modules/url-toolkit/src/url-toolkit.js":function(ve,V,O){(function(z){var D=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,I=/^([^\/?#]*)([^]*)$/,G=/(?:\/|^)\.(?=\/)/g,P=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,L={buildAbsoluteURL:function(S,_,b){if(b=b||{},S=S.trim(),_=_.trim(),!_){if(!b.alwaysNormalize)return S;var u=L.parseURL(S);if(!u)throw new Error("Error trying to parse base URL.");return u.path=L.normalizePath(u.path),L.buildURLFromParts(u)}var o=L.parseURL(_);if(!o)throw new Error("Error trying to parse relative URL.");if(o.scheme)return b.alwaysNormalize?(o.path=L.normalizePath(o.path),L.buildURLFromParts(o)):_;var r=L.parseURL(S);if(!r)throw new Error("Error trying to parse base URL.");if(!r.netLoc&&r.path&&r.path[0]!=="/"){var A=I.exec(r.path);r.netLoc=A[1],r.path=A[2]}r.netLoc&&!r.path&&(r.path="/");var s={scheme:r.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc&&(s.netLoc=r.netLoc,o.path[0]!=="/"))if(!o.path)s.path=r.path,o.params||(s.params=r.params,o.query||(s.query=r.query));else{var t=r.path,n=t.substring(0,t.lastIndexOf("/")+1)+o.path;s.path=L.normalizePath(n)}return s.path===null&&(s.path=b.alwaysNormalize?L.normalizePath(o.path):o.path),L.buildURLFromParts(s)},parseURL:function(S){var _=D.exec(S);return _?{scheme:_[1]||"",netLoc:_[2]||"",path:_[3]||"",params:_[4]||"",query:_[5]||"",fragment:_[6]||""}:null},normalizePath:function(S){for(S=S.split("").reverse().join("").replace(G,"");S.length!==(S=S.replace(P,"")).length;);return S.split("").reverse().join("")},buildURLFromParts:function(S){return S.scheme+S.netLoc+S.path+S.params+S.query+S.fragment}};ve.exports=L})(this)},"./node_modules/webworkify-webpack/index.js":function(ve,V,O){function z(b){var u={};function o(A){if(u[A])return u[A].exports;var s=u[A]={i:A,l:!1,exports:{}};return b[A].call(s.exports,s,s.exports,o),s.l=!0,s.exports}o.m=b,o.c=u,o.i=function(A){return A},o.d=function(A,s,t){o.o(A,s)||Object.defineProperty(A,s,{configurable:!1,enumerable:!0,get:t})},o.r=function(A){Object.defineProperty(A,"__esModule",{value:!0})},o.n=function(A){var s=A&&A.__esModule?function(){return A.default}:function(){return A};return o.d(s,"a",s),s},o.o=function(A,s){return Object.prototype.hasOwnProperty.call(A,s)},o.p="/",o.oe=function(A){throw console.error(A),A};var r=o(o.s=ENTRY_MODULE);return r.default||r}var D="[\\.|\\-|\\+|\\w|/|@]+",I="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+D+").*?\\)";function G(b){return(b+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function P(b){return!isNaN(1*b)}function L(b,u,o){var r={};r[o]=[];var A=u.toString(),s=A.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!s)return r;for(var t=s[1],n=new RegExp("(\\\\n|\\W)"+G(t)+I,"g"),i;i=n.exec(A);){if(i[3]==="dll-reference")continue;r[o].push(i[3])}for(n=new RegExp("\\("+G(t)+'\\("(dll-reference\\s('+D+'))"\\)\\)'+I,"g");i=n.exec(A);)b[i[2]]||(r[o].push(i[1]),b[i[2]]=O(i[1]).m),r[i[2]]=r[i[2]]||[],r[i[2]].push(i[4]);for(var B=Object.keys(r),w=0;w<B.length;w++)for(var y=0;y<r[B[w]].length;y++)P(r[B[w]][y])&&(r[B[w]][y]=1*r[B[w]][y]);return r}function S(b){var u=Object.keys(b);return u.reduce(function(o,r){return o||b[r].length>0},!1)}function _(b,u){for(var o={main:[u]},r={main:[]},A={main:{}};S(o);)for(var s=Object.keys(o),t=0;t<s.length;t++){var n=s[t],i=o[n],B=i.pop();if(A[n]=A[n]||{},A[n][B]||!b[n][B])continue;A[n][B]=!0,r[n]=r[n]||[],r[n].push(B);for(var w=L(b,b[n][B],n),y=Object.keys(w),x=0;x<y.length;x++)o[y[x]]=o[y[x]]||[],o[y[x]]=o[y[x]].concat(w[y[x]])}return r}ve.exports=function(b,u){u=u||{};var o={main:O.m},r=u.all?{main:Object.keys(o.main)}:_(o,b),A="";Object.keys(r).filter(function(B){return B!=="main"}).forEach(function(B){for(var w=0;r[B][w];)w++;r[B].push(w),o[B][w]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",A=A+"var "+B+" = ("+z.toString().replace("ENTRY_MODULE",JSON.stringify(w))+")({"+r[B].map(function(y){return""+JSON.stringify(y)+": "+o[B][y].toString()}).join(",")+`});
`}),A=A+"new (("+z.toString().replace("ENTRY_MODULE",JSON.stringify(b))+")({"+r.main.map(function(B){return""+JSON.stringify(B)+": "+o.main[B].toString()}).join(",")+"}))(self);";var s=new window.Blob([A],{type:"text/javascript"});if(u.bare)return s;var t=window.URL||window.webkitURL||window.mozURL||window.msURL,n=t.createObjectURL(s),i=new window.Worker(n);return i.objectURL=n,i}},"./src/config.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"hlsDefaultConfig",function(){return x}),O.d(V,"mergeConfig",function(){return c}),O.d(V,"enableStreamingMode",function(){return e});var z=O("./src/controller/abr-controller.ts"),D=O("./src/controller/audio-stream-controller.ts"),I=O("./src/controller/audio-track-controller.ts"),G=O("./src/controller/subtitle-stream-controller.ts"),P=O("./src/controller/subtitle-track-controller.ts"),L=O("./src/controller/buffer-controller.ts"),S=O("./src/controller/timeline-controller.ts"),_=O("./src/controller/cap-level-controller.ts"),b=O("./src/controller/fps-controller.ts"),u=O("./src/controller/eme-controller.ts"),o=O("./src/controller/cmcd-controller.ts"),r=O("./src/utils/xhr-loader.ts"),A=O("./src/utils/fetch-loader.ts"),s=O("./src/utils/cues.ts"),t=O("./src/utils/mediakeys-helper.ts"),n=O("./src/utils/logger.ts");function i(){return i=Object.assign||function(a){for(var l=1;l<arguments.length;l++){var g=arguments[l];for(var p in g)Object.prototype.hasOwnProperty.call(g,p)&&(a[p]=g[p])}return a},i.apply(this,arguments)}function B(a,l){var g=Object.keys(a);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(a);l&&(p=p.filter(function(f){return Object.getOwnPropertyDescriptor(a,f).enumerable})),g.push.apply(g,p)}return g}function w(a){for(var l=1;l<arguments.length;l++){var g=arguments[l]!=null?arguments[l]:{};l%2?B(Object(g),!0).forEach(function(p){y(a,p,g[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(g)):B(Object(g)).forEach(function(p){Object.defineProperty(a,p,Object.getOwnPropertyDescriptor(g,p))})}return a}function y(a,l,g){return l in a?Object.defineProperty(a,l,{value:g,enumerable:!0,configurable:!0,writable:!0}):a[l]=g,a}var x=w(w({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:Infinity,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:r.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:z.default,bufferController:L.default,capLevelController:_.default,fpsController:b.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:t.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},E()),{},{subtitleStreamController:G.SubtitleStreamController,subtitleTrackController:P.default,timelineController:S.TimelineController,audioStreamController:D.default,audioTrackController:I.default,emeController:u.default,cmcdController:o.default});function E(){return{cueHandler:s.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function c(a,l){if((l.liveSyncDurationCount||l.liveMaxLatencyDurationCount)&&(l.liveSyncDuration||l.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(l.liveMaxLatencyDurationCount!==void 0&&(l.liveSyncDurationCount===void 0||l.liveMaxLatencyDurationCount<=l.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(l.liveMaxLatencyDuration!==void 0&&(l.liveSyncDuration===void 0||l.liveMaxLatencyDuration<=l.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return i({},a,l)}function e(a){var l=a.loader;if(l!==A.default&&l!==r.default)n.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),a.progressive=!1;else{var g=Object(A.fetchSupported)();g&&(a.loader=A.default,a.progressive=!0,a.enableSoftwareAES=!0,n.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(ve,V,O){"use strict";O.r(V);var z=O("./src/polyfills/number.ts"),D=O("./src/utils/ewma-bandwidth-estimator.ts"),I=O("./src/events.ts"),G=O("./src/utils/buffer-helper.ts"),P=O("./src/errors.ts"),L=O("./src/types/loader.ts"),S=O("./src/utils/logger.ts");function _(o,r){for(var A=0;A<r.length;A++){var s=r[A];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(o,s.key,s)}}function b(o,r,A){return r&&_(o.prototype,r),A&&_(o,A),o}var u=function(){function o(A){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=A;var s=A.config;this.bwEstimator=new D.default(s.abrEwmaSlowVoD,s.abrEwmaFastVoD,s.abrEwmaDefaultEstimate),this.registerListeners()}var r=o.prototype;return r.registerListeners=function(){var s=this.hls;s.on(I.Events.FRAG_LOADING,this.onFragLoading,this),s.on(I.Events.FRAG_LOADED,this.onFragLoaded,this),s.on(I.Events.FRAG_BUFFERED,this.onFragBuffered,this),s.on(I.Events.LEVEL_LOADED,this.onLevelLoaded,this),s.on(I.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){var s=this.hls;s.off(I.Events.FRAG_LOADING,this.onFragLoading,this),s.off(I.Events.FRAG_LOADED,this.onFragLoaded,this),s.off(I.Events.FRAG_BUFFERED,this.onFragBuffered,this),s.off(I.Events.LEVEL_LOADED,this.onLevelLoaded,this),s.off(I.Events.ERROR,this.onError,this)},r.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},r.onFragLoading=function(s,t){var n=t.frag;if(n.type===L.PlaylistLevelType.MAIN&&!this.timer){var i;this.fragCurrent=n,this.partCurrent=(i=t.part)!=null?i:null,this.timer=self.setInterval(this.onCheck,100)}},r.onLevelLoaded=function(s,t){var n=this.hls.config;t.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD)},r._abandonRulesCheck=function(){var s=this.fragCurrent,t=this.partCurrent,n=this.hls,i=n.autoLevelEnabled,B=n.config,w=n.media;if(!s||!w)return;var y=t?t.stats:s.stats,x=t?t.duration:s.duration;if(y.aborted){S.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!i||w.paused||!w.playbackRate||!w.readyState)return;var E=performance.now()-y.loading.start,c=Math.abs(w.playbackRate);if(E<=500*x/c)return;var e=n.levels,a=n.minAutoLevel,l=e[s.level],g=y.total||Math.max(y.loaded,Math.round(x*l.maxBitrate/8)),p=Math.max(1,y.bwEstimate?y.bwEstimate/8:y.loaded*1e3/E),f=(g-y.loaded)/p,R=w.currentTime,U=(G.BufferHelper.bufferInfo(w,R,B.maxBufferHole).end-R)/c;if(U>=2*x/c||f<=U)return;var Q=Number.POSITIVE_INFINITY,j;for(j=s.level-1;j>a;j--){var J=e[j].maxBitrate;if(Q=x*J/(8*.8*p),Q<U)break}if(Q>=f)return;var k=this.bwEstimator.getEstimate();S.logger.warn("Fragment "+s.sn+(t?" part "+t.index:"")+" of level "+s.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+j+`
Current BW estimate: `+(Object(z.isFiniteNumber)(k)?(k/1024).toFixed(3):"Unknown")+` Kb/s
Estimated load time for current fragment: `+f.toFixed(3)+` s
Estimated load time for the next fragment: `+Q.toFixed(3)+` s
Time to underbuffer: `+U.toFixed(3)+" s"),n.nextLoadLevel=j,this.bwEstimator.sample(E,y.loaded),this.clearTimer(),s.loader&&(this.fragCurrent=this.partCurrent=null,s.loader.abort()),n.trigger(I.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:s,part:t,stats:y})},r.onFragLoaded=function(s,t){var n=t.frag,i=t.part;if(n.type===L.PlaylistLevelType.MAIN&&Object(z.isFiniteNumber)(n.sn)){var B=i?i.stats:n.stats,w=i?i.duration:n.duration;if(this.clearTimer(),this.lastLoadedFragLevel=n.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var y=this.hls.levels[n.level],x=(y.loaded?y.loaded.bytes:0)+B.loaded,E=(y.loaded?y.loaded.duration:0)+w;y.loaded={bytes:x,duration:E},y.realBitrate=Math.round(8*x/E)}if(n.bitrateTest){var c={stats:B,frag:n,part:i,id:n.type};this.onFragBuffered(I.Events.FRAG_BUFFERED,c),n.bitrateTest=!1}}},r.onFragBuffered=function(s,t){var n=t.frag,i=t.part,B=i?i.stats:n.stats;if(B.aborted)return;if(n.type!==L.PlaylistLevelType.MAIN||n.sn==="initSegment")return;var w=B.parsing.end-B.loading.start;this.bwEstimator.sample(w,B.loaded),B.bwEstimate=this.bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=w/1e3:this.bitrateTestDelay=0},r.onError=function(s,t){switch(t.details){case P.ErrorDetails.FRAG_LOAD_ERROR:case P.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},r.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},r.getNextABRAutoLevel=function(){var s=this.fragCurrent,t=this.partCurrent,n=this.hls,i=n.maxAutoLevel,B=n.config,w=n.minAutoLevel,y=n.media,x=t?t.duration:s?s.duration:0,E=y?y.currentTime:0,c=y&&y.playbackRate!==0?Math.abs(y.playbackRate):1,e=this.bwEstimator?this.bwEstimator.getEstimate():B.abrEwmaDefaultEstimate,a=(G.BufferHelper.bufferInfo(y,E,B.maxBufferHole).end-E)/c,l=this.findBestLevel(e,w,i,a,B.abrBandWidthFactor,B.abrBandWidthUpFactor);if(l>=0)return l;S.logger.trace((a?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var g=x?Math.min(x,B.maxStarvationDelay):B.maxStarvationDelay,p=B.abrBandWidthFactor,f=B.abrBandWidthUpFactor;if(!a){var R=this.bitrateTestDelay;if(R){var U=x?Math.min(x,B.maxLoadingDelay):B.maxLoadingDelay;g=U-R,S.logger.trace("bitrate test took "+Math.round(1e3*R)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*g)+" ms"),p=f=1}}return l=this.findBestLevel(e,w,i,a+g,p,f),Math.max(l,0)},r.findBestLevel=function(s,t,n,i,B,w){for(var y,x=this.fragCurrent,E=this.partCurrent,c=this.lastLoadedFragLevel,e=this.hls.levels,a=e[c],l=!!(a!=null&&(y=a.details)!==null&&y!==void 0&&y.live),g=a==null?void 0:a.codecSet,p=E?E.duration:x?x.duration:0,f=n;f>=t;f--){var R=e[f];if(!R||g&&R.codecSet!==g)continue;var U=R.details,Q=(E?U==null?void 0:U.partTarget:U==null?void 0:U.averagetargetduration)||p,j=void 0;f<=c?j=B*s:j=w*s;var J=e[f].maxBitrate,k=J*Q/j;if(S.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+f+"/"+Math.round(j)+"/"+J+"/"+Q+"/"+i+"/"+k),j>J&&(!k||l&&!this.bitrateTestDelay||k<i))return f}return-1},b(o,[{key:"nextAutoLevel",get:function(){var s=this._nextAutoLevel,t=this.bwEstimator;if(s!==-1&&(!t||!t.canEstimate()))return s;var n=this.getNextABRAutoLevel();return s!==-1&&(n=Math.min(s,n)),n},set:function(s){this._nextAutoLevel=s}}]),o}();V.default=u},"./src/controller/audio-stream-controller.ts":function(ve,V,O){"use strict";O.r(V);var z=O("./src/polyfills/number.ts"),D=O("./src/controller/base-stream-controller.ts"),I=O("./src/events.ts"),G=O("./src/utils/buffer-helper.ts"),P=O("./src/controller/fragment-tracker.ts"),L=O("./src/types/level.ts"),S=O("./src/types/loader.ts"),_=O("./src/loader/fragment.ts"),b=O("./src/demux/chunk-cache.ts"),u=O("./src/demux/transmuxer-interface.ts"),o=O("./src/types/transmuxer.ts"),r=O("./src/controller/fragment-finders.ts"),A=O("./src/utils/discontinuities.ts"),s=O("./src/errors.ts"),t=O("./src/utils/logger.ts");function n(){return n=Object.assign||function(x){for(var E=1;E<arguments.length;E++){var c=arguments[E];for(var e in c)Object.prototype.hasOwnProperty.call(c,e)&&(x[e]=c[e])}return x},n.apply(this,arguments)}function i(x,E){x.prototype=Object.create(E.prototype),x.prototype.constructor=x,B(x,E)}function B(x,E){return B=Object.setPrototypeOf||function(e,a){return e.__proto__=a,e},B(x,E)}var w=100,y=function(x){i(E,x);function E(e,a){var l;return l=x.call(this,e,a,"[audio-stream-controller]")||this,l.videoBuffer=null,l.videoTrackCC=-1,l.waitingVideoCC=-1,l.audioSwitch=!1,l.trackId=-1,l.waitingData=null,l.mainDetails=null,l.bufferFlushed=!1,l._registerListeners(),l}var c=E.prototype;return c.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},c._registerListeners=function(){var a=this.hls;a.on(I.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.on(I.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(I.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(I.Events.LEVEL_LOADED,this.onLevelLoaded,this),a.on(I.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),a.on(I.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),a.on(I.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),a.on(I.Events.ERROR,this.onError,this),a.on(I.Events.BUFFER_RESET,this.onBufferReset,this),a.on(I.Events.BUFFER_CREATED,this.onBufferCreated,this),a.on(I.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),a.on(I.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),a.on(I.Events.FRAG_BUFFERED,this.onFragBuffered,this)},c._unregisterListeners=function(){var a=this.hls;a.off(I.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.off(I.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(I.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(I.Events.LEVEL_LOADED,this.onLevelLoaded,this),a.off(I.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),a.off(I.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),a.off(I.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),a.off(I.Events.ERROR,this.onError,this),a.off(I.Events.BUFFER_RESET,this.onBufferReset,this),a.off(I.Events.BUFFER_CREATED,this.onBufferCreated,this),a.off(I.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),a.off(I.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),a.off(I.Events.FRAG_BUFFERED,this.onFragBuffered,this)},c.onInitPtsFound=function(a,l){var g=l.frag,p=l.id,f=l.initPTS;if(p==="main"){var R=g.cc;this.initPTS[g.cc]=f,this.log("InitPTS for cc: "+R+" found from main: "+f),this.videoTrackCC=R,this.state===D.State.WAITING_INIT_PTS&&this.tick()}},c.startLoad=function(a){if(!this.levels){this.startPosition=a,this.state=D.State.STOPPED;return}var l=this.lastCurrentTime;this.stopLoad(),this.setInterval(w),this.fragLoadError=0,l>0&&a===-1?(this.log("Override startPosition with lastCurrentTime @"+l.toFixed(3)),this.state=D.State.IDLE):(this.loadedmetadata=!1,this.state=D.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=a,this.tick()},c.doTick=function(){switch(this.state){case D.State.IDLE:this.doTickIdle();break;case D.State.WAITING_TRACK:{var a,l=this.levels,g=this.trackId,p=l==null||((a=l[g])===null||a===void 0)?void 0:a.details;if(p){if(this.waitForCdnTuneIn(p))break;this.state=D.State.WAITING_INIT_PTS}break}case D.State.FRAG_LOADING_WAITING_RETRY:{var f,R=performance.now(),U=this.retryDate;(!U||R>=U||(f=this.media)!==null&&f!==void 0&&f.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=D.State.IDLE);break}case D.State.WAITING_INIT_PTS:{var Q=this.waitingData;if(Q){var j=Q.frag,J=Q.part,k=Q.cache,Y=Q.complete;if(this.initPTS[j.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=D.State.FRAG_LOADING;var ne=k.flush(),me={frag:j,part:J,payload:ne,networkDetails:null};this._handleFragmentLoadProgress(me),Y&&x.prototype._handleFragmentLoadComplete.call(this,me)}else if(this.videoTrackCC!==this.waitingVideoCC)t.logger.log("Waiting fragment cc ("+j.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var _e=this.getLoadPosition(),Oe=G.BufferHelper.bufferInfo(this.mediaBuffer,_e,this.config.maxBufferHole),xe=Object(r.fragmentWithinToleranceTest)(Oe.end,this.config.maxFragLookUpTolerance,j);xe<0&&(t.logger.log("Waiting fragment cc ("+j.cc+") @ "+j.start+" cancelled because another fragment at "+Oe.end+" is needed"),this.clearWaitingFragment())}}else this.state=D.State.IDLE}}this.onTickEnd()},c.clearWaitingFragment=function(){var a=this.waitingData;a&&(this.fragmentTracker.removeFragment(a.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=D.State.IDLE)},c.onTickEnd=function(){var a=this.media;if(!a||!a.readyState)return;var l=this.mediaBuffer?this.mediaBuffer:a,g=l.buffered;!this.loadedmetadata&&g.length&&(this.loadedmetadata=!0),this.lastCurrentTime=a.currentTime},c.doTickIdle=function(){var a,l,g=this.hls,p=this.levels,f=this.media,R=this.trackId,U=g.config;if(!p||!p[R])return;if(!f&&(this.startFragRequested||!U.startFragPrefetch))return;var Q=p[R],j=Q.details;if(!j||j.live&&this.levelLastLoaded!==R||this.waitForCdnTuneIn(j)){this.state=D.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,_.ElementaryStreamTypes.AUDIO,S.PlaylistLevelType.AUDIO));var J=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,S.PlaylistLevelType.AUDIO);if(J===null)return;var k=J.len,Y=this.getMaxBufferLength(),ne=this.audioSwitch;if(k>=Y&&!ne)return;if(!ne&&this._streamEnded(J,j)){g.trigger(I.Events.BUFFER_EOS,{type:"audio"}),this.state=D.State.ENDED;return}var me=j.fragments,_e=me[0].start,Oe=J.end;if(ne){var xe=this.getLoadPosition();Oe=xe,j.PTSKnown&&xe<_e&&((J.end>_e||J.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),f.currentTime=_e+.05))}var Se=this.getNextFragment(Oe,j);if(!Se){this.bufferFlushed=!0;return}((a=Se.decryptdata)===null||a===void 0?void 0:a.keyFormat)==="identity"&&!((l=Se.decryptdata)!==null&&l!==void 0&&l.key)?this.loadKey(Se,j):this.loadFragment(Se,j,Oe)},c.getMaxBufferLength=function(){var a=x.prototype.getMaxBufferLength.call(this),l=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,S.PlaylistLevelType.MAIN);return l===null?a:Math.max(a,l.len)},c.onMediaDetaching=function(){this.videoBuffer=null,x.prototype.onMediaDetaching.call(this)},c.onAudioTracksUpdated=function(a,l){var g=l.audioTracks;this.resetTransmuxer(),this.levels=g.map(function(p){return new L.Level(p)})},c.onAudioTrackSwitching=function(a,l){var g=!!l.url;this.trackId=l.id;var p=this.fragCurrent;p!=null&&p.loader&&p.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),g?this.setInterval(w):this.resetTransmuxer(),g?(this.audioSwitch=!0,this.state=D.State.IDLE):this.state=D.State.STOPPED,this.tick()},c.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},c.onLevelLoaded=function(a,l){this.mainDetails=l.details},c.onAudioTrackLoaded=function(a,l){var g,p=this.levels,f=l.details,R=l.id;if(!p){this.warn("Audio tracks were reset while loading level "+R);return}this.log("Track "+R+" loaded ["+f.startSN+","+f.endSN+"],duration:"+f.totalduration);var U=p[R],Q=0;if(f.live||(g=U.details)!==null&&g!==void 0&&g.live){var j=this.mainDetails;if(f.fragments[0]||(f.deltaUpdateFailed=!0),f.deltaUpdateFailed||!j)return;!U.details&&f.hasProgramDateTime&&j.hasProgramDateTime?(Object(A.alignMediaPlaylistByPDT)(f,j),Q=f.fragments[0].start):Q=this.alignPlaylists(f,U.details)}U.details=f,this.levelLastLoaded=R,!this.startFragRequested&&(this.mainDetails||!f.live)&&this.setStartPosition(U.details,Q),this.state===D.State.WAITING_TRACK&&!this.waitForCdnTuneIn(f)&&(this.state=D.State.IDLE),this.tick()},c._handleFragmentLoadProgress=function(a){var l,g=a.frag,p=a.part,f=a.payload,R=this.config,U=this.trackId,Q=this.levels;if(!Q){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+g.sn+" of level "+g.level+" will not be buffered");return}var j=Q[U];console.assert(j,"Audio track is defined on fragment load progress");var J=j.details;console.assert(J,"Audio track details are defined on fragment load progress");var k=R.defaultAudioCodec||j.audioCodec||"mp4a.40.2",Y=this.transmuxer;Y||(Y=this.transmuxer=new u.default(this.hls,S.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var ne=this.initPTS[g.cc],me=(l=g.initSegment)===null||l===void 0?void 0:l.data;if(ne!==void 0){var _e=!1,Oe=p?p.index:-1,xe=Oe!==-1,Se=new o.ChunkMetadata(g.level,g.sn,g.stats.chunkCount,f.byteLength,Oe,xe);Y.push(f,me,k,"",g,p,J.totalduration,_e,Se,ne)}else{t.logger.log("Unknown video PTS for cc "+g.cc+", waiting for video PTS before demuxing audio frag "+g.sn+" of ["+J.startSN+" ,"+J.endSN+"],track "+U);var Fe=this.waitingData=this.waitingData||{frag:g,part:p,cache:new b.default,complete:!1},Pe=Fe.cache;Pe.push(new Uint8Array(f)),this.waitingVideoCC=this.videoTrackCC,this.state=D.State.WAITING_INIT_PTS}},c._handleFragmentLoadComplete=function(a){if(this.waitingData){this.waitingData.complete=!0;return}x.prototype._handleFragmentLoadComplete.call(this,a)},c.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},c.onBufferCreated=function(a,l){var g=l.tracks.audio;g&&(this.mediaBuffer=g.buffer),l.tracks.video&&(this.videoBuffer=l.tracks.video.buffer)},c.onFragBuffered=function(a,l){var g=l.frag,p=l.part;if(g.type!==S.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(g)){this.warn("Fragment "+g.sn+(p?" p: "+p.index:"")+" of level "+g.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}g.sn!=="initSegment"&&(this.fragPrevious=g,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(I.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(g,p)},c.onError=function(a,l){switch(l.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(S.PlaylistLevelType.AUDIO,l);break;case s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==D.State.ERROR&&this.state!==D.State.STOPPED&&(this.state=l.fatal?D.State.ERROR:D.State.IDLE,this.warn(l.details+" while loading frag, switching to "+this.state+" state"));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if(l.parent==="audio"&&(this.state===D.State.PARSING||this.state===D.State.PARSED)){var g=!0,p=this.getFwdBufferInfo(this.mediaBuffer,S.PlaylistLevelType.AUDIO);p&&p.len>.5&&(g=!this.reduceMaxBufferLength(p.len)),g&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,x.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},c.onBufferFlushed=function(a,l){var g=l.type;g===_.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},c._handleTransmuxComplete=function(a){var l,g="audio",p=this.hls,f=a.remuxResult,R=a.chunkMeta,U=this.getCurrentContext(R);if(!U){this.warn("The loading context changed while buffering fragment "+R.sn+" of level "+R.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(R.level);return}var Q=U.frag,j=U.part,J=f.audio,k=f.text,Y=f.id3,ne=f.initSegment;if(this.fragContextChanged(Q))return;if(this.state=D.State.PARSING,this.audioSwitch&&J&&this.completeAudioSwitch(),ne!=null&&ne.tracks&&(this._bufferInitSegment(ne.tracks,Q,R),p.trigger(I.Events.FRAG_PARSING_INIT_SEGMENT,{frag:Q,id:g,tracks:ne.tracks})),J){var me=J.startPTS,_e=J.endPTS,Oe=J.startDTS,xe=J.endDTS;j&&(j.elementaryStreams[_.ElementaryStreamTypes.AUDIO]={startPTS:me,endPTS:_e,startDTS:Oe,endDTS:xe}),Q.setElementaryStreamInfo(_.ElementaryStreamTypes.AUDIO,me,_e,Oe,xe),this.bufferFragmentData(J,Q,j,R)}if(Y!=null&&(l=Y.samples)!==null&&l!==void 0&&l.length){var Se=n({frag:Q,id:g},Y);p.trigger(I.Events.FRAG_PARSING_METADATA,Se)}if(k){var Fe=n({frag:Q,id:g},k);p.trigger(I.Events.FRAG_PARSING_USERDATA,Fe)}},c._bufferInitSegment=function(a,l,g){if(this.state!==D.State.PARSING)return;a.video&&delete a.video;var p=a.audio;if(!p)return;p.levelCodec=p.codec,p.id="audio",this.log("Init audio buffer, container:"+p.container+", codecs[parsed]=["+p.codec+"]"),this.hls.trigger(I.Events.BUFFER_CODECS,a);var f=p.initSegment;if(f!=null&&f.byteLength){var R={type:"audio",frag:l,part:null,chunkMeta:g,parent:l.type,data:f};this.hls.trigger(I.Events.BUFFER_APPENDING,R)}this.tick()},c.loadFragment=function(a,l,g){var p=this.fragmentTracker.getState(a);this.fragCurrent=a,(this.audioSwitch||p===P.FragmentState.NOT_LOADED||p===P.FragmentState.PARTIAL)&&(a.sn==="initSegment"?this._loadInitSegment(a):l.live&&!Object(z.isFiniteNumber)(this.initPTS[a.cc])?(this.log("Waiting for video PTS in continuity counter "+a.cc+" of live stream before loading audio fragment "+a.sn+" of level "+this.trackId),this.state=D.State.WAITING_INIT_PTS):(this.startFragRequested=!0,x.prototype.loadFragment.call(this,a,l,g)))},c.completeAudioSwitch=function(){var a=this.hls,l=this.media,g=this.trackId;l&&(this.log("Switching audio track : flushing all audio"),x.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,a.trigger(I.Events.AUDIO_TRACK_SWITCHED,{id:g})},E}(D.default);V.default=y},"./src/controller/audio-track-controller.ts":function(ve,V,O){"use strict";O.r(V);var z=O("./src/events.ts"),D=O("./src/errors.ts"),I=O("./src/controller/base-playlist-controller.ts"),G=O("./src/types/loader.ts");function P(u,o){for(var r=0;r<o.length;r++){var A=o[r];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(u,A.key,A)}}function L(u,o,r){return o&&P(u.prototype,o),r&&P(u,r),u}function S(u,o){u.prototype=Object.create(o.prototype),u.prototype.constructor=u,_(u,o)}function _(u,o){return _=Object.setPrototypeOf||function(A,s){return A.__proto__=s,A},_(u,o)}var b=function(u){S(o,u);function o(A){var s;return s=u.call(this,A,"[audio-track-controller]")||this,s.tracks=[],s.groupId=null,s.tracksInGroup=[],s.trackId=-1,s.trackName="",s.selectDefaultTrack=!0,s.registerListeners(),s}var r=o.prototype;return r.registerListeners=function(){var s=this.hls;s.on(z.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(z.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.on(z.Events.LEVEL_LOADING,this.onLevelLoading,this),s.on(z.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),s.on(z.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),s.on(z.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){var s=this.hls;s.off(z.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.off(z.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.off(z.Events.LEVEL_LOADING,this.onLevelLoading,this),s.off(z.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),s.off(z.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),s.off(z.Events.ERROR,this.onError,this)},r.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,u.prototype.destroy.call(this)},r.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},r.onManifestParsed=function(s,t){this.tracks=t.audioTracks||[]},r.onAudioTrackLoaded=function(s,t){var n=t.id,i=t.details,B=this.tracksInGroup[n];if(!B){this.warn("Invalid audio track id "+n);return}var w=B.details;B.details=t.details,this.log("audioTrack "+n+" loaded ["+i.startSN+"-"+i.endSN+"]"),n===this.trackId&&(this.retryCount=0,this.playlistLoaded(n,t,w))},r.onLevelLoading=function(s,t){this.switchLevel(t.level)},r.onLevelSwitching=function(s,t){this.switchLevel(t.level)},r.switchLevel=function(s){var t=this.hls.levels[s];if(!(t!=null&&t.audioGroupIds))return;var n=t.audioGroupIds[t.urlId];if(this.groupId!==n){this.groupId=n;var i=this.tracks.filter(function(w){return!n||w.groupId===n});this.selectDefaultTrack&&!i.some(function(w){return w.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=i;var B={audioTracks:i};this.log("Updating audio tracks, "+i.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(z.Events.AUDIO_TRACKS_UPDATED,B),this.selectInitialTrack()}},r.onError=function(s,t){if(u.prototype.onError.call(this,s,t),t.fatal||!t.context)return;t.context.type===G.PlaylistContextType.AUDIO_TRACK&&t.context.id===this.trackId&&t.context.groupId===this.groupId&&this.retryLoadingOrFail(t)},r.setAudioTrack=function(s){var t=this.tracksInGroup;if(s<0||s>=t.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var n=t[this.trackId];this.log("Now switching to audio-track index "+s);var i=t[s],B=i.id,w=i.groupId,y=w===void 0?"":w,x=i.name,E=i.type,c=i.url;if(this.trackId=s,this.trackName=x,this.selectDefaultTrack=!1,this.hls.trigger(z.Events.AUDIO_TRACK_SWITCHING,{id:B,groupId:y,name:x,type:E,url:c}),i.details&&!i.details.live)return;var e=this.switchParams(i.url,n==null?void 0:n.details);this.loadPlaylist(e)},r.selectInitialTrack=function(){var s=this.tracksInGroup;console.assert(s.length,"Initial audio track should be selected when tracks are known");var t=this.trackName,n=this.findTrackId(t)||this.findTrackId();n!==-1?this.setAudioTrack(n):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(z.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},r.findTrackId=function(s){for(var t=this.tracksInGroup,n=0;n<t.length;n++){var i=t[n];if((!this.selectDefaultTrack||i.default)&&(!s||s===i.name))return i.id}return-1},r.loadPlaylist=function(s){var t=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(t)){var n=t.id,i=t.groupId,B=t.url;if(s)try{B=s.addDirectives(B)}catch(w){this.warn("Could not construct new URL with HLS Delivery Directives: "+w)}this.log("loading audio-track playlist for id: "+n),this.clearTimer(),this.hls.trigger(z.Events.AUDIO_TRACK_LOADING,{url:B,id:n,groupId:i,deliveryDirectives:s||null})}},L(o,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(s){this.selectDefaultTrack=!1,this.setAudioTrack(s)}}]),o}(I.default);V.default=b},"./src/controller/base-playlist-controller.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"default",function(){return L});var z=O("./src/polyfills/number.ts"),D=O("./src/types/level.ts"),I=O("./src/controller/level-helper.ts"),G=O("./src/utils/logger.ts"),P=O("./src/errors.ts"),L=function(){function S(b,u){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=G.logger.log.bind(G.logger,u+":"),this.warn=G.logger.warn.bind(G.logger,u+":"),this.hls=b}var _=S.prototype;return _.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},_.onError=function(u,o){o.fatal&&o.type===P.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},_.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},_.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},_.stopLoad=function(){this.canLoad=!1,this.clearTimer()},_.switchParams=function(u,o){var r=o==null?void 0:o.renditionReports;if(r)for(var A=0;A<r.length;A++){var s=r[A],t=""+s.URI;if(t===u.substr(-t.length)){var n=parseInt(s["LAST-MSN"]),i=parseInt(s["LAST-PART"]);if(o&&this.hls.config.lowLatencyMode){var B=Math.min(o.age-o.partTarget,o.targetduration);i!==void 0&&B>o.partTarget&&(i+=1)}if(Object(z.isFiniteNumber)(n))return new D.HlsUrlParameters(n,Object(z.isFiniteNumber)(i)?i:void 0,D.HlsSkip.No)}}},_.loadPlaylist=function(u){},_.shouldLoadTrack=function(u){return this.canLoad&&u&&!!u.url&&(!u.details||u.details.live)},_.playlistLoaded=function(u,o,r){var A=this,s=o.details,t=o.stats,n=t.loading.end?Math.max(0,self.performance.now()-t.loading.end):0;if(s.advancedDateTime=Date.now()-n,s.live||r!=null&&r.live){if(s.reloaded(r),r&&this.log("live playlist "+u+" "+(s.advanced?"REFRESHED "+s.lastPartSn+"-"+s.lastPartIndex:"MISSED")),r&&s.fragments.length>0&&Object(I.mergeDetails)(r,s),!this.canLoad||!s.live)return;var i,B=void 0,w=void 0;if(s.canBlockReload&&s.endSN&&s.advanced){var y=this.hls.config.lowLatencyMode,x=s.lastPartSn,E=s.endSN,c=s.lastPartIndex,e=c!==-1,a=x===E,l=y?0:c;e?(B=a?E+1:x,w=a?l:c+1):B=E+1;var g=s.age,p=g+s.ageHeader,f=Math.min(p-s.partTarget,s.targetduration*1.5);if(f>0){if(r&&f>r.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+r.tuneInGoal+" to: "+f+" with playlist age: "+s.age),f=0;else{var R=Math.floor(f/s.targetduration);if(B+=R,w!==void 0){var U=Math.round(f%s.targetduration/s.partTarget);w+=U}this.log("CDN Tune-in age: "+s.ageHeader+"s last advanced "+g.toFixed(2)+"s goal: "+f+" skip sn "+R+" to part "+w)}s.tuneInGoal=f}if(i=this.getDeliveryDirectives(s,o.deliveryDirectives,B,w),y||!a){this.loadPlaylist(i);return}}else i=this.getDeliveryDirectives(s,o.deliveryDirectives,B,w);var Q=Object(I.computeReloadInterval)(s,t);B!==void 0&&s.canBlockReload&&(Q-=s.partTarget||1),this.log("reload live playlist "+u+" in "+Math.round(Q)+" ms"),this.timer=self.setTimeout(function(){return A.loadPlaylist(i)},Q)}else this.clearTimer()},_.getDeliveryDirectives=function(u,o,r,A){var s=Object(D.getSkipValue)(u,r);return o!=null&&o.skip&&u.deltaUpdateFailed&&(r=o.msn,A=o.part,s=D.HlsSkip.No),new D.HlsUrlParameters(r,A,s)},_.retryLoadingOrFail=function(u){var o=this,r=this.hls.config,A=this.retryCount<r.levelLoadingMaxRetry;if(A){var s;if(this.retryCount++,u.details.indexOf("LoadTimeOut")>-1&&(s=u.context)!==null&&s!==void 0&&s.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+u.details+'"'),this.loadPlaylist();else{var t=Math.min(Math.pow(2,this.retryCount)*r.levelLoadingRetryDelay,r.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return o.loadPlaylist()},t),this.warn("retry playlist loading #"+this.retryCount+" in "+t+' ms after "'+u.details+'"')}}else this.warn('cannot recover from error "'+u.details+'"'),this.clearTimer(),u.fatal=!0;return A},S}()},"./src/controller/base-stream-controller.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"State",function(){return E}),O.d(V,"default",function(){return c});var z=O("./src/polyfills/number.ts"),D=O("./src/task-loop.ts"),I=O("./src/controller/fragment-tracker.ts"),G=O("./src/utils/buffer-helper.ts"),P=O("./src/utils/logger.ts"),L=O("./src/events.ts"),S=O("./src/errors.ts"),_=O("./src/types/transmuxer.ts"),b=O("./src/utils/mp4-tools.ts"),u=O("./src/utils/discontinuities.ts"),o=O("./src/controller/fragment-finders.ts"),r=O("./src/controller/level-helper.ts"),A=O("./src/loader/fragment-loader.ts"),s=O("./src/crypt/decrypter.ts"),t=O("./src/utils/time-ranges.ts"),n=O("./src/types/loader.ts");function i(e,a){for(var l=0;l<a.length;l++){var g=a[l];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(e,g.key,g)}}function B(e,a,l){return a&&i(e.prototype,a),l&&i(e,l),e}function w(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e,a){e.prototype=Object.create(a.prototype),e.prototype.constructor=e,x(e,a)}function x(e,a){return x=Object.setPrototypeOf||function(g,p){return g.__proto__=p,g},x(e,a)}var E={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",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},c=function(e){y(a,e);function a(g,p,f){var R;return R=e.call(this)||this,R.hls=void 0,R.fragPrevious=null,R.fragCurrent=null,R.fragmentTracker=void 0,R.transmuxer=null,R._state=E.STOPPED,R.media=void 0,R.mediaBuffer=void 0,R.config=void 0,R.bitrateTest=!1,R.lastCurrentTime=0,R.nextLoadPosition=0,R.startPosition=0,R.loadedmetadata=!1,R.fragLoadError=0,R.retryDate=0,R.levels=null,R.fragmentLoader=void 0,R.levelLastLoaded=null,R.startFragRequested=!1,R.decrypter=void 0,R.initPTS=[],R.onvseeking=null,R.onvended=null,R.logPrefix="",R.log=void 0,R.warn=void 0,R.logPrefix=f,R.log=P.logger.log.bind(P.logger,f+":"),R.warn=P.logger.warn.bind(P.logger,f+":"),R.hls=g,R.fragmentLoader=new A.default(g.config),R.fragmentTracker=p,R.config=g.config,R.decrypter=new s.default(g,g.config),g.on(L.Events.KEY_LOADED,R.onKeyLoaded,w(R)),R}var l=a.prototype;return l.doTick=function(){this.onTickEnd()},l.onTickEnd=function(){},l.startLoad=function(p){},l.stopLoad=function(){this.fragmentLoader.abort();var p=this.fragCurrent;p&&this.fragmentTracker.removeFragment(p),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=E.STOPPED},l._streamEnded=function(p,f){var R=this.fragCurrent,U=this.fragmentTracker;if(!f.live&&R&&R.sn===f.endSN&&!p.nextStart){var Q=U.getState(R);return Q===I.FragmentState.PARTIAL||Q===I.FragmentState.OK}return!1},l.onMediaAttached=function(p,f){var R=this.media=this.mediaBuffer=f.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),R.addEventListener("seeking",this.onvseeking),R.addEventListener("ended",this.onvended);var U=this.config;this.levels&&U.autoStartLoad&&this.state===E.STOPPED&&this.startLoad(U.startPosition)},l.onMediaDetaching=function(){var p=this.media;p!=null&&p.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),p&&(p.removeEventListener("seeking",this.onvseeking),p.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},l.onMediaSeeking=function(){var p=this.config,f=this.fragCurrent,R=this.media,U=this.mediaBuffer,Q=this.state,j=R?R.currentTime:0,J=G.BufferHelper.bufferInfo(U||R,j,p.maxBufferHole);if(this.log("media seeking to "+(Object(z.isFiniteNumber)(j)?j.toFixed(3):j)+", state: "+Q),Q===E.ENDED)this.resetLoadingState();else if(f&&!J.len){var k=p.maxFragLookUpTolerance,Y=f.start-k,ne=f.start+f.duration+k,me=j>ne;(j<Y||me)&&(me&&f.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),f.loader.abort()),this.resetLoadingState())}R&&(this.lastCurrentTime=j),!this.loadedmetadata&&!J.len&&(this.nextLoadPosition=this.startPosition=j),this.tickImmediate()},l.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},l.onKeyLoaded=function(p,f){if(this.state!==E.KEY_LOADING||f.frag!==this.fragCurrent||!this.levels)return;this.state=E.IDLE;var R=this.levels[f.frag.level].details;R&&this.loadFragment(f.frag,R,f.frag.start)},l.onHandlerDestroying=function(){this.stopLoad(),e.prototype.onHandlerDestroying.call(this)},l.onHandlerDestroyed=function(){this.state=E.STOPPED,this.hls.off(L.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,e.prototype.onHandlerDestroyed.call(this)},l.loadKey=function(p,f){this.log("Loading key for "+p.sn+" of ["+f.startSN+"-"+f.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+p.level),this.state=E.KEY_LOADING,this.fragCurrent=p,this.hls.trigger(L.Events.KEY_LOADING,{frag:p})},l.loadFragment=function(p,f,R){this._loadFragForPlayback(p,f,R)},l._loadFragForPlayback=function(p,f,R){var U=this,Q=function(J){if(U.fragContextChanged(p)){U.warn("Fragment "+p.sn+(J.part?" p: "+J.part.index:"")+" of level "+p.level+" was dropped during download."),U.fragmentTracker.removeFragment(p);return}p.stats.chunkCount++,U._handleFragmentLoadProgress(J)};this._doFragLoad(p,f,R,Q).then(function(j){if(!j)return;U.fragLoadError=0;var J=U.state;if(U.fragContextChanged(p)){(J===E.FRAG_LOADING||J===E.BACKTRACKING||!U.fragCurrent&&J===E.PARSING)&&(U.fragmentTracker.removeFragment(p),U.state=E.IDLE);return}if("payload"in j&&(U.log("Loaded fragment "+p.sn+" of level "+p.level),U.hls.trigger(L.Events.FRAG_LOADED,j),U.state===E.BACKTRACKING)){U.fragmentTracker.backtrack(p,j),U.resetFragmentLoading(p);return}U._handleFragmentLoadComplete(j)}).catch(function(j){U.warn(j),U.resetFragmentLoading(p)})},l.flushMainBuffer=function(p,f,R){if(R===void 0&&(R=null),!(p-f))return;var U={startOffset:p,endOffset:f,type:R};this.fragLoadError=0,this.hls.trigger(L.Events.BUFFER_FLUSHING,U)},l._loadInitSegment=function(p){var f=this;this._doFragLoad(p).then(function(R){if(!R||f.fragContextChanged(p)||!f.levels)throw new Error("init load aborted");return R}).then(function(R){var U=f.hls,Q=R.payload,j=p.decryptdata;if(Q&&Q.byteLength>0&&j&&j.key&&j.iv&&j.method==="AES-128"){var J=self.performance.now();return f.decrypter.webCryptoDecrypt(new Uint8Array(Q),j.key.buffer,j.iv.buffer).then(function(k){var Y=self.performance.now();return U.trigger(L.Events.FRAG_DECRYPTED,{frag:p,payload:k,stats:{tstart:J,tdecrypt:Y}}),R.payload=k,R})}return R}).then(function(R){var U=f.fragCurrent,Q=f.hls,j=f.levels;if(!j)throw new Error("init load aborted, missing levels");var J=j[p.level].details;console.assert(J,"Level details are defined when init segment is loaded");var k=p.stats;f.state=E.IDLE,f.fragLoadError=0,p.data=new Uint8Array(R.payload),k.parsing.start=k.buffering.start=self.performance.now(),k.parsing.end=k.buffering.end=self.performance.now(),R.frag===U&&Q.trigger(L.Events.FRAG_BUFFERED,{stats:k,frag:U,part:null,id:p.type}),f.tick()}).catch(function(R){f.warn(R),f.resetFragmentLoading(p)})},l.fragContextChanged=function(p){var f=this.fragCurrent;return!p||!f||p.level!==f.level||p.sn!==f.sn||p.urlId!==f.urlId},l.fragBufferedComplete=function(p,f){var R=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+p.type+" sn: "+p.sn+(f?" part: "+f.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+p.level+" "+t.default.toString(G.BufferHelper.getBuffered(R))),this.state=E.IDLE,this.tick()},l._handleFragmentLoadComplete=function(p){var f=this.transmuxer;if(!f)return;var R=p.frag,U=p.part,Q=p.partsLoaded,j=!Q||Q.length===0||Q.some(function(k){return!k}),J=new _.ChunkMetadata(R.level,R.sn,R.stats.chunkCount+1,0,U?U.index:-1,!j);f.flush(J)},l._handleFragmentLoadProgress=function(p){},l._doFragLoad=function(p,f,R,U){var Q=this;if(R===void 0&&(R=null),!this.levels)throw new Error("frag load aborted, missing levels");if(R=Math.max(p.start,R||0),this.config.lowLatencyMode&&f){var j=f.partList;if(j&&U){R>p.end&&f.fragmentHint&&(p=f.fragmentHint);var J=this.getNextPart(j,p,R);if(J>-1){var k=j[J];return this.log("Loading part sn: "+p.sn+" p: "+k.index+" cc: "+p.cc+" of playlist ["+f.startSN+"-"+f.endSN+"] parts [0-"+J+"-"+(j.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+p.level+", target: "+parseFloat(R.toFixed(3))),this.nextLoadPosition=k.start+k.duration,this.state=E.FRAG_LOADING,this.hls.trigger(L.Events.FRAG_LOADING,{frag:p,part:j[J],targetBufferTime:R}),this.doFragPartsLoad(p,j,J,U).catch(function(Y){return Q.handleFragLoadError(Y)})}else if(!p.url||this.loadedEndOfParts(j,R))return Promise.resolve(null)}}return this.log("Loading fragment "+p.sn+" cc: "+p.cc+" "+(f?"of ["+f.startSN+"-"+f.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+p.level+", target: "+parseFloat(R.toFixed(3))),Object(z.isFiniteNumber)(p.sn)&&!this.bitrateTest&&(this.nextLoadPosition=p.start+p.duration),this.state=E.FRAG_LOADING,this.hls.trigger(L.Events.FRAG_LOADING,{frag:p,targetBufferTime:R}),this.fragmentLoader.load(p,U).catch(function(Y){return Q.handleFragLoadError(Y)})},l.doFragPartsLoad=function(p,f,R,U){var Q=this;return new Promise(function(j,J){var k=[],Y=function ne(me){var _e=f[me];Q.fragmentLoader.loadPart(p,_e,U).then(function(Oe){k[_e.index]=Oe;var xe=Oe.part;Q.hls.trigger(L.Events.FRAG_LOADED,Oe);var Se=f[me+1];if(Se&&Se.fragment===p)ne(me+1);else return j({frag:p,part:xe,partsLoaded:k})}).catch(J)};Y(R)})},l.handleFragLoadError=function(p){var f=p.data;return f&&f.details===S.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(f.frag,f.part):this.hls.trigger(L.Events.ERROR,f),null},l._handleTransmuxerFlush=function(p){var f=this.getCurrentContext(p);if(!f||this.state!==E.PARSING){this.fragCurrent||(this.state=E.IDLE);return}var R=f.frag,U=f.part,Q=f.level,j=self.performance.now();R.stats.parsing.end=j,U&&(U.stats.parsing.end=j),this.updateLevelTiming(R,U,Q,p.partial)},l.getCurrentContext=function(p){var f=this.levels,R=p.level,U=p.sn,Q=p.part;if(!f||!f[R])return this.warn("Levels object was unset while buffering fragment "+U+" of level "+R+". The current chunk will not be buffered."),null;var j=f[R],J=Q>-1?Object(r.getPartWith)(j,U,Q):null,k=J?J.fragment:Object(r.getFragmentWithSN)(j,U,this.fragCurrent);return k?{frag:k,part:J,level:j}:null},l.bufferFragmentData=function(p,f,R,U){if(!p||this.state!==E.PARSING)return;var Q=p.data1,j=p.data2,J=Q;if(Q&&j&&(J=Object(b.appendUint8Array)(Q,j)),!J||!J.length)return;var k={type:p.type,frag:f,part:R,chunkMeta:U,parent:f.type,data:J};this.hls.trigger(L.Events.BUFFER_APPENDING,k),p.dropped&&p.independent&&!R&&this.flushBufferGap(f)},l.flushBufferGap=function(p){var f=this.media;if(!f)return;if(!G.BufferHelper.isBuffered(f,f.currentTime)){this.flushMainBuffer(0,p.start);return}var R=f.currentTime,U=G.BufferHelper.bufferInfo(f,R,0),Q=p.duration,j=Math.min(this.config.maxFragLookUpTolerance*2,Q*.25),J=Math.max(Math.min(p.start-j,U.end-j),R+j);p.start-J>j&&this.flushMainBuffer(J,p.start)},l.getFwdBufferInfo=function(p,f){var R=this.config,U=this.getLoadPosition();if(!Object(z.isFiniteNumber)(U))return null;var Q=G.BufferHelper.bufferInfo(p,U,R.maxBufferHole);if(Q.len===0&&Q.nextStart!==void 0){var j=this.fragmentTracker.getBufferedFrag(U,f);if(j&&Q.nextStart<j.end)return G.BufferHelper.bufferInfo(p,U,Math.max(Q.nextStart,R.maxBufferHole))}return Q},l.getMaxBufferLength=function(p){var f=this.config,R;return p?R=Math.max(8*f.maxBufferSize/p,f.maxBufferLength):R=f.maxBufferLength,Math.min(R,f.maxMaxBufferLength)},l.reduceMaxBufferLength=function(p){var f=this.config,R=p||f.maxBufferLength;return f.maxMaxBufferLength>=R?(f.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+f.maxMaxBufferLength+"s"),!0):!1},l.getNextFragment=function(p,f){var R,U,Q=f.fragments,j=Q.length;if(!j)return null;var J=this.config,k=Q[0].start,Y;if(f.live){var ne=J.initialLiveManifestSize;if(j<ne)return this.warn("Not enough fragments to start playback (have: "+j+", need: "+ne+")"),null;!f.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(Y=this.getInitialLiveFragment(f,Q),this.startPosition=Y?this.hls.liveSyncPosition||Y.start:p)}else p<=k&&(Y=Q[0]);if(!Y){var me=J.lowLatencyMode?f.partEnd:f.fragmentEnd;Y=this.getFragmentAtPosition(p,me,f)}return(R=Y)!==null&&R!==void 0&&R.initSegment&&!((U=Y)!==null&&U!==void 0&&U.initSegment.data)&&!this.bitrateTest&&(Y=Y.initSegment),Y},l.getNextPart=function(p,f,R){for(var U=-1,Q=!1,j=!0,J=0,k=p.length;J<k;J++){var Y=p[J];if(j=j&&!Y.independent,U>-1&&R<Y.start)break;var ne=Y.loaded;!ne&&(Q||Y.independent||j)&&Y.fragment===f&&(U=J),Q=ne}return U},l.loadedEndOfParts=function(p,f){var R=p[p.length-1];return R&&f>R.start&&R.loaded},l.getInitialLiveFragment=function(p,f){var R=this.fragPrevious,U=null;if(R){if(p.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+R.programDateTime),U=Object(o.findFragmentByPDT)(f,R.endProgramDateTime,this.config.maxFragLookUpTolerance)),!U){var Q=R.sn+1;if(Q>=p.startSN&&Q<=p.endSN){var j=f[Q-p.startSN];R.cc===j.cc&&(U=j,this.log("Live playlist, switching playlist, load frag with next SN: "+U.sn))}U||(U=Object(o.findFragWithCC)(f,R.cc),U&&this.log("Live playlist, switching playlist, load frag with same CC: "+U.sn))}}else{var J=this.hls.liveSyncPosition;J!==null&&(U=this.getFragmentAtPosition(J,this.bitrateTest?p.fragmentEnd:p.edge,p))}return U},l.getFragmentAtPosition=function(p,f,R){var U=this.config,Q=this.fragPrevious,j=R.fragments,J=R.endSN,k=R.fragmentHint,Y=U.maxFragLookUpTolerance,ne=!!(U.lowLatencyMode&&R.partList&&k);ne&&k&&!this.bitrateTest&&(j=j.concat(k),J=k.sn);var me;if(p<f){var _e=p>f-Y?0:Y;me=Object(o.findFragmentByPTS)(Q,j,p,_e)}else me=j[j.length-1];if(me){var Oe=me.sn-R.startSN,xe=Q&&me.level===Q.level,Se=j[Oe+1],Fe=this.fragmentTracker.getState(me);if(Fe===I.FragmentState.BACKTRACKED){me=null;for(var Pe=Oe;j[Pe]&&this.fragmentTracker.getState(j[Pe])===I.FragmentState.BACKTRACKED;)Q?me=j[Pe--]:me=j[--Pe];me||(me=Se)}else Q&&me.sn===Q.sn&&!ne&&(xe&&(me.sn<J&&this.fragmentTracker.getState(Se)!==I.FragmentState.OK?(this.log("SN "+me.sn+" just loaded, load next one: "+Se.sn),me=Se):me=null))}return me},l.synchronizeToLiveEdge=function(p){var f=this.config,R=this.media;if(!R)return;var U=this.hls.liveSyncPosition,Q=R.currentTime,j=p.fragments[0].start,J=p.edge,k=Q>=j-f.maxFragLookUpTolerance&&Q<=J;if(U!==null&&R.duration>U&&(Q<U||!k)){var Y=f.liveMaxLatencyDuration!==void 0?f.liveMaxLatencyDuration:f.liveMaxLatencyDurationCount*p.targetduration;(!k&&R.readyState<4||Q<J-Y)&&(this.loadedmetadata||(this.nextLoadPosition=U),R.readyState&&(this.warn("Playback: "+Q.toFixed(3)+" is located too far from the end of live sliding playlist: "+J+", reset currentTime to : "+U.toFixed(3)),R.currentTime=U))}},l.alignPlaylists=function(p,f){var R=this.levels,U=this.levelLastLoaded,Q=this.fragPrevious,j=U!==null?R[U]:null,J=p.fragments.length;if(!J)return this.warn("No fragments in live playlist"),0;var k=p.fragments[0].start,Y=!f,ne=p.alignedSliding&&Object(z.isFiniteNumber)(k);if(Y||!ne&&!k){Object(u.alignStream)(Q,j,p);var me=p.fragments[0].start;return this.log("Live playlist sliding: "+me.toFixed(2)+" start-sn: "+(f?f.startSN:"na")+"->"+p.startSN+" prev-sn: "+(Q?Q.sn:"na")+" fragments: "+J),me}return k},l.waitForCdnTuneIn=function(p){var f=3;return p.live&&p.canBlockReload&&p.tuneInGoal>Math.max(p.partHoldBack,p.partTarget*f)},l.setStartPosition=function(p,f){var R=this.startPosition;if(R<f&&(R=-1),R===-1||this.lastCurrentTime===-1){var U=p.startTimeOffset;Object(z.isFiniteNumber)(U)?(R=f+U,U<0&&(R+=p.totalduration),R=Math.min(Math.max(f,R),f+p.totalduration),this.log("Start time offset "+U+" found in playlist, adjust startPosition to "+R),this.startPosition=R):p.live?R=this.hls.liveSyncPosition||f:this.startPosition=R=0,this.lastCurrentTime=R}this.nextLoadPosition=R},l.getLoadPosition=function(){var p=this.media,f=0;return this.loadedmetadata&&p?f=p.currentTime:this.nextLoadPosition&&(f=this.nextLoadPosition),f},l.handleFragLoadAborted=function(p,f){this.transmuxer&&p.sn!=="initSegment"&&p.stats.aborted&&(this.warn("Fragment "+p.sn+(f?" part"+f.index:"")+" of level "+p.level+" was aborted"),this.resetFragmentLoading(p))},l.resetFragmentLoading=function(p){(!this.fragCurrent||!this.fragContextChanged(p))&&(this.state=E.IDLE)},l.onFragmentOrKeyLoadError=function(p,f){if(f.fatal)return;var R=f.frag;if(!R||R.type!==p)return;var U=this.fragCurrent;console.assert(U&&R.sn===U.sn&&R.level===U.level&&R.urlId===U.urlId,"Frag load error must match current frag to retry");var Q=this.config;if(this.fragLoadError+1<=Q.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(R.level))return;var j=Math.min(Math.pow(2,this.fragLoadError)*Q.fragLoadingRetryDelay,Q.fragLoadingMaxRetryTimeout);this.warn("Fragment "+R.sn+" of "+p+" "+R.level+" failed to load, retrying in "+j+"ms"),this.retryDate=self.performance.now()+j,this.fragLoadError++,this.state=E.FRAG_LOADING_WAITING_RETRY}else f.levelRetry?(p===n.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=E.IDLE):(P.logger.error(f.details+" reaches max retry, redispatch as fatal ..."),f.fatal=!0,this.hls.stopLoad(),this.state=E.ERROR)},l.afterBufferFlushed=function(p,f,R){if(!p)return;var U=G.BufferHelper.getBuffered(p);this.fragmentTracker.detectEvictedFragments(f,U,R),this.state===E.ENDED&&this.resetLoadingState()},l.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=E.IDLE},l.resetLiveStartWhenNotLoaded=function(p){if(!this.loadedmetadata){this.startFragRequested=!1;var f=this.levels?this.levels[p].details:null;if(f!=null&&f.live)return this.startPosition=-1,this.setStartPosition(f,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},l.updateLevelTiming=function(p,f,R,U){var Q=this,j=R.details;console.assert(!!j,"level.details must be defined");var J=Object.keys(p.elementaryStreams).reduce(function(k,Y){var ne=p.elementaryStreams[Y];if(ne){var me=ne.endPTS-ne.startPTS;if(me<=0)return Q.warn("Could not parse fragment "+p.sn+" "+Y+" duration reliably ("+me+") resetting transmuxer to fallback to playlist timing"),Q.resetTransmuxer(),k||!1;var _e=U?0:Object(r.updateFragPTSDTS)(j,p,ne.startPTS,ne.endPTS,ne.startDTS,ne.endDTS);return Q.hls.trigger(L.Events.LEVEL_PTS_UPDATED,{details:j,level:R,drift:_e,type:Y,frag:p,start:ne.startPTS,end:ne.endPTS}),!0}return k},!1);J?(this.state=E.PARSED,this.hls.trigger(L.Events.FRAG_PARSED,{frag:p,part:f})):this.resetLoadingState()},l.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},B(a,[{key:"state",get:function(){return this._state},set:function(p){var f=this._state;f!==p&&(this._state=p,this.log(f+"->"+p))}}]),a}(D.default)},"./src/controller/buffer-controller.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"default",function(){return o});var z=O("./src/polyfills/number.ts"),D=O("./src/events.ts"),I=O("./src/utils/logger.ts"),G=O("./src/errors.ts"),P=O("./src/utils/buffer-helper.ts"),L=O("./src/utils/mediasource-helper.ts"),S=O("./src/loader/fragment.ts"),_=O("./src/controller/buffer-operation-queue.ts"),b=Object(L.getMediaSource)(),u=/([ha]vc.)(?:\.[^.,]+)+/,o=function(){function r(s){var t=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var n=t.hls,i=t.media,B=t.mediaSource;I.logger.log("[buffer-controller]: Media source opened"),i&&(t.updateMediaElementDuration(),n.trigger(D.Events.MEDIA_ATTACHED,{media:i})),B&&B.removeEventListener("sourceopen",t._onMediaSourceOpen),t.checkPendingTracks()},this._onMediaSourceClose=function(){I.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){I.logger.log("[buffer-controller]: Media source ended")},this.hls=s,this._initSourceBuffer(),this.registerListeners()}var A=r.prototype;return A.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},A.destroy=function(){this.unregisterListeners(),this.details=null},A.registerListeners=function(){var t=this.hls;t.on(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.on(D.Events.BUFFER_RESET,this.onBufferReset,this),t.on(D.Events.BUFFER_APPENDING,this.onBufferAppending,this),t.on(D.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.on(D.Events.BUFFER_EOS,this.onBufferEos,this),t.on(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),t.on(D.Events.LEVEL_UPDATED,this.onLevelUpdated,this),t.on(D.Events.FRAG_PARSED,this.onFragParsed,this),t.on(D.Events.FRAG_CHANGED,this.onFragChanged,this)},A.unregisterListeners=function(){var t=this.hls;t.off(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.off(D.Events.BUFFER_RESET,this.onBufferReset,this),t.off(D.Events.BUFFER_APPENDING,this.onBufferAppending,this),t.off(D.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.off(D.Events.BUFFER_EOS,this.onBufferEos,this),t.off(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),t.off(D.Events.LEVEL_UPDATED,this.onLevelUpdated,this),t.off(D.Events.FRAG_PARSED,this.onFragParsed,this),t.off(D.Events.FRAG_CHANGED,this.onFragChanged,this)},A._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new _.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},A.onManifestParsed=function(t,n){var i=2;(n.audio&&!n.video||!n.altAudio)&&(i=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=i,this.details=null,I.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},A.onMediaAttaching=function(t,n){var i=this.media=n.media;if(i&&b){var B=this.mediaSource=new b;B.addEventListener("sourceopen",this._onMediaSourceOpen),B.addEventListener("sourceended",this._onMediaSourceEnded),B.addEventListener("sourceclose",this._onMediaSourceClose),i.src=self.URL.createObjectURL(B),this._objectUrl=i.src}},A.onMediaDetaching=function(){var t=this.media,n=this.mediaSource,i=this._objectUrl;if(n){if(I.logger.log("[buffer-controller]: media source detaching"),n.readyState==="open")try{n.endOfStream()}catch(B){I.logger.warn("[buffer-controller]: onMediaDetaching: "+B.message+" while calling endOfStream")}this.onBufferReset(),n.removeEventListener("sourceopen",this._onMediaSourceOpen),n.removeEventListener("sourceended",this._onMediaSourceEnded),n.removeEventListener("sourceclose",this._onMediaSourceClose),t&&(i&&self.URL.revokeObjectURL(i),t.src===i?(t.removeAttribute("src"),t.load()):I.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(D.Events.MEDIA_DETACHED,void 0)},A.onBufferReset=function(){var t=this;this.getSourceBufferTypes().forEach(function(n){var i=t.sourceBuffer[n];try{i&&(t.removeBufferListeners(n),t.mediaSource&&t.mediaSource.removeSourceBuffer(i),t.sourceBuffer[n]=void 0)}catch(B){I.logger.warn("[buffer-controller]: Failed to reset the "+n+" buffer",B)}}),this._initSourceBuffer()},A.onBufferCodecs=function(t,n){var i=this,B=this.getSourceBufferTypes().length;if(Object.keys(n).forEach(function(w){if(B){var y=i.tracks[w];if(y&&typeof y.buffer.changeType=="function"){var x=n[w],E=x.codec,c=x.levelCodec,e=x.container,a=(y.levelCodec||y.codec).replace(u,"$1"),l=(c||E).replace(u,"$1");if(a!==l){var g=e+";codecs="+(c||E);i.appendChangeType(w,g)}}}else i.pendingTracks[w]=n[w]}),B)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},A.appendChangeType=function(t,n){var i=this,B=this.operationQueue,w={execute:function(){var x=i.sourceBuffer[t];x&&(I.logger.log("[buffer-controller]: changing "+t+" sourceBuffer type to "+n),x.changeType(n)),B.shiftAndExecuteNext(t)},onStart:function(){},onComplete:function(){},onError:function(x){I.logger.warn("[buffer-controller]: Failed to change "+t+" SourceBuffer type",x)}};B.append(w,t)},A.onBufferAppending=function(t,n){var i=this,B=this.hls,w=this.operationQueue,y=this.tracks,x=n.data,E=n.type,c=n.frag,e=n.part,a=n.chunkMeta,l=a.buffering[E],g=self.performance.now();l.start=g;var p=c.stats.buffering,f=e?e.stats.buffering:null;p.start===0&&(p.start=g),f&&f.start===0&&(f.start=g);var R=y.audio,U=E==="audio"&&a.id===1&&(R==null?void 0:R.container)==="audio/mpeg",Q={execute:function(){if(l.executeStart=self.performance.now(),U){var J=i.sourceBuffer[E];if(J){var k=c.start-J.timestampOffset;Math.abs(k)>=.1&&(I.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+c.start+" (delta: "+k+") sn: "+c.sn+")"),J.timestampOffset=c.start)}}i.appendExecutor(x,E)},onStart:function(){},onComplete:function(){var J=self.performance.now();l.executeEnd=l.end=J,p.first===0&&(p.first=J),f&&f.first===0&&(f.first=J);var k=i.sourceBuffer,Y={};for(var ne in k)Y[ne]=P.BufferHelper.getBuffered(k[ne]);i.appendError=0,i.hls.trigger(D.Events.BUFFER_APPENDED,{type:E,frag:c,part:e,chunkMeta:a,parent:c.type,timeRanges:Y})},onError:function(J){I.logger.error("[buffer-controller]: Error encountered while trying to append to the "+E+" SourceBuffer",J);var k={type:G.ErrorTypes.MEDIA_ERROR,parent:c.type,details:G.ErrorDetails.BUFFER_APPEND_ERROR,err:J,fatal:!1};J.code===DOMException.QUOTA_EXCEEDED_ERR?k.details=G.ErrorDetails.BUFFER_FULL_ERROR:(i.appendError++,k.details=G.ErrorDetails.BUFFER_APPEND_ERROR,i.appendError>B.config.appendErrorMaxRetry&&(I.logger.error("[buffer-controller]: Failed "+B.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),k.fatal=!0)),B.trigger(D.Events.ERROR,k)}};w.append(Q,E)},A.onBufferFlushing=function(t,n){var i=this,B=this.operationQueue,w=function(x){return{execute:i.removeExecutor.bind(i,x,n.startOffset,n.endOffset),onStart:function(){},onComplete:function(){i.hls.trigger(D.Events.BUFFER_FLUSHED,{type:x})},onError:function(c){I.logger.warn("[buffer-controller]: Failed to remove from "+x+" SourceBuffer",c)}}};n.type?B.append(w(n.type),n.type):this.getSourceBufferTypes().forEach(function(y){B.append(w(y),y)})},A.onFragParsed=function(t,n){var i=this,B=n.frag,w=n.part,y=[],x=w?w.elementaryStreams:B.elementaryStreams;x[S.ElementaryStreamTypes.AUDIOVIDEO]?y.push("audiovideo"):(x[S.ElementaryStreamTypes.AUDIO]&&y.push("audio"),x[S.ElementaryStreamTypes.VIDEO]&&y.push("video"));var E=function(){var e=self.performance.now();B.stats.buffering.end=e,w&&(w.stats.buffering.end=e);var a=w?w.stats:B.stats;i.hls.trigger(D.Events.FRAG_BUFFERED,{frag:B,part:w,stats:a,id:B.type})};y.length===0&&I.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+B.type+" level: "+B.level+" sn: "+B.sn),this.blockBuffers(E,y)},A.onFragChanged=function(t,n){this.flushBackBuffer()},A.onBufferEos=function(t,n){var i=this,B=this.getSourceBufferTypes().reduce(function(w,y){var x=i.sourceBuffer[y];return(!n.type||n.type===y)&&(x&&!x.ended&&(x.ended=!0,I.logger.log("[buffer-controller]: "+y+" sourceBuffer now EOS"))),w&&!!(!x||x.ended)},!0);B&&this.blockBuffers(function(){var w=i.mediaSource;if(!w||w.readyState!=="open")return;w.endOfStream()})},A.onLevelUpdated=function(t,n){var i=n.details;if(!i.fragments.length)return;this.details=i,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},A.flushBackBuffer=function(){var t=this.hls,n=this.details,i=this.media,B=this.sourceBuffer;if(!i||n===null)return;var w=this.getSourceBufferTypes();if(!w.length)return;var y=n.live&&t.config.liveBackBufferLength!==null?t.config.liveBackBufferLength:t.config.backBufferLength;if(!Object(z.isFiniteNumber)(y)||y<0)return;var x=i.currentTime,E=n.levelTargetDuration,c=Math.max(y,E),e=Math.floor(x/E)*E-c;w.forEach(function(a){var l=B[a];if(l){var g=P.BufferHelper.getBuffered(l);g.length>0&&e>g.start(0)&&(t.trigger(D.Events.BACK_BUFFER_REACHED,{bufferEnd:e}),n.live&&t.trigger(D.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:e}),t.trigger(D.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:e,type:a}))}})},A.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var t=this.details,n=this.hls,i=this.media,B=this.mediaSource,w=t.fragments[0].start+t.totalduration,y=i.duration,x=Object(z.isFiniteNumber)(B.duration)?B.duration:0;t.live&&n.config.liveDurationInfinity?(I.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),B.duration=Infinity,this.updateSeekableRange(t)):(w>x&&w>y||!Object(z.isFiniteNumber)(y))&&(I.logger.log("[buffer-controller]: Updating Media Source duration to "+w.toFixed(3)),B.duration=w)},A.updateSeekableRange=function(t){var n=this.mediaSource,i=t.fragments,B=i.length;if(B&&t.live&&n!==null&&n!==void 0&&n.setLiveSeekableRange){var w=Math.max(0,i[0].start),y=Math.max(w,w+t.totalduration);n.setLiveSeekableRange(w,y)}},A.checkPendingTracks=function(){var t=this.bufferCodecEventsExpected,n=this.operationQueue,i=this.pendingTracks,B=Object.keys(i).length;if(B&&!t||B===2){this.createSourceBuffers(i),this.pendingTracks={};var w=this.getSourceBufferTypes();if(w.length===0){this.hls.trigger(D.Events.ERROR,{type:G.ErrorTypes.MEDIA_ERROR,details:G.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}w.forEach(function(y){n.executeNext(y)})}},A.createSourceBuffers=function(t){var n=this.sourceBuffer,i=this.mediaSource;if(!i)throw Error("createSourceBuffers called when mediaSource was null");var B=0;for(var w in t)if(!n[w]){var y=t[w];if(!y)throw Error("source buffer exists for track "+w+", however track does not");var x=y.levelCodec||y.codec,E=y.container+";codecs="+x;I.logger.log("[buffer-controller]: creating sourceBuffer("+E+")");try{var c=n[w]=i.addSourceBuffer(E),e=w;this.addBufferListener(e,"updatestart",this._onSBUpdateStart),this.addBufferListener(e,"updateend",this._onSBUpdateEnd),this.addBufferListener(e,"error",this._onSBUpdateError),this.tracks[w]={buffer:c,codec:x,container:y.container,levelCodec:y.levelCodec,id:y.id},B++}catch(a){I.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+a.message),this.hls.trigger(D.Events.ERROR,{type:G.ErrorTypes.MEDIA_ERROR,details:G.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:a,mimeType:E})}}B&&this.hls.trigger(D.Events.BUFFER_CREATED,{tracks:this.tracks})},A._onSBUpdateStart=function(t){var n=this.operationQueue,i=n.current(t);i.onStart()},A._onSBUpdateEnd=function(t){var n=this.operationQueue,i=n.current(t);i.onComplete(),n.shiftAndExecuteNext(t)},A._onSBUpdateError=function(t,n){I.logger.error("[buffer-controller]: "+t+" SourceBuffer error",n),this.hls.trigger(D.Events.ERROR,{type:G.ErrorTypes.MEDIA_ERROR,details:G.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var i=this.operationQueue.current(t);i&&i.onError(n)},A.removeExecutor=function(t,n,i){var B=this.media,w=this.mediaSource,y=this.operationQueue,x=this.sourceBuffer,E=x[t];if(!B||!w||!E){I.logger.warn("[buffer-controller]: Attempting to remove from the "+t+" SourceBuffer, but it does not exist"),y.shiftAndExecuteNext(t);return}var c=Object(z.isFiniteNumber)(B.duration)?B.duration:Infinity,e=Object(z.isFiniteNumber)(w.duration)?w.duration:Infinity,a=Math.max(0,n),l=Math.min(i,c,e);l>a?(I.logger.log("[buffer-controller]: Removing ["+a+","+l+"] from the "+t+" SourceBuffer"),console.assert(!E.updating,t+" sourceBuffer must not be updating"),E.remove(a,l)):y.shiftAndExecuteNext(t)},A.appendExecutor=function(t,n){var i=this.operationQueue,B=this.sourceBuffer,w=B[n];if(!w){I.logger.warn("[buffer-controller]: Attempting to append to the "+n+" SourceBuffer, but it does not exist"),i.shiftAndExecuteNext(n);return}w.ended=!1,console.assert(!w.updating,n+" sourceBuffer must not be updating"),w.appendBuffer(t)},A.blockBuffers=function(t,n){var i=this;if(n===void 0&&(n=this.getSourceBufferTypes()),!n.length){I.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(t);return}var B=this.operationQueue,w=n.map(function(y){return B.appendBlocker(y)});Promise.all(w).then(function(){t(),n.forEach(function(y){var x=i.sourceBuffer[y];(!x||!x.updating)&&B.shiftAndExecuteNext(y)})})},A.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},A.addBufferListener=function(t,n,i){var B=this.sourceBuffer[t];if(!B)return;var w=i.bind(this,t);this.listeners[t].push({event:n,listener:w}),B.addEventListener(n,w)},A.removeBufferListeners=function(t){var n=this.sourceBuffer[t];if(!n)return;this.listeners[t].forEach(function(i){n.removeEventListener(i.event,i.listener)})},r}()},"./src/controller/buffer-operation-queue.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"default",function(){return D});var z=O("./src/utils/logger.ts"),D=function(){function I(P){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=P}var G=I.prototype;return G.append=function(L,S){var _=this.queues[S];_.push(L),_.length===1&&this.buffers[S]&&this.executeNext(S)},G.insertAbort=function(L,S){var _=this.queues[S];_.unshift(L),this.executeNext(S)},G.appendBlocker=function(L){var S,_=new Promise(function(u){S=u}),b={execute:S,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(b,L),_},G.executeNext=function(L){var S=this.buffers,_=this.queues,b=S[L],u=_[L];if(u.length){var o=u[0];try{o.execute()}catch(r){z.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),o.onError(r),(!b||!b.updating)&&(u.shift(),this.executeNext(L))}}},G.shiftAndExecuteNext=function(L){this.queues[L].shift(),this.executeNext(L)},G.current=function(L){return this.queues[L][0]},I}()},"./src/controller/cap-level-controller.ts":function(ve,V,O){"use strict";O.r(V);var z=O("./src/events.ts");function D(P,L){for(var S=0;S<L.length;S++){var _=L[S];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(P,_.key,_)}}function I(P,L,S){return L&&D(P.prototype,L),S&&D(P,S),P}var G=function(){function P(S){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=S,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var L=P.prototype;return L.setStreamController=function(_){this.streamController=_},L.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},L.registerListeners=function(){var _=this.hls;_.on(z.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),_.on(z.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),_.on(z.Events.MANIFEST_PARSED,this.onManifestParsed,this),_.on(z.Events.BUFFER_CODECS,this.onBufferCodecs,this),_.on(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},L.unregisterListener=function(){var _=this.hls;_.off(z.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),_.off(z.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),_.off(z.Events.MANIFEST_PARSED,this.onManifestParsed,this),_.off(z.Events.BUFFER_CODECS,this.onBufferCodecs,this),_.off(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},L.onFpsDropLevelCapping=function(_,b){P.isLevelAllowed(b.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(b.droppedLevel)},L.onMediaAttaching=function(_,b){this.media=b.media instanceof HTMLVideoElement?b.media:null},L.onManifestParsed=function(_,b){var u=this.hls;this.restrictedLevels=[],this.firstLevel=b.firstLevel,u.config.capLevelToPlayerSize&&b.video&&this.startCapping()},L.onBufferCodecs=function(_,b){var u=this.hls;u.config.capLevelToPlayerSize&&b.video&&this.startCapping()},L.onMediaDetaching=function(){this.stopCapping()},L.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var _=this.hls.levels;if(_.length){var b=this.hls;b.autoLevelCapping=this.getMaxLevel(_.length-1),b.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=b.autoLevelCapping}}},L.getMaxLevel=function(_){var b=this,u=this.hls.levels;if(!u.length)return-1;var o=u.filter(function(r,A){return P.isLevelAllowed(A,b.restrictedLevels)&&A<=_});return this.clientRect=null,P.getMaxLevelByMediaSize(o,this.mediaWidth,this.mediaHeight)},L.startCapping=function(){if(this.timer)return;this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize()},L.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},L.getDimensions=function(){if(this.clientRect)return this.clientRect;var _=this.media,b={width:0,height:0};if(_){var u=_.getBoundingClientRect();b.width=u.width,b.height=u.height,!b.width&&!b.height&&(b.width=u.right-u.left||_.width||0,b.height=u.bottom-u.top||_.height||0)}return this.clientRect=b,b},P.isLevelAllowed=function(_,b){return b===void 0&&(b=[]),b.indexOf(_)===-1},P.getMaxLevelByMediaSize=function(_,b,u){if(!_||!_.length)return-1;for(var o=function(n,i){return i?n.width!==i.width||n.height!==i.height:!0},r=_.length-1,A=0;A<_.length;A+=1){var s=_[A];if((s.width>=b||s.height>=u)&&o(s,_[A+1])){r=A;break}}return r},I(P,[{key:"mediaWidth",get:function(){return this.getDimensions().width*P.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*P.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var _=1;try{_=self.devicePixelRatio}catch(b){}return _}}]),P}();V.default=G},"./src/controller/cmcd-controller.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"default",function(){return o});var z=O("./src/events.ts"),D=O("./src/types/cmcd.ts"),I=O("./src/utils/buffer-helper.ts"),G=O("./src/utils/logger.ts");function P(r,A){for(var s=0;s<A.length;s++){var t=A[s];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,t.key,t)}}function L(r,A,s){return A&&P(r.prototype,A),s&&P(r,s),r}function S(r,A){var s=typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(s)return(s=s.call(r)).next.bind(s);if(Array.isArray(r)||(s=_(r))||A&&r&&typeof r.length=="number"){s&&(r=s);var t=0;return function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _(r,A){if(!r)return;if(typeof r=="string")return b(r,A);var s=Object.prototype.toString.call(r).slice(8,-1);if(s==="Object"&&r.constructor&&(s=r.constructor.name),s==="Map"||s==="Set")return Array.from(r);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return b(r,A)}function b(r,A){(A==null||A>r.length)&&(A=r.length);for(var s=0,t=new Array(A);s<A;s++)t[s]=r[s];return t}function u(){return u=Object.assign||function(r){for(var A=1;A<arguments.length;A++){var s=arguments[A];for(var t in s)Object.prototype.hasOwnProperty.call(s,t)&&(r[t]=s[t])}return r},u.apply(this,arguments)}var o=function(){function r(s){var t=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){t.initialized&&(t.starved=!0),t.buffering=!0},this.onPlaying=function(){t.initialized||(t.initialized=!0),t.buffering=!1},this.applyPlaylistData=function(B){try{t.apply(B,{ot:D.CMCDObjectType.MANIFEST,su:!t.initialized})}catch(w){G.logger.warn("Could not generate manifest CMCD data.",w)}},this.applyFragmentData=function(B){try{var w=B.frag,y=t.hls.levels[w.level],x=t.getObjectType(w),E={d:w.duration*1e3,ot:x};(x===D.CMCDObjectType.VIDEO||x===D.CMCDObjectType.AUDIO||x==D.CMCDObjectType.MUXED)&&(E.br=y.bitrate/1e3,E.tb=t.getTopBandwidth(x),E.bl=t.getBufferLength(x)),t.apply(B,E)}catch(c){G.logger.warn("Could not generate segment CMCD data.",c)}},this.hls=s;var n=this.config=s.config,i=n.cmcd;i!=null&&(n.pLoader=this.createPlaylistLoader(),n.fLoader=this.createFragmentLoader(),this.sid=i.sessionId||r.uuid(),this.cid=i.contentId,this.useHeaders=i.useHeaders===!0,this.registerListeners())}var A=r.prototype;return A.registerListeners=function(){var t=this.hls;t.on(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(z.Events.MEDIA_DETACHED,this.onMediaDetached,this),t.on(z.Events.BUFFER_CREATED,this.onBufferCreated,this)},A.unregisterListeners=function(){var t=this.hls;t.off(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(z.Events.MEDIA_DETACHED,this.onMediaDetached,this),t.off(z.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},A.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},A.onMediaAttached=function(t,n){this.media=n.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},A.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},A.onBufferCreated=function(t,n){var i,B;this.audioBuffer=(i=n.tracks.audio)===null||i===void 0?void 0:i.buffer,this.videoBuffer=(B=n.tracks.video)===null||B===void 0?void 0:B.buffer},A.createData=function(){var t;return{v:D.CMCDVersion,sf:D.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(t=this.media)===null||t===void 0?void 0:t.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},A.apply=function(t,n){n===void 0&&(n={}),u(n,this.createData());var i=n.ot===D.CMCDObjectType.INIT||n.ot===D.CMCDObjectType.VIDEO||n.ot===D.CMCDObjectType.MUXED;if(this.starved&&i&&(n.bs=!0,n.su=!0,this.starved=!1),n.su==null&&(n.su=this.buffering),this.useHeaders){var B=r.toHeaders(n);if(!Object.keys(B).length)return;t.headers||(t.headers={}),u(t.headers,B)}else{var w=r.toQuery(n);if(!w)return;t.url=r.appendQueryToUri(t.url,w)}},A.getObjectType=function(t){var n=t.type;return n==="subtitle"?D.CMCDObjectType.TIMED_TEXT:t.sn==="initSegment"?D.CMCDObjectType.INIT:n==="audio"?D.CMCDObjectType.AUDIO:n==="main"?this.hls.audioTracks.length?D.CMCDObjectType.VIDEO:D.CMCDObjectType.MUXED:void 0},A.getTopBandwidth=function(t){for(var n=0,i=t===D.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,B=S(i),w;!(w=B()).done;){var y=w.value;y.bitrate>n&&(n=y.bitrate)}return n>0?n:NaN},A.getBufferLength=function(t){var n=this.hls.media,i=t===D.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!i||!n)return NaN;var B=I.BufferHelper.bufferInfo(i,n.currentTime,this.config.maxBufferHole);return B.len*1e3},A.createPlaylistLoader=function(){var t=this.config.pLoader,n=this.applyPlaylistData,i=t||this.config.loader;return function(){function B(y){this.loader=void 0,this.loader=new i(y)}var w=B.prototype;return w.destroy=function(){this.loader.destroy()},w.abort=function(){this.loader.abort()},w.load=function(x,E,c){n(x),this.loader.load(x,E,c)},L(B,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),B}()},A.createFragmentLoader=function(){var t=this.config.fLoader,n=this.applyFragmentData,i=t||this.config.loader;return function(){function B(y){this.loader=void 0,this.loader=new i(y)}var w=B.prototype;return w.destroy=function(){this.loader.destroy()},w.abort=function(){this.loader.abort()},w.load=function(x,E,c){n(x),this.loader.load(x,E,c)},L(B,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),B}()},r.uuid=function(){var t=URL.createObjectURL(new Blob),n=t.toString();return URL.revokeObjectURL(t),n.substr(n.lastIndexOf("/")+1)},r.serialize=function(t){for(var n=[],i=function(U){return!Number.isNaN(U)&&U!=null&&U!==""&&U!==!1},B=function(U){return Math.round(U)},w=function(U){return B(U/100)*100},y=function(U){return encodeURIComponent(U)},x={br:B,d:B,bl:w,dl:w,mtp:w,nor:y,rtp:w,tb:B},E=Object.keys(t||{}).sort(),c=S(E),e;!(e=c()).done;){var a=e.value,l=t[a];if(!i(l))continue;if(a==="v"&&l===1)continue;if(a=="pr"&&l===1)continue;var g=x[a];g&&(l=g(l));var p=typeof l,f=void 0;a==="ot"||a==="sf"||a==="st"?f=a+"="+l:p==="boolean"?f=a:p==="number"?f=a+"="+l:f=a+"="+JSON.stringify(l),n.push(f)}return n.join(",")},r.toHeaders=function(t){for(var n=Object.keys(t),i={},B=["Object","Request","Session","Status"],w=[{},{},{},{}],y={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},x=0,E=n;x<E.length;x++){var c=E[x],e=y[c]!=null?y[c]:1;w[e][c]=t[c]}for(var a=0;a<w.length;a++){var l=r.serialize(w[a]);l&&(i["CMCD-"+B[a]]=l)}return i},r.toQuery=function(t){return"CMCD="+encodeURIComponent(r.serialize(t))},r.appendQueryToUri=function(t,n){if(!n)return t;var i=t.includes("?")?"&":"?";return""+t+i+n},r}()},"./src/controller/eme-controller.ts":function(ve,V,O){"use strict";O.r(V);var z=O("./src/events.ts"),D=O("./src/errors.ts"),I=O("./src/utils/logger.ts"),G=O("./src/utils/mediakeys-helper.ts");function P(o,r){for(var A=0;A<r.length;A++){var s=r[A];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(o,s.key,s)}}function L(o,r,A){return r&&P(o.prototype,r),A&&P(o,A),o}var S=3,_=function(r,A,s){var t={audioCapabilities:[],videoCapabilities:[]};return r.forEach(function(n){t.audioCapabilities.push({contentType:'audio/mp4; codecs="'+n+'"',robustness:s.audioRobustness||""})}),A.forEach(function(n){t.videoCapabilities.push({contentType:'video/mp4; codecs="'+n+'"',robustness:s.videoRobustness||""})}),[t]},b=function(r,A,s,t){switch(r){case G.KeySystems.WIDEVINE:return _(A,s,t);default:throw new Error("Unknown key-system: "+r)}},u=function(){function o(A){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=A,this._config=A.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var r=o.prototype;return r.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},r._registerListeners=function(){this.hls.on(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(z.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(z.Events.MANIFEST_PARSED,this.onManifestParsed,this)},r._unregisterListeners=function(){this.hls.off(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(z.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(z.Events.MANIFEST_PARSED,this.onManifestParsed,this)},r.getLicenseServerUrl=function(s){switch(s){case G.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+s+'"')},r._attemptKeySystemAccess=function(s,t,n){var i=this,B=b(s,t,n,this._drmSystemOptions);I.logger.log("Requesting encrypted media key-system access");var w=this.requestMediaKeySystemAccess(s,B);this.mediaKeysPromise=w.then(function(y){return i._onMediaKeySystemAccessObtained(s,y)}),w.catch(function(y){I.logger.error('Failed to obtain key-system "'+s+'" access:',y)})},r._onMediaKeySystemAccessObtained=function(s,t){var n=this;I.logger.log('Access for key-system "'+s+'" obtained');var i={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:t,mediaKeySystemDomain:s};this._mediaKeysList.push(i);var B=Promise.resolve().then(function(){return t.createMediaKeys()}).then(function(w){return i.mediaKeys=w,I.logger.log('Media-keys created for key-system "'+s+'"'),n._onMediaKeysCreated(),w});return B.catch(function(w){I.logger.error("Failed to create media-keys:",w)}),B},r._onMediaKeysCreated=function(){var s=this;this._mediaKeysList.forEach(function(t){t.mediaKeysSession||(t.mediaKeysSession=t.mediaKeys.createSession(),s._onNewMediaKeySession(t.mediaKeysSession))})},r._onNewMediaKeySession=function(s){var t=this;I.logger.log("New key-system session "+s.sessionId),s.addEventListener("message",function(n){t._onKeySessionMessage(s,n.message)},!1)},r._onKeySessionMessage=function(s,t){I.logger.log("Got EME message event, creating license request"),this._requestLicense(t,function(n){I.logger.log("Received license data (length: "+(n&&n.byteLength)+"), updating key-session"),s.update(n)})},r.onMediaEncrypted=function(s){var t=this;if(I.logger.log('Media is encrypted using "'+s.initDataType+'" init data type'),!this.mediaKeysPromise){I.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(z.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var n=function(B){if(!t._media)return;t._attemptSetMediaKeys(B),t._generateRequestWithPreferredKeySession(s.initDataType,s.initData)};this.mediaKeysPromise.then(n).catch(n)},r._attemptSetMediaKeys=function(s){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var t=this._mediaKeysList[0];if(!t||!t.mediaKeys){I.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(z.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}I.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(t.mediaKeys),this._hasSetMediaKeys=!0}},r._generateRequestWithPreferredKeySession=function(s,t){var n=this,i=this._mediaKeysList[0];if(!i){I.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(z.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(i.mediaKeysSessionInitialized){I.logger.warn("Key-Session already initialized but requested again");return}var B=i.mediaKeysSession;if(!B){I.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(z.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!t){I.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(z.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}I.logger.log('Generating key-session request for "'+s+'" init data type'),i.mediaKeysSessionInitialized=!0,B.generateRequest(s,t).then(function(){I.logger.debug("Key-session generation succeeded")}).catch(function(w){I.logger.error("Error generating key-session request:",w),n.hls.trigger(z.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},r._createLicenseXhr=function(s,t,n){var i=new XMLHttpRequest;i.responseType="arraybuffer",i.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,i,s,t,n);var B=this._licenseXhrSetup;if(B)try{B.call(this.hls,i,s),B=void 0}catch(w){I.logger.error(w)}try{i.readyState||i.open("POST",s,!0),B&&B.call(this.hls,i,s)}catch(w){throw new Error("issue setting up KeySystem license XHR "+w)}return i},r._onLicenseRequestReadyStageChange=function(s,t,n,i){switch(s.readyState){case 4:if(s.status===200){this._requestLicenseFailureCount=0,I.logger.log("License request succeeded");var B=s.response,w=this._licenseResponseCallback;if(w)try{B=w.call(this.hls,s,t)}catch(x){I.logger.error(x)}i(B)}else{if(I.logger.error("License Request XHR failed ("+t+"). Status: "+s.status+" ("+s.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>S){this.hls.trigger(z.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var y=S-this._requestLicenseFailureCount+1;I.logger.warn("Retrying license request, "+y+" attempts left"),this._requestLicense(n,i)}break}},r._generateLicenseRequestChallenge=function(s,t){switch(s.mediaKeySystemDomain){case G.KeySystems.WIDEVINE:return t}throw new Error("unsupported key-system: "+s.mediaKeySystemDomain)},r._requestLicense=function(s,t){I.logger.log("Requesting content license for key-system");var n=this._mediaKeysList[0];if(!n){I.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(z.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var i=this.getLicenseServerUrl(n.mediaKeySystemDomain),B=this._createLicenseXhr(i,s,t);I.logger.log("Sending license request to URL: "+i);var w=this._generateLicenseRequestChallenge(n,s);B.send(w)}catch(y){I.logger.error("Failure requesting DRM license: "+y),this.hls.trigger(z.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},r.onMediaAttached=function(s,t){if(!this._emeEnabled)return;var n=t.media;this._media=n,n.addEventListener("encrypted",this._onMediaEncrypted)},r.onMediaDetached=function(){var s=this._media,t=this._mediaKeysList;if(!s)return;s.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(t.map(function(n){if(n.mediaKeysSession)return n.mediaKeysSession.close().catch(function(){})})).then(function(){return s.setMediaKeys(null)}).catch(function(){})},r.onManifestParsed=function(s,t){if(!this._emeEnabled)return;var n=t.levels.map(function(B){return B.audioCodec}).filter(function(B){return!!B}),i=t.levels.map(function(B){return B.videoCodec}).filter(function(B){return!!B});this._attemptKeySystemAccess(G.KeySystems.WIDEVINE,n,i)},L(o,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),o}();V.default=u},"./src/controller/fps-controller.ts":function(ve,V,O){"use strict";O.r(V);var z=O("./src/events.ts"),D=O("./src/utils/logger.ts"),I=function(){function G(L){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=L,this.registerListeners()}var P=G.prototype;return P.setStreamController=function(S){this.streamController=S},P.registerListeners=function(){this.hls.on(z.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},P.unregisterListeners=function(){this.hls.off(z.Events.MEDIA_ATTACHING,this.onMediaAttaching)},P.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},P.onMediaAttaching=function(S,_){var b=this.hls.config;if(b.capLevelOnFPSDrop){var u=_.media instanceof self.HTMLVideoElement?_.media:null;this.media=u,u&&typeof u.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),b.fpsDroppedMonitoringPeriod)}},P.checkFPS=function(S,_,b){var u=performance.now();if(_){if(this.lastTime){var o=u-this.lastTime,r=b-this.lastDroppedFrames,A=_-this.lastDecodedFrames,s=1e3*r/o,t=this.hls;if(t.trigger(z.Events.FPS_DROP,{currentDropped:r,currentDecoded:A,totalDroppedFrames:b}),s>0&&r>t.config.fpsDroppedMonitoringThreshold*A){var n=t.currentLevel;D.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+n),n>0&&(t.autoLevelCapping===-1||t.autoLevelCapping>=n)&&(n=n-1,t.trigger(z.Events.FPS_DROP_LEVEL_CAPPING,{level:n,droppedLevel:t.currentLevel}),t.autoLevelCapping=n,this.streamController.nextLevelSwitch())}}this.lastTime=u,this.lastDroppedFrames=b,this.lastDecodedFrames=_}},P.checkFPSInterval=function(){var S=this.media;if(S)if(this.isVideoPlaybackQualityAvailable){var _=S.getVideoPlaybackQuality();this.checkFPS(S,_.totalVideoFrames,_.droppedVideoFrames)}else this.checkFPS(S,S.webkitDecodedFrameCount,S.webkitDroppedFrameCount)},G}();V.default=I},"./src/controller/fragment-finders.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"findFragmentByPDT",function(){return I}),O.d(V,"findFragmentByPTS",function(){return G}),O.d(V,"fragmentWithinToleranceTest",function(){return P}),O.d(V,"pdtWithinToleranceTest",function(){return L}),O.d(V,"findFragWithCC",function(){return S});var z=O("./src/polyfills/number.ts"),D=O("./src/utils/binary-search.ts");function I(_,b,u){if(b===null||!Array.isArray(_)||!_.length||!Object(z.isFiniteNumber)(b))return null;var o=_[0].programDateTime;if(b<(o||0))return null;var r=_[_.length-1].endProgramDateTime;if(b>=(r||0))return null;u=u||0;for(var A=0;A<_.length;++A){var s=_[A];if(L(b,u,s))return s}return null}function G(_,b,u,o){u===void 0&&(u=0),o===void 0&&(o=0);var r=null;if(_?r=b[_.sn-b[0].sn+1]||null:u===0&&b[0].start===0&&(r=b[0]),r&&P(u,o,r)===0)return r;var A=D.default.search(b,P.bind(null,u,o));return A||r}function P(_,b,u){_===void 0&&(_=0),b===void 0&&(b=0);var o=Math.min(b,u.duration+(u.deltaPTS?u.deltaPTS:0));return u.start+u.duration-o<=_?1:u.start-o>_&&u.start?-1:0}function L(_,b,u){var o=Math.min(b,u.duration+(u.deltaPTS?u.deltaPTS:0))*1e3,r=u.endProgramDateTime||0;return r-o>_}function S(_,b){return D.default.search(_,function(u){return u.cc<b?1:u.cc>b?-1:0})}},"./src/controller/fragment-tracker.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"FragmentState",function(){return I}),O.d(V,"FragmentTracker",function(){return G});var z=O("./src/events.ts"),D=O("./src/types/loader.ts"),I;(function(S){S.NOT_LOADED="NOT_LOADED",S.BACKTRACKED="BACKTRACKED",S.APPENDING="APPENDING",S.PARTIAL="PARTIAL",S.OK="OK"})(I||(I={}));var G=function(){function S(b){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=b,this._registerListeners()}var _=S.prototype;return _._registerListeners=function(){var u=this.hls;u.on(z.Events.BUFFER_APPENDED,this.onBufferAppended,this),u.on(z.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.on(z.Events.FRAG_LOADED,this.onFragLoaded,this)},_._unregisterListeners=function(){var u=this.hls;u.off(z.Events.BUFFER_APPENDED,this.onBufferAppended,this),u.off(z.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.off(z.Events.FRAG_LOADED,this.onFragLoaded,this)},_.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},_.getAppendedFrag=function(u,o){if(o===D.PlaylistLevelType.MAIN){var r=this.activeFragment,A=this.activeParts;if(!r)return null;if(A)for(var s=A.length;s--;){var t=A[s],n=t?t.end:r.appendedPTS;if(t.start<=u&&n!==void 0&&u<=n)return s>9&&(this.activeParts=A.slice(s-9)),t}else if(r.start<=u&&r.appendedPTS!==void 0&&u<=r.appendedPTS)return r}return this.getBufferedFrag(u,o)},_.getBufferedFrag=function(u,o){for(var r=this.fragments,A=Object.keys(r),s=A.length;s--;){var t=r[A[s]];if((t==null?void 0:t.body.type)===o&&t.buffered){var n=t.body;if(n.start<=u&&u<=n.end)return n}}return null},_.detectEvictedFragments=function(u,o,r){var A=this;Object.keys(this.fragments).forEach(function(s){var t=A.fragments[s];if(!t)return;if(!t.buffered){t.body.type===r&&A.removeFragment(t.body);return}var n=t.range[u];if(!n)return;n.time.some(function(i){var B=!A.isTimeBuffered(i.startPTS,i.endPTS,o);return B&&A.removeFragment(t.body),B})})},_.detectPartialFragments=function(u){var o=this,r=this.timeRanges,A=u.frag,s=u.part;if(!r||A.sn==="initSegment")return;var t=L(A),n=this.fragments[t];if(!n)return;Object.keys(r).forEach(function(i){var B=A.elementaryStreams[i];if(!B)return;var w=r[i],y=s!==null||B.partial===!0;n.range[i]=o.getBufferedTimes(A,s,y,w)}),n.backtrack=n.loaded=null,Object.keys(n.range).length?n.buffered=!0:this.removeFragment(n.body)},_.fragBuffered=function(u){var o=L(u),r=this.fragments[o];r&&(r.backtrack=r.loaded=null,r.buffered=!0)},_.getBufferedTimes=function(u,o,r,A){for(var s={time:[],partial:r},t=o?o.start:u.start,n=o?o.end:u.end,i=u.minEndPTS||n,B=u.maxStartPTS||t,w=0;w<A.length;w++){var y=A.start(w)-this.bufferPadding,x=A.end(w)+this.bufferPadding;if(B>=y&&i<=x){s.time.push({startPTS:Math.max(t,A.start(w)),endPTS:Math.min(n,A.end(w))});break}else if(t<x&&n>y)s.partial=!0,s.time.push({startPTS:Math.max(t,A.start(w)),endPTS:Math.min(n,A.end(w))});else if(n<=y)break}return s},_.getPartialFragment=function(u){var o=null,r,A,s,t=0,n=this.bufferPadding,i=this.fragments;return Object.keys(i).forEach(function(B){var w=i[B];if(!w)return;P(w)&&(A=w.body.start-n,s=w.body.end+n,u>=A&&u<=s&&(r=Math.min(u-A,s-u),t<=r&&(o=w.body,t=r)))}),o},_.getState=function(u){var o=L(u),r=this.fragments[o];return r?r.buffered?P(r)?I.PARTIAL:I.OK:r.backtrack?I.BACKTRACKED:I.APPENDING:I.NOT_LOADED},_.backtrack=function(u,o){var r=L(u),A=this.fragments[r];if(!A||A.backtrack)return null;var s=A.backtrack=o||A.loaded;return A.loaded=null,s},_.getBacktrackData=function(u){var o=L(u),r=this.fragments[o];if(r){var A,s=r.backtrack;if(s!=null&&(A=s.payload)!==null&&A!==void 0&&A.byteLength)return s;this.removeFragment(u)}return null},_.isTimeBuffered=function(u,o,r){for(var A,s,t=0;t<r.length;t++){if(A=r.start(t)-this.bufferPadding,s=r.end(t)+this.bufferPadding,u>=A&&o<=s)return!0;if(o<=A)return!1}return!1},_.onFragLoaded=function(u,o){var r=o.frag,A=o.part;if(r.sn==="initSegment"||r.bitrateTest||A)return;var s=L(r);this.fragments[s]={body:r,loaded:o,backtrack:null,buffered:!1,range:Object.create(null)}},_.onBufferAppended=function(u,o){var r=this,A=o.frag,s=o.part,t=o.timeRanges;if(A.type===D.PlaylistLevelType.MAIN)if(this.activeFragment=A,s){var n=this.activeParts;n||(this.activeParts=n=[]),n.push(s)}else this.activeParts=null;this.timeRanges=t,Object.keys(t).forEach(function(i){var B=t[i];if(r.detectEvictedFragments(i,B),!s)for(var w=0;w<B.length;w++)A.appendedPTS=Math.max(B.end(w),A.appendedPTS||0)})},_.onFragBuffered=function(u,o){this.detectPartialFragments(o)},_.hasFragment=function(u){var o=L(u);return!!this.fragments[o]},_.removeFragmentsInRange=function(u,o,r){var A=this;Object.keys(this.fragments).forEach(function(s){var t=A.fragments[s];if(!t)return;if(t.buffered){var n=t.body;n.type===r&&n.start<o&&n.end>u&&A.removeFragment(n)}})},_.removeFragment=function(u){var o=L(u);u.stats.loaded=0,u.clearElementaryStreamInfo(),delete this.fragments[o]},_.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},S}();function P(S){var _,b;return S.buffered&&(((_=S.range.video)===null||_===void 0?void 0:_.partial)||((b=S.range.audio)===null||b===void 0?void 0:b.partial))}function L(S){return S.type+"_"+S.level+"_"+S.urlId+"_"+S.sn}},"./src/controller/gap-controller.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"STALL_MINIMUM_DURATION_MS",function(){return P}),O.d(V,"MAX_START_GAP_JUMP",function(){return L}),O.d(V,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return S}),O.d(V,"SKIP_BUFFER_RANGE_START",function(){return _}),O.d(V,"default",function(){return b});var z=O("./src/utils/buffer-helper.ts"),D=O("./src/errors.ts"),I=O("./src/events.ts"),G=O("./src/utils/logger.ts"),P=250,L=2,S=.1,_=.05,b=function(){function u(r,A,s,t){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=r,this.media=A,this.fragmentTracker=s,this.hls=t}var o=u.prototype;return o.destroy=function(){this.hls=this.fragmentTracker=this.media=null},o.poll=function(A){var s=this.config,t=this.media,n=this.stalled,i=t.currentTime,B=t.seeking,w=this.seeking&&!B,y=!this.seeking&&B;if(this.seeking=B,i!==A){if(this.moved=!0,n!==null){if(this.stallReported){var x=self.performance.now()-n;G.logger.warn("playback not stuck anymore @"+i+", after "+Math.round(x)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((y||w)&&(this.stalled=null),t.paused||t.ended||t.playbackRate===0||!z.BufferHelper.getBuffered(t).length)return;var E=z.BufferHelper.bufferInfo(t,i,0),c=E.len>0,e=E.nextStart||0;if(!c&&!e)return;if(B){var a=E.len>L,l=!e||e-i>L&&!this.fragmentTracker.getPartialFragment(i);if(a||l)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var g,p=Math.max(e,E.start||0)-i,f=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,R=f==null||((g=f.details)===null||g===void 0)?void 0:g.live,U=R?f.details.targetduration*2:L;if(p>0&&p<=U){this._trySkipBufferHole(null);return}}var Q=self.performance.now();if(n===null){this.stalled=Q;return}var j=Q-n;!B&&j>=P&&this._reportStall(E.len);var J=z.BufferHelper.bufferInfo(t,i,s.maxBufferHole);this._tryFixBufferStall(J,j)},o._tryFixBufferStall=function(A,s){var t=this.config,n=this.fragmentTracker,i=this.media,B=i.currentTime,w=n.getPartialFragment(B);if(w){var y=this._trySkipBufferHole(w);if(y)return}A.len>t.maxBufferHole&&s>t.highBufferWatchdogPeriod*1e3&&(G.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},o._reportStall=function(A){var s=this.hls,t=this.media,n=this.stallReported;n||(this.stallReported=!0,G.logger.warn("Playback stalling at @"+t.currentTime+" due to low buffer (buffer="+A+")"),s.trigger(I.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:A}))},o._trySkipBufferHole=function(A){for(var s=this.config,t=this.hls,n=this.media,i=n.currentTime,B=0,w=z.BufferHelper.getBuffered(n),y=0;y<w.length;y++){var x=w.start(y);if(i+s.maxBufferHole>=B&&i<x){var E=Math.max(x+_,n.currentTime+S);return G.logger.warn("skipping hole, adjusting currentTime from "+i+" to "+E),this.moved=!0,this.stalled=null,n.currentTime=E,A&&t.trigger(I.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+i+" to "+E,frag:A}),E}B=w.end(y)}return 0},o._tryNudgeBuffer=function(){var A=this.config,s=this.hls,t=this.media,n=t.currentTime,i=(this.nudgeRetry||0)+1;if(this.nudgeRetry=i,i<A.nudgeMaxRetry){var B=n+i*A.nudgeOffset;G.logger.warn("Nudging 'currentTime' from "+n+" to "+B),t.currentTime=B,s.trigger(I.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else G.logger.error("Playhead still not moving while enough data buffered @"+n+" after "+A.nudgeMaxRetry+" nudges"),s.trigger(I.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},u}()},"./src/controller/id3-track-controller.ts":function(ve,V,O){"use strict";O.r(V);var z=O("./src/events.ts"),D=O("./src/utils/texttrack-utils.ts"),I=O("./src/demux/id3.ts"),G=.25,P=function(){function L(_){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=_,this._registerListeners()}var S=L.prototype;return S.destroy=function(){this._unregisterListeners()},S._registerListeners=function(){var b=this.hls;b.on(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),b.on(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this),b.on(z.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),b.on(z.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},S._unregisterListeners=function(){var b=this.hls;b.off(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),b.off(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this),b.off(z.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),b.off(z.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},S.onMediaAttached=function(b,u){this.media=u.media},S.onMediaDetaching=function(){if(!this.id3Track)return;Object(D.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},S.getID3Track=function(b){if(!this.media)return;for(var u=0;u<b.length;u++){var o=b[u];if(o.kind==="metadata"&&o.label==="id3")return Object(D.sendAddTrackEvent)(o,this.media),o}return this.media.addTextTrack("metadata","id3")},S.onFragParsingMetadata=function(b,u){if(!this.media)return;var o=u.frag,r=u.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var A=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,s=0;s<r.length;s++){var t=I.getID3Frames(r[s].data);if(t){var n=r[s].pts,i=s<r.length-1?r[s+1].pts:o.end,B=i-n;B<=0&&(i=n+G);for(var w=0;w<t.length;w++){var y=t[w];if(!I.isTimeStampFrame(y)){var x=new A(n,i,"");x.value=y,this.id3Track.addCue(x)}}}}},S.onBufferFlushing=function(b,u){var o=u.startOffset,r=u.endOffset,A=u.type;if(!A||A==="audio"){var s=this.id3Track;s&&Object(D.removeCuesInRange)(s,o,r)}},L}();V.default=P},"./src/controller/latency-controller.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"default",function(){return L});var z=O("./src/errors.ts"),D=O("./src/events.ts"),I=O("./src/utils/logger.ts");function G(S,_){for(var b=0;b<_.length;b++){var u=_[b];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(S,u.key,u)}}function P(S,_,b){return _&&G(S.prototype,_),b&&G(S,b),S}var L=function(){function S(b){var u=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return u.timeupdate()},this.hls=b,this.config=b.config,this.registerListeners()}var _=S.prototype;return _.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},_.registerListeners=function(){this.hls.on(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(D.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(D.Events.ERROR,this.onError,this)},_.unregisterListeners=function(){this.hls.off(D.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(D.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(D.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(D.Events.ERROR,this.onError)},_.onMediaAttached=function(u,o){this.media=o.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},_.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},_.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},_.onLevelUpdated=function(u,o){var r=o.details;this.levelDetails=r,r.advanced&&this.timeupdate(),!r.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},_.onError=function(u,o){if(o.details!==z.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,I.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},_.timeupdate=function(){var u=this.media,o=this.levelDetails;if(!u||!o)return;this.currentTime=u.currentTime;var r=this.computeLatency();if(r===null)return;this._latency=r;var A=this.config,s=A.lowLatencyMode,t=A.maxLiveSyncPlaybackRate;if(!s||t===1)return;var n=this.targetLatency;if(n===null)return;var i=r-n,B=Math.min(this.maxLatency,n+o.targetduration),w=i<B;if(o.live&&w&&i>.05&&this.forwardBufferLength>1){var y=Math.min(2,Math.max(1,t)),x=Math.round(2/(1+Math.exp(-.75*i-this.edgeStalled))*20)/20;u.playbackRate=Math.min(y,Math.max(1,x))}else u.playbackRate!==1&&u.playbackRate!==0&&(u.playbackRate=1)},_.estimateLiveEdge=function(){var u=this.levelDetails;return u===null?null:u.edge+u.age},_.computeLatency=function(){var u=this.estimateLiveEdge();return u===null?null:u-this.currentTime},P(S,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var u=this.config,o=this.levelDetails;return u.liveMaxLatencyDuration!==void 0?u.liveMaxLatencyDuration:o?u.liveMaxLatencyDurationCount*o.targetduration:0}},{key:"targetLatency",get:function(){var u=this.levelDetails;if(u===null)return null;var o=u.holdBack,r=u.partHoldBack,A=u.targetduration,s=this.config,t=s.liveSyncDuration,n=s.liveSyncDurationCount,i=s.lowLatencyMode,B=this.hls.userConfig,w=i&&r||o;(B.liveSyncDuration||B.liveSyncDurationCount||w===0)&&(w=t!==void 0?t:n*A);var y=A,x=1;return w+Math.min(this.stallCount*x,y)}},{key:"liveSyncPosition",get:function(){var u=this.estimateLiveEdge(),o=this.targetLatency,r=this.levelDetails;if(u===null||o===null||r===null)return null;var A=r.edge,s=u-o-this.edgeStalled,t=A-r.totalduration,n=A-(this.config.lowLatencyMode&&r.partTarget||r.targetduration);return Math.min(Math.max(t,s),n)}},{key:"drift",get:function(){var u=this.levelDetails;return u===null?1:u.drift}},{key:"edgeStalled",get:function(){var u=this.levelDetails;if(u===null)return 0;var o=(this.config.lowLatencyMode&&u.partTarget||u.targetduration)*3;return Math.max(u.age-o,0)}},{key:"forwardBufferLength",get:function(){var u=this.media,o=this.levelDetails;if(!u||!o)return 0;var r=u.buffered.length;return r?u.buffered.end(r-1):o.edge-this.currentTime}}]),S}()},"./src/controller/level-controller.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"default",function(){return s});var z=O("./src/types/level.ts"),D=O("./src/events.ts"),I=O("./src/errors.ts"),G=O("./src/utils/codecs.ts"),P=O("./src/controller/level-helper.ts"),L=O("./src/controller/base-playlist-controller.ts"),S=O("./src/types/loader.ts");function _(){return _=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var B in i)Object.prototype.hasOwnProperty.call(i,B)&&(t[B]=i[B])}return t},_.apply(this,arguments)}function b(t,n){for(var i=0;i<n.length;i++){var B=n[i];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(t,B.key,B)}}function u(t,n,i){return n&&b(t.prototype,n),i&&b(t,i),t}function o(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n)}function r(t,n){return r=Object.setPrototypeOf||function(B,w){return B.__proto__=w,B},r(t,n)}var A=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),s=function(t){o(n,t);function n(B){var w;return w=t.call(this,B,"[level-controller]")||this,w._levels=[],w._firstLevel=-1,w._startLevel=void 0,w.currentLevelIndex=-1,w.manualLevelIndex=-1,w.onParsedComplete=void 0,w._registerListeners(),w}var i=n.prototype;return i._registerListeners=function(){var w=this.hls;w.on(D.Events.MANIFEST_LOADED,this.onManifestLoaded,this),w.on(D.Events.LEVEL_LOADED,this.onLevelLoaded,this),w.on(D.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),w.on(D.Events.FRAG_LOADED,this.onFragLoaded,this),w.on(D.Events.ERROR,this.onError,this)},i._unregisterListeners=function(){var w=this.hls;w.off(D.Events.MANIFEST_LOADED,this.onManifestLoaded,this),w.off(D.Events.LEVEL_LOADED,this.onLevelLoaded,this),w.off(D.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),w.off(D.Events.FRAG_LOADED,this.onFragLoaded,this),w.off(D.Events.ERROR,this.onError,this)},i.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,t.prototype.destroy.call(this)},i.startLoad=function(){var w=this._levels;w.forEach(function(y){y.loadError=0}),t.prototype.startLoad.call(this)},i.onManifestLoaded=function(w,y){var x=[],E=[],c=[],e,a={},l,g=!1,p=!1,f=!1;if(y.levels.forEach(function(j){var J=j.attrs;g=g||!!(j.width&&j.height),p=p||!!j.videoCodec,f=f||!!j.audioCodec,A&&j.audioCodec&&j.audioCodec.indexOf("mp4a.40.34")!==-1&&(j.audioCodec=void 0);var k=j.bitrate+"-"+j.attrs.RESOLUTION+"-"+j.attrs.CODECS;l=a[k],l?l.url.push(j.url):(l=new z.Level(j),a[k]=l,x.push(l)),J&&(J.AUDIO&&Object(P.addGroupId)(l,"audio",J.AUDIO),J.SUBTITLES&&Object(P.addGroupId)(l,"text",J.SUBTITLES))}),(g||p)&&f&&(x=x.filter(function(j){var J=j.videoCodec,k=j.width,Y=j.height;return!!J||!!(k&&Y)})),x=x.filter(function(j){var J=j.audioCodec,k=j.videoCodec;return(!J||Object(G.isCodecSupportedInMp4)(J,"audio"))&&(!k||Object(G.isCodecSupportedInMp4)(k,"video"))}),y.audioTracks&&(E=y.audioTracks.filter(function(j){return!j.audioCodec||Object(G.isCodecSupportedInMp4)(j.audioCodec,"audio")}),Object(P.assignTrackIdsByGroup)(E)),y.subtitles&&(c=y.subtitles,Object(P.assignTrackIdsByGroup)(c)),x.length>0){e=x[0].bitrate,x.sort(function(j,J){return j.bitrate-J.bitrate}),this._levels=x;for(var R=0;R<x.length;R++)if(x[R].bitrate===e){this._firstLevel=R,this.log("manifest loaded, "+x.length+" level(s) found, first bitrate: "+e);break}var U=f&&!p,Q={levels:x,audioTracks:E,subtitleTracks:c,firstLevel:this._firstLevel,stats:y.stats,audio:f,video:p,altAudio:!U&&E.some(function(j){return!!j.url})};this.hls.trigger(D.Events.MANIFEST_PARSED,Q),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(D.Events.ERROR,{type:I.ErrorTypes.MEDIA_ERROR,details:I.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:y.url,reason:"no level with compatible codecs found in manifest"})},i.onError=function(w,y){if(t.prototype.onError.call(this,w,y),y.fatal)return;var x=y.context,E=this._levels[this.currentLevelIndex];if(x&&(x.type===S.PlaylistContextType.AUDIO_TRACK&&E.audioGroupIds&&x.groupId===E.audioGroupIds[E.urlId]||x.type===S.PlaylistContextType.SUBTITLE_TRACK&&E.textGroupIds&&x.groupId===E.textGroupIds[E.urlId])){this.redundantFailover(this.currentLevelIndex);return}var c=!1,e=!0,a;switch(y.details){case I.ErrorDetails.FRAG_LOAD_ERROR:case I.ErrorDetails.FRAG_LOAD_TIMEOUT:case I.ErrorDetails.KEY_LOAD_ERROR:case I.ErrorDetails.KEY_LOAD_TIMEOUT:if(y.frag){var l=this._levels[y.frag.level];l?(l.fragmentError++,l.fragmentError>this.hls.config.fragLoadingMaxRetry&&(a=y.frag.level)):a=y.frag.level}break;case I.ErrorDetails.LEVEL_LOAD_ERROR:case I.ErrorDetails.LEVEL_LOAD_TIMEOUT:x&&(x.deliveryDirectives&&(e=!1),a=x.level),c=!0;break;case I.ErrorDetails.REMUX_ALLOC_ERROR:a=y.level,c=!0;break}a!==void 0&&this.recoverLevel(y,a,c,e)},i.recoverLevel=function(w,y,x,E){var c=w.details,e=this._levels[y];if(e.loadError++,x){var a=this.retryLoadingOrFail(w);if(a)w.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(E){var l=e.url.length;if(l>1&&e.loadError<l)w.levelRetry=!0,this.redundantFailover(y);else if(this.manualLevelIndex===-1){var g=y===0?this._levels.length-1:y-1;this.currentLevelIndex!==g&&this._levels[g].loadError===0&&(this.warn(c+": switch to "+g),w.levelRetry=!0,this.hls.nextAutoLevel=g)}}},i.redundantFailover=function(w){var y=this._levels[w],x=y.url.length;if(x>1){var E=(y.urlId+1)%x;this.warn("Switching to redundant URL-id "+E),this._levels.forEach(function(c){c.urlId=E}),this.level=w}},i.onFragLoaded=function(w,y){var x=y.frag;if(x!==void 0&&x.type===S.PlaylistLevelType.MAIN){var E=this._levels[x.level];E!==void 0&&(E.fragmentError=0,E.loadError=0)}},i.onLevelLoaded=function(w,y){var x,E=y.level,c=y.details,e=this._levels[E];if(!e){var a;this.warn("Invalid level index "+E),(a=y.deliveryDirectives)!==null&&a!==void 0&&a.skip&&(c.deltaUpdateFailed=!0);return}E===this.currentLevelIndex?(e.fragmentError===0&&(e.loadError=0,this.retryCount=0),this.playlistLoaded(E,y,e.details)):(x=y.deliveryDirectives)!==null&&x!==void 0&&x.skip&&(c.deltaUpdateFailed=!0)},i.onAudioTrackSwitched=function(w,y){var x=this.hls.levels[this.currentLevelIndex];if(!x)return;if(x.audioGroupIds){for(var E=-1,c=this.hls.audioTracks[y.id].groupId,e=0;e<x.audioGroupIds.length;e++)if(x.audioGroupIds[e]===c){E=e;break}E!==x.urlId&&(x.urlId=E,this.startLoad())}},i.loadPlaylist=function(w){var y=this.currentLevelIndex,x=this._levels[y];if(this.canLoad&&x&&x.url.length>0){var E=x.urlId,c=x.url[E];if(w)try{c=w.addDirectives(c)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("Attempt loading level index "+y+(w?" at sn "+w.msn+" part "+w.part:"")+" with URL-id "+E+" "+c),this.clearTimer(),this.hls.trigger(D.Events.LEVEL_LOADING,{url:c,level:y,id:E,deliveryDirectives:w||null})}},i.removeLevel=function(w,y){var x=function(e,a){return a!==y},E=this._levels.filter(function(c,e){return e!==w?!0:c.url.length>1&&y!==void 0?(c.url=c.url.filter(x),c.audioGroupIds&&(c.audioGroupIds=c.audioGroupIds.filter(x)),c.textGroupIds&&(c.textGroupIds=c.textGroupIds.filter(x)),c.urlId=0,!0):!1}).map(function(c,e){var a=c.details;return a!=null&&a.fragments&&a.fragments.forEach(function(l){l.level=e}),c});this._levels=E,this.hls.trigger(D.Events.LEVELS_UPDATED,{levels:E})},u(n,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(w){var y,x=this._levels;if(x.length===0)return;if(this.currentLevelIndex===w&&(y=x[w])!==null&&y!==void 0&&y.details)return;if(w<0||w>=x.length){var E=w<0;if(this.hls.trigger(D.Events.ERROR,{type:I.ErrorTypes.OTHER_ERROR,details:I.ErrorDetails.LEVEL_SWITCH_ERROR,level:w,fatal:E,reason:"invalid level idx"}),E)return;w=Math.min(w,x.length-1)}this.clearTimer();var c=this.currentLevelIndex,e=x[c],a=x[w];this.log("switching to level "+w+" from "+c),this.currentLevelIndex=w;var l=_({},a,{level:w,maxBitrate:a.maxBitrate,uri:a.uri,urlId:a.urlId});delete l._urlId,this.hls.trigger(D.Events.LEVEL_SWITCHING,l);var g=a.details;if(!g||g.live){var p=this.switchParams(a.uri,e==null?void 0:e.details);this.loadPlaylist(p)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(w){this.manualLevelIndex=w,this._startLevel===void 0&&(this._startLevel=w),w!==-1&&(this.level=w)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(w){this._firstLevel=w}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var w=this.hls.config.startLevel;return w!==void 0?w:this._firstLevel}else return this._startLevel},set:function(w){this._startLevel=w}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(w){this.level=w,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=w)}}]),n}(L.default)},"./src/controller/level-helper.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"addGroupId",function(){return I}),O.d(V,"assignTrackIdsByGroup",function(){return G}),O.d(V,"updatePTS",function(){return P}),O.d(V,"updateFragPTSDTS",function(){return S}),O.d(V,"mergeDetails",function(){return _}),O.d(V,"mapPartIntersection",function(){return b}),O.d(V,"mapFragmentIntersection",function(){return u}),O.d(V,"adjustSliding",function(){return o}),O.d(V,"addSliding",function(){return r}),O.d(V,"computeReloadInterval",function(){return A}),O.d(V,"getFragmentWithSN",function(){return s}),O.d(V,"getPartWith",function(){return t});var z=O("./src/polyfills/number.ts"),D=O("./src/utils/logger.ts");function I(n,i,B){switch(i){case"audio":n.audioGroupIds||(n.audioGroupIds=[]),n.audioGroupIds.push(B);break;case"text":n.textGroupIds||(n.textGroupIds=[]),n.textGroupIds.push(B);break}}function G(n){var i={};n.forEach(function(B){var w=B.groupId||"";B.id=i[w]=i[w]||0,i[w]++})}function P(n,i,B){var w=n[i],y=n[B];L(w,y)}function L(n,i){var B=i.startPTS;if(Object(z.isFiniteNumber)(B)){var w=0,y;i.sn>n.sn?(w=B-n.start,y=n):(w=n.start-B,y=i),y.duration!==w&&(y.duration=w)}else if(i.sn>n.sn){var x=n.cc===i.cc;x&&n.minEndPTS?i.start=n.start+(n.minEndPTS-n.start):i.start=n.start+n.duration}else i.start=Math.max(n.start-i.duration,0)}function S(n,i,B,w,y,x){var E=w-B;E<=0&&(D.logger.warn("Fragment should have a positive duration",i),w=B+i.duration,x=y+i.duration);var c=B,e=w,a=i.startPTS,l=i.endPTS;if(Object(z.isFiniteNumber)(a)){var g=Math.abs(a-B);Object(z.isFiniteNumber)(i.deltaPTS)?i.deltaPTS=Math.max(g,i.deltaPTS):i.deltaPTS=g,c=Math.max(B,a),B=Math.min(B,a),y=Math.min(y,i.startDTS),e=Math.min(w,l),w=Math.max(w,l),x=Math.max(x,i.endDTS)}i.duration=w-B;var p=B-i.start;i.appendedPTS=w,i.start=i.startPTS=B,i.maxStartPTS=c,i.startDTS=y,i.endPTS=w,i.minEndPTS=e,i.endDTS=x;var f=i.sn;if(!n||f<n.startSN||f>n.endSN)return 0;var R,U=f-n.startSN,Q=n.fragments;for(Q[U]=i,R=U;R>0;R--)L(Q[R],Q[R-1]);for(R=U;R<Q.length-1;R++)L(Q[R],Q[R+1]);return n.fragmentHint&&L(Q[Q.length-1],n.fragmentHint),n.PTSKnown=n.alignedSliding=!0,p}function _(n,i){for(var B=null,w=n.fragments,y=w.length-1;y>=0;y--){var x=w[y].initSegment;if(x){B=x;break}}n.fragmentHint&&delete n.fragmentHint.endPTS;var E=0,c;if(u(n,i,function(R,U){R.relurl&&(E=R.cc-U.cc),Object(z.isFiniteNumber)(R.startPTS)&&Object(z.isFiniteNumber)(R.endPTS)&&(U.start=U.startPTS=R.startPTS,U.startDTS=R.startDTS,U.appendedPTS=R.appendedPTS,U.maxStartPTS=R.maxStartPTS,U.endPTS=R.endPTS,U.endDTS=R.endDTS,U.minEndPTS=R.minEndPTS,U.duration=R.endPTS-R.startPTS,U.duration&&(c=U),i.PTSKnown=i.alignedSliding=!0),U.elementaryStreams=R.elementaryStreams,U.loader=R.loader,U.stats=R.stats,U.urlId=R.urlId,R.initSegment&&(U.initSegment=R.initSegment,B=R.initSegment)}),B){var e=i.fragmentHint?i.fragments.concat(i.fragmentHint):i.fragments;e.forEach(function(R){var U;(!R.initSegment||R.initSegment.relurl===((U=B)===null||U===void 0?void 0:U.relurl))&&(R.initSegment=B)})}if(i.skippedSegments&&(i.deltaUpdateFailed=i.fragments.some(function(R){return!R}),i.deltaUpdateFailed)){D.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var a=i.skippedSegments;a--;)i.fragments.shift();i.startSN=i.fragments[0].sn,i.startCC=i.fragments[0].cc}var l=i.fragments;if(E){D.logger.warn("discontinuity sliding from playlist, take drift into account");for(var g=0;g<l.length;g++)l[g].cc+=E}i.skippedSegments&&(i.startCC=i.fragments[0].cc),b(n.partList,i.partList,function(R,U){U.elementaryStreams=R.elementaryStreams,U.stats=R.stats}),c?S(i,c,c.startPTS,c.endPTS,c.startDTS,c.endDTS):o(n,i),l.length&&(i.totalduration=i.edge-l[0].start),i.driftStartTime=n.driftStartTime,i.driftStart=n.driftStart;var p=i.advancedDateTime;if(i.advanced&&p){var f=i.edge;i.driftStart||(i.driftStartTime=p,i.driftStart=f),i.driftEndTime=p,i.driftEnd=f}else i.driftEndTime=n.driftEndTime,i.driftEnd=n.driftEnd,i.advancedDateTime=n.advancedDateTime}function b(n,i,B){if(n&&i)for(var w=0,y=0,x=n.length;y<=x;y++){var E=n[y],c=i[y+w];E&&c&&E.index===c.index&&E.fragment.sn===c.fragment.sn?B(E,c):w--}}function u(n,i,B){for(var w=i.skippedSegments,y=Math.max(n.startSN,i.startSN)-i.startSN,x=(n.fragmentHint?1:0)+(w?i.endSN:Math.min(n.endSN,i.endSN))-i.startSN,E=i.startSN-n.startSN,c=i.fragmentHint?i.fragments.concat(i.fragmentHint):i.fragments,e=n.fragmentHint?n.fragments.concat(n.fragmentHint):n.fragments,a=y;a<=x;a++){var l=e[E+a],g=c[a];w&&!g&&a<w&&(g=i.fragments[a]=l),l&&g&&B(l,g)}}function o(n,i){var B=i.startSN+i.skippedSegments-n.startSN,w=n.fragments;if(B<0||B>=w.length)return;r(i,w[B].start)}function r(n,i){if(i){for(var B=n.fragments,w=n.skippedSegments;w<B.length;w++)B[w].start+=i;n.fragmentHint&&(n.fragmentHint.start+=i)}}function A(n,i){var B=1e3*n.levelTargetDuration,w=B/2,y=n.age,x=y>0&&y<B*3,E=i.loading.end-i.loading.start,c,e=n.availabilityDelay;if(n.updated===!1)if(x){var a=333*n.misses;c=Math.max(Math.min(w,E*2),a),n.availabilityDelay=(n.availabilityDelay||0)+c}else c=w;else x?(e=Math.min(e||B/2,y),n.availabilityDelay=e,c=e+B-y):c=B-E;return Math.round(c)}function s(n,i,B){if(!n||!n.details)return null;var w=n.details,y=w.fragments[i-w.startSN];return y||(y=w.fragmentHint,y&&y.sn===i?y:i<w.startSN&&B&&B.sn===i?B:null)}function t(n,i,B){if(!n||!n.details)return null;var w=n.details.partList;if(w)for(var y=w.length;y--;){var x=w[y];if(x.index===B&&x.fragment.sn===i)return x}return null}},"./src/controller/stream-controller.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"default",function(){return w});var z=O("./src/polyfills/number.ts"),D=O("./src/controller/base-stream-controller.ts"),I=O("./src/is-supported.ts"),G=O("./src/events.ts"),P=O("./src/utils/buffer-helper.ts"),L=O("./src/controller/fragment-tracker.ts"),S=O("./src/types/loader.ts"),_=O("./src/loader/fragment.ts"),b=O("./src/demux/transmuxer-interface.ts"),u=O("./src/types/transmuxer.ts"),o=O("./src/controller/gap-controller.ts"),r=O("./src/errors.ts"),A=O("./src/utils/logger.ts");function s(y,x){for(var E=0;E<x.length;E++){var c=x[E];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(y,c.key,c)}}function t(y,x,E){return x&&s(y.prototype,x),E&&s(y,E),y}function n(y,x){y.prototype=Object.create(x.prototype),y.prototype.constructor=y,i(y,x)}function i(y,x){return i=Object.setPrototypeOf||function(c,e){return c.__proto__=e,c},i(y,x)}var B=100,w=function(y){n(x,y);function x(c,e){var a;return a=y.call(this,c,e,"[stream-controller]")||this,a.audioCodecSwap=!1,a.gapController=null,a.level=-1,a._forceStartLoad=!1,a.altAudio=!1,a.audioOnly=!1,a.fragPlaying=null,a.onvplaying=null,a.onvseeked=null,a.fragLastKbps=0,a.stalled=!1,a.couldBacktrack=!1,a.audioCodecSwitch=!1,a.videoBuffer=null,a._registerListeners(),a}var E=x.prototype;return E._registerListeners=function(){var e=this.hls;e.on(G.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(G.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(G.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(G.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(G.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(G.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(G.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(G.Events.ERROR,this.onError,this),e.on(G.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(G.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(G.Events.BUFFER_CREATED,this.onBufferCreated,this),e.on(G.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(G.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(G.Events.FRAG_BUFFERED,this.onFragBuffered,this)},E._unregisterListeners=function(){var e=this.hls;e.off(G.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(G.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(G.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(G.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(G.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(G.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(G.Events.ERROR,this.onError,this),e.off(G.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(G.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(G.Events.BUFFER_CREATED,this.onBufferCreated,this),e.off(G.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(G.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(G.Events.FRAG_BUFFERED,this.onFragBuffered,this)},E.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},E.startLoad=function(e){if(this.levels){var a=this.lastCurrentTime,l=this.hls;if(this.stopLoad(),this.setInterval(B),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var g=l.startLevel;g===-1&&(l.config.testBandwidth?(g=0,this.bitrateTest=!0):g=l.nextAutoLevel),this.level=l.nextLoadLevel=g,this.loadedmetadata=!1}a>0&&e===-1&&(this.log("Override startPosition with lastCurrentTime @"+a.toFixed(3)),e=a),this.state=D.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=D.State.STOPPED},E.stopLoad=function(){this._forceStartLoad=!1,y.prototype.stopLoad.call(this)},E.doTick=function(){switch(this.state){case D.State.IDLE:this.doTickIdle();break;case D.State.WAITING_LEVEL:{var e,a=this.levels,l=this.level,g=a==null||((e=a[l])===null||e===void 0)?void 0:e.details;if(g&&(!g.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(g))break;this.state=D.State.IDLE;break}break}case D.State.FRAG_LOADING_WAITING_RETRY:{var p,f=self.performance.now(),R=this.retryDate;(!R||f>=R||(p=this.media)!==null&&p!==void 0&&p.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=D.State.IDLE)}break;default:break}this.onTickEnd()},E.onTickEnd=function(){y.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},E.doTickIdle=function(){var e,a,l=this.hls,g=this.levelLastLoaded,p=this.levels,f=this.media,R=l.config,U=l.nextLoadLevel;if(g===null||!f&&(this.startFragRequested||!R.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!p||!p[U])return;var Q=p[U];this.level=l.nextLoadLevel=U;var j=Q.details;if(!j||this.state===D.State.WAITING_LEVEL||j.live&&this.levelLastLoaded!==U){this.state=D.State.WAITING_LEVEL;return}var J=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:f,S.PlaylistLevelType.MAIN);if(J===null)return;var k=J.len,Y=this.getMaxBufferLength(Q.maxBitrate);if(k>=Y)return;if(this._streamEnded(J,j)){var ne={};this.altAudio&&(ne.type="video"),this.hls.trigger(G.Events.BUFFER_EOS,ne),this.state=D.State.ENDED;return}var me=J.end,_e=this.getNextFragment(me,j);if(this.couldBacktrack&&!this.fragPrevious&&_e&&_e.sn!=="initSegment"){var Oe=_e.sn-j.startSN;Oe>1&&(_e=j.fragments[Oe-1],this.fragmentTracker.removeFragment(_e))}if(_e&&this.fragmentTracker.getState(_e)===L.FragmentState.OK&&this.nextLoadPosition>me){var xe=this.audioOnly&&!this.altAudio?_.ElementaryStreamTypes.AUDIO:_.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(f,xe,S.PlaylistLevelType.MAIN),_e=this.getNextFragment(this.nextLoadPosition,j)}if(!_e)return;_e.initSegment&&!_e.initSegment.data&&!this.bitrateTest&&(_e=_e.initSegment),((e=_e.decryptdata)===null||e===void 0?void 0:e.keyFormat)==="identity"&&!((a=_e.decryptdata)!==null&&a!==void 0&&a.key)?this.loadKey(_e,j):this.loadFragment(_e,j,me)},E.loadFragment=function(e,a,l){var g,p=this.fragmentTracker.getState(e);if(this.fragCurrent=e,p===L.FragmentState.BACKTRACKED){var f=this.fragmentTracker.getBacktrackData(e);if(f){this._handleFragmentLoadProgress(f),this._handleFragmentLoadComplete(f);return}else p=L.FragmentState.NOT_LOADED}p===L.FragmentState.NOT_LOADED||p===L.FragmentState.PARTIAL?e.sn==="initSegment"?this._loadInitSegment(e):this.bitrateTest?(e.bitrateTest=!0,this.log("Fragment "+e.sn+" of level "+e.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(e)):(this.startFragRequested=!0,y.prototype.loadFragment.call(this,e,a,l)):p===L.FragmentState.APPENDING?this.reduceMaxBufferLength(e.duration)&&this.fragmentTracker.removeFragment(e):((g=this.media)===null||g===void 0?void 0:g.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},E.getAppendedFrag=function(e){var a=this.fragmentTracker.getAppendedFrag(e,S.PlaylistLevelType.MAIN);return a&&"fragment"in a?a.fragment:a},E.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,S.PlaylistLevelType.MAIN)},E.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.end+.5):null},E.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},E.nextLevelSwitch=function(){var e=this.levels,a=this.media;if(a!=null&&a.readyState){var l,g=this.getAppendedFrag(a.currentTime);if(g&&g.start>1&&this.flushMainBuffer(0,g.start-1),!a.paused&&e){var p=this.hls.nextLoadLevel,f=e[p],R=this.fragLastKbps;R&&this.fragCurrent?l=this.fragCurrent.duration*f.maxBitrate/(1e3*R)+1:l=0}else l=0;var U=this.getBufferedFrag(a.currentTime+l);if(U){var Q=this.followingBufferedFrag(U);if(Q){this.abortCurrentFrag();var j=Q.maxStartPTS?Q.maxStartPTS:Q.start,J=Q.duration,k=Math.max(U.end,j+Math.min(Math.max(J-this.config.maxFragLookUpTolerance,J*.5),J*.75));this.flushMainBuffer(k,Number.POSITIVE_INFINITY)}}}},E.abortCurrentFrag=function(){var e=this.fragCurrent;this.fragCurrent=null,e!=null&&e.loader&&e.loader.abort(),this.state===D.State.KEY_LOADING&&(this.state=D.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},E.flushMainBuffer=function(e,a){y.prototype.flushMainBuffer.call(this,e,a,this.altAudio?"video":null)},E.onMediaAttached=function(e,a){y.prototype.onMediaAttached.call(this,e,a);var l=a.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),l.addEventListener("playing",this.onvplaying),l.addEventListener("seeked",this.onvseeked),this.gapController=new o.default(this.config,l,this.fragmentTracker,this.hls)},E.onMediaDetaching=function(){var e=this.media;e&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),y.prototype.onMediaDetaching.call(this)},E.onMediaPlaying=function(){this.tick()},E.onMediaSeeked=function(){var e=this.media,a=e?e.currentTime:null;Object(z.isFiniteNumber)(a)&&this.log("Media seeked to "+a.toFixed(3)),this.tick()},E.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(G.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},E.onManifestParsed=function(e,a){var l=!1,g=!1,p;a.levels.forEach(function(f){p=f.audioCodec,p&&(p.indexOf("mp4a.40.2")!==-1&&(l=!0),p.indexOf("mp4a.40.5")!==-1&&(g=!0))}),this.audioCodecSwitch=l&&g&&!Object(I.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=a.levels,this.startFragRequested=!1},E.onLevelLoading=function(e,a){var l=this.levels;if(!l||this.state!==D.State.IDLE)return;var g=l[a.level];(!g.details||g.details.live&&this.levelLastLoaded!==a.level||this.waitForCdnTuneIn(g.details))&&(this.state=D.State.WAITING_LEVEL)},E.onLevelLoaded=function(e,a){var l,g=this.levels,p=a.level,f=a.details,R=f.totalduration;if(!g){this.warn("Levels were reset while loading level "+p);return}this.log("Level "+p+" loaded ["+f.startSN+","+f.endSN+"], cc ["+f.startCC+", "+f.endCC+"] duration:"+R);var U=this.fragCurrent;U&&(this.state===D.State.FRAG_LOADING||this.state===D.State.FRAG_LOADING_WAITING_RETRY)&&(U.level!==a.level&&U.loader&&(this.state=D.State.IDLE,U.loader.abort()));var Q=g[p],j=0;if(f.live||(l=Q.details)!==null&&l!==void 0&&l.live){if(f.fragments[0]||(f.deltaUpdateFailed=!0),f.deltaUpdateFailed)return;j=this.alignPlaylists(f,Q.details)}if(Q.details=f,this.levelLastLoaded=p,this.hls.trigger(G.Events.LEVEL_UPDATED,{details:f,level:p}),this.state===D.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(f))return;this.state=D.State.IDLE}this.startFragRequested?f.live&&this.synchronizeToLiveEdge(f):this.setStartPosition(f,j),this.tick()},E._handleFragmentLoadProgress=function(e){var a,l=e.frag,g=e.part,p=e.payload,f=this.levels;if(!f){this.warn("Levels were reset while fragment load was in progress. Fragment "+l.sn+" of level "+l.level+" will not be buffered");return}var R=f[l.level],U=R.details;if(!U){this.warn("Dropping fragment "+l.sn+" of level "+l.level+" after level details were reset");return}var Q=R.videoCodec,j=U.PTSKnown||!U.live,J=(a=l.initSegment)===null||a===void 0?void 0:a.data,k=this._getAudioCodec(R),Y=this.transmuxer=this.transmuxer||new b.default(this.hls,S.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),ne=g?g.index:-1,me=ne!==-1,_e=new u.ChunkMetadata(l.level,l.sn,l.stats.chunkCount,p.byteLength,ne,me),Oe=this.initPTS[l.cc];Y.push(p,J,k,Q,l,g,U.totalduration,j,_e,Oe)},E.onAudioTrackSwitching=function(e,a){var l=this.altAudio,g=!!a.url,p=a.id;if(!g){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var f=this.fragCurrent;f!=null&&f.loader&&(this.log("Switching to main audio track, cancel main fragment load"),f.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var R=this.hls;l&&R.trigger(G.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),R.trigger(G.Events.AUDIO_TRACK_SWITCHED,{id:p})}},E.onAudioTrackSwitched=function(e,a){var l=a.id,g=!!this.hls.audioTracks[l].url;if(g){var p=this.videoBuffer;p&&this.mediaBuffer!==p&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=p)}this.altAudio=g,this.tick()},E.onBufferCreated=function(e,a){var l=a.tracks,g,p,f=!1;for(var R in l){var U=l[R];if(U.id==="main"){if(p=R,g=U,R==="video"){var Q=l[R];Q&&(this.videoBuffer=Q.buffer)}}else f=!0}f&&g?(this.log("Alternate track found, use "+p+".buffered to schedule main fragment loading"),this.mediaBuffer=g.buffer):this.mediaBuffer=this.media},E.onFragBuffered=function(e,a){var l=a.frag,g=a.part;if(l&&l.type!==S.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(l)){this.warn("Fragment "+l.sn+(g?" p: "+g.index:"")+" of level "+l.level+" finished buffering, but was aborted. state: "+this.state),this.state===D.State.PARSED&&(this.state=D.State.IDLE);return}var p=g?g.stats:l.stats;this.fragLastKbps=Math.round(8*p.total/(p.buffering.end-p.loading.first)),l.sn!=="initSegment"&&(this.fragPrevious=l),this.fragBufferedComplete(l,g)},E.onError=function(e,a){switch(a.details){case r.ErrorDetails.FRAG_LOAD_ERROR:case r.ErrorDetails.FRAG_LOAD_TIMEOUT:case r.ErrorDetails.KEY_LOAD_ERROR:case r.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(S.PlaylistLevelType.MAIN,a);break;case r.ErrorDetails.LEVEL_LOAD_ERROR:case r.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==D.State.ERROR&&(a.fatal?(this.warn(""+a.details),this.state=D.State.ERROR):!a.levelRetry&&this.state===D.State.WAITING_LEVEL&&(this.state=D.State.IDLE));break;case r.ErrorDetails.BUFFER_FULL_ERROR:if(a.parent==="main"&&(this.state===D.State.PARSING||this.state===D.State.PARSED)){var l=!0,g=this.getFwdBufferInfo(this.media,S.PlaylistLevelType.MAIN);g&&g.len>.5&&(l=!this.reduceMaxBufferLength(g.len)),l&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},E.checkBuffer=function(){var e=this.media,a=this.gapController;if(!e||!a||!e.readyState)return;var l=P.BufferHelper.getBuffered(e);!this.loadedmetadata&&l.length?(this.loadedmetadata=!0,this.seekToStartPos()):a.poll(this.lastCurrentTime),this.lastCurrentTime=e.currentTime},E.onFragLoadEmergencyAborted=function(){this.state=D.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},E.onBufferFlushed=function(e,a){var l=a.type;if(l!==_.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var g=(l===_.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(g,l,S.PlaylistLevelType.MAIN)}},E.onLevelsUpdated=function(e,a){this.levels=a.levels},E.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},E.seekToStartPos=function(){var e=this.media,a=e.currentTime,l=this.startPosition;if(l>=0&&a<l){if(e.seeking){A.logger.log("could not seek to "+l+", already seeking at "+a);return}var g=P.BufferHelper.getBuffered(e),p=g.length?g.start(0):0,f=p-l;f>0&&(f<this.config.maxBufferHole||f<this.config.maxFragLookUpTolerance)&&(A.logger.log("adjusting start position by "+f+" to match buffer start"),l+=f,this.startPosition=l),this.log("seek to target start position "+l+" from current time "+a),e.currentTime=l}},E._getAudioCodec=function(e){var a=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&a&&(this.log("Swapping audio codec"),a.indexOf("mp4a.40.5")!==-1?a="mp4a.40.2":a="mp4a.40.5"),a},E._loadBitrateTestFrag=function(e){var a=this;this._doFragLoad(e).then(function(l){var g=a.hls;if(!l||g.nextLoadLevel||a.fragContextChanged(e))return;a.fragLoadError=0,a.state=D.State.IDLE,a.startFragRequested=!1,a.bitrateTest=!1;var p=e.stats;p.parsing.start=p.parsing.end=p.buffering.start=p.buffering.end=self.performance.now(),g.trigger(G.Events.FRAG_LOADED,l)})},E._handleTransmuxComplete=function(e){var a,l="main",g=this.hls,p=e.remuxResult,f=e.chunkMeta,R=this.getCurrentContext(f);if(!R){this.warn("The loading context changed while buffering fragment "+f.sn+" of level "+f.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(f.level);return}var U=R.frag,Q=R.part,j=R.level,J=p.video,k=p.text,Y=p.id3,ne=p.initSegment,me=this.altAudio?void 0:p.audio;if(this.fragContextChanged(U))return;if(this.state=D.State.PARSING,ne){ne.tracks&&(this._bufferInitSegment(j,ne.tracks,U,f),g.trigger(G.Events.FRAG_PARSING_INIT_SEGMENT,{frag:U,id:l,tracks:ne.tracks}));var _e=ne.initPTS,Oe=ne.timescale;Object(z.isFiniteNumber)(_e)&&(this.initPTS[U.cc]=_e,g.trigger(G.Events.INIT_PTS_FOUND,{frag:U,id:l,initPTS:_e,timescale:Oe}))}if(J&&p.independent!==!1){if(j.details){var xe=J.startPTS,Se=J.endPTS,Fe=J.startDTS,Pe=J.endDTS;if(Q)Q.elementaryStreams[J.type]={startPTS:xe,endPTS:Se,startDTS:Fe,endDTS:Pe};else if(J.firstKeyFrame&&J.independent&&(this.couldBacktrack=!0),J.dropped&&J.independent){var Ee=this.getLoadPosition()+this.config.maxBufferHole;if(Ee<xe){this.backtrack(U);return}U.setElementaryStreamInfo(J.type,U.start,Se,U.start,Pe,!0)}U.setElementaryStreamInfo(J.type,xe,Se,Fe,Pe),this.bufferFragmentData(J,U,Q,f)}}else if(p.independent===!1){this.backtrack(U);return}if(me){var he=me.startPTS,Ge=me.endPTS,lt=me.startDTS,at=me.endDTS;Q&&(Q.elementaryStreams[_.ElementaryStreamTypes.AUDIO]={startPTS:he,endPTS:Ge,startDTS:lt,endDTS:at}),U.setElementaryStreamInfo(_.ElementaryStreamTypes.AUDIO,he,Ge,lt,at),this.bufferFragmentData(me,U,Q,f)}if(Y!=null&&(a=Y.samples)!==null&&a!==void 0&&a.length){var je={frag:U,id:l,samples:Y.samples};g.trigger(G.Events.FRAG_PARSING_METADATA,je)}if(k){var it={frag:U,id:l,samples:k.samples};g.trigger(G.Events.FRAG_PARSING_USERDATA,it)}},E._bufferInitSegment=function(e,a,l,g){var p=this;if(this.state!==D.State.PARSING)return;this.audioOnly=!!a.audio&&!a.video,this.altAudio&&!this.audioOnly&&delete a.audio;var f=a.audio,R=a.video,U=a.audiovideo;if(f){var Q=e.audioCodec,j=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(Q&&(Q.indexOf("mp4a.40.5")!==-1?Q="mp4a.40.2":Q="mp4a.40.5"),f.metadata.channelCount!==1&&j.indexOf("firefox")===-1&&(Q="mp4a.40.5")),j.indexOf("android")!==-1&&f.container!=="audio/mpeg"&&(Q="mp4a.40.2",this.log("Android: force audio codec to "+Q)),e.audioCodec&&e.audioCodec!==Q&&this.log('Swapping manifest audio codec "'+e.audioCodec+'" for "'+Q+'"'),f.levelCodec=Q,f.id="main",this.log("Init audio buffer, container:"+f.container+", codecs[selected/level/parsed]=["+(Q||"")+"/"+(e.audioCodec||"")+"/"+f.codec+"]")}R&&(R.levelCodec=e.videoCodec,R.id="main",this.log("Init video buffer, container:"+R.container+", codecs[level/parsed]=["+(e.videoCodec||"")+"/"+R.codec+"]")),U&&this.log("Init audiovideo buffer, container:"+U.container+", codecs[level/parsed]=["+(e.attrs.CODECS||"")+"/"+U.codec+"]"),this.hls.trigger(G.Events.BUFFER_CODECS,a),Object.keys(a).forEach(function(J){var k=a[J],Y=k.initSegment;Y!=null&&Y.byteLength&&p.hls.trigger(G.Events.BUFFER_APPENDING,{type:J,data:Y,frag:l,part:null,chunkMeta:g,parent:l.type})}),this.tick()},E.backtrack=function(e){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(e);var a=this.fragmentTracker.backtrack(e);this.fragPrevious=null,this.nextLoadPosition=e.start,a?this.resetFragmentLoading(e):this.state=D.State.BACKTRACKING},E.checkFragmentChanged=function(){var e=this.media,a=null;if(e&&e.readyState>1&&e.seeking===!1){var l=e.currentTime;if(P.BufferHelper.isBuffered(e,l)?a=this.getAppendedFrag(l):P.BufferHelper.isBuffered(e,l+.1)&&(a=this.getAppendedFrag(l+.1)),a){var g=this.fragPlaying,p=a.level;(!g||a.sn!==g.sn||g.level!==p||a.urlId!==g.urlId)&&(this.hls.trigger(G.Events.FRAG_CHANGED,{frag:a}),(!g||g.level!==p)&&this.hls.trigger(G.Events.LEVEL_SWITCHED,{level:p}),this.fragPlaying=a)}}},t(x,[{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"currentLevel",get:function(){var e=this.media;if(e){var a=this.getAppendedFrag(e.currentTime);if(a)return a.level}return-1}},{key:"nextBufferedFrag",get:function(){var e=this.media;if(e){var a=this.getAppendedFrag(e.currentTime);return this.followingBufferedFrag(a)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),x}(D.default)},"./src/controller/subtitle-stream-controller.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"SubtitleStreamController",function(){return n});var z=O("./src/events.ts"),D=O("./src/utils/logger.ts"),I=O("./src/utils/buffer-helper.ts"),G=O("./src/controller/fragment-finders.ts"),P=O("./src/utils/discontinuities.ts"),L=O("./src/controller/level-helper.ts"),S=O("./src/controller/fragment-tracker.ts"),_=O("./src/controller/base-stream-controller.ts"),b=O("./src/types/loader.ts"),u=O("./src/types/level.ts");function o(i,B){for(var w=0;w<B.length;w++){var y=B[w];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(i,y.key,y)}}function r(i,B,w){return B&&o(i.prototype,B),w&&o(i,w),i}function A(i,B){i.prototype=Object.create(B.prototype),i.prototype.constructor=i,s(i,B)}function s(i,B){return s=Object.setPrototypeOf||function(y,x){return y.__proto__=x,y},s(i,B)}var t=500,n=function(i){A(B,i);function B(y,x){var E;return E=i.call(this,y,x,"[subtitle-stream-controller]")||this,E.levels=[],E.currentTrackId=-1,E.tracksBuffered=[],E.mainDetails=null,E._registerListeners(),E}var w=B.prototype;return w.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},w._registerListeners=function(){var x=this.hls;x.on(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.on(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.on(z.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.on(z.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.on(z.Events.ERROR,this.onError,this),x.on(z.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),x.on(z.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),x.on(z.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),x.on(z.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),x.on(z.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},w._unregisterListeners=function(){var x=this.hls;x.off(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.off(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.off(z.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.off(z.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.off(z.Events.ERROR,this.onError,this),x.off(z.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),x.off(z.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),x.off(z.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),x.off(z.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),x.off(z.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},w.startLoad=function(){this.stopLoad(),this.state=_.State.IDLE,this.setInterval(t),this.tick()},w.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},w.onLevelLoaded=function(x,E){this.mainDetails=E.details},w.onSubtitleFragProcessed=function(x,E){var c=E.frag,e=E.success;if(this.fragPrevious=c,this.state=_.State.IDLE,!e)return;var a=this.tracksBuffered[this.currentTrackId];if(!a)return;for(var l,g=c.start,p=0;p<a.length;p++)if(g>=a[p].start&&g<=a[p].end){l=a[p];break}var f=c.start+c.duration;l?l.end=f:(l={start:g,end:f},a.push(l)),this.fragmentTracker.fragBuffered(c)},w.onBufferFlushing=function(x,E){var c=E.startOffset,e=E.endOffset;if(c===0&&e!==Number.POSITIVE_INFINITY){var a=this.currentTrackId,l=this.levels;if(!l.length||!l[a]||!l[a].details)return;var g=l[a].details,p=g.targetduration,f=e-p;if(f<=0)return;E.endOffsetSubtitles=Math.max(0,f),this.tracksBuffered.forEach(function(R){for(var U=0;U<R.length;){if(R[U].end<=f){R.shift();continue}else if(R[U].start<f)R[U].start=f;else break;U++}}),this.fragmentTracker.removeFragmentsInRange(c,f,b.PlaylistLevelType.SUBTITLE)}},w.onError=function(x,E){var c,e=E.frag;if(!e||e.type!==b.PlaylistLevelType.SUBTITLE)return;(c=this.fragCurrent)!==null&&c!==void 0&&c.loader&&this.fragCurrent.loader.abort(),this.state=_.State.IDLE},w.onSubtitleTracksUpdated=function(x,E){var c=this,e=E.subtitleTracks;this.tracksBuffered=[],this.levels=e.map(function(a){return new u.Level(a)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(a){c.tracksBuffered[a.id]=[]}),this.mediaBuffer=null},w.onSubtitleTrackSwitch=function(x,E){if(this.currentTrackId=E.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var c=this.levels[this.currentTrackId];c!=null&&c.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,c&&this.setInterval(t)},w.onSubtitleTrackLoaded=function(x,E){var c,e=E.details,a=E.id,l=this.currentTrackId,g=this.levels;if(!g.length)return;var p=g[l];if(a>=g.length||a!==l||!p)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,e.live||(c=p.details)!==null&&c!==void 0&&c.live){var f=this.mainDetails;if(e.deltaUpdateFailed||!f)return;var R=f.fragments[0];if(!p.details)e.hasProgramDateTime&&f.hasProgramDateTime?Object(P.alignMediaPlaylistByPDT)(e,f):R&&Object(L.addSliding)(e,R.start);else{var U=this.alignPlaylists(e,p.details);U===0&&R&&Object(L.addSliding)(e,R.start)}}if(p.details=e,this.levelLastLoaded=a,this.tick(),e.live&&!this.fragCurrent&&this.media&&this.state===_.State.IDLE){var Q=Object(G.findFragmentByPTS)(null,e.fragments,this.media.currentTime,0);Q||(this.warn("Subtitle playlist not aligned with playback"),p.details=void 0)}},w._handleFragmentLoadComplete=function(x){var E=x.frag,c=x.payload,e=E.decryptdata,a=this.hls;if(this.fragContextChanged(E))return;if(c&&c.byteLength>0&&e&&e.key&&e.iv&&e.method==="AES-128"){var l=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(c),e.key.buffer,e.iv.buffer).then(function(g){var p=performance.now();a.trigger(z.Events.FRAG_DECRYPTED,{frag:E,payload:g,stats:{tstart:l,tdecrypt:p}})})}},w.doTick=function(){if(!this.media){this.state=_.State.IDLE;return}if(this.state===_.State.IDLE){var x,E=this.currentTrackId,c=this.levels;if(!c.length||!c[E]||!c[E].details)return;var e=c[E].details,a=e.targetduration,l=this.config,g=this.media,p=I.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,g.currentTime-a,l.maxBufferHole),f=p.end,R=p.len,U=this.getMaxBufferLength()+a;if(R>U)return;console.assert(e,"Subtitle track details are defined on idle subtitle stream controller tick");var Q=e.fragments,j=Q.length,J=e.edge,k,Y=this.fragPrevious;if(f<J){var ne=l.maxFragLookUpTolerance;Y&&e.hasProgramDateTime&&(k=Object(G.findFragmentByPDT)(Q,Y.endProgramDateTime,ne)),k||(k=Object(G.findFragmentByPTS)(Y,Q,f,ne),!k&&Y&&Y.start<Q[0].start&&(k=Q[0]))}else k=Q[j-1];(x=k)!==null&&x!==void 0&&x.encrypted?(D.logger.log("Loading key for "+k.sn),this.state=_.State.KEY_LOADING,this.hls.trigger(z.Events.KEY_LOADING,{frag:k})):k&&this.fragmentTracker.getState(k)===S.FragmentState.NOT_LOADED&&this.loadFragment(k,e,f)}},w.loadFragment=function(x,E,c){this.fragCurrent=x,i.prototype.loadFragment.call(this,x,E,c)},r(B,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),B}(_.default)},"./src/controller/subtitle-track-controller.ts":function(ve,V,O){"use strict";O.r(V);var z=O("./src/events.ts"),D=O("./src/utils/texttrack-utils.ts"),I=O("./src/controller/base-playlist-controller.ts"),G=O("./src/types/loader.ts");function P(o,r){for(var A=0;A<r.length;A++){var s=r[A];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(o,s.key,s)}}function L(o,r,A){return r&&P(o.prototype,r),A&&P(o,A),o}function S(o,r){o.prototype=Object.create(r.prototype),o.prototype.constructor=o,_(o,r)}function _(o,r){return _=Object.setPrototypeOf||function(s,t){return s.__proto__=t,s},_(o,r)}var b=function(o){S(r,o);function r(s){var t;return t=o.call(this,s,"[subtitle-track-controller]")||this,t.media=null,t.tracks=[],t.groupId=null,t.tracksInGroup=[],t.trackId=-1,t.selectDefaultTrack=!0,t.queuedDefaultTrack=-1,t.trackChangeListener=function(){return t.onTextTracksChanged()},t.asyncPollTrackChange=function(){return t.pollTrackChange(0)},t.useTextTrackPolling=!1,t.subtitlePollingInterval=-1,t.subtitleDisplay=!0,t.registerListeners(),t}var A=r.prototype;return A.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,o.prototype.destroy.call(this)},A.registerListeners=function(){var t=this.hls;t.on(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(z.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(z.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.on(z.Events.LEVEL_LOADING,this.onLevelLoading,this),t.on(z.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),t.on(z.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.on(z.Events.ERROR,this.onError,this)},A.unregisterListeners=function(){var t=this.hls;t.off(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(z.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(z.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.off(z.Events.LEVEL_LOADING,this.onLevelLoading,this),t.off(z.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),t.off(z.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.off(z.Events.ERROR,this.onError,this)},A.onMediaAttached=function(t,n){if(this.media=n.media,!this.media)return;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)},A.pollTrackChange=function(t){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,t)},A.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var t=u(this.media.textTracks);t.forEach(function(n){Object(D.clearCurrentCues)(n)}),this.subtitleTrack=-1,this.media=null},A.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},A.onManifestParsed=function(t,n){this.tracks=n.subtitleTracks},A.onSubtitleTrackLoaded=function(t,n){var i=n.id,B=n.details,w=this.trackId,y=this.tracksInGroup[w];if(!y){this.warn("Invalid subtitle track id "+i);return}var x=y.details;y.details=n.details,this.log("subtitle track "+i+" loaded ["+B.startSN+"-"+B.endSN+"]"),i===this.trackId&&(this.retryCount=0,this.playlistLoaded(i,n,x))},A.onLevelLoading=function(t,n){this.switchLevel(n.level)},A.onLevelSwitching=function(t,n){this.switchLevel(n.level)},A.switchLevel=function(t){var n=this.hls.levels[t];if(!(n!=null&&n.textGroupIds))return;var i=n.textGroupIds[n.urlId];if(this.groupId!==i){var B=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,w=this.tracks.filter(function(E){return!i||E.groupId===i});this.tracksInGroup=w;var y=this.findTrackId(B==null?void 0:B.name)||this.findTrackId();this.groupId=i;var x={subtitleTracks:w};this.log("Updating subtitle tracks, "+w.length+' track(s) found in "'+i+'" group-id'),this.hls.trigger(z.Events.SUBTITLE_TRACKS_UPDATED,x),y!==-1&&this.setSubtitleTrack(y,B)}},A.findTrackId=function(t){for(var n=this.tracksInGroup,i=0;i<n.length;i++){var B=n[i];if((!this.selectDefaultTrack||B.default)&&(!t||t===B.name))return B.id}return-1},A.onError=function(t,n){if(o.prototype.onError.call(this,t,n),n.fatal||!n.context)return;n.context.type===G.PlaylistContextType.SUBTITLE_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},A.loadPlaylist=function(t){var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var i=n.id,B=n.groupId,w=n.url;if(t)try{w=t.addDirectives(w)}catch(y){this.warn("Could not construct new URL with HLS Delivery Directives: "+y)}this.log("Loading subtitle playlist for id "+i),this.hls.trigger(z.Events.SUBTITLE_TRACK_LOADING,{url:w,id:i,groupId:B,deliveryDirectives:t||null})}},A.toggleTrackModes=function(t){var n=this,i=this.media,B=this.subtitleDisplay,w=this.trackId;if(!i)return;var y=u(i.textTracks),x=y.filter(function(e){return e.groupId===n.groupId});if(t===-1)[].slice.call(y).forEach(function(e){e.mode="disabled"});else{var E=x[w];E&&(E.mode="disabled")}var c=x[t];c&&(c.mode=B?"showing":"hidden")},A.setSubtitleTrack=function(t,n){var i,B=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=t;return}if(this.trackId!==t&&this.toggleTrackModes(t),this.trackId===t&&(t===-1||(i=B[t])!==null&&i!==void 0&&i.details)||t<-1||t>=B.length)return;this.clearTimer();var w=B[t];if(this.log("Switching to subtitle track "+t),this.trackId=t,w){var y=w.id,x=w.groupId,E=x===void 0?"":x,c=w.name,e=w.type,a=w.url;this.hls.trigger(z.Events.SUBTITLE_TRACK_SWITCH,{id:y,groupId:E,name:c,type:e,url:a});var l=this.switchParams(w.url,n==null?void 0:n.details);this.loadPlaylist(l)}else this.hls.trigger(z.Events.SUBTITLE_TRACK_SWITCH,{id:t})},A.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var t=-1,n=u(this.media.textTracks),i=0;i<n.length;i++)if(n[i].mode==="hidden")t=i;else if(n[i].mode==="showing"){t=i;break}this.subtitleTrack!==t&&(this.subtitleTrack=t)},L(r,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(t){this.selectDefaultTrack=!1;var n=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(t,n)}}]),r}(I.default);function u(o){for(var r=[],A=0;A<o.length;A++){var s=o[A];s.kind==="subtitles"&&s.label&&r.push(o[A])}return r}V.default=b},"./src/controller/timeline-controller.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"TimelineController",function(){return u});var z=O("./src/polyfills/number.ts"),D=O("./src/events.ts"),I=O("./src/utils/cea-608-parser.ts"),G=O("./src/utils/output-filter.ts"),P=O("./src/utils/webvtt-parser.ts"),L=O("./src/utils/texttrack-utils.ts"),S=O("./src/utils/imsc1-ttml-parser.ts"),_=O("./src/types/loader.ts"),b=O("./src/utils/logger.ts"),u=function(){function s(n){if(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.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=A(),this.captionsProperties=void 0,this.hls=n,this.config=n.config,this.Cues=n.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}},this.config.enableCEA708Captions){var i=new G.default(this,"textTrack1"),B=new G.default(this,"textTrack2"),w=new G.default(this,"textTrack3"),y=new G.default(this,"textTrack4");this.cea608Parser1=new I.default(1,i,B),this.cea608Parser2=new I.default(3,w,y)}n.on(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(D.Events.MANIFEST_LOADED,this.onManifestLoaded,this),n.on(D.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),n.on(D.Events.FRAG_LOADING,this.onFragLoading,this),n.on(D.Events.FRAG_LOADED,this.onFragLoaded,this),n.on(D.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),n.on(D.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),n.on(D.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),n.on(D.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),n.on(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var t=s.prototype;return t.destroy=function(){var i=this.hls;i.off(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.off(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.off(D.Events.MANIFEST_LOADED,this.onManifestLoaded,this),i.off(D.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),i.off(D.Events.FRAG_LOADING,this.onFragLoading,this),i.off(D.Events.FRAG_LOADED,this.onFragLoaded,this),i.off(D.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),i.off(D.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),i.off(D.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),i.off(D.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),i.off(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},t.addCues=function(i,B,w,y,x){for(var E=!1,c=x.length;c--;){var e=x[c],a=r(e[0],e[1],B,w);if(a>=0&&(e[0]=Math.min(e[0],B),e[1]=Math.max(e[1],w),E=!0,a/(w-B)>.5))return}if(E||x.push([B,w]),this.config.renderTextTracksNatively){var l=this.captionsTracks[i];this.Cues.newCue(l,B,w,y)}else{var g=this.Cues.newCue(null,B,w,y);this.hls.trigger(D.Events.CUES_PARSED,{type:"captions",cues:g,track:i})}},t.onInitPtsFound=function(i,B){var w=this,y=B.frag,x=B.id,E=B.initPTS,c=B.timescale,e=this.unparsedVttFrags;x==="main"&&(this.initPTS[y.cc]=E,this.timescale[y.cc]=c),e.length&&(this.unparsedVttFrags=[],e.forEach(function(a){w.onFragLoaded(D.Events.FRAG_LOADED,a)}))},t.getExistingTrack=function(i){var B=this.media;if(B)for(var w=0;w<B.textTracks.length;w++){var y=B.textTracks[w];if(y[i])return y}return null},t.createCaptionsTrack=function(i){this.config.renderTextTracksNatively?this.createNativeTrack(i):this.createNonNativeTrack(i)},t.createNativeTrack=function(i){if(this.captionsTracks[i])return;var B=this.captionsProperties,w=this.captionsTracks,y=this.media,x=B[i],E=x.label,c=x.languageCode,e=this.getExistingTrack(i);if(e)w[i]=e,Object(L.clearCurrentCues)(w[i]),Object(L.sendAddTrackEvent)(w[i],y);else{var a=this.createTextTrack("captions",E,c);a&&(a[i]=!0,w[i]=a)}},t.createNonNativeTrack=function(i){if(this.nonNativeCaptionsTracks[i])return;var B=this.captionsProperties[i];if(!B)return;var w=B.label,y={_id:i,label:w,kind:"captions",default:B.media?!!B.media.default:!1,closedCaptions:B.media};this.nonNativeCaptionsTracks[i]=y,this.hls.trigger(D.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[y]})},t.createTextTrack=function(i,B,w){var y=this.media;return y?y.addTextTrack(i,B,w):void 0},t.onMediaAttaching=function(i,B){this.media=B.media,this._cleanTracks()},t.onMediaDetaching=function(){var i=this.captionsTracks;Object.keys(i).forEach(function(B){Object(L.clearCurrentCues)(i[B]),delete i[B]}),this.nonNativeCaptionsTracks={}},t.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=A(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},t._cleanTracks=function(){var i=this.media;if(!i)return;var B=i.textTracks;if(B)for(var w=0;w<B.length;w++)Object(L.clearCurrentCues)(B[w])},t.onSubtitleTracksUpdated=function(i,B){var w=this;this.textTracks=[];var y=B.subtitleTracks||[],x=y.some(function(a){return a.textCodec===S.IMSC1_CODEC});if(this.config.enableWebVTT||x&&this.config.enableIMSC1){var E=this.tracks&&y&&this.tracks.length===y.length;if(this.tracks=y||[],this.config.renderTextTracksNatively){var c=this.media?this.media.textTracks:[];this.tracks.forEach(function(a,l){var g;if(l<c.length){for(var p=null,f=0;f<c.length;f++)if(o(c[f],a)){p=c[f];break}p&&(g=p)}g?Object(L.clearCurrentCues)(g):(g=w.createTextTrack("subtitles",a.name,a.lang),g&&(g.mode="disabled")),g&&(g.groupId=a.groupId,w.textTracks.push(g))})}else if(!E&&this.tracks&&this.tracks.length){var e=this.tracks.map(function(a){return{label:a.name,kind:a.type.toLowerCase(),default:a.default,subtitleTrack:a}});this.hls.trigger(D.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:e})}}},t.onManifestLoaded=function(i,B){var w=this;this.config.enableCEA708Captions&&B.captions&&B.captions.forEach(function(y){var x=/(?:CC|SERVICE)([1-4])/.exec(y.instreamId);if(!x)return;var E="textTrack"+x[1],c=w.captionsProperties[E];if(!c)return;c.label=y.name,y.lang&&(c.languageCode=y.lang),c.media=y})},t.onFragLoading=function(i,B){var w=this.cea608Parser1,y=this.cea608Parser2,x=this.lastSn,E=this.lastPartIndex;if(!this.enabled||!(w&&y))return;if(B.frag.type===_.PlaylistLevelType.MAIN){var c,e,a=B.frag.sn,l=(c=B==null||((e=B.part)===null||e===void 0)?void 0:e.index)!=null?c:-1;a===x+1||a===x&&l===E+1||(w.reset(),y.reset()),this.lastSn=a,this.lastPartIndex=l}},t.onFragLoaded=function(i,B){var w=B.frag,y=B.payload,x=this.initPTS,E=this.unparsedVttFrags;if(w.type===_.PlaylistLevelType.SUBTITLE)if(y.byteLength){if(!Object(z.isFiniteNumber)(x[w.cc])){E.push(B),x.length&&this.hls.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:w,error:new Error("Missing initial subtitle PTS")});return}var c=w.decryptdata;if(c==null||c.key==null||c.method!=="AES-128"){var e=this.tracks[w.level],a=this.vttCCs;a[w.cc]||(a[w.cc]={start:w.start,prevCC:this.prevCC,new:!0},this.prevCC=w.cc),e&&e.textCodec===S.IMSC1_CODEC?this._parseIMSC1(w,y):this._parseVTTs(w,y,a)}}else this.hls.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:w,error:new Error("Empty subtitle payload")})},t._parseIMSC1=function(i,B){var w=this,y=this.hls;Object(S.parseIMSC1)(B,this.initPTS[i.cc],this.timescale[i.cc],function(x){w._appendCues(x,i.level),y.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:i})},function(x){b.logger.log("Failed to parse IMSC1: "+x),y.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:x})})},t._parseVTTs=function(i,B,w){var y=this,x=this.hls;Object(P.parseWebVTT)(B,this.initPTS[i.cc],this.timescale[i.cc],w,i.cc,i.start,function(E){y._appendCues(E,i.level),x.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:i})},function(E){y._fallbackToIMSC1(i,B),b.logger.log("Failed to parse VTT cue: "+E),x.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:E})})},t._fallbackToIMSC1=function(i,B){var w=this,y=this.tracks[i.level];y.textCodec||Object(S.parseIMSC1)(B,this.initPTS[i.cc],this.timescale[i.cc],function(){y.textCodec=S.IMSC1_CODEC,w._parseIMSC1(i,B)},function(){y.textCodec="wvtt"})},t._appendCues=function(i,B){var w=this.hls;if(this.config.renderTextTracksNatively){var y=this.textTracks[B];if(y.mode==="disabled")return;i.forEach(function(c){return Object(L.addCueToTrack)(y,c)})}else{var x=this.tracks[B],E=x.default?"default":"subtitles"+B;w.trigger(D.Events.CUES_PARSED,{type:"subtitles",cues:i,track:E})}},t.onFragDecrypted=function(i,B){var w=B.frag;if(w.type===_.PlaylistLevelType.SUBTITLE){if(!Object(z.isFiniteNumber)(this.initPTS[w.cc])){this.unparsedVttFrags.push(B);return}this.onFragLoaded(D.Events.FRAG_LOADED,B)}},t.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},t.onFragParsingUserdata=function(i,B){var w=this.cea608Parser1,y=this.cea608Parser2;if(!this.enabled||!(w&&y))return;for(var x=0;x<B.samples.length;x++){var E=B.samples[x].bytes;if(E){var c=this.extractCea608Data(E);w.addData(B.samples[x].pts,c[0]),y.addData(B.samples[x].pts,c[1])}}},t.onBufferFlushing=function(i,B){var w=B.startOffset,y=B.endOffset,x=B.endOffsetSubtitles,E=B.type,c=this.media;if(!c||c.currentTime<y)return;if(!E||E==="video"){var e=this.captionsTracks;Object.keys(e).forEach(function(l){return Object(L.removeCuesInRange)(e[l],w,y)})}if(this.config.renderTextTracksNatively&&(w===0&&x!==void 0)){var a=this.textTracks;Object.keys(a).forEach(function(l){return Object(L.removeCuesInRange)(a[l],w,x)})}},t.extractCea608Data=function(i){for(var B=i[0]&31,w=2,y=[[],[]],x=0;x<B;x++){var E=i[w++],c=127&i[w++],e=127&i[w++],a=(4&E)!==0,l=3&E;if(c===0&&e===0)continue;a&&((l===0||l===1)&&(y[l].push(c),y[l].push(e)))}return y},s}();function o(s,t){return s&&s.label===t.name&&!(s.textTrack1||s.textTrack2)}function r(s,t,n,i){return Math.min(t,i)-Math.max(s,n)}function A(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"default",function(){return z});var z=function(){function D(G,P){this.subtle=void 0,this.aesIV=void 0,this.subtle=G,this.aesIV=P}var I=D.prototype;return I.decrypt=function(P,L){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},L,P)},D}()},"./src/crypt/aes-decryptor.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"removePadding",function(){return D}),O.d(V,"default",function(){return I});var z=O("./src/utils/typed-array.ts");function D(G){var P=G.byteLength,L=P&&new DataView(G.buffer).getUint8(P-1);return L?Object(z.sliceUint8)(G,0,P-L):G}var I=function(){function G(){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()}var P=G.prototype;return P.uint8ArrayToUint32Array_=function(S){for(var _=new DataView(S),b=new Uint32Array(4),u=0;u<4;u++)b[u]=_.getUint32(u*4);return b},P.initTable=function(){var S=this.sBox,_=this.invSBox,b=this.subMix,u=b[0],o=b[1],r=b[2],A=b[3],s=this.invSubMix,t=s[0],n=s[1],i=s[2],B=s[3],w=new Uint32Array(256),y=0,x=0,E=0;for(E=0;E<256;E++)E<128?w[E]=E<<1:w[E]=E<<1^283;for(E=0;E<256;E++){var c=x^x<<1^x<<2^x<<3^x<<4;c=c>>>8^c&255^99,S[y]=c,_[c]=y;var e=w[y],a=w[e],l=w[a],g=w[c]*257^c*16843008;u[y]=g<<24|g>>>8,o[y]=g<<16|g>>>16,r[y]=g<<8|g>>>24,A[y]=g,g=l*16843009^a*65537^e*257^y*16843008,t[c]=g<<24|g>>>8,n[c]=g<<16|g>>>16,i[c]=g<<8|g>>>24,B[c]=g,y?(y=e^w[w[w[l^e]]],x^=w[w[x]]):y=x=1}},P.expandKey=function(S){for(var _=this.uint8ArrayToUint32Array_(S),b=!0,u=0;u<_.length&&b;)b=_[u]===this.key[u],u++;if(b)return;this.key=_;var o=this.keySize=_.length;if(o!==4&&o!==6&&o!==8)throw new Error("Invalid aes key size="+o);var r=this.ksRows=(o+6+1)*4,A,s,t=this.keySchedule=new Uint32Array(r),n=this.invKeySchedule=new Uint32Array(r),i=this.sBox,B=this.rcon,w=this.invSubMix,y=w[0],x=w[1],E=w[2],c=w[3],e,a;for(A=0;A<r;A++){if(A<o){e=t[A]=_[A];continue}a=e,A%o===0?(a=a<<8|a>>>24,a=i[a>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[a&255],a^=B[A/o|0]<<24):o>6&&A%o===4&&(a=i[a>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[a&255]),t[A]=e=(t[A-o]^a)>>>0}for(s=0;s<r;s++)A=r-s,s&3?a=t[A]:a=t[A-4],s<4||A<=4?n[s]=a:n[s]=y[i[a>>>24]]^x[i[a>>>16&255]]^E[i[a>>>8&255]]^c[i[a&255]],n[s]=n[s]>>>0},P.networkToHostOrderSwap=function(S){return S<<24|(S&65280)<<8|(S&16711680)>>8|S>>>24},P.decrypt=function(S,_,b){for(var u=this.keySize+6,o=this.invKeySchedule,r=this.invSBox,A=this.invSubMix,s=A[0],t=A[1],n=A[2],i=A[3],B=this.uint8ArrayToUint32Array_(b),w=B[0],y=B[1],x=B[2],E=B[3],c=new Int32Array(S),e=new Int32Array(c.length),a,l,g,p,f,R,U,Q,j,J,k,Y,ne,me,_e=this.networkToHostOrderSwap;_<c.length;){for(j=_e(c[_]),J=_e(c[_+1]),k=_e(c[_+2]),Y=_e(c[_+3]),f=j^o[0],R=Y^o[1],U=k^o[2],Q=J^o[3],ne=4,me=1;me<u;me++)a=s[f>>>24]^t[R>>16&255]^n[U>>8&255]^i[Q&255]^o[ne],l=s[R>>>24]^t[U>>16&255]^n[Q>>8&255]^i[f&255]^o[ne+1],g=s[U>>>24]^t[Q>>16&255]^n[f>>8&255]^i[R&255]^o[ne+2],p=s[Q>>>24]^t[f>>16&255]^n[R>>8&255]^i[U&255]^o[ne+3],f=a,R=l,U=g,Q=p,ne=ne+4;a=r[f>>>24]<<24^r[R>>16&255]<<16^r[U>>8&255]<<8^r[Q&255]^o[ne],l=r[R>>>24]<<24^r[U>>16&255]<<16^r[Q>>8&255]<<8^r[f&255]^o[ne+1],g=r[U>>>24]<<24^r[Q>>16&255]<<16^r[f>>8&255]<<8^r[R&255]^o[ne+2],p=r[Q>>>24]<<24^r[f>>16&255]<<16^r[R>>8&255]<<8^r[U&255]^o[ne+3],e[_]=_e(a^w),e[_+1]=_e(p^y),e[_+2]=_e(g^x),e[_+3]=_e(l^E),w=j,y=J,x=k,E=Y,_=_+4}return e.buffer},G}()},"./src/crypt/decrypter.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"default",function(){return _});var z=O("./src/crypt/aes-crypto.ts"),D=O("./src/crypt/fast-aes-key.ts"),I=O("./src/crypt/aes-decryptor.ts"),G=O("./src/utils/logger.ts"),P=O("./src/utils/mp4-tools.ts"),L=O("./src/utils/typed-array.ts"),S=16,_=function(){function b(o,r,A){var s=A===void 0?{}:A,t=s.removePKCS7Padding,n=t===void 0?!0:t;if(this.logEnabled=!0,this.observer=void 0,this.config=void 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.observer=o,this.config=r,this.removePKCS7Padding=n,n)try{var i=self.crypto;i&&(this.subtle=i.subtle||i.webkitSubtle)}catch(B){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var u=b.prototype;return u.destroy=function(){this.observer=null},u.isSync=function(){return this.config.enableSoftwareAES},u.flush=function(){var r=this.currentResult;if(!r){this.reset();return}var A=new Uint8Array(r);return this.reset(),this.removePKCS7Padding?Object(I.removePadding)(A):A},u.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},u.decrypt=function(r,A,s,t){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(r),A,s);var n=this.flush();n&&t(n.buffer)}else this.webCryptoDecrypt(new Uint8Array(r),A,s).then(t)},u.softwareDecrypt=function(r,A,s){var t=this.currentIV,n=this.currentResult,i=this.remainderData;this.logOnce("JS AES decrypt"),i&&(r=Object(P.appendUint8Array)(i,r),this.remainderData=null);var B=this.getValidChunk(r);if(!B.length)return null;t&&(s=t);var w=this.softwareDecrypter;w||(w=this.softwareDecrypter=new I.default),w.expandKey(A);var y=n;return this.currentResult=w.decrypt(B.buffer,0,s),this.currentIV=Object(L.sliceUint8)(B,-16).buffer,y||null},u.webCryptoDecrypt=function(r,A,s){var t=this,n=this.subtle;return(this.key!==A||!this.fastAesKey)&&(this.key=A,this.fastAesKey=new D.default(n,A)),this.fastAesKey.expandKey().then(function(i){if(!n)return Promise.reject(new Error("web crypto not initialized"));var B=new z.default(n,s);return B.decrypt(r.buffer,i)}).catch(function(i){return t.onWebCryptoError(i,r,A,s)})},u.onWebCryptoError=function(r,A,s,t){return G.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",r),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(A,s,t)},u.getValidChunk=function(r){var A=r,s=r.length-r.length%S;return s!==r.length&&(A=Object(L.sliceUint8)(r,0,s),this.remainderData=Object(L.sliceUint8)(r,s)),A},u.logOnce=function(r){if(!this.logEnabled)return;G.logger.log("[decrypter.ts]: "+r),this.logEnabled=!1},b}()},"./src/crypt/fast-aes-key.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"default",function(){return z});var z=function(){function D(G,P){this.subtle=void 0,this.key=void 0,this.subtle=G,this.key=P}var I=D.prototype;return I.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},D}()},"./src/demux/aacdemuxer.ts":function(ve,V,O){"use strict";O.r(V);var z=O("./src/demux/base-audio-demuxer.ts"),D=O("./src/demux/adts.ts"),I=O("./src/utils/logger.ts"),G=O("./src/demux/id3.ts");function P(_,b){_.prototype=Object.create(b.prototype),_.prototype.constructor=_,L(_,b)}function L(_,b){return L=Object.setPrototypeOf||function(o,r){return o.__proto__=r,o},L(_,b)}var S=function(_){P(b,_);function b(o,r){var A;return A=_.call(this)||this,A.observer=void 0,A.config=void 0,A.observer=o,A.config=r,A}var u=b.prototype;return u.resetInitSegment=function(r,A,s){_.prototype.resetInitSegment.call(this,r,A,s),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:r,duration:s,inputTimeScale:9e4,dropped:0}},b.probe=function(r){if(!r)return!1;for(var A=G.getID3Data(r,0)||[],s=A.length,t=r.length;s<t;s++)if(D.probe(r,s))return I.logger.log("ADTS sync word found !"),!0;return!1},u.canParse=function(r,A){return D.canParse(r,A)},u.appendFrame=function(r,A,s){D.initTrackConfig(r,this.observer,A,s,r.manifestCodec);var t=D.appendFrame(r,A,s,this.initPTS,this.frameIndex);if(t&&t.missing===0)return t},b}(z.default);S.minProbeByteLength=9,V.default=S},"./src/demux/adts.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"getAudioConfig",function(){return G}),O.d(V,"isHeaderPattern",function(){return P}),O.d(V,"getHeaderLength",function(){return L}),O.d(V,"getFullFrameLength",function(){return S}),O.d(V,"canGetFrameLength",function(){return _}),O.d(V,"isHeader",function(){return b}),O.d(V,"canParse",function(){return u}),O.d(V,"probe",function(){return o}),O.d(V,"initTrackConfig",function(){return r}),O.d(V,"getFrameDuration",function(){return A}),O.d(V,"parseFrameHeader",function(){return s}),O.d(V,"appendFrame",function(){return t});var z=O("./src/utils/logger.ts"),D=O("./src/errors.ts"),I=O("./src/events.ts");function G(n,i,B,w){var y,x,E,c,e=navigator.userAgent.toLowerCase(),a=w,l=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];y=((i[B+2]&192)>>>6)+1;var g=(i[B+2]&60)>>>2;if(g>l.length-1){n.trigger(I.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+g});return}return E=(i[B+2]&1)<<2,E|=(i[B+3]&192)>>>6,z.logger.log("manifest codec:"+w+", ADTS type:"+y+", samplingIndex:"+g),/firefox/i.test(e)?g>=6?(y=5,c=new Array(4),x=g-3):(y=2,c=new Array(2),x=g):e.indexOf("android")!==-1?(y=2,c=new Array(2),x=g):(y=5,c=new Array(4),w&&(w.indexOf("mp4a.40.29")!==-1||w.indexOf("mp4a.40.5")!==-1)||!w&&g>=6?x=g-3:((w&&w.indexOf("mp4a.40.2")!==-1&&(g>=6&&E===1||/vivaldi/i.test(e))||!w&&E===1)&&(y=2,c=new Array(2)),x=g)),c[0]=y<<3,c[0]|=(g&14)>>1,c[1]|=(g&1)<<7,c[1]|=E<<3,y===5&&(c[1]|=(x&14)>>1,c[2]=(x&1)<<7,c[2]|=2<<2,c[3]=0),{config:c,samplerate:l[g],channelCount:E,codec:"mp4a.40."+y,manifestCodec:a}}function P(n,i){return n[i]===255&&(n[i+1]&246)===240}function L(n,i){return n[i+1]&1?7:9}function S(n,i){return(n[i+3]&3)<<11|n[i+4]<<3|(n[i+5]&224)>>>5}function _(n,i){return i+5<n.length}function b(n,i){return i+1<n.length&&P(n,i)}function u(n,i){return _(n,i)&&P(n,i)&&S(n,i)<=n.length-i}function o(n,i){if(b(n,i)){var B=L(n,i);if(i+B>=n.length)return!1;var w=S(n,i);if(w<=B)return!1;var y=i+w;return y===n.length||b(n,y)}return!1}function r(n,i,B,w,y){if(!n.samplerate){var x=G(i,B,w,y);if(!x)return;n.config=x.config,n.samplerate=x.samplerate,n.channelCount=x.channelCount,n.codec=x.codec,n.manifestCodec=x.manifestCodec,z.logger.log("parsed codec:"+n.codec+", rate:"+x.samplerate+", channels:"+x.channelCount)}}function A(n){return 1024*9e4/n}function s(n,i,B,w,y){var x=L(n,i),E=S(n,i);if(E-=x,E>0){var c=B+w*y;return{headerLength:x,frameLength:E,stamp:c}}}function t(n,i,B,w,y){var x=A(n.samplerate),E=s(i,B,w,y,x);if(E){var c=E.frameLength,e=E.headerLength,a=E.stamp,l=e+c,g=Math.max(0,B+l-i.length),p;g?(p=new Uint8Array(l-e),p.set(i.subarray(B+e,i.length),0)):p=i.subarray(B+e,B+l);var f={unit:p,pts:a};return g||n.samples.push(f),{sample:f,length:l,missing:g}}}},"./src/demux/base-audio-demuxer.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"initPTSFn",function(){return S});var z=O("./src/polyfills/number.ts"),D=O("./src/demux/id3.ts"),I=O("./src/demux/dummy-demuxed-track.ts"),G=O("./src/utils/mp4-tools.ts"),P=O("./src/utils/typed-array.ts"),L=function(){function _(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var b=_.prototype;return b.resetInitSegment=function(o,r,A){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},b.resetTimeStamp=function(){},b.resetContiguity=function(){},b.canParse=function(o,r){return!1},b.appendFrame=function(o,r,A){},b.demux=function(o,r){this.cachedData&&(o=Object(G.appendUint8Array)(this.cachedData,o),this.cachedData=null);var A=D.getID3Data(o,0),s=A?A.length:0,t,n,i=this._audioTrack,B=this._id3Track,w=A?D.getTimeStamp(A):void 0,y=o.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=S(w,r)),A&&A.length>0&&B.samples.push({pts:this.initPTS,dts:this.initPTS,data:A}),n=this.initPTS;s<y;){if(this.canParse(o,s)){var x=this.appendFrame(i,o,s);x?(this.frameIndex++,n=x.sample.pts,s+=x.length,t=s):s=y}else D.canParse(o,s)?(A=D.getID3Data(o,s),B.samples.push({pts:n,dts:n,data:A}),s+=A.length,t=s):s++;if(s===y&&t!==y){var E=Object(P.sliceUint8)(o,t);this.cachedData?this.cachedData=Object(G.appendUint8Array)(this.cachedData,E):this.cachedData=E}}return{audioTrack:i,avcTrack:Object(I.dummyTrack)(),id3Track:B,textTrack:Object(I.dummyTrack)()}},b.demuxSampleAes=function(o,r,A){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},b.flush=function(o){var r=this.cachedData;return r&&(this.cachedData=null,this.demux(r,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(I.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(I.dummyTrack)()}},b.destroy=function(){},_}(),S=function(b,u){return Object(z.isFiniteNumber)(b)?b*90:u*9e4};V.default=L},"./src/demux/chunk-cache.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"default",function(){return z});var z=function(){function I(){this.chunks=[],this.dataLength=0}var G=I.prototype;return G.push=function(L){this.chunks.push(L),this.dataLength+=L.length},G.flush=function(){var L=this.chunks,S=this.dataLength,_;if(L.length)L.length===1?_=L[0]:_=D(L,S);else return new Uint8Array(0);return this.reset(),_},G.reset=function(){this.chunks.length=0,this.dataLength=0},I}();function D(I,G){for(var P=new Uint8Array(G),L=0,S=0;S<I.length;S++){var _=I[S];P.set(_,L),L+=_.length}return P}},"./src/demux/dummy-demuxed-track.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"dummyTrack",function(){return z});function z(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(ve,V,O){"use strict";O.r(V);var z=O("./src/utils/logger.ts"),D=function(){function I(P){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=P,this.bytesAvailable=P.byteLength,this.word=0,this.bitsAvailable=0}var G=I.prototype;return G.loadWord=function(){var L=this.data,S=this.bytesAvailable,_=L.byteLength-S,b=new Uint8Array(4),u=Math.min(4,S);if(u===0)throw new Error("no bytes available");b.set(L.subarray(_,_+u)),this.word=new DataView(b.buffer).getUint32(0),this.bitsAvailable=u*8,this.bytesAvailable-=u},G.skipBits=function(L){var S;this.bitsAvailable>L?(this.word<<=L,this.bitsAvailable-=L):(L-=this.bitsAvailable,S=L>>3,L-=S>>3,this.bytesAvailable-=S,this.loadWord(),this.word<<=L,this.bitsAvailable-=L)},G.readBits=function(L){var S=Math.min(this.bitsAvailable,L),_=this.word>>>32-S;return L>32&&z.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=S,this.bitsAvailable>0?this.word<<=S:this.bytesAvailable>0&&this.loadWord(),S=L-S,S>0&&this.bitsAvailable?_<<S|this.readBits(S):_},G.skipLZ=function(){var L;for(L=0;L<this.bitsAvailable;++L)if((this.word&2147483648>>>L)!==0)return this.word<<=L,this.bitsAvailable-=L,L;return this.loadWord(),L+this.skipLZ()},G.skipUEG=function(){this.skipBits(1+this.skipLZ())},G.skipEG=function(){this.skipBits(1+this.skipLZ())},G.readUEG=function(){var L=this.skipLZ();return this.readBits(L+1)-1},G.readEG=function(){var L=this.readUEG();return 1&L?1+L>>>1:-1*(L>>>1)},G.readBoolean=function(){return this.readBits(1)===1},G.readUByte=function(){return this.readBits(8)},G.readUShort=function(){return this.readBits(16)},G.readUInt=function(){return this.readBits(32)},G.skipScalingList=function(L){for(var S=8,_=8,b,u=0;u<L;u++)_!==0&&(b=this.readEG(),_=(S+b+256)%256),S=_===0?S:_},G.readSPS=function(){var L=0,S=0,_=0,b=0,u,o,r,A=this.readUByte.bind(this),s=this.readBits.bind(this),t=this.readUEG.bind(this),n=this.readBoolean.bind(this),i=this.skipBits.bind(this),B=this.skipEG.bind(this),w=this.skipUEG.bind(this),y=this.skipScalingList.bind(this);A();var x=A();if(s(5),i(3),A(),w(),x===100||x===110||x===122||x===244||x===44||x===83||x===86||x===118||x===128){var E=t();if(E===3&&i(1),w(),w(),i(1),n())for(o=E!==3?8:12,r=0;r<o;r++)n()&&(r<6?y(16):y(64))}w();var c=t();if(c===0)t();else if(c===1)for(i(1),B(),B(),u=t(),r=0;r<u;r++)B();w(),i(1);var e=t(),a=t(),l=s(1);l===0&&i(1),i(1),n()&&(L=t(),S=t(),_=t(),b=t());var g=[1,1];if(n()&&n()){var p=A();switch(p){case 1:g=[1,1];break;case 2:g=[12,11];break;case 3:g=[10,11];break;case 4:g=[16,11];break;case 5:g=[40,33];break;case 6:g=[24,11];break;case 7:g=[20,11];break;case 8:g=[32,11];break;case 9:g=[80,33];break;case 10:g=[18,11];break;case 11:g=[15,11];break;case 12:g=[64,33];break;case 13:g=[160,99];break;case 14:g=[4,3];break;case 15:g=[3,2];break;case 16:g=[2,1];break;case 255:{g=[A()<<8|A(),A()<<8|A()];break}}}return{width:Math.ceil((e+1)*16-L*2-S*2),height:(2-l)*(a+1)*16-(l?2:4)*(_+b),pixelRatio:g}},G.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},I}();V.default=D},"./src/demux/id3.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"isHeader",function(){return z}),O.d(V,"isFooter",function(){return D}),O.d(V,"getID3Data",function(){return I}),O.d(V,"canParse",function(){return P}),O.d(V,"getTimeStamp",function(){return L}),O.d(V,"isTimeStampFrame",function(){return S}),O.d(V,"getID3Frames",function(){return b}),O.d(V,"decodeFrame",function(){return u}),O.d(V,"utf8ArrayToStr",function(){return t}),O.d(V,"testables",function(){return n});var z=function(y,x){return x+10<=y.length&&(y[x]===73&&y[x+1]===68&&y[x+2]===51&&(y[x+3]<255&&y[x+4]<255&&(y[x+6]<128&&y[x+7]<128&&y[x+8]<128&&y[x+9]<128)))},D=function(y,x){return x+10<=y.length&&(y[x]===51&&y[x+1]===68&&y[x+2]===73&&(y[x+3]<255&&y[x+4]<255&&(y[x+6]<128&&y[x+7]<128&&y[x+8]<128&&y[x+9]<128)))},I=function(y,x){for(var E=x,c=0;z(y,x);){c+=10;var e=G(y,x+6);c+=e,D(y,x+10)&&(c+=10),x+=c}return c>0?y.subarray(E,E+c):void 0},G=function(y,x){var E=0;return E=(y[x]&127)<<21,E|=(y[x+1]&127)<<14,E|=(y[x+2]&127)<<7,E|=y[x+3]&127,E},P=function(y,x){return z(y,x)&&G(y,x+6)+10<=y.length-x},L=function(y){for(var x=b(y),E=0;E<x.length;E++){var c=x[E];if(S(c))return s(c)}return},S=function(y){return y&&y.key==="PRIV"&&y.info==="com.apple.streaming.transportStreamTimestamp"},_=function(y){var x=String.fromCharCode(y[0],y[1],y[2],y[3]),E=G(y,4),c=10;return{type:x,size:E,data:y.subarray(c,c+E)}},b=function(y){for(var x=0,E=[];z(y,x);){var c=G(y,x+6);x+=10;for(var e=x+c;x+8<e;){var a=_(y.subarray(x)),l=u(a);l&&E.push(l),x+=a.size+10}D(y,x)&&(x+=10)}return E},u=function(y){return y.type==="PRIV"?o(y):y.type[0]==="W"?A(y):r(y)},o=function(y){if(y.size<2)return;var x=t(y.data,!0),E=new Uint8Array(y.data.subarray(x.length+1));return{key:y.type,info:x,data:E.buffer}},r=function(y){if(y.size<2)return;if(y.type==="TXXX"){var x=1,E=t(y.data.subarray(x),!0);x+=E.length+1;var c=t(y.data.subarray(x));return{key:y.type,info:E,data:c}}var e=t(y.data.subarray(1));return{key:y.type,data:e}},A=function(y){if(y.type==="WXXX"){if(y.size<2)return;var x=1,E=t(y.data.subarray(x),!0);x+=E.length+1;var c=t(y.data.subarray(x));return{key:y.type,info:E,data:c}}var e=t(y.data);return{key:y.type,data:e}},s=function(y){if(y.data.byteLength===8){var x=new Uint8Array(y.data),E=x[3]&1,c=(x[4]<<23)+(x[5]<<15)+(x[6]<<7)+x[7];return c/=45,E&&(c+=4772185884e-2),Math.round(c)}return},t=function(y,x){x===void 0&&(x=!1);var E=B();if(E){var c=E.decode(y);if(x){var e=c.indexOf("\0");return e!==-1?c.substring(0,e):c}return c.replace(/\0/g,"")}for(var a=y.length,l,g,p,f="",R=0;R<a;){if(l=y[R++],l===0&&x)return f;if(l===0||l===3)continue;switch(l>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:f+=String.fromCharCode(l);break;case 12:case 13:g=y[R++],f+=String.fromCharCode((l&31)<<6|g&63);break;case 14:g=y[R++],p=y[R++],f+=String.fromCharCode((l&15)<<12|(g&63)<<6|(p&63)<<0);break;default:}}return f},n={decodeTextFrame:r},i;function B(){return!i&&typeof self.TextDecoder!="undefined"&&(i=new self.TextDecoder("utf-8")),i}},"./src/demux/mp3demuxer.ts":function(ve,V,O){"use strict";O.r(V);var z=O("./src/demux/base-audio-demuxer.ts"),D=O("./src/demux/id3.ts"),I=O("./src/utils/logger.ts"),G=O("./src/demux/mpegaudio.ts");function P(_,b){_.prototype=Object.create(b.prototype),_.prototype.constructor=_,L(_,b)}function L(_,b){return L=Object.setPrototypeOf||function(o,r){return o.__proto__=r,o},L(_,b)}var S=function(_){P(b,_);function b(){return _.apply(this,arguments)||this}var u=b.prototype;return u.resetInitSegment=function(r,A,s){_.prototype.resetInitSegment.call(this,r,A,s),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:r,duration:s,inputTimeScale:9e4,dropped:0}},b.probe=function(r){if(!r)return!1;for(var A=D.getID3Data(r,0)||[],s=A.length,t=r.length;s<t;s++)if(G.probe(r,s))return I.logger.log("MPEG Audio sync word found !"),!0;return!1},u.canParse=function(r,A){return G.canParse(r,A)},u.appendFrame=function(r,A,s){return this.initPTS===null?void 0:G.appendFrame(r,A,s,this.initPTS,this.frameIndex)},b}(z.default);S.minProbeByteLength=4,V.default=S},"./src/demux/mp4demuxer.ts":function(ve,V,O){"use strict";O.r(V);var z=O("./src/utils/mp4-tools.ts"),D=O("./src/demux/dummy-demuxed-track.ts"),I=function(){function G(L,S){this.remainderData=null,this.config=void 0,this.config=S}var P=G.prototype;return P.resetTimeStamp=function(){},P.resetInitSegment=function(){},P.resetContiguity=function(){},G.probe=function(S){return Object(z.findBox)({data:S,start:0,end:Math.min(S.length,16384)},["moof"]).length>0},P.demux=function(S){var _=S,b=Object(D.dummyTrack)();if(this.config.progressive){this.remainderData&&(_=Object(z.appendUint8Array)(this.remainderData,S));var u=Object(z.segmentValidRange)(_);this.remainderData=u.remainder,b.samples=u.valid||new Uint8Array}else b.samples=_;return{audioTrack:Object(D.dummyTrack)(),avcTrack:b,id3Track:Object(D.dummyTrack)(),textTrack:Object(D.dummyTrack)()}},P.flush=function(){var S=Object(D.dummyTrack)();return S.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(D.dummyTrack)(),avcTrack:S,id3Track:Object(D.dummyTrack)(),textTrack:Object(D.dummyTrack)()}},P.demuxSampleAes=function(S,_,b){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},P.destroy=function(){},G}();I.minProbeByteLength=1024,V.default=I},"./src/demux/mpegaudio.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"appendFrame",function(){return L}),O.d(V,"parseHeader",function(){return S}),O.d(V,"isHeaderPattern",function(){return _}),O.d(V,"isHeader",function(){return b}),O.d(V,"canParse",function(){return u}),O.d(V,"probe",function(){return o});var z=null,D=[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],I=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],G=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],P=[0,1,1,4];function L(r,A,s,t,n){if(s+24>A.length)return;var i=S(A,s);if(i&&s+i.frameLength<=A.length){var B=i.samplesPerFrame*9e4/i.sampleRate,w=t+n*B,y={unit:A.subarray(s,s+i.frameLength),pts:w,dts:w};return r.config=[],r.channelCount=i.channelCount,r.samplerate=i.sampleRate,r.samples.push(y),{sample:y,length:i.frameLength,missing:0}}}function S(r,A){var s=r[A+1]>>3&3,t=r[A+1]>>1&3,n=r[A+2]>>4&15,i=r[A+2]>>2&3;if(s!==1&&n!==0&&n!==15&&i!==3){var B=r[A+2]>>1&1,w=r[A+3]>>6,y=s===3?3-t:t===3?3:4,x=D[y*14+n-1]*1e3,E=s===3?0:s===2?1:2,c=I[E*3+i],e=w===3?1:2,a=G[s][t],l=P[t],g=a*8*l,p=Math.floor(a*x/c+B)*l;if(z===null){var f=navigator.userAgent||"",R=f.match(/Chrome\/(\d+)/i);z=R?parseInt(R[1]):0}var U=!!z&&z<=87;return U&&t===2&&x>=224e3&&w===0&&(r[A+3]=r[A+3]|128),{sampleRate:c,channelCount:e,frameLength:p,samplesPerFrame:g}}}function _(r,A){return r[A]===255&&(r[A+1]&224)===224&&(r[A+1]&6)!==0}function b(r,A){return A+1<r.length&&_(r,A)}function u(r,A){var s=4;return _(r,A)&&s<=r.length-A}function o(r,A){if(A+1<r.length&&_(r,A)){var s=4,t=S(r,A),n=s;t!=null&&t.frameLength&&(n=t.frameLength);var i=A+n;return i===r.length||b(r,i)}return!1}},"./src/demux/sample-aes.ts":function(ve,V,O){"use strict";O.r(V);var z=O("./src/crypt/decrypter.ts"),D=O("./src/demux/tsdemuxer.ts"),I=function(){function G(L,S,_){this.keyData=void 0,this.decrypter=void 0,this.keyData=_,this.decrypter=new z.default(L,S,{removePKCS7Padding:!1})}var P=G.prototype;return P.decryptBuffer=function(S,_){this.decrypter.decrypt(S,this.keyData.key.buffer,this.keyData.iv.buffer,_)},P.decryptAacSample=function(S,_,b,u){var o=S[_].unit,r=o.subarray(16,o.length-o.length%16),A=r.buffer.slice(r.byteOffset,r.byteOffset+r.length),s=this;this.decryptBuffer(A,function(t){var n=new Uint8Array(t);o.set(n,16),u||s.decryptAacSamples(S,_+1,b)})},P.decryptAacSamples=function(S,_,b){for(;;_++){if(_>=S.length){b();return}if(S[_].unit.length<32)continue;var u=this.decrypter.isSync();if(this.decryptAacSample(S,_,b,u),!u)return}},P.getAvcEncryptedData=function(S){for(var _=Math.floor((S.length-48)/160)*16+16,b=new Int8Array(_),u=0,o=32;o<=S.length-16;o+=160,u+=16)b.set(S.subarray(o,o+16),u);return b},P.getAvcDecryptedUnit=function(S,_){for(var b=new Uint8Array(_),u=0,o=32;o<=S.length-16;o+=160,u+=16)S.set(b.subarray(u,u+16),o);return S},P.decryptAvcSample=function(S,_,b,u,o,r){var A=Object(D.discardEPB)(o.data),s=this.getAvcEncryptedData(A),t=this;this.decryptBuffer(s.buffer,function(n){o.data=t.getAvcDecryptedUnit(A,n),r||t.decryptAvcSamples(S,_,b+1,u)})},P.decryptAvcSamples=function(S,_,b,u){if(S instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;_++,b=0){if(_>=S.length){u();return}for(var o=S[_].units;!(b>=o.length);b++){var r=o[b];if(r.data.length<=48||r.type!==1&&r.type!==5)continue;var A=this.decrypter.isSync();if(this.decryptAvcSample(S,_,b,u,r,A),!A)return}}},G}();V.default=I},"./src/demux/transmuxer-interface.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"default",function(){return o});var z=O("./node_modules/webworkify-webpack/index.js"),D=O.n(z),I=O("./src/events.ts"),G=O("./src/demux/transmuxer.ts"),P=O("./src/utils/logger.ts"),L=O("./src/errors.ts"),S=O("./src/utils/mediasource-helper.ts"),_=O("./node_modules/eventemitter3/index.js"),b=O.n(_),u=Object(S.getMediaSource)()||{isTypeSupported:function(){return!1}},o=function(){function r(s,t,n,i){var B=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=s,this.id=t,this.onTransmuxComplete=n,this.onFlush=i;var w=s.config,y=function(a,l){l=l||{},l.frag=B.frag,l.id=B.id,s.trigger(a,l)};this.observer=new _.EventEmitter,this.observer.on(I.Events.FRAG_DECRYPTED,y),this.observer.on(I.Events.ERROR,y);var x={mp4:u.isTypeSupported("video/mp4"),mpeg:u.isTypeSupported("audio/mpeg"),mp3:u.isTypeSupported('audio/mp4; codecs="mp3"')},E=navigator.vendor;if(w.enableWorker&&typeof Worker!="undefined"){P.logger.log("demuxing in webworker");var c;try{c=this.worker=z("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),c.addEventListener("message",this.onwmsg),c.onerror=function(e){s.trigger(I.Events.ERROR,{type:L.ErrorTypes.OTHER_ERROR,details:L.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(e.message+" ("+e.filename+":"+e.lineno+")")})},c.postMessage({cmd:"init",typeSupported:x,vendor:E,id:t,config:JSON.stringify(w)})}catch(e){P.logger.warn("Error in worker:",e),P.logger.error("Error while initializing DemuxerWorker, fallback to inline"),c&&self.URL.revokeObjectURL(c.objectURL),this.transmuxer=new G.default(this.observer,x,w,E,t),this.worker=null}}else this.transmuxer=new G.default(this.observer,x,w,E,t)}var A=r.prototype;return A.destroy=function(){var t=this.worker;if(t)t.removeEventListener("message",this.onwmsg),t.terminate(),this.worker=null;else{var n=this.transmuxer;n&&(n.destroy(),this.transmuxer=null)}var i=this.observer;i&&i.removeAllListeners(),this.observer=null},A.push=function(t,n,i,B,w,y,x,E,c,e){var a=this;c.transmuxing.start=self.performance.now();var l=this.transmuxer,g=this.worker,p=y?y.start:w.start,f=w.decryptdata,R=this.frag,U=!(R&&w.cc===R.cc),Q=!(R&&c.level===R.level),j=R?c.sn-R.sn:-1,J=this.part?c.part-this.part.index:1,k=!Q&&(j===1||j===0&&J===1),Y=self.performance.now();(Q||j||w.stats.parsing.start===0)&&(w.stats.parsing.start=Y),y&&(J||!k)&&(y.stats.parsing.start=Y);var ne=new G.TransmuxState(U,k,E,Q,p);if(!k||U){P.logger.log("[transmuxer-interface, "+w.type+"]: Starting new transmux session for sn: "+c.sn+" p: "+c.part+" level: "+c.level+" id: "+c.id+`
discontinuity: `+U+`
trackSwitch: `+Q+`
contiguous: `+k+`
accurateTimeOffset: `+E+`
timeOffset: `+p);var me=new G.TransmuxConfig(i,B,n,x,e);this.configureTransmuxer(me)}if(this.frag=w,this.part=y,g)g.postMessage({cmd:"demux",data:t,decryptdata:f,chunkMeta:c,state:ne},t instanceof ArrayBuffer?[t]:[]);else if(l){var _e=l.push(t,f,c,ne);Object(G.isPromise)(_e)?_e.then(function(Oe){a.handleTransmuxComplete(Oe)}):this.handleTransmuxComplete(_e)}},A.flush=function(t){var n=this;t.transmuxing.start=self.performance.now();var i=this.transmuxer,B=this.worker;if(B)B.postMessage({cmd:"flush",chunkMeta:t});else if(i){var w=i.flush(t);Object(G.isPromise)(w)?w.then(function(y){n.handleFlushResult(y,t)}):this.handleFlushResult(w,t)}},A.handleFlushResult=function(t,n){var i=this;t.forEach(function(B){i.handleTransmuxComplete(B)}),this.onFlush(n)},A.onWorkerMessage=function(t){var n=t.data,i=this.hls;switch(n.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(n.data);break}case"flush":{this.onFlush(n.data);break}default:{n.data=n.data||{},n.data.frag=this.frag,n.data.id=this.id,i.trigger(n.event,n.data);break}}},A.configureTransmuxer=function(t){var n=this.worker,i=this.transmuxer;n?n.postMessage({cmd:"configure",config:t}):i&&i.configure(t)},A.handleTransmuxComplete=function(t){t.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(t)},r}()},"./src/demux/transmuxer-worker.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"default",function(){return L});var z=O("./src/demux/transmuxer.ts"),D=O("./src/events.ts"),I=O("./src/utils/logger.ts"),G=O("./node_modules/eventemitter3/index.js"),P=O.n(G);function L(o){var r=new G.EventEmitter,A=function(t,n){o.postMessage({event:t,data:n})};r.on(D.Events.FRAG_DECRYPTED,A),r.on(D.Events.ERROR,A),o.addEventListener("message",function(s){var t=s.data;switch(t.cmd){case"init":{var n=JSON.parse(t.config);o.transmuxer=new z.default(r,t.typeSupported,n,t.vendor,t.id),Object(I.enableLogs)(n.debug),A("init",null);break}case"configure":{o.transmuxer.configure(t.config);break}case"demux":{var i=o.transmuxer.push(t.data,t.decryptdata,t.chunkMeta,t.state);Object(z.isPromise)(i)?i.then(function(y){S(o,y)}):S(o,i);break}case"flush":{var B=t.chunkMeta,w=o.transmuxer.flush(B);Object(z.isPromise)(w)?w.then(function(y){b(o,y,B)}):b(o,w,B);break}default:break}})}function S(o,r){if(u(r.remuxResult))return;var A=[],s=r.remuxResult,t=s.audio,n=s.video;t&&_(A,t),n&&_(A,n),o.postMessage({event:"transmuxComplete",data:r},A)}function _(o,r){r.data1&&o.push(r.data1.buffer),r.data2&&o.push(r.data2.buffer)}function b(o,r,A){r.forEach(function(s){S(o,s)}),o.postMessage({event:"flush",data:A})}function u(o){return!o.audio&&!o.video&&!o.text&&!o.id3&&!o.initSegment}},"./src/demux/transmuxer.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"default",function(){return n}),O.d(V,"isPromise",function(){return w}),O.d(V,"TransmuxConfig",function(){return y}),O.d(V,"TransmuxState",function(){return x});var z=O("./src/events.ts"),D=O("./src/errors.ts"),I=O("./src/crypt/decrypter.ts"),G=O("./src/demux/aacdemuxer.ts"),P=O("./src/demux/mp4demuxer.ts"),L=O("./src/demux/tsdemuxer.ts"),S=O("./src/demux/mp3demuxer.ts"),_=O("./src/remux/mp4-remuxer.ts"),b=O("./src/remux/passthrough-remuxer.ts"),u=O("./src/demux/chunk-cache.ts"),o=O("./src/utils/mp4-tools.ts"),r=O("./src/utils/logger.ts"),A;try{A=self.performance.now.bind(self.performance)}catch(E){r.logger.debug("Unable to use Performance API on this environment"),A=self.Date.now}var s=[{demux:L.default,remux:_.default},{demux:P.default,remux:b.default},{demux:G.default,remux:_.default},{demux:S.default,remux:_.default}],t=1024;s.forEach(function(E){var c=E.demux;t=Math.max(t,c.minProbeByteLength)});var n=function(){function E(e,a,l,g,p){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new u.default,this.observer=e,this.typeSupported=a,this.config=l,this.vendor=g,this.id=p}var c=E.prototype;return c.configure=function(a){this.transmuxConfig=a,this.decrypter&&this.decrypter.reset()},c.push=function(a,l,g,p){var f=this,R=g.transmuxing;R.executeStart=A();var U=new Uint8Array(a),Q=this.cache,j=this.config,J=this.currentTransmuxState,k=this.transmuxConfig;p&&(this.currentTransmuxState=p);var Y=i(U,l);if(Y&&Y.method==="AES-128"){var ne=this.getDecrypter();if(j.enableSoftwareAES){var me=ne.softwareDecrypt(U,Y.key.buffer,Y.iv.buffer);if(!me)return R.executeEnd=A(),B(g);U=new Uint8Array(me)}else return this.decryptionPromise=ne.webCryptoDecrypt(U,Y.key.buffer,Y.iv.buffer).then(function(W){var F=f.push(W,null,g);return f.decryptionPromise=null,F}),this.decryptionPromise}var _e=p||J,Oe=_e.contiguous,xe=_e.discontinuity,Se=_e.trackSwitch,Fe=_e.accurateTimeOffset,Pe=_e.timeOffset,Ee=k.audioCodec,he=k.videoCodec,Ge=k.defaultInitPts,lt=k.duration,at=k.initSegmentData;if((xe||Se)&&this.resetInitSegment(at,Ee,he,lt),xe&&this.resetInitialTimestamp(Ge),Oe||this.resetContiguity(),this.needsProbing(U,xe,Se)){if(Q.dataLength){var je=Q.flush();U=Object(o.appendUint8Array)(je,U)}this.configureTransmuxer(U,k)}var it=this.transmux(U,Y,Pe,Fe,g),ee=this.currentTransmuxState;return ee.contiguous=!0,ee.discontinuity=!1,ee.trackSwitch=!1,R.executeEnd=A(),it},c.flush=function(a){var l=this,g=a.transmuxing;g.executeStart=A();var p=this.decrypter,f=this.cache,R=this.currentTransmuxState,U=this.decryptionPromise;if(U)return U.then(function(){return l.flush(a)});var Q=[],j=R.timeOffset;if(p){var J=p.flush();J&&Q.push(this.push(J,null,a))}var k=f.dataLength;f.reset();var Y=this.demuxer,ne=this.remuxer;if(!Y||!ne)return k>=t&&this.observer.emit(z.Events.ERROR,z.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),g.executeEnd=A(),[B(a)];var me=Y.flush(j);return w(me)?me.then(function(_e){return l.flushRemux(Q,_e,a),Q}):(this.flushRemux(Q,me,a),Q)},c.flushRemux=function(a,l,g){var p=l.audioTrack,f=l.avcTrack,R=l.id3Track,U=l.textTrack,Q=this.currentTransmuxState,j=Q.accurateTimeOffset,J=Q.timeOffset;r.logger.log("[transmuxer.ts]: Flushed fragment "+g.sn+(g.part>-1?" p: "+g.part:"")+" of level "+g.level);var k=this.remuxer.remux(p,f,R,U,J,j,!0,this.id);a.push({remuxResult:k,chunkMeta:g}),g.transmuxing.executeEnd=A()},c.resetInitialTimestamp=function(a){var l=this.demuxer,g=this.remuxer;if(!l||!g)return;l.resetTimeStamp(a),g.resetTimeStamp(a)},c.resetContiguity=function(){var a=this.demuxer,l=this.remuxer;if(!a||!l)return;a.resetContiguity(),l.resetNextTimestamp()},c.resetInitSegment=function(a,l,g,p){var f=this.demuxer,R=this.remuxer;if(!f||!R)return;f.resetInitSegment(l,g,p),R.resetInitSegment(a,l,g)},c.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},c.transmux=function(a,l,g,p,f){var R;return l&&l.method==="SAMPLE-AES"?R=this.transmuxSampleAes(a,l,g,p,f):R=this.transmuxUnencrypted(a,g,p,f),R},c.transmuxUnencrypted=function(a,l,g,p){var f=this.demuxer.demux(a,l,!1,!this.config.progressive),R=f.audioTrack,U=f.avcTrack,Q=f.id3Track,j=f.textTrack,J=this.remuxer.remux(R,U,Q,j,l,g,!1,this.id);return{remuxResult:J,chunkMeta:p}},c.transmuxSampleAes=function(a,l,g,p,f){var R=this;return this.demuxer.demuxSampleAes(a,l,g).then(function(U){var Q=R.remuxer.remux(U.audioTrack,U.avcTrack,U.id3Track,U.textTrack,g,p,!1,R.id);return{remuxResult:Q,chunkMeta:f}})},c.configureTransmuxer=function(a,l){for(var g=this.config,p=this.observer,f=this.typeSupported,R=this.vendor,U=l.audioCodec,Q=l.defaultInitPts,j=l.duration,J=l.initSegmentData,k=l.videoCodec,Y,ne=0,me=s.length;ne<me;ne++)if(s[ne].demux.probe(a)){Y=s[ne];break}Y||(r.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),Y={demux:P.default,remux:b.default});var _e=this.demuxer,Oe=this.remuxer,xe=Y.remux,Se=Y.demux;(!Oe||!(Oe instanceof xe))&&(this.remuxer=new xe(p,g,f,R)),(!_e||!(_e instanceof Se))&&(this.demuxer=new Se(p,g,f),this.probe=Se.probe),this.resetInitSegment(J,U,k,j),this.resetInitialTimestamp(Q)},c.needsProbing=function(a,l,g){return!this.demuxer||!this.remuxer||l||g},c.getDecrypter=function(){var a=this.decrypter;return a||(a=this.decrypter=new I.default(this.observer,this.config)),a},E}();function i(E,c){var e=null;return E.byteLength>0&&c!=null&&c.key!=null&&c.iv!==null&&c.method!=null&&(e=c),e}var B=function(c){return{remuxResult:{},chunkMeta:c}};function w(E){return"then"in E&&E.then instanceof Function}var y=function(c,e,a,l,g){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=c,this.videoCodec=e,this.initSegmentData=a,this.duration=l,this.defaultInitPts=g},x=function(c,e,a,l,g){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=c,this.contiguous=e,this.accurateTimeOffset=a,this.trackSwitch=l,this.timeOffset=g}},"./src/demux/tsdemuxer.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"discardEPB",function(){return B});var z=O("./src/demux/adts.ts"),D=O("./src/demux/mpegaudio.ts"),I=O("./src/demux/exp-golomb.ts"),G=O("./src/demux/id3.ts"),P=O("./src/demux/sample-aes.ts"),L=O("./src/events.ts"),S=O("./src/utils/mp4-tools.ts"),_=O("./src/utils/logger.ts"),b=O("./src/errors.ts"),u={video:1,audio:2,id3:3,text:4},o=function(){function w(x,E,c){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=x,this.config=E,this.typeSupported=c}w.probe=function(E){var c=w.syncOffset(E);return c<0?!1:(c&&_.logger.warn("MPEG2-TS detected but first sync word found @ offset "+c+", junk ahead ?"),!0)},w.syncOffset=function(E){for(var c=Math.min(1e3,E.length-3*188),e=0;e<c;){if(E[e]===71&&E[e+188]===71&&E[e+2*188]===71)return e;e++}return-1},w.createTrack=function(E,c){return{container:E==="video"||E==="audio"?"video/mp2t":void 0,type:E,id:u[E],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:E==="audio"?c:void 0}};var y=w.prototype;return y.resetInitSegment=function(E,c,e){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=w.createTrack("video",e),this._audioTrack=w.createTrack("audio",e),this._id3Track=w.createTrack("id3",e),this._txtTrack=w.createTrack("text",e),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=E,this.videoCodec=c,this._duration=e},y.resetTimeStamp=function(){},y.resetContiguity=function(){var E=this._audioTrack,c=this._avcTrack,e=this._id3Track;E&&(E.pesData=null),c&&(c.pesData=null),e&&(e.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},y.demux=function(E,c,e,a){e===void 0&&(e=!1),a===void 0&&(a=!1),e||(this.sampleAes=null);var l,g=this._avcTrack,p=this._audioTrack,f=this._id3Track,R=g.pid,U=g.pesData,Q=p.pid,j=f.pid,J=p.pesData,k=f.pesData,Y=!1,ne=this.pmtParsed,me=this._pmtId,_e=E.length;if(this.remainderData&&(E=Object(S.appendUint8Array)(this.remainderData,E),_e=E.length,this.remainderData=null),_e<188&&!a)return this.remainderData=E,{audioTrack:p,avcTrack:g,id3Track:f,textTrack:this._txtTrack};var Oe=Math.max(0,w.syncOffset(E));_e-=(_e+Oe)%188,_e<E.byteLength&&!a&&(this.remainderData=new Uint8Array(E.buffer,_e,E.buffer.byteLength-_e));for(var xe=Oe;xe<_e;xe+=188)if(E[xe]===71){var Se=!!(E[xe+1]&64),Fe=((E[xe+1]&31)<<8)+E[xe+2],Pe=(E[xe+3]&48)>>4,Ee=void 0;if(Pe>1){if(Ee=xe+5+E[xe+4],Ee===xe+188)continue}else Ee=xe+4;switch(Fe){case R:Se&&(U&&(l=t(U))&&this.parseAVCPES(l,!1),U={data:[],size:0}),U&&(U.data.push(E.subarray(Ee,xe+188)),U.size+=xe+188-Ee);break;case Q:Se&&(J&&(l=t(J))&&(p.isAAC?this.parseAACPES(l):this.parseMPEGPES(l)),J={data:[],size:0}),J&&(J.data.push(E.subarray(Ee,xe+188)),J.size+=xe+188-Ee);break;case j:Se&&(k&&(l=t(k))&&this.parseID3PES(l),k={data:[],size:0}),k&&(k.data.push(E.subarray(Ee,xe+188)),k.size+=xe+188-Ee);break;case 0:Se&&(Ee+=E[Ee]+1),me=this._pmtId=A(E,Ee);break;case me:{Se&&(Ee+=E[Ee]+1);var he=s(E,Ee,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,e);R=he.avc,R>0&&(g.pid=R),Q=he.audio,Q>0&&(p.pid=Q,p.isAAC=he.isAAC),j=he.id3,j>0&&(f.pid=j),Y&&!ne&&(_.logger.log("reparse from beginning"),Y=!1,xe=Oe-188),ne=this.pmtParsed=!0;break}case 17:case 8191:break;default:Y=!0;break}}else this.observer.emit(L.Events.ERROR,L.Events.ERROR,{type:b.ErrorTypes.MEDIA_ERROR,details:b.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});g.pesData=U,p.pesData=J,f.pesData=k;var Ge={audioTrack:p,avcTrack:g,id3Track:f,textTrack:this._txtTrack};return a&&this.extractRemainingSamples(Ge),Ge},y.flush=function(){var E=this.remainderData;this.remainderData=null;var c;return E?c=this.demux(E,-1,!1,!0):c={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(c),this.sampleAes?this.decrypt(c,this.sampleAes):c},y.extractRemainingSamples=function(E){var c=E.audioTrack,e=E.avcTrack,a=E.id3Track,l=e.pesData,g=c.pesData,p=a.pesData,f;l&&(f=t(l))?(this.parseAVCPES(f,!0),e.pesData=null):e.pesData=l,g&&(f=t(g))?(c.isAAC?this.parseAACPES(f):this.parseMPEGPES(f),c.pesData=null):(g!=null&&g.size&&_.logger.log("last AAC PES packet truncated,might overlap between fragments"),c.pesData=g),p&&(f=t(p))?(this.parseID3PES(f),a.pesData=null):a.pesData=p},y.demuxSampleAes=function(E,c,e){var a=this.demux(E,e,!0,!this.config.progressive),l=this.sampleAes=new P.default(this.observer,this.config,c);return this.decrypt(a,l)},y.decrypt=function(E,c){return new Promise(function(e){var a=E.audioTrack,l=E.avcTrack;a.samples&&a.isAAC?c.decryptAacSamples(a.samples,0,function(){l.samples?c.decryptAvcSamples(l.samples,0,0,function(){e(E)}):e(E)}):l.samples&&c.decryptAvcSamples(l.samples,0,0,function(){e(E)})})},y.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},y.parseAVCPES=function(E,c){var e=this,a=this._avcTrack,l=this.parseAVCNALu(E.data),g=!1,p=this.avcSample,f,R=!1;E.data=null,p&&l.length&&!a.audFound&&(n(p,a),p=this.avcSample=r(!1,E.pts,E.dts,"")),l.forEach(function(U){switch(U.type){case 1:{f=!0,p||(p=e.avcSample=r(!0,E.pts,E.dts,"")),g&&(p.debug+="NDR "),p.frame=!0;var Q=U.data;if(R&&Q.length>4){var j=new I.default(Q).readSliceType();(j===2||j===4||j===7||j===9)&&(p.key=!0)}break}case 5:f=!0,p||(p=e.avcSample=r(!0,E.pts,E.dts,"")),g&&(p.debug+="IDR "),p.key=!0,p.frame=!0;break;case 6:{f=!0,g&&p&&(p.debug+="SEI ");var J=new I.default(B(U.data));J.readUByte();for(var k=0,Y=0,ne=!1,me=0;!ne&&J.bytesAvailable>1;){k=0;do me=J.readUByte(),k+=me;while(me===255);Y=0;do me=J.readUByte(),Y+=me;while(me===255);if(k===4&&J.bytesAvailable!==0){ne=!0;var _e=J.readUByte();if(_e===181){var Oe=J.readUShort();if(Oe===49){var xe=J.readUInt();if(xe===1195456820){var Se=J.readUByte();if(Se===3){for(var Fe=J.readUByte(),Pe=J.readUByte(),Ee=31&Fe,he=[Fe,Pe],Ge=0;Ge<Ee;Ge++)he.push(J.readUByte()),he.push(J.readUByte()),he.push(J.readUByte());i(e._txtTrack.samples,{type:3,pts:E.pts,bytes:he})}}}}}else if(k===5&&J.bytesAvailable!==0){if(ne=!0,Y>16){for(var lt=[],at=0;at<16;at++)lt.push(J.readUByte().toString(16)),(at===3||at===5||at===7||at===9)&&lt.push("-");for(var je=Y-16,it=new Uint8Array(je),ee=0;ee<je;ee++)it[ee]=J.readUByte();i(e._txtTrack.samples,{pts:E.pts,payloadType:k,uuid:lt.join(""),userData:Object(G.utf8ArrayToStr)(it),userDataBytes:it})}}else if(Y<J.bytesAvailable)for(var W=0;W<Y;W++)J.readUByte()}break}case 7:if(f=!0,R=!0,g&&p&&(p.debug+="SPS "),!a.sps){var F=new I.default(U.data),oe=F.readSPS();a.width=oe.width,a.height=oe.height,a.pixelRatio=oe.pixelRatio,a.sps=[U.data],a.duration=e._duration;for(var re=U.data.subarray(1,4),we="avc1.",be=0;be<3;be++){var nt=re[be].toString(16);nt.length<2&&(nt="0"+nt),we+=nt}a.codec=we}break;case 8:f=!0,g&&p&&(p.debug+="PPS "),a.pps||(a.pps=[U.data]);break;case 9:f=!1,a.audFound=!0,p&&n(p,a),p=e.avcSample=r(!1,E.pts,E.dts,g?"AUD ":"");break;case 12:f=!1;break;default:f=!1,p&&(p.debug+="unknown NAL "+U.type+" ");break}if(p&&f){var tt=p.units;tt.push(U)}}),c&&p&&(n(p,a),this.avcSample=null)},y.getLastNalUnit=function(){var E,c=this.avcSample,e;if(!c||c.units.length===0){var a=this._avcTrack.samples;c=a[a.length-1]}if((E=c)!==null&&E!==void 0&&E.units){var l=c.units;e=l[l.length-1]}return e},y.parseAVCNALu=function(E){var c=E.byteLength,e=this._avcTrack,a=e.naluState||0,l=a,g=[],p=0,f,R,U,Q=-1,j=0;for(a===-1&&(Q=0,j=E[0]&31,a=0,p=1);p<c;){if(f=E[p++],!a){a=f?0:1;continue}if(a===1){a=f?0:2;continue}if(!f)a=3;else if(f===1){if(Q>=0){var J={data:E.subarray(Q,p-a-1),type:j};g.push(J)}else{var k=this.getLastNalUnit();if(k&&(l&&p<=4-l&&(k.state&&(k.data=k.data.subarray(0,k.data.byteLength-l))),R=p-a-1,R>0)){var Y=new Uint8Array(k.data.byteLength+R);Y.set(k.data,0),Y.set(E.subarray(0,R),k.data.byteLength),k.data=Y,k.state=0}}p<c?(U=E[p]&31,Q=p,j=U,a=0):a=-1}else a=0}if(Q>=0&&a>=0){var ne={data:E.subarray(Q,c),type:j,state:a};g.push(ne)}if(g.length===0){var me=this.getLastNalUnit();if(me){var _e=new Uint8Array(me.data.byteLength+E.byteLength);_e.set(me.data,0),_e.set(E,me.data.byteLength),me.data=_e}}return e.naluState=a,g},y.parseAACPES=function(E){var c=0,e=this._audioTrack,a=this.aacOverFlow,l=E.data;if(a){this.aacOverFlow=null;var g=a.sample.unit.byteLength,p=Math.min(a.missing,g),f=g-p;a.sample.unit.set(l.subarray(0,p),f),e.samples.push(a.sample),c=a.missing}var R,U;for(R=c,U=l.length;R<U-1&&!z.isHeader(l,R);R++);if(R!==c){var Q,j;if(R<U-1?(Q="AAC PES did not start with ADTS header,offset:"+R,j=!1):(Q="no ADTS header found in AAC PES",j=!0),_.logger.warn("parsing error:"+Q),this.observer.emit(L.Events.ERROR,L.Events.ERROR,{type:b.ErrorTypes.MEDIA_ERROR,details:b.ErrorDetails.FRAG_PARSING_ERROR,fatal:j,reason:Q}),j)return}z.initTrackConfig(e,this.observer,l,R,this.audioCodec);var J;if(E.pts!==void 0)J=E.pts;else if(a){var k=z.getFrameDuration(e.samplerate);J=a.sample.pts+k}else{_.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var Y=0;R<U;)if(z.isHeader(l,R)){if(R+5<U){var ne=z.appendFrame(e,l,R,J,Y);if(ne)if(ne.missing)this.aacOverFlow=ne;else{R+=ne.length,Y++;continue}}break}else R++},y.parseMPEGPES=function(E){var c=E.data,e=c.length,a=0,l=0,g=E.pts;if(g===void 0){_.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;l<e;)if(D.isHeader(c,l)){var p=D.appendFrame(this._audioTrack,c,l,g,a);if(p)l+=p.length,a++;else break}else l++},y.parseID3PES=function(E){if(E.pts===void 0){_.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(E)},w}();o.minProbeByteLength=188;function r(w,y,x,E){return{key:w,frame:!1,pts:y,dts:x,units:[],debug:E,length:0}}function A(w,y){return(w[y+10]&31)<<8|w[y+11]}function s(w,y,x,E){var c={audio:-1,avc:-1,id3:-1,isAAC:!0},e=(w[y+1]&15)<<8|w[y+2],a=y+3+e-4,l=(w[y+10]&15)<<8|w[y+11];for(y+=12+l;y<a;){var g=(w[y+1]&31)<<8|w[y+2];switch(w[y]){case 207:if(!E){_.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:c.audio===-1&&(c.audio=g);break;case 21:c.id3===-1&&(c.id3=g);break;case 219:if(!E){_.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:c.avc===-1&&(c.avc=g);break;case 3:case 4:x?c.audio===-1&&(c.audio=g,c.isAAC=!1):_.logger.log("MPEG audio found, not supported in this browser");break;case 36:_.logger.warn("Unsupported HEVC stream type found");break;default:break}y+=((w[y+3]&15)<<8|w[y+4])+5}return c}function t(w){var y=0,x,E,c,e,a,l=w.data;if(!w||w.size===0)return null;for(;l[0].length<19&&l.length>1;){var g=new Uint8Array(l[0].length+l[1].length);g.set(l[0]),g.set(l[1],l[0].length),l[0]=g,l.splice(1,1)}x=l[0];var p=(x[0]<<16)+(x[1]<<8)+x[2];if(p===1){if(E=(x[4]<<8)+x[5],E&&E>w.size-6)return null;var f=x[7];f&192&&(e=(x[9]&14)*536870912+(x[10]&255)*4194304+(x[11]&254)*16384+(x[12]&255)*128+(x[13]&254)/2,f&64?(a=(x[14]&14)*536870912+(x[15]&255)*4194304+(x[16]&254)*16384+(x[17]&255)*128+(x[18]&254)/2,e-a>60*9e4&&(_.logger.warn(Math.round((e-a)/9e4)+"s delta between PTS and DTS, align them"),e=a)):a=e),c=x[8];var R=c+9;if(w.size<=R)return null;w.size-=R;for(var U=new Uint8Array(w.size),Q=0,j=l.length;Q<j;Q++){x=l[Q];var J=x.byteLength;if(R)if(R>J){R-=J;continue}else x=x.subarray(R),J-=R,R=0;U.set(x,y),y+=J}return E&&(E-=c+3),{data:U,pts:e,dts:a,len:E}}return null}function n(w,y){if(w.units.length&&w.frame){if(w.pts===void 0){var x=y.samples,E=x.length;if(E){var c=x[E-1];w.pts=c.pts,w.dts=c.dts}else{y.dropped++;return}}y.samples.push(w)}w.debug.length&&_.logger.log(w.pts+"/"+w.dts+":"+w.debug)}function i(w,y){var x=w.length;if(x>0){if(y.pts>=w[x-1].pts)w.push(y);else for(var E=x-1;E>=0;E--)if(y.pts<w[E].pts){w.splice(E,0,y);break}}else w.push(y)}function B(w){for(var y=w.byteLength,x=[],E=1;E<y-2;)w[E]===0&&w[E+1]===0&&w[E+2]===3?(x.push(E+2),E+=2):E++;if(x.length===0)return w;var c=y-x.length,e=new Uint8Array(c),a=0;for(E=0;E<c;a++,E++)a===x[0]&&(a++,x.shift()),e[E]=w[a];return e}V.default=o},"./src/errors.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"ErrorTypes",function(){return z}),O.d(V,"ErrorDetails",function(){return D});var z;(function(I){I.NETWORK_ERROR="networkError",I.MEDIA_ERROR="mediaError",I.KEY_SYSTEM_ERROR="keySystemError",I.MUX_ERROR="muxError",I.OTHER_ERROR="otherError"})(z||(z={}));var D;(function(I){I.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",I.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",I.KEY_SYSTEM_NO_SESSION="keySystemNoSession",I.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",I.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",I.MANIFEST_LOAD_ERROR="manifestLoadError",I.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",I.MANIFEST_PARSING_ERROR="manifestParsingError",I.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",I.LEVEL_EMPTY_ERROR="levelEmptyError",I.LEVEL_LOAD_ERROR="levelLoadError",I.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",I.LEVEL_SWITCH_ERROR="levelSwitchError",I.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",I.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",I.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",I.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",I.FRAG_LOAD_ERROR="fragLoadError",I.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",I.FRAG_DECRYPT_ERROR="fragDecryptError",I.FRAG_PARSING_ERROR="fragParsingError",I.REMUX_ALLOC_ERROR="remuxAllocError",I.KEY_LOAD_ERROR="keyLoadError",I.KEY_LOAD_TIMEOUT="keyLoadTimeOut",I.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",I.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",I.BUFFER_APPEND_ERROR="bufferAppendError",I.BUFFER_APPENDING_ERROR="bufferAppendingError",I.BUFFER_STALLED_ERROR="bufferStalledError",I.BUFFER_FULL_ERROR="bufferFullError",I.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",I.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",I.INTERNAL_EXCEPTION="internalException",I.INTERNAL_ABORTED="aborted",I.UNKNOWN="unknown"})(D||(D={}))},"./src/events.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"Events",function(){return z});var z;(function(D){D.MEDIA_ATTACHING="hlsMediaAttaching",D.MEDIA_ATTACHED="hlsMediaAttached",D.MEDIA_DETACHING="hlsMediaDetaching",D.MEDIA_DETACHED="hlsMediaDetached",D.BUFFER_RESET="hlsBufferReset",D.BUFFER_CODECS="hlsBufferCodecs",D.BUFFER_CREATED="hlsBufferCreated",D.BUFFER_APPENDING="hlsBufferAppending",D.BUFFER_APPENDED="hlsBufferAppended",D.BUFFER_EOS="hlsBufferEos",D.BUFFER_FLUSHING="hlsBufferFlushing",D.BUFFER_FLUSHED="hlsBufferFlushed",D.MANIFEST_LOADING="hlsManifestLoading",D.MANIFEST_LOADED="hlsManifestLoaded",D.MANIFEST_PARSED="hlsManifestParsed",D.LEVEL_SWITCHING="hlsLevelSwitching",D.LEVEL_SWITCHED="hlsLevelSwitched",D.LEVEL_LOADING="hlsLevelLoading",D.LEVEL_LOADED="hlsLevelLoaded",D.LEVEL_UPDATED="hlsLevelUpdated",D.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",D.LEVELS_UPDATED="hlsLevelsUpdated",D.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",D.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",D.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",D.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",D.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",D.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",D.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",D.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",D.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",D.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",D.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",D.CUES_PARSED="hlsCuesParsed",D.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",D.INIT_PTS_FOUND="hlsInitPtsFound",D.FRAG_LOADING="hlsFragLoading",D.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",D.FRAG_LOADED="hlsFragLoaded",D.FRAG_DECRYPTED="hlsFragDecrypted",D.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",D.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",D.FRAG_PARSING_METADATA="hlsFragParsingMetadata",D.FRAG_PARSED="hlsFragParsed",D.FRAG_BUFFERED="hlsFragBuffered",D.FRAG_CHANGED="hlsFragChanged",D.FPS_DROP="hlsFpsDrop",D.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",D.ERROR="hlsError",D.DESTROYING="hlsDestroying",D.KEY_LOADING="hlsKeyLoading",D.KEY_LOADED="hlsKeyLoaded",D.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",D.BACK_BUFFER_REACHED="hlsBackBufferReached"})(z||(z={}))},"./src/hls.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"default",function(){return w});var z=O("./node_modules/url-toolkit/src/url-toolkit.js"),D=O.n(z),I=O("./src/loader/playlist-loader.ts"),G=O("./src/loader/key-loader.ts"),P=O("./src/controller/id3-track-controller.ts"),L=O("./src/controller/latency-controller.ts"),S=O("./src/controller/level-controller.ts"),_=O("./src/controller/fragment-tracker.ts"),b=O("./src/controller/stream-controller.ts"),u=O("./src/is-supported.ts"),o=O("./src/utils/logger.ts"),r=O("./src/config.ts"),A=O("./node_modules/eventemitter3/index.js"),s=O.n(A),t=O("./src/events.ts"),n=O("./src/errors.ts");function i(y,x){for(var E=0;E<x.length;E++){var c=x[E];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(y,c.key,c)}}function B(y,x,E){return x&&i(y.prototype,x),E&&i(y,E),y}var w=function(){y.isSupported=function(){return Object(u.isSupported)()};function y(E){E===void 0&&(E={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new A.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var c=this.config=Object(r.mergeConfig)(y.DefaultConfig,E);this.userConfig=E,Object(o.enableLogs)(c.debug),this._autoLevelCapping=-1,c.progressive&&Object(r.enableStreamingMode)(c);var e=c.abrController,a=c.bufferController,l=c.capLevelController,g=c.fpsController,p=this.abrController=new e(this),f=this.bufferController=new a(this),R=this.capLevelController=new l(this),U=new g(this),Q=new I.default(this),j=new G.default(this),J=new P.default(this),k=this.levelController=new S.default(this),Y=new _.FragmentTracker(this),ne=this.streamController=new b.default(this,Y);R.setStreamController(ne),U.setStreamController(ne);var me=[k,ne];this.networkControllers=me;var _e=[Q,j,p,f,R,U,J,Y];this.audioTrackController=this.createController(c.audioTrackController,null,me),this.createController(c.audioStreamController,Y,me),this.subtitleTrackController=this.createController(c.subtitleTrackController,null,me),this.createController(c.subtitleStreamController,Y,me),this.createController(c.timelineController,null,_e),this.emeController=this.createController(c.emeController,null,_e),this.cmcdController=this.createController(c.cmcdController,null,_e),this.latencyController=this.createController(L.default,null,_e),this.coreComponents=_e}var x=y.prototype;return x.createController=function(c,e,a){if(c){var l=e?new c(this,e):new c(this);return a&&a.push(l),l}return null},x.on=function(c,e,a){a===void 0&&(a=this),this._emitter.on(c,e,a)},x.once=function(c,e,a){a===void 0&&(a=this),this._emitter.once(c,e,a)},x.removeAllListeners=function(c){this._emitter.removeAllListeners(c)},x.off=function(c,e,a,l){a===void 0&&(a=this),this._emitter.off(c,e,a,l)},x.listeners=function(c){return this._emitter.listeners(c)},x.emit=function(c,e,a){return this._emitter.emit(c,e,a)},x.trigger=function(c,e){if(this.config.debug)return this.emit(c,c,e);try{return this.emit(c,c,e)}catch(a){o.logger.error("An internal error happened while handling event "+c+'. Error message: "'+a.message+'". Here is a stacktrace:',a),this.trigger(t.Events.ERROR,{type:n.ErrorTypes.OTHER_ERROR,details:n.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:c,error:a})}return!1},x.listenerCount=function(c){return this._emitter.listenerCount(c)},x.destroy=function(){o.logger.log("destroy"),this.trigger(t.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(c){return c.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(c){return c.destroy()}),this.coreComponents.length=0},x.attachMedia=function(c){o.logger.log("attachMedia"),this._media=c,this.trigger(t.Events.MEDIA_ATTACHING,{media:c})},x.detachMedia=function(){o.logger.log("detachMedia"),this.trigger(t.Events.MEDIA_DETACHING,void 0),this._media=null},x.loadSource=function(c){this.stopLoad();var e=this.media,a=this.url,l=this.url=z.buildAbsoluteURL(self.location.href,c,{alwaysNormalize:!0});o.logger.log("loadSource:"+l),e&&a&&a!==l&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(e)),this.trigger(t.Events.MANIFEST_LOADING,{url:c})},x.startLoad=function(c){c===void 0&&(c=-1),o.logger.log("startLoad("+c+")"),this.networkControllers.forEach(function(e){e.startLoad(c)})},x.stopLoad=function(){o.logger.log("stopLoad"),this.networkControllers.forEach(function(c){c.stopLoad()})},x.swapAudioCodec=function(){o.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},x.recoverMediaError=function(){o.logger.log("recoverMediaError");var c=this._media;this.detachMedia(),c&&this.attachMedia(c)},x.removeLevel=function(c,e){e===void 0&&(e=0),this.levelController.removeLevel(c,e)},B(y,[{key:"levels",get:function(){var c=this.levelController.levels;return c||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(c){o.logger.log("set currentLevel:"+c),this.loadLevel=c,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(c){o.logger.log("set nextLevel:"+c),this.levelController.manualLevel=c,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(c){o.logger.log("set loadLevel:"+c),this.levelController.manualLevel=c}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(c){this.levelController.nextLoadLevel=c}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(c){o.logger.log("set firstLevel:"+c),this.levelController.firstLevel=c}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(c){o.logger.log("set startLevel:"+c),c!==-1&&(c=Math.max(c,this.minAutoLevel)),this.levelController.startLevel=c}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(c){var e=!!c;e!==this.config.capLevelToPlayerSize&&(e?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=e)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(c){this._autoLevelCapping!==c&&(o.logger.log("set autoLevelCapping:"+c),this._autoLevelCapping=c)}},{key:"bandwidthEstimate",get:function(){var c=this.abrController.bwEstimator;return c?c.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var c=this.levels,e=this.config.minAutoBitrate;if(!c)return 0;for(var a=c.length,l=0;l<a;l++)if(c[l].maxBitrate>e)return l;return 0}},{key:"maxAutoLevel",get:function(){var c=this.levels,e=this.autoLevelCapping,a;return e===-1&&c&&c.length?a=c.length-1:a=e,a}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(c){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,c)}},{key:"audioTracks",get:function(){var c=this.audioTrackController;return c?c.audioTracks:[]}},{key:"audioTrack",get:function(){var c=this.audioTrackController;return c?c.audioTrack:-1},set:function(c){var e=this.audioTrackController;e&&(e.audioTrack=c)}},{key:"subtitleTracks",get:function(){var c=this.subtitleTrackController;return c?c.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var c=this.subtitleTrackController;return c?c.subtitleTrack:-1},set:function(c){var e=this.subtitleTrackController;e&&(e.subtitleTrack=c)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var c=this.subtitleTrackController;return c?c.subtitleDisplay:!1},set:function(c){var e=this.subtitleTrackController;e&&(e.subtitleDisplay=c)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(c){this.config.lowLatencyMode=c}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return t.Events}},{key:"ErrorTypes",get:function(){return n.ErrorTypes}},{key:"ErrorDetails",get:function(){return n.ErrorDetails}},{key:"DefaultConfig",get:function(){return y.defaultConfig?y.defaultConfig:r.hlsDefaultConfig},set:function(c){y.defaultConfig=c}}]),y}();w.defaultConfig=void 0},"./src/is-supported.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"isSupported",function(){return I}),O.d(V,"changeTypeSupported",function(){return G});var z=O("./src/utils/mediasource-helper.ts");function D(){return self.SourceBuffer||self.WebKitSourceBuffer}function I(){var P=Object(z.getMediaSource)();if(!P)return!1;var L=D(),S=P&&typeof P.isTypeSupported=="function"&&P.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),_=!L||L.prototype&&typeof L.prototype.appendBuffer=="function"&&typeof L.prototype.remove=="function";return!!S&&!!_}function G(){var P,L=D();return typeof(L==null||((P=L.prototype)===null||P===void 0)?void 0:P.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"default",function(){return o}),O.d(V,"LoadError",function(){return A});var z=O("./src/polyfills/number.ts"),D=O("./src/errors.ts");function I(s,t){s.prototype=Object.create(t.prototype),s.prototype.constructor=s,_(s,t)}function G(s){var t=typeof Map=="function"?new Map:void 0;return G=function(i){if(i===null||!S(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(i))return t.get(i);t.set(i,B)}function B(){return P(i,arguments,b(this).constructor)}return B.prototype=Object.create(i.prototype,{constructor:{value:B,enumerable:!1,writable:!0,configurable:!0}}),_(B,i)},G(s)}function P(s,t,n){return L()?P=Reflect.construct:P=function(B,w,y){var x=[null];x.push.apply(x,w);var E=Function.bind.apply(B,x),c=new E;return y&&_(c,y.prototype),c},P.apply(null,arguments)}function L(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(s){return!1}}function S(s){return Function.toString.call(s).indexOf("[native code]")!==-1}function _(s,t){return _=Object.setPrototypeOf||function(i,B){return i.__proto__=B,i},_(s,t)}function b(s){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},b(s)}var u=Math.pow(2,17),o=function(){function s(n){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=n}var t=s.prototype;return t.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},t.abort=function(){this.loader&&this.loader.abort()},t.load=function(i,B){var w=this,y=i.url;if(!y)return Promise.reject(new A({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:i,networkDetails:null},"Fragment does not have a "+(y?"part list":"url")));this.abort();var x=this.config,E=x.fLoader,c=x.loader;return new Promise(function(e,a){w.loader&&w.loader.destroy();var l=w.loader=i.loader=E?new E(x):new c(x),g=r(i),p={timeout:x.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:x.fragLoadingMaxRetryTimeout,highWaterMark:u};i.stats=l.stats,l.load(g,p,{onSuccess:function(R,U,Q,j){w.resetLoader(i,l),e({frag:i,part:null,payload:R.data,networkDetails:j})},onError:function(R,U,Q){w.resetLoader(i,l),a(new A({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:i,response:R,networkDetails:Q}))},onAbort:function(R,U,Q){w.resetLoader(i,l),a(new A({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:i,networkDetails:Q}))},onTimeout:function(R,U,Q){w.resetLoader(i,l),a(new A({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:i,networkDetails:Q}))},onProgress:function(R,U,Q,j){B&&B({frag:i,part:null,payload:Q,networkDetails:j})}})})},t.loadPart=function(i,B,w){var y=this;this.abort();var x=this.config,E=x.fLoader,c=x.loader;return new Promise(function(e,a){y.loader&&y.loader.destroy();var l=y.loader=i.loader=E?new E(x):new c(x),g=r(i,B),p={timeout:x.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:x.fragLoadingMaxRetryTimeout,highWaterMark:u};B.stats=l.stats,l.load(g,p,{onSuccess:function(R,U,Q,j){y.resetLoader(i,l),y.updateStatsFromPart(i,B);var J={frag:i,part:B,payload:R.data,networkDetails:j};w(J),e(J)},onError:function(R,U,Q){y.resetLoader(i,l),a(new A({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:i,part:B,response:R,networkDetails:Q}))},onAbort:function(R,U,Q){i.stats.aborted=B.stats.aborted,y.resetLoader(i,l),a(new A({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:i,part:B,networkDetails:Q}))},onTimeout:function(R,U,Q){y.resetLoader(i,l),a(new A({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:i,part:B,networkDetails:Q}))}})})},t.updateStatsFromPart=function(i,B){var w=i.stats,y=B.stats,x=y.total;if(w.loaded+=y.loaded,x){var E=Math.round(i.duration/B.duration),c=Math.min(Math.round(w.loaded/x),E),e=E-c,a=e*Math.round(w.loaded/c);w.total=w.loaded+a}else w.total=Math.max(w.loaded,w.total);var l=w.loading,g=y.loading;l.start?l.first+=g.first-g.start:(l.start=g.start,l.first=g.first),l.end=g.end},t.resetLoader=function(i,B){i.loader=null,this.loader===B&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),B.destroy()},s}();function r(s,t){t===void 0&&(t=null);var n=t||s,i={frag:s,part:t,responseType:"arraybuffer",url:n.url,headers:{},rangeStart:0,rangeEnd:0},B=n.byteRangeStartOffset,w=n.byteRangeEndOffset;return Object(z.isFiniteNumber)(B)&&Object(z.isFiniteNumber)(w)&&(i.rangeStart=B,i.rangeEnd=w),i}var A=function(s){I(t,s);function t(n){for(var i,B=arguments.length,w=new Array(B>1?B-1:0),y=1;y<B;y++)w[y-1]=arguments[y];return i=s.call.apply(s,[this].concat(w))||this,i.data=void 0,i.data=n,i}return t}(G(Error))},"./src/loader/fragment.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"ElementaryStreamTypes",function(){return o}),O.d(V,"BaseSegment",function(){return r}),O.d(V,"Fragment",function(){return A}),O.d(V,"Part",function(){return s});var z=O("./src/polyfills/number.ts"),D=O("./node_modules/url-toolkit/src/url-toolkit.js"),I=O.n(D),G=O("./src/utils/logger.ts"),P=O("./src/loader/level-key.ts"),L=O("./src/loader/load-stats.ts");function S(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,_(t,n)}function _(t,n){return _=Object.setPrototypeOf||function(B,w){return B.__proto__=w,B},_(t,n)}function b(t,n){for(var i=0;i<n.length;i++){var B=n[i];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(t,B.key,B)}}function u(t,n,i){return n&&b(t.prototype,n),i&&b(t,i),t}var o;(function(t){t.AUDIO="audio",t.VIDEO="video",t.AUDIOVIDEO="audiovideo"})(o||(o={}));var r=function(){function t(i){var B;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(B={},B[o.AUDIO]=null,B[o.VIDEO]=null,B[o.AUDIOVIDEO]=null,B),this.baseurl=i}var n=t.prototype;return n.setByteRange=function(B,w){var y=B.split("@",2),x=[];y.length===1?x[0]=w?w.byteRangeEndOffset:0:x[0]=parseInt(y[1]),x[1]=parseInt(y[0])+x[0],this._byteRange=x},u(t,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(D.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(B){this._url=B}}]),t}(),A=function(t){S(n,t);function n(B,w){var y;return y=t.call(this,w)||this,y._decryptdata=null,y.rawProgramDateTime=null,y.programDateTime=null,y.tagList=[],y.duration=0,y.sn=0,y.levelkey=void 0,y.type=void 0,y.loader=null,y.level=-1,y.cc=0,y.startPTS=void 0,y.endPTS=void 0,y.appendedPTS=void 0,y.startDTS=void 0,y.endDTS=void 0,y.start=0,y.deltaPTS=void 0,y.maxStartPTS=void 0,y.minEndPTS=void 0,y.stats=new L.LoadStats,y.urlId=0,y.data=void 0,y.bitrateTest=!1,y.title=null,y.initSegment=null,y.type=B,y}var i=n.prototype;return i.createInitializationVector=function(w){for(var y=new Uint8Array(16),x=12;x<16;x++)y[x]=w>>8*(15-x)&255;return y},i.setDecryptDataFromLevelKey=function(w,y){var x=w;return(w==null?void 0:w.method)==="AES-128"&&w.uri&&!w.iv&&(x=P.LevelKey.fromURI(w.uri),x.method=w.method,x.iv=this.createInitializationVector(y),x.keyFormat="identity"),x},i.setElementaryStreamInfo=function(w,y,x,E,c,e){e===void 0&&(e=!1);var a=this.elementaryStreams,l=a[w];if(!l){a[w]={startPTS:y,endPTS:x,startDTS:E,endDTS:c,partial:e};return}l.startPTS=Math.min(l.startPTS,y),l.endPTS=Math.max(l.endPTS,x),l.startDTS=Math.min(l.startDTS,E),l.endDTS=Math.max(l.endDTS,c)},i.clearElementaryStreamInfo=function(){var w=this.elementaryStreams;w[o.AUDIO]=null,w[o.VIDEO]=null,w[o.AUDIOVIDEO]=null},u(n,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var w=this.sn;typeof w!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&G.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),w=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,w)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(z.isFiniteNumber)(this.programDateTime))return null;var w=Object(z.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+w*1e3}},{key:"encrypted",get:function(){var w;return!!((w=this.decryptdata)!==null&&w!==void 0&&w.keyFormat&&this.decryptdata.uri)}}]),n}(r),s=function(t){S(n,t);function n(i,B,w,y,x){var E;E=t.call(this,w)||this,E.fragOffset=0,E.duration=0,E.gap=!1,E.independent=!1,E.relurl=void 0,E.fragment=void 0,E.index=void 0,E.stats=new L.LoadStats,E.duration=i.decimalFloatingPoint("DURATION"),E.gap=i.bool("GAP"),E.independent=i.bool("INDEPENDENT"),E.relurl=i.enumeratedString("URI"),E.fragment=B,E.index=y;var c=i.enumeratedString("BYTERANGE");return c&&E.setByteRange(c,x),x&&(E.fragOffset=x.fragOffset+x.duration),E}return u(n,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var B=this.elementaryStreams;return!!(B.audio||B.video||B.audiovideo)}}]),n}(r)},"./src/loader/key-loader.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"default",function(){return G});var z=O("./src/events.ts"),D=O("./src/errors.ts"),I=O("./src/utils/logger.ts"),G=function(){function P(S){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=S,this._registerListeners()}var L=P.prototype;return L._registerListeners=function(){this.hls.on(z.Events.KEY_LOADING,this.onKeyLoading,this)},L._unregisterListeners=function(){this.hls.off(z.Events.KEY_LOADING,this.onKeyLoading)},L.destroy=function(){this._unregisterListeners();for(var _ in this.loaders){var b=this.loaders[_];b&&b.destroy()}this.loaders={}},L.onKeyLoading=function(_,b){var u=b.frag,o=u.type,r=this.loaders[o];if(!u.decryptdata){I.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var A=u.decryptdata.uri;if(A!==this.decrypturl||this.decryptkey===null){var s=this.hls.config;if(r&&(I.logger.warn("abort previous key loader for type:"+o),r.abort()),!A){I.logger.warn("key uri is falsy");return}var t=s.loader,n=u.loader=this.loaders[o]=new t(s);this.decrypturl=A,this.decryptkey=null;var i={url:A,frag:u,responseType:"arraybuffer"},B={timeout:s.fragLoadingTimeOut,maxRetry:0,retryDelay:s.fragLoadingRetryDelay,maxRetryDelay:s.fragLoadingMaxRetryTimeout,highWaterMark:0},w={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};n.load(i,B,w)}else this.decryptkey&&(u.decryptdata.key=this.decryptkey,this.hls.trigger(z.Events.KEY_LOADED,{frag:u}))},L.loadsuccess=function(_,b,u){var o=u.frag;if(!o.decryptdata){I.logger.error("after key load, decryptdata unset");return}this.decryptkey=o.decryptdata.key=new Uint8Array(_.data),o.loader=null,delete this.loaders[o.type],this.hls.trigger(z.Events.KEY_LOADED,{frag:o})},L.loaderror=function(_,b){var u=b.frag,o=u.loader;o&&o.abort(),delete this.loaders[u.type],this.hls.trigger(z.Events.ERROR,{type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:u,response:_})},L.loadtimeout=function(_,b){var u=b.frag,o=u.loader;o&&o.abort(),delete this.loaders[u.type],this.hls.trigger(z.Events.ERROR,{type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:u})},P}()},"./src/loader/level-details.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"LevelDetails",function(){return P});var z=O("./src/polyfills/number.ts");function D(L,S){for(var _=0;_<S.length;_++){var b=S[_];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(L,b.key,b)}}function I(L,S,_){return S&&D(L.prototype,S),_&&D(L,_),L}var G=10,P=function(){function L(_){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.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,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.fragments=[],this.url=_}var S=L.prototype;return S.reloaded=function(b){if(!b){this.advanced=!0,this.updated=!0;return}var u=this.lastPartSn-b.lastPartSn,o=this.lastPartIndex-b.lastPartIndex;this.updated=this.endSN!==b.endSN||!!o||!!u,this.advanced=this.endSN>b.endSN||u>0||u===0&&o>0,this.updated||this.advanced?this.misses=Math.floor(b.misses*.6):this.misses=b.misses+1,this.availabilityDelay=b.availabilityDelay},I(L,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(z.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||G}},{key:"drift",get:function(){var b=this.driftEndTime-this.driftStartTime;if(b>0){var u=this.driftEnd-this.driftStart;return u*1e3/b}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var b;return(b=this.partList)!==null&&b!==void 0&&b.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var b;return(b=this.fragments)!==null&&b!==void 0&&b.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var b;return(b=this.partList)!==null&&b!==void 0&&b.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var b;return(b=this.partList)!==null&&b!==void 0&&b.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),L}()},"./src/loader/level-key.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"LevelKey",function(){return P});var z=O("./node_modules/url-toolkit/src/url-toolkit.js"),D=O.n(z);function I(L,S){for(var _=0;_<S.length;_++){var b=S[_];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(L,b.key,b)}}function G(L,S,_){return S&&I(L.prototype,S),_&&I(L,_),L}var P=function(){L.fromURL=function(_,b){return new L(_,b)},L.fromURI=function(_){return new L(_)};function L(S,_){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,_?this._uri=Object(z.buildAbsoluteURL)(S,_,{alwaysNormalize:!0}):this._uri=S}return G(L,[{key:"uri",get:function(){return this._uri}}]),L}()},"./src/loader/load-stats.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"LoadStats",function(){return z});var z=function(){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}}},"./src/loader/m3u8-parser.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"default",function(){return n});var z=O("./src/polyfills/number.ts"),D=O("./node_modules/url-toolkit/src/url-toolkit.js"),I=O.n(D),G=O("./src/loader/fragment.ts"),P=O("./src/loader/level-details.ts"),L=O("./src/loader/level-key.ts"),S=O("./src/utils/attr-list.ts"),_=O("./src/utils/logger.ts"),b=O("./src/utils/codecs.ts"),u=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,o=/#EXT-X-MEDIA:(.*)/g,r=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),A=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),s=/\.(mp4|m4s|m4v|m4a)$/i;function t(x){var E,c;return s.test((E=(c=D.parseURL(x))===null||c===void 0?void 0:c.path)!=null?E:"")}var n=function(){function x(){}return x.findGroup=function(c,e){for(var a=0;a<c.length;a++){var l=c[a];if(l.id===e)return l}},x.convertAVC1ToAVCOTI=function(c){var e=c.split(".");if(e.length>2){var a=e.shift()+".";return a+=parseInt(e.shift()).toString(16),a+=("000"+parseInt(e.shift()).toString(16)).substr(-4),a}return c},x.resolve=function(c,e){return D.buildAbsoluteURL(e,c,{alwaysNormalize:!0})},x.parseMasterPlaylist=function(c,e){var a=[],l={},g=!1;u.lastIndex=0;for(var p;(p=u.exec(c))!=null;)if(p[1]){var f=new S.AttrList(p[1]),R={attrs:f,bitrate:f.decimalInteger("AVERAGE-BANDWIDTH")||f.decimalInteger("BANDWIDTH"),name:f.NAME,url:x.resolve(p[2],e)},U=f.decimalResolution("RESOLUTION");U&&(R.width=U.width,R.height=U.height),i((f.CODECS||"").split(/[ ,]+/).filter(function(j){return j}),R),R.videoCodec&&R.videoCodec.indexOf("avc1")!==-1&&(R.videoCodec=x.convertAVC1ToAVCOTI(R.videoCodec)),a.push(R)}else if(p[3]){var Q=new S.AttrList(p[3]);Q["DATA-ID"]&&(g=!0,l[Q["DATA-ID"]]=Q)}return{levels:a,sessionData:g?l:null}},x.parseMasterPlaylistMedia=function(c,e,a,l){l===void 0&&(l=[]);var g,p=[],f=0;for(o.lastIndex=0;(g=o.exec(c))!==null;){var R=new S.AttrList(g[1]);if(R.TYPE===a){var U={attrs:R,bitrate:0,id:f++,groupId:R["GROUP-ID"],instreamId:R["INSTREAM-ID"],name:R.NAME||R.LANGUAGE||"",type:a,default:R.bool("DEFAULT"),autoselect:R.bool("AUTOSELECT"),forced:R.bool("FORCED"),lang:R.LANGUAGE,url:R.URI?x.resolve(R.URI,e):""};if(l.length){var Q=x.findGroup(l,U.groupId)||l[0];B(U,Q,"audioCodec"),B(U,Q,"textCodec")}p.push(U)}}return p},x.parseLevelPlaylist=function(c,e,a,l,g){var p=new P.LevelDetails(e),f=p.fragments,R=null,U=0,Q=0,j=0,J=0,k=null,Y=new G.Fragment(l,e),ne,me,_e,Oe=-1,xe=!1;for(r.lastIndex=0,p.m3u8=c;(ne=r.exec(c))!==null;){xe&&(xe=!1,Y=new G.Fragment(l,e),Y.start=j,Y.sn=U,Y.cc=J,Y.level=a,R&&(Y.initSegment=R,Y.rawProgramDateTime=R.rawProgramDateTime));var Se=ne[1];if(Se){Y.duration=parseFloat(Se);var Fe=(" "+ne[2]).slice(1);Y.title=Fe||null,Y.tagList.push(Fe?["INF",Se,Fe]:["INF",Se])}else if(ne[3])Object(z.isFiniteNumber)(Y.duration)&&(Y.start=j,_e&&(Y.levelkey=_e),Y.sn=U,Y.level=a,Y.cc=J,Y.urlId=g,f.push(Y),Y.relurl=(" "+ne[3]).slice(1),y(Y,k),k=Y,j+=Y.duration,U++,Q=0,xe=!0);else if(ne[4]){var Pe=(" "+ne[4]).slice(1);k?Y.setByteRange(Pe,k):Y.setByteRange(Pe)}else if(ne[5])Y.rawProgramDateTime=(" "+ne[5]).slice(1),Y.tagList.push(["PROGRAM-DATE-TIME",Y.rawProgramDateTime]),Oe===-1&&(Oe=f.length);else{if(ne=ne[0].match(A),!ne){_.logger.warn("No matches on slow regex match for level playlist!");continue}for(me=1;me<ne.length&&!(typeof ne[me]!="undefined");me++);var Ee=(" "+ne[me]).slice(1),he=(" "+ne[me+1]).slice(1),Ge=ne[me+2]?(" "+ne[me+2]).slice(1):"";switch(Ee){case"PLAYLIST-TYPE":p.type=he.toUpperCase();break;case"MEDIA-SEQUENCE":U=p.startSN=parseInt(he);break;case"SKIP":{var lt=new S.AttrList(he),at=lt.decimalInteger("SKIPPED-SEGMENTS");if(Object(z.isFiniteNumber)(at)){p.skippedSegments=at;for(var je=at;je--;)f.unshift(null);U+=at}var it=lt.enumeratedString("RECENTLY-REMOVED-DATERANGES");it&&(p.recentlyRemovedDateranges=it.split(" "));break}case"TARGETDURATION":p.targetduration=parseFloat(he);break;case"VERSION":p.version=parseInt(he);break;case"EXTM3U":break;case"ENDLIST":p.live=!1;break;case"#":(he||Ge)&&Y.tagList.push(Ge?[he,Ge]:[he]);break;case"DIS":J++;case"GAP":Y.tagList.push([Ee]);break;case"BITRATE":Y.tagList.push([Ee,he]);break;case"DISCONTINUITY-SEQ":J=parseInt(he);break;case"KEY":{var ee,W=new S.AttrList(he),F=W.enumeratedString("METHOD"),oe=W.URI,re=W.hexadecimalInteger("IV"),we=W.enumeratedString("KEYFORMATVERSIONS"),be=W.enumeratedString("KEYID"),nt=(ee=W.enumeratedString("KEYFORMAT"))!=null?ee:"identity",tt=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(tt.indexOf(nt)>-1){_.logger.warn("Keyformat "+nt+" is not supported from the manifest");continue}else if(nt!=="identity")continue;F&&(_e=L.LevelKey.fromURL(e,oe),oe&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(F)>=0&&(_e.method=F,_e.keyFormat=nt,be&&(_e.keyID=be),we&&(_e.keyFormatVersions=we),_e.iv=re));break}case"START":{var Ye=new S.AttrList(he),qe=Ye.decimalFloatingPoint("TIME-OFFSET");Object(z.isFiniteNumber)(qe)&&(p.startTimeOffset=qe);break}case"MAP":{var At=new S.AttrList(he);Y.relurl=At.URI,At.BYTERANGE&&Y.setByteRange(At.BYTERANGE),Y.level=a,Y.sn="initSegment",_e&&(Y.levelkey=_e),Y.initSegment=null,R=Y,xe=!0;break}case"SERVER-CONTROL":{var ft=new S.AttrList(he);p.canBlockReload=ft.bool("CAN-BLOCK-RELOAD"),p.canSkipUntil=ft.optionalFloat("CAN-SKIP-UNTIL",0),p.canSkipDateRanges=p.canSkipUntil>0&&ft.bool("CAN-SKIP-DATERANGES"),p.partHoldBack=ft.optionalFloat("PART-HOLD-BACK",0),p.holdBack=ft.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Ce=new S.AttrList(he);p.partTarget=Ce.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ue=p.partList;Ue||(Ue=p.partList=[]);var Qe=Q>0?Ue[Ue.length-1]:void 0,He=Q++,Ie=new G.Part(new S.AttrList(he),Y,e,He,Qe);Ue.push(Ie),Y.duration+=Ie.duration;break}case"PRELOAD-HINT":{var Me=new S.AttrList(he);p.preloadHint=Me;break}case"RENDITION-REPORT":{var ye=new S.AttrList(he);p.renditionReports=p.renditionReports||[],p.renditionReports.push(ye);break}default:_.logger.warn("line parsed but not handled: "+ne);break}}}k&&!k.relurl?(f.pop(),j-=k.duration,p.partList&&(p.fragmentHint=k)):p.partList&&(y(Y,k),Y.cc=J,p.fragmentHint=Y);var le=f.length,ue=f[0],Z=f[le-1];if(j+=p.skippedSegments*p.targetduration,j>0&&le&&Z){p.averagetargetduration=j/le;var te=Z.sn;p.endSN=te!=="initSegment"?te:0,ue&&(p.startCC=ue.cc,ue.initSegment||p.fragments.every(function(Ae){return Ae.relurl&&t(Ae.relurl)})&&(_.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),Y=new G.Fragment(l,e),Y.relurl=Z.relurl,Y.level=a,Y.sn="initSegment",ue.initSegment=Y,p.needSidxRanges=!0))}else p.endSN=0,p.startCC=0;return p.fragmentHint&&(j+=p.fragmentHint.duration),p.totalduration=j,p.endCC=J,Oe>0&&w(f,Oe),p},x}();function i(x,E){["video","audio","text"].forEach(function(c){var e=x.filter(function(l){return Object(b.isCodecType)(l,c)});if(e.length){var a=e.filter(function(l){return l.lastIndexOf("avc1",0)===0||l.lastIndexOf("mp4a",0)===0});E[c+"Codec"]=a.length>0?a[0]:e[0],x=x.filter(function(l){return e.indexOf(l)===-1})}}),E.unknownCodecs=x}function B(x,E,c){var e=E[c];e&&(x[c]=e)}function w(x,E){for(var c=x[E],e=E;e--;){var a=x[e];if(!a)return;a.programDateTime=c.programDateTime-a.duration*1e3,c=a}}function y(x,E){x.rawProgramDateTime?x.programDateTime=Date.parse(x.rawProgramDateTime):E!=null&&E.programDateTime&&(x.programDateTime=E.endProgramDateTime),Object(z.isFiniteNumber)(x.programDateTime)||(x.programDateTime=null,x.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(ve,V,O){"use strict";O.r(V);var z=O("./src/polyfills/number.ts"),D=O("./src/events.ts"),I=O("./src/errors.ts"),G=O("./src/utils/logger.ts"),P=O("./src/utils/mp4-tools.ts"),L=O("./src/loader/m3u8-parser.ts"),S=O("./src/types/loader.ts"),_=O("./src/utils/attr-list.ts");function b(r){var A=r.type;switch(A){case S.PlaylistContextType.AUDIO_TRACK:return S.PlaylistLevelType.AUDIO;case S.PlaylistContextType.SUBTITLE_TRACK:return S.PlaylistLevelType.SUBTITLE;default:return S.PlaylistLevelType.MAIN}}function u(r,A){var s=r.url;return(s===void 0||s.indexOf("data:")===0)&&(s=A.url),s}var o=function(){function r(s){this.hls=void 0,this.loaders=Object.create(null),this.hls=s,this.registerListeners()}var A=r.prototype;return A.registerListeners=function(){var t=this.hls;t.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(D.Events.LEVEL_LOADING,this.onLevelLoading,this),t.on(D.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.on(D.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},A.unregisterListeners=function(){var t=this.hls;t.off(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(D.Events.LEVEL_LOADING,this.onLevelLoading,this),t.off(D.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.off(D.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},A.createInternalLoader=function(t){var n=this.hls.config,i=n.pLoader,B=n.loader,w=i||B,y=new w(n);return t.loader=y,this.loaders[t.type]=y,y},A.getInternalLoader=function(t){return this.loaders[t.type]},A.resetInternalLoader=function(t){this.loaders[t]&&delete this.loaders[t]},A.destroyInternalLoaders=function(){for(var t in this.loaders){var n=this.loaders[t];n&&n.destroy(),this.resetInternalLoader(t)}},A.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},A.onManifestLoading=function(t,n){var i=n.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:S.PlaylistContextType.MANIFEST,url:i,deliveryDirectives:null})},A.onLevelLoading=function(t,n){var i=n.id,B=n.level,w=n.url,y=n.deliveryDirectives;this.load({id:i,groupId:null,level:B,responseType:"text",type:S.PlaylistContextType.LEVEL,url:w,deliveryDirectives:y})},A.onAudioTrackLoading=function(t,n){var i=n.id,B=n.groupId,w=n.url,y=n.deliveryDirectives;this.load({id:i,groupId:B,level:null,responseType:"text",type:S.PlaylistContextType.AUDIO_TRACK,url:w,deliveryDirectives:y})},A.onSubtitleTrackLoading=function(t,n){var i=n.id,B=n.groupId,w=n.url,y=n.deliveryDirectives;this.load({id:i,groupId:B,level:null,responseType:"text",type:S.PlaylistContextType.SUBTITLE_TRACK,url:w,deliveryDirectives:y})},A.load=function(t){var n,i=this.hls.config,B=this.getInternalLoader(t);if(B){var w=B.context;if(w&&w.url===t.url){G.logger.trace("[playlist-loader]: playlist request ongoing");return}G.logger.log("[playlist-loader]: aborting previous loader for type: "+t.type),B.abort()}var y,x,E,c;switch(t.type){case S.PlaylistContextType.MANIFEST:y=i.manifestLoadingMaxRetry,x=i.manifestLoadingTimeOut,E=i.manifestLoadingRetryDelay,c=i.manifestLoadingMaxRetryTimeout;break;case S.PlaylistContextType.LEVEL:case S.PlaylistContextType.AUDIO_TRACK:case S.PlaylistContextType.SUBTITLE_TRACK:y=0,x=i.levelLoadingTimeOut;break;default:y=i.levelLoadingMaxRetry,x=i.levelLoadingTimeOut,E=i.levelLoadingRetryDelay,c=i.levelLoadingMaxRetryTimeout;break}if(B=this.createInternalLoader(t),(n=t.deliveryDirectives)!==null&&n!==void 0&&n.part){var e;if(t.type===S.PlaylistContextType.LEVEL&&t.level!==null?e=this.hls.levels[t.level].details:t.type===S.PlaylistContextType.AUDIO_TRACK&&t.id!==null?e=this.hls.audioTracks[t.id].details:t.type===S.PlaylistContextType.SUBTITLE_TRACK&&t.id!==null&&(e=this.hls.subtitleTracks[t.id].details),e){var a=e.partTarget,l=e.targetduration;a&&l&&(x=Math.min(Math.max(a*3,l*.8)*1e3,x))}}var g={timeout:x,maxRetry:y,retryDelay:E,maxRetryDelay:c,highWaterMark:0},p={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};B.load(t,g,p)},A.loadsuccess=function(t,n,i,B){if(B===void 0&&(B=null),i.isSidxRequest){this.handleSidxRequest(t,i),this.handlePlaylistLoaded(t,n,i,B);return}this.resetInternalLoader(i.type);var w=t.data;if(w.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(t,i,"no EXTM3U delimiter",B);return}n.parsing.start=performance.now(),w.indexOf("#EXTINF:")>0||w.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(t,n,i,B):this.handleMasterPlaylist(t,n,i,B)},A.loaderror=function(t,n,i){i===void 0&&(i=null),this.handleNetworkError(n,i,!1,t)},A.loadtimeout=function(t,n,i){i===void 0&&(i=null),this.handleNetworkError(n,i,!0)},A.handleMasterPlaylist=function(t,n,i,B){var w=this.hls,y=t.data,x=u(t,i),E=L.default.parseMasterPlaylist(y,x),c=E.levels,e=E.sessionData;if(!c.length){this.handleManifestParsingError(t,i,"no level found in manifest",B);return}var a=c.map(function(U){return{id:U.attrs.AUDIO,audioCodec:U.audioCodec}}),l=c.map(function(U){return{id:U.attrs.SUBTITLES,textCodec:U.textCodec}}),g=L.default.parseMasterPlaylistMedia(y,x,"AUDIO",a),p=L.default.parseMasterPlaylistMedia(y,x,"SUBTITLES",l),f=L.default.parseMasterPlaylistMedia(y,x,"CLOSED-CAPTIONS");if(g.length){var R=g.some(function(U){return!U.url});!R&&c[0].audioCodec&&!c[0].attrs.AUDIO&&(G.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),g.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new _.AttrList({}),bitrate:0,url:""}))}w.trigger(D.Events.MANIFEST_LOADED,{levels:c,audioTracks:g,subtitles:p,captions:f,url:x,stats:n,networkDetails:B,sessionData:e})},A.handleTrackOrLevelPlaylist=function(t,n,i,B){var w=this.hls,y=i.id,x=i.level,E=i.type,c=u(t,i),e=Object(z.isFiniteNumber)(y)?y:0,a=Object(z.isFiniteNumber)(x)?x:e,l=b(i),g=L.default.parseLevelPlaylist(t.data,c,a,l,e);if(!g.fragments.length){w.trigger(D.Events.ERROR,{type:I.ErrorTypes.NETWORK_ERROR,details:I.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:c,reason:"no fragments found in level",level:typeof i.level=="number"?i.level:void 0});return}if(E===S.PlaylistContextType.MANIFEST){var p={attrs:new _.AttrList({}),bitrate:0,details:g,name:"",url:c};w.trigger(D.Events.MANIFEST_LOADED,{levels:[p],audioTracks:[],url:c,stats:n,networkDetails:B,sessionData:null})}if(n.parsing.end=performance.now(),g.needSidxRanges){var f,R=(f=g.fragments[0].initSegment)===null||f===void 0?void 0:f.url;this.load({url:R,isSidxRequest:!0,type:E,level:x,levelDetails:g,id:y,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}i.levelDetails=g,this.handlePlaylistLoaded(t,n,i,B)},A.handleSidxRequest=function(t,n){var i=Object(P.parseSegmentIndex)(new Uint8Array(t.data));if(!i)return;var B=i.references,w=n.levelDetails;B.forEach(function(y,x){var E=y.info,c=w.fragments[x];c.byteRange.length===0&&c.setByteRange(String(1+E.end-E.start)+"@"+String(E.start)),c.initSegment&&c.initSegment.setByteRange(String(i.moovEndOffset)+"@0")})},A.handleManifestParsingError=function(t,n,i,B){this.hls.trigger(D.Events.ERROR,{type:I.ErrorTypes.NETWORK_ERROR,details:I.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:n.type===S.PlaylistContextType.MANIFEST,url:t.url,reason:i,response:t,context:n,networkDetails:B})},A.handleNetworkError=function(t,n,i,B){i===void 0&&(i=!1),G.logger.warn("[playlist-loader]: A network "+(i?"timeout":"error")+" occurred while loading "+t.type+" level: "+t.level+" id: "+t.id+' group-id: "'+t.groupId+'"');var w=I.ErrorDetails.UNKNOWN,y=!1,x=this.getInternalLoader(t);switch(t.type){case S.PlaylistContextType.MANIFEST:w=i?I.ErrorDetails.MANIFEST_LOAD_TIMEOUT:I.ErrorDetails.MANIFEST_LOAD_ERROR,y=!0;break;case S.PlaylistContextType.LEVEL:w=i?I.ErrorDetails.LEVEL_LOAD_TIMEOUT:I.ErrorDetails.LEVEL_LOAD_ERROR,y=!1;break;case S.PlaylistContextType.AUDIO_TRACK:w=i?I.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:I.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,y=!1;break;case S.PlaylistContextType.SUBTITLE_TRACK:w=i?I.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:I.ErrorDetails.SUBTITLE_LOAD_ERROR,y=!1;break}x&&this.resetInternalLoader(t.type);var E={type:I.ErrorTypes.NETWORK_ERROR,details:w,fatal:y,url:t.url,loader:x,context:t,networkDetails:n};B&&(E.response=B),this.hls.trigger(D.Events.ERROR,E)},A.handlePlaylistLoaded=function(t,n,i,B){var w=i.type,y=i.level,x=i.id,E=i.groupId,c=i.loader,e=i.levelDetails,a=i.deliveryDirectives;if(!(e!=null&&e.targetduration)){this.handleManifestParsingError(t,i,"invalid target duration",B);return}if(!c)return;e.live&&(c.getCacheAge&&(e.ageHeader=c.getCacheAge()||0),(!c.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0));switch(w){case S.PlaylistContextType.MANIFEST:case S.PlaylistContextType.LEVEL:this.hls.trigger(D.Events.LEVEL_LOADED,{details:e,level:y||0,id:x||0,stats:n,networkDetails:B,deliveryDirectives:a});break;case S.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(D.Events.AUDIO_TRACK_LOADED,{details:e,id:x||0,groupId:E||"",stats:n,networkDetails:B,deliveryDirectives:a});break;case S.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(D.Events.SUBTITLE_TRACK_LOADED,{details:e,id:x||0,groupId:E||"",stats:n,networkDetails:B,deliveryDirectives:a});break}},r}();V.default=o},"./src/polyfills/number.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"isFiniteNumber",function(){return z}),O.d(V,"MAX_SAFE_INTEGER",function(){return D});var z=Number.isFinite||function(I){return typeof I=="number"&&isFinite(I)},D=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(ve,V,O){"use strict";O.r(V);var z=function(){function D(){}return D.getSilentFrame=function(G,P){switch(G){case"mp4a.40.2":if(P===1)return new Uint8Array([0,200,0,128,35,128]);if(P===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(P===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(P===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(P===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(P===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(P===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(P===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(P===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}return},D}();V.default=z},"./src/remux/mp4-generator.ts":function(ve,V,O){"use strict";O.r(V);var z=Math.pow(2,32)-1,D=function(){function I(){}return I.init=function(){I.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var P;for(P in I.types)I.types.hasOwnProperty(P)&&(I.types[P]=[P.charCodeAt(0),P.charCodeAt(1),P.charCodeAt(2),P.charCodeAt(3)]);var L=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]),S=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]);I.HDLR_TYPES={video:L,audio:S};var _=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),b=new Uint8Array([0,0,0,0,0,0,0,0]);I.STTS=I.STSC=I.STCO=b,I.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),I.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),I.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),I.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var u=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),r=new Uint8Array([0,0,0,1]);I.FTYP=I.box(I.types.ftyp,u,r,u,o),I.DINF=I.box(I.types.dinf,I.box(I.types.dref,_))},I.box=function(P){for(var L=8,S=arguments.length,_=new Array(S>1?S-1:0),b=1;b<S;b++)_[b-1]=arguments[b];for(var u=_.length,o=u;u--;)L+=_[u].byteLength;var r=new Uint8Array(L);for(r[0]=L>>24&255,r[1]=L>>16&255,r[2]=L>>8&255,r[3]=L&255,r.set(P,4),u=0,L=8;u<o;u++)r.set(_[u],L),L+=_[u].byteLength;return r},I.hdlr=function(P){return I.box(I.types.hdlr,I.HDLR_TYPES[P])},I.mdat=function(P){return I.box(I.types.mdat,P)},I.mdhd=function(P,L){L*=P;var S=Math.floor(L/(z+1)),_=Math.floor(L%(z+1));return I.box(I.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,P>>24&255,P>>16&255,P>>8&255,P&255,S>>24,S>>16&255,S>>8&255,S&255,_>>24,_>>16&255,_>>8&255,_&255,85,196,0,0]))},I.mdia=function(P){return I.box(I.types.mdia,I.mdhd(P.timescale,P.duration),I.hdlr(P.type),I.minf(P))},I.mfhd=function(P){return I.box(I.types.mfhd,new Uint8Array([0,0,0,0,P>>24,P>>16&255,P>>8&255,P&255]))},I.minf=function(P){return P.type==="audio"?I.box(I.types.minf,I.box(I.types.smhd,I.SMHD),I.DINF,I.stbl(P)):I.box(I.types.minf,I.box(I.types.vmhd,I.VMHD),I.DINF,I.stbl(P))},I.moof=function(P,L,S){return I.box(I.types.moof,I.mfhd(P),I.traf(S,L))},I.moov=function(P){for(var L=P.length,S=[];L--;)S[L]=I.trak(P[L]);return I.box.apply(null,[I.types.moov,I.mvhd(P[0].timescale,P[0].duration)].concat(S).concat(I.mvex(P)))},I.mvex=function(P){for(var L=P.length,S=[];L--;)S[L]=I.trex(P[L]);return I.box.apply(null,[I.types.mvex].concat(S))},I.mvhd=function(P,L){L*=P;var S=Math.floor(L/(z+1)),_=Math.floor(L%(z+1)),b=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,P>>24&255,P>>16&255,P>>8&255,P&255,S>>24,S>>16&255,S>>8&255,S&255,_>>24,_>>16&255,_>>8&255,_&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 I.box(I.types.mvhd,b)},I.sdtp=function(P){var L=P.samples||[],S=new Uint8Array(4+L.length),_,b;for(_=0;_<L.length;_++)b=L[_].flags,S[_+4]=b.dependsOn<<4|b.isDependedOn<<2|b.hasRedundancy;return I.box(I.types.sdtp,S)},I.stbl=function(P){return I.box(I.types.stbl,I.stsd(P),I.box(I.types.stts,I.STTS),I.box(I.types.stsc,I.STSC),I.box(I.types.stsz,I.STSZ),I.box(I.types.stco,I.STCO))},I.avc1=function(P){var L=[],S=[],_,b,u;for(_=0;_<P.sps.length;_++)b=P.sps[_],u=b.byteLength,L.push(u>>>8&255),L.push(u&255),L=L.concat(Array.prototype.slice.call(b));for(_=0;_<P.pps.length;_++)b=P.pps[_],u=b.byteLength,S.push(u>>>8&255),S.push(u&255),S=S.concat(Array.prototype.slice.call(b));var o=I.box(I.types.avcC,new Uint8Array([1,L[3],L[4],L[5],252|3,224|P.sps.length].concat(L).concat([P.pps.length]).concat(S))),r=P.width,A=P.height,s=P.pixelRatio[0],t=P.pixelRatio[1];return I.box(I.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,r>>8&255,r&255,A>>8&255,A&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,I.box(I.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),I.box(I.types.pasp,new Uint8Array([s>>24,s>>16&255,s>>8&255,s&255,t>>24,t>>16&255,t>>8&255,t&255])))},I.esds=function(P){var L=P.config.length;return new Uint8Array([0,0,0,0,3,23+L,0,1,0,4,15+L,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([L]).concat(P.config).concat([6,1,2]))},I.mp4a=function(P){var L=P.samplerate;return I.box(I.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,P.channelCount,0,16,0,0,0,0,L>>8&255,L&255,0,0]),I.box(I.types.esds,I.esds(P)))},I.mp3=function(P){var L=P.samplerate;return I.box(I.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,P.channelCount,0,16,0,0,0,0,L>>8&255,L&255,0,0]))},I.stsd=function(P){return P.type==="audio"?!P.isAAC&&P.codec==="mp3"?I.box(I.types.stsd,I.STSD,I.mp3(P)):I.box(I.types.stsd,I.STSD,I.mp4a(P)):I.box(I.types.stsd,I.STSD,I.avc1(P))},I.tkhd=function(P){var L=P.id,S=P.duration*P.timescale,_=P.width,b=P.height,u=Math.floor(S/(z+1)),o=Math.floor(S%(z+1));return I.box(I.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,L>>24&255,L>>16&255,L>>8&255,L&255,0,0,0,0,u>>24,u>>16&255,u>>8&255,u&255,o>>24,o>>16&255,o>>8&255,o&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,_>>8&255,_&255,0,0,b>>8&255,b&255,0,0]))},I.traf=function(P,L){var S=I.sdtp(P),_=P.id,b=Math.floor(L/(z+1)),u=Math.floor(L%(z+1));return I.box(I.types.traf,I.box(I.types.tfhd,new Uint8Array([0,0,0,0,_>>24,_>>16&255,_>>8&255,_&255])),I.box(I.types.tfdt,new Uint8Array([1,0,0,0,b>>24,b>>16&255,b>>8&255,b&255,u>>24,u>>16&255,u>>8&255,u&255])),I.trun(P,S.length+16+20+8+16+8+8),S)},I.trak=function(P){return P.duration=P.duration||4294967295,I.box(I.types.trak,I.tkhd(P),I.mdia(P))},I.trex=function(P){var L=P.id;return I.box(I.types.trex,new Uint8Array([0,0,0,0,L>>24,L>>16&255,L>>8&255,L&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},I.trun=function(P,L){var S=P.samples||[],_=S.length,b=12+16*_,u=new Uint8Array(b),o,r,A,s,t,n;for(L+=8+b,u.set([0,0,15,1,_>>>24&255,_>>>16&255,_>>>8&255,_&255,L>>>24&255,L>>>16&255,L>>>8&255,L&255],0),o=0;o<_;o++)r=S[o],A=r.duration,s=r.size,t=r.flags,n=r.cts,u.set([A>>>24&255,A>>>16&255,A>>>8&255,A&255,s>>>24&255,s>>>16&255,s>>>8&255,s&255,t.isLeading<<2|t.dependsOn,t.isDependedOn<<6|t.hasRedundancy<<4|t.paddingValue<<1|t.isNonSync,t.degradPrio&240<<8,t.degradPrio&15,n>>>24&255,n>>>16&255,n>>>8&255,n&255],12+16*o);return I.box(I.types.trun,u)},I.initSegment=function(P){I.types||I.init();var L=I.moov(P),S=new Uint8Array(I.FTYP.byteLength+L.byteLength);return S.set(I.FTYP),S.set(L,I.FTYP.byteLength),S},I}();D.types=void 0,D.HDLR_TYPES=void 0,D.STTS=void 0,D.STSC=void 0,D.STCO=void 0,D.STSZ=void 0,D.VMHD=void 0,D.SMHD=void 0,D.STSD=void 0,D.FTYP=void 0,D.DINF=void 0,V.default=D},"./src/remux/mp4-remuxer.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"default",function(){return n}),O.d(V,"normalizePts",function(){return i});var z=O("./src/polyfills/number.ts"),D=O("./src/remux/aac-helper.ts"),I=O("./src/remux/mp4-generator.ts"),G=O("./src/events.ts"),P=O("./src/errors.ts"),L=O("./src/utils/logger.ts"),S=O("./src/types/loader.ts"),_=O("./src/utils/timescale-conversion.ts");function b(){return b=Object.assign||function(x){for(var E=1;E<arguments.length;E++){var c=arguments[E];for(var e in c)Object.prototype.hasOwnProperty.call(c,e)&&(x[e]=c[e])}return x},b.apply(this,arguments)}var u=10*1e3,o=1024,r=1152,A=null,s=null,t=!1,n=function(){function x(c,e,a,l){if(l===void 0&&(l=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=c,this.config=e,this.typeSupported=a,this.ISGenerated=!1,A===null){var g=navigator.userAgent||"",p=g.match(/Chrome\/(\d+)/i);A=p?parseInt(p[1]):0}if(s===null){var f=navigator.userAgent.match(/Safari\/(\d+)/i);s=f?parseInt(f[1]):0}t=!!A&&A<75||!!s&&s<600}var E=x.prototype;return E.destroy=function(){},E.resetTimeStamp=function(e){L.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e},E.resetNextTimestamp=function(){L.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},E.resetInitSegment=function(){L.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},E.getVideoStartPts=function(e){var a=!1,l=e.reduce(function(g,p){var f=p.pts-g;return f<-4294967296?(a=!0,i(g,p.pts)):f>0?g:p.pts},e[0].pts);return a&&L.logger.debug("PTS rollover detected"),l},E.remux=function(e,a,l,g,p,f,R,U){var Q,j,J,k,Y,ne,me=p,_e=p,Oe=e.pid>-1,xe=a.pid>-1,Se=a.samples.length,Fe=e.samples.length>0,Pe=Se>1,Ee=(!Oe||Fe)&&(!xe||Pe)||this.ISGenerated||R;if(Ee){this.ISGenerated||(J=this.generateIS(e,a,p));var he=this.isVideoContiguous,Ge=-1;if(Pe&&(Ge=B(a.samples),!he&&this.config.forceKeyFrameOnDiscontinuity))if(ne=!0,Ge>0){L.logger.warn("[mp4-remuxer]: Dropped "+Ge+" out of "+Se+" video samples due to a missing keyframe");var lt=this.getVideoStartPts(a.samples);a.samples=a.samples.slice(Ge),a.dropped+=Ge,_e+=(a.samples[0].pts-lt)/(a.timescale||9e4)}else Ge===-1&&(L.logger.warn("[mp4-remuxer]: No keyframe found out of "+Se+" video samples"),ne=!1);if(this.ISGenerated){if(Fe&&Pe){var at=this.getVideoStartPts(a.samples),je=i(e.samples[0].pts,at)-at,it=je/a.inputTimeScale;me+=Math.max(0,it),_e+=Math.max(0,-it)}if(Fe){if(e.samplerate||(L.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),J=this.generateIS(e,a,p)),j=this.remuxAudio(e,me,this.isAudioContiguous,f,xe||Pe||U===S.PlaylistLevelType.AUDIO?_e:void 0),Pe){var ee=j?j.endPTS-j.startPTS:0;a.inputTimeScale||(L.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),J=this.generateIS(e,a,p)),Q=this.remuxVideo(a,_e,he,ee)}}else Pe&&(Q=this.remuxVideo(a,_e,he,0));Q&&(Q.firstKeyFrame=Ge,Q.independent=Ge!==-1)}}return this.ISGenerated&&(l.samples.length&&(Y=this.remuxID3(l,p)),g.samples.length&&(k=this.remuxText(g,p))),{audio:j,video:Q,initSegment:J,independent:ne,text:k,id3:Y}},E.generateIS=function(e,a,l){var g=e.samples,p=a.samples,f=this.typeSupported,R={},U=!Object(z.isFiniteNumber)(this._initPTS),Q="audio/mp4",j,J,k;if(U&&(j=J=Infinity),e.config&&g.length&&(e.timescale=e.samplerate,e.isAAC||(f.mpeg?(Q="audio/mpeg",e.codec=""):f.mp3&&(e.codec="mp3")),R.audio={id:"audio",container:Q,codec:e.codec,initSegment:!e.isAAC&&f.mpeg?new Uint8Array(0):I.default.initSegment([e]),metadata:{channelCount:e.channelCount}},U&&(k=e.inputTimeScale,j=J=g[0].pts-Math.round(k*l))),a.sps&&a.pps&&p.length&&(a.timescale=a.inputTimeScale,R.video={id:"main",container:"video/mp4",codec:a.codec,initSegment:I.default.initSegment([a]),metadata:{width:a.width,height:a.height}},U)){k=a.inputTimeScale;var Y=this.getVideoStartPts(p),ne=Math.round(k*l);J=Math.min(J,i(p[0].dts,Y)-ne),j=Math.min(j,Y-ne)}if(Object.keys(R).length)return this.ISGenerated=!0,U&&(this._initPTS=j,this._initDTS=J),{tracks:R,initPTS:j,timescale:k}},E.remuxVideo=function(e,a,l,g){var p=e.inputTimeScale,f=e.samples,R=[],U=f.length,Q=this._initPTS,j=this.nextAvcDts,J=8,k,Y,ne,me=Number.POSITIVE_INFINITY,_e=Number.NEGATIVE_INFINITY,Oe=0,xe=!1;if(!l||j===null){var Se=a*p,Fe=f[0].pts-i(f[0].dts,f[0].pts);j=Se-Fe}for(var Pe=0;Pe<U;Pe++){var Ee=f[Pe];if(Ee.pts=i(Ee.pts-Q,j),Ee.dts=i(Ee.dts-Q,j),Ee.dts>Ee.pts){var he=9e4*.2;Oe=Math.max(Math.min(Oe,Ee.pts-Ee.dts),-1*he)}Ee.dts<f[Pe>0?Pe-1:Pe].dts&&(xe=!0)}xe&&f.sort(function(Nt,pt){var et=Nt.dts-pt.dts,er=Nt.pts-pt.pts;return et||er}),Y=f[0].dts,ne=f[f.length-1].dts;var Ge=Math.round((ne-Y)/(U-1));if(Oe<0){if(Oe<Ge*-2){L.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(_.toMsFromMpegTsClock)(-Ge,!0)+" ms");for(var lt=Oe,at=0;at<U;at++)f[at].dts=lt=Math.max(lt,f[at].pts-Ge),f[at].pts=Math.max(lt,f[at].pts)}else{L.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(_.toMsFromMpegTsClock)(Oe,!0)+" ms to overcome this issue");for(var je=0;je<U;je++)f[je].dts=f[je].dts+Oe}Y=f[0].dts}if(l){var it=Y-j,ee=it>Ge,W=it<-1;if(ee||W){ee?L.logger.warn("AVC: "+Object(_.toMsFromMpegTsClock)(it,!0)+" ms ("+it+"dts) hole between fragments detected, filling it"):L.logger.warn("AVC: "+Object(_.toMsFromMpegTsClock)(-it,!0)+" ms ("+it+"dts) overlapping between fragments detected"),Y=j;var F=f[0].pts-it;f[0].dts=Y,f[0].pts=F,L.logger.log("Video: First PTS/DTS adjusted: "+Object(_.toMsFromMpegTsClock)(F,!0)+"/"+Object(_.toMsFromMpegTsClock)(Y,!0)+", delta: "+Object(_.toMsFromMpegTsClock)(it,!0)+" ms")}}t&&(Y=Math.max(0,Y));for(var oe=0,re=0,we=0;we<U;we++){for(var be=f[we],nt=be.units,tt=nt.length,Ye=0,qe=0;qe<tt;qe++)Ye+=nt[qe].data.length;re+=Ye,oe+=tt,be.length=Ye,be.dts=Math.max(be.dts,Y),be.pts=Math.max(be.pts,be.dts,0),me=Math.min(be.pts,me),_e=Math.max(be.pts,_e)}ne=f[U-1].dts;var At=re+4*oe+8,ft;try{ft=new Uint8Array(At)}catch(Nt){this.observer.emit(G.Events.ERROR,G.Events.ERROR,{type:P.ErrorTypes.MUX_ERROR,details:P.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:At,reason:"fail allocating video mdat "+At});return}var Ce=new DataView(ft.buffer);Ce.setUint32(0,At),ft.set(I.default.types.mdat,4);for(var Ue=0;Ue<U;Ue++){for(var Qe=f[Ue],He=Qe.units,Ie=0,Me=0,ye=He.length;Me<ye;Me++){var le=He[Me],ue=le.data,Z=le.data.byteLength;Ce.setUint32(J,Z),J+=4,ft.set(ue,J),J+=Z,Ie+=4+Z}if(Ue<U-1)k=f[Ue+1].dts-Qe.dts;else{var te=this.config,Ae=Qe.dts-f[Ue>0?Ue-1:Ue].dts;if(te.stretchShortVideoTrack&&this.nextAudioPts!==null){var de=Math.floor(te.maxBufferHole*p),Be=(g?me+g*p:this.nextAudioPts)-Qe.pts;Be>de?(k=Be-Ae,k<0&&(k=Ae),L.logger.log("[mp4-remuxer]: It is approximately "+Be/90+" ms to the next segment; using duration "+k/90+" ms for the last video frame.")):k=Ae}else k=Ae}var Ne=Math.round(Qe.pts-Qe.dts);R.push(new w(Qe.key,k,Ie,Ne))}if(R.length&&A&&A<70){var Xe=R[0].flags;Xe.dependsOn=2,Xe.isNonSync=0}console.assert(k!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=j=ne+k,this.isVideoContiguous=!0;var ct=I.default.moof(e.sequenceNumber++,Y,b({},e,{samples:R})),ut="video",st={data1:ct,data2:ft,startPTS:me/p,endPTS:(_e+k)/p,startDTS:Y/p,endDTS:j/p,type:ut,hasAudio:!1,hasVideo:!0,nb:R.length,dropped:e.dropped};return e.samples=[],e.dropped=0,console.assert(ft.length,"MDAT length must not be zero"),st},E.remuxAudio=function(e,a,l,g,p){var f=e.inputTimeScale,R=e.samplerate?e.samplerate:f,U=f/R,Q=e.isAAC?o:r,j=Q*U,J=this._initPTS,k=!e.isAAC&&this.typeSupported.mpeg,Y=[],ne=e.samples,me=k?0:8,_e=this.nextAudioPts||-1,Oe=a*f;if(this.isAudioContiguous=l=l||ne.length&&_e>0&&(g&&Math.abs(Oe-_e)<9e3||Math.abs(i(ne[0].pts-J,Oe)-_e)<20*j),ne.forEach(function(ue){ue.pts=i(ue.pts-J,Oe)}),!l||_e<0){if(ne=ne.filter(function(ue){return ue.pts>=0}),!ne.length)return;p===0?_e=0:g?_e=Math.max(0,Oe):_e=ne[0].pts}if(e.isAAC)for(var xe=p!==void 0,Se=this.config.maxAudioFramesDrift,Fe=0,Pe=_e;Fe<ne.length;Fe++){var Ee=ne[Fe],he=Ee.pts,Ge=he-Pe,lt=Math.abs(1e3*Ge/f);if(Ge<=-Se*j&&xe)Fe===0&&(L.logger.warn("Audio frame @ "+(he/f).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*Ge/f)+" ms."),this.nextAudioPts=_e=Pe=he);else if(Ge>=Se*j&&lt<u&&xe){var at=Math.round(Ge/j);Pe=he-at*j,Pe<0&&(at--,Pe+=j),Fe===0&&(this.nextAudioPts=_e=Pe),L.logger.warn("[mp4-remuxer]: Injecting "+at+" audio frame @ "+(Pe/f).toFixed(3)+"s due to "+Math.round(1e3*Ge/f)+" ms gap.");for(var je=0;je<at;je++){var it=Math.max(Pe,0),ee=D.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);ee||(L.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ee=Ee.unit.subarray()),ne.splice(Fe,0,{unit:ee,pts:it}),Pe+=j,Fe++}}Ee.pts=Pe,Pe+=j}for(var W=null,F=null,oe,re=0,we=ne.length;we--;)re+=ne[we].unit.byteLength;for(var be=0,nt=ne.length;be<nt;be++){var tt=ne[be],Ye=tt.unit,qe=tt.pts;if(F!==null){var At=Y[be-1];At.duration=Math.round((qe-F)/U)}else if(l&&e.isAAC&&(qe=_e),W=qe,re>0){re+=me;try{oe=new Uint8Array(re)}catch(ue){this.observer.emit(G.Events.ERROR,G.Events.ERROR,{type:P.ErrorTypes.MUX_ERROR,details:P.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:re,reason:"fail allocating audio mdat "+re});return}if(!k){var ft=new DataView(oe.buffer);ft.setUint32(0,re),oe.set(I.default.types.mdat,4)}}else return;oe.set(Ye,me);var Ce=Ye.byteLength;me+=Ce,Y.push(new w(!0,Q,Ce,0)),F=qe}var Ue=Y.length;if(!Ue)return;var Qe=Y[Y.length-1];this.nextAudioPts=_e=F+U*Qe.duration;var He=k?new Uint8Array(0):I.default.moof(e.sequenceNumber++,W/U,b({},e,{samples:Y}));e.samples=[];var Ie=W/f,Me=_e/f,ye="audio",le={data1:He,data2:oe,startPTS:Ie,endPTS:Me,startDTS:Ie,endDTS:Me,type:ye,hasAudio:!0,hasVideo:!1,nb:Ue};return this.isAudioContiguous=!0,console.assert(oe.length,"MDAT length must not be zero"),le},E.remuxEmptyAudio=function(e,a,l,g){var p=e.inputTimeScale,f=e.samplerate?e.samplerate:p,R=p/f,U=this.nextAudioPts,Q=(U!==null?U:g.startDTS*p)+this._initDTS,j=g.endDTS*p+this._initDTS,J=R*o,k=Math.ceil((j-Q)/J),Y=D.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(L.logger.warn("[mp4-remuxer]: remux empty Audio"),!Y){L.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ne=[],me=0;me<k;me++){var _e=Q+me*J;ne.push({unit:Y,pts:_e,dts:_e})}return e.samples=ne,this.remuxAudio(e,a,l,!1)},E.remuxID3=function(e,a){var l=e.samples.length;if(!l)return;for(var g=e.inputTimeScale,p=this._initPTS,f=this._initDTS,R=0;R<l;R++){var U=e.samples[R];U.pts=i(U.pts-p,a*g)/g,U.dts=i(U.dts-f,a*g)/g}var Q=e.samples;return e.samples=[],{samples:Q}},E.remuxText=function(e,a){var l=e.samples.length;if(!l)return;for(var g=e.inputTimeScale,p=this._initPTS,f=0;f<l;f++){var R=e.samples[f];R.pts=i(R.pts-p,a*g)/g}e.samples.sort(function(Q,j){return Q.pts-j.pts});var U=e.samples;return e.samples=[],{samples:U}},x}();function i(x,E){var c;if(E===null)return x;for(E<x?c=-8589934592:c=8589934592;Math.abs(x-E)>4294967296;)x+=c;return x}function B(x){for(var E=0;E<x.length;E++)if(x[E].key)return E;return-1}var w=function(E,c,e,a){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=c,this.size=e,this.cts=a,this.flags=new y(E)},y=function(E){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=E?2:1,this.isNonSync=E?0:1}},"./src/remux/passthrough-remuxer.ts":function(ve,V,O){"use strict";O.r(V);var z=O("./src/polyfills/number.ts"),D=O("./src/utils/mp4-tools.ts"),I=O("./src/loader/fragment.ts"),G=O("./src/utils/logger.ts"),P=function(){function _(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var b=_.prototype;return b.destroy=function(){},b.resetTimeStamp=function(o){this.initPTS=o,this.lastEndDTS=null},b.resetNextTimestamp=function(){this.lastEndDTS=null},b.resetInitSegment=function(o,r,A){this.audioCodec=r,this.videoCodec=A,this.generateInitSegment(o),this.emitInitSegment=!0},b.generateInitSegment=function(o){var r=this.audioCodec,A=this.videoCodec;if(!o||!o.byteLength){this.initTracks=void 0,this.initData=void 0;return}var s=this.initData=Object(D.parseInitSegment)(o);r||(r=S(s.audio,I.ElementaryStreamTypes.AUDIO)),A||(A=S(s.video,I.ElementaryStreamTypes.VIDEO));var t={};s.audio&&s.video?t.audiovideo={container:"video/mp4",codec:r+","+A,initSegment:o,id:"main"}:s.audio?t.audio={container:"audio/mp4",codec:r,initSegment:o,id:"audio"}:s.video?t.video={container:"video/mp4",codec:A,initSegment:o,id:"main"}:G.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=t},b.remux=function(o,r,A,s,t){var n=this.initPTS,i=this.lastEndDTS,B={audio:void 0,video:void 0,text:s,id3:A,initSegment:void 0};Object(z.isFiniteNumber)(i)||(i=this.lastEndDTS=t||0);var w=r.samples;if(!w||!w.length)return B;var y={initPTS:void 0,timescale:1},x=this.initData;if((!x||!x.length)&&(this.generateInitSegment(w),x=this.initData),!x||!x.length)return G.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),B;this.emitInitSegment&&(y.tracks=this.initTracks,this.emitInitSegment=!1),Object(z.isFiniteNumber)(n)||(this.initPTS=y.initPTS=n=L(x,w,i));var E=Object(D.getDuration)(w,x),c=i,e=E+c;Object(D.offsetStartDTS)(x,w,n),E>0?this.lastEndDTS=e:(G.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var a=!!x.audio,l=!!x.video,g="";a&&(g+="audio"),l&&(g+="video");var p={data1:w,startPTS:c,startDTS:c,endPTS:e,endDTS:e,type:g,hasAudio:a,hasVideo:l,nb:1,dropped:0};return B.audio=p.type==="audio"?p:void 0,B.video=p.type!=="audio"?p:void 0,B.text=s,B.id3=A,B.initSegment=y,B},_}(),L=function(b,u,o){return Object(D.getStartDTS)(b,u)-o};function S(_,b){var u=_==null?void 0:_.codec;return u&&u.length>4?u:u==="hvc1"?"hvc1.1.c.L120.90":u==="av01"?"av01.0.04M.08":u==="avc1"||b===I.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}V.default=P},"./src/task-loop.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"default",function(){return z});var z=function(){function D(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var I=D.prototype;return I.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},I.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},I.onHandlerDestroyed=function(){},I.hasInterval=function(){return!!this._tickInterval},I.hasNextTick=function(){return!!this._tickTimer},I.setInterval=function(P){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,P),!0)},I.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},I.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},I.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},I.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},I.doTick=function(){},D}()},"./src/types/cmcd.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"CMCDVersion",function(){return z}),O.d(V,"CMCDObjectType",function(){return D}),O.d(V,"CMCDStreamingFormat",function(){return I}),O.d(V,"CMCDStreamType",function(){return G});var z=1,D;(function(P){P.MANIFEST="m",P.AUDIO="a",P.VIDEO="v",P.MUXED="av",P.INIT="i",P.CAPTION="c",P.TIMED_TEXT="tt",P.KEY="k",P.OTHER="o"})(D||(D={}));var I;(function(P){P.DASH="d",P.HLS="h",P.SMOOTH="s",P.OTHER="o"})(I||(I={}));var G;(function(P){P.VOD="v",P.LIVE="l"})(G||(G={}))},"./src/types/level.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"HlsSkip",function(){return I}),O.d(V,"getSkipValue",function(){return G}),O.d(V,"HlsUrlParameters",function(){return P}),O.d(V,"Level",function(){return L});function z(S,_){for(var b=0;b<_.length;b++){var u=_[b];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(S,u.key,u)}}function D(S,_,b){return _&&z(S.prototype,_),b&&z(S,b),S}var I;(function(S){S.No="",S.Yes="YES",S.v2="v2"})(I||(I={}));function G(S,_){var b=S.canSkipUntil,u=S.canSkipDateRanges,o=S.endSN,r=_!==void 0?_-o:0;return b&&r<b?u?I.v2:I.Yes:I.No}var P=function(){function S(b,u,o){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=b,this.part=u,this.skip=o}var _=S.prototype;return _.addDirectives=function(u){var o=new self.URL(u);return this.msn!==void 0&&o.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&o.searchParams.set("_HLS_part",this.part.toString()),this.skip&&o.searchParams.set("_HLS_skip",this.skip),o.toString()},S}(),L=function(){function S(_){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[_.url],this.attrs=_.attrs,this.bitrate=_.bitrate,_.details&&(this.details=_.details),this.id=_.id||0,this.name=_.name,this.width=_.width||0,this.height=_.height||0,this.audioCodec=_.audioCodec,this.videoCodec=_.videoCodec,this.unknownCodecs=_.unknownCodecs,this.codecSet=[_.videoCodec,_.audioCodec].filter(function(b){return b}).join(",").replace(/\.[^.,]+/g,"")}return D(S,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(b){var u=b%this.url.length;this._urlId!==u&&(this.details=void 0,this._urlId=u)}}]),S}()},"./src/types/loader.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"PlaylistContextType",function(){return z}),O.d(V,"PlaylistLevelType",function(){return D});var z;(function(I){I.MANIFEST="manifest",I.LEVEL="level",I.AUDIO_TRACK="audioTrack",I.SUBTITLE_TRACK="subtitleTrack"})(z||(z={}));var D;(function(I){I.MAIN="main",I.AUDIO="audio",I.SUBTITLE="subtitle"})(D||(D={}))},"./src/types/transmuxer.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"ChunkMetadata",function(){return z});var z=function(G,P,L,S,_,b){S===void 0&&(S=0),_===void 0&&(_=-1),b===void 0&&(b=!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=D(),this.buffering={audio:D(),video:D(),audiovideo:D()},this.level=G,this.sn=P,this.id=L,this.size=S,this.part=_,this.partial=b};function D(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"AttrList",function(){return I});var z=/^(\d+)x(\d+)$/,D=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,I=function(){function G(L){typeof L=="string"&&(L=G.parseAttrList(L));for(var S in L)L.hasOwnProperty(S)&&(this[S]=L[S])}var P=G.prototype;return P.decimalInteger=function(S){var _=parseInt(this[S],10);return _>Number.MAX_SAFE_INTEGER?Infinity:_},P.hexadecimalInteger=function(S){if(this[S]){var _=(this[S]||"0x").slice(2);_=(_.length&1?"0":"")+_;for(var b=new Uint8Array(_.length/2),u=0;u<_.length/2;u++)b[u]=parseInt(_.slice(u*2,u*2+2),16);return b}else return null},P.hexadecimalIntegerAsNumber=function(S){var _=parseInt(this[S],16);return _>Number.MAX_SAFE_INTEGER?Infinity:_},P.decimalFloatingPoint=function(S){return parseFloat(this[S])},P.optionalFloat=function(S,_){var b=this[S];return b?parseFloat(b):_},P.enumeratedString=function(S){return this[S]},P.bool=function(S){return this[S]==="YES"},P.decimalResolution=function(S){var _=z.exec(this[S]);return _===null?void 0:{width:parseInt(_[1],10),height:parseInt(_[2],10)}},G.parseAttrList=function(S){var _,b={},u='"';for(D.lastIndex=0;(_=D.exec(S))!==null;){var o=_[2];o.indexOf(u)===0&&o.lastIndexOf(u)===o.length-1&&(o=o.slice(1,-1)),b[_[1]]=o}return b},G}()},"./src/utils/binary-search.ts":function(ve,V,O){"use strict";O.r(V);var z={search:function(I,G){for(var P=0,L=I.length-1,S=null,_=null;P<=L;){S=(P+L)/2|0,_=I[S];var b=G(_);if(b>0)P=S+1;else if(b<0)L=S-1;else return _}return null}};V.default=z},"./src/utils/buffer-helper.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"BufferHelper",function(){return I});var z=O("./src/utils/logger.ts"),D={length:0,start:function(){return 0},end:function(){return 0}},I=function(){function G(){}return G.isBuffered=function(L,S){try{if(L){for(var _=G.getBuffered(L),b=0;b<_.length;b++)if(S>=_.start(b)&&S<=_.end(b))return!0}}catch(u){}return!1},G.bufferInfo=function(L,S,_){try{if(L){var b=G.getBuffered(L),u=[],o;for(o=0;o<b.length;o++)u.push({start:b.start(o),end:b.end(o)});return this.bufferedInfo(u,S,_)}}catch(r){}return{len:0,start:S,end:S,nextStart:void 0}},G.bufferedInfo=function(L,S,_){S=Math.max(0,S),L.sort(function(y,x){var E=y.start-x.start;return E||x.end-y.end});var b=[];if(_)for(var u=0;u<L.length;u++){var o=b.length;if(o){var r=b[o-1].end;L[u].start-r<_?L[u].end>r&&(b[o-1].end=L[u].end):b.push(L[u])}else b.push(L[u])}else b=L;for(var A=0,s,t=S,n=S,i=0;i<b.length;i++){var B=b[i].start,w=b[i].end;if(S+_>=B&&S<w)t=B,n=w,A=n-S;else if(S+_<B){s=B;break}}return{len:A,start:t||0,end:n||0,nextStart:s}},G.getBuffered=function(L){try{return L.buffered}catch(S){return z.logger.log("failed to get media.buffered",S),D}},G}()},"./src/utils/cea-608-parser.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"Row",function(){return n}),O.d(V,"CaptionScreen",function(){return i});var z=O("./src/utils/logger.ts"),D={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},I=function(e){var a=e;return D.hasOwnProperty(e)&&(a=D[e]),String.fromCharCode(a)},G=15,P=100,L={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},S={17:2,18:4,21:6,22:8,23:10,19:13,20:15},_={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},b={25:2,26:4,29:6,30:8,31:10,27:13,28:15},u=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],o;(function(c){c[c.ERROR=0]="ERROR",c[c.TEXT=1]="TEXT",c[c.WARNING=2]="WARNING",c[c.INFO=2]="INFO",c[c.DEBUG=3]="DEBUG",c[c.DATA=3]="DATA"})(o||(o={}));var r=function(){function c(){this.time=null,this.verboseLevel=o.ERROR}var e=c.prototype;return e.log=function(l,g){this.verboseLevel>=l&&z.logger.log(this.time+" ["+l+"] "+g)},c}(),A=function(e){for(var a=[],l=0;l<e.length;l++)a.push(e[l].toString(16));return a},s=function(){function c(a,l,g,p,f){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=a||"white",this.underline=l||!1,this.italics=g||!1,this.background=p||"black",this.flash=f||!1}var e=c.prototype;return e.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},e.setStyles=function(l){for(var g=["foreground","underline","italics","background","flash"],p=0;p<g.length;p++){var f=g[p];l.hasOwnProperty(f)&&(this[f]=l[f])}},e.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},e.equals=function(l){return this.foreground===l.foreground&&this.underline===l.underline&&this.italics===l.italics&&this.background===l.background&&this.flash===l.flash},e.copy=function(l){this.foreground=l.foreground,this.underline=l.underline,this.italics=l.italics,this.background=l.background,this.flash=l.flash},e.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},c}(),t=function(){function c(a,l,g,p,f,R){this.uchar=void 0,this.penState=void 0,this.uchar=a||" ",this.penState=new s(l,g,p,f,R)}var e=c.prototype;return e.reset=function(){this.uchar=" ",this.penState.reset()},e.setChar=function(l,g){this.uchar=l,this.penState.copy(g)},e.setPenState=function(l){this.penState.copy(l)},e.equals=function(l){return this.uchar===l.uchar&&this.penState.equals(l.penState)},e.copy=function(l){this.uchar=l.uchar,this.penState.copy(l.penState)},e.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},c}(),n=function(){function c(a){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var l=0;l<P;l++)this.chars.push(new t);this.logger=a,this.pos=0,this.currPenState=new s}var e=c.prototype;return e.equals=function(l){for(var g=!0,p=0;p<P;p++)if(!this.chars[p].equals(l.chars[p])){g=!1;break}return g},e.copy=function(l){for(var g=0;g<P;g++)this.chars[g].copy(l.chars[g])},e.isEmpty=function(){for(var l=!0,g=0;g<P;g++)if(!this.chars[g].isEmpty()){l=!1;break}return l},e.setCursor=function(l){this.pos!==l&&(this.pos=l),this.pos<0?(this.logger.log(o.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>P&&(this.logger.log(o.DEBUG,"Too large cursor position "+this.pos),this.pos=P)},e.moveCursor=function(l){var g=this.pos+l;if(l>1)for(var p=this.pos+1;p<g+1;p++)this.chars[p].setPenState(this.currPenState);this.setCursor(g)},e.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},e.insertChar=function(l){l>=144&&this.backSpace();var g=I(l);if(this.pos>=P){this.logger.log(o.ERROR,"Cannot insert "+l.toString(16)+" ("+g+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(g,this.currPenState),this.moveCursor(1)},e.clearFromPos=function(l){var g;for(g=l;g<P;g++)this.chars[g].reset()},e.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},e.clearToEndOfRow=function(){this.clearFromPos(this.pos)},e.getTextString=function(){for(var l=[],g=!0,p=0;p<P;p++){var f=this.chars[p].uchar;f!==" "&&(g=!1),l.push(f)}return g?"":l.join("")},e.setPenStyles=function(l){this.currPenState.setStyles(l);var g=this.chars[this.pos];g.setPenState(this.currPenState)},c}(),i=function(){function c(a){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var l=0;l<G;l++)this.rows.push(new n(a));this.logger=a,this.currRow=G-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var e=c.prototype;return e.reset=function(){for(var l=0;l<G;l++)this.rows[l].clear();this.currRow=G-1},e.equals=function(l){for(var g=!0,p=0;p<G;p++)if(!this.rows[p].equals(l.rows[p])){g=!1;break}return g},e.copy=function(l){for(var g=0;g<G;g++)this.rows[g].copy(l.rows[g])},e.isEmpty=function(){for(var l=!0,g=0;g<G;g++)if(!this.rows[g].isEmpty()){l=!1;break}return l},e.backSpace=function(){var l=this.rows[this.currRow];l.backSpace()},e.clearToEndOfRow=function(){var l=this.rows[this.currRow];l.clearToEndOfRow()},e.insertChar=function(l){var g=this.rows[this.currRow];g.insertChar(l)},e.setPen=function(l){var g=this.rows[this.currRow];g.setPenStyles(l)},e.moveCursor=function(l){var g=this.rows[this.currRow];g.moveCursor(l)},e.setCursor=function(l){this.logger.log(o.INFO,"setCursor: "+l);var g=this.rows[this.currRow];g.setCursor(l)},e.setPAC=function(l){this.logger.log(o.INFO,"pacData = "+JSON.stringify(l));var g=l.row-1;if(this.nrRollUpRows&&g<this.nrRollUpRows-1&&(g=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==g){for(var p=0;p<G;p++)this.rows[p].clear();var f=this.currRow+1-this.nrRollUpRows,R=this.lastOutputScreen;if(R){var U=R.rows[f].cueStartTime,Q=this.logger.time;if(U&&Q!==null&&U<Q)for(var j=0;j<this.nrRollUpRows;j++)this.rows[g-this.nrRollUpRows+j+1].copy(R.rows[f+j])}}this.currRow=g;var J=this.rows[this.currRow];if(l.indent!==null){var k=l.indent,Y=Math.max(k-1,0);J.setCursor(l.indent),l.color=J.chars[Y].penState.foreground}var ne={foreground:l.color,underline:l.underline,italics:l.italics,background:"black",flash:!1};this.setPen(ne)},e.setBkgData=function(l){this.logger.log(o.INFO,"bkgData = "+JSON.stringify(l)),this.backSpace(),this.setPen(l),this.insertChar(32)},e.setRollUpRows=function(l){this.nrRollUpRows=l},e.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(o.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(o.TEXT,this.getDisplayText());var l=this.currRow+1-this.nrRollUpRows,g=this.rows.splice(l,1)[0];g.clear(),this.rows.splice(this.currRow,0,g),this.logger.log(o.INFO,"Rolling up")},e.getDisplayText=function(l){l=l||!1;for(var g=[],p="",f=-1,R=0;R<G;R++){var U=this.rows[R].getTextString();U&&(f=R+1,l?g.push("Row "+f+": '"+U+"'"):g.push(U.trim()))}return g.length>0&&(l?p="["+g.join(" | ")+"]":p=g.join(`
`)),p},e.getTextAndFormat=function(){return this.rows},c}(),B=function(){function c(a,l,g){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=a,this.outputFilter=l,this.mode=null,this.verbose=0,this.displayedMemory=new i(g),this.nonDisplayedMemory=new i(g),this.lastOutputScreen=new i(g),this.currRollUpRow=this.displayedMemory.rows[G-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=g}var e=c.prototype;return e.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[G-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},e.getHandler=function(){return this.outputFilter},e.setHandler=function(l){this.outputFilter=l},e.setPAC=function(l){this.writeScreen.setPAC(l)},e.setBkgData=function(l){this.writeScreen.setBkgData(l)},e.setMode=function(l){if(l===this.mode)return;this.mode=l,this.logger.log(o.INFO,"MODE="+l),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=l},e.insertChars=function(l){for(var g=0;g<l.length;g++)this.writeScreen.insertChar(l[g]);var p=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(o.INFO,p+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(o.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},e.ccRCL=function(){this.logger.log(o.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},e.ccBS=function(){if(this.logger.log(o.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},e.ccAOF=function(){},e.ccAON=function(){},e.ccDER=function(){this.logger.log(o.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},e.ccRU=function(l){this.logger.log(o.INFO,"RU("+l+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(l)},e.ccFON=function(){this.logger.log(o.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},e.ccRDC=function(){this.logger.log(o.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},e.ccTR=function(){this.logger.log(o.INFO,"TR"),this.setMode("MODE_TEXT")},e.ccRTD=function(){this.logger.log(o.INFO,"RTD"),this.setMode("MODE_TEXT")},e.ccEDM=function(){this.logger.log(o.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},e.ccCR=function(){this.logger.log(o.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},e.ccENM=function(){this.logger.log(o.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},e.ccEOC=function(){if(this.logger.log(o.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var l=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=l,this.writeScreen=this.nonDisplayedMemory,this.logger.log(o.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},e.ccTO=function(l){this.logger.log(o.INFO,"TO("+l+") - Tab Offset"),this.writeScreen.moveCursor(l)},e.ccMIDROW=function(l){var g={flash:!1};if(g.underline=l%2===1,g.italics=l>=46,g.italics)g.foreground="white";else{var p=Math.floor(l/2)-16,f=["white","green","blue","cyan","red","yellow","magenta"];g.foreground=f[p]}this.logger.log(o.INFO,"MIDROW: "+JSON.stringify(g)),this.writeScreen.setPen(g)},e.outputDataUpdate=function(l){l===void 0&&(l=!1);var g=this.logger.time;if(g===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=g:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,g,this.lastOutputScreen),l&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:g),this.lastOutputScreen.copy(this.displayedMemory))},e.cueSplitAtTime=function(l){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,l,this.displayedMemory),this.cueStartTime=l))},c}(),w=function(){function c(a,l,g){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var p=new r;this.channels=[null,new B(a,l,p),new B(a+1,g,p)],this.cmdHistory=E(),this.logger=p}var e=c.prototype;return e.getHandler=function(l){return this.channels[l].getHandler()},e.setHandler=function(l,g){this.channels[l].setHandler(g)},e.addData=function(l,g){var p,f,R,U=!1;this.logger.time=l;for(var Q=0;Q<g.length;Q+=2){if(f=g[Q]&127,R=g[Q+1]&127,f===0&&R===0)continue;if(this.logger.log(o.DATA,"["+A([g[Q],g[Q+1]])+"] -> ("+A([f,R])+")"),p=this.parseCmd(f,R),p||(p=this.parseMidrow(f,R)),p||(p=this.parsePAC(f,R)),p||(p=this.parseBackgroundAttributes(f,R)),!p&&(U=this.parseChars(f,R),U)){var j=this.currentChannel;if(j&&j>0){var J=this.channels[j];J.insertChars(U)}else this.logger.log(o.WARNING,"No channel found yet. TEXT-MODE?")}!p&&!U&&this.logger.log(o.WARNING,"Couldn't parse cleaned data "+A([f,R])+" orig: "+A([g[Q],g[Q+1]]))}},e.parseCmd=function(l,g){var p=this.cmdHistory,f=(l===20||l===28||l===21||l===29)&&g>=32&&g<=47,R=(l===23||l===31)&&g>=33&&g<=35;if(!(f||R))return!1;if(x(l,g,p))return y(null,null,p),this.logger.log(o.DEBUG,"Repeated command ("+A([l,g])+") is dropped"),!0;var U=l===20||l===21||l===23?1:2,Q=this.channels[U];return l===20||l===21||l===28||l===29?g===32?Q.ccRCL():g===33?Q.ccBS():g===34?Q.ccAOF():g===35?Q.ccAON():g===36?Q.ccDER():g===37?Q.ccRU(2):g===38?Q.ccRU(3):g===39?Q.ccRU(4):g===40?Q.ccFON():g===41?Q.ccRDC():g===42?Q.ccTR():g===43?Q.ccRTD():g===44?Q.ccEDM():g===45?Q.ccCR():g===46?Q.ccENM():g===47&&Q.ccEOC():Q.ccTO(g-32),y(l,g,p),this.currentChannel=U,!0},e.parseMidrow=function(l,g){var p=0;if((l===17||l===25)&&g>=32&&g<=47){if(l===17?p=1:p=2,p!==this.currentChannel)return this.logger.log(o.ERROR,"Mismatch channel in midrow parsing"),!1;var f=this.channels[p];return f?(f.ccMIDROW(g),this.logger.log(o.DEBUG,"MIDROW ("+A([l,g])+")"),!0):!1}return!1},e.parsePAC=function(l,g){var p,f=this.cmdHistory,R=(l>=17&&l<=23||l>=25&&l<=31)&&g>=64&&g<=127,U=(l===16||l===24)&&g>=64&&g<=95;if(!(R||U))return!1;if(x(l,g,f))return y(null,null,f),!0;var Q=l<=23?1:2;g>=64&&g<=95?p=Q===1?L[l]:_[l]:p=Q===1?S[l]:b[l];var j=this.channels[Q];return j?(j.setPAC(this.interpretPAC(p,g)),y(l,g,f),this.currentChannel=Q,!0):!1},e.interpretPAC=function(l,g){var p,f={color:null,italics:!1,indent:null,underline:!1,row:l};return g>95?p=g-96:p=g-64,f.underline=(p&1)===1,p<=13?f.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(p/2)]:p<=15?(f.italics=!0,f.color="white"):f.indent=Math.floor((p-16)/2)*4,f},e.parseChars=function(l,g){var p,f=null,R=null;if(l>=25?(p=2,R=l-8):(p=1,R=l),R>=17&&R<=19){var U;R===17?U=g+80:R===18?U=g+112:U=g+144,this.logger.log(o.INFO,"Special char '"+I(U)+"' in channel "+p),f=[U]}else l>=32&&l<=127&&(f=g===0?[l]:[l,g]);if(f){var Q=A(f);this.logger.log(o.DEBUG,"Char codes = "+Q.join(",")),y(l,g,this.cmdHistory)}return f},e.parseBackgroundAttributes=function(l,g){var p=(l===16||l===24)&&g>=32&&g<=47,f=(l===23||l===31)&&g>=45&&g<=47;if(!(p||f))return!1;var R,U={};l===16||l===24?(R=Math.floor((g-32)/2),U.background=u[R],g%2===1&&(U.background=U.background+"_semi")):g===45?U.background="transparent":(U.foreground="black",g===47&&(U.underline=!0));var Q=l<=23?1:2,j=this.channels[Q];return j.setBkgData(U),y(l,g,this.cmdHistory),!0},e.reset=function(){for(var l=0;l<Object.keys(this.channels).length;l++){var g=this.channels[l];g&&g.reset()}this.cmdHistory=E()},e.cueSplitAtTime=function(l){for(var g=0;g<this.channels.length;g++){var p=this.channels[g];p&&p.cueSplitAtTime(l)}},c}();function y(c,e,a){a.a=c,a.b=e}function x(c,e,a){return a.a===c&&a.b===e}function E(){return{a:null,b:null}}V.default=w},"./src/utils/codecs.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"isCodecType",function(){return D}),O.d(V,"isCodecSupportedInMp4",function(){return I});var z={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function D(G,P){var L=z[P];return!!L&&L[G.slice(0,4)]===!0}function I(G,P){return MediaSource.isTypeSupported((P||"video")+'/mp4;codecs="'+G+'"')}},"./src/utils/cues.ts":function(ve,V,O){"use strict";O.r(V);var z=O("./src/utils/vttparser.ts"),D=O("./src/utils/webvtt-parser.ts"),I=O("./src/utils/texttrack-utils.ts"),G=/\s/,P={newCue:function(S,_,b,u){for(var o=[],r,A,s,t,n,i=self.VTTCue||self.TextTrackCue,B=0;B<u.rows.length;B++)if(r=u.rows[B],s=!0,t=0,n="",!r.isEmpty()){for(var w=0;w<r.chars.length;w++)G.test(r.chars[w].uchar)&&s?t++:(n+=r.chars[w].uchar,s=!1);r.cueStartTime=_,_===b&&(b+=1e-4),t>=16?t--:t++;var y=Object(z.fixLineBreaks)(n.trim()),x=Object(D.generateCueId)(_,b,y);(!S||!S.cues||!S.cues.getCueById(x))&&(A=new i(_,b,y),A.id=x,A.line=B+1,A.align="left",A.position=10+Math.min(80,Math.floor(t*8/32)*10),o.push(A))}return S&&o.length&&(o.sort(function(E,c){return E.line==="auto"||c.line==="auto"?0:E.line>8&&c.line>8?c.line-E.line:E.line-c.line}),o.forEach(function(E){return Object(I.addCueToTrack)(S,E)})),o}};V.default=P},"./src/utils/discontinuities.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"findFirstFragWithCC",function(){return G}),O.d(V,"shouldAlignOnDiscontinuities",function(){return P}),O.d(V,"findDiscontinuousReferenceFrag",function(){return L}),O.d(V,"adjustSlidingStart",function(){return _}),O.d(V,"alignStream",function(){return b}),O.d(V,"alignPDT",function(){return o}),O.d(V,"alignFragmentByPDTDelta",function(){return r}),O.d(V,"alignMediaPlaylistByPDT",function(){return A});var z=O("./src/polyfills/number.ts"),D=O("./src/utils/logger.ts"),I=O("./src/controller/level-helper.ts");function G(s,t){for(var n=null,i=0,B=s.length;i<B;i++){var w=s[i];if(w&&w.cc===t){n=w;break}}return n}function P(s,t,n){return!!(t.details&&(n.endCC>n.startCC||s&&s.cc<n.startCC))}function L(s,t){var n=s.fragments,i=t.fragments;if(!i.length||!n.length){D.logger.log("No fragments to align");return}var B=G(n,i[0].cc);if(!B||B&&!B.startPTS){D.logger.log("No frag in previous level to align on");return}return B}function S(s,t){if(s){var n=s.start+t;s.start=s.startPTS=n,s.endPTS=n+s.duration}}function _(s,t){for(var n=t.fragments,i=0,B=n.length;i<B;i++)S(n[i],s);t.fragmentHint&&S(t.fragmentHint,s),t.alignedSliding=!0}function b(s,t,n){if(!t)return;u(s,n,t),!n.alignedSliding&&t.details&&o(n,t.details),!n.alignedSliding&&t.details&&!n.skippedSegments&&Object(I.adjustSliding)(t.details,n)}function u(s,t,n){if(P(s,n,t)){var i=L(n.details,t);i&&Object(z.isFiniteNumber)(i.start)&&(D.logger.log("Adjusting PTS using last level due to CC increase within current level "+t.url),_(i.start,t))}}function o(s,t){if(!t.fragments.length||!s.hasProgramDateTime||!t.hasProgramDateTime)return;var n=t.fragments[0].programDateTime,i=s.fragments[0].programDateTime,B=(i-n)/1e3+t.fragments[0].start;B&&Object(z.isFiniteNumber)(B)&&(D.logger.log("Adjusting PTS using programDateTime delta "+(i-n)+"ms, sliding:"+B.toFixed(3)+" "+s.url+" "),_(B,s))}function r(s,t){var n=s.programDateTime;if(!n)return;var i=(n-t)/1e3;s.start=s.startPTS=i,s.endPTS=i+s.duration}function A(s,t){if(!t.fragments.length||!s.hasProgramDateTime||!t.hasProgramDateTime)return;var n=t.fragments[0].programDateTime,i=t.fragments[0].start,B=n-i*1e3;s.fragments.forEach(function(w){r(w,B)}),s.fragmentHint&&r(s.fragmentHint,B),s.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(ve,V,O){"use strict";O.r(V);var z=O("./src/utils/ewma.ts"),D=function(){function I(P,L,S){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=S,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new z.default(P),this.fast_=new z.default(L)}var G=I.prototype;return G.update=function(L,S){var _=this.slow_,b=this.fast_;this.slow_.halfLife!==L&&(this.slow_=new z.default(L,_.getEstimate(),_.getTotalWeight())),this.fast_.halfLife!==S&&(this.fast_=new z.default(S,b.getEstimate(),b.getTotalWeight()))},G.sample=function(L,S){L=Math.max(L,this.minDelayMs_);var _=8*S,b=L/1e3,u=_/b;this.fast_.sample(b,u),this.slow_.sample(b,u)},G.canEstimate=function(){var L=this.fast_;return L&&L.getTotalWeight()>=this.minWeight_},G.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},G.destroy=function(){},I}();V.default=D},"./src/utils/ewma.ts":function(ve,V,O){"use strict";O.r(V);var z=function(){function D(G,P,L){P===void 0&&(P=0),L===void 0&&(L=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=G,this.alpha_=G?Math.exp(Math.log(.5)/G):0,this.estimate_=P,this.totalWeight_=L}var I=D.prototype;return I.sample=function(P,L){var S=Math.pow(this.alpha_,P);this.estimate_=L*(1-S)+S*this.estimate_,this.totalWeight_+=P},I.getTotalWeight=function(){return this.totalWeight_},I.getEstimate=function(){if(this.alpha_){var P=1-Math.pow(this.alpha_,this.totalWeight_);if(P)return this.estimate_/P}return this.estimate_},D}();V.default=z},"./src/utils/fetch-loader.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"fetchSupported",function(){return r});var z=O("./src/polyfills/number.ts"),D=O("./src/loader/load-stats.ts"),I=O("./src/demux/chunk-cache.ts");function G(i,B){i.prototype=Object.create(B.prototype),i.prototype.constructor=i,b(i,B)}function P(i){var B=typeof Map=="function"?new Map:void 0;return P=function(y){if(y===null||!_(y))return y;if(typeof y!="function")throw new TypeError("Super expression must either be null or a function");if(typeof B!="undefined"){if(B.has(y))return B.get(y);B.set(y,x)}function x(){return L(y,arguments,u(this).constructor)}return x.prototype=Object.create(y.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),b(x,y)},P(i)}function L(i,B,w){return S()?L=Reflect.construct:L=function(x,E,c){var e=[null];e.push.apply(e,E);var a=Function.bind.apply(x,e),l=new a;return c&&b(l,c.prototype),l},L.apply(null,arguments)}function S(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(i){return!1}}function _(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function b(i,B){return b=Object.setPrototypeOf||function(y,x){return y.__proto__=x,y},b(i,B)}function u(i){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(w){return w.__proto__||Object.getPrototypeOf(w)},u(i)}function o(){return o=Object.assign||function(i){for(var B=1;B<arguments.length;B++){var w=arguments[B];for(var y in w)Object.prototype.hasOwnProperty.call(w,y)&&(i[y]=w[y])}return i},o.apply(this,arguments)}function r(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(i){}return!1}var A=function(){function i(w){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=w.fetchSetup||t,this.controller=new self.AbortController,this.stats=new D.LoadStats}var B=i.prototype;return B.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},B.abortInternal=function(){var y=this.response;(!y||!y.ok)&&(this.stats.aborted=!0,this.controller.abort())},B.abort=function(){var y;this.abortInternal(),(y=this.callbacks)!==null&&y!==void 0&&y.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},B.load=function(y,x,E){var c=this,e=this.stats;if(e.loading.start)throw new Error("Loader can only be used once.");e.loading.start=self.performance.now();var a=s(y,this.controller.signal),l=E.onProgress,g=y.responseType==="arraybuffer",p=g?"byteLength":"length";this.context=y,this.config=x,this.callbacks=E,this.request=this.fetchSetup(y,a),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){c.abortInternal(),E.onTimeout(e,y,c.response)},x.timeout),self.fetch(this.request).then(function(f){if(c.response=c.loader=f,!f.ok){var R=f.status,U=f.statusText;throw new n(U||"fetch, bad network response",R,f)}return e.loading.first=Math.max(self.performance.now(),e.loading.start),e.total=parseInt(f.headers.get("Content-Length")||"0"),l&&Object(z.isFiniteNumber)(x.highWaterMark)?c.loadProgressively(f,e,y,x.highWaterMark,l):g?f.arrayBuffer():f.text()}).then(function(f){var R=c.response;self.clearTimeout(c.requestTimeout),e.loading.end=Math.max(self.performance.now(),e.loading.first),e.loaded=e.total=f[p];var U={url:R.url,data:f};l&&!Object(z.isFiniteNumber)(x.highWaterMark)&&l(e,y,f,R),E.onSuccess(U,e,y,R)}).catch(function(f){if(self.clearTimeout(c.requestTimeout),e.aborted)return;var R=f.code||0;E.onError({code:R,text:f.message},y,f.details)})},B.getCacheAge=function(){var y=null;if(this.response){var x=this.response.headers.get("age");y=x?parseFloat(x):null}return y},B.loadProgressively=function(y,x,E,c,e){c===void 0&&(c=0);var a=new I.default,l=y.body.getReader(),g=function p(){return l.read().then(function(f){if(f.done)return a.dataLength&&e(x,E,a.flush(),y),Promise.resolve(new ArrayBuffer(0));var R=f.value,U=R.length;return x.loaded+=U,U<c||a.dataLength?(a.push(R),a.dataLength>=c&&e(x,E,a.flush(),y)):e(x,E,R,y),p()}).catch(function(){return Promise.reject()})};return g()},i}();function s(i,B){var w={method:"GET",mode:"cors",credentials:"same-origin",signal:B,headers:new self.Headers(o({},i.headers))};return i.rangeEnd&&w.headers.set("Range","bytes="+i.rangeStart+"-"+String(i.rangeEnd-1)),w}function t(i,B){return new self.Request(i.url,B)}var n=function(i){G(B,i);function B(w,y,x){var E;return E=i.call(this,w)||this,E.code=void 0,E.details=void 0,E.code=y,E.details=x,E}return B}(P(Error));V.default=A},"./src/utils/imsc1-ttml-parser.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"IMSC1_CODEC",function(){return _}),O.d(V,"parseIMSC1",function(){return r});var z=O("./src/utils/mp4-tools.ts"),D=O("./src/utils/vttparser.ts"),I=O("./src/utils/vttcue.ts"),G=O("./src/demux/id3.ts"),P=O("./src/utils/timescale-conversion.ts"),L=O("./src/utils/webvtt-parser.ts");function S(){return S=Object.assign||function(c){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(c[l]=a[l])}return c},S.apply(this,arguments)}var _="stpp.ttml.im1t",b=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,u=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,o={left:"start",center:"center",right:"end",start:"start",end:"end"};function r(c,e,a,l,g){var p=Object(z.findBox)(new Uint8Array(c),["mdat"]);if(p.length===0){g(new Error("Could not parse IMSC1 mdat"));return}var f=p[0],R=Object(G.utf8ArrayToStr)(new Uint8Array(c,f.start,f.end-f.start)),U=Object(P.toTimescaleFromScale)(e,1,a);try{l(A(R,U))}catch(Q){g(Q)}}function A(c,e){var a=new DOMParser,l=a.parseFromString(c,"text/xml"),g=l.getElementsByTagName("tt")[0];if(!g)throw new Error("Invalid ttml");var p={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},f=Object.keys(p).reduce(function(J,k){return J[k]=g.getAttribute("ttp:"+k)||p[k],J},{}),R=g.getAttribute("xml:space")!=="preserve",U=t(s(g,"styling","style")),Q=t(s(g,"layout","region")),j=s(g,"body","[begin]");return[].map.call(j,function(J){var k=n(J,R);if(!k||!J.hasAttribute("begin"))return null;var Y=y(J.getAttribute("begin"),f),ne=y(J.getAttribute("dur"),f),me=y(J.getAttribute("end"),f);if(Y===null)throw w(J);if(me===null){if(ne===null)throw w(J);me=Y+ne}var _e=new I.default(Y-e,me-e,k);_e.id=Object(L.generateCueId)(_e.startTime,_e.endTime,_e.text);var Oe=Q[J.getAttribute("region")],xe=U[J.getAttribute("style")];_e.position=10,_e.size=80;var Se=i(Oe,xe),Fe=Se.textAlign;if(Fe){var Pe=o[Fe];Pe&&(_e.lineAlign=Pe),_e.align=Fe}return S(_e,Se),_e}).filter(function(J){return J!==null})}function s(c,e,a){var l=c.getElementsByTagName(e)[0];return l?[].slice.call(l.querySelectorAll(a)):[]}function t(c){return c.reduce(function(e,a){var l=a.getAttribute("xml:id");return l&&(e[l]=a),e},{})}function n(c,e){return[].slice.call(c.childNodes).reduce(function(a,l,g){var p;return l.nodeName==="br"&&g?a+`
`:(p=l.childNodes)!==null&&p!==void 0&&p.length?n(l,e):e?a+l.textContent.trim().replace(/\s+/g," "):a+l.textContent},"")}function i(c,e){var a="http://www.w3.org/ns/ttml#styling",l=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return l.reduce(function(g,p){var f=B(e,a,p)||B(c,a,p);return f&&(g[p]=f),g},{})}function B(c,e,a){return c.hasAttributeNS(e,a)?c.getAttributeNS(e,a):null}function w(c){return new Error("Could not parse ttml timestamp "+c)}function y(c,e){if(!c)return null;var a=Object(D.parseTimeStamp)(c);return a===null&&(b.test(c)?a=x(c,e):u.test(c)&&(a=E(c,e))),a}function x(c,e){var a=b.exec(c),l=(a[4]|0)+(a[5]|0)/e.subFrameRate;return(a[1]|0)*3600+(a[2]|0)*60+(a[3]|0)+l/e.frameRate}function E(c,e){var a=u.exec(c),l=Number(a[1]),g=a[2];switch(g){case"h":return l*3600;case"m":return l*60;case"ms":return l*1e3;case"f":return l/e.frameRate;case"t":return l/e.tickRate}return l}},"./src/utils/logger.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"enableLogs",function(){return L}),O.d(V,"logger",function(){return S});var z=function(){},D={trace:z,debug:z,log:z,warn:z,info:z,error:z},I=D;function G(_){var b=self.console[_];return b?b.bind(self.console,"["+_+"] >"):z}function P(_){for(var b=arguments.length,u=new Array(b>1?b-1:0),o=1;o<b;o++)u[o-1]=arguments[o];u.forEach(function(r){I[r]=_[r]?_[r].bind(_):G(r)})}function L(_){if(self.console&&_===!0||typeof _=="object"){P(_,"debug","log","info","warn","error");try{I.log()}catch(b){I=D}}else I=D}var S=I},"./src/utils/mediakeys-helper.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"KeySystems",function(){return z}),O.d(V,"requestMediaKeySystemAccess",function(){return D});var z;(function(I){I.WIDEVINE="com.widevine.alpha",I.PLAYREADY="com.microsoft.playready"})(z||(z={}));var D=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"getMediaSource",function(){return z});function z(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"bin2str",function(){return P}),O.d(V,"readUint16",function(){return L}),O.d(V,"readUint32",function(){return S}),O.d(V,"writeUint32",function(){return _}),O.d(V,"findBox",function(){return b}),O.d(V,"parseSegmentIndex",function(){return u}),O.d(V,"parseInitSegment",function(){return o}),O.d(V,"getStartDTS",function(){return r}),O.d(V,"getDuration",function(){return A}),O.d(V,"computeRawDurationFromSamples",function(){return s}),O.d(V,"offsetStartDTS",function(){return t}),O.d(V,"segmentValidRange",function(){return n}),O.d(V,"appendUint8Array",function(){return i});var z=O("./src/utils/typed-array.ts"),D=O("./src/loader/fragment.ts"),I=Math.pow(2,32)-1,G=[].push;function P(B){return String.fromCharCode.apply(null,B)}function L(B,w){"data"in B&&(w+=B.start,B=B.data);var y=B[w]<<8|B[w+1];return y<0?65536+y:y}function S(B,w){"data"in B&&(w+=B.start,B=B.data);var y=B[w]<<24|B[w+1]<<16|B[w+2]<<8|B[w+3];return y<0?4294967296+y:y}function _(B,w,y){"data"in B&&(w+=B.start,B=B.data),B[w]=y>>24,B[w+1]=y>>16&255,B[w+2]=y>>8&255,B[w+3]=y&255}function b(B,w){var y=[];if(!w.length)return y;var x,E,c;"data"in B?(x=B.data,E=B.start,c=B.end):(x=B,E=0,c=x.byteLength);for(var e=E;e<c;){var a=S(x,e),l=P(x.subarray(e+4,e+8)),g=a>1?e+a:c;if(l===w[0])if(w.length===1)y.push({data:x,start:e+8,end:g});else{var p=b({data:x,start:e+8,end:g},w.slice(1));p.length&&G.apply(y,p)}e=g}return y}function u(B){var w=b(B,["moov"]),y=w[0],x=y?y.end:null,E=b(B,["sidx"]);if(!E||!E[0])return null;var c=[],e=E[0],a=e.data[0],l=a===0?8:16,g=S(e,l);l+=4;var p=0,f=0;a===0?l+=8:l+=16,l+=2;var R=e.end+f,U=L(e,l);l+=2;for(var Q=0;Q<U;Q++){var j=l,J=S(e,j);j+=4;var k=J&2147483647,Y=(J&2147483648)>>>31;if(Y===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var ne=S(e,j);j+=4,c.push({referenceSize:k,subsegmentDuration:ne,info:{duration:ne/g,start:R,end:R+k-1}}),R+=k,j+=4,l=j}return{earliestPresentationTime:p,timescale:g,version:a,referencesCount:U,references:c,moovEndOffset:x}}function o(B){for(var w=[],y=b(B,["moov","trak"]),x=0;x<y.length;x++){var E=y[x],c=b(E,["tkhd"])[0];if(c){var e=c.data[c.start],a=e===0?12:20,l=S(c,a),g=b(E,["mdia","mdhd"])[0];if(g){e=g.data[g.start],a=e===0?12:20;var p=S(g,a),f=b(E,["mdia","hdlr"])[0];if(f){var R=P(f.data.subarray(f.start+8,f.start+12)),U={soun:D.ElementaryStreamTypes.AUDIO,vide:D.ElementaryStreamTypes.VIDEO}[R];if(U){var Q=b(E,["mdia","minf","stbl","stsd"])[0],j=void 0;Q&&(j=P(Q.data.subarray(Q.start+12,Q.start+16))),w[l]={timescale:p,type:U},w[U]={timescale:p,id:l,codec:j}}}}}}var J=b(B,["moov","mvex","trex"]);return J.forEach(function(k){var Y=S(k,4),ne=w[Y];ne&&(ne.default={duration:S(k,12),flags:S(k,20)})}),w}function r(B,w){return b(w,["moof","traf"]).reduce(function(y,x){var E=b(x,["tfdt"])[0],c=E.data[E.start],e=b(x,["tfhd"]).reduce(function(a,l){var g=S(l,4),p=B[g];if(p){var f=S(E,4);c===1&&(f*=Math.pow(2,32),f+=S(E,8));var R=p.timescale||9e4,U=f/R;if(isFinite(U)&&(a===null||U<a))return U}return a},null);return e!==null&&isFinite(e)&&(y===null||e<y)?e:y},null)||0}function A(B,w){for(var y=0,x=0,E=0,c=b(B,["moof","traf"]),e=0;e<c.length;e++){var a=c[e],l=b(a,["tfhd"])[0],g=S(l,4),p=w[g];if(!p)continue;var f=p.default,R=S(l,0)|(f==null?void 0:f.flags),U=f==null?void 0:f.duration;R&8&&(R&2?U=S(l,12):U=S(l,8));for(var Q=p.timescale||9e4,j=b(a,["trun"]),J=0;J<j.length;J++){if(U){var k=S(j[J],4);y=U*k}else y=s(j[J]);p.type===D.ElementaryStreamTypes.VIDEO?x+=y/Q:p.type===D.ElementaryStreamTypes.AUDIO&&(E+=y/Q)}}if(x===0&&E===0){var Y=u(B);if(Y!=null&&Y.references)return Y.references.reduce(function(ne,me){return ne+me.info.duration||0},0)}return x||E}function s(B){var w=S(B,0),y=8;w&1&&(y+=4),w&4&&(y+=4);for(var x=0,E=S(B,4),c=0;c<E;c++){if(w&256){var e=S(B,y);x+=e,y+=4}w&512&&(y+=4),w&1024&&(y+=4),w&2048&&(y+=4)}return x}function t(B,w,y){b(w,["moof","traf"]).forEach(function(x){b(x,["tfhd"]).forEach(function(E){var c=S(E,4),e=B[c];if(!e)return;var a=e.timescale||9e4;b(x,["tfdt"]).forEach(function(l){var g=l.data[l.start],p=S(l,4);if(g===0)_(l,4,p-y*a);else{p*=Math.pow(2,32),p+=S(l,8),p-=y*a,p=Math.max(p,0);var f=Math.floor(p/(I+1)),R=Math.floor(p%(I+1));_(l,4,f),_(l,8,R)}})})})}function n(B){var w={valid:null,remainder:null},y=b(B,["moof"]);if(y){if(y.length<2)return w.remainder=B,w}else return w;var x=y[y.length-1];return w.valid=Object(z.sliceUint8)(B,0,x.start-8),w.remainder=Object(z.sliceUint8)(B,x.start-8),w}function i(B,w){var y=new Uint8Array(B.length+w.length);return y.set(B),y.set(w,B.length),y}},"./src/utils/output-filter.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"default",function(){return z});var z=function(){function D(G,P){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=G,this.trackName=P}var I=D.prototype;return I.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},I.newCue=function(P,L,S){(this.startTime===null||this.startTime>P)&&(this.startTime=P),this.endTime=L,this.screen=S,this.timelineController.createCaptionsTrack(this.trackName)},I.reset=function(){this.cueRanges=[]},D}()},"./src/utils/texttrack-utils.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"sendAddTrackEvent",function(){return D}),O.d(V,"addCueToTrack",function(){return I}),O.d(V,"clearCurrentCues",function(){return G}),O.d(V,"removeCuesInRange",function(){return P}),O.d(V,"getCuesInRange",function(){return S});var z=O("./src/utils/logger.ts");function D(_,b){var u;try{u=new Event("addtrack")}catch(o){u=document.createEvent("Event"),u.initEvent("addtrack",!1,!1)}u.track=_,b.dispatchEvent(u)}function I(_,b){var u=_.mode;if(u==="disabled"&&(_.mode="hidden"),_.cues&&!_.cues.getCueById(b.id))try{if(_.addCue(b),!_.cues.getCueById(b.id))throw new Error("addCue is failed for: "+b)}catch(r){z.logger.debug("[texttrack-utils]: "+r);var o=new self.TextTrackCue(b.startTime,b.endTime,b.text);o.id=b.id,_.addCue(o)}u==="disabled"&&(_.mode=u)}function G(_){var b=_.mode;if(b==="disabled"&&(_.mode="hidden"),_.cues)for(var u=_.cues.length;u--;)_.removeCue(_.cues[u]);b==="disabled"&&(_.mode=b)}function P(_,b,u){var o=_.mode;if(o==="disabled"&&(_.mode="hidden"),_.cues&&_.cues.length>0)for(var r=S(_.cues,b,u),A=0;A<r.length;A++)_.removeCue(r[A]);o==="disabled"&&(_.mode=o)}function L(_,b){if(b<_[0].startTime)return 0;var u=_.length-1;if(b>_[u].endTime)return-1;for(var o=0,r=u;o<=r;){var A=Math.floor((r+o)/2);if(b<_[A].startTime)r=A-1;else if(b>_[A].startTime&&o<u)o=A+1;else return A}return _[o].startTime-b<b-_[r].startTime?o:r}function S(_,b,u){var o=[],r=L(_,b);if(r>-1)for(var A=r,s=_.length;A<s;A++){var t=_[A];if(t.startTime>=b&&t.endTime<=u)o.push(t);else if(t.startTime>u)return o}return o}},"./src/utils/time-ranges.ts":function(ve,V,O){"use strict";O.r(V);var z={toString:function(I){for(var G="",P=I.length,L=0;L<P;L++)G+="["+I.start(L).toFixed(3)+","+I.end(L).toFixed(3)+"]";return G}};V.default=z},"./src/utils/timescale-conversion.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"toTimescaleFromBase",function(){return D}),O.d(V,"toTimescaleFromScale",function(){return I}),O.d(V,"toMsFromMpegTsClock",function(){return G}),O.d(V,"toMpegTsClockFromTimescale",function(){return P});var z=9e4;function D(L,S,_,b){_===void 0&&(_=1),b===void 0&&(b=!1);var u=L*S*_;return b?Math.round(u):u}function I(L,S,_,b){return _===void 0&&(_=1),b===void 0&&(b=!1),D(L,S,1/_,b)}function G(L,S){return S===void 0&&(S=!1),D(L,1e3,1/z,S)}function P(L,S){return S===void 0&&(S=1),D(L,z,1/S)}},"./src/utils/typed-array.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"sliceUint8",function(){return z});function z(D,I,G){return Uint8Array.prototype.slice?D.slice(I,G):new Uint8Array(Array.prototype.slice.call(D,I,G))}},"./src/utils/vttcue.ts":function(ve,V,O){"use strict";O.r(V),V.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var z=["","lr","rl"],D=["start","middle","end","left","right"];function I(_,b){if(typeof b!="string")return!1;if(!Array.isArray(_))return!1;var u=b.toLowerCase();return~_.indexOf(u)?u:!1}function G(_){return I(z,_)}function P(_){return I(D,_)}function L(_){for(var b=arguments.length,u=new Array(b>1?b-1:0),o=1;o<b;o++)u[o-1]=arguments[o];for(var r=1;r<arguments.length;r++){var A=arguments[r];for(var s in A)_[s]=A[s]}return _}function S(_,b,u){var o=this,r={enumerable:!0};o.hasBeenReset=!1;var A="",s=!1,t=_,n=b,i=u,B=null,w="",y=!0,x="auto",E="start",c=50,e="middle",a=50,l="middle";Object.defineProperty(o,"id",L({},r,{get:function(){return A},set:function(p){A=""+p}})),Object.defineProperty(o,"pauseOnExit",L({},r,{get:function(){return s},set:function(p){s=!!p}})),Object.defineProperty(o,"startTime",L({},r,{get:function(){return t},set:function(p){if(typeof p!="number")throw new TypeError("Start time must be set to a number.");t=p,this.hasBeenReset=!0}})),Object.defineProperty(o,"endTime",L({},r,{get:function(){return n},set:function(p){if(typeof p!="number")throw new TypeError("End time must be set to a number.");n=p,this.hasBeenReset=!0}})),Object.defineProperty(o,"text",L({},r,{get:function(){return i},set:function(p){i=""+p,this.hasBeenReset=!0}})),Object.defineProperty(o,"region",L({},r,{get:function(){return B},set:function(p){B=p,this.hasBeenReset=!0}})),Object.defineProperty(o,"vertical",L({},r,{get:function(){return w},set:function(p){var f=G(p);if(f===!1)throw new SyntaxError("An invalid or illegal string was specified.");w=f,this.hasBeenReset=!0}})),Object.defineProperty(o,"snapToLines",L({},r,{get:function(){return y},set:function(p){y=!!p,this.hasBeenReset=!0}})),Object.defineProperty(o,"line",L({},r,{get:function(){return x},set:function(p){if(typeof p!="number"&&p!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");x=p,this.hasBeenReset=!0}})),Object.defineProperty(o,"lineAlign",L({},r,{get:function(){return E},set:function(p){var f=P(p);if(!f)throw new SyntaxError("An invalid or illegal string was specified.");E=f,this.hasBeenReset=!0}})),Object.defineProperty(o,"position",L({},r,{get:function(){return c},set:function(p){if(p<0||p>100)throw new Error("Position must be between 0 and 100.");c=p,this.hasBeenReset=!0}})),Object.defineProperty(o,"positionAlign",L({},r,{get:function(){return e},set:function(p){var f=P(p);if(!f)throw new SyntaxError("An invalid or illegal string was specified.");e=f,this.hasBeenReset=!0}})),Object.defineProperty(o,"size",L({},r,{get:function(){return a},set:function(p){if(p<0||p>100)throw new Error("Size must be between 0 and 100.");a=p,this.hasBeenReset=!0}})),Object.defineProperty(o,"align",L({},r,{get:function(){return l},set:function(p){var f=P(p);if(!f)throw new SyntaxError("An invalid or illegal string was specified.");l=f,this.hasBeenReset=!0}})),o.displayState=void 0}return S.prototype.getCueAsHTML=function(){var _=self.WebVTT;return _.convertCueToDOMTree(self,this.text)},S}()},"./src/utils/vttparser.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"parseTimeStamp",function(){return I}),O.d(V,"fixLineBreaks",function(){return b}),O.d(V,"VTTParser",function(){return u});var z=O("./src/utils/vttcue.ts"),D=function(){function o(){}var r=o.prototype;return r.decode=function(s,t){if(!s)return"";if(typeof s!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(s))},o}();function I(o){function r(s,t,n,i){return(s|0)*3600+(t|0)*60+(n|0)+parseFloat(i||0)}var A=o.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return A?parseFloat(A[2])>59?r(A[2],A[3],0,A[4]):r(A[1],A[2],A[3],A[4]):null}var G=function(){function o(){this.values=Object.create(null)}var r=o.prototype;return r.set=function(s,t){!this.get(s)&&t!==""&&(this.values[s]=t)},r.get=function(s,t,n){return n?this.has(s)?this.values[s]:t[n]:this.has(s)?this.values[s]:t},r.has=function(s){return s in this.values},r.alt=function(s,t,n){for(var i=0;i<n.length;++i)if(t===n[i]){this.set(s,t);break}},r.integer=function(s,t){/^-?\d+$/.test(t)&&this.set(s,parseInt(t,10))},r.percent=function(s,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){var n=parseFloat(t);if(n>=0&&n<=100)return this.set(s,n),!0}return!1},o}();function P(o,r,A,s){var t=s?o.split(s):[o];for(var n in t){if(typeof t[n]!="string")continue;var i=t[n].split(A);if(i.length!==2)continue;var B=i[0],w=i[1];r(B,w)}}var L=new z.default(0,0,""),S=L.align==="middle"?"middle":"center";function _(o,r,A){var s=o;function t(){var B=I(o);if(B===null)throw new Error("Malformed timestamp: "+s);return o=o.replace(/^[^\sa-zA-Z-]+/,""),B}function n(B,w){var y=new G;P(B,function(c,e){var a;switch(c){case"region":for(var l=A.length-1;l>=0;l--)if(A[l].id===e){y.set(c,A[l].region);break}break;case"vertical":y.alt(c,e,["rl","lr"]);break;case"line":a=e.split(","),y.integer(c,a[0]),y.percent(c,a[0])&&y.set("snapToLines",!1),y.alt(c,a[0],["auto"]),a.length===2&&y.alt("lineAlign",a[1],["start",S,"end"]);break;case"position":a=e.split(","),y.percent(c,a[0]),a.length===2&&y.alt("positionAlign",a[1],["start",S,"end","line-left","line-right","auto"]);break;case"size":y.percent(c,e);break;case"align":y.alt(c,e,["start",S,"end","left","right"]);break}},/:/,/\s/),w.region=y.get("region",null),w.vertical=y.get("vertical","");var x=y.get("line","auto");x==="auto"&&L.line===-1&&(x=-1),w.line=x,w.lineAlign=y.get("lineAlign","start"),w.snapToLines=y.get("snapToLines",!0),w.size=y.get("size",100),w.align=y.get("align",S);var E=y.get("position","auto");E==="auto"&&L.position===50&&(E=w.align==="start"||w.align==="left"?0:w.align==="end"||w.align==="right"?100:50),w.position=E}function i(){o=o.replace(/^\s+/,"")}if(i(),r.startTime=t(),i(),o.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+s);o=o.substr(3),i(),r.endTime=t(),i(),n(o,r)}function b(o){return o.replace(/<br(?: \/)?>/gi,`
`)}var u=function(){function o(){this.state="INITIAL",this.buffer="",this.decoder=new D,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var r=o.prototype;return r.parse=function(s){var t=this;s&&(t.buffer+=t.decoder.decode(s,{stream:!0}));function n(){var E=t.buffer,c=0;for(E=b(E);c<E.length&&E[c]!=="\r"&&E[c]!==`
`;)++c;var e=E.substr(0,c);return E[c]==="\r"&&++c,E[c]===`
`&&++c,t.buffer=E.substr(c),e}function i(E){P(E,function(c,e){},/:/)}try{var B="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;B=n();var w=B.match(/^()?WEBVTT([ \t].*)?$/);if(!w||!w[0])throw new Error("Malformed WebVTT signature.");t.state="HEADER"}for(var y=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;y?y=!1:B=n();switch(t.state){case"HEADER":/:/.test(B)?i(B):B||(t.state="ID");continue;case"NOTE":B||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(B)){t.state="NOTE";break}if(!B)continue;if(t.cue=new z.default(0,0,""),t.state="CUE",B.indexOf("-->")===-1){t.cue.id=B;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{_(B,t.cue,t.regionList)}catch(E){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{var x=B.indexOf("-->")!==-1;if(!B||x&&(y=!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+=B}continue;case"BADCUE":B||(t.state="ID")}}}catch(E){t.state==="CUETEXT"&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=t.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},r.flush=function(){var s=this;try{if((s.cue||s.state==="HEADER")&&(s.buffer+=`
`,s.parse()),s.state==="INITIAL"||s.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(t){s.onparsingerror&&s.onparsingerror(t)}return s.onflush&&s.onflush(),this},o}()},"./src/utils/webvtt-parser.ts":function(ve,V,O){"use strict";O.r(V),O.d(V,"generateCueId",function(){return u}),O.d(V,"parseWebVTT",function(){return r});var z=O("./src/polyfills/number.ts"),D=O("./src/utils/vttparser.ts"),I=O("./src/demux/id3.ts"),G=O("./src/utils/timescale-conversion.ts"),P=O("./src/remux/mp4-remuxer.ts"),L=/\r\n|\n\r|\n|\r/g,S=function(s,t,n){return n===void 0&&(n=0),s.substr(n,t.length)===t},_=function(s){var t=parseInt(s.substr(-3)),n=parseInt(s.substr(-6,2)),i=parseInt(s.substr(-9,2)),B=s.length>9?parseInt(s.substr(0,s.indexOf(":"))):0;if(!Object(z.isFiniteNumber)(t)||!Object(z.isFiniteNumber)(n)||!Object(z.isFiniteNumber)(i)||!Object(z.isFiniteNumber)(B))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+s);return t+=1e3*n,t+=60*1e3*i,t+=60*60*1e3*B,t},b=function(s){for(var t=5381,n=s.length;n;)t=t*33^s.charCodeAt(--n);return(t>>>0).toString()};function u(A,s,t){return b(A.toString())+b(s.toString())+b(t)}var o=function(s,t,n){var i=s[t],B=s[i.prevCC];if(!B||!B.new&&i.new){s.ccOffset=s.presentationOffset=i.start,i.new=!1;return}for(;(w=B)!==null&&w!==void 0&&w.new;){var w;s.ccOffset+=i.start-B.start,i.new=!1,i=B,B=s[i.prevCC]}s.presentationOffset=n};function r(A,s,t,n,i,B,w,y){var x=new D.VTTParser,E=Object(I.utf8ArrayToStr)(new Uint8Array(A)).trim().replace(L,`
`).split(`
`),c=[],e=Object(G.toMpegTsClockFromTimescale)(s,t),a="00:00.000",l=0,g=0,p,f=!0,R=!1;x.oncue=function(U){var Q=n[i],j=n.ccOffset,J=(l-e)/9e4;if(Q!=null&&Q.new&&(g!==void 0?j=n.ccOffset=Q.start:o(n,i,J)),J&&(j=J-n.presentationOffset),R){var k=U.endTime-U.startTime,Y=Object(P.normalizePts)((U.startTime+j-g)*9e4,B*9e4)/9e4;U.startTime=Y,U.endTime=Y+k}var ne=U.text.trim();U.text=decodeURIComponent(encodeURIComponent(ne)),U.id||(U.id=u(U.startTime,U.endTime,ne)),U.endTime>0&&c.push(U)},x.onparsingerror=function(U){p=U},x.onflush=function(){if(p){y(p);return}w(c)},E.forEach(function(U){if(f)if(S(U,"X-TIMESTAMP-MAP=")){f=!1,R=!0,U.substr(16).split(",").forEach(function(Q){S(Q,"LOCAL:")?a=Q.substr(6):S(Q,"MPEGTS:")&&(l=parseInt(Q.substr(7)))});try{g=_(a)/1e3}catch(Q){R=!1,p=Q}return}else U===""&&(f=!1);x.parse(U+`
`)}),x.flush()}},"./src/utils/xhr-loader.ts":function(ve,V,O){"use strict";O.r(V);var z=O("./src/utils/logger.ts"),D=O("./src/loader/load-stats.ts"),I=/^age:\s*[\d.]+\s*$/m,G=function(){function P(S){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=S?S.xhrSetup:null,this.stats=new D.LoadStats,this.retryDelay=0}var L=P.prototype;return L.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},L.abortInternal=function(){var _=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),_&&(_.onreadystatechange=null,_.onprogress=null,_.readyState!==4&&(this.stats.aborted=!0,_.abort()))},L.abort=function(){var _;this.abortInternal(),(_=this.callbacks)!==null&&_!==void 0&&_.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},L.load=function(_,b,u){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=_,this.config=b,this.callbacks=u,this.retryDelay=b.retryDelay,this.loadInternal()},L.loadInternal=function(){var _=this.config,b=this.context;if(!_)return;var u=this.loader=new self.XMLHttpRequest,o=this.stats;o.loading.first=0,o.loaded=0;var r=this.xhrSetup;try{if(r)try{r(u,b.url)}catch(t){u.open("GET",b.url,!0),r(u,b.url)}u.readyState||u.open("GET",b.url,!0);var A=this.context.headers;if(A)for(var s in A)u.setRequestHeader(s,A[s])}catch(t){this.callbacks.onError({code:u.status,text:t.message},b,u);return}b.rangeEnd&&u.setRequestHeader("Range","bytes="+b.rangeStart+"-"+(b.rangeEnd-1)),u.onreadystatechange=this.readystatechange.bind(this),u.onprogress=this.loadprogress.bind(this),u.responseType=b.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),_.timeout),u.send()},L.readystatechange=function(){var _=this.context,b=this.loader,u=this.stats;if(!_||!b)return;var o=b.readyState,r=this.config;if(u.aborted)return;if(o>=2)if(self.clearTimeout(this.requestTimeout),u.loading.first===0&&(u.loading.first=Math.max(self.performance.now(),u.loading.start)),o===4){b.onreadystatechange=null,b.onprogress=null;var A=b.status;if(A>=200&&A<300){u.loading.end=Math.max(self.performance.now(),u.loading.first);var s,t;if(_.responseType==="arraybuffer"?(s=b.response,t=s.byteLength):(s=b.responseText,t=s.length),u.loaded=u.total=t,!this.callbacks)return;var n=this.callbacks.onProgress;if(n&&n(u,_,s,b),!this.callbacks)return;var i={url:b.responseURL,data:s};this.callbacks.onSuccess(i,u,_,b)}else u.retry>=r.maxRetry||A>=400&&A<499?(z.logger.error(A+" while loading "+_.url),this.callbacks.onError({code:A,text:b.statusText},_,b)):(z.logger.warn(A+" while loading "+_.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,r.maxRetryDelay),u.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.timeout)},L.loadtimeout=function(){z.logger.warn("timeout while loading "+this.context.url);var _=this.callbacks;_&&(this.abortInternal(),_.onTimeout(this.stats,this.context,this.loader))},L.loadprogress=function(_){var b=this.stats;b.loaded=_.loaded,_.lengthComputable&&(b.total=_.total)},L.getCacheAge=function(){var _=null;if(this.loader&&I.test(this.loader.getAllResponseHeaders())){var b=this.loader.getResponseHeader("age");_=b?parseFloat(b):null}return _},P}();V.default=G}}).default})},vHTk:function(vt,$e,q){vt.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF:function(vt,$e,q){"use strict";q.d($e,"a",function(){return Ye});var ve=q("rePB"),V=q("VTBJ"),O=q("KQm4"),z=q("U8pU"),D=q("ODXe"),I=q("q1tI"),G=q("TSYQ"),P=q.n(G),L=q("Gytx"),S=q.n(L),_=q("Kwbf"),b=q("t23M"),u=q("qx4F"),o=q("6eGT"),r=q("IBYe"),A=q("Ff2n"),s=q("c+Xe"),t=q("fyJ8"),n=q("biw7");function i(Ce,Ue,Qe,He,Ie){var Me=Qe[Ce]||{},ye=Qe[Ue]||{},le,ue;Me.fixed==="left"?le=He.left[Ce]:ye.fixed==="right"&&(ue=He.right[Ue]);var Z=!1,te=!1,Ae=!1,de=!1,Be=Qe[Ue+1],Ne=Qe[Ce-1];if(Ie==="rtl"){if(le!==void 0){var Xe=Ne&&Ne.fixed==="left";de=!Xe}else if(ue!==void 0){var ct=Be&&Be.fixed==="right";Ae=!ct}}else if(le!==void 0){var ut=Be&&Be.fixed==="left";Z=!ut}else if(ue!==void 0){var st=Ne&&Ne.fixed==="right";te=!st}return{fixLeft:le,fixRight:ue,lastFixLeft:Z,firstFixRight:te,lastFixRight:Ae,firstFixLeft:de,isSticky:He.isSticky}}var B=q("sR1s");function w(Ce){var Ue=Ce.cells,Qe=Ce.stickyOffsets,He=Ce.flattenColumns,Ie=Ce.rowComponent,Me=Ce.cellComponent,ye=Ce.onHeaderRow,le=Ce.index,ue=I.useContext(n.a),Z=ue.prefixCls,te=ue.direction,Ae;ye&&(Ae=ye(Ue.map(function(Be){return Be.column}),le));var de=Object(B.a)(Ue.map(function(Be){return Be.column}));return I.createElement(Ie,Object.assign({},Ae),Ue.map(function(Be,Ne){var Xe=Be.column,ct=i(Be.colStart,Be.colEnd,He,Qe,te),ut;return Xe&&Xe.onHeaderCell&&(ut=Be.column.onHeaderCell(Xe)),I.createElement(t.a,Object.assign({},Be,{ellipsis:Xe.ellipsis,align:Xe.align,component:Me,prefixCls:Z,key:de[Ne]},ct,{additionalProps:ut,rowType:"header"}))}))}w.displayName="HeaderRow";var y=w;function x(Ce){var Ue=[];function Qe(ye,le){var ue=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ue[ue]=Ue[ue]||[];var Z=le,te=ye.filter(Boolean).map(function(Ae){var de={key:Ae.key,className:Ae.className||"",children:Ae.title,column:Ae,colStart:Z},Be=1,Ne=Ae.children;return Ne&&Ne.length>0&&(Be=Qe(Ne,Z,ue+1).reduce(function(Xe,ct){return Xe+ct},0),de.hasSubColumns=!0),"colSpan"in Ae&&(Be=Ae.colSpan),"rowSpan"in Ae&&(de.rowSpan=Ae.rowSpan),de.colSpan=Be,de.colEnd=de.colStart+Be-1,Ue[ue].push(de),Z+=Be,Be});return te}Qe(Ce,0);for(var He=Ue.length,Ie=function(le){Ue[le].forEach(function(ue){!("rowSpan"in ue)&&!ue.hasSubColumns&&(ue.rowSpan=He-le)})},Me=0;Me<He;Me+=1)Ie(Me);return Ue}function E(Ce){var Ue=Ce.stickyOffsets,Qe=Ce.columns,He=Ce.flattenColumns,Ie=Ce.onHeaderRow,Me=I.useContext(n.a),ye=Me.prefixCls,le=Me.getComponent,ue=I.useMemo(function(){return x(Qe)},[Qe]),Z=le(["header","wrapper"],"thead"),te=le(["header","row"],"tr"),Ae=le(["header","cell"],"th");return I.createElement(Z,{className:"".concat(ye,"-thead")},ue.map(function(de,Be){var Ne=I.createElement(y,{key:Be,flattenColumns:He,cells:de,stickyOffsets:Ue,rowComponent:te,cellComponent:Ae,onHeaderRow:Ie,index:Be});return Ne}))}var c=E,e=q("hW8S");function a(Ce){for(var Ue=Ce.colWidths,Qe=Ce.columns,He=Ce.columCount,Ie=[],Me=He||Qe.length,ye=!1,le=Me-1;le>=0;le-=1){var ue=Ue[le],Z=Qe&&Qe[le],te=Z&&Z[e.a];(ue||te||ye)&&(Ie.unshift(I.createElement("col",Object.assign({key:le,style:{width:ue,minWidth:ue}},te))),ye=!0)}return I.createElement("colgroup",null,Ie)}var l=a;function g(Ce,Ue){return Object(I.useMemo)(function(){for(var Qe=[],He=0;He<Ue;He+=1){var Ie=Ce[He];if(Ie!==void 0)Qe[He]=Ie;else return null}return Qe},[Ce.join("_"),Ue])}var p=I.forwardRef(function(Ce,Ue){var Qe=Ce.noData,He=Ce.columns,Ie=Ce.flattenColumns,Me=Ce.colWidths,ye=Ce.columCount,le=Ce.stickyOffsets,ue=Ce.direction,Z=Ce.fixHeader,te=Ce.offsetHeader,Ae=Ce.stickyClassName,de=Ce.onScroll,Be=Object(A.a)(Ce,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Ne=I.useContext(n.a),Xe=Ne.prefixCls,ct=Ne.scrollbarSize,ut=Ne.isSticky,st=ut&&!Z?0:ct,Nt=I.useRef(null),pt=I.useCallback(function(wt){Object(s.b)(Ue,wt),Object(s.b)(Nt,wt)},[]);I.useEffect(function(){var wt;function Pt(Je){var bt=Je.currentTarget,dt=Je.deltaX;dt&&(de({currentTarget:bt,scrollLeft:bt.scrollLeft+dt}),Je.preventDefault())}return(wt=Nt.current)===null||wt===void 0||wt.addEventListener("wheel",Pt),function(){var Je;(Je=Nt.current)===null||Je===void 0||Je.removeEventListener("wheel",Pt)}},[]);var et=Ie[Ie.length-1],er={fixed:et?et.fixed:null,onHeaderCell:function(){return{className:"".concat(Xe,"-cell-scrollbar")}}},qt=Object(I.useMemo)(function(){return st?[].concat(Object(O.a)(He),[er]):He},[st,He]),Ot=Object(I.useMemo)(function(){return st?[].concat(Object(O.a)(Ie),[er]):Ie},[st,Ie]),mt=Object(I.useMemo)(function(){var wt=le.right,Pt=le.left;return Object(V.a)(Object(V.a)({},le),{},{left:ue==="rtl"?[].concat(Object(O.a)(Pt.map(function(Je){return Je+st})),[0]):Pt,right:ue==="rtl"?wt:[].concat(Object(O.a)(wt.map(function(Je){return Je+st})),[0]),isSticky:ut})},[st,le,ut]),yt=g(Me,ye);return I.createElement("div",{style:Object(V.a)({overflow:"hidden"},ut?{top:te}:{}),ref:pt,className:P()("".concat(Xe,"-header"),Object(ve.a)({},Ae,!!Ae))},I.createElement("table",{style:{tableLayout:"fixed",visibility:Qe||yt?null:"hidden"}},I.createElement(l,{colWidths:yt?[].concat(Object(O.a)(yt),[st]):[],columCount:ye+1,columns:Ot}),I.createElement(c,Object.assign({},Be,{stickyOffsets:mt,columns:qt,flattenColumns:Ot}))))});p.displayName="FixedHeader";var f=p,R=I.createContext(null),U=R;function Q(Ce){var Ue=Ce.prefixCls,Qe=Ce.children,He=Ce.component,Ie=Ce.cellComponent,Me=Ce.fixHeader,ye=Ce.fixColumn,le=Ce.horizonScroll,ue=Ce.className,Z=Ce.expanded,te=Ce.componentWidth,Ae=Ce.colSpan,de=I.useContext(n.a),Be=de.scrollbarSize;return I.useMemo(function(){var Ne=Qe;return ye&&(Ne=I.createElement("div",{style:{width:te-(Me?Be:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ue,"-expanded-row-fixed")},Ne)),I.createElement(He,{className:ue,style:{display:Z?null:"none"}},I.createElement(t.a,{component:Ie,prefixCls:Ue,colSpan:Ae},Ne))},[Qe,He,Me,le,ue,Z,te,Ae,Be])}var j=Q;function J(Ce){var Ue=Ce.className,Qe=Ce.style,He=Ce.record,Ie=Ce.index,Me=Ce.rowKey,ye=Ce.getRowKey,le=Ce.rowExpandable,ue=Ce.expandedKeys,Z=Ce.onRow,te=Ce.indent,Ae=te===void 0?0:te,de=Ce.rowComponent,Be=Ce.cellComponent,Ne=Ce.childrenColumnName,Xe=I.useContext(n.a),ct=Xe.prefixCls,ut=Xe.fixedInfoList,st=I.useContext(U),Nt=st.fixHeader,pt=st.fixColumn,et=st.horizonScroll,er=st.componentWidth,qt=st.flattenColumns,Ot=st.expandableType,mt=st.expandRowByClick,yt=st.onTriggerExpand,wt=st.rowClassName,Pt=st.expandedRowClassName,Je=st.indentSize,bt=st.expandIcon,dt=st.expandedRowRender,Lt=st.expandIconColumnIndex,Yt=I.useState(!1),Er=Object(D.a)(Yt,2),Rr=Er[0],Tr=Er[1],Sr=ue&&ue.has(Ce.recordKey);I.useEffect(function(){Sr&&Tr(!0)},[Sr]);var Fr=Ot==="row"&&(!le||le(He)),lr=Ot==="nest",Ir=Ne&&He&&He[Ne],kr=Fr||lr,Or;Z&&(Or=Z(He,Ie));var Jr=function(d){if(mt&&kr&&yt(He,d),Or&&Or.onClick){for(var m,N=arguments.length,X=new Array(N>1?N-1:0),H=1;H<N;H++)X[H-1]=arguments[H];(m=Or).onClick.apply(m,[d].concat(X))}},jr;typeof wt=="string"?jr=wt:typeof wt=="function"&&(jr=wt(He,Ie,Ae));var ie=Object(B.a)(qt),ae=I.createElement(de,Object.assign({},Or,{"data-row-key":Me,className:P()(Ue,"".concat(ct,"-row"),"".concat(ct,"-row-level-").concat(Ae),jr,Or&&Or.className),style:Object(V.a)(Object(V.a)({},Qe),Or?Or.style:null),onClick:Jr}),qt.map(function(M,d){var m=M.render,N=M.dataIndex,X=M.className,H=ie[d],fe=ut[d],ke;d===(Lt||0)&&lr&&(ke=I.createElement(I.Fragment,null,I.createElement("span",{style:{paddingLeft:"".concat(Je*Ae,"px")},className:"".concat(ct,"-row-indent indent-level-").concat(Ae)}),bt({prefixCls:ct,expanded:Sr,expandable:Ir,record:He,onExpand:yt})));var rt;return M.onCell&&(rt=M.onCell(He,Ie)),I.createElement(t.a,Object.assign({className:X,ellipsis:M.ellipsis,align:M.align,component:Be,prefixCls:ct,key:H,record:He,index:Ie,dataIndex:N,render:m,shouldCellUpdate:M.shouldCellUpdate},fe,{appendNode:ke,additionalProps:rt}))})),ce;if(Fr&&(Rr||Sr)){var Te=dt(He,Ie,Ae+1,Sr),We=Pt&&Pt(He,Ie,Ae);ce=I.createElement(j,{expanded:Sr,className:P()("".concat(ct,"-expanded-row"),"".concat(ct,"-expanded-row-level-").concat(Ae+1),We),prefixCls:ct,fixHeader:Nt,fixColumn:pt,horizonScroll:et,component:de,componentWidth:er,cellComponent:Be,colSpan:qt.length},Te)}var Ze;return Ir&&Sr&&(Ze=(He[Ne]||[]).map(function(M,d){var m=ye(M,d);return I.createElement(J,Object.assign({},Ce,{key:m,rowKey:m,record:M,recordKey:m,index:d,indent:Ae+1}))})),I.createElement(I.Fragment,null,ae,ce,Ze)}J.displayName="BodyRow";var k=J,Y=I.createContext(null),ne=Y;function me(Ce){var Ue=Ce.columnKey,Qe=Ce.onColumnResize,He=I.useRef();return I.useEffect(function(){He.current&&Qe(Ue,He.current.offsetWidth)},[]),I.createElement(b.a,{onResize:function(Me){var ye=Me.offsetWidth;Qe(Ue,ye)}},I.createElement("td",{ref:He,style:{padding:0,border:0,height:0}},I.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function _e(Ce){var Ue=Ce.data,Qe=Ce.getRowKey,He=Ce.measureColumnWidth,Ie=Ce.expandedKeys,Me=Ce.onRow,ye=Ce.rowExpandable,le=Ce.emptyNode,ue=Ce.childrenColumnName,Z=I.useContext(ne),te=Z.onColumnResize,Ae=I.useContext(n.a),de=Ae.prefixCls,Be=Ae.getComponent,Ne=I.useContext(U),Xe=Ne.fixHeader,ct=Ne.horizonScroll,ut=Ne.flattenColumns,st=Ne.componentWidth;return I.useMemo(function(){var Nt=Be(["body","wrapper"],"tbody"),pt=Be(["body","row"],"tr"),et=Be(["body","cell"],"td"),er;Ue.length?er=Ue.map(function(Ot,mt){var yt=Qe(Ot,mt);return I.createElement(k,{key:yt,rowKey:yt,record:Ot,recordKey:yt,index:mt,rowComponent:pt,cellComponent:et,expandedKeys:Ie,onRow:Me,getRowKey:Qe,rowExpandable:ye,childrenColumnName:ue})}):er=I.createElement(j,{expanded:!0,className:"".concat(de,"-placeholder"),prefixCls:de,fixHeader:Xe,fixColumn:ct,horizonScroll:ct,component:pt,componentWidth:st,cellComponent:et,colSpan:ut.length},le);var qt=Object(B.a)(ut);return I.createElement(Nt,{className:"".concat(de,"-tbody")},He&&I.createElement("tr",{"aria-hidden":"true",className:"".concat(de,"-measure-row"),style:{height:0}},qt.map(function(Ot){return I.createElement(me,{key:Ot,columnKey:Ot,onColumnResize:te})})),er)},[Ue,de,Me,He,Ie,Qe,Be,st,le,ut])}var Oe=I.memo(_e);Oe.displayName="Body";var xe=Oe,Se=q("wRmb"),Fe=q("xEkU"),Pe=q.n(Fe);function Ee(Ce){var Ue=Object(I.useRef)(Ce),Qe=Object(I.useState)({}),He=Object(D.a)(Qe,2),Ie=He[1],Me=Object(I.useRef)(null),ye=Object(I.useRef)([]);function le(ue){Me.current===null&&(ye.current=[],Me.current=Pe()(function(){ye.current.forEach(function(Z){Ue.current=Z(Ue.current)}),Me.current=null,Ie({})})),ye.current.push(ue)}return Object(I.useEffect)(function(){return function(){Pe.a.cancel(Me.current)}},[]),[Ue.current,le]}function he(Ce){var Ue=Object(I.useRef)(Ce),Qe=Object(I.useRef)(null);function He(){window.clearTimeout(Qe.current)}function Ie(ye){Ue.current=ye,He(),Qe.current=window.setTimeout(function(){Ue.current=null,Qe.current=null},100)}function Me(){return Ue.current}return Object(I.useEffect)(function(){return He},[]),[Ie,Me]}function Ge(Ce,Ue,Qe){var He=Object(I.useMemo)(function(){for(var Ie=[],Me=[],ye=0,le=0,ue=0;ue<Ue;ue+=1)if(Qe==="rtl"){Me[ue]=le,le+=Ce[ue]||0;var Z=Ue-ue-1;Ie[Z]=ye,ye+=Ce[Z]||0}else{Ie[ue]=ye,ye+=Ce[ue]||0;var te=Ue-ue-1;Me[te]=le,le+=Ce[te]||0}return{left:Ie,right:Me}},[Ce,Ue,Qe]);return He}var lt=Ge;function at(Ce){var Ue=Ce.className,Qe=Ce.children;return I.createElement("div",{className:Ue},Qe)}var je=at,it=q("n6Qo");function ee(Ce){var Ue,Qe=Ce.prefixCls,He=Ce.record,Ie=Ce.onExpand,Me=Ce.expanded,ye=Ce.expandable,le="".concat(Qe,"-row-expand-icon");if(!ye)return I.createElement("span",{className:P()(le,"".concat(Qe,"-row-spaced"))});var ue=function(te){Ie(He,te),te.stopPropagation()};return I.createElement("span",{className:P()(le,(Ue={},Object(ve.a)(Ue,"".concat(Qe,"-row-expanded"),Me),Object(ve.a)(Ue,"".concat(Qe,"-row-collapsed"),!Me),Ue)),onClick:ue})}function W(Ce,Ue,Qe){var He=[];function Ie(Me){(Me||[]).forEach(function(ye,le){He.push(Ue(ye,le)),Ie(ye[Qe])})}return Ie(Ce),He}var F=q("zT1h"),oe=q("y0+3"),re=function(Ue,Qe){var He,Ie,Me=Ue.scrollBodyRef,ye=Ue.onScroll,le=Ue.offsetScroll,ue=I.useContext(n.a),Z=ue.prefixCls,te=((He=Me.current)===null||He===void 0?void 0:He.scrollWidth)||0,Ae=((Ie=Me.current)===null||Ie===void 0?void 0:Ie.clientWidth)||0,de=te&&Ae*(Ae/te),Be=I.useRef(),Ne=Ee({scrollLeft:0,isHiddenScrollBar:!1}),Xe=Object(D.a)(Ne,2),ct=Xe[0],ut=Xe[1],st=I.useRef({delta:0,x:0}),Nt=I.useState(!1),pt=Object(D.a)(Nt,2),et=pt[0],er=pt[1],qt=function(){er(!1)},Ot=function(Je){Je.persist(),st.current.delta=Je.pageX-ct.scrollLeft,st.current.x=0,er(!0),Je.preventDefault()},mt=function(Je){var bt,dt=Je||((bt=window)===null||bt===void 0?void 0:bt.event),Lt=dt.buttons;if(!et||Lt===0){et&&er(!1);return}var Yt=st.current.x+Je.pageX-st.current.x-st.current.delta;Yt<=0&&(Yt=0),Yt+de>=Ae&&(Yt=Ae-de),ye({scrollLeft:Yt/Ae*(te+2)}),st.current.x=Je.pageX},yt=function(){var Je=Object(oe.b)(Me.current).top,bt=Je+Me.current.offsetHeight,dt=document.documentElement.scrollTop+window.innerHeight;bt-Object(u.a)()<=dt||Je>=dt-le?ut(function(Lt){return Object(V.a)(Object(V.a)({},Lt),{},{isHiddenScrollBar:!0})}):ut(function(Lt){return Object(V.a)(Object(V.a)({},Lt),{},{isHiddenScrollBar:!1})})},wt=function(Je){ut(function(bt){return Object(V.a)(Object(V.a)({},bt),{},{scrollLeft:Je/te*Ae||0})})};return I.useImperativeHandle(Qe,function(){return{setScrollLeft:wt}}),I.useEffect(function(){var Pt=Object(F.a)(document.body,"mouseup",qt,!1),Je=Object(F.a)(document.body,"mousemove",mt,!1);return yt(),function(){Pt.remove(),Je.remove()}},[de,et]),I.useEffect(function(){var Pt=Object(F.a)(window,"scroll",yt,!1),Je=Object(F.a)(window,"resize",yt,!1);return function(){Pt.remove(),Je.remove()}},[]),I.useEffect(function(){ct.isHiddenScrollBar||ut(function(Pt){var Je,bt;return Object(V.a)(Object(V.a)({},Pt),{},{scrollLeft:Me.current.scrollLeft/((Je=Me.current)===null||Je===void 0?void 0:Je.scrollWidth)*((bt=Me.current)===null||bt===void 0?void 0:bt.clientWidth)})})},[ct.isHiddenScrollBar]),te<=Ae||!de||ct.isHiddenScrollBar?null:I.createElement("div",{style:{height:Object(u.a)(),width:Ae,bottom:le},className:"".concat(Z,"-sticky-scroll")},I.createElement("div",{onMouseDown:Ot,ref:Be,className:P()("".concat(Z,"-sticky-scroll-bar"),Object(ve.a)({},"".concat(Z,"-sticky-scroll-bar-active"),et)),style:{width:"".concat(de,"px"),transform:"translate3d(".concat(ct.scrollLeft,"px, 0, 0)")}}))},we=I.forwardRef(re);function be(Ce,Ue){return I.useMemo(function(){var Qe=!!Ce;return{isSticky:Qe,stickyClassName:Qe?"".concat(Ue,"-sticky-header"):"",offsetHeader:Object(z.a)(Ce)==="object"&&Ce.offsetHeader||0,offsetScroll:Object(z.a)(Ce)==="object"&&Ce.offsetScroll||0}},[Ce,Ue])}var nt=[],tt={},Ye="rc-table-internal-hook",qe=I.memo(function(Ce){var Ue=Ce.children;return Ue},function(Ce,Ue){return S()(Ce.props,Ue.props)?Ce.pingLeft!==Ue.pingLeft||Ce.pingRight!==Ue.pingRight:!1});function At(Ce){var Ue,Qe=Ce.prefixCls,He=Ce.className,Ie=Ce.rowClassName,Me=Ce.style,ye=Ce.data,le=Ce.rowKey,ue=Ce.scroll,Z=Ce.tableLayout,te=Ce.direction,Ae=Ce.title,de=Ce.footer,Be=Ce.summary,Ne=Ce.id,Xe=Ce.showHeader,ct=Ce.components,ut=Ce.emptyText,st=Ce.onRow,Nt=Ce.onHeaderRow,pt=Ce.internalHooks,et=Ce.transformColumns,er=Ce.internalRefs,qt=Ce.sticky,Ot=ye||nt,mt=!!Ot.length,yt=I.useState(0),wt=Object(D.a)(yt,2),Pt=wt[0],Je=wt[1];I.useEffect(function(){Je(Object(u.a)())});var bt=I.useMemo(function(){return Object(B.c)(ct,{})},[ct]),dt=I.useCallback(function(cr,ur){return Object(B.b)(bt,cr)||ur},[bt]),Lt=I.useMemo(function(){return typeof le=="function"?le:function(cr){var ur=cr&&cr[le];return ur}},[le]),Yt=Object(e.c)(Ce),Er=Yt.expandIcon,Rr=Yt.expandedRowKeys,Tr=Yt.defaultExpandedRowKeys,Sr=Yt.defaultExpandAllRows,Fr=Yt.expandedRowRender,lr=Yt.onExpand,Ir=Yt.onExpandedRowsChange,kr=Yt.expandRowByClick,Or=Yt.rowExpandable,Jr=Yt.expandIconColumnIndex,jr=Yt.expandedRowClassName,ie=Yt.childrenColumnName,ae=Yt.indentSize,ce=Er||ee,Te=ie||"children",We=I.useMemo(function(){return Fr?"row":Ce.expandable&&pt===Ye&&Ce.expandable.__PARENT_RENDER_ICON__||Ot.some(function(cr){return cr&&Object(z.a)(cr)==="object"&&cr[Te]})?"nest":!1},[!!Fr,Ot]),Ze=I.useState(function(){return Tr||(Sr?W(Ot,Lt,Te):[])}),M=Object(D.a)(Ze,2),d=M[0],m=M[1],N=I.useMemo(function(){return new Set(Rr||d||[])},[Rr,d]),X=I.useCallback(function(cr){var ur=Lt(cr,Ot.indexOf(cr)),Qr,en=N.has(ur);en?(N.delete(ur),Qr=Object(O.a)(N)):Qr=[].concat(Object(O.a)(N),[ur]),m(Qr),lr&&lr(!en,cr),Ir&&Ir(Qr)},[Lt,N,Ot,lr,Ir]),H=I.useState(0),fe=Object(D.a)(H,2),ke=fe[0],rt=fe[1],ot=Object(Se.b)(Object(V.a)(Object(V.a)(Object(V.a)({},Ce),Yt),{},{expandable:!!Fr,expandedKeys:N,getRowKey:Lt,onTriggerExpand:X,expandIcon:ce,expandIconColumnIndex:Jr,direction:te}),pt===Ye?et:null),Ke=Object(D.a)(ot,2),_t=Ke[0],gt=Ke[1],Bt=I.useMemo(function(){return{columns:_t,flattenColumns:gt}},[_t,gt]),Mt=I.useRef(),Ar=I.useRef(),Wt=I.useRef(),ir=I.useState(!1),kt=Object(D.a)(ir,2),br=kt[0],fr=kt[1],Jt=I.useState(!1),Le=Object(D.a)(Jt,2),Ht=Le[0],Gt=Le[1],Ut=Ee(new Map),Kt=Object(D.a)(Ut,2),Qt=Kt[0],or=Kt[1],Vt=Object(B.a)(gt),ar=Vt.map(function(cr){return Qt.get(cr)}),rr=I.useMemo(function(){return ar},[ar.join("_")]),Dt=lt(rr,gt.length,te),jt=ue&&Object(B.d)(ue.y),Ft=ue&&Object(B.d)(ue.x),tr=Ft&&gt.some(function(cr){var ur=cr.fixed;return ur}),$t=I.useRef(),_r=be(qt,Qe),Zt=_r.isSticky,Lr=_r.offsetHeader,pr=_r.offsetScroll,Hr=_r.stickyClassName,Nr,Ur,dr;jt&&(Ur={overflowY:"scroll",maxHeight:ue.y}),Ft&&(Nr={overflowX:"auto"},jt||(Ur={overflowY:"hidden"}),dr={width:ue.x===!0?"auto":ue.x,minWidth:"100%"});var qr=I.useCallback(function(cr,ur){or(function(Qr){var en=new Map(Qr);return en.set(cr,ur),en})},[]),zt=he(null),Cr=Object(D.a)(zt,2),Pr=Cr[0],$r=Cr[1];function un(cr,ur){if(!ur)return;typeof ur=="function"?ur(cr):ur.scrollLeft!==cr&&(ur.scrollLeft=cr)}var Xr=function(ur){var Qr=ur.currentTarget,en=ur.scrollLeft,Dn=typeof en=="number"?en:Qr.scrollLeft,pi=Qr||tt;if(!$r()||$r()===pi){var ei;Pr(pi),un(Dn,Ar.current),un(Dn,Wt.current),un(Dn,(ei=$t.current)===null||ei===void 0?void 0:ei.setScrollLeft)}if(Qr){var Vi=Qr.scrollWidth,zi=Qr.clientWidth;fr(Dn>0),Gt(Dn<Vi-zi)}},rn=function(){Wt.current&&Xr({currentTarget:Wt.current})},gn=function(ur){var Qr=ur.width;rn(),rt(Mt.current?Mt.current.offsetWidth:Qr)};I.useEffect(function(){return rn},[]),I.useEffect(function(){Ft&&rn()},[Ft]),I.useEffect(function(){pt===Ye&&er&&(er.body.current=Wt.current)});var Qn=dt(["table"],"table"),Yr=I.useMemo(function(){return Z||(tr?ue.x==="max-content"?"auto":"fixed":jt||gt.some(function(cr){var ur=cr.ellipsis;return ur})?"fixed":"auto")},[jt,tr,gt,Z]),cn,bn={colWidths:rr,columCount:gt.length,stickyOffsets:Dt,onHeaderRow:Nt,fixHeader:jt},mn=I.useMemo(function(){return mt?null:typeof ut=="function"?ut():ut},[mt,ut]),ci=I.createElement(xe,{data:Ot,measureColumnWidth:jt||Ft||Zt,expandedKeys:N,rowExpandable:Or,getRowKey:Lt,onRow:st,emptyNode:mn,childrenColumnName:Te}),hi=I.createElement(l,{colWidths:gt.map(function(cr){var ur=cr.width;return ur}),columns:gt}),di=Be&&I.createElement(it.b,null,Be(Ot)),fi=dt(["body"]);if(jt||Zt){var Zn;typeof fi=="function"?(Zn=fi(Ot,{scrollbarSize:Pt,ref:Wt,onScroll:Xr}),bn.colWidths=gt.map(function(cr,ur){var Qr=cr.width,en=ur===_t.length-1?Qr-Pt:Qr;return typeof en=="number"&&!Number.isNaN(en)?en:(Object(_.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):Zn=I.createElement("div",{style:Object(V.a)(Object(V.a)({},Nr),Ur),onScroll:Xr,ref:Wt,className:P()("".concat(Qe,"-body"))},I.createElement(Qn,{style:Object(V.a)(Object(V.a)({},dr),{},{tableLayout:Yr})},hi,ci,di),Zt&&I.createElement(we,{ref:$t,offsetScroll:pr,scrollBodyRef:Wt,onScroll:Xr})),cn=I.createElement(I.Fragment,null,Xe!==!1&&I.createElement(f,Object.assign({noData:!Ot.length},bn,Bt,{direction:te,offsetHeader:Lr,stickyClassName:Hr,ref:Ar,onScroll:Xr})),Zn)}else cn=I.createElement("div",{style:Object(V.a)(Object(V.a)({},Nr),Ur),className:P()("".concat(Qe,"-content")),onScroll:Xr,ref:Wt},I.createElement(Qn,{style:Object(V.a)(Object(V.a)({},dr),{},{tableLayout:Yr})},hi,Xe!==!1&&I.createElement(c,Object.assign({},bn,Bt)),ci,di));var Ki=Object(e.b)(Ce),qn=I.createElement("div",Object.assign({className:P()(Qe,He,(Ue={},Object(ve.a)(Ue,"".concat(Qe,"-rtl"),te==="rtl"),Object(ve.a)(Ue,"".concat(Qe,"-ping-left"),br),Object(ve.a)(Ue,"".concat(Qe,"-ping-right"),Ht),Object(ve.a)(Ue,"".concat(Qe,"-layout-fixed"),Z==="fixed"),Object(ve.a)(Ue,"".concat(Qe,"-fixed-header"),jt),Object(ve.a)(Ue,"".concat(Qe,"-fixed-column"),tr),Object(ve.a)(Ue,"".concat(Qe,"-scroll-horizontal"),Ft),Object(ve.a)(Ue,"".concat(Qe,"-has-fix-left"),gt[0]&&gt[0].fixed),Object(ve.a)(Ue,"".concat(Qe,"-has-fix-right"),gt[gt.length-1]&&gt[gt.length-1].fixed==="right"),Ue)),style:Me,id:Ne,ref:Mt},Ki),I.createElement(qe,{pingLeft:br,pingRight:Ht,props:Object(V.a)(Object(V.a)({},Ce),{},{stickyOffsets:Dt,mergedExpandedKeys:N})},Ae&&I.createElement(je,{className:"".concat(Qe,"-title")},Ae(Ot)),I.createElement("div",{className:"".concat(Qe,"-container")},cn),de&&I.createElement(je,{className:"".concat(Qe,"-footer")},de(Ot))));Ft&&(qn=I.createElement(b.a,{onResize:gn},qn));var ji=I.useMemo(function(){return{prefixCls:Qe,getComponent:dt,scrollbarSize:Pt,direction:te,fixedInfoList:gt.map(function(cr,ur){return i(ur,ur,gt,Dt,te)}),isSticky:Zt}},[Qe,dt,Pt,te,gt,Dt,te,Zt]),Wi=I.useMemo(function(){return Object(V.a)(Object(V.a)({},Bt),{},{tableLayout:Yr,rowClassName:Ie,expandedRowClassName:jr,componentWidth:ke,fixHeader:jt,fixColumn:tr,horizonScroll:Ft,expandIcon:ce,expandableType:We,expandRowByClick:kr,expandedRowRender:Fr,onTriggerExpand:X,expandIconColumnIndex:Jr,indentSize:ae})},[Bt,Yr,Ie,jr,ke,jt,tr,Ft,ce,We,kr,Fr,X,Jr,ae]),Gi=I.useMemo(function(){return{onColumnResize:qr}},[qr]);return I.createElement(n.a.Provider,{value:ji},I.createElement(U.Provider,{value:Wi},I.createElement(ne.Provider,{value:Gi},qn)))}At.Column=r.a,At.ColumnGroup=o.a,At.Summary=it.a,At.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var ft=$e.b=At},wOnQ:function(vt,$e,q){/*!
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
* Released under MIT License
*/(function(ve,V){vt.exports=V()})(this,function(){"use strict";/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var ve=function(v,h){return ve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,C){T.__proto__=C}||function(T,C){for(var K in C)Object.prototype.hasOwnProperty.call(C,K)&&(T[K]=C[K])},ve(v,h)};function V(v,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");ve(v,h);function T(){this.constructor=v}v.prototype=h===null?Object.create(h):(T.prototype=h.prototype,new T)}var O=function(){return O=Object.assign||function(h){for(var T,C=1,K=arguments.length;C<K;C++){T=arguments[C];for(var $ in T)Object.prototype.hasOwnProperty.call(T,$)&&(h[$]=T[$])}return h},O.apply(this,arguments)};function z(v,h,T,C){function K($){return $ instanceof T?$:new T(function(se){se($)})}return new(T||(T=Promise))(function($,se){function ge(De){try{Re(C.next(De))}catch(Ve){se(Ve)}}function pe(De){try{Re(C.throw(De))}catch(Ve){se(Ve)}}function Re(De){De.done?$(De.value):K(De.value).then(ge,pe)}Re((C=C.apply(v,h||[])).next())})}function D(v,h){var T={label:0,sent:function(){if($[0]&1)throw $[1];return $[1]},trys:[],ops:[]},C,K,$,se;return se={next:ge(0),throw:ge(1),return:ge(2)},typeof Symbol=="function"&&(se[Symbol.iterator]=function(){return this}),se;function ge(Re){return function(De){return pe([Re,De])}}function pe(Re){if(C)throw new TypeError("Generator is already executing.");for(;T;)try{if(C=1,K&&($=Re[0]&2?K.return:Re[0]?K.throw||(($=K.return)&&$.call(K),0):K.next)&&!($=$.call(K,Re[1])).done)return $;(K=0,$)&&(Re=[Re[0]&2,$.value]);switch(Re[0]){case 0:case 1:$=Re;break;case 4:return T.label++,{value:Re[1],done:!1};case 5:T.label++,K=Re[1],Re=[0];continue;case 7:Re=T.ops.pop(),T.trys.pop();continue;default:if(!($=T.trys,$=$.length>0&&$[$.length-1])&&(Re[0]===6||Re[0]===2)){T=0;continue}if(Re[0]===3&&(!$||Re[1]>$[0]&&Re[1]<$[3])){T.label=Re[1];break}if(Re[0]===6&&T.label<$[1]){T.label=$[1],$=Re;break}if($&&T.label<$[2]){T.label=$[2],T.ops.push(Re);break}$[2]&&T.ops.pop(),T.trys.pop();continue}Re=h.call(v,T)}catch(De){Re=[6,De],K=0}finally{C=$=0}if(Re[0]&5)throw Re[1];return{value:Re[0]?Re[1]:void 0,done:!0}}}function I(v,h,T){if(T||arguments.length===2)for(var C=0,K=h.length,$;C<K;C++)($||!(C in h))&&($||($=Array.prototype.slice.call(h,0,C)),$[C]=h[C]);return v.concat($||h)}for(var G=function(){function v(h,T,C,K){this.left=h,this.top=T,this.width=C,this.height=K}return v.prototype.add=function(h,T,C,K){return new v(this.left+h,this.top+T,this.width+C,this.height+K)},v.fromClientRect=function(h,T){return new v(T.left+h.windowBounds.left,T.top+h.windowBounds.top,T.width,T.height)},v.fromDOMRectList=function(h,T){var C=Array.from(T).find(function(K){return K.width!==0});return C?new v(C.left+h.windowBounds.left,C.top+h.windowBounds.top,C.width,C.height):v.EMPTY},v.EMPTY=new v(0,0,0,0),v}(),P=function(v,h){return G.fromClientRect(v,h.getBoundingClientRect())},L=function(v){var h=v.body,T=v.documentElement;if(!h||!T)throw new Error("Unable to get document size");var C=Math.max(Math.max(h.scrollWidth,T.scrollWidth),Math.max(h.offsetWidth,T.offsetWidth),Math.max(h.clientWidth,T.clientWidth)),K=Math.max(Math.max(h.scrollHeight,T.scrollHeight),Math.max(h.offsetHeight,T.offsetHeight),Math.max(h.clientHeight,T.clientHeight));return new G(0,0,C,K)},S=function(v){for(var h=[],T=0,C=v.length;T<C;){var K=v.charCodeAt(T++);if(K>=55296&&K<=56319&&T<C){var $=v.charCodeAt(T++);($&64512)===56320?h.push(((K&1023)<<10)+($&1023)+65536):(h.push(K),T--)}else h.push(K)}return h},_=function(){for(var v=[],h=0;h<arguments.length;h++)v[h]=arguments[h];if(String.fromCodePoint)return String.fromCodePoint.apply(String,v);var T=v.length;if(!T)return"";for(var C=[],K=-1,$="";++K<T;){var se=v[K];se<=65535?C.push(se):(se-=65536,C.push((se>>10)+55296,se%1024+56320)),(K+1===T||C.length>16384)&&($+=String.fromCharCode.apply(String,C),C.length=0)}return $},b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),o=0;o<b.length;o++)u[b.charCodeAt(o)]=o;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",A=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),s=0;s<r.length;s++)A[r.charCodeAt(s)]=s;for(var t=function(v){var h=v.length*.75,T=v.length,C,K=0,$,se,ge,pe;v[v.length-1]==="="&&(h--,v[v.length-2]==="="&&h--);var Re=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(h):new Array(h),De=Array.isArray(Re)?Re:new Uint8Array(Re);for(C=0;C<T;C+=4)$=A[v.charCodeAt(C)],se=A[v.charCodeAt(C+1)],ge=A[v.charCodeAt(C+2)],pe=A[v.charCodeAt(C+3)],De[K++]=$<<2|se>>4,De[K++]=(se&15)<<4|ge>>2,De[K++]=(ge&3)<<6|pe&63;return Re},n=function(v){for(var h=v.length,T=[],C=0;C<h;C+=2)T.push(v[C+1]<<8|v[C]);return T},i=function(v){for(var h=v.length,T=[],C=0;C<h;C+=4)T.push(v[C+3]<<24|v[C+2]<<16|v[C+1]<<8|v[C]);return T},B=5,w=6+5,y=2,x=w-B,E=65536>>B,c=1<<B,e=c-1,a=1024>>B,l=E+a,g=l,p=2048>>6,f=g+p,R=65536>>w,U=1<<x,Q=U-1,j=function(v,h,T){return v.slice?v.slice(h,T):new Uint16Array(Array.prototype.slice.call(v,h,T))},J=function(v,h,T){return v.slice?v.slice(h,T):new Uint32Array(Array.prototype.slice.call(v,h,T))},k=function(v,h){var T=t(v),C=Array.isArray(T)?i(T):new Uint32Array(T),K=Array.isArray(T)?n(T):new Uint16Array(T),$=24,se=j(K,$/2,C[4]/2),ge=C[5]===2?j(K,($+C[4])/2):J(C,Math.ceil(($+C[4])/4));return new Y(C[0],C[1],C[2],C[3],se,ge)},Y=function(){function v(h,T,C,K,$,se){this.initialValue=h,this.errorValue=T,this.highStart=C,this.highValueIndex=K,this.index=$,this.data=se}return v.prototype.get=function(h){var T;if(h>=0){if(h<55296||h>56319&&h<=65535)return T=this.index[h>>B],T=(T<<y)+(h&e),this.data[T];if(h<=65535)return T=this.index[E+(h-55296>>B)],T=(T<<y)+(h&e),this.data[T];if(h<this.highStart)return T=f-R+(h>>w),T=this.index[T],T+=h>>B&Q,T=this.index[T],T=(T<<y)+(h&e),this.data[T];if(h<=1114111)return this.data[this.highValueIndex]}return this.errorValue},v}(),ne="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",me=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),_e=0;_e<ne.length;_e++)me[ne.charCodeAt(_e)]=_e;var Oe="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",xe=50,Se=1,Fe=2,Pe=3,Ee=4,he=5,Ge=7,lt=8,at=9,je=10,it=11,ee=12,W=13,F=14,oe=15,re=16,we=17,be=18,nt=19,tt=20,Ye=21,qe=22,At=23,ft=24,Ce=25,Ue=26,Qe=27,He=28,Ie=29,Me=30,ye=31,le=32,ue=33,Z=34,te=35,Ae=36,de=37,Be=38,Ne=39,Xe=40,ct=41,ut=42,st=43,Nt=[9001,65288],pt="!",et="\xD7",er="\xF7",qt=k(Oe),Ot=[Me,Ae],mt=[Se,Fe,Pe,he],yt=[je,lt],wt=[Qe,Ue],Pt=mt.concat(yt),Je=[Be,Ne,Xe,Z,te],bt=[oe,W],dt=function(v,h){h===void 0&&(h="strict");var T=[],C=[],K=[];return v.forEach(function($,se){var ge=qt.get($);if(ge>xe?(K.push(!0),ge-=xe):K.push(!1),["normal","auto","loose"].indexOf(h)!==-1&&[8208,8211,12316,12448].indexOf($)!==-1)return C.push(se),T.push(re);if(ge===Ee||ge===it){if(se===0)return C.push(se),T.push(Me);var pe=T[se-1];return Pt.indexOf(pe)===-1?(C.push(C[se-1]),T.push(pe)):(C.push(se),T.push(Me))}if(C.push(se),ge===ye)return T.push(h==="strict"?Ye:de);if(ge===ut)return T.push(Me);if(ge===Ie)return T.push(Me);if(ge===st)return $>=131072&&$<=196605||$>=196608&&$<=262141?T.push(de):T.push(Me);T.push(ge)}),[C,T,K]},Lt=function(v,h,T,C){var K=C[T];if(Array.isArray(v)?v.indexOf(K)!==-1:v===K)for(var $=T;$<=C.length;){$++;var se=C[$];if(se===h)return!0;if(se!==je)break}if(K===je)for(var $=T;$>0;){$--;var ge=C[$];if(Array.isArray(v)?v.indexOf(ge)!==-1:v===ge)for(var pe=T;pe<=C.length;){pe++;var se=C[pe];if(se===h)return!0;if(se!==je)break}if(ge!==je)break}return!1},Yt=function(v,h){for(var T=v;T>=0;){var C=h[T];if(C===je)T--;else return C}return 0},Er=function(v,h,T,C,K){if(T[C]===0)return et;var $=C-1;if(Array.isArray(K)&&K[$]===!0)return et;var se=$-1,ge=$+1,pe=h[$],Re=se>=0?h[se]:0,De=h[ge];if(pe===Fe&&De===Pe)return et;if(mt.indexOf(pe)!==-1)return pt;if(mt.indexOf(De)!==-1)return et;if(yt.indexOf(De)!==-1)return et;if(Yt($,h)===lt)return er;if(qt.get(v[$])===it)return et;if((pe===le||pe===ue)&&qt.get(v[ge])===it)return et;if(pe===Ge||De===Ge)return et;if(pe===at)return et;if([je,W,oe].indexOf(pe)===-1&&De===at)return et;if([we,be,nt,ft,He].indexOf(De)!==-1)return et;if(Yt($,h)===qe)return et;if(Lt(At,qe,$,h))return et;if(Lt([we,be],Ye,$,h))return et;if(Lt(ee,ee,$,h))return et;if(pe===je)return er;if(pe===At||De===At)return et;if(De===re||pe===re)return er;if([W,oe,Ye].indexOf(De)!==-1||pe===F)return et;if(Re===Ae&&bt.indexOf(pe)!==-1)return et;if(pe===He&&De===Ae)return et;if(De===tt)return et;if(Ot.indexOf(De)!==-1&&pe===Ce||Ot.indexOf(pe)!==-1&&De===Ce)return et;if(pe===Qe&&[de,le,ue].indexOf(De)!==-1||[de,le,ue].indexOf(pe)!==-1&&De===Ue)return et;if(Ot.indexOf(pe)!==-1&&wt.indexOf(De)!==-1||wt.indexOf(pe)!==-1&&Ot.indexOf(De)!==-1)return et;if([Qe,Ue].indexOf(pe)!==-1&&(De===Ce||[qe,oe].indexOf(De)!==-1&&h[ge+1]===Ce)||[qe,oe].indexOf(pe)!==-1&&De===Ce||pe===Ce&&[Ce,He,ft].indexOf(De)!==-1)return et;if([Ce,He,ft,we,be].indexOf(De)!==-1)for(var Ve=$;Ve>=0;){var ze=h[Ve];if(ze===Ce)return et;if([He,ft].indexOf(ze)!==-1)Ve--;else break}if([Qe,Ue].indexOf(De)!==-1)for(var Ve=[we,be].indexOf(pe)!==-1?se:$;Ve>=0;){var ze=h[Ve];if(ze===Ce)return et;if([He,ft].indexOf(ze)!==-1)Ve--;else break}if(Be===pe&&[Be,Ne,Z,te].indexOf(De)!==-1||[Ne,Z].indexOf(pe)!==-1&&[Ne,Xe].indexOf(De)!==-1||[Xe,te].indexOf(pe)!==-1&&De===Xe)return et;if(Je.indexOf(pe)!==-1&&[tt,Ue].indexOf(De)!==-1||Je.indexOf(De)!==-1&&pe===Qe)return et;if(Ot.indexOf(pe)!==-1&&Ot.indexOf(De)!==-1)return et;if(pe===ft&&Ot.indexOf(De)!==-1)return et;if(Ot.concat(Ce).indexOf(pe)!==-1&&De===qe&&Nt.indexOf(v[ge])===-1||Ot.concat(Ce).indexOf(De)!==-1&&pe===be)return et;if(pe===ct&&De===ct){for(var xt=T[$],ht=1;xt>0&&(xt--,h[xt]===ct);)ht++;if(ht%2!==0)return et}return pe===le&&De===ue?et:er},Rr=function(v,h){h||(h={lineBreak:"normal",wordBreak:"normal"});var T=dt(v,h.lineBreak),C=T[0],K=T[1],$=T[2];(h.wordBreak==="break-all"||h.wordBreak==="break-word")&&(K=K.map(function(ge){return[Ce,Me,ut].indexOf(ge)!==-1?de:ge}));var se=h.wordBreak==="keep-all"?$.map(function(ge,pe){return ge&&v[pe]>=19968&&v[pe]<=40959}):void 0;return[C,K,se]},Tr=function(){function v(h,T,C,K){this.codePoints=h,this.required=T===pt,this.start=C,this.end=K}return v.prototype.slice=function(){return _.apply(void 0,this.codePoints.slice(this.start,this.end))},v}(),Sr=function(v,h){var T=S(v),C=Rr(T,h),K=C[0],$=C[1],se=C[2],ge=T.length,pe=0,Re=0;return{next:function(){if(Re>=ge)return{done:!0,value:null};for(var De=et;Re<ge&&(De=Er(T,$,K,++Re,se))===et;);if(De!==et||Re===ge){var Ve=new Tr(T,De,pe,Re);return pe=Re,{value:Ve,done:!1}}return{done:!0,value:null}}}},Fr=1<<0,lr=1<<1,Ir=1<<2,kr=1<<3,Or=10,Jr=47,jr=92,ie=9,ae=32,ce=34,Te=61,We=35,Ze=36,M=37,d=39,m=40,N=41,X=95,H=45,fe=33,ke=60,rt=62,ot=64,Ke=91,_t=93,gt=61,Bt=123,Mt=63,Ar=125,Wt=124,ir=126,kt=128,br=65533,fr=42,Jt=43,Le=44,Ht=58,Gt=59,Ut=46,Kt=0,Qt=8,or=11,Vt=14,ar=31,rr=127,Dt=-1,jt=48,Ft=97,tr=101,$t=102,_r=117,Zt=122,Lr=65,pr=69,Hr=70,Nr=85,Ur=90,dr=function(v){return v>=jt&&v<=57},qr=function(v){return v>=55296&&v<=57343},zt=function(v){return dr(v)||v>=Lr&&v<=Hr||v>=Ft&&v<=$t},Cr=function(v){return v>=Ft&&v<=Zt},Pr=function(v){return v>=Lr&&v<=Ur},$r=function(v){return Cr(v)||Pr(v)},un=function(v){return v>=kt},Xr=function(v){return v===Or||v===ie||v===ae},rn=function(v){return $r(v)||un(v)||v===X},gn=function(v){return rn(v)||dr(v)||v===H},Qn=function(v){return v>=Kt&&v<=Qt||v===or||v>=Vt&&v<=ar||v===rr},Yr=function(v,h){return v!==jr?!1:h!==Or},cn=function(v,h,T){return v===H?rn(h)||Yr(h,T):rn(v)?!0:!!(v===jr&&Yr(v,h))},bn=function(v,h,T){return v===Jt||v===H?dr(h)?!0:h===Ut&&dr(T):v===Ut?dr(h):dr(v)},mn=function(v){var h=0,T=1;(v[h]===Jt||v[h]===H)&&(v[h]===H&&(T=-1),h++);for(var C=[];dr(v[h]);)C.push(v[h++]);var K=C.length?parseInt(_.apply(void 0,C),10):0;v[h]===Ut&&h++;for(var $=[];dr(v[h]);)$.push(v[h++]);var se=$.length,ge=se?parseInt(_.apply(void 0,$),10):0;(v[h]===pr||v[h]===tr)&&h++;var pe=1;(v[h]===Jt||v[h]===H)&&(v[h]===H&&(pe=-1),h++);for(var Re=[];dr(v[h]);)Re.push(v[h++]);var De=Re.length?parseInt(_.apply(void 0,Re),10):0;return T*(K+ge*Math.pow(10,-se))*Math.pow(10,pe*De)},ci={type:2},hi={type:3},di={type:4},fi={type:13},Zn={type:8},Ki={type:21},qn={type:9},ji={type:10},Wi={type:11},Gi={type:12},cr={type:14},ur={type:23},Qr={type:1},en={type:25},Dn={type:24},pi={type:26},ei={type:27},Vi={type:28},zi={type:29},$s={type:31},Xi={type:32},Ta=function(){function v(){this._value=[]}return v.prototype.write=function(h){this._value=this._value.concat(S(h))},v.prototype.read=function(){for(var h=[],T=this.consumeToken();T!==Xi;)h.push(T),T=this.consumeToken();return h},v.prototype.consumeToken=function(){var h=this.consumeCodePoint();switch(h){case ce:return this.consumeStringToken(ce);case We:var T=this.peekCodePoint(0),C=this.peekCodePoint(1),K=this.peekCodePoint(2);if(gn(T)||Yr(C,K)){var $=cn(T,C,K)?lr:Fr,se=this.consumeName();return{type:5,value:se,flags:$}}break;case Ze:if(this.peekCodePoint(0)===Te)return this.consumeCodePoint(),fi;break;case d:return this.consumeStringToken(d);case m:return ci;case N:return hi;case fr:if(this.peekCodePoint(0)===Te)return this.consumeCodePoint(),cr;break;case Jt:if(bn(h,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(h),this.consumeNumericToken();break;case Le:return di;case H:var ge=h,pe=this.peekCodePoint(0),Re=this.peekCodePoint(1);if(bn(ge,pe,Re))return this.reconsumeCodePoint(h),this.consumeNumericToken();if(cn(ge,pe,Re))return this.reconsumeCodePoint(h),this.consumeIdentLikeToken();if(pe===H&&Re===rt)return this.consumeCodePoint(),this.consumeCodePoint(),Dn;break;case Ut:if(bn(h,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(h),this.consumeNumericToken();break;case Jr:if(this.peekCodePoint(0)===fr)for(this.consumeCodePoint();;){var De=this.consumeCodePoint();if(De===fr&&(De=this.consumeCodePoint(),De===Jr))return this.consumeToken();if(De===Dt)return this.consumeToken()}break;case Ht:return pi;case Gt:return ei;case ke:if(this.peekCodePoint(0)===fe&&this.peekCodePoint(1)===H&&this.peekCodePoint(2)===H)return this.consumeCodePoint(),this.consumeCodePoint(),en;break;case ot:var Ve=this.peekCodePoint(0),ze=this.peekCodePoint(1),xt=this.peekCodePoint(2);if(cn(Ve,ze,xt)){var se=this.consumeName();return{type:7,value:se}}break;case Ke:return Vi;case jr:if(Yr(h,this.peekCodePoint(0)))return this.reconsumeCodePoint(h),this.consumeIdentLikeToken();break;case _t:return zi;case gt:if(this.peekCodePoint(0)===Te)return this.consumeCodePoint(),Zn;break;case Bt:return Wi;case Ar:return Gi;case _r:case Nr:var ht=this.peekCodePoint(0),Et=this.peekCodePoint(1);return ht===Jt&&(zt(Et)||Et===Mt)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(h),this.consumeIdentLikeToken();case Wt:if(this.peekCodePoint(0)===Te)return this.consumeCodePoint(),qn;if(this.peekCodePoint(0)===Wt)return this.consumeCodePoint(),Ki;break;case ir:if(this.peekCodePoint(0)===Te)return this.consumeCodePoint(),ji;break;case Dt:return Xi}return Xr(h)?(this.consumeWhiteSpace(),$s):dr(h)?(this.reconsumeCodePoint(h),this.consumeNumericToken()):rn(h)?(this.reconsumeCodePoint(h),this.consumeIdentLikeToken()):{type:6,value:_(h)}},v.prototype.consumeCodePoint=function(){var h=this._value.shift();return typeof h=="undefined"?-1:h},v.prototype.reconsumeCodePoint=function(h){this._value.unshift(h)},v.prototype.peekCodePoint=function(h){return h>=this._value.length?-1:this._value[h]},v.prototype.consumeUnicodeRangeToken=function(){for(var h=[],T=this.consumeCodePoint();zt(T)&&h.length<6;)h.push(T),T=this.consumeCodePoint();for(var C=!1;T===Mt&&h.length<6;)h.push(T),T=this.consumeCodePoint(),C=!0;if(C){var K=parseInt(_.apply(void 0,h.map(function(pe){return pe===Mt?jt:pe})),16),$=parseInt(_.apply(void 0,h.map(function(pe){return pe===Mt?Hr:pe})),16);return{type:30,start:K,end:$}}var se=parseInt(_.apply(void 0,h),16);if(this.peekCodePoint(0)===H&&zt(this.peekCodePoint(1))){this.consumeCodePoint(),T=this.consumeCodePoint();for(var ge=[];zt(T)&&ge.length<6;)ge.push(T),T=this.consumeCodePoint();var $=parseInt(_.apply(void 0,ge),16);return{type:30,start:se,end:$}}else return{type:30,start:se,end:se}},v.prototype.consumeIdentLikeToken=function(){var h=this.consumeName();return h.toLowerCase()==="url"&&this.peekCodePoint(0)===m?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===m?(this.consumeCodePoint(),{type:19,value:h}):{type:20,value:h}},v.prototype.consumeUrlToken=function(){var h=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Dt)return{type:22,value:""};var T=this.peekCodePoint(0);if(T===d||T===ce){var C=this.consumeStringToken(this.consumeCodePoint());return C.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Dt||this.peekCodePoint(0)===N)?(this.consumeCodePoint(),{type:22,value:C.value}):(this.consumeBadUrlRemnants(),ur)}for(;;){var K=this.consumeCodePoint();if(K===Dt||K===N)return{type:22,value:_.apply(void 0,h)};if(Xr(K))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Dt||this.peekCodePoint(0)===N?(this.consumeCodePoint(),{type:22,value:_.apply(void 0,h)}):(this.consumeBadUrlRemnants(),ur);if(K===ce||K===d||K===m||Qn(K))return this.consumeBadUrlRemnants(),ur;if(K===jr)if(Yr(K,this.peekCodePoint(0)))h.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),ur;else h.push(K)}},v.prototype.consumeWhiteSpace=function(){for(;Xr(this.peekCodePoint(0));)this.consumeCodePoint()},v.prototype.consumeBadUrlRemnants=function(){for(;;){var h=this.consumeCodePoint();if(h===N||h===Dt)return;Yr(h,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},v.prototype.consumeStringSlice=function(h){for(var T=5e4,C="";h>0;){var K=Math.min(T,h);C+=_.apply(void 0,this._value.splice(0,K)),h-=K}return this._value.shift(),C},v.prototype.consumeStringToken=function(h){var T="",C=0;do{var K=this._value[C];if(K===Dt||K===void 0||K===h)return T+=this.consumeStringSlice(C),{type:0,value:T};if(K===Or)return this._value.splice(0,C),Qr;if(K===jr){var $=this._value[C+1];$!==Dt&&$!==void 0&&($===Or?(T+=this.consumeStringSlice(C),C=-1,this._value.shift()):Yr(K,$)&&(T+=this.consumeStringSlice(C),T+=_(this.consumeEscapedCodePoint()),C=-1))}C++}while(!0)},v.prototype.consumeNumber=function(){var h=[],T=Ir,C=this.peekCodePoint(0);for((C===Jt||C===H)&&h.push(this.consumeCodePoint());dr(this.peekCodePoint(0));)h.push(this.consumeCodePoint());C=this.peekCodePoint(0);var K=this.peekCodePoint(1);if(C===Ut&&dr(K))for(h.push(this.consumeCodePoint(),this.consumeCodePoint()),T=kr;dr(this.peekCodePoint(0));)h.push(this.consumeCodePoint());C=this.peekCodePoint(0),K=this.peekCodePoint(1);var $=this.peekCodePoint(2);if((C===pr||C===tr)&&((K===Jt||K===H)&&dr($)||dr(K)))for(h.push(this.consumeCodePoint(),this.consumeCodePoint()),T=kr;dr(this.peekCodePoint(0));)h.push(this.consumeCodePoint());return[mn(h),T]},v.prototype.consumeNumericToken=function(){var h=this.consumeNumber(),T=h[0],C=h[1],K=this.peekCodePoint(0),$=this.peekCodePoint(1),se=this.peekCodePoint(2);if(cn(K,$,se)){var ge=this.consumeName();return{type:15,number:T,flags:C,unit:ge}}return K===M?(this.consumeCodePoint(),{type:16,number:T,flags:C}):{type:17,number:T,flags:C}},v.prototype.consumeEscapedCodePoint=function(){var h=this.consumeCodePoint();if(zt(h)){for(var T=_(h);zt(this.peekCodePoint(0))&&T.length<6;)T+=_(this.consumeCodePoint());Xr(this.peekCodePoint(0))&&this.consumeCodePoint();var C=parseInt(T,16);return C===0||qr(C)||C>1114111?br:C}return h===Dt?br:h},v.prototype.consumeName=function(){for(var h="";;){var T=this.consumeCodePoint();if(gn(T))h+=_(T);else if(Yr(T,this.peekCodePoint(0)))h+=_(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(T),h}},v}(),Ba=function(){function v(h){this._tokens=h}return v.create=function(h){var T=new Ta;return T.write(h),new v(T.read())},v.parseValue=function(h){return v.create(h).parseComponentValue()},v.parseValues=function(h){return v.create(h).parseComponentValues()},v.prototype.parseComponentValue=function(){for(var h=this.consumeToken();h.type===31;)h=this.consumeToken();if(h.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(h);var T=this.consumeComponentValue();do h=this.consumeToken();while(h.type===31);if(h.type===32)return T;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},v.prototype.parseComponentValues=function(){for(var h=[];;){var T=this.consumeComponentValue();if(T.type===32)return h;h.push(T),h.push()}},v.prototype.consumeComponentValue=function(){var h=this.consumeToken();switch(h.type){case 11:case 28:case 2:return this.consumeSimpleBlock(h.type);case 19:return this.consumeFunction(h)}return h},v.prototype.consumeSimpleBlock=function(h){for(var T={type:h,values:[]},C=this.consumeToken();;){if(C.type===32||qs(C,h))return T;this.reconsumeToken(C),T.values.push(this.consumeComponentValue()),C=this.consumeToken()}},v.prototype.consumeFunction=function(h){for(var T={name:h.value,values:[],type:18};;){var C=this.consumeToken();if(C.type===32||C.type===3)return T;this.reconsumeToken(C),T.values.push(this.consumeComponentValue())}},v.prototype.consumeToken=function(){var h=this._tokens.shift();return typeof h=="undefined"?Xi:h},v.prototype.reconsumeToken=function(h){this._tokens.unshift(h)},v}(),ti=function(v){return v.type===15},Kn=function(v){return v.type===17},wr=function(v){return v.type===20},Zs=function(v){return v.type===0},Yi=function(v,h){return wr(v)&&v.value===h},xa=function(v){return v.type!==31},jn=function(v){return v.type!==31&&v.type!==4},hn=function(v){var h=[],T=[];return v.forEach(function(C){if(C.type===4){if(T.length===0)throw new Error("Error parsing function args, zero tokens for arg");h.push(T),T=[];return}C.type!==31&&T.push(C)}),T.length&&h.push(T),h},qs=function(v,h){return h===11&&v.type===12||h===28&&v.type===29?!0:h===2&&v.type===3},wn=function(v){return v.type===17||v.type===15},Mr=function(v){return v.type===16||wn(v)},Sa=function(v){return v.length>1?[v[0],v[1]]:[v[0]]},Vr={type:17,number:0,flags:Ir},Ji={type:16,number:50,flags:Ir},Cn={type:16,number:100,flags:Ir},ri=function(v,h,T){var C=v[0],K=v[1];return[Br(C,h),Br(typeof K!="undefined"?K:C,T)]},Br=function(v,h){if(v.type===16)return v.number/100*h;if(ti(v))switch(v.unit){case"rem":case"em":return 16*v.number;case"px":default:return v.number}return v.number},Ia="deg",Ra="grad",Oa="rad",La="turn",gi={name:"angle",parse:function(v,h){if(h.type===15)switch(h.unit){case Ia:return Math.PI*h.number/180;case Ra:return Math.PI/200*h.number;case Oa:return h.number;case La:return Math.PI*2*h.number}throw new Error("Unsupported angle type")}},Ua=function(v){return v.type===15&&(v.unit===Ia||v.unit===Ra||v.unit===Oa||v.unit===La)},Da=function(v){var h=v.filter(wr).map(function(T){return T.value}).join(" ");switch(h){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Vr,Vr];case"to top":case"bottom":return an(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Vr,Cn];case"to right":case"left":return an(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Cn,Cn];case"to bottom":case"top":return an(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Cn,Vr];case"to left":case"right":return an(270)}return 0},an=function(v){return Math.PI*v/180},Tn={name:"color",parse:function(v,h){if(h.type===18){var T=eo[h.name];if(typeof T=="undefined")throw new Error('Attempting to parse an unsupported color function "'+h.name+'"');return T(v,h.values)}if(h.type===5){if(h.value.length===3){var C=h.value.substring(0,1),K=h.value.substring(1,2),$=h.value.substring(2,3);return xn(parseInt(C+C,16),parseInt(K+K,16),parseInt($+$,16),1)}if(h.value.length===4){var C=h.value.substring(0,1),K=h.value.substring(1,2),$=h.value.substring(2,3),se=h.value.substring(3,4);return xn(parseInt(C+C,16),parseInt(K+K,16),parseInt($+$,16),parseInt(se+se,16)/255)}if(h.value.length===6){var C=h.value.substring(0,2),K=h.value.substring(2,4),$=h.value.substring(4,6);return xn(parseInt(C,16),parseInt(K,16),parseInt($,16),1)}if(h.value.length===8){var C=h.value.substring(0,2),K=h.value.substring(2,4),$=h.value.substring(4,6),se=h.value.substring(6,8);return xn(parseInt(C,16),parseInt(K,16),parseInt($,16),parseInt(se,16)/255)}}if(h.type===20){var ge=vn[h.value.toUpperCase()];if(typeof ge!="undefined")return ge}return vn.TRANSPARENT}},Bn=function(v){return(255&v)===0},Wr=function(v){var h=255&v,T=255&v>>8,C=255&v>>16,K=255&v>>24;return h<255?"rgba("+K+","+C+","+T+","+h/255+")":"rgb("+K+","+C+","+T+")"},xn=function(v,h,T,C){return(v<<24|h<<16|T<<8|Math.round(C*255)<<0)>>>0},Fa=function(v,h){if(v.type===17)return v.number;if(v.type===16){var T=h===3?1:255;return h===3?v.number/100*T:Math.round(v.number/100*T)}return 0},Na=function(v,h){var T=h.filter(jn);if(T.length===3){var C=T.map(Fa),K=C[0],$=C[1],se=C[2];return xn(K,$,se,1)}if(T.length===4){var ge=T.map(Fa),K=ge[0],$=ge[1],se=ge[2],pe=ge[3];return xn(K,$,se,pe)}return 0};function $i(v,h,T){return T<0&&(T+=1),T>=1&&(T-=1),T<1/6?(h-v)*T*6+v:T<1/2?h:T<2/3?(h-v)*6*(2/3-T)+v:v}var Pa=function(v,h){var T=h.filter(jn),C=T[0],K=T[1],$=T[2],se=T[3],ge=(C.type===17?an(C.number):gi.parse(v,C))/(Math.PI*2),pe=Mr(K)?K.number/100:0,Re=Mr($)?$.number/100:0,De=typeof se!="undefined"&&Mr(se)?Br(se,1):1;if(pe===0)return xn(Re*255,Re*255,Re*255,1);var Ve=Re<=.5?Re*(pe+1):Re+pe-Re*pe,ze=Re*2-Ve,xt=$i(ze,Ve,ge+1/3),ht=$i(ze,Ve,ge),Et=$i(ze,Ve,ge-1/3);return xn(xt*255,ht*255,Et*255,De)},eo={hsl:Pa,hsla:Pa,rgb:Na,rgba:Na},ni=function(v,h){return Tn.parse(v,Ba.create(h).parseComponentValue())},vn={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},to={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(v,h){return h.map(function(T){if(wr(T))switch(T.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},ro={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},mi=function(v,h){var T=Tn.parse(v,h[0]),C=h[1];return C&&Mr(C)?{color:T,stop:C}:{color:T,stop:null}},Ma=function(v,h){var T=v[0],C=v[v.length-1];T.stop===null&&(T.stop=Vr),C.stop===null&&(C.stop=Cn);for(var K=[],$=0,se=0;se<v.length;se++){var ge=v[se].stop;if(ge!==null){var pe=Br(ge,h);pe>$?K.push(pe):K.push($),$=pe}else K.push(null)}for(var Re=null,se=0;se<K.length;se++){var De=K[se];if(De===null)Re===null&&(Re=se);else if(Re!==null){for(var Ve=se-Re,ze=K[Re-1],xt=(De-ze)/(Ve+1),ht=1;ht<=Ve;ht++)K[Re+ht-1]=xt*ht;Re=null}}return v.map(function(Et,Xt){var Tt=Et.color;return{color:Tt,stop:Math.max(Math.min(1,K[Xt]/h),0)}})},no=function(v,h,T){var C=h/2,K=T/2,$=Br(v[0],h)-C,se=K-Br(v[1],T);return(Math.atan2(se,$)+Math.PI*2)%(Math.PI*2)},io=function(v,h,T){var C=typeof v=="number"?v:no(v,h,T),K=Math.abs(h*Math.sin(C))+Math.abs(T*Math.cos(C)),$=h/2,se=T/2,ge=K/2,pe=Math.sin(C-Math.PI/2)*ge,Re=Math.cos(C-Math.PI/2)*ge;return[K,$-Re,$+Re,se-pe,se+pe]},ln=function(v,h){return Math.sqrt(v*v+h*h)},ka=function(v,h,T,C,K){var $=[[0,0],[0,h],[v,0],[v,h]];return $.reduce(function(se,ge){var pe=ge[0],Re=ge[1],De=ln(T-pe,C-Re);return(K?De<se.optimumDistance:De>se.optimumDistance)?{optimumCorner:ge,optimumDistance:De}:se},{optimumDistance:K?Infinity:-Infinity,optimumCorner:null}).optimumCorner},ao=function(v,h,T,C,K){var $=0,se=0;switch(v.size){case 0:v.shape===0?$=se=Math.min(Math.abs(h),Math.abs(h-C),Math.abs(T),Math.abs(T-K)):v.shape===1&&($=Math.min(Math.abs(h),Math.abs(h-C)),se=Math.min(Math.abs(T),Math.abs(T-K)));break;case 2:if(v.shape===0)$=se=Math.min(ln(h,T),ln(h,T-K),ln(h-C,T),ln(h-C,T-K));else if(v.shape===1){var ge=Math.min(Math.abs(T),Math.abs(T-K))/Math.min(Math.abs(h),Math.abs(h-C)),pe=ka(C,K,h,T,!0),Re=pe[0],De=pe[1];$=ln(Re-h,(De-T)/ge),se=ge*$}break;case 1:v.shape===0?$=se=Math.max(Math.abs(h),Math.abs(h-C),Math.abs(T),Math.abs(T-K)):v.shape===1&&($=Math.max(Math.abs(h),Math.abs(h-C)),se=Math.max(Math.abs(T),Math.abs(T-K)));break;case 3:if(v.shape===0)$=se=Math.max(ln(h,T),ln(h,T-K),ln(h-C,T),ln(h-C,T-K));else if(v.shape===1){var ge=Math.max(Math.abs(T),Math.abs(T-K))/Math.max(Math.abs(h),Math.abs(h-C)),Ve=ka(C,K,h,T,!1),Re=Ve[0],De=Ve[1];$=ln(Re-h,(De-T)/ge),se=ge*$}break}return Array.isArray(v.size)&&($=Br(v.size[0],C),se=v.size.length===2?Br(v.size[1],K):$),[$,se]},so=function(v,h){var T=an(180),C=[];return hn(h).forEach(function(K,$){if($===0){var se=K[0];if(se.type===20&&se.value==="to"){T=Da(K);return}else if(Ua(se)){T=gi.parse(v,se);return}}var ge=mi(v,K);C.push(ge)}),{angle:T,stops:C,type:1}},vi=function(v,h){var T=an(180),C=[];return hn(h).forEach(function(K,$){if($===0){var se=K[0];if(se.type===20&&["top","left","right","bottom"].indexOf(se.value)!==-1){T=Da(K);return}else if(Ua(se)){T=(gi.parse(v,se)+an(270))%an(360);return}}var ge=mi(v,K);C.push(ge)}),{angle:T,stops:C,type:1}},oo=function(v,h){var T=an(180),C=[],K=1,$=0,se=3,ge=[];return hn(h).forEach(function(pe,Re){var De=pe[0];if(Re===0){if(wr(De)&&De.value==="linear"){K=1;return}else if(wr(De)&&De.value==="radial"){K=2;return}}if(De.type===18){if(De.name==="from"){var Ve=Tn.parse(v,De.values[0]);C.push({stop:Vr,color:Ve})}else if(De.name==="to"){var Ve=Tn.parse(v,De.values[0]);C.push({stop:Cn,color:Ve})}else if(De.name==="color-stop"){var ze=De.values.filter(jn);if(ze.length===2){var Ve=Tn.parse(v,ze[1]),xt=ze[0];Kn(xt)&&C.push({stop:{type:16,number:xt.number*100,flags:xt.flags},color:Ve})}}}}),K===1?{angle:(T+an(180))%an(360),stops:C,type:K}:{size:se,shape:$,stops:C,position:ge,type:K}},Ha="closest-side",Qa="farthest-side",Ka="closest-corner",ja="farthest-corner",Wa="circle",Ga="ellipse",Va="cover",za="contain",Ao=function(v,h){var T=0,C=3,K=[],$=[];return hn(h).forEach(function(se,ge){var pe=!0;if(ge===0){var Re=!1;pe=se.reduce(function(Ve,ze){if(Re)if(wr(ze))switch(ze.value){case"center":return $.push(Ji),Ve;case"top":case"left":return $.push(Vr),Ve;case"right":case"bottom":return $.push(Cn),Ve}else(Mr(ze)||wn(ze))&&$.push(ze);else if(wr(ze))switch(ze.value){case Wa:return T=0,!1;case Ga:return T=1,!1;case"at":return Re=!0,!1;case Ha:return C=0,!1;case Va:case Qa:return C=1,!1;case za:case Ka:return C=2,!1;case ja:return C=3,!1}else if(wn(ze)||Mr(ze))return Array.isArray(C)||(C=[]),C.push(ze),!1;return Ve},pe)}if(pe){var De=mi(v,se);K.push(De)}}),{size:C,shape:T,stops:K,position:$,type:2}},yi=function(v,h){var T=0,C=3,K=[],$=[];return hn(h).forEach(function(se,ge){var pe=!0;if(ge===0?pe=se.reduce(function(De,Ve){if(wr(Ve))switch(Ve.value){case"center":return $.push(Ji),!1;case"top":case"left":return $.push(Vr),!1;case"right":case"bottom":return $.push(Cn),!1}else if(Mr(Ve)||wn(Ve))return $.push(Ve),!1;return De},pe):ge===1&&(pe=se.reduce(function(De,Ve){if(wr(Ve))switch(Ve.value){case Wa:return T=0,!1;case Ga:return T=1,!1;case za:case Ha:return C=0,!1;case Qa:return C=1,!1;case Ka:return C=2,!1;case Va:case ja:return C=3,!1}else if(wn(Ve)||Mr(Ve))return Array.isArray(C)||(C=[]),C.push(Ve),!1;return De},pe)),pe){var Re=mi(v,se);K.push(Re)}}),{size:C,shape:T,stops:K,position:$,type:2}},lo=function(v){return v.type===1},uo=function(v){return v.type===2},Zi={name:"image",parse:function(v,h){if(h.type===22){var T={url:h.value,type:0};return v.cache.addImage(h.value),T}if(h.type===18){var C=Xa[h.name];if(typeof C=="undefined")throw new Error('Attempting to parse an unsupported image function "'+h.name+'"');return C(v,h.values)}throw new Error("Unsupported image type "+h.type)}};function co(v){return!(v.type===20&&v.value==="none")&&(v.type!==18||!!Xa[v.name])}var Xa={"linear-gradient":so,"-moz-linear-gradient":vi,"-ms-linear-gradient":vi,"-o-linear-gradient":vi,"-webkit-linear-gradient":vi,"radial-gradient":Ao,"-moz-radial-gradient":yi,"-ms-radial-gradient":yi,"-o-radial-gradient":yi,"-webkit-radial-gradient":yi,"-webkit-gradient":oo},ho={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(v,h){if(h.length===0)return[];var T=h[0];return T.type===20&&T.value==="none"?[]:h.filter(function(C){return jn(C)&&co(C)}).map(function(C){return Zi.parse(v,C)})}},fo={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(v,h){return h.map(function(T){if(wr(T))switch(T.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},po={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(v,h){return hn(h).map(function(T){return T.filter(Mr)}).map(Sa)}},go={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(v,h){return hn(h).map(function(T){return T.filter(wr).map(function(C){return C.value}).join(" ")}).map(mo)}},mo=function(v){switch(v){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},Wn;(function(v){v.AUTO="auto",v.CONTAIN="contain",v.COVER="cover"})(Wn||(Wn={}));var vo={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(v,h){return hn(h).map(function(T){return T.filter(yo)})}},yo=function(v){return wr(v)||Mr(v)},_i=function(v){return{name:"border-"+v+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},_o=_i("top"),Eo=_i("right"),bo=_i("bottom"),wo=_i("left"),Ei=function(v){return{name:"border-radius-"+v,initialValue:"0 0",prefix:!1,type:1,parse:function(h,T){return Sa(T.filter(Mr))}}},Co=Ei("top-left"),To=Ei("top-right"),Bo=Ei("bottom-right"),xo=Ei("bottom-left"),bi=function(v){return{name:"border-"+v+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(h,T){switch(T){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},So=bi("top"),Io=bi("right"),Ro=bi("bottom"),Oo=bi("left"),wi=function(v){return{name:"border-"+v+"-width",initialValue:"0",type:0,prefix:!1,parse:function(h,T){return ti(T)?T.number:0}}},Lo=wi("top"),Uo=wi("right"),Do=wi("bottom"),Fo=wi("left"),No={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Po={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(v,h){switch(h){case"rtl":return 1;case"ltr":default:return 0}}},Mo={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(v,h){return h.filter(wr).reduce(function(T,C){return T|ko(C.value)},0)}},ko=function(v){switch(v){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},Ho={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(v,h){switch(h){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Qo={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(v,h){return h.type===20&&h.value==="normal"?0:h.type===17||h.type===15?h.number:0}},Ci;(function(v){v.NORMAL="normal",v.STRICT="strict"})(Ci||(Ci={}));var Ko={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(v,h){switch(h){case"strict":return Ci.STRICT;case"normal":default:return Ci.NORMAL}}},jo={name:"line-height",initialValue:"normal",prefix:!1,type:4},Ya=function(v,h){return wr(v)&&v.value==="normal"?1.2*h:v.type===17?h*v.number:Mr(v)?Br(v,h):h},Wo={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(v,h){return h.type===20&&h.value==="none"?null:Zi.parse(v,h)}},Go={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(v,h){switch(h){case"inside":return 0;case"outside":default:return 1}}},qi={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(v,h){switch(h){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},Ti=function(v){return{name:"margin-"+v,initialValue:"0",prefix:!1,type:4}},Vo=Ti("top"),zo=Ti("right"),Xo=Ti("bottom"),Yo=Ti("left"),Jo={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(v,h){return h.filter(wr).map(function(T){switch(T.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},$o={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(v,h){switch(h){case"break-word":return"break-word";case"normal":default:return"normal"}}},Bi=function(v){return{name:"padding-"+v,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Zo=Bi("top"),qo=Bi("right"),eA=Bi("bottom"),tA=Bi("left"),rA={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(v,h){switch(h){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},nA={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(v,h){switch(h){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},iA={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(v,h){return h.length===1&&Yi(h[0],"none")?[]:hn(h).map(function(T){for(var C={color:vn.TRANSPARENT,offsetX:Vr,offsetY:Vr,blur:Vr},K=0,$=0;$<T.length;$++){var se=T[$];wn(se)?(K===0?C.offsetX=se:K===1?C.offsetY=se:C.blur=se,K++):C.color=Tn.parse(v,se)}return C})}},aA={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(v,h){switch(h){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},sA={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(v,h){if(h.type===20&&h.value==="none")return null;if(h.type===18){var T=lA[h.name];if(typeof T=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+h.name+'"');return T(h.values)}return null}},oA=function(v){var h=v.filter(function(T){return T.type===17}).map(function(T){return T.number});return h.length===6?h:null},AA=function(v){var h=v.filter(function(pe){return pe.type===17}).map(function(pe){return pe.number}),T=h[0],C=h[1];h[2],h[3];var K=h[4],$=h[5];h[6],h[7],h[8],h[9],h[10],h[11];var se=h[12],ge=h[13];return h[14],h[15],h.length===16?[T,C,K,$,se,ge]:null},lA={matrix:oA,matrix3d:AA},Ja={type:16,number:50,flags:Ir},uA=[Ja,Ja],cA={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(v,h){var T=h.filter(Mr);return T.length!==2?uA:[T[0],T[1]]}},hA={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(v,h){switch(h){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},ii;(function(v){v.NORMAL="normal",v.BREAK_ALL="break-all",v.KEEP_ALL="keep-all"})(ii||(ii={}));for(var dA={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(v,h){switch(h){case"break-all":return ii.BREAK_ALL;case"keep-all":return ii.KEEP_ALL;case"normal":default:return ii.NORMAL}}},fA={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(v,h){if(h.type===20)return{auto:!0,order:0};if(Kn(h))return{auto:!1,order:h.number};throw new Error("Invalid z-index number parsed")}},$a={name:"time",parse:function(v,h){if(h.type===15)switch(h.unit.toLowerCase()){case"s":return 1e3*h.number;case"ms":return h.number}throw new Error("Unsupported time type")}},pA={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(v,h){return Kn(h)?h.number:1}},gA={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},mA={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(v,h){return h.filter(wr).map(function(T){switch(T.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(T){return T!==0})}},vA={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(v,h){var T=[],C=[];return h.forEach(function(K){switch(K.type){case 20:case 0:T.push(K.value);break;case 17:T.push(K.number.toString());break;case 4:C.push(T.join(" ")),T.length=0;break}}),T.length&&C.push(T.join(" ")),C.map(function(K){return K.indexOf(" ")===-1?K:"'"+K+"'"})}},yA={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},_A={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(v,h){if(Kn(h))return h.number;if(wr(h))switch(h.value){case"bold":return 700;case"normal":default:return 400}return 400}},EA={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(v,h){return h.filter(wr).map(function(T){return T.value})}},bA={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(v,h){switch(h){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},Kr=function(v,h){return(v&h)!==0},wA={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(v,h){if(h.length===0)return[];var T=h[0];return T.type===20&&T.value==="none"?[]:h}},CA={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(v,h){if(h.length===0)return null;var T=h[0];if(T.type===20&&T.value==="none")return null;for(var C=[],K=h.filter(xa),$=0;$<K.length;$++){var se=K[$],ge=K[$+1];if(se.type===20){var pe=ge&&Kn(ge)?ge.number:1;C.push({counter:se.value,increment:pe})}}return C}},TA={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(v,h){if(h.length===0)return[];for(var T=[],C=h.filter(xa),K=0;K<C.length;K++){var $=C[K],se=C[K+1];if(wr($)&&$.value!=="none"){var ge=se&&Kn(se)?se.number:0;T.push({counter:$.value,reset:ge})}}return T}},BA={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(v,h){return h.filter(ti).map(function(T){return $a.parse(v,T)})}},xA={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(v,h){if(h.length===0)return null;var T=h[0];if(T.type===20&&T.value==="none")return null;var C=[],K=h.filter(Zs);if(K.length%2!==0)return null;for(var $=0;$<K.length;$+=2){var se=K[$].value,ge=K[$+1].value;C.push({open:se,close:ge})}return C}},Za=function(v,h,T){if(!v)return"";var C=v[Math.min(h,v.length-1)];return C?T?C.open:C.close:""},SA={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(v,h){return h.length===1&&Yi(h[0],"none")?[]:hn(h).map(function(T){for(var C={color:255,offsetX:Vr,offsetY:Vr,blur:Vr,spread:Vr,inset:!1},K=0,$=0;$<T.length;$++){var se=T[$];Yi(se,"inset")?C.inset=!0:wn(se)?(K===0?C.offsetX=se:K===1?C.offsetY=se:K===2?C.blur=se:C.spread=se,K++):C.color=Tn.parse(v,se)}return C})}},IA={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(v,h){var T=[0,1,2],C=[];return h.filter(wr).forEach(function(K){switch(K.value){case"stroke":C.push(1);break;case"fill":C.push(0);break;case"markers":C.push(2);break}}),T.forEach(function(K){C.indexOf(K)===-1&&C.push(K)}),C}},RA={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},OA={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(v,h){return ti(h)?h.number:0}},LA=function(){function v(h,T){var C,K;this.animationDuration=It(h,BA,T.animationDuration),this.backgroundClip=It(h,to,T.backgroundClip),this.backgroundColor=It(h,ro,T.backgroundColor),this.backgroundImage=It(h,ho,T.backgroundImage),this.backgroundOrigin=It(h,fo,T.backgroundOrigin),this.backgroundPosition=It(h,po,T.backgroundPosition),this.backgroundRepeat=It(h,go,T.backgroundRepeat),this.backgroundSize=It(h,vo,T.backgroundSize),this.borderTopColor=It(h,_o,T.borderTopColor),this.borderRightColor=It(h,Eo,T.borderRightColor),this.borderBottomColor=It(h,bo,T.borderBottomColor),this.borderLeftColor=It(h,wo,T.borderLeftColor),this.borderTopLeftRadius=It(h,Co,T.borderTopLeftRadius),this.borderTopRightRadius=It(h,To,T.borderTopRightRadius),this.borderBottomRightRadius=It(h,Bo,T.borderBottomRightRadius),this.borderBottomLeftRadius=It(h,xo,T.borderBottomLeftRadius),this.borderTopStyle=It(h,So,T.borderTopStyle),this.borderRightStyle=It(h,Io,T.borderRightStyle),this.borderBottomStyle=It(h,Ro,T.borderBottomStyle),this.borderLeftStyle=It(h,Oo,T.borderLeftStyle),this.borderTopWidth=It(h,Lo,T.borderTopWidth),this.borderRightWidth=It(h,Uo,T.borderRightWidth),this.borderBottomWidth=It(h,Do,T.borderBottomWidth),this.borderLeftWidth=It(h,Fo,T.borderLeftWidth),this.boxShadow=It(h,SA,T.boxShadow),this.color=It(h,No,T.color),this.direction=It(h,Po,T.direction),this.display=It(h,Mo,T.display),this.float=It(h,Ho,T.cssFloat),this.fontFamily=It(h,vA,T.fontFamily),this.fontSize=It(h,yA,T.fontSize),this.fontStyle=It(h,bA,T.fontStyle),this.fontVariant=It(h,EA,T.fontVariant),this.fontWeight=It(h,_A,T.fontWeight),this.letterSpacing=It(h,Qo,T.letterSpacing),this.lineBreak=It(h,Ko,T.lineBreak),this.lineHeight=It(h,jo,T.lineHeight),this.listStyleImage=It(h,Wo,T.listStyleImage),this.listStylePosition=It(h,Go,T.listStylePosition),this.listStyleType=It(h,qi,T.listStyleType),this.marginTop=It(h,Vo,T.marginTop),this.marginRight=It(h,zo,T.marginRight),this.marginBottom=It(h,Xo,T.marginBottom),this.marginLeft=It(h,Yo,T.marginLeft),this.opacity=It(h,pA,T.opacity);var $=It(h,Jo,T.overflow);this.overflowX=$[0],this.overflowY=$[$.length>1?1:0],this.overflowWrap=It(h,$o,T.overflowWrap),this.paddingTop=It(h,Zo,T.paddingTop),this.paddingRight=It(h,qo,T.paddingRight),this.paddingBottom=It(h,eA,T.paddingBottom),this.paddingLeft=It(h,tA,T.paddingLeft),this.paintOrder=It(h,IA,T.paintOrder),this.position=It(h,nA,T.position),this.textAlign=It(h,rA,T.textAlign),this.textDecorationColor=It(h,gA,(C=T.textDecorationColor)!==null&&C!==void 0?C:T.color),this.textDecorationLine=It(h,mA,(K=T.textDecorationLine)!==null&&K!==void 0?K:T.textDecoration),this.textShadow=It(h,iA,T.textShadow),this.textTransform=It(h,aA,T.textTransform),this.transform=It(h,sA,T.transform),this.transformOrigin=It(h,cA,T.transformOrigin),this.visibility=It(h,hA,T.visibility),this.webkitTextStrokeColor=It(h,RA,T.webkitTextStrokeColor),this.webkitTextStrokeWidth=It(h,OA,T.webkitTextStrokeWidth),this.wordBreak=It(h,dA,T.wordBreak),this.zIndex=It(h,fA,T.zIndex)}return v.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},v.prototype.isTransparent=function(){return Bn(this.backgroundColor)},v.prototype.isTransformed=function(){return this.transform!==null},v.prototype.isPositioned=function(){return this.position!==0},v.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},v.prototype.isFloating=function(){return this.float!==0},v.prototype.isInlineLevel=function(){return Kr(this.display,4)||Kr(this.display,33554432)||Kr(this.display,268435456)||Kr(this.display,536870912)||Kr(this.display,67108864)||Kr(this.display,134217728)},v}(),UA=function(){function v(h,T){this.content=It(h,wA,T.content),this.quotes=It(h,xA,T.quotes)}return v}(),qa=function(){function v(h,T){this.counterIncrement=It(h,CA,T.counterIncrement),this.counterReset=It(h,TA,T.counterReset)}return v}(),It=function(v,h,T){var C=new Ta,K=T!==null&&typeof T!="undefined"?T.toString():h.initialValue;C.write(K);var $=new Ba(C.read());switch(h.type){case 2:var se=$.parseComponentValue();return h.parse(v,wr(se)?se.value:h.initialValue);case 0:return h.parse(v,$.parseComponentValue());case 1:return h.parse(v,$.parseComponentValues());case 4:return $.parseComponentValue();case 3:switch(h.format){case"angle":return gi.parse(v,$.parseComponentValue());case"color":return Tn.parse(v,$.parseComponentValue());case"image":return Zi.parse(v,$.parseComponentValue());case"length":var ge=$.parseComponentValue();return wn(ge)?ge:Vr;case"length-percentage":var pe=$.parseComponentValue();return Mr(pe)?pe:Vr;case"time":return $a.parse(v,$.parseComponentValue())}break}},DA="data-html2canvas-debug",FA=function(v){var h=v.getAttribute(DA);switch(h){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},ea=function(v,h){var T=FA(v);return T===1||h===T},dn=function(){function v(h,T){if(this.context=h,this.textNodes=[],this.elements=[],this.flags=0,ea(T,3))debugger;this.styles=new LA(h,window.getComputedStyle(T,null)),fa(T)&&(this.styles.animationDuration.some(function(C){return C>0})&&(T.style.animationDuration="0s"),this.styles.transform!==null&&(T.style.transform="none")),this.bounds=P(this.context,T),ea(T,4)&&(this.flags|=16)}return v}(),NA="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",es="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ai=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),xi=0;xi<es.length;xi++)ai[es.charCodeAt(xi)]=xi;for(var PA=function(v){var h=v.length*.75,T=v.length,C,K=0,$,se,ge,pe;v[v.length-1]==="="&&(h--,v[v.length-2]==="="&&h--);var Re=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(h):new Array(h),De=Array.isArray(Re)?Re:new Uint8Array(Re);for(C=0;C<T;C+=4)$=ai[v.charCodeAt(C)],se=ai[v.charCodeAt(C+1)],ge=ai[v.charCodeAt(C+2)],pe=ai[v.charCodeAt(C+3)],De[K++]=$<<2|se>>4,De[K++]=(se&15)<<4|ge>>2,De[K++]=(ge&3)<<6|pe&63;return Re},MA=function(v){for(var h=v.length,T=[],C=0;C<h;C+=2)T.push(v[C+1]<<8|v[C]);return T},kA=function(v){for(var h=v.length,T=[],C=0;C<h;C+=4)T.push(v[C+3]<<24|v[C+2]<<16|v[C+1]<<8|v[C]);return T},Fn=5,ta=6+5,ra=2,HA=ta-Fn,ts=65536>>Fn,QA=1<<Fn,na=QA-1,KA=1024>>Fn,jA=ts+KA,WA=jA,GA=2048>>6,VA=WA+GA,zA=65536>>ta,XA=1<<HA,YA=XA-1,rs=function(v,h,T){return v.slice?v.slice(h,T):new Uint16Array(Array.prototype.slice.call(v,h,T))},JA=function(v,h,T){return v.slice?v.slice(h,T):new Uint32Array(Array.prototype.slice.call(v,h,T))},$A=function(v,h){var T=PA(v),C=Array.isArray(T)?kA(T):new Uint32Array(T),K=Array.isArray(T)?MA(T):new Uint16Array(T),$=24,se=rs(K,$/2,C[4]/2),ge=C[5]===2?rs(K,($+C[4])/2):JA(C,Math.ceil(($+C[4])/4));return new ZA(C[0],C[1],C[2],C[3],se,ge)},ZA=function(){function v(h,T,C,K,$,se){this.initialValue=h,this.errorValue=T,this.highStart=C,this.highValueIndex=K,this.index=$,this.data=se}return v.prototype.get=function(h){var T;if(h>=0){if(h<55296||h>56319&&h<=65535)return T=this.index[h>>Fn],T=(T<<ra)+(h&na),this.data[T];if(h<=65535)return T=this.index[ts+(h-55296>>Fn)],T=(T<<ra)+(h&na),this.data[T];if(h<this.highStart)return T=VA-zA+(h>>ta),T=this.index[T],T+=h>>Fn&YA,T=this.index[T],T=(T<<ra)+(h&na),this.data[T];if(h<=1114111)return this.data[this.highValueIndex]}return this.errorValue},v}(),ns="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qA=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Si=0;Si<ns.length;Si++)qA[ns.charCodeAt(Si)]=Si;var el=1,ia=2,aa=3,is=4,as=5,tl=7,ss=8,sa=9,oa=10,os=11,As=12,ls=13,us=14,Aa=15,rl=function(v){for(var h=[],T=0,C=v.length;T<C;){var K=v.charCodeAt(T++);if(K>=55296&&K<=56319&&T<C){var $=v.charCodeAt(T++);($&64512)===56320?h.push(((K&1023)<<10)+($&1023)+65536):(h.push(K),T--)}else h.push(K)}return h},nl=function(){for(var v=[],h=0;h<arguments.length;h++)v[h]=arguments[h];if(String.fromCodePoint)return String.fromCodePoint.apply(String,v);var T=v.length;if(!T)return"";for(var C=[],K=-1,$="";++K<T;){var se=v[K];se<=65535?C.push(se):(se-=65536,C.push((se>>10)+55296,se%1024+56320)),(K+1===T||C.length>16384)&&($+=String.fromCharCode.apply(String,C),C.length=0)}return $},il=$A(NA),sn="\xD7",la="\xF7",al=function(v){return il.get(v)},sl=function(v,h,T){var C=T-2,K=h[C],$=h[T-1],se=h[T];if($===ia&&se===aa)return sn;if($===ia||$===aa||$===is)return la;if(se===ia||se===aa||se===is)return la;if($===ss&&[ss,sa,os,As].indexOf(se)!==-1)return sn;if(($===os||$===sa)&&(se===sa||se===oa))return sn;if(($===As||$===oa)&&se===oa)return sn;if(se===ls||se===as)return sn;if(se===tl)return sn;if($===el)return sn;if($===ls&&se===us){for(;K===as;)K=h[--C];if(K===us)return sn}if($===Aa&&se===Aa){for(var ge=0;K===Aa;)ge++,K=h[--C];if(ge%2===0)return sn}return la},ol=function(v){var h=rl(v),T=h.length,C=0,K=0,$=h.map(al);return{next:function(){if(C>=T)return{done:!0,value:null};for(var se=sn;C<T&&(se=sl(h,$,++C))===sn;);if(se!==sn||C===T){var ge=nl.apply(null,h.slice(K,C));return K=C,{value:ge,done:!1}}return{done:!0,value:null}}}},Al=function(v){for(var h=ol(v),T=[],C;!(C=h.next()).done;)C.value&&T.push(C.value.slice());return T},ll=function(v){var h=123;if(v.createRange){var T=v.createRange();if(T.getBoundingClientRect){var C=v.createElement("boundtest");C.style.height=h+"px",C.style.display="block",v.body.appendChild(C),T.selectNode(C);var K=T.getBoundingClientRect(),$=Math.round(K.height);if(v.body.removeChild(C),$===h)return!0}}return!1},ul=function(v){var h=v.createElement("boundtest");h.style.width="50px",h.style.display="block",h.style.fontSize="12px",h.style.letterSpacing="0px",h.style.wordSpacing="0px",v.body.appendChild(h);var T=v.createRange();h.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var C=h.firstChild,K=S(C.data).map(function(pe){return _(pe)}),$=0,se={},ge=K.every(function(pe,Re){T.setStart(C,$),T.setEnd(C,$+pe.length);var De=T.getBoundingClientRect();$+=pe.length;var Ve=De.x>se.x||De.y>se.y;return se=De,Re===0?!0:Ve});return v.body.removeChild(h),ge},cl=function(){return typeof new Image().crossOrigin!="undefined"},hl=function(){return typeof new XMLHttpRequest().responseType=="string"},dl=function(v){var h=new Image,T=v.createElement("canvas"),C=T.getContext("2d");if(!C)return!1;h.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{C.drawImage(h,0,0),T.toDataURL()}catch(K){return!1}return!0},cs=function(v){return v[0]===0&&v[1]===255&&v[2]===0&&v[3]===255},fl=function(v){var h=v.createElement("canvas"),T=100;h.width=T,h.height=T;var C=h.getContext("2d");if(!C)return Promise.reject(!1);C.fillStyle="rgb(0, 255, 0)",C.fillRect(0,0,T,T);var K=new Image,$=h.toDataURL();K.src=$;var se=ua(T,T,0,0,K);return C.fillStyle="red",C.fillRect(0,0,T,T),hs(se).then(function(ge){C.drawImage(ge,0,0);var pe=C.getImageData(0,0,T,T).data;C.fillStyle="red",C.fillRect(0,0,T,T);var Re=v.createElement("div");return Re.style.backgroundImage="url("+$+")",Re.style.height=T+"px",cs(pe)?hs(ua(T,T,0,0,Re)):Promise.reject(!1)}).then(function(ge){return C.drawImage(ge,0,0),cs(C.getImageData(0,0,T,T).data)}).catch(function(){return!1})},ua=function(v,h,T,C,K){var $="http://www.w3.org/2000/svg",se=document.createElementNS($,"svg"),ge=document.createElementNS($,"foreignObject");return se.setAttributeNS(null,"width",v.toString()),se.setAttributeNS(null,"height",h.toString()),ge.setAttributeNS(null,"width","100%"),ge.setAttributeNS(null,"height","100%"),ge.setAttributeNS(null,"x",T.toString()),ge.setAttributeNS(null,"y",C.toString()),ge.setAttributeNS(null,"externalResourcesRequired","true"),se.appendChild(ge),ge.appendChild(K),se},hs=function(v){return new Promise(function(h,T){var C=new Image;C.onload=function(){return h(C)},C.onerror=T,C.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(v))})},zr={get SUPPORT_RANGE_BOUNDS(){var v=ll(document);return Object.defineProperty(zr,"SUPPORT_RANGE_BOUNDS",{value:v}),v},get SUPPORT_WORD_BREAKING(){var v=zr.SUPPORT_RANGE_BOUNDS&&ul(document);return Object.defineProperty(zr,"SUPPORT_WORD_BREAKING",{value:v}),v},get SUPPORT_SVG_DRAWING(){var v=dl(document);return Object.defineProperty(zr,"SUPPORT_SVG_DRAWING",{value:v}),v},get SUPPORT_FOREIGNOBJECT_DRAWING(){var v=typeof Array.from=="function"&&typeof window.fetch=="function"?fl(document):Promise.resolve(!1);return Object.defineProperty(zr,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:v}),v},get SUPPORT_CORS_IMAGES(){var v=cl();return Object.defineProperty(zr,"SUPPORT_CORS_IMAGES",{value:v}),v},get SUPPORT_RESPONSE_TYPE(){var v=hl();return Object.defineProperty(zr,"SUPPORT_RESPONSE_TYPE",{value:v}),v},get SUPPORT_CORS_XHR(){var v="withCredentials"in new XMLHttpRequest;return Object.defineProperty(zr,"SUPPORT_CORS_XHR",{value:v}),v},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var v=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(zr,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:v}),v}},si=function(){function v(h,T){this.text=h,this.bounds=T}return v}(),pl=function(v,h,T,C){var K=vl(h,T),$=[],se=0;return K.forEach(function(ge){if(T.textDecorationLine.length||ge.trim().length>0)if(zr.SUPPORT_RANGE_BOUNDS){var pe=ds(C,se,ge.length).getClientRects();if(pe.length>1){var Re=ca(ge),De=0;Re.forEach(function(ze){$.push(new si(ze,G.fromDOMRectList(v,ds(C,De+se,ze.length).getClientRects()))),De+=ze.length})}else $.push(new si(ge,G.fromDOMRectList(v,pe)))}else{var Ve=C.splitText(ge.length);$.push(new si(ge,gl(v,C))),C=Ve}else zr.SUPPORT_RANGE_BOUNDS||(C=C.splitText(ge.length));se+=ge.length}),$},gl=function(v,h){var T=h.ownerDocument;if(T){var C=T.createElement("html2canvaswrapper");C.appendChild(h.cloneNode(!0));var K=h.parentNode;if(K){K.replaceChild(C,h);var $=P(v,C);return C.firstChild&&K.replaceChild(C.firstChild,C),$}}return G.EMPTY},ds=function(v,h,T){var C=v.ownerDocument;if(!C)throw new Error("Node has no owner document");var K=C.createRange();return K.setStart(v,h),K.setEnd(v,h+T),K},ca=function(v){if(zr.SUPPORT_NATIVE_TEXT_SEGMENTATION){var h=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(h.segment(v)).map(function(T){return T.segment})}return Al(v)},ml=function(v,h){if(zr.SUPPORT_NATIVE_TEXT_SEGMENTATION){var T=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(T.segment(v)).map(function(C){return C.segment})}return _l(v,h)},vl=function(v,h){return h.letterSpacing!==0?ca(v):ml(v,h)},yl=[32,160,4961,65792,65793,4153,4241],_l=function(v,h){for(var T=Sr(v,{lineBreak:h.lineBreak,wordBreak:h.overflowWrap==="break-word"?"break-word":h.wordBreak}),C=[],K,$=function(){if(K.value){var se=K.value.slice(),ge=S(se),pe="";ge.forEach(function(Re){yl.indexOf(Re)===-1?pe+=_(Re):(pe.length&&C.push(pe),C.push(_(Re)),pe="")}),pe.length&&C.push(pe)}};!(K=T.next()).done;)$();return C},El=function(){function v(h,T,C){this.text=bl(T.data,C.textTransform),this.textBounds=pl(h,this.text,C,T)}return v}(),bl=function(v,h){switch(h){case 1:return v.toLowerCase();case 3:return v.replace(wl,Cl);case 2:return v.toUpperCase();default:return v}},wl=/(^|\s|:|-|\(|\))([a-z])/g,Cl=function(v,h,T){return v.length>0?h+T.toUpperCase():v},fs=function(v){V(h,v);function h(T,C){var K=v.call(this,T,C)||this;return K.src=C.currentSrc||C.src,K.intrinsicWidth=C.naturalWidth,K.intrinsicHeight=C.naturalHeight,K.context.cache.addImage(K.src),K}return h}(dn),ps=function(v){V(h,v);function h(T,C){var K=v.call(this,T,C)||this;return K.canvas=C,K.intrinsicWidth=C.width,K.intrinsicHeight=C.height,K}return h}(dn),gs=function(v){V(h,v);function h(T,C){var K=v.call(this,T,C)||this,$=new XMLSerializer,se=P(T,C);return C.setAttribute("width",se.width+"px"),C.setAttribute("height",se.height+"px"),K.svg="data:image/svg+xml,"+encodeURIComponent($.serializeToString(C)),K.intrinsicWidth=C.width.baseVal.value,K.intrinsicHeight=C.height.baseVal.value,K.context.cache.addImage(K.svg),K}return h}(dn),ms=function(v){V(h,v);function h(T,C){var K=v.call(this,T,C)||this;return K.value=C.value,K}return h}(dn),ha=function(v){V(h,v);function h(T,C){var K=v.call(this,T,C)||this;return K.start=C.start,K.reversed=typeof C.reversed=="boolean"&&C.reversed===!0,K}return h}(dn),Tl=[{type:15,flags:0,unit:"px",number:3}],Bl=[{type:16,flags:0,number:50}],xl=function(v){return v.width>v.height?new G(v.left+(v.width-v.height)/2,v.top,v.height,v.height):v.width<v.height?new G(v.left,v.top+(v.height-v.width)/2,v.width,v.width):v},Sl=function(v){var h=v.type===Il?new Array(v.value.length+1).join("\u2022"):v.value;return h.length===0?v.placeholder||"":h},Ii="checkbox",Ri="radio",Il="password",vs=707406591,da=function(v){V(h,v);function h(T,C){var K=v.call(this,T,C)||this;K.type=C.type.toLowerCase(),K.checked=C.checked,K.value=Sl(C),(K.type===Ii||K.type===Ri)&&(K.styles.backgroundColor=3739148031,K.styles.borderTopColor=K.styles.borderRightColor=K.styles.borderBottomColor=K.styles.borderLeftColor=2779096575,K.styles.borderTopWidth=K.styles.borderRightWidth=K.styles.borderBottomWidth=K.styles.borderLeftWidth=1,K.styles.borderTopStyle=K.styles.borderRightStyle=K.styles.borderBottomStyle=K.styles.borderLeftStyle=1,K.styles.backgroundClip=[0],K.styles.backgroundOrigin=[0],K.bounds=xl(K.bounds));switch(K.type){case Ii:K.styles.borderTopRightRadius=K.styles.borderTopLeftRadius=K.styles.borderBottomRightRadius=K.styles.borderBottomLeftRadius=Tl;break;case Ri:K.styles.borderTopRightRadius=K.styles.borderTopLeftRadius=K.styles.borderBottomRightRadius=K.styles.borderBottomLeftRadius=Bl;break}return K}return h}(dn),ys=function(v){V(h,v);function h(T,C){var K=v.call(this,T,C)||this,$=C.options[C.selectedIndex||0];return K.value=$&&$.text||"",K}return h}(dn),_s=function(v){V(h,v);function h(T,C){var K=v.call(this,T,C)||this;return K.value=C.value,K}return h}(dn),Es=function(v){V(h,v);function h(T,C){var K=v.call(this,T,C)||this;K.src=C.src,K.width=parseInt(C.width,10)||0,K.height=parseInt(C.height,10)||0,K.backgroundColor=K.styles.backgroundColor;try{if(C.contentWindow&&C.contentWindow.document&&C.contentWindow.document.documentElement){K.tree=ws(T,C.contentWindow.document.documentElement);var $=C.contentWindow.document.documentElement?ni(T,getComputedStyle(C.contentWindow.document.documentElement).backgroundColor):vn.TRANSPARENT,se=C.contentWindow.document.body?ni(T,getComputedStyle(C.contentWindow.document.body).backgroundColor):vn.TRANSPARENT;K.backgroundColor=Bn($)?Bn(se)?K.styles.backgroundColor:se:$}}catch(ge){}return K}return h}(dn),Rl=["OL","UL","MENU"],Oi=function(v,h,T,C){for(var K=h.firstChild,$=void 0;K;K=$)if($=K.nextSibling,Cs(K)&&K.data.trim().length>0)T.textNodes.push(new El(v,K,T.styles));else if(Gn(K))if(Rs(K)&&K.assignedNodes)K.assignedNodes().forEach(function(ge){return Oi(v,ge,T,C)});else{var se=bs(v,K);se.styles.isVisible()&&(Ol(K,se,C)?se.flags|=4:Ll(se.styles)&&(se.flags|=2),Rl.indexOf(K.tagName)!==-1&&(se.flags|=8),T.elements.push(se),K.slot,K.shadowRoot?Oi(v,K.shadowRoot,se,C):!Ui(K)&&!Ts(K)&&!Di(K)&&Oi(v,K,se,C))}},bs=function(v,h){return ga(h)?new fs(v,h):Bs(h)?new ps(v,h):Ts(h)?new gs(v,h):Ul(h)?new ms(v,h):Dl(h)?new ha(v,h):Fl(h)?new da(v,h):Di(h)?new ys(v,h):Ui(h)?new _s(v,h):Ss(h)?new Es(v,h):new dn(v,h)},ws=function(v,h){var T=bs(v,h);return T.flags|=4,Oi(v,h,T,T),T},Ol=function(v,h,T){return h.styles.isPositionedWithZIndex()||h.styles.opacity<1||h.styles.isTransformed()||pa(v)&&T.styles.isTransparent()},Ll=function(v){return v.isPositioned()||v.isFloating()},Cs=function(v){return v.nodeType===Node.TEXT_NODE},Gn=function(v){return v.nodeType===Node.ELEMENT_NODE},fa=function(v){return Gn(v)&&typeof v.style!="undefined"&&!Li(v)},Li=function(v){return typeof v.className=="object"},Ul=function(v){return v.tagName==="LI"},Dl=function(v){return v.tagName==="OL"},Fl=function(v){return v.tagName==="INPUT"},Nl=function(v){return v.tagName==="HTML"},Ts=function(v){return v.tagName==="svg"},pa=function(v){return v.tagName==="BODY"},Bs=function(v){return v.tagName==="CANVAS"},xs=function(v){return v.tagName==="VIDEO"},ga=function(v){return v.tagName==="IMG"},Ss=function(v){return v.tagName==="IFRAME"},Is=function(v){return v.tagName==="STYLE"},Pl=function(v){return v.tagName==="SCRIPT"},Ui=function(v){return v.tagName==="TEXTAREA"},Di=function(v){return v.tagName==="SELECT"},Rs=function(v){return v.tagName==="SLOT"},Os=function(v){return v.tagName.indexOf("-")>0},Ml=function(){function v(){this.counters={}}return v.prototype.getCounterValue=function(h){var T=this.counters[h];return T&&T.length?T[T.length-1]:1},v.prototype.getCounterValues=function(h){var T=this.counters[h];return T||[]},v.prototype.pop=function(h){var T=this;h.forEach(function(C){return T.counters[C].pop()})},v.prototype.parse=function(h){var T=this,C=h.counterIncrement,K=h.counterReset,$=!0;C!==null&&C.forEach(function(ge){var pe=T.counters[ge.counter];pe&&ge.increment!==0&&($=!1,pe.length||pe.push(1),pe[Math.max(0,pe.length-1)]+=ge.increment)});var se=[];return $&&K.forEach(function(ge){var pe=T.counters[ge.counter];se.push(ge.counter),pe||(pe=T.counters[ge.counter]=[]),pe.push(ge.reset)}),se},v}(),Ls={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},Us={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054F","\u054E","\u054D","\u054C","\u054B","\u054A","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053F","\u053E","\u053D","\u053C","\u053B","\u053A","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},kl={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05D9\u05F3","\u05D8\u05F3","\u05D7\u05F3","\u05D6\u05F3","\u05D5\u05F3","\u05D4\u05F3","\u05D3\u05F3","\u05D2\u05F3","\u05D1\u05F3","\u05D0\u05F3","\u05EA","\u05E9","\u05E8","\u05E7","\u05E6","\u05E4","\u05E2","\u05E1","\u05E0","\u05DE","\u05DC","\u05DB","\u05D9\u05D8","\u05D9\u05D7","\u05D9\u05D6","\u05D8\u05D6","\u05D8\u05D5","\u05D9","\u05D8","\u05D7","\u05D6","\u05D5","\u05D4","\u05D3","\u05D2","\u05D1","\u05D0"]},Hl={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10F5","\u10F0","\u10EF","\u10F4","\u10EE","\u10ED","\u10EC","\u10EB","\u10EA","\u10E9","\u10E8","\u10E7","\u10E6","\u10E5","\u10E4","\u10F3","\u10E2","\u10E1","\u10E0","\u10DF","\u10DE","\u10DD","\u10F2","\u10DC","\u10DB","\u10DA","\u10D9","\u10D8","\u10D7","\u10F1","\u10D6","\u10D5","\u10D4","\u10D3","\u10D2","\u10D1","\u10D0"]},Vn=function(v,h,T,C,K,$){return v<h||v>T?Ai(v,K,$.length>0):C.integers.reduce(function(se,ge,pe){for(;v>=ge;)v-=ge,se+=C.values[pe];return se},"")+$},Ds=function(v,h,T,C){var K="";do T||v--,K=C(v)+K,v/=h;while(v*h>=h);return K},Dr=function(v,h,T,C,K){var $=T-h+1;return(v<0?"-":"")+(Ds(Math.abs(v),$,C,function(se){return _(Math.floor(se%$)+h)})+K)},Nn=function(v,h,T){T===void 0&&(T=". ");var C=h.length;return Ds(Math.abs(v),C,!1,function(K){return h[Math.floor(K%C)]})+T},zn=1<<0,Sn=1<<1,In=1<<2,oi=1<<3,yn=function(v,h,T,C,K,$){if(v<-9999||v>9999)return Ai(v,4,K.length>0);var se=Math.abs(v),ge=K;if(se===0)return h[0]+ge;for(var pe=0;se>0&&pe<=4;pe++){var Re=se%10;Re===0&&Kr($,zn)&&ge!==""?ge=h[Re]+ge:Re>1||Re===1&&pe===0||Re===1&&pe===1&&Kr($,Sn)||Re===1&&pe===1&&Kr($,In)&&v>100||Re===1&&pe>1&&Kr($,oi)?ge=h[Re]+(pe>0?T[pe-1]:"")+ge:Re===1&&pe>0&&(ge=T[pe-1]+ge),se=Math.floor(se/10)}return(v<0?C:"")+ge},Fs="\u5341\u767E\u5343\u842C",Ns="\u62FE\u4F70\u4EDF\u842C",Ps="\u30DE\u30A4\u30CA\u30B9",ma="\uB9C8\uC774\uB108\uC2A4",Ai=function(v,h,T){var C=T?". ":"",K=T?"\u3001":"",$=T?", ":"",se=T?" ":"";switch(h){case 0:return"\u2022"+se;case 1:return"\u25E6"+se;case 2:return"\u25FE"+se;case 5:var ge=Dr(v,48,57,!0,C);return ge.length<4?"0"+ge:ge;case 4:return Nn(v,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",K);case 6:return Vn(v,1,3999,Ls,3,C).toLowerCase();case 7:return Vn(v,1,3999,Ls,3,C);case 8:return Dr(v,945,969,!1,C);case 9:return Dr(v,97,122,!1,C);case 10:return Dr(v,65,90,!1,C);case 11:return Dr(v,1632,1641,!0,C);case 12:case 49:return Vn(v,1,9999,Us,3,C);case 35:return Vn(v,1,9999,Us,3,C).toLowerCase();case 13:return Dr(v,2534,2543,!0,C);case 14:case 30:return Dr(v,6112,6121,!0,C);case 15:return Nn(v,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",K);case 16:return Nn(v,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",K);case 17:case 48:return yn(v,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Fs,"\u8CA0",K,Sn|In|oi);case 47:return yn(v,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",Ns,"\u8CA0",K,zn|Sn|In|oi);case 42:return yn(v,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Fs,"\u8D1F",K,Sn|In|oi);case 41:return yn(v,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",Ns,"\u8D1F",K,zn|Sn|In|oi);case 26:return yn(v,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",Ps,K,0);case 25:return yn(v,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",Ps,K,zn|Sn|In);case 31:return yn(v,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",ma,$,zn|Sn|In);case 33:return yn(v,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",ma,$,0);case 32:return yn(v,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",ma,$,zn|Sn|In);case 18:return Dr(v,2406,2415,!0,C);case 20:return Vn(v,1,19999,Hl,3,C);case 21:return Dr(v,2790,2799,!0,C);case 22:return Dr(v,2662,2671,!0,C);case 22:return Vn(v,1,10999,kl,3,C);case 23:return Nn(v,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return Nn(v,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return Dr(v,3302,3311,!0,C);case 28:return Nn(v,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",K);case 29:return Nn(v,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",K);case 34:return Dr(v,3792,3801,!0,C);case 37:return Dr(v,6160,6169,!0,C);case 38:return Dr(v,4160,4169,!0,C);case 39:return Dr(v,2918,2927,!0,C);case 40:return Dr(v,1776,1785,!0,C);case 43:return Dr(v,3046,3055,!0,C);case 44:return Dr(v,3174,3183,!0,C);case 45:return Dr(v,3664,3673,!0,C);case 46:return Dr(v,3872,3881,!0,C);case 3:default:return Dr(v,48,57,!0,C)}},Ms="data-html2canvas-ignore",ks=function(){function v(h,T,C){if(this.context=h,this.options=C,this.scrolledElements=[],this.referenceElement=T,this.counters=new Ml,this.quoteDepth=0,!T.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(T.ownerDocument.documentElement,!1)}return v.prototype.toIFrame=function(h,T){var C=this,K=Ql(h,T);if(!K.contentWindow)return Promise.reject("Unable to find iframe window");var $=h.defaultView.pageXOffset,se=h.defaultView.pageYOffset,ge=K.contentWindow,pe=ge.document,Re=Wl(K).then(function(){return z(C,void 0,void 0,function(){var De,Ve;return D(this,function(ze){switch(ze.label){case 0:return this.scrolledElements.forEach(Xl),ge&&(ge.scrollTo(T.left,T.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(ge.scrollY!==T.top||ge.scrollX!==T.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(ge.scrollX-T.left,ge.scrollY-T.top,0,0))),De=this.options.onclone,Ve=this.clonedReferenceElement,typeof Ve=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:pe.fonts&&pe.fonts.ready?[4,pe.fonts.ready]:[3,2];case 1:ze.sent(),ze.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,jl(pe)]:[3,4];case 3:ze.sent(),ze.label=4;case 4:return typeof De=="function"?[2,Promise.resolve().then(function(){return De(pe,Ve)}).then(function(){return K})]:[2,K]}})})});return pe.open(),pe.write(Vl(document.doctype)+"<html></html>"),zl(this.referenceElement.ownerDocument,$,se),pe.replaceChild(pe.adoptNode(this.documentElement),pe.documentElement),pe.close(),Re},v.prototype.createElementClone=function(h){if(ea(h,2))debugger;if(Bs(h))return this.createCanvasClone(h);if(xs(h))return this.createVideoClone(h);if(Is(h))return this.createStyleClone(h);var T=h.cloneNode(!1);return ga(T)&&(ga(h)&&h.currentSrc&&h.currentSrc!==h.src&&(T.src=h.currentSrc,T.srcset=""),T.loading==="lazy"&&(T.loading="eager")),Os(T)?this.createCustomElementClone(T):T},v.prototype.createCustomElementClone=function(h){var T=document.createElement("html2canvascustomelement");return va(h.style,T),T},v.prototype.createStyleClone=function(h){try{var T=h.sheet;if(T&&T.cssRules){var C=[].slice.call(T.cssRules,0).reduce(function($,se){return se&&typeof se.cssText=="string"?$+se.cssText:$},""),K=h.cloneNode(!1);return K.textContent=C,K}}catch($){if(this.context.logger.error("Unable to access cssRules property",$),$.name!=="SecurityError")throw $}return h.cloneNode(!1)},v.prototype.createCanvasClone=function(h){var T;if(this.options.inlineImages&&h.ownerDocument){var C=h.ownerDocument.createElement("img");try{return C.src=h.toDataURL(),C}catch(Re){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",h)}}var K=h.cloneNode(!1);try{K.width=h.width,K.height=h.height;var $=h.getContext("2d"),se=K.getContext("2d");if(se)if(!this.options.allowTaint&&$)se.putImageData($.getImageData(0,0,h.width,h.height),0,0);else{var ge=(T=h.getContext("webgl2"))!==null&&T!==void 0?T:h.getContext("webgl");if(ge){var pe=ge.getContextAttributes();(pe==null?void 0:pe.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",h)}se.drawImage(h,0,0)}return K}catch(Re){this.context.logger.info("Unable to clone canvas as it is tainted",h)}return K},v.prototype.createVideoClone=function(h){var T=h.ownerDocument.createElement("canvas");T.width=h.offsetWidth,T.height=h.offsetHeight;var C=T.getContext("2d");try{return C&&(C.drawImage(h,0,0,T.width,T.height),this.options.allowTaint||C.getImageData(0,0,T.width,T.height)),T}catch($){this.context.logger.info("Unable to clone video as it is tainted",h)}var K=h.ownerDocument.createElement("canvas");return K.width=h.offsetWidth,K.height=h.offsetHeight,K},v.prototype.appendChildNode=function(h,T,C){(!Gn(T)||!Pl(T)&&!T.hasAttribute(Ms)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(T)))&&((!this.options.copyStyles||!Gn(T)||!Is(T))&&h.appendChild(this.cloneNode(T,C)))},v.prototype.cloneChildNodes=function(h,T,C){for(var K=this,$=h.shadowRoot?h.shadowRoot.firstChild:h.firstChild;$;$=$.nextSibling)if(Gn($)&&Rs($)&&typeof $.assignedNodes=="function"){var se=$.assignedNodes();se.length&&se.forEach(function(ge){return K.appendChildNode(T,ge,C)})}else this.appendChildNode(T,$,C)},v.prototype.cloneNode=function(h,T){if(Cs(h))return document.createTextNode(h.data);if(!h.ownerDocument)return h.cloneNode(!1);var C=h.ownerDocument.defaultView;if(C&&Gn(h)&&(fa(h)||Li(h))){var K=this.createElementClone(h);K.style.transitionProperty="none";var $=C.getComputedStyle(h),se=C.getComputedStyle(h,":before"),ge=C.getComputedStyle(h,":after");this.referenceElement===h&&fa(K)&&(this.clonedReferenceElement=K),pa(K)&&$l(K);var pe=this.counters.parse(new qa(this.context,$)),Re=this.resolvePseudoContent(h,K,se,li.BEFORE);Os(h)&&(T=!0),xs(h)||this.cloneChildNodes(h,K,T),Re&&K.insertBefore(Re,K.firstChild);var De=this.resolvePseudoContent(h,K,ge,li.AFTER);return De&&K.appendChild(De),this.counters.pop(pe),($&&(this.options.copyStyles||Li(h))&&!Ss(h)||T)&&va($,K),(h.scrollTop!==0||h.scrollLeft!==0)&&this.scrolledElements.push([K,h.scrollLeft,h.scrollTop]),(Ui(h)||Di(h))&&(Ui(K)||Di(K))&&(K.value=h.value),K}return h.cloneNode(!1)},v.prototype.resolvePseudoContent=function(h,T,C,K){var $=this;if(!C)return;var se=C.content,ge=T.ownerDocument;if(!ge||!se||se==="none"||se==="-moz-alt-content"||C.display==="none")return;this.counters.parse(new qa(this.context,C));var pe=new UA(this.context,C),Re=ge.createElement("html2canvaspseudoelement");va(C,Re),pe.content.forEach(function(Ve){if(Ve.type===0)Re.appendChild(ge.createTextNode(Ve.value));else if(Ve.type===22){var ze=ge.createElement("img");ze.src=Ve.value,ze.style.opacity="1",Re.appendChild(ze)}else if(Ve.type===18){if(Ve.name==="attr"){var xt=Ve.values.filter(wr);xt.length&&Re.appendChild(ge.createTextNode(h.getAttribute(xt[0].value)||""))}else if(Ve.name==="counter"){var ht=Ve.values.filter(jn),Et=ht[0],Xt=ht[1];if(Et&&wr(Et)){var Tt=$.counters.getCounterValue(Et.value),Rt=Xt&&wr(Xt)?qi.parse($.context,Xt.value):3;Re.appendChild(ge.createTextNode(Ai(Tt,Rt,!1)))}}else if(Ve.name==="counters"){var hr=Ve.values.filter(jn),Et=hr[0],sr=hr[1],Xt=hr[2];if(Et&&wr(Et)){var mr=$.counters.getCounterValues(Et.value),St=Xt&&wr(Xt)?qi.parse($.context,Xt.value):3,gr=sr&&sr.type===0?sr.value:"",vr=mr.map(function(Zr){return Ai(Zr,St,!1)}).join(gr);Re.appendChild(ge.createTextNode(vr))}}}else if(Ve.type===20)switch(Ve.value){case"open-quote":Re.appendChild(ge.createTextNode(Za(pe.quotes,$.quoteDepth++,!0)));break;case"close-quote":Re.appendChild(ge.createTextNode(Za(pe.quotes,--$.quoteDepth,!1)));break;default:Re.appendChild(ge.createTextNode(Ve.value))}}),Re.className=ya+" "+_a;var De=K===li.BEFORE?" "+ya:" "+_a;return Li(T)?T.className.baseValue+=De:T.className+=De,Re},v.destroy=function(h){return h.parentNode?(h.parentNode.removeChild(h),!0):!1},v}(),li;(function(v){v[v.BEFORE=0]="BEFORE",v[v.AFTER=1]="AFTER"})(li||(li={}));var Ql=function(v,h){var T=v.createElement("iframe");return T.className="html2canvas-container",T.style.visibility="hidden",T.style.position="fixed",T.style.left="-10000px",T.style.top="0px",T.style.border="0",T.width=h.width.toString(),T.height=h.height.toString(),T.scrolling="no",T.setAttribute(Ms,"true"),v.body.appendChild(T),T},Kl=function(v){return new Promise(function(h){if(v.complete){h();return}if(!v.src){h();return}v.onload=h,v.onerror=h})},jl=function(v){return Promise.all([].slice.call(v.images,0).map(Kl))},Wl=function(v){return new Promise(function(h,T){var C=v.contentWindow;if(!C)return T("No window assigned for iframe");var K=C.document;C.onload=v.onload=function(){C.onload=v.onload=null;var $=setInterval(function(){K.body.childNodes.length>0&&K.readyState==="complete"&&(clearInterval($),h(v))},50)}})},Gl=["all","d","content"],va=function(v,h){for(var T=v.length-1;T>=0;T--){var C=v.item(T);Gl.indexOf(C)===-1&&h.style.setProperty(C,v.getPropertyValue(C))}return h},Vl=function(v){var h="";return v&&(h+="<!DOCTYPE ",v.name&&(h+=v.name),v.internalSubset&&(h+=v.internalSubset),v.publicId&&(h+='"'+v.publicId+'"'),v.systemId&&(h+='"'+v.systemId+'"'),h+=">"),h},zl=function(v,h,T){v&&v.defaultView&&(h!==v.defaultView.pageXOffset||T!==v.defaultView.pageYOffset)&&v.defaultView.scrollTo(h,T)},Xl=function(v){var h=v[0],T=v[1],C=v[2];h.scrollLeft=T,h.scrollTop=C},Yl=":before",Jl=":after",ya="___html2canvas___pseudoelement_before",_a="___html2canvas___pseudoelement_after",Hs=`{
content: "" !important;
display: none !important;
}`,$l=function(v){Zl(v,"."+ya+Yl+Hs+`
.`+_a+Jl+Hs)},Zl=function(v,h){var T=v.ownerDocument;if(T){var C=T.createElement("style");C.textContent=h,v.appendChild(C)}},Qs=function(){function v(){}return v.getOrigin=function(h){var T=v._link;return T?(T.href=h,T.href=T.href,T.protocol+T.hostname+T.port):"about:blank"},v.isSameOrigin=function(h){return v.getOrigin(h)===v._origin},v.setContext=function(h){v._link=h.document.createElement("a"),v._origin=v.getOrigin(h.location.href)},v._origin="about:blank",v}(),ql=function(){function v(h,T){this.context=h,this._options=T,this._cache={}}return v.prototype.addImage=function(h){var T=Promise.resolve();return this.has(h)||(ba(h)||nu(h))&&(this._cache[h]=this.loadImage(h)).catch(function(){}),T},v.prototype.match=function(h){return this._cache[h]},v.prototype.loadImage=function(h){return z(this,void 0,void 0,function(){var T,C,K,$,se=this;return D(this,function(ge){switch(ge.label){case 0:return T=Qs.isSameOrigin(h),C=!Ea(h)&&this._options.useCORS===!0&&zr.SUPPORT_CORS_IMAGES&&!T,K=!Ea(h)&&!T&&!ba(h)&&typeof this._options.proxy=="string"&&zr.SUPPORT_CORS_XHR&&!C,!T&&this._options.allowTaint===!1&&!Ea(h)&&!ba(h)&&!K&&!C?[2]:($=h,K?[4,this.proxy($)]:[3,2]);case 1:$=ge.sent(),ge.label=2;case 2:return this.context.logger.debug("Added image "+h.substring(0,256)),[4,new Promise(function(pe,Re){var De=new Image;De.onload=function(){return pe(De)},De.onerror=Re,(iu($)||C)&&(De.crossOrigin="anonymous"),De.src=$,De.complete===!0&&setTimeout(function(){return pe(De)},500),se._options.imageTimeout>0&&setTimeout(function(){return Re("Timed out ("+se._options.imageTimeout+"ms) loading image")},se._options.imageTimeout)})];case 3:return[2,ge.sent()]}})})},v.prototype.has=function(h){return typeof this._cache[h]!="undefined"},v.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},v.prototype.proxy=function(h){var T=this,C=this._options.proxy;if(!C)throw new Error("No proxy defined");var K=h.substring(0,256);return new Promise(function($,se){var ge=zr.SUPPORT_RESPONSE_TYPE?"blob":"text",pe=new XMLHttpRequest;pe.onload=function(){if(pe.status===200)if(ge==="text")$(pe.response);else{var Ve=new FileReader;Ve.addEventListener("load",function(){return $(Ve.result)},!1),Ve.addEventListener("error",function(ze){return se(ze)},!1),Ve.readAsDataURL(pe.response)}else se("Failed to proxy resource "+K+" with status code "+pe.status)},pe.onerror=se;var Re=C.indexOf("?")>-1?"&":"?";if(pe.open("GET",""+C+Re+"url="+encodeURIComponent(h)+"&responseType="+ge),ge!=="text"&&pe instanceof XMLHttpRequest&&(pe.responseType=ge),T._options.imageTimeout){var De=T._options.imageTimeout;pe.timeout=De,pe.ontimeout=function(){return se("Timed out ("+De+"ms) proxying "+K)}}pe.send()})},v}(),eu=/^data:image\/svg\+xml/i,tu=/^data:image\/.*;base64,/i,ru=/^data:image\/.*/i,nu=function(v){return zr.SUPPORT_SVG_DRAWING||!au(v)},Ea=function(v){return ru.test(v)},iu=function(v){return tu.test(v)},ba=function(v){return v.substr(0,4)==="blob"},au=function(v){return v.substr(-3).toLowerCase()==="svg"||eu.test(v)},Ct=function(){function v(h,T){this.type=0,this.x=h,this.y=T}return v.prototype.add=function(h,T){return new v(this.x+h,this.y+T)},v}(),Xn=function(v,h,T){return new Ct(v.x+(h.x-v.x)*T,v.y+(h.y-v.y)*T)},Fi=function(){function v(h,T,C,K){this.type=1,this.start=h,this.startControl=T,this.endControl=C,this.end=K}return v.prototype.subdivide=function(h,T){var C=Xn(this.start,this.startControl,h),K=Xn(this.startControl,this.endControl,h),$=Xn(this.endControl,this.end,h),se=Xn(C,K,h),ge=Xn(K,$,h),pe=Xn(se,ge,h);return T?new v(this.start,C,se,pe):new v(pe,ge,$,this.end)},v.prototype.add=function(h,T){return new v(this.start.add(h,T),this.startControl.add(h,T),this.endControl.add(h,T),this.end.add(h,T))},v.prototype.reverse=function(){return new v(this.end,this.endControl,this.startControl,this.start)},v}(),on=function(v){return v.type===1},su=function(){function v(h){var T=h.styles,C=h.bounds,K=ri(T.borderTopLeftRadius,C.width,C.height),$=K[0],se=K[1],ge=ri(T.borderTopRightRadius,C.width,C.height),pe=ge[0],Re=ge[1],De=ri(T.borderBottomRightRadius,C.width,C.height),Ve=De[0],ze=De[1],xt=ri(T.borderBottomLeftRadius,C.width,C.height),ht=xt[0],Et=xt[1],Xt=[];Xt.push(($+pe)/C.width),Xt.push((ht+Ve)/C.width),Xt.push((se+Et)/C.height),Xt.push((Re+ze)/C.height);var Tt=Math.max.apply(Math,Xt);Tt>1&&($/=Tt,se/=Tt,pe/=Tt,Re/=Tt,Ve/=Tt,ze/=Tt,ht/=Tt,Et/=Tt);var Rt=C.width-pe,hr=C.height-ze,sr=C.width-Ve,mr=C.height-Et,St=T.borderTopWidth,gr=T.borderRightWidth,vr=T.borderBottomWidth,nr=T.borderLeftWidth,tn=Br(T.paddingTop,h.bounds.width),Zr=Br(T.paddingRight,h.bounds.width),nn=Br(T.paddingBottom,h.bounds.width),Gr=Br(T.paddingLeft,h.bounds.width);this.topLeftBorderDoubleOuterBox=$>0||se>0?xr(C.left+nr/3,C.top+St/3,$-nr/3,se-St/3,yr.TOP_LEFT):new Ct(C.left+nr/3,C.top+St/3),this.topRightBorderDoubleOuterBox=$>0||se>0?xr(C.left+Rt,C.top+St/3,pe-gr/3,Re-St/3,yr.TOP_RIGHT):new Ct(C.left+C.width-gr/3,C.top+St/3),this.bottomRightBorderDoubleOuterBox=Ve>0||ze>0?xr(C.left+sr,C.top+hr,Ve-gr/3,ze-vr/3,yr.BOTTOM_RIGHT):new Ct(C.left+C.width-gr/3,C.top+C.height-vr/3),this.bottomLeftBorderDoubleOuterBox=ht>0||Et>0?xr(C.left+nr/3,C.top+mr,ht-nr/3,Et-vr/3,yr.BOTTOM_LEFT):new Ct(C.left+nr/3,C.top+C.height-vr/3),this.topLeftBorderDoubleInnerBox=$>0||se>0?xr(C.left+nr*2/3,C.top+St*2/3,$-nr*2/3,se-St*2/3,yr.TOP_LEFT):new Ct(C.left+nr*2/3,C.top+St*2/3),this.topRightBorderDoubleInnerBox=$>0||se>0?xr(C.left+Rt,C.top+St*2/3,pe-gr*2/3,Re-St*2/3,yr.TOP_RIGHT):new Ct(C.left+C.width-gr*2/3,C.top+St*2/3),this.bottomRightBorderDoubleInnerBox=Ve>0||ze>0?xr(C.left+sr,C.top+hr,Ve-gr*2/3,ze-vr*2/3,yr.BOTTOM_RIGHT):new Ct(C.left+C.width-gr*2/3,C.top+C.height-vr*2/3),this.bottomLeftBorderDoubleInnerBox=ht>0||Et>0?xr(C.left+nr*2/3,C.top+mr,ht-nr*2/3,Et-vr*2/3,yr.BOTTOM_LEFT):new Ct(C.left+nr*2/3,C.top+C.height-vr*2/3),this.topLeftBorderStroke=$>0||se>0?xr(C.left+nr/2,C.top+St/2,$-nr/2,se-St/2,yr.TOP_LEFT):new Ct(C.left+nr/2,C.top+St/2),this.topRightBorderStroke=$>0||se>0?xr(C.left+Rt,C.top+St/2,pe-gr/2,Re-St/2,yr.TOP_RIGHT):new Ct(C.left+C.width-gr/2,C.top+St/2),this.bottomRightBorderStroke=Ve>0||ze>0?xr(C.left+sr,C.top+hr,Ve-gr/2,ze-vr/2,yr.BOTTOM_RIGHT):new Ct(C.left+C.width-gr/2,C.top+C.height-vr/2),this.bottomLeftBorderStroke=ht>0||Et>0?xr(C.left+nr/2,C.top+mr,ht-nr/2,Et-vr/2,yr.BOTTOM_LEFT):new Ct(C.left+nr/2,C.top+C.height-vr/2),this.topLeftBorderBox=$>0||se>0?xr(C.left,C.top,$,se,yr.TOP_LEFT):new Ct(C.left,C.top),this.topRightBorderBox=pe>0||Re>0?xr(C.left+Rt,C.top,pe,Re,yr.TOP_RIGHT):new Ct(C.left+C.width,C.top),this.bottomRightBorderBox=Ve>0||ze>0?xr(C.left+sr,C.top+hr,Ve,ze,yr.BOTTOM_RIGHT):new Ct(C.left+C.width,C.top+C.height),this.bottomLeftBorderBox=ht>0||Et>0?xr(C.left,C.top+mr,ht,Et,yr.BOTTOM_LEFT):new Ct(C.left,C.top+C.height),this.topLeftPaddingBox=$>0||se>0?xr(C.left+nr,C.top+St,Math.max(0,$-nr),Math.max(0,se-St),yr.TOP_LEFT):new Ct(C.left+nr,C.top+St),this.topRightPaddingBox=pe>0||Re>0?xr(C.left+Math.min(Rt,C.width-gr),C.top+St,Rt>C.width+gr?0:Math.max(0,pe-gr),Math.max(0,Re-St),yr.TOP_RIGHT):new Ct(C.left+C.width-gr,C.top+St),this.bottomRightPaddingBox=Ve>0||ze>0?xr(C.left+Math.min(sr,C.width-nr),C.top+Math.min(hr,C.height-vr),Math.max(0,Ve-gr),Math.max(0,ze-vr),yr.BOTTOM_RIGHT):new Ct(C.left+C.width-gr,C.top+C.height-vr),this.bottomLeftPaddingBox=ht>0||Et>0?xr(C.left+nr,C.top+Math.min(mr,C.height-vr),Math.max(0,ht-nr),Math.max(0,Et-vr),yr.BOTTOM_LEFT):new Ct(C.left+nr,C.top+C.height-vr),this.topLeftContentBox=$>0||se>0?xr(C.left+nr+Gr,C.top+St+tn,Math.max(0,$-(nr+Gr)),Math.max(0,se-(St+tn)),yr.TOP_LEFT):new Ct(C.left+nr+Gr,C.top+St+tn),this.topRightContentBox=pe>0||Re>0?xr(C.left+Math.min(Rt,C.width+nr+Gr),C.top+St+tn,Rt>C.width+nr+Gr?0:pe-nr+Gr,Re-(St+tn),yr.TOP_RIGHT):new Ct(C.left+C.width-(gr+Zr),C.top+St+tn),this.bottomRightContentBox=Ve>0||ze>0?xr(C.left+Math.min(sr,C.width-(nr+Gr)),C.top+Math.min(hr,C.height+St+tn),Math.max(0,Ve-(gr+Zr)),ze-(vr+nn),yr.BOTTOM_RIGHT):new Ct(C.left+C.width-(gr+Zr),C.top+C.height-(vr+nn)),this.bottomLeftContentBox=ht>0||Et>0?xr(C.left+nr+Gr,C.top+mr,Math.max(0,ht-(nr+Gr)),Et-(vr+nn),yr.BOTTOM_LEFT):new Ct(C.left+nr+Gr,C.top+C.height-(vr+nn))}return v}(),yr;(function(v){v[v.TOP_LEFT=0]="TOP_LEFT",v[v.TOP_RIGHT=1]="TOP_RIGHT",v[v.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",v[v.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(yr||(yr={}));var xr=function(v,h,T,C,K){var $=4*((Math.sqrt(2)-1)/3),se=T*$,ge=C*$,pe=v+T,Re=h+C;switch(K){case yr.TOP_LEFT:return new Fi(new Ct(v,Re),new Ct(v,Re-ge),new Ct(pe-se,h),new Ct(pe,h));case yr.TOP_RIGHT:return new Fi(new Ct(v,h),new Ct(v+se,h),new Ct(pe,Re-ge),new Ct(pe,Re));case yr.BOTTOM_RIGHT:return new Fi(new Ct(pe,h),new Ct(pe,h+ge),new Ct(v+se,Re),new Ct(v,Re));case yr.BOTTOM_LEFT:default:return new Fi(new Ct(pe,Re),new Ct(pe-se,Re),new Ct(v,h+ge),new Ct(v,h))}},Ni=function(v){return[v.topLeftBorderBox,v.topRightBorderBox,v.bottomRightBorderBox,v.bottomLeftBorderBox]},ou=function(v){return[v.topLeftContentBox,v.topRightContentBox,v.bottomRightContentBox,v.bottomLeftContentBox]},Pi=function(v){return[v.topLeftPaddingBox,v.topRightPaddingBox,v.bottomRightPaddingBox,v.bottomLeftPaddingBox]},Au=function(){function v(h,T,C){this.offsetX=h,this.offsetY=T,this.matrix=C,this.type=0,this.target=2|4}return v}(),Mi=function(){function v(h,T){this.path=h,this.target=T,this.type=1}return v}(),lu=function(){function v(h){this.opacity=h,this.type=2,this.target=2|4}return v}(),uu=function(v){return v.type===0},Ks=function(v){return v.type===1},cu=function(v){return v.type===2},js=function(v,h){return v.length===h.length?v.some(function(T,C){return T===h[C]}):!1},hu=function(v,h,T,C,K){return v.map(function($,se){switch(se){case 0:return $.add(h,T);case 1:return $.add(h+C,T);case 2:return $.add(h+C,T+K);case 3:return $.add(h,T+K)}return $})},Ws=function(){function v(h){this.element=h,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return v}(),Gs=function(){function v(h,T){if(this.container=h,this.parent=T,this.effects=[],this.curves=new su(this.container),this.container.styles.opacity<1&&this.effects.push(new lu(this.container.styles.opacity)),this.container.styles.transform!==null){var C=this.container.bounds.left+this.container.styles.transformOrigin[0].number,K=this.container.bounds.top+this.container.styles.transformOrigin[1].number,$=this.container.styles.transform;this.effects.push(new Au(C,K,$))}if(this.container.styles.overflowX!==0){var se=Ni(this.curves),ge=Pi(this.curves);js(se,ge)?this.effects.push(new Mi(se,2|4)):(this.effects.push(new Mi(se,2)),this.effects.push(new Mi(ge,4)))}}return v.prototype.getEffects=function(h){for(var T=[2,3].indexOf(this.container.styles.position)===-1,C=this.parent,K=this.effects.slice(0);C;){var $=C.effects.filter(function(pe){return!Ks(pe)});if(T||C.container.styles.position!==0||!C.parent){if(K.unshift.apply(K,$),T=[2,3].indexOf(C.container.styles.position)===-1,C.container.styles.overflowX!==0){var se=Ni(C.curves),ge=Pi(C.curves);js(se,ge)||K.unshift(new Mi(ge,2|4))}}else K.unshift.apply(K,$);C=C.parent}return K.filter(function(pe){return Kr(pe.target,h)})},v}(),wa=function(v,h,T,C){v.container.elements.forEach(function(K){var $=Kr(K.flags,4),se=Kr(K.flags,2),ge=new Gs(K,v);Kr(K.styles.display,2048)&&C.push(ge);var pe=Kr(K.flags,8)?[]:C;if($||se){var Re=$||K.styles.isPositioned()?T:h,De=new Ws(ge);if(K.styles.isPositioned()||K.styles.opacity<1||K.styles.isTransformed()){var Ve=K.styles.zIndex.order;if(Ve<0){var ze=0;Re.negativeZIndex.some(function(ht,Et){return Ve>ht.element.container.styles.zIndex.order?(ze=Et,!1):ze>0}),Re.negativeZIndex.splice(ze,0,De)}else if(Ve>0){var xt=0;Re.positiveZIndex.some(function(ht,Et){return Ve>=ht.element.container.styles.zIndex.order?(xt=Et+1,!1):xt>0}),Re.positiveZIndex.splice(xt,0,De)}else Re.zeroOrAutoZIndexOrTransformedOrOpacity.push(De)}else K.styles.isFloating()?Re.nonPositionedFloats.push(De):Re.nonPositionedInlineLevel.push(De);wa(ge,De,$?De:T,pe)}else K.styles.isInlineLevel()?h.inlineLevel.push(ge):h.nonInlineLevel.push(ge),wa(ge,h,T,pe);Kr(K.flags,8)&&Vs(K,pe)})},Vs=function(v,h){for(var T=v instanceof ha?v.start:1,C=v instanceof ha?v.reversed:!1,K=0;K<h.length;K++){var $=h[K];$.container instanceof ms&&typeof $.container.value=="number"&&$.container.value!==0&&(T=$.container.value),$.listValue=Ai(T,$.container.styles.listStyleType,!0),T+=C?-1:1}},du=function(v){var h=new Gs(v,null),T=new Ws(h),C=[];return wa(h,T,T,C),Vs(h.container,C),T},zs=function(v,h){switch(h){case 0:return An(v.topLeftBorderBox,v.topLeftPaddingBox,v.topRightBorderBox,v.topRightPaddingBox);case 1:return An(v.topRightBorderBox,v.topRightPaddingBox,v.bottomRightBorderBox,v.bottomRightPaddingBox);case 2:return An(v.bottomRightBorderBox,v.bottomRightPaddingBox,v.bottomLeftBorderBox,v.bottomLeftPaddingBox);case 3:default:return An(v.bottomLeftBorderBox,v.bottomLeftPaddingBox,v.topLeftBorderBox,v.topLeftPaddingBox)}},fu=function(v,h){switch(h){case 0:return An(v.topLeftBorderBox,v.topLeftBorderDoubleOuterBox,v.topRightBorderBox,v.topRightBorderDoubleOuterBox);case 1:return An(v.topRightBorderBox,v.topRightBorderDoubleOuterBox,v.bottomRightBorderBox,v.bottomRightBorderDoubleOuterBox);case 2:return An(v.bottomRightBorderBox,v.bottomRightBorderDoubleOuterBox,v.bottomLeftBorderBox,v.bottomLeftBorderDoubleOuterBox);case 3:default:return An(v.bottomLeftBorderBox,v.bottomLeftBorderDoubleOuterBox,v.topLeftBorderBox,v.topLeftBorderDoubleOuterBox)}},pu=function(v,h){switch(h){case 0:return An(v.topLeftBorderDoubleInnerBox,v.topLeftPaddingBox,v.topRightBorderDoubleInnerBox,v.topRightPaddingBox);case 1:return An(v.topRightBorderDoubleInnerBox,v.topRightPaddingBox,v.bottomRightBorderDoubleInnerBox,v.bottomRightPaddingBox);case 2:return An(v.bottomRightBorderDoubleInnerBox,v.bottomRightPaddingBox,v.bottomLeftBorderDoubleInnerBox,v.bottomLeftPaddingBox);case 3:default:return An(v.bottomLeftBorderDoubleInnerBox,v.bottomLeftPaddingBox,v.topLeftBorderDoubleInnerBox,v.topLeftPaddingBox)}},gu=function(v,h){switch(h){case 0:return ki(v.topLeftBorderStroke,v.topRightBorderStroke);case 1:return ki(v.topRightBorderStroke,v.bottomRightBorderStroke);case 2:return ki(v.bottomRightBorderStroke,v.bottomLeftBorderStroke);case 3:default:return ki(v.bottomLeftBorderStroke,v.topLeftBorderStroke)}},ki=function(v,h){var T=[];return on(v)?T.push(v.subdivide(.5,!1)):T.push(v),on(h)?T.push(h.subdivide(.5,!0)):T.push(h),T},An=function(v,h,T,C){var K=[];return on(v)?K.push(v.subdivide(.5,!1)):K.push(v),on(T)?K.push(T.subdivide(.5,!0)):K.push(T),on(C)?K.push(C.subdivide(.5,!0).reverse()):K.push(C),on(h)?K.push(h.subdivide(.5,!1).reverse()):K.push(h),K},Xs=function(v){var h=v.bounds,T=v.styles;return h.add(T.borderLeftWidth,T.borderTopWidth,-(T.borderRightWidth+T.borderLeftWidth),-(T.borderTopWidth+T.borderBottomWidth))},Hi=function(v){var h=v.styles,T=v.bounds,C=Br(h.paddingLeft,T.width),K=Br(h.paddingRight,T.width),$=Br(h.paddingTop,T.width),se=Br(h.paddingBottom,T.width);return T.add(C+h.borderLeftWidth,$+h.borderTopWidth,-(h.borderRightWidth+h.borderLeftWidth+C+K),-(h.borderTopWidth+h.borderBottomWidth+$+se))},mu=function(v,h){return v===0?h.bounds:v===2?Hi(h):Xs(h)},vu=function(v,h){return v===0?h.bounds:v===2?Hi(h):Xs(h)},Ca=function(v,h,T){var C=mu(Jn(v.styles.backgroundOrigin,h),v),K=vu(Jn(v.styles.backgroundClip,h),v),$=yu(Jn(v.styles.backgroundSize,h),T,C),se=$[0],ge=$[1],pe=ri(Jn(v.styles.backgroundPosition,h),C.width-se,C.height-ge),Re=_u(Jn(v.styles.backgroundRepeat,h),pe,$,C,K),De=Math.round(C.left+pe[0]),Ve=Math.round(C.top+pe[1]);return[Re,De,Ve,se,ge]},Yn=function(v){return wr(v)&&v.value===Wn.AUTO},Qi=function(v){return typeof v=="number"},yu=function(v,h,T){var C=h[0],K=h[1],$=h[2],se=v[0],ge=v[1];if(!se)return[0,0];if(Mr(se)&&ge&&Mr(ge))return[Br(se,T.width),Br(ge,T.height)];var pe=Qi($);if(wr(se)&&(se.value===Wn.CONTAIN||se.value===Wn.COVER)){if(Qi($)){var Re=T.width/T.height;return Re<$!==(se.value===Wn.COVER)?[T.width,T.width/$]:[T.height*$,T.height]}return[T.width,T.height]}var De=Qi(C),Ve=Qi(K),ze=De||Ve;if(Yn(se)&&(!ge||Yn(ge))){if(De&&Ve)return[C,K];if(!pe&&!ze)return[T.width,T.height];if(ze&&pe){var xt=De?C:K*$,ht=Ve?K:C/$;return[xt,ht]}var Et=De?C:T.width,Xt=Ve?K:T.height;return[Et,Xt]}if(pe){var Tt=0,Rt=0;return Mr(se)?Tt=Br(se,T.width):Mr(ge)&&(Rt=Br(ge,T.height)),Yn(se)?Tt=Rt*$:(!ge||Yn(ge))&&(Rt=Tt/$),[Tt,Rt]}var hr=null,sr=null;if(Mr(se)?hr=Br(se,T.width):ge&&Mr(ge)&&(sr=Br(ge,T.height)),hr!==null&&(!ge||Yn(ge))&&(sr=De&&Ve?hr/C*K:T.height),sr!==null&&Yn(se)&&(hr=De&&Ve?sr/K*C:T.width),hr!==null&&sr!==null)return[hr,sr];throw new Error("Unable to calculate background-size for element")},Jn=function(v,h){var T=v[h];return typeof T=="undefined"?v[0]:T},_u=function(v,h,T,C,K){var $=h[0],se=h[1],ge=T[0],pe=T[1];switch(v){case 2:return[new Ct(Math.round(C.left),Math.round(C.top+se)),new Ct(Math.round(C.left+C.width),Math.round(C.top+se)),new Ct(Math.round(C.left+C.width),Math.round(pe+C.top+se)),new Ct(Math.round(C.left),Math.round(pe+C.top+se))];case 3:return[new Ct(Math.round(C.left+$),Math.round(C.top)),new Ct(Math.round(C.left+$+ge),Math.round(C.top)),new Ct(Math.round(C.left+$+ge),Math.round(C.height+C.top)),new Ct(Math.round(C.left+$),Math.round(C.height+C.top))];case 1:return[new Ct(Math.round(C.left+$),Math.round(C.top+se)),new Ct(Math.round(C.left+$+ge),Math.round(C.top+se)),new Ct(Math.round(C.left+$+ge),Math.round(C.top+se+pe)),new Ct(Math.round(C.left+$),Math.round(C.top+se+pe))];default:return[new Ct(Math.round(K.left),Math.round(K.top)),new Ct(Math.round(K.left+K.width),Math.round(K.top)),new Ct(Math.round(K.left+K.width),Math.round(K.height+K.top)),new Ct(Math.round(K.left),Math.round(K.height+K.top))]}},Eu="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Ys="Hidden Text",bu=function(){function v(h){this._data={},this._document=h}return v.prototype.parseMetrics=function(h,T){var C=this._document.createElement("div"),K=this._document.createElement("img"),$=this._document.createElement("span"),se=this._document.body;C.style.visibility="hidden",C.style.fontFamily=h,C.style.fontSize=T,C.style.margin="0",C.style.padding="0",C.style.whiteSpace="nowrap",se.appendChild(C),K.src=Eu,K.width=1,K.height=1,K.style.margin="0",K.style.padding="0",K.style.verticalAlign="baseline",$.style.fontFamily=h,$.style.fontSize=T,$.style.margin="0",$.style.padding="0",$.appendChild(this._document.createTextNode(Ys)),C.appendChild($),C.appendChild(K);var ge=K.offsetTop-$.offsetTop+2;C.removeChild($),C.appendChild(this._document.createTextNode(Ys)),C.style.lineHeight="normal",K.style.verticalAlign="super";var pe=K.offsetTop-C.offsetTop+2;return se.removeChild(C),{baseline:ge,middle:pe}},v.prototype.getMetrics=function(h,T){var C=h+" "+T;return typeof this._data[C]=="undefined"&&(this._data[C]=this.parseMetrics(h,T)),this._data[C]},v}(),Js=function(){function v(h,T){this.context=h,this.options=T}return v}(),wu=1e4,Cu=function(v){V(h,v);function h(T,C){var K=v.call(this,T,C)||this;return K._activeEffects=[],K.canvas=C.canvas?C.canvas:document.createElement("canvas"),K.ctx=K.canvas.getContext("2d"),C.canvas||(K.canvas.width=Math.floor(C.width*C.scale),K.canvas.height=Math.floor(C.height*C.scale),K.canvas.style.width=C.width+"px",K.canvas.style.height=C.height+"px"),K.fontMetrics=new bu(document),K.ctx.scale(K.options.scale,K.options.scale),K.ctx.translate(-C.x,-C.y),K.ctx.textBaseline="bottom",K._activeEffects=[],K.context.logger.debug("Canvas renderer initialized ("+C.width+"x"+C.height+") with scale "+C.scale),K}return h.prototype.applyEffects=function(T){for(var C=this;this._activeEffects.length;)this.popEffect();T.forEach(function(K){return C.applyEffect(K)})},h.prototype.applyEffect=function(T){this.ctx.save(),cu(T)&&(this.ctx.globalAlpha=T.opacity),uu(T)&&(this.ctx.translate(T.offsetX,T.offsetY),this.ctx.transform(T.matrix[0],T.matrix[1],T.matrix[2],T.matrix[3],T.matrix[4],T.matrix[5]),this.ctx.translate(-T.offsetX,-T.offsetY)),Ks(T)&&(this.path(T.path),this.ctx.clip()),this._activeEffects.push(T)},h.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},h.prototype.renderStack=function(T){return z(this,void 0,void 0,function(){var C;return D(this,function(K){switch(K.label){case 0:return C=T.element.container.styles,C.isVisible()?[4,this.renderStackContent(T)]:[3,2];case 1:K.sent(),K.label=2;case 2:return[2]}})})},h.prototype.renderNode=function(T){return z(this,void 0,void 0,function(){return D(this,function(C){switch(C.label){case 0:if(Kr(T.container.flags,16))debugger;return T.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(T)]:[3,3];case 1:return C.sent(),[4,this.renderNodeContent(T)];case 2:C.sent(),C.label=3;case 3:return[2]}})})},h.prototype.renderTextWithLetterSpacing=function(T,C,K){var $=this;if(C===0)this.ctx.fillText(T.text,T.bounds.left,T.bounds.top+K);else{var se=ca(T.text);se.reduce(function(ge,pe){return $.ctx.fillText(pe,ge,T.bounds.top+K),ge+$.ctx.measureText(pe).width},T.bounds.left)}},h.prototype.createFontStyle=function(T){var C=T.fontVariant.filter(function(se){return se==="normal"||se==="small-caps"}).join(""),K=Iu(T.fontFamily).join(", "),$=ti(T.fontSize)?""+T.fontSize.number+T.fontSize.unit:T.fontSize.number+"px";return[[T.fontStyle,C,T.fontWeight,$,K].join(" "),K,$]},h.prototype.renderTextNode=function(T,C){return z(this,void 0,void 0,function(){var K,$,se,ge,pe,Re,De,Ve,ze=this;return D(this,function(xt){return K=this.createFontStyle(C),$=K[0],se=K[1],ge=K[2],this.ctx.font=$,this.ctx.direction=C.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",pe=this.fontMetrics.getMetrics(se,ge),Re=pe.baseline,De=pe.middle,Ve=C.paintOrder,T.textBounds.forEach(function(ht){Ve.forEach(function(Et){switch(Et){case 0:ze.ctx.fillStyle=Wr(C.color),ze.renderTextWithLetterSpacing(ht,C.letterSpacing,Re);var Xt=C.textShadow;Xt.length&&ht.text.trim().length&&(Xt.slice(0).reverse().forEach(function(Tt){ze.ctx.shadowColor=Wr(Tt.color),ze.ctx.shadowOffsetX=Tt.offsetX.number*ze.options.scale,ze.ctx.shadowOffsetY=Tt.offsetY.number*ze.options.scale,ze.ctx.shadowBlur=Tt.blur.number,ze.renderTextWithLetterSpacing(ht,C.letterSpacing,Re)}),ze.ctx.shadowColor="",ze.ctx.shadowOffsetX=0,ze.ctx.shadowOffsetY=0,ze.ctx.shadowBlur=0),C.textDecorationLine.length&&(ze.ctx.fillStyle=Wr(C.textDecorationColor||C.color),C.textDecorationLine.forEach(function(Tt){switch(Tt){case 1:ze.ctx.fillRect(ht.bounds.left,Math.round(ht.bounds.top+Re),ht.bounds.width,1);break;case 2:ze.ctx.fillRect(ht.bounds.left,Math.round(ht.bounds.top),ht.bounds.width,1);break;case 3:ze.ctx.fillRect(ht.bounds.left,Math.ceil(ht.bounds.top+De),ht.bounds.width,1);break}}));break;case 1:C.webkitTextStrokeWidth&&ht.text.trim().length&&(ze.ctx.strokeStyle=Wr(C.webkitTextStrokeColor),ze.ctx.lineWidth=C.webkitTextStrokeWidth,ze.ctx.lineJoin=window.chrome?"miter":"round",ze.ctx.strokeText(ht.text,ht.bounds.left,ht.bounds.top+Re)),ze.ctx.strokeStyle="",ze.ctx.lineWidth=0,ze.ctx.lineJoin="miter";break}})}),[2]})})},h.prototype.renderReplacedElement=function(T,C,K){if(K&&T.intrinsicWidth>0&&T.intrinsicHeight>0){var $=Hi(T),se=Pi(C);this.path(se),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(K,0,0,T.intrinsicWidth,T.intrinsicHeight,$.left,$.top,$.width,$.height),this.ctx.restore()}},h.prototype.renderNodeContent=function(T){return z(this,void 0,void 0,function(){var C,K,$,se,ge,pe,Re,Re,De,Ve,ze,xt,ht,Et,Xt,Tt,Rt,hr,sr,Re,mr,ht,Tt;return D(this,function(St){switch(St.label){case 0:this.applyEffects(T.getEffects(4)),C=T.container,K=T.curves,$=C.styles,se=0,ge=C.textNodes,St.label=1;case 1:return se<ge.length?(pe=ge[se],[4,this.renderTextNode(pe,$)]):[3,4];case 2:St.sent(),St.label=3;case 3:return se++,[3,1];case 4:if(!(C instanceof fs))return[3,8];St.label=5;case 5:return St.trys.push([5,7,,8]),[4,this.context.cache.match(C.src)];case 6:return Re=St.sent(),this.renderReplacedElement(C,K,Re),[3,8];case 7:return St.sent(),this.context.logger.error("Error loading image "+C.src),[3,8];case 8:if(C instanceof ps&&this.renderReplacedElement(C,K,C.canvas),!(C instanceof gs))return[3,12];St.label=9;case 9:return St.trys.push([9,11,,12]),[4,this.context.cache.match(C.svg)];case 10:return Re=St.sent(),this.renderReplacedElement(C,K,Re),[3,12];case 11:return St.sent(),this.context.logger.error("Error loading svg "+C.svg.substring(0,255)),[3,12];case 12:return C instanceof Es&&C.tree?(De=new h(this.context,{scale:this.options.scale,backgroundColor:C.backgroundColor,x:0,y:0,width:C.width,height:C.height}),[4,De.render(C.tree)]):[3,14];case 13:Ve=St.sent(),C.width&&C.height&&this.ctx.drawImage(Ve,0,0,C.width,C.height,C.bounds.left,C.bounds.top,C.bounds.width,C.bounds.height),St.label=14;case 14:if(C instanceof da&&(ze=Math.min(C.bounds.width,C.bounds.height),C.type===Ii?C.checked&&(this.ctx.save(),this.path([new Ct(C.bounds.left+ze*.39363,C.bounds.top+ze*.79),new Ct(C.bounds.left+ze*.16,C.bounds.top+ze*.5549),new Ct(C.bounds.left+ze*.27347,C.bounds.top+ze*.44071),new Ct(C.bounds.left+ze*.39694,C.bounds.top+ze*.5649),new Ct(C.bounds.left+ze*.72983,C.bounds.top+ze*.23),new Ct(C.bounds.left+ze*.84,C.bounds.top+ze*.34085),new Ct(C.bounds.left+ze*.39363,C.bounds.top+ze*.79)]),this.ctx.fillStyle=Wr(vs),this.ctx.fill(),this.ctx.restore()):C.type===Ri&&(C.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(C.bounds.left+ze/2,C.bounds.top+ze/2,ze/4,0,Math.PI*2,!0),this.ctx.fillStyle=Wr(vs),this.ctx.fill(),this.ctx.restore()))),Tu(C)&&C.value.length){xt=this.createFontStyle($),ht=xt[0],Et=xt[1],Xt=this.fontMetrics.getMetrics(ht,Et).baseline,this.ctx.font=ht,this.ctx.fillStyle=Wr($.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=xu(C.styles.textAlign),Tt=Hi(C),Rt=0;switch(C.styles.textAlign){case 1:Rt+=Tt.width/2;break;case 2:Rt+=Tt.width;break}hr=Tt.add(Rt,0,0,-Tt.height/2+1),this.ctx.save(),this.path([new Ct(Tt.left,Tt.top),new Ct(Tt.left+Tt.width,Tt.top),new Ct(Tt.left+Tt.width,Tt.top+Tt.height),new Ct(Tt.left,Tt.top+Tt.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new si(C.value,hr),$.letterSpacing,Xt),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Kr(C.styles.display,2048))return[3,20];if(!(C.styles.listStyleImage!==null))return[3,19];if(sr=C.styles.listStyleImage,!(sr.type===0))return[3,18];Re=void 0,mr=sr.url,St.label=15;case 15:return St.trys.push([15,17,,18]),[4,this.context.cache.match(mr)];case 16:return Re=St.sent(),this.ctx.drawImage(Re,C.bounds.left-(Re.width+10),C.bounds.top),[3,18];case 17:return St.sent(),this.context.logger.error("Error loading list-style-image "+mr),[3,18];case 18:return[3,20];case 19:T.listValue&&C.styles.listStyleType!==-1&&(ht=this.createFontStyle($)[0],this.ctx.font=ht,this.ctx.fillStyle=Wr($.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",Tt=new G(C.bounds.left,C.bounds.top+Br(C.styles.paddingTop,C.bounds.width),C.bounds.width,Ya($.lineHeight,$.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new si(T.listValue,Tt),$.letterSpacing,Ya($.lineHeight,$.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),St.label=20;case 20:return[2]}})})},h.prototype.renderStackContent=function(T){return z(this,void 0,void 0,function(){var C,K,$,se,ge,$,pe,Re,$,De,Ve,$,ze,xt,$,ht,Et,$,Xt,Tt,$;return D(this,function(Rt){switch(Rt.label){case 0:if(Kr(T.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(T.element)];case 1:Rt.sent(),C=0,K=T.negativeZIndex,Rt.label=2;case 2:return C<K.length?($=K[C],[4,this.renderStack($)]):[3,5];case 3:Rt.sent(),Rt.label=4;case 4:return C++,[3,2];case 5:return[4,this.renderNodeContent(T.element)];case 6:Rt.sent(),se=0,ge=T.nonInlineLevel,Rt.label=7;case 7:return se<ge.length?($=ge[se],[4,this.renderNode($)]):[3,10];case 8:Rt.sent(),Rt.label=9;case 9:return se++,[3,7];case 10:pe=0,Re=T.nonPositionedFloats,Rt.label=11;case 11:return pe<Re.length?($=Re[pe],[4,this.renderStack($)]):[3,14];case 12:Rt.sent(),Rt.label=13;case 13:return pe++,[3,11];case 14:De=0,Ve=T.nonPositionedInlineLevel,Rt.label=15;case 15:return De<Ve.length?($=Ve[De],[4,this.renderStack($)]):[3,18];case 16:Rt.sent(),Rt.label=17;case 17:return De++,[3,15];case 18:ze=0,xt=T.inlineLevel,Rt.label=19;case 19:return ze<xt.length?($=xt[ze],[4,this.renderNode($)]):[3,22];case 20:Rt.sent(),Rt.label=21;case 21:return ze++,[3,19];case 22:ht=0,Et=T.zeroOrAutoZIndexOrTransformedOrOpacity,Rt.label=23;case 23:return ht<Et.length?($=Et[ht],[4,this.renderStack($)]):[3,26];case 24:Rt.sent(),Rt.label=25;case 25:return ht++,[3,23];case 26:Xt=0,Tt=T.positiveZIndex,Rt.label=27;case 27:return Xt<Tt.length?($=Tt[Xt],[4,this.renderStack($)]):[3,30];case 28:Rt.sent(),Rt.label=29;case 29:return Xt++,[3,27];case 30:return[2]}})})},h.prototype.mask=function(T){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(T.slice(0).reverse()),this.ctx.closePath()},h.prototype.path=function(T){this.ctx.beginPath(),this.formatPath(T),this.ctx.closePath()},h.prototype.formatPath=function(T){var C=this;T.forEach(function(K,$){var se=on(K)?K.start:K;$===0?C.ctx.moveTo(se.x,se.y):C.ctx.lineTo(se.x,se.y),on(K)&&C.ctx.bezierCurveTo(K.startControl.x,K.startControl.y,K.endControl.x,K.endControl.y,K.end.x,K.end.y)})},h.prototype.renderRepeat=function(T,C,K,$){this.path(T),this.ctx.fillStyle=C,this.ctx.translate(K,$),this.ctx.fill(),this.ctx.translate(-K,-$)},h.prototype.resizeImage=function(T,C,K){var $;if(T.width===C&&T.height===K)return T;var se=($=this.canvas.ownerDocument)!==null&&$!==void 0?$:document,ge=se.createElement("canvas");ge.width=Math.max(1,C),ge.height=Math.max(1,K);var pe=ge.getContext("2d");return pe.drawImage(T,0,0,T.width,T.height,0,0,C,K),ge},h.prototype.renderBackgroundImage=function(T){return z(this,void 0,void 0,function(){var C,K,$,se,ge,pe;return D(this,function(Re){switch(Re.label){case 0:C=T.styles.backgroundImage.length-1,K=function(De){var Ve,ze,xt,ht,Et,Xt,Tt,Rt,hr,sr,ht,Et,Xt,Tt,Rt,mr,St,gr,vr,nr,tn,Zr,nn,Gr,hr,fn,ht,Rn,On,Tt,Rt,Ln,Et,Xt,Pn,pn,Un,Mn,kn,_n,Hn,En;return D(this,function($n){switch($n.label){case 0:if(!(De.type===0))return[3,5];Ve=void 0,ze=De.url,$n.label=1;case 1:return $n.trys.push([1,3,,4]),[4,$.context.cache.match(ze)];case 2:return Ve=$n.sent(),[3,4];case 3:return $n.sent(),$.context.logger.error("Error loading background-image "+ze),[3,4];case 4:return Ve&&(xt=Ca(T,C,[Ve.width,Ve.height,Ve.width/Ve.height]),ht=xt[0],Et=xt[1],Xt=xt[2],Tt=xt[3],Rt=xt[4],hr=$.ctx.createPattern($.resizeImage(Ve,Tt,Rt),"repeat"),$.renderRepeat(ht,hr,Et,Xt)),[3,6];case 5:lo(De)?(sr=Ca(T,C,[null,null,null]),ht=sr[0],Et=sr[1],Xt=sr[2],Tt=sr[3],Rt=sr[4],mr=io(De.angle,Tt,Rt),St=mr[0],gr=mr[1],vr=mr[2],nr=mr[3],tn=mr[4],Zr=document.createElement("canvas"),Zr.width=Tt,Zr.height=Rt,nn=Zr.getContext("2d"),Gr=nn.createLinearGradient(gr,nr,vr,tn),Ma(De.stops,St).forEach(function(ui){return Gr.addColorStop(ui.stop,Wr(ui.color))}),nn.fillStyle=Gr,nn.fillRect(0,0,Tt,Rt),Tt>0&&Rt>0&&(hr=$.ctx.createPattern(Zr,"repeat"),$.renderRepeat(ht,hr,Et,Xt))):uo(De)&&(fn=Ca(T,C,[null,null,null]),ht=fn[0],Rn=fn[1],On=fn[2],Tt=fn[3],Rt=fn[4],Ln=De.position.length===0?[Ji]:De.position,Et=Br(Ln[0],Tt),Xt=Br(Ln[Ln.length-1],Rt),Pn=ao(De,Et,Xt,Tt,Rt),pn=Pn[0],Un=Pn[1],pn>0&&Un>0&&(Mn=$.ctx.createRadialGradient(Rn+Et,On+Xt,0,Rn+Et,On+Xt,pn),Ma(De.stops,pn*2).forEach(function(ui){return Mn.addColorStop(ui.stop,Wr(ui.color))}),$.path(ht),$.ctx.fillStyle=Mn,pn!==Un?(kn=T.bounds.left+.5*T.bounds.width,_n=T.bounds.top+.5*T.bounds.height,Hn=Un/pn,En=1/Hn,$.ctx.save(),$.ctx.translate(kn,_n),$.ctx.transform(1,0,0,Hn,0,0),$.ctx.translate(-kn,-_n),$.ctx.fillRect(Rn,En*(On-_n)+_n,Tt,Rt*En),$.ctx.restore()):$.ctx.fill())),$n.label=6;case 6:return C--,[2]}})},$=this,se=0,ge=T.styles.backgroundImage.slice(0).reverse(),Re.label=1;case 1:return se<ge.length?(pe=ge[se],[5,K(pe)]):[3,4];case 2:Re.sent(),Re.label=3;case 3:return se++,[3,1];case 4:return[2]}})})},h.prototype.renderSolidBorder=function(T,C,K){return z(this,void 0,void 0,function(){return D(this,function($){return this.path(zs(K,C)),this.ctx.fillStyle=Wr(T),this.ctx.fill(),[2]})})},h.prototype.renderDoubleBorder=function(T,C,K,$){return z(this,void 0,void 0,function(){var se,ge;return D(this,function(pe){switch(pe.label){case 0:return C<3?[4,this.renderSolidBorder(T,K,$)]:[3,2];case 1:return pe.sent(),[2];case 2:return se=fu($,K),this.path(se),this.ctx.fillStyle=Wr(T),this.ctx.fill(),ge=pu($,K),this.path(ge),this.ctx.fill(),[2]}})})},h.prototype.renderNodeBackgroundAndBorders=function(T){return z(this,void 0,void 0,function(){var C,K,$,se,ge,pe,Re,De,Ve=this;return D(this,function(ze){switch(ze.label){case 0:return this.applyEffects(T.getEffects(2)),C=T.container.styles,K=!Bn(C.backgroundColor)||C.backgroundImage.length,$=[{style:C.borderTopStyle,color:C.borderTopColor,width:C.borderTopWidth},{style:C.borderRightStyle,color:C.borderRightColor,width:C.borderRightWidth},{style:C.borderBottomStyle,color:C.borderBottomColor,width:C.borderBottomWidth},{style:C.borderLeftStyle,color:C.borderLeftColor,width:C.borderLeftWidth}],se=Bu(Jn(C.backgroundClip,0),T.curves),K||C.boxShadow.length?(this.ctx.save(),this.path(se),this.ctx.clip(),Bn(C.backgroundColor)||(this.ctx.fillStyle=Wr(C.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(T.container)]):[3,2];case 1:ze.sent(),this.ctx.restore(),C.boxShadow.slice(0).reverse().forEach(function(xt){Ve.ctx.save();var ht=Ni(T.curves),Et=xt.inset?0:wu,Xt=hu(ht,-Et+(xt.inset?1:-1)*xt.spread.number,(xt.inset?1:-1)*xt.spread.number,xt.spread.number*(xt.inset?-2:2),xt.spread.number*(xt.inset?-2:2));xt.inset?(Ve.path(ht),Ve.ctx.clip(),Ve.mask(Xt)):(Ve.mask(ht),Ve.ctx.clip(),Ve.path(Xt)),Ve.ctx.shadowOffsetX=xt.offsetX.number+Et,Ve.ctx.shadowOffsetY=xt.offsetY.number,Ve.ctx.shadowColor=Wr(xt.color),Ve.ctx.shadowBlur=xt.blur.number,Ve.ctx.fillStyle=xt.inset?Wr(xt.color):"rgba(0,0,0,1)",Ve.ctx.fill(),Ve.ctx.restore()}),ze.label=2;case 2:ge=0,pe=0,Re=$,ze.label=3;case 3:return pe<Re.length?(De=Re[pe],De.style!==0&&!Bn(De.color)&&De.width>0?De.style===2?[4,this.renderDashedDottedBorder(De.color,De.width,ge,T.curves,2)]:[3,5]:[3,11]):[3,13];case 4:return ze.sent(),[3,11];case 5:return De.style===3?[4,this.renderDashedDottedBorder(De.color,De.width,ge,T.curves,3)]:[3,7];case 6:return ze.sent(),[3,11];case 7:return De.style===4?[4,this.renderDoubleBorder(De.color,De.width,ge,T.curves)]:[3,9];case 8:return ze.sent(),[3,11];case 9:return[4,this.renderSolidBorder(De.color,ge,T.curves)];case 10:ze.sent(),ze.label=11;case 11:ge++,ze.label=12;case 12:return pe++,[3,3];case 13:return[2]}})})},h.prototype.renderDashedDottedBorder=function(T,C,K,$,se){return z(this,void 0,void 0,function(){var ge,pe,Re,De,Ve,ze,xt,ht,Et,Xt,Tt,Rt,hr,sr,mr,St,mr,St;return D(this,function(gr){return this.ctx.save(),ge=gu($,K),pe=zs($,K),se===2&&(this.path(pe),this.ctx.clip()),on(pe[0])?(Re=pe[0].start.x,De=pe[0].start.y):(Re=pe[0].x,De=pe[0].y),on(pe[1])?(Ve=pe[1].end.x,ze=pe[1].end.y):(Ve=pe[1].x,ze=pe[1].y),K===0||K===2?xt=Math.abs(Re-Ve):xt=Math.abs(De-ze),this.ctx.beginPath(),se===3?this.formatPath(ge):this.formatPath(pe.slice(0,2)),ht=C<3?C*3:C*2,Et=C<3?C*2:C,se===3&&(ht=C,Et=C),Xt=!0,xt<=ht*2?Xt=!1:xt<=ht*2+Et?(Tt=xt/(2*ht+Et),ht*=Tt,Et*=Tt):(Rt=Math.floor((xt+Et)/(ht+Et)),hr=(xt-Rt*ht)/(Rt-1),sr=(xt-(Rt+1)*ht)/Rt,Et=sr<=0||Math.abs(Et-hr)<Math.abs(Et-sr)?hr:sr),Xt&&(se===3?this.ctx.setLineDash([0,ht+Et]):this.ctx.setLineDash([ht,Et])),se===3?(this.ctx.lineCap="round",this.ctx.lineWidth=C):this.ctx.lineWidth=C*2+1.1,this.ctx.strokeStyle=Wr(T),this.ctx.stroke(),this.ctx.setLineDash([]),se===2&&(on(pe[0])&&(mr=pe[3],St=pe[0],this.ctx.beginPath(),this.formatPath([new Ct(mr.end.x,mr.end.y),new Ct(St.start.x,St.start.y)]),this.ctx.stroke()),on(pe[1])&&(mr=pe[1],St=pe[2],this.ctx.beginPath(),this.formatPath([new Ct(mr.end.x,mr.end.y),new Ct(St.start.x,St.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},h.prototype.render=function(T){return z(this,void 0,void 0,function(){var C;return D(this,function(K){switch(K.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Wr(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),C=du(T),[4,this.renderStack(C)];case 1:return K.sent(),this.applyEffects([]),[2,this.canvas]}})})},h}(Js),Tu=function(v){return v instanceof _s||v instanceof ys?!0:v instanceof da&&v.type!==Ri&&v.type!==Ii},Bu=function(v,h){switch(v){case 0:return Ni(h);case 2:return ou(h);case 1:default:return Pi(h)}},xu=function(v){switch(v){case 1:return"center";case 2:return"right";case 0:default:return"left"}},Su=["-apple-system","system-ui"],Iu=function(v){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?v.filter(function(h){return Su.indexOf(h)===-1}):v},Ru=function(v){V(h,v);function h(T,C){var K=v.call(this,T,C)||this;return K.canvas=C.canvas?C.canvas:document.createElement("canvas"),K.ctx=K.canvas.getContext("2d"),K.options=C,K.canvas.width=Math.floor(C.width*C.scale),K.canvas.height=Math.floor(C.height*C.scale),K.canvas.style.width=C.width+"px",K.canvas.style.height=C.height+"px",K.ctx.scale(K.options.scale,K.options.scale),K.ctx.translate(-C.x,-C.y),K.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+C.width+"x"+C.height+" at "+C.x+","+C.y+") with scale "+C.scale),K}return h.prototype.render=function(T){return z(this,void 0,void 0,function(){var C,K;return D(this,function($){switch($.label){case 0:return C=ua(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,T),[4,Ou(C)];case 1:return K=$.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Wr(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(K,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},h}(Js),Ou=function(v){return new Promise(function(h,T){var C=new Image;C.onload=function(){h(C)},C.onerror=T,C.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(v))})},Lu=function(){function v(h){var T=h.id,C=h.enabled;this.id=T,this.enabled=C,this.start=Date.now()}return v.prototype.debug=function(){for(var h=[],T=0;T<arguments.length;T++)h[T]=arguments[T];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,I([this.id,this.getTime()+"ms"],h)):this.info.apply(this,h))},v.prototype.getTime=function(){return Date.now()-this.start},v.prototype.info=function(){for(var h=[],T=0;T<arguments.length;T++)h[T]=arguments[T];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,I([this.id,this.getTime()+"ms"],h)))},v.prototype.warn=function(){for(var h=[],T=0;T<arguments.length;T++)h[T]=arguments[T];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,I([this.id,this.getTime()+"ms"],h)):this.info.apply(this,h))},v.prototype.error=function(){for(var h=[],T=0;T<arguments.length;T++)h[T]=arguments[T];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,I([this.id,this.getTime()+"ms"],h)):this.info.apply(this,h))},v.instances={},v}(),Uu=function(){function v(h,T){var C;this.windowBounds=T,this.instanceName="#"+v.instanceCount++,this.logger=new Lu({id:this.instanceName,enabled:h.logging}),this.cache=(C=h.cache)!==null&&C!==void 0?C:new ql(this,h)}return v.instanceCount=1,v}(),Du=function(v,h){return h===void 0&&(h={}),Fu(v,h)};typeof window!="undefined"&&Qs.setContext(window);var Fu=function(v,h){return z(void 0,void 0,void 0,function(){var T,C,K,$,se,ge,pe,Re,De,Ve,ze,xt,ht,Et,Xt,Tt,Rt,hr,sr,mr,St,gr,St,vr,nr,tn,Zr,nn,Gr,fn,Rn,On,Ln,Pn,pn,Un,Mn,kn,_n,Hn;return D(this,function(En){switch(En.label){case 0:if(!v||typeof v!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(T=v.ownerDocument,!T)throw new Error("Element is not attached to a Document");if(C=T.defaultView,!C)throw new Error("Document is not attached to a Window");return K={allowTaint:(vr=h.allowTaint)!==null&&vr!==void 0?vr:!1,imageTimeout:(nr=h.imageTimeout)!==null&&nr!==void 0?nr:15e3,proxy:h.proxy,useCORS:(tn=h.useCORS)!==null&&tn!==void 0?tn:!1},$=O({logging:(Zr=h.logging)!==null&&Zr!==void 0?Zr:!0,cache:h.cache},K),se={windowWidth:(nn=h.windowWidth)!==null&&nn!==void 0?nn:C.innerWidth,windowHeight:(Gr=h.windowHeight)!==null&&Gr!==void 0?Gr:C.innerHeight,scrollX:(fn=h.scrollX)!==null&&fn!==void 0?fn:C.pageXOffset,scrollY:(Rn=h.scrollY)!==null&&Rn!==void 0?Rn:C.pageYOffset},ge=new G(se.scrollX,se.scrollY,se.windowWidth,se.windowHeight),pe=new Uu($,ge),Re=(On=h.foreignObjectRendering)!==null&&On!==void 0?On:!1,De={allowTaint:(Ln=h.allowTaint)!==null&&Ln!==void 0?Ln:!1,onclone:h.onclone,ignoreElements:h.ignoreElements,inlineImages:Re,copyStyles:Re},pe.logger.debug("Starting document clone with size "+ge.width+"x"+ge.height+" scrolled to "+-ge.left+","+-ge.top),Ve=new ks(pe,v,De),ze=Ve.clonedReferenceElement,ze?[4,Ve.toIFrame(T,ge)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return xt=En.sent(),ht=pa(ze)||Nl(ze)?L(ze.ownerDocument):P(pe,ze),Et=ht.width,Xt=ht.height,Tt=ht.left,Rt=ht.top,hr=Nu(pe,ze,h.backgroundColor),sr={canvas:h.canvas,backgroundColor:hr,scale:(pn=(Pn=h.scale)!==null&&Pn!==void 0?Pn:C.devicePixelRatio)!==null&&pn!==void 0?pn:1,x:((Un=h.x)!==null&&Un!==void 0?Un:0)+Tt,y:((Mn=h.y)!==null&&Mn!==void 0?Mn:0)+Rt,width:(kn=h.width)!==null&&kn!==void 0?kn:Math.ceil(Et),height:(_n=h.height)!==null&&_n!==void 0?_n:Math.ceil(Xt)},Re?(pe.logger.debug("Document cloned, using foreign object rendering"),St=new Ru(pe,sr),[4,St.render(ze)]):[3,3];case 2:return mr=En.sent(),[3,5];case 3:return pe.logger.debug("Document cloned, element located at "+Tt+","+Rt+" with size "+Et+"x"+Xt+" using computed rendering"),pe.logger.debug("Starting DOM parsing"),gr=ws(pe,ze),hr===gr.styles.backgroundColor&&(gr.styles.backgroundColor=vn.TRANSPARENT),pe.logger.debug("Starting renderer for element at "+sr.x+","+sr.y+" with size "+sr.width+"x"+sr.height),St=new Cu(pe,sr),[4,St.render(gr)];case 4:mr=En.sent(),En.label=5;case 5:return((Hn=h.removeContainer)!==null&&Hn!==void 0?Hn:!0)&&(ks.destroy(xt)||pe.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),pe.logger.debug("Finished rendering"),[2,mr]}})})},Nu=function(v,h,T){var C=h.ownerDocument,K=C.documentElement?ni(v,getComputedStyle(C.documentElement).backgroundColor):vn.TRANSPARENT,$=C.body?ni(v,getComputedStyle(C.body).backgroundColor):vn.TRANSPARENT,se=typeof T=="string"?ni(v,T):T===null?vn.TRANSPARENT:4294967295;return h===C.documentElement?Bn(K)?Bn($)?se:$:K:se};return Du})},wRmb:function(vt,$e,q){"use strict";q.d($e,"a",function(){return S});var ve=q("rePB"),V=q("KQm4"),O=q("VTBJ"),z=q("Ff2n"),D=q("q1tI"),I=q.n(D),G=q("Kwbf"),P=q("Zm9Q"),L=q("hW8S");function S(r){return Object(P.a)(r).filter(function(A){return D.isValidElement(A)}).map(function(A){var s=A.key,t=A.props,n=t.children,i=Object(z.a)(t,["children"]),B=Object(O.a)({key:s},i);return n&&(B.children=S(n)),B})}function _(r){return r.reduce(function(A,s){var t=s.fixed,n=t===!0?"left":t,i=s.children;return i&&i.length>0?[].concat(Object(V.a)(A),Object(V.a)(_(i).map(function(B){return Object(O.a)({fixed:n},B)}))):[].concat(Object(V.a)(A),[Object(O.a)(Object(O.a)({},s),{},{fixed:n})])},[])}function b(r){for(var A=!0,s=0;s<r.length;s+=1){var t=r[s];if(A&&t.fixed!=="left")A=!1;else if(!A&&t.fixed==="left"){Object(G.a)(!1,"Index ".concat(s-1," of `columns` missing `fixed='left'` prop."));break}}for(var n=!0,i=r.length-1;i>=0;i-=1){var B=r[i];if(n&&B.fixed!=="right")n=!1;else if(!n&&B.fixed==="right"){Object(G.a)(!1,"Index ".concat(i+1," of `columns` missing `fixed='right'` prop."));break}}}function u(r){return r.map(function(A){var s=A.fixed,t=Object(z.a)(A,["fixed"]),n=s;return s==="left"?n="right":s==="right"&&(n="left"),Object(O.a)({fixed:n},t)})}function o(r,A){var s=r.prefixCls,t=r.columns,n=r.children,i=r.expandable,B=r.expandedKeys,w=r.getRowKey,y=r.onTriggerExpand,x=r.expandIcon,E=r.rowExpandable,c=r.expandIconColumnIndex,e=r.direction,a=r.expandRowByClick,l=D.useMemo(function(){return t||S(n)},[t,n]),g=D.useMemo(function(){if(i){var R,U=c||0,Q=l[U],j=(R={},Object(ve.a)(R,L.a,{className:"".concat(s,"-expand-icon-col")}),Object(ve.a)(R,"title",""),Object(ve.a)(R,"fixed",Q?Q.fixed:null),Object(ve.a)(R,"className","".concat(s,"-row-expand-icon-cell")),Object(ve.a)(R,"render",function(Y,ne,me){var _e=w(ne,me),Oe=B.has(_e),xe=E?E(ne):!0,Se=x({prefixCls:s,expanded:Oe,expandable:xe,record:ne,onExpand:y});return a?D.createElement("span",{onClick:function(Pe){return Pe.stopPropagation()}},Se):Se}),R),J=l.slice();return U>=0&&J.splice(U,0,j),J}return l},[i,l,w,B,x,e]),p=D.useMemo(function(){var R=g;return A&&(R=A(R)),R.length||(R=[{render:function(){return null}}]),R},[A,g,e]),f=D.useMemo(function(){return e==="rtl"?u(_(p)):_(p)},[p,e]);return[p,f]}$e.b=o},"y0+3":function(vt,$e,q){"use strict";q.d($e,"a",function(){return _}),q.d($e,"b",function(){return u});var ve=/margin|padding|width|height|max|min|offset/,V={left:!0,top:!0},O={cssFloat:1,styleFloat:1,float:1};function z(o){return o.nodeType===1?o.ownerDocument.defaultView.getComputedStyle(o,null):{}}function D(o,r,A){if(r=r.toLowerCase(),A==="auto"){if(r==="height")return o.offsetHeight;if(r==="width")return o.offsetWidth}return r in V||(V[r]=ve.test(r)),V[r]?parseFloat(A)||0:A}function I(o,r){var A=arguments.length,s=z(o);return r=O[r]?"cssFloat"in o.style?"cssFloat":"styleFloat":r,A===1?s:D(o,r,s[r]||o.style[r])}function G(o,r,A){var s=arguments.length;if(r=O[r]?"cssFloat"in o.style?"cssFloat":"styleFloat":r,s===3)return typeof A=="number"&&ve.test(r)&&(A="".concat(A,"px")),o.style[r]=A,A;for(var t in r)r.hasOwnProperty(t)&&G(o,t,r[t]);return z(o)}function P(o){return o===document.body?document.documentElement.clientWidth:o.offsetWidth}function L(o){return o===document.body?window.innerHeight||document.documentElement.clientHeight:o.offsetHeight}function S(){var o=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),r=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:o,height:r}}function _(){var o=document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight;return{width:o,height:r}}function b(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function u(o){var r=o.getBoundingClientRect(),A=document.documentElement;return{left:r.left+(window.pageXOffset||A.scrollLeft)-(A.clientLeft||document.body.clientLeft||0),top:r.top+(window.pageYOffset||A.scrollTop)-(A.clientTop||document.body.clientTop||0)}}}}]);