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.
429 lines
1.2 MiB
429 lines
1.2 MiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[68,5,7,8,15,17],{"+ua5":function(ct,_e,j){},"/cxE":function(ct,_e,j){"use strict";j.d(_e,"f",function(){return D}),j.d(_e,"g",function(){return V}),j.d(_e,"h",function(){return F}),j.d(_e,"e",function(){return X}),j.d(_e,"b",function(){return M}),j.d(_e,"c",function(){return e}),j.d(_e,"d",function(){return R}),j.d(_e,"a",function(){return g});class se{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(v){setTimeout(()=>{throw v.stack?new Error(v.message+`
|
|
|
|
`+v.stack):v},0)}}emit(v){this.listeners.forEach(u=>{u(v)})}onUnexpectedError(v){this.unexpectedErrorHandler(v),this.emit(v)}onUnexpectedExternalError(v){this.unexpectedErrorHandler(v)}}const G=new se;function D(v){X(v)||G.onUnexpectedError(v);return}function V(v){X(v)||G.onUnexpectedExternalError(v);return}function F(v){if(v instanceof Error){let{name:u,message:s}=v;const i=v.stacktrace||v.stack;return{$isError:!0,name:u,message:s,stack:i}}return v}const O="Canceled";function X(v){return v instanceof Error&&v.name===O&&v.message===O}function M(){const v=new Error(O);return v.name=v.message,v}function e(v){return v?new Error(`Illegal argument: ${v}`):new Error("Illegal argument")}function R(v){return v?new Error(`Illegal state: ${v}`):new Error("Illegal state")}class g extends Error{constructor(v){super("NotSupported");v&&(this.message=v)}}},"24hK":function(ct,_e,j){"use strict";j.d(_e,"a",function(){return G});class se{constructor(D){this.element=D,this.next=se.Undefined,this.prev=se.Undefined}}se.Undefined=new se(void 0);class G{constructor(){this._first=se.Undefined,this._last=se.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===se.Undefined}clear(){let D=this._first;for(;D!==se.Undefined;){const V=D.next;D.prev=se.Undefined,D.next=se.Undefined,D=V}this._first=se.Undefined,this._last=se.Undefined,this._size=0}unshift(D){return this._insert(D,!1)}push(D){return this._insert(D,!0)}_insert(D,V){const F=new se(D);if(this._first===se.Undefined)this._first=F,this._last=F;else if(V){const X=this._last;this._last=F,F.prev=X,X.next=F}else{const X=this._first;this._first=F,F.next=X,X.prev=F}this._size+=1;let O=!1;return()=>{O||(O=!0,this._remove(F))}}shift(){if(this._first===se.Undefined)return;{const D=this._first.element;return this._remove(this._first),D}}pop(){if(this._last===se.Undefined)return;{const D=this._last.element;return this._remove(this._last),D}}_remove(D){if(D.prev!==se.Undefined&&D.next!==se.Undefined){const V=D.prev;V.next=D.next,D.next.prev=V}else D.prev===se.Undefined&&D.next===se.Undefined?(this._first=se.Undefined,this._last=se.Undefined):D.next===se.Undefined?(this._last=this._last.prev,this._last.next=se.Undefined):D.prev===se.Undefined&&(this._first=this._first.next,this._first.prev=se.Undefined);this._size-=1}*[Symbol.iterator](){let D=this._first;for(;D!==se.Undefined;)yield D.element,D=D.next}}},"3/fG":function(ct,_e,j){"use strict";j.d(_e,"a",function(){return G});function se(D,V){let F;return V.length===0?F=D:F=D.replace(/\{(\d+)\}/g,function(O,X){const M=X[0];return typeof V[M]!="undefined"?V[M]:O}),F}function G(D,V,...F){return se(V,F)}},"49sm":function(ct,_e){var j={}.toString;ct.exports=Array.isArray||function(se){return j.call(se)=="[object Array]"}},"55Ip":function(ct,_e,j){"use strict";j.d(_e,"a",function(){return r});var se=j("Ty5D"),G=j("dI71"),D=j("q1tI"),V=j.n(D),F=j("YS25"),O=j("17x9"),X=j.n(O),M=j("wx14"),e=j("zLVn"),R=j("9R94"),g=function(n){Object(G.a)(l,n);function l(){for(var b,m=arguments.length,c=new Array(m),L=0;L<m;L++)c[L]=arguments[L];return b=n.call.apply(n,[this].concat(c))||this,b.history=Object(F.a)(b.props),b}var d=l.prototype;return d.render=function(){return V.a.createElement(se.c,{history:this.history,children:this.props.children})},l}(V.a.Component),v=function(n){Object(G.a)(l,n);function l(){for(var b,m=arguments.length,c=new Array(m),L=0;L<m;L++)c[L]=arguments[L];return b=n.call.apply(n,[this].concat(c))||this,b.history=Object(F.b)(b.props),b}var d=l.prototype;return d.render=function(){return V.a.createElement(se.c,{history:this.history,children:this.props.children})},l}(V.a.Component),u=function(l,d){return typeof l=="function"?l(d):l},s=function(l,d){return typeof l=="string"?Object(F.c)(l,null,null,d):l},i=function(l){return l},A=V.a.forwardRef;typeof A=="undefined"&&(A=i);function o(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}var a=A(function(n,l){var d=n.innerRef,b=n.navigate,m=n.onClick,c=Object(e.a)(n,["innerRef","navigate","onClick"]),L=c.target,N=Object(M.a)({},c,{onClick:function(P){try{m&&m(P)}catch(W){throw P.preventDefault(),W}!P.defaultPrevented&&P.button===0&&(!L||L==="_self")&&!o(P)&&(P.preventDefault(),b())}});return i!==A?N.ref=l||d:N.ref=d,V.a.createElement("a",N)}),r=A(function(n,l){var d=n.component,b=d===void 0?a:d,m=n.replace,c=n.to,L=n.innerRef,N=Object(e.a)(n,["component","replace","to","innerRef"]);return V.a.createElement(se.e.Consumer,null,function(T){T||Object(R.a)(!1);var P=T.history,W=s(u(c,T.location),T.location),U=W?P.createHref(W):"",Y=Object(M.a)({},N,{href:U,navigate:function(){var me=u(c,T.location),ge=m?P.replace:P.push;ge(me)}});return i!==A?Y.ref=l||L:Y.innerRef=L,V.a.createElement(b,Y)})});if(!1)var t,y;var _=function(l){return l},E=V.a.forwardRef;typeof E=="undefined"&&(E=_);function B(){for(var n=arguments.length,l=new Array(n),d=0;d<n;d++)l[d]=arguments[d];return l.filter(function(b){return b}).join(" ")}var C=E(function(n,l){var d=n["aria-current"],b=d===void 0?"page":d,m=n.activeClassName,c=m===void 0?"active":m,L=n.activeStyle,N=n.className,T=n.exact,P=n.isActive,W=n.location,U=n.sensitive,Y=n.strict,re=n.style,me=n.to,ge=n.innerRef,Oe=Object(e.a)(n,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return V.a.createElement(se.e.Consumer,null,function(Se){Se||Object(R.a)(!1);var Be=W||Se.location,Ne=s(u(me,Be),Be),ke=Ne.pathname,Ce=ke&&ke.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),ve=Ce?Object(se.f)(Be.pathname,{path:Ce,exact:T,sensitive:U,strict:Y}):null,Ye=!!(P?P(ve,Be):ve),ht=Ye?B(N,c):N,at=Ye?Object(M.a)({},re,{},L):re,We=Object(M.a)({"aria-current":Ye&&b||null,className:ht,style:at,to:Ne},Oe);return _!==E?We.ref=l||ge:We.innerRef=ge,V.a.createElement(r,We)})});if(!1)var h},"5VLF":function(ct,_e,j){"use strict";var se,G;function D(V,F,O){var X=function(M,e){return V.js_beautify(M,e)};return X.js=V.js_beautify,X.css=F.css_beautify,X.html=O.html_beautify,X.js_beautify=V.js_beautify,X.css_beautify=F.css_beautify,X.html_beautify=O.html_beautify,X}!(se=[j("6UM0"),j("TXwP"),j("psGv")],G=function(V,F,O){return D(V,F,O)}.apply(_e,se),G!==void 0&&(ct.exports=G))},"5Y4S":function(ct,_e,j){"use strict";j.d(_e,"a",function(){return D});var se=j("MNsG");const G=se.b.performance&&typeof se.b.performance.now=="function";class D{constructor(V){this._highResolution=G&&V,this._startTime=this._now(),this._stopTime=-1}static create(V=!0){return new D(V)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?se.b.performance.now():Date.now()}}},"6+eU":function(ct,_e,j){"use strict";j.d(_e,"a",function(){return E});var se=j("wx14"),G=j("rePB"),D=j("VTBJ"),V=j("1OyB"),F=j("vuIU"),O=j("Ji7U"),X=j("LK+K"),M=j("q1tI"),e=j.n(M),R=j("TSYQ"),g=j.n(R),v=function(C){var h,n="".concat(C.rootPrefixCls,"-item"),l=g()(n,"".concat(n,"-").concat(C.page),(h={},Object(G.a)(h,"".concat(n,"-active"),C.active),Object(G.a)(h,C.className,!!C.className),Object(G.a)(h,"".concat(n,"-disabled"),!C.page),h)),d=function(){C.onClick(C.page)},b=function(c){C.onKeyPress(c,C.onClick,C.page)};return e.a.createElement("li",{title:C.showTitle?C.page:null,className:l,onClick:d,onKeyPress:b,tabIndex:"0"},C.itemRender(C.page,"page",e.a.createElement("a",{rel:"nofollow"},C.page)))},u=v,s={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},i=function(B){Object(O.a)(h,B);var C=Object(X.a)(h);function h(){var n;Object(V.a)(this,h);for(var l=arguments.length,d=new Array(l),b=0;b<l;b++)d[b]=arguments[b];return n=C.call.apply(C,[this].concat(d)),n.state={goInputText:""},n.buildOptionText=function(m){return"".concat(m," ").concat(n.props.locale.items_per_page)},n.changeSize=function(m){n.props.changeSize(Number(m))},n.handleChange=function(m){n.setState({goInputText:m.target.value})},n.handleBlur=function(m){var c=n.props,L=c.goButton,N=c.quickGo,T=c.rootPrefixCls,P=n.state.goInputText;if(L||P==="")return;if(m.relatedTarget&&(m.relatedTarget.className.indexOf("".concat(T,"-prev"))>=0||m.relatedTarget.className.indexOf("".concat(T,"-next"))>=0))return;n.setState({goInputText:""}),N(n.getValidValue())},n.go=function(m){var c=n.state.goInputText;if(c==="")return;(m.keyCode===s.ENTER||m.type==="click")&&(n.setState({goInputText:""}),n.props.quickGo(n.getValidValue()))},n}return Object(F.a)(h,[{key:"getValidValue",value:function(){var l=this.state,d=l.goInputText,b=l.current;return!d||isNaN(d)?b:Number(d)}},{key:"getPageSizeOptions",value:function(){var l=this.props,d=l.pageSize,b=l.pageSizeOptions;return b.some(function(m){return m.toString()===d.toString()})?b:b.concat([d.toString()]).sort(function(m,c){var L=isNaN(Number(m))?0:Number(m),N=isNaN(Number(c))?0:Number(c);return L-N})}},{key:"render",value:function(){var l=this,d=this.props,b=d.pageSize,m=d.locale,c=d.rootPrefixCls,L=d.changeSize,N=d.quickGo,T=d.goButton,P=d.selectComponentClass,W=d.buildOptionText,U=d.selectPrefixCls,Y=d.disabled,re=this.state.goInputText,me="".concat(c,"-options"),ge=P,Oe=null,Se=null,Be=null;if(!L&&!N)return null;var Ne=this.getPageSizeOptions();if(L&&ge){var ke=Ne.map(function(Ce,ve){return e.a.createElement(ge.Option,{key:ve,value:Ce.toString()},(W||l.buildOptionText)(Ce))});Oe=e.a.createElement(ge,{disabled:Y,prefixCls:U,showSearch:!1,className:"".concat(me,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(b||Ne[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ve){return ve.parentNode}},ke)}return N&&(T&&(Be=typeof T=="boolean"?e.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:Y,className:"".concat(me,"-quick-jumper-button")},m.jump_to_confirm):e.a.createElement("span",{onClick:this.go,onKeyUp:this.go},T)),Se=e.a.createElement("div",{className:"".concat(me,"-quick-jumper")},m.jump_to,e.a.createElement("input",{disabled:Y,type:"text",value:re,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),m.page,Be)),e.a.createElement("li",{className:"".concat(me)},Oe,Se)}}]),h}(e.a.Component);i.defaultProps={pageSizeOptions:["10","20","50","100"]};var A=i,o=j("N2Kk");function a(){}function r(B){return typeof B=="number"&&isFinite(B)&&Math.floor(B)===B}function t(B,C,h){return h}function y(B,C,h){var n=typeof B=="undefined"?C.pageSize:B;return Math.floor((h.total-1)/n)+1}var _=function(B){Object(O.a)(h,B);var C=Object(X.a)(h);function h(n){var l;Object(V.a)(this,h),l=C.call(this,n),l.getJumpPrevPage=function(){return Math.max(1,l.state.current-(l.props.showLessItems?3:5))},l.getJumpNextPage=function(){return Math.min(y(void 0,l.state,l.props),l.state.current+(l.props.showLessItems?3:5))},l.getItemIcon=function(L,N){var T=l.props.prefixCls,P=L||e.a.createElement("button",{type:"button","aria-label":N,className:"".concat(T,"-item-link")});return typeof L=="function"&&(P=e.a.createElement(L,Object(D.a)({},l.props))),P},l.savePaginationNode=function(L){l.paginationNode=L},l.isValid=function(L){return r(L)&&L!==l.state.current},l.shouldDisplayQuickJumper=function(){var L=l.props,N=L.showQuickJumper,T=L.pageSize,P=L.total;return P<=T?!1:N},l.handleKeyDown=function(L){(L.keyCode===s.ARROW_UP||L.keyCode===s.ARROW_DOWN)&&L.preventDefault()},l.handleKeyUp=function(L){var N=l.getValidValue(L),T=l.state.currentInputValue;N!==T&&l.setState({currentInputValue:N}),L.keyCode===s.ENTER?l.handleChange(N):L.keyCode===s.ARROW_UP?l.handleChange(N-1):L.keyCode===s.ARROW_DOWN&&l.handleChange(N+1)},l.changePageSize=function(L){var N=l.state.current,T=y(L,l.state,l.props);N=N>T?T:N,T===0&&(N=l.state.current),typeof L=="number"&&("pageSize"in l.props||l.setState({pageSize:L}),"current"in l.props||l.setState({current:N,currentInputValue:N})),l.props.onShowSizeChange(N,L),"onChange"in l.props&&l.props.onChange&&l.props.onChange(N,L)},l.handleChange=function(L){var N=l.props.disabled,T=L;if(l.isValid(T)&&!N){var P=y(void 0,l.state,l.props);T>P?T=P:T<1&&(T=1),"current"in l.props||l.setState({current:T,currentInputValue:T});var W=l.state.pageSize;return l.props.onChange(T,W),T}return l.state.current},l.prev=function(){l.hasPrev()&&l.handleChange(l.state.current-1)},l.next=function(){l.hasNext()&&l.handleChange(l.state.current+1)},l.jumpPrev=function(){l.handleChange(l.getJumpPrevPage())},l.jumpNext=function(){l.handleChange(l.getJumpNextPage())},l.hasPrev=function(){return l.state.current>1},l.hasNext=function(){return l.state.current<y(void 0,l.state,l.props)},l.runIfEnter=function(L,N){if(L.key==="Enter"||L.charCode===13){for(var T=arguments.length,P=new Array(T>2?T-2:0),W=2;W<T;W++)P[W-2]=arguments[W];N.apply(void 0,P)}},l.runIfEnterPrev=function(L){l.runIfEnter(L,l.prev)},l.runIfEnterNext=function(L){l.runIfEnter(L,l.next)},l.runIfEnterJumpPrev=function(L){l.runIfEnter(L,l.jumpPrev)},l.runIfEnterJumpNext=function(L){l.runIfEnter(L,l.jumpNext)},l.handleGoTO=function(L){(L.keyCode===s.ENTER||L.type==="click")&&l.handleChange(l.state.currentInputValue)};var d=n.onChange!==a,b="current"in n;b&&!d&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var m=n.defaultCurrent;"current"in n&&(m=n.current);var c=n.defaultPageSize;return"pageSize"in n&&(c=n.pageSize),m=Math.min(m,y(c,void 0,n)),l.state={current:m,currentInputValue:m,pageSize:c},l}return Object(F.a)(h,[{key:"componentDidUpdate",value:function(l,d){var b=this.props.prefixCls;if(d.current!==this.state.current&&this.paginationNode){var m=this.paginationNode.querySelector(".".concat(b,"-item-").concat(d.current));m&&document.activeElement===m&&m.blur()}}},{key:"getValidValue",value:function(l){var d=l.target.value,b=y(void 0,this.state,this.props),m=this.state.currentInputValue,c;return d===""?c=d:isNaN(Number(d))?c=m:d>=b?c=b:c=Number(d),c}},{key:"getShowSizeChanger",value:function(){var l=this.props,d=l.showSizeChanger,b=l.total,m=l.totalBoundaryShowSizeChanger;return typeof d!="undefined"?d:b>m}},{key:"renderPrev",value:function(l){var d=this.props,b=d.prevIcon,m=d.itemRender,c=m(l,"prev",this.getItemIcon(b,"prev page")),L=!this.hasPrev();return Object(M.isValidElement)(c)?Object(M.cloneElement)(c,{disabled:L}):c}},{key:"renderNext",value:function(l){var d=this.props,b=d.nextIcon,m=d.itemRender,c=m(l,"next",this.getItemIcon(b,"next page")),L=!this.hasNext();return Object(M.isValidElement)(c)?Object(M.cloneElement)(c,{disabled:L}):c}},{key:"render",value:function(){var l=this,d=this.props,b=d.prefixCls,m=d.className,c=d.style,L=d.disabled,N=d.hideOnSinglePage,T=d.total,P=d.locale,W=d.showQuickJumper,U=d.showLessItems,Y=d.showTitle,re=d.showTotal,me=d.simple,ge=d.itemRender,Oe=d.showPrevNextJumpers,Se=d.jumpPrevIcon,Be=d.jumpNextIcon,Ne=d.selectComponentClass,ke=d.selectPrefixCls,Ce=d.pageSizeOptions,ve=this.state,Ye=ve.current,ht=ve.pageSize,at=ve.currentInputValue;if(N===!0&&T<=ht)return null;var We=y(void 0,this.state,this.props),it=[],ne=null,J=null,k=null,$=null,q=null,he=W&&W.goButton,pe=U?1:2,Ke=Ye-1>0?Ye-1:0,Je=Ye+1<We?Ye+1:We,ze=Object.keys(this.props).reduce(function(te,ie){return(ie.substr(0,5)==="data-"||ie.substr(0,5)==="aria-"||ie==="role")&&(te[ie]=l.props[ie]),te},{});if(me)return he&&(typeof he=="boolean"?q=e.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},P.jump_to_confirm):q=e.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},he),q=e.a.createElement("li",{title:Y?"".concat(P.jump_to).concat(Ye,"/").concat(We):null,className:"".concat(b,"-simple-pager")},q)),e.a.createElement("ul",Object(se.a)({className:g()(b,"".concat(b,"-simple"),Object(G.a)({},"".concat(b,"-disabled"),L),m),style:c,ref:this.savePaginationNode},ze),e.a.createElement("li",{title:Y?P.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:g()("".concat(b,"-prev"),Object(G.a)({},"".concat(b,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(Ke)),e.a.createElement("li",{title:Y?"".concat(Ye,"/").concat(We):null,className:"".concat(b,"-simple-pager")},e.a.createElement("input",{type:"text",value:at,disabled:L,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),e.a.createElement("span",{className:"".concat(b,"-slash")},"/"),We),e.a.createElement("li",{title:Y?P.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:g()("".concat(b,"-next"),Object(G.a)({},"".concat(b,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Je)),q);if(We<=3+pe*2){var Ze={locale:P,rootPrefixCls:b,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:Y,itemRender:ge};We||it.push(e.a.createElement(u,Object(se.a)({},Ze,{key:"noPager",page:We,className:"".concat(b,"-disabled")})));for(var nt=1;nt<=We;nt+=1){var pt=Ye===nt;it.push(e.a.createElement(u,Object(se.a)({},Ze,{key:nt,page:nt,active:pt})))}}else{var xe=U?P.prev_3:P.prev_5,Ue=U?P.next_3:P.next_5;Oe&&(ne=e.a.createElement("li",{title:Y?xe:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:g()("".concat(b,"-jump-prev"),Object(G.a)({},"".concat(b,"-jump-prev-custom-icon"),!!Se))},ge(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Se,"prev page"))),J=e.a.createElement("li",{title:Y?Ue:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:g()("".concat(b,"-jump-next"),Object(G.a)({},"".concat(b,"-jump-next-custom-icon"),!!Be))},ge(this.getJumpNextPage(),"jump-next",this.getItemIcon(Be,"next page")))),$=e.a.createElement(u,{locale:P,last:!0,rootPrefixCls:b,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:We,page:We,active:!1,showTitle:Y,itemRender:ge}),k=e.a.createElement(u,{locale:P,rootPrefixCls:b,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:Y,itemRender:ge});var Qe=Math.max(1,Ye-pe),je=Math.min(Ye+pe,We);Ye-1<=pe&&(je=1+pe*2),We-Ye<=pe&&(Qe=We-pe*2);for(var Le=Qe;Le<=je;Le+=1){var Fe=Ye===Le;it.push(e.a.createElement(u,{locale:P,rootPrefixCls:b,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Le,page:Le,active:Fe,showTitle:Y,itemRender:ge}))}Ye-1>=pe*2&&Ye!==1+2&&(it[0]=Object(M.cloneElement)(it[0],{className:"".concat(b,"-item-after-jump-prev")}),it.unshift(ne)),We-Ye>=pe*2&&Ye!==We-2&&(it[it.length-1]=Object(M.cloneElement)(it[it.length-1],{className:"".concat(b,"-item-before-jump-next")}),it.push(J)),Qe!==1&&it.unshift(k),je!==We&&it.push($)}var we=null;re&&(we=e.a.createElement("li",{className:"".concat(b,"-total-text")},re(T,[T===0?0:(Ye-1)*ht+1,Ye*ht>T?T:Ye*ht])));var ue=!this.hasPrev()||!We,ce=!this.hasNext()||!We;return e.a.createElement("ul",Object(se.a)({className:g()(b,m,Object(G.a)({},"".concat(b,"-disabled"),L)),style:c,unselectable:"unselectable",ref:this.savePaginationNode},ze),we,e.a.createElement("li",{title:Y?P.prev_page:null,onClick:this.prev,tabIndex:ue?null:0,onKeyPress:this.runIfEnterPrev,className:g()("".concat(b,"-prev"),Object(G.a)({},"".concat(b,"-disabled"),ue)),"aria-disabled":ue},this.renderPrev(Ke)),it,e.a.createElement("li",{title:Y?P.next_page:null,onClick:this.next,tabIndex:ce?null:0,onKeyPress:this.runIfEnterNext,className:g()("".concat(b,"-next"),Object(G.a)({},"".concat(b,"-disabled"),ce)),"aria-disabled":ce},this.renderNext(Je)),e.a.createElement(A,{disabled:L,locale:P,rootPrefixCls:b,selectComponentClass:Ne,selectPrefixCls:ke,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Ye,pageSize:ht,pageSizeOptions:Ce,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:he}))}}],[{key:"getDerivedStateFromProps",value:function(l,d){var b={};if("current"in l&&(b.current=l.current,l.current!==d.current&&(b.currentInputValue=b.current)),"pageSize"in l&&l.pageSize!==d.pageSize){var m=d.current,c=y(l.pageSize,d,l);m=m>c?c:m,"current"in l||(b.current=m,b.currentInputValue=m),b.pageSize=l.pageSize}return b}}]),h}(e.a.Component);_.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:a,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:a,locale:o.a,style:{},itemRender:t,totalBoundaryShowSizeChanger:50};var E=_},"6RRn":function(ct,_e,j){"use strict";var se=j("wCXF"),G=j("n6Qo");j.d(_e,"b",function(){return G.a});var D=j("IBYe"),V=j("6eGT"),F=j("hW8S");j.d(_e,"a",function(){return F.a}),_e.c=se.b},"6UM0":function(ct,_e,j){var se,G;(function(){var D;(function(){"use strict";var F=[function(e,R,g){var v=g(1).Beautifier,u=g(5).Options;function s(i,A){var o=new v(i,A);return o.beautify()}e.exports=s,e.exports.defaultOptions=function(){return new u}},function(e,R,g){var v=g(2).Output,u=g(3).Token,s=g(4),i=g(5).Options,A=g(7).Tokenizer,o=g(7).line_starters,a=g(7).positionable_operators,r=g(7).TOKEN;function t(U,Y){return Y.indexOf(U)!==-1}function y(U){return U.replace(/^\s+/g,"")}function _(U){for(var Y={},re=0;re<U.length;re++)Y[U[re].replace(/-/g,"_")]=U[re];return Y}function E(U,Y){return U&&U.type===r.RESERVED&&U.text===Y}function B(U,Y){return U&&U.type===r.RESERVED&&t(U.text,Y)}var C=["case","return","do","if","throw","else","await","break","continue","async"],h=["before-newline","after-newline","preserve-newline"],n=_(h),l=[n.before_newline,n.preserve_newline],d={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function b(U,Y){if(Y.multiline_frame||Y.mode===d.ForInitializer||Y.mode===d.Conditional)return;U.remove_indent(Y.start_line_index)}function m(U){U=U.replace(s.allLineBreaks,`
|
|
`);for(var Y=[],re=U.indexOf(`
|
|
`);re!==-1;)Y.push(U.substring(0,re)),U=U.substring(re+1),re=U.indexOf(`
|
|
`);return U.length&&Y.push(U),Y}function c(U){return U===d.ArrayLiteral}function L(U){return t(U,[d.Expression,d.ForInitializer,d.Conditional])}function N(U,Y){for(var re=0;re<U.length;re++){var me=U[re].trim();if(me.charAt(0)!==Y)return!1}return!0}function T(U,Y){for(var re=0,me=U.length,ge;re<me;re++)if(ge=U[re],ge&&ge.indexOf(Y)!==0)return!1;return!0}function P(U,Y){Y=Y||{},this._source_text=U||"",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 i(Y)}P.prototype.create_flags=function(U,Y){var re=0;U&&(re=U.indentation_level,!this._output.just_added_newline()&&U.line_indent_level>re&&(re=U.line_indent_level));var me={mode:Y,parent:U,last_token:U?U.last_token:new u(r.START_BLOCK,""),last_word:U?U.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:re,alignment:0,line_indent_level:U?U.line_indent_level:re,start_line_index:this._output.get_line_number(),ternary_depth:0};return me},P.prototype._reset=function(U){var Y=U.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new v(this._options,Y),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(d.BlockStatement);var re=new A(U,this._options);return this._tokens=re.tokenize(),U},P.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var U,Y=this._reset(this._source_text),re=this._options.eol;this._options.eol==="auto"&&(re=`
|
|
`,Y&&s.lineBreak.test(Y||"")&&(re=Y.match(s.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 U=this._output.get_code(re),U},P.prototype.handle_token=function(U,Y){U.type===r.START_EXPR?this.handle_start_expr(U):U.type===r.END_EXPR?this.handle_end_expr(U):U.type===r.START_BLOCK?this.handle_start_block(U):U.type===r.END_BLOCK?this.handle_end_block(U):U.type===r.WORD?this.handle_word(U):U.type===r.RESERVED?this.handle_word(U):U.type===r.SEMICOLON?this.handle_semicolon(U):U.type===r.STRING?this.handle_string(U):U.type===r.EQUALS?this.handle_equals(U):U.type===r.OPERATOR?this.handle_operator(U):U.type===r.COMMA?this.handle_comma(U):U.type===r.BLOCK_COMMENT?this.handle_block_comment(U,Y):U.type===r.COMMENT?this.handle_comment(U,Y):U.type===r.DOT?this.handle_dot(U):U.type===r.EOF?this.handle_eof(U):U.type===r.UNKNOWN?this.handle_unknown(U,Y):this.handle_unknown(U,Y)},P.prototype.handle_whitespace_and_comments=function(U,Y){var re=U.newlines,me=this._options.keep_array_indentation&&c(this._flags.mode);if(U.comments_before)for(var ge=U.comments_before.next();ge;)this.handle_whitespace_and_comments(ge,Y),this.handle_token(ge,Y),ge=U.comments_before.next();if(me)for(var Oe=0;Oe<re;Oe+=1)this.print_newline(Oe>0,Y);else if(this._options.max_preserve_newlines&&re>this._options.max_preserve_newlines&&(re=this._options.max_preserve_newlines),this._options.preserve_newlines&&re>1){this.print_newline(!1,Y);for(var Se=1;Se<re;Se+=1)this.print_newline(!0,Y)}};var W=["async","break","continue","return","throw","yield"];P.prototype.allow_wrap_or_preserved_newline=function(U,Y){if(Y=Y===void 0?!1:Y,this._output.just_added_newline())return;var re=this._options.preserve_newlines&&U.newlines||Y,me=t(this._flags.last_token.text,a)||t(U.text,a);if(me){var ge=t(this._flags.last_token.text,a)&&t(this._options.operator_position,l)||t(U.text,a);re=re&&ge}if(re)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(B(this._flags.last_token,W))return;this._output.set_wrap_point()}},P.prototype.print_newline=function(U,Y){if(!Y&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==r.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var re=this._tokens.peek();this._flags.mode===d.Statement&&!(this._flags.if_block&&E(re,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(U)&&(this._flags.multiline_frame=!0)},P.prototype.print_token_line_indentation=function(U){this._output.just_added_newline()&&(this._options.keep_array_indentation&&U.newlines&&(U.text==="["||c(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(U.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))},P.prototype.print_token=function(U){if(this._output.raw){this._output.add_raw_token(U);return}if(this._options.comma_first&&U.previous&&U.previous.type===r.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(U),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(U),this._output.non_breaking_space=!0,this._output.add_token(U.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},P.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},P.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))},P.prototype.set_mode=function(U){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,U),this._flags=this.create_flags(this._previous_flags,U),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},P.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===d.Statement&&b(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},P.prototype.start_of_object_property=function(){return this._flags.parent.mode===d.ObjectLiteral&&this._flags.mode===d.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||B(this._flags.last_token,["get","set"]))},P.prototype.start_of_statement=function(U){var Y=!1;return Y=Y||B(this._flags.last_token,["var","let","const"])&&U.type===r.WORD,Y=Y||E(this._flags.last_token,"do"),Y=Y||!(this._flags.parent.mode===d.ObjectLiteral&&this._flags.mode===d.Statement)&&B(this._flags.last_token,W)&&!U.newlines,Y=Y||E(this._flags.last_token,"else")&&!(E(U,"if")&&!U.comments_before),Y=Y||this._flags.last_token.type===r.END_EXPR&&(this._previous_flags.mode===d.ForInitializer||this._previous_flags.mode===d.Conditional),Y=Y||this._flags.last_token.type===r.WORD&&this._flags.mode===d.BlockStatement&&!this._flags.in_case&&!(U.text==="--"||U.text==="++")&&this._last_last_text!=="function"&&U.type!==r.WORD&&U.type!==r.RESERVED,Y=Y||this._flags.mode===d.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||B(this._flags.last_token,["get","set"])),Y?(this.set_mode(d.Statement),this.indent(),this.handle_whitespace_and_comments(U,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(U,B(U,["do","for","if","while"])),!0):!1},P.prototype.handle_start_expr=function(U){this.start_of_statement(U)||this.handle_whitespace_and_comments(U);var Y=d.Expression;if(U.text==="["){if(this._flags.last_token.type===r.WORD||this._flags.last_token.text===")"){B(this._flags.last_token,o)&&(this._output.space_before_token=!0),this.print_token(U),this.set_mode(Y),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}Y=d.ArrayLiteral,c(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())),t(this._flags.last_token.type,[r.START_EXPR,r.END_EXPR,r.WORD,r.OPERATOR,r.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===r.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,Y=d.ForInitializer):t(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,Y=d.Conditional):t(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&U.whitespace_before===""?this._output.space_before_token=!1:(t(this._flags.last_token.text,o)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(U);else if(this._flags.last_token.type===r.WORD){this._output.space_before_token=!1;var re=this._tokens.peek(-3);if(this._options.space_after_named_function&&re){var me=this._tokens.peek(-4);B(re,["async","function"])||re.text==="*"&&B(me,["async","function"])?this._output.space_before_token=!0:this._flags.mode===d.ObjectLiteral?(re.text==="{"||re.text===","||re.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(U);(this._flags.last_token.type===r.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===d.ObjectLiteral&&t(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===r.START_BLOCK?this.print_newline():(this._flags.last_token.type===r.END_EXPR||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===r.COMMA)&&this.allow_wrap_or_preserved_newline(U,U.newlines),this.print_token(U),this.set_mode(Y),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},P.prototype.handle_end_expr=function(U){for(;this._flags.mode===d.Statement;)this.restore_mode();this.handle_whitespace_and_comments(U),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(U,U.text==="]"&&c(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===r.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(U),this.restore_mode(),b(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===d.Conditional&&(this._previous_flags.mode=d.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},P.prototype.handle_start_block=function(U){this.handle_whitespace_and_comments(U);var Y=this._tokens.peek(),re=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===r.END_EXPR?(this.set_mode(d.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(d.BlockStatement):re&&(t(re.text,[":",","])&&t(Y.type,[r.STRING,r.WORD,r.RESERVED])||t(Y.text,["get","set","..."])&&t(re.type,[r.WORD,r.RESERVED]))?t(this._last_last_text,["class","interface"])&&!t(re.text,[":",","])?this.set_mode(d.BlockStatement):this.set_mode(d.ObjectLiteral):this._flags.last_token.type===r.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(d.BlockStatement):t(this._flags.last_token.type,[r.EQUALS,r.START_EXPR,r.COMMA,r.OPERATOR])||B(this._flags.last_token,["return","throw","import","default"])?this.set_mode(d.ObjectLiteral):this.set_mode(d.BlockStatement),this._flags.last_token&&(B(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var me=!Y.comments_before&&Y.text==="}",ge=me&&this._flags.last_word==="function"&&this._flags.last_token.type===r.END_EXPR;if(this._options.brace_preserve_inline){var Oe=0,Se=null;this._flags.inline_frame=!0;do if(Oe+=1,Se=this._tokens.peek(Oe-1),Se.newlines){this._flags.inline_frame=!1;break}while(Se.type!==r.EOF&&!(Se.type===r.END_BLOCK&&Se.opened===U))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&U.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==r.OPERATOR&&(ge||this._flags.last_token.type===r.EQUALS||B(this._flags.last_token,C)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(c(this._previous_flags.mode)&&(this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.COMMA)&&((this._flags.last_token.type===r.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(U),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==r.OPERATOR&&this._flags.last_token.type!==r.START_EXPR&&(this._flags.last_token.type===r.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(U),this.indent(),!me&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},P.prototype.handle_end_block=function(U){for(this.handle_whitespace_and_comments(U);this._flags.mode===d.Statement;)this.restore_mode();var Y=this._flags.last_token.type===r.START_BLOCK;this._flags.inline_frame&&!Y?this._output.space_before_token=!0:this._options.brace_style==="expand"?Y||this.print_newline():Y||(c(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(U)},P.prototype.handle_word=function(U){if(U.type===r.RESERVED){if(t(U.text,["set","get"])&&this._flags.mode!==d.ObjectLiteral)U.type=r.WORD;else if(U.text==="import"&&t(this._tokens.peek().text,["(","."]))U.type=r.WORD;else if(t(U.text,["as","from"])&&!this._flags.import_block)U.type=r.WORD;else if(this._flags.mode===d.ObjectLiteral){var Y=this._tokens.peek();Y.text===":"&&(U.type=r.WORD)}}if(this.start_of_statement(U)?B(this._flags.last_token,["var","let","const"])&&U.type===r.WORD&&(this._flags.declaration_statement=!0):U.newlines&&!L(this._flags.mode)&&(this._flags.last_token.type!==r.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==r.EQUALS&&(this._options.preserve_newlines||!B(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(U),this.print_newline()):this.handle_whitespace_and_comments(U),this._flags.do_block&&!this._flags.do_while)if(E(U,"while")){this._output.space_before_token=!0,this.print_token(U),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&&E(U,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===d.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&B(U,["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(U),this._flags.in_case=!0;return}if((this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(U)),E(U,"function")){(t(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(t(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===r.OPERATOR))&&(!this._output.just_added_blankline()&&!U.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD?B(this._flags.last_token,["get","set","new","export"])||B(this._flags.last_token,W)?this._output.space_before_token=!0:E(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===r.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(L(this._flags.mode)||c(this._flags.mode))||this.print_newline(),this.print_token(U),this._flags.last_word=U.text;return}var re="NONE";if(this._flags.last_token.type===r.END_BLOCK?this._previous_flags.inline_frame?re="SPACE":B(U,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&U.newlines?re="NEWLINE":(re="SPACE",this._output.space_before_token=!0):re="NEWLINE":this._flags.last_token.type===r.SEMICOLON&&this._flags.mode===d.BlockStatement?re="NEWLINE":this._flags.last_token.type===r.SEMICOLON&&L(this._flags.mode)?re="SPACE":this._flags.last_token.type===r.STRING?re="NEWLINE":this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===d.ObjectLiteral&&t(this._last_last_text,["{",","]))?re="SPACE":this._flags.last_token.type===r.START_BLOCK?this._flags.inline_frame?re="SPACE":re="NEWLINE":this._flags.last_token.type===r.END_EXPR&&(this._output.space_before_token=!0,re="NEWLINE"),B(U,o)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?re="SPACE":re="NEWLINE"),B(U,["else","catch","finally"]))if((!(this._flags.last_token.type===r.END_BLOCK&&this._previous_flags.mode===d.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&U.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 re==="NEWLINE"?B(this._flags.last_token,C)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&B(U,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==r.END_EXPR?(this._flags.last_token.type!==r.START_EXPR||!B(U,["var","let","const"]))&&this._flags.last_token.text!==":"&&(E(U,"if")&&E(U.previous,"else")?this._output.space_before_token=!0:this.print_newline()):B(U,o)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&c(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():re==="SPACE"&&(this._output.space_before_token=!0);U.previous&&(U.previous.type===r.WORD||U.previous.type===r.RESERVED)&&(this._output.space_before_token=!0),this.print_token(U),this._flags.last_word=U.text,U.type===r.RESERVED&&(U.text==="do"?this._flags.do_block=!0:U.text==="if"?this._flags.if_block=!0:U.text==="import"?this._flags.import_block=!0:this._flags.import_block&&E(U,"from")&&(this._flags.import_block=!1))},P.prototype.handle_semicolon=function(U){this.start_of_statement(U)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(U);for(var Y=this._tokens.peek();this._flags.mode===d.Statement&&!(this._flags.if_block&&E(Y,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(U)},P.prototype.handle_string=function(U){U.text.startsWith("`")&&U.newlines===0&&U.whitespace_before===""&&(U.previous.text===")"||this._flags.last_token.type===r.WORD)||(this.start_of_statement(U)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(U),this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(U):U.text.startsWith("`")&&this._flags.last_token.type===r.END_EXPR&&(U.previous.text==="]"||U.previous.text===")")&&U.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(U)},P.prototype.handle_equals=function(U){this.start_of_statement(U)||this.handle_whitespace_and_comments(U),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(U),this._output.space_before_token=!0},P.prototype.handle_comma=function(U){this.handle_whitespace_and_comments(U,!0),this.print_token(U),this._output.space_before_token=!0,this._flags.declaration_statement?(L(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(U)):this._flags.mode===d.ObjectLiteral||this._flags.mode===d.Statement&&this._flags.parent.mode===d.ObjectLiteral?(this._flags.mode===d.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(U)},P.prototype.handle_operator=function(U){var Y=U.text==="*"&&(B(this._flags.last_token,["function","yield"])||t(this._flags.last_token.type,[r.START_BLOCK,r.COMMA,r.END_BLOCK,r.SEMICOLON])),re=t(U.text,["-","+"])&&(t(this._flags.last_token.type,[r.START_BLOCK,r.START_EXPR,r.EQUALS,r.OPERATOR])||t(this._flags.last_token.text,o)||this._flags.last_token.text===",");if(!this.start_of_statement(U)){var me=!Y;this.handle_whitespace_and_comments(U,me)}if(U.text==="*"&&this._flags.last_token.type===r.DOT){this.print_token(U);return}if(U.text==="::"){this.print_token(U);return}if(this._flags.last_token.type===r.OPERATOR&&t(this._options.operator_position,l)&&this.allow_wrap_or_preserved_newline(U),U.text===":"&&this._flags.in_case){this.print_token(U),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==r.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 ge=!0,Oe=!0,Se=!1;if(U.text===":"?this._flags.ternary_depth===0?ge=!1:(this._flags.ternary_depth-=1,Se=!0):U.text==="?"&&(this._flags.ternary_depth+=1),!re&&!Y&&this._options.preserve_newlines&&t(U.text,a)){var Be=U.text===":",Ne=Be&&Se,ke=Be&&!Se;switch(this._options.operator_position){case n.before_newline:this._output.space_before_token=!ke,this.print_token(U),(!Be||Ne)&&this.allow_wrap_or_preserved_newline(U),this._output.space_before_token=!0;return;case n.after_newline:this._output.space_before_token=!0,!Be||Ne?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(U):this._output.space_before_token=!1,this.print_token(U),this._output.space_before_token=!0;return;case n.preserve_newline:ke||this.allow_wrap_or_preserved_newline(U),ge=!(this._output.just_added_newline()||ke),this._output.space_before_token=ge,this.print_token(U),this._output.space_before_token=!0;return}}if(Y){this.allow_wrap_or_preserved_newline(U),ge=!1;var Ce=this._tokens.peek();Oe=Ce&&t(Ce.type,[r.WORD,r.RESERVED])}else if(U.text==="...")this.allow_wrap_or_preserved_newline(U),ge=this._flags.last_token.type===r.START_BLOCK,Oe=!1;else if(t(U.text,["--","++","!","~"])||re){if((this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR)&&this.allow_wrap_or_preserved_newline(U),ge=!1,Oe=!1,U.newlines&&(U.text==="--"||U.text==="++"||U.text==="~")){var ve=B(this._flags.last_token,C)&&U.newlines;ve&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(ve,!0)}this._flags.last_token.text===";"&&L(this._flags.mode)&&(ge=!0),this._flags.last_token.type===r.RESERVED?ge=!0:this._flags.last_token.type===r.END_EXPR?ge=!(this._flags.last_token.text==="]"&&(U.text==="--"||U.text==="++")):this._flags.last_token.type===r.OPERATOR&&(ge=t(U.text,["--","-","++","+"])&&t(this._flags.last_token.text,["--","-","++","+"]),t(U.text,["+","-"])&&t(this._flags.last_token.text,["--","++"])&&(Oe=!0)),(this._flags.mode===d.BlockStatement&&!this._flags.inline_frame||this._flags.mode===d.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||ge,this.print_token(U),this._output.space_before_token=Oe},P.prototype.handle_block_comment=function(U,Y){if(this._output.raw){this._output.add_raw_token(U),U.directives&&U.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(U.directives){this.print_newline(!1,Y),this.print_token(U),U.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!s.newline.test(U.text)&&!U.newlines){this._output.space_before_token=!0,this.print_token(U),this._output.space_before_token=!0;return}else this.print_block_commment(U,Y)},P.prototype.print_block_commment=function(U,Y){var re=m(U.text),me,ge=!1,Oe=!1,Se=U.whitespace_before,Be=Se.length;if(this.print_newline(!1,Y),this.print_token_line_indentation(U),this._output.add_token(re[0]),this.print_newline(!1,Y),re.length>1){for(re=re.slice(1),ge=N(re,"*"),Oe=T(re,Se),ge&&(this._flags.alignment=1),me=0;me<re.length;me++)ge?(this.print_token_line_indentation(U),this._output.add_token(y(re[me]))):Oe&&re[me]?(this.print_token_line_indentation(U),this._output.add_token(re[me].substring(Be))):(this._output.current_line.set_indent(-1),this._output.add_token(re[me])),this.print_newline(!1,Y);this._flags.alignment=0}},P.prototype.handle_comment=function(U,Y){U.newlines?this.print_newline(!1,Y):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(U),this.print_newline(!1,Y)},P.prototype.handle_dot=function(U){this.start_of_statement(U)||this.handle_whitespace_and_comments(U,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),B(this._flags.last_token,C)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(U,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(U)},P.prototype.handle_unknown=function(U,Y){this.print_token(U),U.text[U.text.length-1]===`
|
|
`&&this.print_newline(!1,Y)},P.prototype.handle_eof=function(U){for(;this._flags.mode===d.Statement;)this.restore_mode();this.handle_whitespace_and_comments(U)},e.exports.Beautifier=P},function(e){function R(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=[]}R.prototype.clone_empty=function(){var u=new R(this.__parent);return u.set_indent(this.__indent_count,this.__alignment_count),u},R.prototype.item=function(u){return u<0?this.__items[this.__items.length+u]:this.__items[u]},R.prototype.has_match=function(u){for(var s=this.__items.length-1;s>=0;s--)if(this.__items[s].match(u))return!0;return!1},R.prototype.set_indent=function(u,s){this.is_empty()&&(this.__indent_count=u||0,this.__alignment_count=s||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},R.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)},R.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},R.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},R.prototype.is_empty=function(){return this.__items.length===0},R.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},R.prototype.push=function(u){this.__items.push(u);var s=u.lastIndexOf(`
|
|
`);s!==-1?this.__character_count=u.length-s:this.__character_count+=u.length},R.prototype.pop=function(){var u=null;return this.is_empty()||(u=this.__items.pop(),this.__character_count-=u.length),u},R.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},R.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},R.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},R.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 g(u,s){this.__cache=[""],this.__indent_size=u.indent_size,this.__indent_string=u.indent_char,u.indent_with_tabs||(this.__indent_string=new Array(u.indent_size+1).join(u.indent_char)),s=s||"",u.indent_level>0&&(s=new Array(u.indent_level+1).join(this.__indent_string)),this.__base_string=s,this.__base_string_length=s.length}g.prototype.get_indent_size=function(u,s){var i=this.__base_string_length;return s=s||0,u<0&&(i=0),i+=u*this.__indent_size,i+=s,i},g.prototype.get_indent_string=function(u,s){var i=this.__base_string;return s=s||0,u<0&&(u=0,i=""),s+=u*this.__indent_size,this.__ensure_cache(s),i+=this.__cache[s],i},g.prototype.__ensure_cache=function(u){for(;u>=this.__cache.length;)this.__add_column()},g.prototype.__add_column=function(){var u=this.__cache.length,s=0,i="";this.__indent_size&&u>=this.__indent_size&&(s=Math.floor(u/this.__indent_size),u-=s*this.__indent_size,i=new Array(s+1).join(this.__indent_string)),u&&(i+=new Array(u+1).join(" ")),this.__cache.push(i)};function v(u,s){this.__indent_cache=new g(u,s),this.raw=!1,this._end_with_newline=u.end_with_newline,this.indent_size=u.indent_size,this.wrap_line_length=u.wrap_line_length,this.indent_empty_lines=u.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new R(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}v.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},v.prototype.get_line_number=function(){return this.__lines.length},v.prototype.get_indent_string=function(u,s){return this.__indent_cache.get_indent_string(u,s)},v.prototype.get_indent_size=function(u,s){return this.__indent_cache.get_indent_size(u,s)},v.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},v.prototype.add_new_line=function(u){return this.is_empty()||!u&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},v.prototype.get_code=function(u){this.trim(!0);var s=this.current_line.pop();s&&(s[s.length-1]===`
|
|
`&&(s=s.replace(/\n+$/g,"")),this.current_line.push(s)),this._end_with_newline&&this.__add_outputline();var i=this.__lines.join(`
|
|
`);return u!==`
|
|
`&&(i=i.replace(/[\n]/g,u)),i},v.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},v.prototype.set_indent=function(u,s){return u=u||0,s=s||0,this.next_line.set_indent(u,s),this.__lines.length>1?(this.current_line.set_indent(u,s),!0):(this.current_line.set_indent(),!1)},v.prototype.add_raw_token=function(u){for(var s=0;s<u.newlines;s++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(u.whitespace_before),this.current_line.push(u.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},v.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()},v.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(" "))},v.prototype.remove_indent=function(u){for(var s=this.__lines.length;u<s;)this.__lines[u]._remove_indent(),u++;this.current_line._remove_wrap_indent()},v.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},v.prototype.just_added_newline=function(){return this.current_line.is_empty()},v.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},v.prototype.ensure_empty_line_above=function(u,s){for(var i=this.__lines.length-2;i>=0;){var A=this.__lines[i];if(A.is_empty())break;if(A.item(0).indexOf(u)!==0&&A.item(-1)!==s){this.__lines.splice(i+1,0,new R(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},e.exports.Output=v},function(e){function R(g,v,u,s){this.type=g,this.text=v,this.comments_before=null,this.newlines=u||0,this.whitespace_before=s||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}e.exports.Token=R},function(e,R){var g="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",v="\\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",s="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",i="(?:\\\\u[0-9a-fA-F]{4}|["+g+u+"])",A="(?:\\\\u[0-9a-fA-F]{4}|["+v+u+s+"])*";R.identifier=new RegExp(i+A,"g"),R.identifierStart=new RegExp(i),R.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+v+u+s+"])+");var o=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;R.newline=/[\n\r\u2028\u2029]/,R.lineBreak=new RegExp(`\r
|
|
|`+R.newline.source),R.allLineBreaks=new RegExp(R.lineBreak.source,"g")},function(e,R,g){var v=g(6).Options,u=["before-newline","after-newline","preserve-newline"];function s(i){v.call(this,i,"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 o=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var a=0;a<o.length;a++)o[a]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=o[a];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)}s.prototype=new v,e.exports.Options=s},function(e){function R(u,s){this.raw_options=g(u,s),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}R.prototype._get_array=function(u,s){var i=this.raw_options[u],A=s||[];return typeof i=="object"?i!==null&&typeof i.concat=="function"&&(A=i.concat()):typeof i=="string"&&(A=i.split(/[^a-zA-Z0-9_\/\-]+/)),A},R.prototype._get_boolean=function(u,s){var i=this.raw_options[u],A=i===void 0?!!s:!!i;return A},R.prototype._get_characters=function(u,s){var i=this.raw_options[u],A=s||"";return typeof i=="string"&&(A=i.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),A},R.prototype._get_number=function(u,s){var i=this.raw_options[u];s=parseInt(s,10),isNaN(s)&&(s=0);var A=parseInt(i,10);return isNaN(A)&&(A=s),A},R.prototype._get_selection=function(u,s,i){var A=this._get_selection_list(u,s,i);if(A.length!==1)throw new Error("Invalid Option Value: The option '"+u+`' can only be one of the following values:
|
|
`+s+`
|
|
You passed in: '`+this.raw_options[u]+"'");return A[0]},R.prototype._get_selection_list=function(u,s,i){if(!s||s.length===0)throw new Error("Selection list cannot be empty.");if(i=i||[s[0]],!this._is_valid_selection(i,s))throw new Error("Invalid Default Value!");var A=this._get_array(u,i);if(!this._is_valid_selection(A,s))throw new Error("Invalid Option Value: The option '"+u+`' can contain only the following values:
|
|
`+s+`
|
|
You passed in: '`+this.raw_options[u]+"'");return A},R.prototype._is_valid_selection=function(u,s){return u.length&&s.length&&!u.some(function(i){return s.indexOf(i)===-1})};function g(u,s){var i={};u=v(u);var A;for(A in u)A!==s&&(i[A]=u[A]);if(s&&u[s])for(A in u[s])i[A]=u[s][A];return i}function v(u){var s={},i;for(i in u){var A=i.replace(/-/g,"_");s[A]=u[i]}return s}e.exports.Options=R,e.exports.normalizeOpts=v,e.exports.mergeOpts=g},function(e,R,g){var v=g(8).InputScanner,u=g(9).Tokenizer,s=g(9).TOKEN,i=g(13).Directives,A=g(4),o=g(12).Pattern,a=g(14).TemplatablePattern;function r(N,T){return T.indexOf(N)!==-1}var t={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:s.START,RAW:s.RAW,EOF:s.EOF},y=new i(/\/\*/,/\*\//),_=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,E=/[0-9]/,B=/[^\d\.]/,C=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),h=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";h=h.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),h="\\?\\.(?!\\d) "+h,h=h.replace(/ /g,"|");var n=new RegExp(h),l="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),d=l.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),b=new RegExp("^(?:"+d.join("|")+")$"),m,c=function(N,T){u.call(this,N,T),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var P=new o(this._input),W=new a(this._input).read_options(this._options);this.__patterns={template:W,identifier:W.starting_with(A.identifier).matching(A.identifierMatch),number:P.matching(_),punct:P.matching(n),comment:P.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:P.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:P.matching(/<!--/),html_comment_end:P.matching(/-->/),include:P.starting_with(/#include/).until_after(A.lineBreak),shebang:P.starting_with(/#!/).until_after(A.lineBreak),xml:P.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:W.until(/['\\\n\r\u2028\u2029]/),double_quote:W.until(/["\\\n\r\u2028\u2029]/),template_text:W.until(/[`\\$]/),template_expression:W.until(/[`}\\]/)}};c.prototype=new u,c.prototype._is_comment=function(N){return N.type===t.COMMENT||N.type===t.BLOCK_COMMENT||N.type===t.UNKNOWN},c.prototype._is_opening=function(N){return N.type===t.START_BLOCK||N.type===t.START_EXPR},c.prototype._is_closing=function(N,T){return(N.type===t.END_BLOCK||N.type===t.END_EXPR)&&T&&(N.text==="]"&&T.text==="["||N.text===")"&&T.text==="("||N.text==="}"&&T.text==="{")},c.prototype._reset=function(){m=!1},c.prototype._get_next_token=function(N,T){var P=null;this._readWhitespace();var W=this._input.peek();return W===null?this._create_token(t.EOF,""):(P=P||this._read_non_javascript(W),P=P||this._read_string(W),P=P||this._read_word(N),P=P||this._read_singles(W),P=P||this._read_comment(W),P=P||this._read_regexp(W,N),P=P||this._read_xml(W,N),P=P||this._read_punctuation(),P=P||this._create_token(t.UNKNOWN,this._input.next()),P)},c.prototype._read_word=function(N){var T;if(T=this.__patterns.identifier.read(),T!=="")return T=T.replace(A.allLineBreaks,`
|
|
`),!(N.type===t.DOT||N.type===t.RESERVED&&(N.text==="set"||N.text==="get"))&&b.test(T)?(T==="in"||T==="of")&&(N.type===t.WORD||N.type===t.STRING)?this._create_token(t.OPERATOR,T):this._create_token(t.RESERVED,T):this._create_token(t.WORD,T);if(T=this.__patterns.number.read(),T!=="")return this._create_token(t.WORD,T)},c.prototype._read_singles=function(N){var T=null;return N==="("||N==="["?T=this._create_token(t.START_EXPR,N):N===")"||N==="]"?T=this._create_token(t.END_EXPR,N):N==="{"?T=this._create_token(t.START_BLOCK,N):N==="}"?T=this._create_token(t.END_BLOCK,N):N===";"?T=this._create_token(t.SEMICOLON,N):N==="."&&B.test(this._input.peek(1))?T=this._create_token(t.DOT,N):N===","&&(T=this._create_token(t.COMMA,N)),T&&this._input.next(),T},c.prototype._read_punctuation=function(){var N=this.__patterns.punct.read();if(N!=="")return N==="="?this._create_token(t.EQUALS,N):N==="?."?this._create_token(t.DOT,N):this._create_token(t.OPERATOR,N)},c.prototype._read_non_javascript=function(N){var T="";if(N==="#"){if(this._is_first_token()&&(T=this.__patterns.shebang.read(),T))return this._create_token(t.UNKNOWN,T.trim()+`
|
|
`);if(T=this.__patterns.include.read(),T)return this._create_token(t.UNKNOWN,T.trim()+`
|
|
`);N=this._input.next();var P="#";if(this._input.hasNext()&&this._input.testChar(E)){do N=this._input.next(),P+=N;while(this._input.hasNext()&&N!=="#"&&N!=="=");return N==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(P+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(P+="{}",this._input.next(),this._input.next())),this._create_token(t.WORD,P)}this._input.back()}else if(N==="<"&&this._is_first_token()){if(T=this.__patterns.html_comment_start.read(),T){for(;this._input.hasNext()&&!this._input.testChar(A.newline);)T+=this._input.next();return m=!0,this._create_token(t.COMMENT,T)}}else if(m&&N==="-"&&(T=this.__patterns.html_comment_end.read(),T))return m=!1,this._create_token(t.COMMENT,T);return null},c.prototype._read_comment=function(N){var T=null;if(N==="/"){var P="";if(this._input.peek(1)==="*"){P=this.__patterns.block_comment.read();var W=y.get_directives(P);W&&W.ignore==="start"&&(P+=y.readIgnored(this._input)),P=P.replace(A.allLineBreaks,`
|
|
`),T=this._create_token(t.BLOCK_COMMENT,P),T.directives=W}else this._input.peek(1)==="/"&&(P=this.__patterns.comment.read(),T=this._create_token(t.COMMENT,P))}return T},c.prototype._read_string=function(N){if(N==="`"||N==="'"||N==='"'){var T=this._input.next();return this.has_char_escapes=!1,N==="`"?T+=this._read_string_recursive("`",!0,"${"):T+=this._read_string_recursive(N),this.has_char_escapes&&this._options.unescape_strings&&(T=L(T)),this._input.peek()===N&&(T+=this._input.next()),T=T.replace(A.allLineBreaks,`
|
|
`),this._create_token(t.STRING,T)}return null},c.prototype._allow_regexp_or_xml=function(N){return N.type===t.RESERVED&&r(N.text,["return","case","throw","else","do","typeof","yield"])||N.type===t.END_EXPR&&N.text===")"&&N.opened.previous.type===t.RESERVED&&r(N.opened.previous.text,["if","while","for"])||r(N.type,[t.COMMENT,t.START_EXPR,t.START_BLOCK,t.START,t.END_BLOCK,t.OPERATOR,t.EQUALS,t.EOF,t.SEMICOLON,t.COMMA])},c.prototype._read_regexp=function(N,T){if(N==="/"&&this._allow_regexp_or_xml(T)){for(var P=this._input.next(),W=!1,U=!1;this._input.hasNext()&&(W||U||this._input.peek()!==N)&&!this._input.testChar(A.newline);)P+=this._input.peek(),W?W=!1:(W=this._input.peek()==="\\",this._input.peek()==="["?U=!0:this._input.peek()==="]"&&(U=!1)),this._input.next();return this._input.peek()===N&&(P+=this._input.next(),P+=this._input.read(A.identifier)),this._create_token(t.STRING,P)}return null},c.prototype._read_xml=function(N,T){if(this._options.e4x&&N==="<"&&this._allow_regexp_or_xml(T)){var P="",W=this.__patterns.xml.read_match();if(W){for(var U=W[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),Y=U.indexOf("{")===0,re=0;W;){var me=!!W[1],ge=W[2],Oe=!!W[W.length-1]||ge.slice(0,8)==="![CDATA[";if(!Oe&&(ge===U||Y&&ge.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(me?--re:++re),P+=W[0],re<=0)break;W=this.__patterns.xml.read_match()}return W||(P+=this._input.match(/[\s\S]*/g)[0]),P=P.replace(A.allLineBreaks,`
|
|
`),this._create_token(t.STRING,P)}}return null};function L(N){for(var T="",P=0,W=new v(N),U=null;W.hasNext();)if(U=W.match(/([\s]|[^\\]|\\\\)+/g),U&&(T+=U[0]),W.peek()==="\\"){if(W.next(),W.peek()==="x")U=W.match(/x([0-9A-Fa-f]{2})/g);else if(W.peek()==="u")U=W.match(/u([0-9A-Fa-f]{4})/g);else{T+="\\",W.hasNext()&&(T+=W.next());continue}if(!U)return N;if(P=parseInt(U[1],16),P>126&&P<=255&&U[0].indexOf("x")===0)return N;if(P>=0&&P<32){T+="\\"+U[0];continue}else P===34||P===39||P===92?T+="\\"+String.fromCharCode(P):T+=String.fromCharCode(P)}return T}c.prototype._read_string_recursive=function(N,T,P){var W,U;N==="'"?U=this.__patterns.single_quote:N==='"'?U=this.__patterns.double_quote:N==="`"?U=this.__patterns.template_text:N==="}"&&(U=this.__patterns.template_expression);for(var Y=U.read(),re="";this._input.hasNext();){if(re=this._input.next(),re===N||!T&&A.newline.test(re)){this._input.back();break}else re==="\\"&&this._input.hasNext()?(W=this._input.peek(),W==="x"||W==="u"?this.has_char_escapes=!0:W==="\r"&&this._input.peek(1)===`
|
|
`&&this._input.next(),re+=this._input.next()):P&&(P==="${"&&re==="$"&&this._input.peek()==="{"&&(re+=this._input.next()),P===re&&(N==="`"?re+=this._read_string_recursive("}",T,"`"):re+=this._read_string_recursive("`",T,"${"),this._input.hasNext()&&(re+=this._input.next())));re+=U.read(),Y+=re}return Y},e.exports.Tokenizer=c,e.exports.TOKEN=t,e.exports.positionable_operators=C.slice(),e.exports.line_starters=l.slice()},function(e){var R=RegExp.prototype.hasOwnProperty("sticky");function g(v){this.__input=v||"",this.__input_length=this.__input.length,this.__position=0}g.prototype.restart=function(){this.__position=0},g.prototype.back=function(){this.__position>0&&(this.__position-=1)},g.prototype.hasNext=function(){return this.__position<this.__input_length},g.prototype.next=function(){var v=null;return this.hasNext()&&(v=this.__input.charAt(this.__position),this.__position+=1),v},g.prototype.peek=function(v){var u=null;return v=v||0,v+=this.__position,v>=0&&v<this.__input_length&&(u=this.__input.charAt(v)),u},g.prototype.__match=function(v,u){v.lastIndex=u;var s=v.exec(this.__input);return s&&!(R&&v.sticky)&&(s.index!==u&&(s=null)),s},g.prototype.test=function(v,u){return u=u||0,u+=this.__position,u>=0&&u<this.__input_length?!!this.__match(v,u):!1},g.prototype.testChar=function(v,u){var s=this.peek(u);return v.lastIndex=0,s!==null&&v.test(s)},g.prototype.match=function(v){var u=this.__match(v,this.__position);return u?this.__position+=u[0].length:u=null,u},g.prototype.read=function(v,u,s){var i="",A;return v&&(A=this.match(v),A&&(i+=A[0])),u&&(A||!v)&&(i+=this.readUntil(u,s)),i},g.prototype.readUntil=function(v,u){var s="",i=this.__position;v.lastIndex=this.__position;var A=v.exec(this.__input);return A?(i=A.index,u&&(i+=A[0].length)):i=this.__input_length,s=this.__input.substring(this.__position,i),this.__position=i,s},g.prototype.readUntilAfter=function(v){return this.readUntil(v,!0)},g.prototype.get_regexp=function(v,u){var s=null,i="g";return u&&R&&(i="y"),typeof v=="string"&&v!==""?s=new RegExp(v,i):v&&(s=new RegExp(v.source,i)),s},g.prototype.get_literal_regexp=function(v){return RegExp(v.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},g.prototype.peekUntilAfter=function(v){var u=this.__position,s=this.readUntilAfter(v);return this.__position=u,s},g.prototype.lookBack=function(v){var u=this.__position-1;return u>=v.length&&this.__input.substring(u-v.length,u).toLowerCase()===v},e.exports.InputScanner=g},function(e,R,g){var v=g(8).InputScanner,u=g(3).Token,s=g(10).TokenStream,i=g(11).WhitespacePattern,A={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},o=function(a,r){this._input=new v(a),this._options=r||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new i(this._input)};o.prototype.tokenize=function(){this._input.restart(),this.__tokens=new s,this._reset();for(var a,r=new u(A.START,""),t=null,y=[],_=new s;r.type!==A.EOF;){for(a=this._get_next_token(r,t);this._is_comment(a);)_.add(a),a=this._get_next_token(r,t);_.isEmpty()||(a.comments_before=_,_=new s),a.parent=t,this._is_opening(a)?(y.push(t),t=a):t&&this._is_closing(a,t)&&(a.opened=t,t.closed=a,t=y.pop(),a.parent=t),a.previous=r,r.next=a,this.__tokens.add(a),r=a}return this.__tokens},o.prototype._is_first_token=function(){return this.__tokens.isEmpty()},o.prototype._reset=function(){},o.prototype._get_next_token=function(a,r){this._readWhitespace();var t=this._input.read(/.+/g);return t?this._create_token(A.RAW,t):this._create_token(A.EOF,"")},o.prototype._is_comment=function(a){return!1},o.prototype._is_opening=function(a){return!1},o.prototype._is_closing=function(a,r){return!1},o.prototype._create_token=function(a,r){var t=new u(a,r,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return t},o.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},e.exports.Tokenizer=o,e.exports.TOKEN=A},function(e){function R(g){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=g}R.prototype.restart=function(){this.__position=0},R.prototype.isEmpty=function(){return this.__tokens_length===0},R.prototype.hasNext=function(){return this.__position<this.__tokens_length},R.prototype.next=function(){var g=null;return this.hasNext()&&(g=this.__tokens[this.__position],this.__position+=1),g},R.prototype.peek=function(g){var v=null;return g=g||0,g+=this.__position,g>=0&&g<this.__tokens_length&&(v=this.__tokens[g]),v},R.prototype.add=function(g){this.__parent_token&&(g.parent=this.__parent_token),this.__tokens.push(g),this.__tokens_length+=1},e.exports.TokenStream=R},function(e,R,g){var v=g(12).Pattern;function u(s,i){v.call(this,s,i),i?this._line_regexp=this._input.get_regexp(i._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}u.prototype=new v,u.prototype.__set_whitespace_patterns=function(s,i){s+="\\t ",i+="\\n\\r",this._match_pattern=this._input.get_regexp("["+s+i+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+i+"]")},u.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var s=this._input.read(this._match_pattern);if(s===" ")this.whitespace_before_token=" ";else if(s){var i=this.__split(this._newline_regexp,s);this.newline_count=i.length-1,this.whitespace_before_token=i[this.newline_count]}return s},u.prototype.matching=function(s,i){var A=this._create();return A.__set_whitespace_patterns(s,i),A._update(),A},u.prototype._create=function(){return new u(this._input,this)},u.prototype.__split=function(s,i){s.lastIndex=0;for(var A=0,o=[],a=s.exec(i);a;)o.push(i.substring(A,a.index)),A=a.index+a[0].length,a=s.exec(i);return A<i.length?o.push(i.substring(A,i.length)):o.push(""),o},e.exports.WhitespacePattern=u},function(e){function R(g,v){this._input=g,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,v&&(this._starting_pattern=this._input.get_regexp(v._starting_pattern,!0),this._match_pattern=this._input.get_regexp(v._match_pattern,!0),this._until_pattern=this._input.get_regexp(v._until_pattern),this._until_after=v._until_after)}R.prototype.read=function(){var g=this._input.read(this._starting_pattern);return(!this._starting_pattern||g)&&(g+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),g},R.prototype.read_match=function(){return this._input.match(this._match_pattern)},R.prototype.until_after=function(g){var v=this._create();return v._until_after=!0,v._until_pattern=this._input.get_regexp(g),v._update(),v},R.prototype.until=function(g){var v=this._create();return v._until_after=!1,v._until_pattern=this._input.get_regexp(g),v._update(),v},R.prototype.starting_with=function(g){var v=this._create();return v._starting_pattern=this._input.get_regexp(g,!0),v._update(),v},R.prototype.matching=function(g){var v=this._create();return v._match_pattern=this._input.get_regexp(g,!0),v._update(),v},R.prototype._create=function(){return new R(this._input,this)},R.prototype._update=function(){},e.exports.Pattern=R},function(e){function R(g,v){g=typeof g=="string"?g:g.source,v=typeof v=="string"?v:v.source,this.__directives_block_pattern=new RegExp(g+/ beautify( \w+[:]\w+)+ /.source+v,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(g+/\sbeautify\signore:end\s/.source+v,"g")}R.prototype.get_directives=function(g){if(!g.match(this.__directives_block_pattern))return null;var v={};this.__directive_pattern.lastIndex=0;for(var u=this.__directive_pattern.exec(g);u;)v[u[1]]=u[2],u=this.__directive_pattern.exec(g);return v},R.prototype.readIgnored=function(g){return g.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=R},function(e,R,g){var v=g(12).Pattern,u={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function s(i,A){v.call(this,i,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 o=new v(i);this.__patterns={handlebars_comment:o.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:o.starting_with(/{{{/).until_after(/}}}/),handlebars:o.starting_with(/{{/).until_after(/}}/),php:o.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:o.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:o.starting_with(/{%/).until_after(/%}/),django_value:o.starting_with(/{{/).until_after(/}}/),django_comment:o.starting_with(/{#/).until_after(/#}/),smarty:o.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:o.starting_with(/{\*/).until_after(/\*}/),smarty_literal:o.starting_with(/{literal}/).until_after(/{\/literal}/)}}s.prototype=new v,s.prototype._create=function(){return new s(this._input,this)},s.prototype._update=function(){this.__set_templated_pattern()},s.prototype.disable=function(i){var A=this._create();return A._disabled[i]=!0,A._update(),A},s.prototype.read_options=function(i){var A=this._create();for(var o in u)A._disabled[o]=i.templating.indexOf(o)===-1;return A._update(),A},s.prototype.exclude=function(i){var A=this._create();return A._excluded[i]=!0,A._update(),A},s.prototype.read=function(){var i="";this._match_pattern?i=this._input.read(this._starting_pattern):i=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),i+=A,A=this._read_template();return this._until_after&&(i+=this._input.readUntilAfter(this._until_pattern)),i},s.prototype.__set_templated_pattern=function(){var i=[];this._disabled.php||i.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||i.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||i.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(i.push(this.__patterns.django._starting_pattern.source),i.push(this.__patterns.django_value._starting_pattern.source),i.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||i.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&i.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+i.join("|")+")")},s.prototype._read_template=function(){var i="",A=this._input.peek();if(A==="<"){var o=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&o==="?"&&(i=i||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&o==="%"&&(i=i||this.__patterns.erb.read())}else A==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(i=i||this.__patterns.handlebars_comment.read(),i=i||this.__patterns.handlebars_unescaped.read(),i=i||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(i=i||this.__patterns.django_value.read()),this._excluded.django||(i=i||this.__patterns.django_comment.read(),i=i||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(i=i||this.__patterns.smarty_comment.read(),i=i||this.__patterns.smarty_literal.read(),i=i||this.__patterns.smarty.read()));return i},e.exports.TemplatablePattern=s}],O={};function X(e){var R=O[e];if(R!==void 0)return R.exports;var g=O[e]={exports:{}};return F[e](g,g.exports,X),g.exports}var M=X(0);D=M})();var V=D;!(se=[],G=function(){return{js_beautify:V}}.apply(_e,se),G!==void 0&&(ct.exports=G))})()},"6eGT":function(ct,_e,j){"use strict";function se(G){return null}_e.a=se},"746U":function(ct,_e,j){"use strict";j.d(_e,"f",function(){return se}),j.d(_e,"l",function(){return G}),j.d(_e,"k",function(){return D}),j.d(_e,"j",function(){return V}),j.d(_e,"g",function(){return F}),j.d(_e,"m",function(){return O}),j.d(_e,"h",function(){return X}),j.d(_e,"n",function(){return M}),j.d(_e,"c",function(){return e}),j.d(_e,"a",function(){return R}),j.d(_e,"i",function(){return g}),j.d(_e,"o",function(){return v}),j.d(_e,"e",function(){return i}),j.d(_e,"d",function(){return A}),j.d(_e,"p",function(){return o}),j.d(_e,"b",function(){return a});function se(r){return Array.isArray(r)}function G(r){return typeof r=="string"}function D(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)&&!(r instanceof RegExp)&&!(r instanceof Date)}function V(r){return typeof r=="number"&&!isNaN(r)}function F(r){return r===!0||r===!1}function O(r){return typeof r=="undefined"}function X(r){return!M(r)}function M(r){return O(r)||r===null}function e(r,t){if(!r)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function R(r){if(M(r))throw new Error("Assertion Failed: argument is undefined or null");return r}function g(r){return typeof r=="function"}function v(r,t){const y=Math.min(r.length,t.length);for(let _=0;_<y;_++)u(r[_],t[_])}function u(r,t){if(G(t)){if(typeof r!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(g(t)){try{if(r instanceof t)return}catch(y){}if(!M(r)&&r.constructor===t)return;if(t.length===1&&t.call(void 0,r)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function s(r){let t=[],y=Object.getPrototypeOf(r);for(;Object.prototype!==y;)t=t.concat(Object.getOwnPropertyNames(y)),y=Object.getPrototypeOf(y);return t}function i(r){const t=[];for(const y of s(r))typeof r[y]=="function"&&t.push(y);return t}function A(r,t){const y=E=>function(){const B=Array.prototype.slice.call(arguments,0);return t(E,B)};let _={};for(const E of r)_[E]=y(E);return _}function o(r){return r===null?void 0:r}function a(r,t="Unreachable"){throw new Error(t)}},"815F":function(ct,_e,j){"use strict";j.d(_e,"e",function(){return X}),j.d(_e,"c",function(){return e}),j.d(_e,"d",function(){return R}),j.d(_e,"a",function(){return v}),j.d(_e,"f",function(){return u}),j.d(_e,"b",function(){return s});var se=j("KQm4"),G=j("VTBJ"),D=j("Ff2n"),V=j("Zm9Q"),F=j("Kwbf"),O=j("OZM5");function X(i,A){return i!=null?i:A}function M(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],A=new Map;function o(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(a||[]).forEach(function(t){var y=t.key,_=t.children;Object(F.a)(y!=null,"Tree node must have a certain key: [".concat(r).concat(y,"]"));var E=String(y);Object(F.a)(!A.has(E)||y===null||y===void 0,"Same 'key' exist in the Tree: ".concat(E)),A.set(E,!0),o(_,"".concat(r).concat(E," > "))})}o(i)}function e(i){function A(o){var a=Object(V.a)(o);return a.map(function(r){if(!Object(O.i)(r))return Object(F.a)(!r,"Tree/TreeNode can only accept TreeNode as children."),null;var t=r.key,y=r.props,_=y.children,E=Object(D.a)(y,["children"]),B=Object(G.a)({key:t},E),C=A(_);return C.length&&(B.children=C),B}).filter(function(r){return r})}return A(i)}function R(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],o=new Set(A===!0?[]:A),a=[];function r(t){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return t.map(function(_,E){var B=Object(O.h)(y?y.pos:"0",E),C=X(_.key,B),h=Object(G.a)(Object(G.a)({},_),{},{parent:y,pos:B,children:null,data:_,isStart:[].concat(Object(se.a)(y?y.isStart:[]),[E===0]),isEnd:[].concat(Object(se.a)(y?y.isEnd:[]),[E===t.length-1])});return a.push(h),A===!0||o.has(C)?h.children=r(_.children||[],h):h.children=[],h})}return r(i),a}function g(i,A,o){var a;o?typeof o=="string"?a=function(y){return y[o]}:typeof o=="function"&&(a=function(y){return o(y)}):a=function(y,_){return X(y.key,_)};function r(t,y,_){var E=t?t.children:i,B=t?Object(O.h)(_.pos,y):"0";if(t){var C=a(t,B),h={node:t,index:y,pos:B,key:C,parentPos:_.node?_.pos:null,level:_.level+1};A(h)}E&&E.forEach(function(n,l){r(n,l,{node:t,pos:B,level:_?_.level+1:-1})})}r(null)}function v(i){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=A.initWrapper,a=A.processEntity,r=A.onProcessFinished,t=arguments.length>2?arguments[2]:void 0,y={},_={},E={posEntities:y,keyEntities:_};return o&&(E=o(E)||E),g(i,function(B){var C=B.node,h=B.index,n=B.pos,l=B.key,d=B.parentPos,b=B.level,m={node:C,index:h,key:l,pos:n,level:b},c=X(l,n);y[n]=m,_[c]=m,m.parent=y[d],m.parent&&(m.parent.children=m.parent.children||[],m.parent.children.push(m)),a&&a(m,E)},t),r&&r(E),E}function u(i,A){var o=A.expandedKeys,a=A.selectedKeys,r=A.loadedKeys,t=A.loadingKeys,y=A.checkedKeys,_=A.halfCheckedKeys,E=A.dragOverNodeKey,B=A.dropPosition,C=A.keyEntities,h=C[i],n={eventKey:i,expanded:o.indexOf(i)!==-1,selected:a.indexOf(i)!==-1,loaded:r.indexOf(i)!==-1,loading:t.indexOf(i)!==-1,checked:y.indexOf(i)!==-1,halfChecked:_.indexOf(i)!==-1,pos:String(h?h.pos:""),dragOver:E===i&&B===0,dragOverGapTop:E===i&&B===-1,dragOverGapBottom:E===i&&B===1};return n}function s(i){var A=i.data,o=i.expanded,a=i.selected,r=i.checked,t=i.loaded,y=i.loading,_=i.halfChecked,E=i.dragOver,B=i.dragOverGapTop,C=i.dragOverGapBottom,h=i.pos,n=i.active,l=Object(G.a)(Object(G.a)({},A),{},{expanded:o,selected:a,checked:r,loaded:t,loading:y,halfChecked:_,dragOver:E,dragOverGapTop:B,dragOverGapBottom:C,pos:h,active:n});return"props"in l||Object.defineProperty(l,"props",{get:function(){return Object(F.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),i}}),l}},"8HAY":function(ct,_e,j){"use strict";j.d(_e,"a",function(){return F}),j.d(_e,"b",function(){return O}),j.d(_e,"d",function(){return X}),j.d(_e,"e",function(){return M}),j.d(_e,"c",function(){return e});var se=j("MI8n"),G=j("pmY6"),D=j("3/fG"),V=function(R,g,v,u){function s(i){return i instanceof v?i:new v(function(A){A(i)})}return new(v||(v=Promise))(function(i,A){function o(t){try{r(u.next(t))}catch(y){A(y)}}function a(t){try{r(u.throw(t))}catch(y){A(y)}}function r(t){t.done?i(t.value):s(t.value).then(o,a)}r((u=u.apply(R,g||[])).next())})};class F extends G.a{constructor(R,g="",v="",u=!0,s){super();this._onDidChange=this._register(new se.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=R,this._label=g,this._cssClass=v,this._enabled=u,this._actionCallback=s}get id(){return this._id}get label(){return this._label}set label(R){this._setLabel(R)}_setLabel(R){this._label!==R&&(this._label=R,this._onDidChange.fire({label:R}))}get tooltip(){return this._tooltip||""}set tooltip(R){this._setTooltip(R)}_setTooltip(R){this._tooltip!==R&&(this._tooltip=R,this._onDidChange.fire({tooltip:R}))}get class(){return this._cssClass}set class(R){this._setClass(R)}_setClass(R){this._cssClass!==R&&(this._cssClass=R,this._onDidChange.fire({class:R}))}get enabled(){return this._enabled}set enabled(R){this._setEnabled(R)}_setEnabled(R){this._enabled!==R&&(this._enabled=R,this._onDidChange.fire({enabled:R}))}get checked(){return this._checked}set checked(R){this._setChecked(R)}_setChecked(R){this._checked!==R&&(this._checked=R,this._onDidChange.fire({checked:R}))}run(R,g){return V(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(R))})}}class O extends G.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new se.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new se.b),this.onDidRun=this._onDidRun.event}run(R,g){return V(this,void 0,void 0,function*(){if(!R.enabled)return;this._onBeforeRun.fire({action:R});let v;try{yield this.runAction(R,g)}catch(u){v=u}this._onDidRun.fire({action:R,error:v})})}runAction(R,g){return V(this,void 0,void 0,function*(){yield R.run(g)})}}class X extends F{constructor(R){super(X.ID,R,R?"separator text":"separator");this.checked=!1,this.enabled=!1}}X.ID="vs.actions.separator";class M{constructor(R,g,v,u){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=R,this.label=g,this.class=u,this._actions=v}get actions(){return this._actions}dispose(){}run(){return V(this,void 0,void 0,function*(){})}}class e extends F{constructor(){super(e.ID,D.a("submenu.empty","(empty)"),void 0,!1)}}e.ID="vs.actions.empty"},"8hTe":function(ct,_e,j){ct.exports={button:"button___1wy9m"}},"9Bee":function(ct,_e,j){"use strict";var se=j("DYRE"),G=j("zeV3"),D=j("+L6B"),V=j("2/Rp"),F=j("k1fw"),O=j("9og8"),X=j("tJVT"),M=j("WmNS"),e=j.n(M),R=j("q1tI"),g=j.n(R),v=j("vg9a"),u=j("DlQD"),s=j.n(u),i=j("rUJ1");function A(Q,p){var w=Q.match(/^(\s+)(?:```)/);if(w===null)return p;var H=w[1];return p.split(`
|
|
`).map(function(Z){var K=Z.match(/^\s+/);if(K===null)return Z;var ye=Object(X.a)(K,1),He=ye[0];return He.length>=H.length?Z.slice(H.length):Z}).join(`
|
|
`)}var o=[],a=["<ul>"],r=new s.a.Renderer,t=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function y(){o.length=0,a=["<ul>"]}var _={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function E(Q,p,w,H){if(p>=Q.length||Q[p].level<=w)return p;var Z=Q[p];H.push("<li><a href='#"+Z.anchor+"'>"+Z.text+"</a>"),p++;var K=[];return p=E(Q,p,Z.level,K),K.length>0&&(H.push("<ul>"),K.forEach(function(ye){H.push(ye)}),H.push("</ul>")),H.push("</li>"),p=E(Q,p,w,H),p}function B(){return E(o,0,0,a),a.push("</ul>"),a.join("")}var C={heading:function(p){var w=t.exec(p);if(w)return{type:"heading",raw:w[0],depth:w[1].length,text:w[2]}},fences:function(p){var w=this.rules.block.fences.exec(p);if(w){var H=w[0],Z=A(H,w[3]||""),K=w[2]?w[2].trim():w[2];if(["latex","katex","math"].indexOf(K)>=0){var ye=l(),He=Z;Z=ye,d[ye]={type:"block",expression:He}}return{type:"code",raw:H,lang:K,text:Z}}}},h=/(?:\${2})([^\n`]+?)(?:\${2})/gi,n=0,l=function(){return"__special_katext_id_".concat(n++,"__")},d={};function b(){return d}function m(){n=0,d={}}function c(Q){return Q=Q.replace(h,function(p,w){var H=l();return d[H]={type:"inline",expression:w},H}),Q}var L=r.listitem;r.listitem=function(Q){return L(c(Q))};var N=r.paragraph;r.paragraph=function(Q){return N(c(Q))};var T=r.tablecell;r.tablecell=function(Q,p){return T(c(Q),p)},r.code=function(Q,p,w){var H=(p||"").match(/\S*/)[0];return H?["latex","katex","math"].indexOf(H)>=0?"<p class='editormd-tex'>".concat(Q,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(p,'">').concat(w?Q:Object(i.escape)(Q,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(w?Q:Object(i.escape)(Q,!0))+"</code></pre>"},r.heading=function(Q,p,w){var H=this.options.headerPrefix+w.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return o.push({anchor:H,level:p,text:Q}),"<h"+p+' id="'+H+'">'+Q+"</h"+p+">"},s.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),s.a.use({tokenizer:C,renderer:r});var P=s.a,W=j("SJMd"),U=j("ulZh"),Y=j.n(U),re=j("m3rI"),me=j("Oy/b"),ge=j("p5ED"),Oe=j("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 Se=function(Q,p){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,H){w.__proto__=H}||function(w,H){for(var Z in H)Object.prototype.hasOwnProperty.call(H,Z)&&(w[Z]=H[Z])})(Q,p)};function Be(Q,p){function w(){this.constructor=Q}Se(Q,p),Q.prototype=p===null?Object.create(p):(w.prototype=p.prototype,new w)}function Ne(Q,p,w,H){return new(w||(w=Promise))(function(Z,K){function ye(ot){try{rt(H.next(ot))}catch(Ge){K(Ge)}}function He(ot){try{rt(H.throw(ot))}catch(Ge){K(Ge)}}function rt(ot){var Ge;ot.done?Z(ot.value):(Ge=ot.value,Ge instanceof w?Ge:new w(function(_t){_t(Ge)})).then(ye,He)}rt((H=H.apply(Q,p||[])).next())})}function ke(Q,p){var w,H,Z,K,ye={label:0,sent:function(){if(1&Z[0])throw Z[1];return Z[1]},trys:[],ops:[]};return K={next:He(0),throw:He(1),return:He(2)},typeof Symbol=="function"&&(K[Symbol.iterator]=function(){return this}),K;function He(rt){return function(ot){return function(Ge){if(w)throw new TypeError("Generator is already executing.");for(;ye;)try{if(w=1,H&&(Z=2&Ge[0]?H.return:Ge[0]?H.throw||((Z=H.return)&&Z.call(H),0):H.next)&&!(Z=Z.call(H,Ge[1])).done)return Z;switch(H=0,Z&&(Ge=[2&Ge[0],Z.value]),Ge[0]){case 0:case 1:Z=Ge;break;case 4:return ye.label++,{value:Ge[1],done:!1};case 5:ye.label++,H=Ge[1],Ge=[0];continue;case 7:Ge=ye.ops.pop(),ye.trys.pop();continue;default:if(!(Z=ye.trys,(Z=Z.length>0&&Z[Z.length-1])||Ge[0]!==6&&Ge[0]!==2)){ye=0;continue}if(Ge[0]===3&&(!Z||Ge[1]>Z[0]&&Ge[1]<Z[3])){ye.label=Ge[1];break}if(Ge[0]===6&&ye.label<Z[1]){ye.label=Z[1],Z=Ge;break}if(Z&&ye.label<Z[2]){ye.label=Z[2],ye.ops.push(Ge);break}Z[2]&&ye.ops.pop(),ye.trys.pop();continue}Ge=p.call(Q,ye)}catch(_t){Ge=[6,_t],H=0}finally{w=Z=0}if(5&Ge[0])throw Ge[1];return{value:Ge[0]?Ge[1]:void 0,done:!0}}([rt,ot])}}}function Ce(){for(var Q=0,p=0,w=arguments.length;p<w;p++)Q+=arguments[p].length;var H=Array(Q),Z=0;for(p=0;p<w;p++)for(var K=arguments[p],ye=0,He=K.length;ye<He;ye++,Z++)H[Z]=K[ye];return H}var ve=function(){function Q(){}return Q.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Q.setAttributes=function(p,w){for(var H=0,Z=w;H<Z.length;H++){var K=Z[H],ye=K[0],He=K[1];p.setAttribute(ye,He)}},Q.createRect=function(p,w,H){var Z=document.createElementNS("http://www.w3.org/2000/svg","rect");return Z.setAttribute("width",p.toString()),Z.setAttribute("height",w.toString()),H&&Q.setAttributes(Z,H),Z},Q.createLine=function(p,w,H,Z,K){var ye=document.createElementNS("http://www.w3.org/2000/svg","line");return ye.setAttribute("x1",p.toString()),ye.setAttribute("y1",w.toString()),ye.setAttribute("x2",H.toString()),ye.setAttribute("y2",Z.toString()),K&&Q.setAttributes(ye,K),ye},Q.createPolygon=function(p,w){var H=document.createElementNS("http://www.w3.org/2000/svg","polygon");return H.setAttribute("points",p),w&&Q.setAttributes(H,w),H},Q.createCircle=function(p,w){var H=document.createElementNS("http://www.w3.org/2000/svg","circle");return H.setAttribute("cx",(p/2).toString()),H.setAttribute("cy",(p/2).toString()),H.setAttribute("r",p.toString()),w&&Q.setAttributes(H,w),H},Q.createEllipse=function(p,w,H){var Z=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Z.setAttribute("cx",(p/2).toString()),Z.setAttribute("cy",(w/2).toString()),Z.setAttribute("rx",(p/2).toString()),Z.setAttribute("ry",(w/2).toString()),H&&Q.setAttributes(Z,H),Z},Q.createGroup=function(p){var w=document.createElementNS("http://www.w3.org/2000/svg","g");return p&&Q.setAttributes(w,p),w},Q.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Q.createMarker=function(p,w,H,Z,K,ye,He){var rt=document.createElementNS("http://www.w3.org/2000/svg","marker");return Q.setAttributes(rt,[["id",p],["orient",w],["markerWidth",H.toString()],["markerHeight",Z.toString()],["refX",K.toString()],["refY",ye.toString()]]),rt.appendChild(He),rt},Q.createText=function(p){var w=document.createElementNS("http://www.w3.org/2000/svg","text");return w.setAttribute("x","0"),w.setAttribute("y","0"),p&&Q.setAttributes(w,p),w},Q.createTSpan=function(p,w){var H=document.createElementNS("http://www.w3.org/2000/svg","tspan");return H.textContent=p,w&&Q.setAttributes(H,w),H},Q.createImage=function(p){var w=document.createElementNS("http://www.w3.org/2000/svg","image");return p&&Q.setAttributes(w,p),w},Q.createPoint=function(p,w){var H=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return H.x=p,H.y=w,H},Q.createPath=function(p,w){var H=document.createElementNS("http://www.w3.org/2000/svg","path");return H.setAttribute("d",p),w&&Q.setAttributes(H,w),H},Q}(),Ye=function(){function Q(){}return Q.addKey=function(p){Q.key=p},Object.defineProperty(Q,"isLicensed",{get:function(){return!!Q.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Q.key)},enumerable:!1,configurable:!0}),Q}(),ht=function(){function Q(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Q.prototype.rasterize=function(p,w,H){var Z=this;return new Promise(function(K){var ye=H!==void 0?H:document.createElement("canvas");p===null&&(Z.markersOnly=!0,Z.naturalSize=!1);var He=document.createElementNS("http://www.w3.org/2000/svg","svg");He.setAttribute("xmlns","http://www.w3.org/2000/svg"),He.setAttribute("width",w.width.baseVal.valueAsString),He.setAttribute("height",w.height.baseVal.valueAsString),He.setAttribute("viewBox","0 0 "+w.viewBox.baseVal.width.toString()+" "+w.viewBox.baseVal.height.toString()),He.innerHTML=w.innerHTML,Z.naturalSize===!0?(He.width.baseVal.value=p.naturalWidth,He.height.baseVal.value=p.naturalHeight):Z.width!==void 0&&Z.height!==void 0&&(He.width.baseVal.value=Z.width,He.height.baseVal.value=Z.height),ye.width=He.width.baseVal.value,ye.height=He.height.baseVal.value;var rt=He.outerHTML,ot=ye.getContext("2d");Z.markersOnly!==!0&&ot.drawImage(p,0,0,ye.width,ye.height);var Ge=window.URL,_t=new Image(ye.width,ye.height);_t.setAttribute("crossOrigin","anonymous");var vt=new Blob([rt],{type:"image/svg+xml"}),Tt=Ge.createObjectURL(vt);_t.onload=function(){ot.drawImage(_t,0,0),Ge.revokeObjectURL(Tt);var Pt=ye.toDataURL(Z.imageType,Z.imageQuality);K(Pt)},_t.src=Tt})},Q}(),at=function(){},We=function(){function Q(p){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+p+"_"}return Object.defineProperty(Q.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Q.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(Q.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Q.prototype.addClass=function(p){return this.styleSheet===void 0&&this.addStyleSheet(),p.name=""+this.classNamePrefix+p.localName,this.classes.push(p),this.styleSheet.sheet.insertRule("."+p.name+" {"+p.style+"}",this.styleSheet.sheet.cssRules.length),p},Q.prototype.addRule=function(p){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(p),this.styleSheet.sheet.insertRule(p.selector+" {"+p.style+"}",this.styleSheet.sheet.cssRules.length)},Q.prototype.addStyleSheet=function(){var p;this.styleSheet=document.createElement("style"),((p=this.styleSheetRoot)!==null&&p!==void 0?p: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 ne("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new ne("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},Q.prototype.removeStyleSheet=function(){var p;this.styleSheet&&(((p=this.styleSheetRoot)!==null&&p!==void 0?p:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Q}(),it=function(Q,p){this.selector=Q,this.style=p},ne=function(Q,p){this.localName=Q,this.style=p},J=function(){function Q(p,w,H,Z,K){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=p,this.displayMode=w,this.markerItems=H,this.uiStyleSettings=Z,this.styles=K,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Q.prototype.show=function(p){var w=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=p,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var H=document.createElement("div");H.className=this.toolbarBlockStyleClass.name,H.style.whiteSpace="nowrap",this.uiContainer.appendChild(H),this.addActionButton(H,'<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(H,'<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(H,'<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(H,'<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(H,'<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(H,'<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(H,'<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(H,'<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(K){var ye=document.createElement("div");ye.className=""+w.toolbarButtonStyleClass.name,ye.setAttribute("data-type-name",K.typeName),ye.innerHTML=K.icon,ye.addEventListener("click",function(){w.markerToolbarButtonClicked(ye,K)}),w.buttons.push(ye),w.markerButtons.push(ye)}),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 Z=document.createElement("div");Z.className=this.toolbarBlockStyleClass.name,Z.style.whiteSpace="nowrap",Z.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Z),this.addActionButton(Z,'<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(Z,'<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()},Q.prototype.addButtonClickListener=function(p){this.buttonClickListeners.push(p)},Q.prototype.removeButtonClickListener=function(p){this.buttonClickListeners.indexOf(p)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(p),1)},Q.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Q.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var p=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var w=0;w<this.markerButtons.length;w++)w<p||w===p&&this.markerButtons.length-1===p?this.markerButtonBlock.appendChild(this.markerButtons[w]):(w===p&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[w]))}},Q.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")},Q.prototype.resetButtonStyles=function(){var p=this;this.buttons.forEach(function(w){w.className=w.className.replace(p.uiStyleSettings.toolbarButtonStyleColorsClassName?p.uiStyleSettings.toolbarButtonStyleColorsClassName:p.toolbarButtonStyleColorsClass.name,"").trim(),w.className=w.className.replace(p.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?p.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:p.toolbarActiveButtonStyleColorsClass.name,"").trim(),w.className+=" "+(p.uiStyleSettings.toolbarButtonStyleColorsClassName?p.uiStyleSettings.toolbarButtonStyleColorsClassName:p.toolbarButtonStyleColorsClass.name)})},Q.prototype.addActionButton=function(p,w,H){var Z=this,K=document.createElement("div");switch(K.className=""+this.toolbarButtonStyleClass.name,K.innerHTML=w,K.setAttribute("data-action",H),K.addEventListener("click",function(){Z.actionToolbarButtonClicked(K,H)}),H){case"select":K.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":K.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":K.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":K.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":K.style.fill=this.uiStyleSettings.closeButtonColor}p.appendChild(K),this.buttons.push(K)},Q.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ne("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 ne("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ne("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ne("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 ne("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var p=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ne("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*p)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*p)+`px;
|
|
padding: `+p+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ne("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ne("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+`
|
|
`))},Q.prototype.markerToolbarButtonClicked=function(p,w){this.setActiveButton(p),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(H){return H("marker",w)}),this.markerButtonOverflowBlock.style.display="none"},Q.prototype.actionToolbarButtonClicked=function(p,w){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(H){return H("action",w)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Q.prototype.setActiveButton=function(p){this.resetButtonStyles(),p.className=p.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),p.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Q.prototype.setActiveMarkerButton=function(p){var w=this.markerButtons.find(function(H){return H.getAttribute("data-type-name")===p});w&&this.setActiveButton(w)},Q.prototype.setCurrentMarker=function(p){var w=this;this.currentMarker=p,this.buttons.filter(function(H){return/delete|notes/.test(H.getAttribute("data-action"))}).forEach(function(H){w.currentMarker===void 0?(H.style.fillOpacity="0.4",H.style.pointerEvents="none"):(H.style.fillOpacity="1",H.style.pointerEvents="all")})},Q}(),k=function(){function Q(p,w,H,Z){this.panels=[],this.panelButtons=[],this.markerjsContainer=p,this.displayMode=w,this.uiStyleSettings=H,this.styles=Z,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Q.prototype.addStyles=function(){var p;this.toolboxStyleClass=this.styles.addClass(new ne("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 ne("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var w=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ne("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ne("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ne("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 ne("toolbox-panel-row_colors",`
|
|
background-color: `+((p=this.uiStyleSettings.toolboxBackgroundColor)!==null&&p!==void 0?p:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ne("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*w)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*w)+`px;
|
|
padding: `+w+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ne("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ne("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;
|
|
`))},Q.prototype.show=function(p){var w;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=p,this.uiContainer.className=this.toolboxStyleClass.name+" "+((w=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&w!==void 0?w:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Q.prototype.setPanelButtons=function(p){var w,H,Z=this;this.panels=p,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((w=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&w!==void 0?w:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((H=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&H!==void 0?H:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(K){var ye;K.uiStyleSettings=Z.uiStyleSettings;var He=document.createElement("div");He.className=Z.toolboxButtonStyleClass.name+" "+((ye=Z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ye!==void 0?ye:Z.toolboxButtonStyleColorsClass.name),He.innerHTML=K.icon,He.title=K.title,He.addEventListener("click",function(){Z.panelButtonClick(K)}),Z.panelButtons.push(He),Z.buttonRow.appendChild(He)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Q.prototype.panelButtonClick=function(p){var w=this,H=-1;if(p!==this.activePanel){H=this.panels.indexOf(p),this.panelRow.innerHTML="";var Z=p.getUi();Z.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Z),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=p}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){w.displayMode==="inline"?w.panelRow.style.display="none":w.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(K,ye){var He,rt;K.className=w.toolboxButtonStyleClass.name+" "+(ye===H?""+((He=w.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&He!==void 0?He:w.toolboxActiveButtonStyleColorsClass.name):""+((rt=w.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&rt!==void 0?rt:w.toolboxButtonStyleColorsClass.name))})},Q}(),$=function(Q,p){this.title=Q,this.icon=p},q=function(Q){function p(w,H,Z,K){var ye=Q.call(this,w,K||'<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 ye.colors=[],ye.addTransparent=!1,ye.colorBoxes=[],ye.colors=H,ye.currentColor=Z,ye.setCurrentColor=ye.setCurrentColor.bind(ye),ye.getColorBox=ye.getColorBox.bind(ye),ye}return Be(p,Q),p.prototype.getUi=function(){var w=this,H=document.createElement("div");return H.style.overflow="hidden",H.style.whiteSpace="nowrap",this.colors.forEach(function(Z){var K=w.getColorBox(Z);H.appendChild(K),w.colorBoxes.push(K)}),H},p.prototype.getColorBox=function(w){var H=this,Z=this.uiStyleSettings.toolbarHeight/4,K=this.uiStyleSettings.toolbarHeight-Z,ye=document.createElement("div");ye.style.display="inline-block",ye.style.boxSizing="content-box",ye.style.width=K-2+"px",ye.style.height=K-2+"px",ye.style.padding="1px",ye.style.marginRight="2px",ye.style.marginBottom="2px",ye.style.borderWidth="2px",ye.style.borderStyle="solid",ye.style.borderRadius=(K+2)/2+"px",ye.style.borderColor=w===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ye.addEventListener("click",function(){H.setCurrentColor(w,ye)});var He=document.createElement("div");return He.style.display="inline-block",He.style.width=K-2+"px",He.style.height=K-2+"px",He.style.backgroundColor=w,He.style.borderRadius=K/2+"px",w==="transparent"&&(He.style.fill=this.uiStyleSettings.toolboxAccentColor,He.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>`),ye.appendChild(He),ye},p.prototype.setCurrentColor=function(w,H){var Z=this;this.currentColor=w,this.colorBoxes.forEach(function(K){K.style.borderColor=K===H?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(w)},p}($),he=function(){function Q(p,w,H){this._state="new",this._isSelected=!1,this._container=p,this._overlayContainer=w,this.globalSettings=H,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Q.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Q.prototype.ownsTarget=function(p){return!1},Object.defineProperty(Q.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Q.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Q.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Q.prototype.pointerDown=function(p,w){},Q.prototype.dblClick=function(p,w){},Q.prototype.manipulate=function(p){},Q.prototype.pointerUp=function(p){this.stateChanged()},Q.prototype.dispose=function(){},Q.prototype.addMarkerVisualToContainer=function(p){this.container.childNodes.length>0?this.container.insertBefore(p,this.container.childNodes[0]):this.container.appendChild(p)},Q.prototype.getState=function(){return{typeName:Q.typeName,state:this.state,notes:this.notes}},Q.prototype.restoreState=function(p){this._state=p.state,this.notes=p.notes},Q.prototype.scale=function(p,w){},Q.prototype.colorChanged=function(p){this.onColorChanged&&this.onColorChanged(p),this.stateChanged()},Q.prototype.fillColorChanged=function(p){this.onFillColorChanged&&this.onFillColorChanged(p),this.stateChanged()},Q.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var p=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),p.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(p)&&this.onStateChanged(this)}},Q.typeName="MarkerBase",Q}(),pe=function(){function Q(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Q.prototype.findGripByVisual=function(p){return this.topLeft.ownsTarget(p)?this.topLeft:this.topCenter.ownsTarget(p)?this.topCenter:this.topRight.ownsTarget(p)?this.topRight:this.centerLeft.ownsTarget(p)?this.centerLeft:this.centerRight.ownsTarget(p)?this.centerRight:this.bottomLeft.ownsTarget(p)?this.bottomLeft:this.bottomCenter.ownsTarget(p)?this.bottomCenter:this.bottomRight.ownsTarget(p)?this.bottomRight:void 0},Q}(),Ke=function(){function Q(){this.GRIP_SIZE=10,this.visual=ve.createGroup(),this.visual.appendChild(ve.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ve.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Q.prototype.ownsTarget=function(p){return p===this.visual||p===this.visual.childNodes[0]||p===this.visual.childNodes[1]},Q}(),Je=function(){function Q(){}return Q.toITransformMatrix=function(p){return{a:p.a,b:p.b,c:p.c,d:p.d,e:p.e,f:p.f}},Q.toSVGMatrix=function(p,w){return p.a=w.a,p.b=w.b,p.c=w.c,p.d=w.d,p.e=w.e,p.f=w.f,p},Q}(),ze=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.left=0,K.top=0,K.width=0,K.height=0,K.defaultSize={x:50,y:20},K.offsetX=0,K.offsetY=0,K.rotationAngle=0,K.CB_DISTANCE=10,K._suppressMarkerCreateEvent=!1,K.container.transform.baseVal.appendItem(ve.createTransform()),K.setupControlBox(),K}return Be(p,Q),Object.defineProperty(p.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"visual",{get:function(){return this._visual},set:function(w){this._visual=w;var H=ve.createTransform();this._visual.transform.baseVal.appendItem(H)},enumerable:!1,configurable:!0}),p.prototype.ownsTarget=function(w){return!!Q.prototype.ownsTarget.call(this,w)||!!(this.controlGrips.findGripByVisual(w)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(w))},p.prototype.pointerDown=function(w,H){Q.prototype.pointerDown.call(this,w,H),this.state==="new"&&(this.left=w.x,this.top=w.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Z=this.unrotatePoint(w);if(this.manipulationStartX=Z.x,this.manipulationStartY=Z.y,this.offsetX=Z.x-this.left,this.offsetY=Z.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(H),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(H)){this.activeGrip=this.rotatorGrip;var K=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=K.x-this.width/2,this.top=K.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ye=this.container.transform.baseVal.getItem(0);ye.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ye,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},p.prototype.pointerUp=function(w){var H=this.state;Q.prototype.pointerUp.call(this,w),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(w),this._state="select",H==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},p.prototype.moveVisual=function(w){this.visual.style.transform="translate("+w.x+"px, "+w.y+"px)"},p.prototype.manipulate=function(w){var H=this.unrotatePoint(w);this.state==="creating"?this.resize(w):this.state==="move"?(this.left=this.manipulationStartLeft+(H.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(H.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(H):this.state==="rotate"&&this.rotate(w)},p.prototype.resize=function(w){var H=this.manipulationStartLeft,Z=this.manipulationStartWidth,K=this.manipulationStartTop,ye=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:H=this.manipulationStartLeft+w.x-this.manipulationStartX,Z=this.manipulationStartWidth+this.manipulationStartLeft-H;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Z=this.manipulationStartWidth+w.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:K=this.manipulationStartTop+w.y-this.manipulationStartY,ye=this.manipulationStartHeight+this.manipulationStartTop-K;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ye=this.manipulationStartHeight+w.y-this.manipulationStartY}Z>=0?(this.left=H,this.width=Z):(this.left=H+Z,this.width=-Z),ye>=0?(this.top=K,this.height=ye):(this.top=K+ye,this.height=-ye),this.setSize()},p.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},p.prototype.rotate=function(w){if(Math.abs(w.x-this.centerX)>.1){var H=Math.sign(w.x-this.centerX);this.rotationAngle=180*Math.atan((w.y-this.centerY)/(w.x-this.centerX))/Math.PI+90*H,this.applyRotation()}},p.prototype.applyRotation=function(){var w=this.container.transform.baseVal.getItem(0);w.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(w,0)},p.prototype.rotatePoint=function(w){if(this.rotationAngle===0)return w;var H=this.container.getCTM(),Z=ve.createPoint(w.x,w.y);return{x:(Z=Z.matrixTransform(H)).x,y:Z.y}},p.prototype.unrotatePoint=function(w){if(this.rotationAngle===0)return w;var H=this.container.getCTM();H=H.inverse();var Z=ve.createPoint(w.x,w.y);return{x:(Z=Z.matrixTransform(H)).x,y:Z.y}},p.prototype.select=function(){Q.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},p.prototype.deselect=function(){Q.prototype.deselect.call(this),this.controlBox.style.display="none"},p.prototype.setupControlBox=function(){this.controlBox=ve.createGroup();var w=ve.createTransform();w.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(w),this.container.appendChild(this.controlBox),this.controlRect=ve.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=ve.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 pe,this.addControlGrips(),this.controlBox.style.display="none"},p.prototype.adjustControlBox=function(){var w=this.controlBox.transform.baseVal.getItem(0);w.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(w,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()},p.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()},p.prototype.createGrip=function(){var w=new Ke;return w.visual.transform.baseVal.appendItem(ve.createTransform()),this.controlBox.appendChild(w.visual),w},p.prototype.positionGrips=function(){var w=this.controlGrips.topLeft.GRIP_SIZE,H=-w/2,Z=H,K=(this.width+this.CB_DISTANCE)/2-w/2,ye=(this.height+this.CB_DISTANCE)/2-w/2,He=this.height+this.CB_DISTANCE-w/2,rt=this.width+this.CB_DISTANCE-w/2;this.positionGrip(this.controlGrips.topLeft.visual,H,Z),this.positionGrip(this.controlGrips.topCenter.visual,K,Z),this.positionGrip(this.controlGrips.topRight.visual,rt,Z),this.positionGrip(this.controlGrips.centerLeft.visual,H,ye),this.positionGrip(this.controlGrips.centerRight.visual,rt,ye),this.positionGrip(this.controlGrips.bottomLeft.visual,H,He),this.positionGrip(this.controlGrips.bottomCenter.visual,K,He),this.positionGrip(this.controlGrips.bottomRight.visual,rt,He),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,K,Z-3*this.CB_DISTANCE)},p.prototype.positionGrip=function(w,H,Z){var K=w.transform.baseVal.getItem(0);K.setTranslate(H,Z),w.transform.baseVal.replaceItem(K,0)},p.prototype.hideControlBox=function(){this.controlBox.style.display="none"},p.prototype.showControlBox=function(){this.controlBox.style.display=""},p.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Je.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Je.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Q.prototype.getState.call(this))},p.prototype.restoreState=function(w){Q.prototype.restoreState.call(this,w);var H=w;this.left=H.left,this.top=H.top,this.width=H.width,this.height=H.height,this.rotationAngle=H.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Je.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,H.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Je.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,H.containerTransformMatrix))},p.prototype.scale=function(w,H){Q.prototype.scale.call(this,w,H);var Z=this.rotatePoint({x:this.left,y:this.top}),K=this.unrotatePoint({x:Z.x*w,y:Z.y*H});this.left=K.x,this.top=K.y,this.width=this.width*w,this.height=this.height*H,this.adjustControlBox()},p}(he),Ze=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.fillColor="transparent",K.strokeColor="transparent",K.strokeWidth=0,K.strokeDasharray="",K.opacity=1,K.setStrokeColor=K.setStrokeColor.bind(K),K.setFillColor=K.setFillColor.bind(K),K.setStrokeWidth=K.setStrokeWidth.bind(K),K.setStrokeDasharray=K.setStrokeDasharray.bind(K),K.createVisual=K.createVisual.bind(K),K}return Be(p,Q),p.prototype.ownsTarget=function(w){return!(!Q.prototype.ownsTarget.call(this,w)&&w!==this.visual)},p.prototype.createVisual=function(){this.visual=ve.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)},p.prototype.pointerDown=function(w,H){Q.prototype.pointerDown.call(this,w,H),this.state==="new"&&(this.createVisual(),this.moveVisual(w),this._state="creating")},p.prototype.manipulate=function(w){Q.prototype.manipulate.call(this,w)},p.prototype.resize=function(w){Q.prototype.resize.call(this,w),this.setSize()},p.prototype.setSize=function(){Q.prototype.setSize.call(this),ve.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},p.prototype.pointerUp=function(w){Q.prototype.pointerUp.call(this,w),this.setSize()},p.prototype.setStrokeColor=function(w){this.strokeColor=w,this.visual&&ve.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(w),this.stateChanged()},p.prototype.setFillColor=function(w){this.fillColor=w,this.visual&&ve.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},p.prototype.setStrokeWidth=function(w){this.strokeWidth=w,this.visual&&ve.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},p.prototype.setStrokeDasharray=function(w){this.strokeDasharray=w,this.visual&&ve.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},p.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Q.prototype.getState.call(this))},p.prototype.restoreState=function(w){var H=w;this.fillColor=H.fillColor,this.strokeColor=H.strokeColor,this.strokeWidth=H.strokeWidth,this.strokeDasharray=H.strokeDasharray,this.opacity=H.opacity,this.createVisual(),Q.prototype.restoreState.call(this,w),this.setSize()},p.prototype.scale=function(w,H){Q.prototype.scale.call(this,w,H),this.setSize()},p.title="Rectangle marker",p}(ze),nt=function(Q){function p(w,H,Z,K){var ye=Q.call(this,w,K||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ye.widths=[],ye.widthBoxes=[],ye.widths=H,ye.currentWidth=Z,ye.setCurrentWidth=ye.setCurrentWidth.bind(ye),ye}return Be(p,Q),p.prototype.getUi=function(){var w=this,H=document.createElement("div");return H.style.display="flex",H.style.overflow="hidden",H.style.flexGrow="2",this.widths.forEach(function(Z){var K=document.createElement("div");K.style.display="flex",K.style.flexGrow="2",K.style.alignItems="center",K.style.justifyContent="space-between",K.style.padding="5px",K.style.borderWidth="2px",K.style.borderStyle="solid",K.style.borderColor=Z===w.currentWidth?w.uiStyleSettings.toolboxAccentColor:"transparent",K.addEventListener("click",function(){w.setCurrentWidth(Z,K)}),H.appendChild(K);var ye=document.createElement("div");ye.innerText=Z.toString(),ye.style.marginRight="5px",K.appendChild(ye);var He=document.createElement("div");He.style.minHeight="20px",He.style.flexGrow="2",He.style.display="flex",He.style.alignItems="center";var rt=document.createElement("hr");rt.style.minWidth="20px",rt.style.border="0px",rt.style.borderTop=Z+"px solid "+w.uiStyleSettings.toolboxColor,rt.style.flexGrow="2",He.appendChild(rt),K.appendChild(He),w.widthBoxes.push(K)}),H},p.prototype.setCurrentWidth=function(w,H){var Z=this;this.currentWidth=w,this.widthBoxes.forEach(function(K){K.style.borderColor=K===H?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},p}($),pt=function(Q){function p(w,H,Z,K){var ye=Q.call(this,w,K||'<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 ye.styles=[],ye.styleBoxes=[],ye.styles=H,ye.currentStyle=Z,ye.setCurrentStyle=ye.setCurrentStyle.bind(ye),ye}return Be(p,Q),p.prototype.getUi=function(){var w=this,H=document.createElement("div");return H.style.display="flex",H.style.overflow="hidden",H.style.flexGrow="2",this.styles.forEach(function(Z){var K=document.createElement("div");K.style.display="flex",K.style.alignItems="center",K.style.justifyContent="space-between",K.style.padding="5px",K.style.borderWidth="2px",K.style.borderStyle="solid",K.style.overflow="hidden",K.style.maxWidth=100/w.styles.length-5+"%",K.style.borderColor=Z===w.currentStyle?w.uiStyleSettings.toolboxAccentColor:"transparent",K.addEventListener("click",function(){w.setCurrentStyle(Z,K)}),H.appendChild(K);var ye=document.createElement("div");ye.style.minHeight="20px",ye.style.flexGrow="2",ye.style.overflow="hidden";var He=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+w.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Z!==""?'stroke-dasharray="'+Z+'"':"")+` />
|
|
</svg>`;ye.innerHTML=He,K.appendChild(ye),w.styleBoxes.push(K)}),H},p.prototype.setCurrentStyle=function(w,H){var Z=this;this.currentStyle=w,this.styleBoxes.forEach(function(K){K.style.borderColor=K===H?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},p}($),xe=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.strokeColor=Z.defaultColor,K.strokeWidth=Z.defaultStrokeWidth,K.strokeDasharray=Z.defaultStrokeDasharray,K.strokePanel=new q("Line color",Z.defaultColorSet,Z.defaultColor),K.strokePanel.onColorChanged=K.setStrokeColor,K.strokeWidthPanel=new nt("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),K.strokeWidthPanel.onWidthChanged=K.setStrokeWidth,K.strokeStylePanel=new pt("Line style",Z.defaultStrokeDasharrays,Z.defaultStrokeDasharray),K.strokeStylePanel.onStyleChanged=K.setStrokeDasharray,K}return Be(p,Q),Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var w=Q.prototype.getState.call(this);return w.typeName=p.typeName,w},p.typeName="FrameMarker",p.title="Frame marker",p.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',p}(Ze),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(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.x1=0,K.y1=0,K.x2=0,K.y2=0,K.defaultLength=50,K.manipulationStartX=0,K.manipulationStartY=0,K.manipulationStartX1=0,K.manipulationStartY1=0,K.manipulationStartX2=0,K.manipulationStartY2=0,K.setupControlBox(),K}return Be(p,Q),p.prototype.ownsTarget=function(w){return!!Q.prototype.ownsTarget.call(this,w)||!(!this.grip1.ownsTarget(w)&&!this.grip2.ownsTarget(w))},p.prototype.pointerDown=function(w,H){Q.prototype.pointerDown.call(this,w,H),this.manipulationStartX=w.x,this.manipulationStartY=w.y,this.state==="new"&&(this.x1=w.x,this.y1=w.y,this.x2=w.x,this.y2=w.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(H)?this.activeGrip=this.grip1:this.grip2.ownsTarget(H)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},p.prototype.pointerUp=function(w){var H=this.state;Q.prototype.pointerUp.call(this,w),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(w),this._state="select",H==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},p.prototype.adjustVisual=function(){},p.prototype.manipulate=function(w){this.state==="creating"?this.resize(w):this.state==="move"?(this.x1=this.manipulationStartX1+w.x-this.manipulationStartX,this.y1=this.manipulationStartY1+w.y-this.manipulationStartY,this.x2=this.manipulationStartX2+w.x-this.manipulationStartX,this.y2=this.manipulationStartY2+w.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(w)},p.prototype.resize=function(w){switch(this.activeGrip){case this.grip1:this.x1=w.x,this.y1=w.y;break;case this.grip2:case void 0:this.x2=w.x,this.y2=w.y}this.adjustVisual(),this.adjustControlBox()},p.prototype.select=function(){Q.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},p.prototype.deselect=function(){Q.prototype.deselect.call(this),this.controlBox.style.display="none"},p.prototype.setupControlBox=function(){this.controlBox=ve.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},p.prototype.adjustControlBox=function(){this.positionGrips()},p.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},p.prototype.createGrip=function(){var w=new Ke;return w.visual.transform.baseVal.appendItem(ve.createTransform()),this.controlBox.appendChild(w.visual),w},p.prototype.positionGrips=function(){var w=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-w/2,this.y1-w/2),this.positionGrip(this.grip2.visual,this.x2-w/2,this.y2-w/2)},p.prototype.positionGrip=function(w,H,Z){var K=w.transform.baseVal.getItem(0);K.setTranslate(H,Z),w.transform.baseVal.replaceItem(K,0)},p.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Q.prototype.getState.call(this))},p.prototype.restoreState=function(w){Q.prototype.restoreState.call(this,w);var H=w;this.x1=H.x1,this.y1=H.y1,this.x2=H.x2,this.y2=H.y2},p.prototype.scale=function(w,H){Q.prototype.scale.call(this,w,H),this.x1=this.x1*w,this.y1=this.y1*H,this.x2=this.x2*w,this.y2=this.y2*H,this.adjustVisual(),this.adjustControlBox()},p}(he),je=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.strokeColor="transparent",K.strokeWidth=0,K.strokeDasharray="",K.setStrokeColor=K.setStrokeColor.bind(K),K.setStrokeWidth=K.setStrokeWidth.bind(K),K.setStrokeDasharray=K.setStrokeDasharray.bind(K),K.strokeColor=Z.defaultColor,K.strokeWidth=Z.defaultStrokeWidth,K.strokeDasharray=Z.defaultStrokeDasharray,K.strokePanel=new q("Line color",Z.defaultColorSet,Z.defaultColor),K.strokePanel.onColorChanged=K.setStrokeColor,K.strokeWidthPanel=new nt("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),K.strokeWidthPanel.onWidthChanged=K.setStrokeWidth,K.strokeStylePanel=new pt("Line style",Z.defaultStrokeDasharrays,Z.defaultStrokeDasharray),K.strokeStylePanel.onStyleChanged=K.setStrokeDasharray,K}return Be(p,Q),p.prototype.ownsTarget=function(w){return!(!Q.prototype.ownsTarget.call(this,w)&&w!==this.visual&&w!==this.selectorLine&&w!==this.visibleLine)},p.prototype.createVisual=function(){this.visual=ve.createGroup(),this.selectorLine=ve.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ve.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)},p.prototype.pointerDown=function(w,H){Q.prototype.pointerDown.call(this,w,H),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},p.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()),ve.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ve.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ve.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},p.prototype.setStrokeColor=function(w){this.strokeColor=w,this.adjustVisual(),this.colorChanged(w)},p.prototype.setStrokeWidth=function(w){this.strokeWidth=w,this.adjustVisual()},p.prototype.setStrokeDasharray=function(w){this.strokeDasharray=w,this.adjustVisual(),this.stateChanged()},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var w=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Q.prototype.getState.call(this));return w.typeName=p.typeName,w},p.prototype.restoreState=function(w){Q.prototype.restoreState.call(this,w);var H=w;this.strokeColor=H.strokeColor,this.strokeWidth=H.strokeWidth,this.strokeDasharray=H.strokeDasharray,this.createVisual(),this.adjustVisual()},p.typeName="LineMarker",p.title="Line marker",p.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',p}(Qe),Le=function(Q){function p(w,H,Z,K){var ye=Q.call(this,w,K||'<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 ye.fonts=[],ye.fontBoxes=[],ye.fonts=H,ye.currentFont=Z,ye.setCurrentFont=ye.setCurrentFont.bind(ye),ye}return Be(p,Q),p.prototype.getUi=function(){var w=this,H=document.createElement("div");return H.style.overflow="hidden",H.style.flexGrow="2",this.fonts.forEach(function(Z){var K=document.createElement("div");K.style.display="inline-block",K.style.alignItems="center",K.style.justifyContent="space-between",K.style.padding="5px",K.style.borderWidth="2px",K.style.borderStyle="solid",K.style.overflow="hidden",K.style.maxWidth=100/w.fonts.length-5+"%",K.style.borderColor=Z===w.currentFont?w.uiStyleSettings.toolboxAccentColor:"transparent",K.addEventListener("click",function(){w.setCurrentFont(Z,K)}),H.appendChild(K);var ye=document.createElement("div");ye.style.display="flex",ye.style.minHeight="20px",ye.style.flexGrow="2",ye.style.fontFamily=Z,ye.style.overflow="hidden";var He=document.createElement("div");He.style.whiteSpace="nowrap",He.style.overflow="hidden",He.style.textOverflow="ellipsis",He.innerHTML="The quick brown fox jumps over the lazy dog",ye.appendChild(He),K.appendChild(ye),w.fontBoxes.push(K)}),H},p.prototype.setCurrentFont=function(w,H){var Z=this;this.currentFont=w,this.fontBoxes.forEach(function(K){K.style.borderColor=K===H?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},p}($),Fe=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.color="transparent",K.padding=5,K.DEFAULT_TEXT="your text here",K.text=K.DEFAULT_TEXT,K.isMoved=!1,K.color=Z.defaultColor,K.fontFamily=Z.defaultFontFamily,K.defaultSize={x:100,y:30},K.setColor=K.setColor.bind(K),K.setFont=K.setFont.bind(K),K.renderText=K.renderText.bind(K),K.sizeText=K.sizeText.bind(K),K.textEditDivClicked=K.textEditDivClicked.bind(K),K.showTextEditor=K.showTextEditor.bind(K),K.setSize=K.setSize.bind(K),K.positionTextEditor=K.positionTextEditor.bind(K),K.colorPanel=new q("Color",Z.defaultColorSet,Z.defaultColor),K.colorPanel.onColorChanged=K.setColor,K.fontFamilyPanel=new Le("Font",Z.defaultFontFamilies,Z.defaultFontFamily),K.fontFamilyPanel.onFontChanged=K.setFont,K}return Be(p,Q),p.prototype.ownsTarget=function(w){if(Q.prototype.ownsTarget.call(this,w)||w===this.visual||w===this.textElement||w===this.bgRectangle)return!0;var H=!1;return this.textElement.childNodes.forEach(function(Z){Z===w&&(H=!0)}),H},p.prototype.createVisual=function(){this.visual=ve.createGroup(),this.bgRectangle=ve.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ve.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ve.createTransform()),this.textElement.transform.baseVal.appendItem(ve.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},p.prototype.pointerDown=function(w,H){Q.prototype.pointerDown.call(this,w,H),this.isMoved=!1,this.pointerDownPoint=w,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(w),this._state="creating")},p.prototype.renderText=function(){var w=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(H){w.textElement.appendChild(ve.createTSpan(H.trim()===""?" ":H.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},p.prototype.getTextScale=function(){var w=this.textElement.getBBox(),H=1;if(w.width>0&&w.height>0){var Z=(1*this.width-this.width*this.padding*2/100)/w.width,K=(1*this.height-this.height*this.padding*2/100)/w.height;H=Math.min(Z,K)}return H},p.prototype.getTextPosition=function(w){var H=this.textElement.getBBox(),Z=0,K=0;return H.width>0&&H.height>0&&(Z=(this.width-H.width*w)/2,K=this.height/2-H.height*w/2),{x:Z,y:K}},p.prototype.sizeText=function(){var w=this.textElement.getBBox(),H=this.getTextScale(),Z=this.getTextPosition(H);Z.y-=w.y*H,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Z.x+"px, "+Z.y+"px) scale("+H+", "+H+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Z.x,Z.y),this.textElement.transform.baseVal.getItem(1).setScale(H,H))},p.prototype.manipulate=function(w){Q.prototype.manipulate.call(this,w),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(w.x-this.pointerDownPoint.x)>5||Math.abs(w.y-this.pointerDownPoint.y)>5)},p.prototype.resize=function(w){Q.prototype.resize.call(this,w),this.isMoved=!0,this.setSize(),this.sizeText()},p.prototype.setSize=function(){Q.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ve.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ve.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},p.prototype.pointerUp=function(w){var H=this.state;H==="creating"&&(this._suppressMarkerCreateEvent=!0),Q.prototype.pointerUp.call(this,w),this.setSize(),(H==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},p.prototype.showTextEditor=function(){var w=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(H){H.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var H=Number.parseFloat(w.textEditor.style.fontSize);w.textEditor.clientWidth>=Number.parseInt(w.textEditor.style.maxWidth)&&H>.9;)H-=.1,w.textEditor.style.fontSize=Math.max(H,.9)+"em"}),this.textEditor.addEventListener("keyup",function(H){H.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(H){if(H.clipboardData){var Z=H.clipboardData.getData("text"),K=window.getSelection();if(!K.rangeCount)return!1;K.deleteFromDocument(),K.getRangeAt(0).insertNode(document.createTextNode(Z)),H.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){w.textEditDivClicked(w.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},p.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var w=this.getTextScale(),H=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Z=this.textElement.getBBox(),K={x:Z.width*w,y:Z.height*w};H.x-=K.x/2,H.y-=K.y/2,this.textEditor.style.top=H.y+"px",this.textEditor.style.left=H.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-H.x+"px",this.textEditor.style.fontSize=Math.max(16*w,12)+"px",this.textElement.style.display="none"}},p.prototype.textEditDivClicked=function(w){this.text=w.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},p.prototype.select=function(){Q.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},p.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Q.prototype.deselect.call(this)},p.prototype.dblClick=function(w,H){Q.prototype.dblClick.call(this,w,H),this.showTextEditor()},p.prototype.setColor=function(w){this.textElement&&ve.setAttributes(this.textElement,[["fill",w]]),this.color=w,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(w)},p.prototype.setFont=function(w){this.textElement&&ve.setAttributes(this.textElement,[["font-family",w]]),this.fontFamily=w,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},p.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},p.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var w=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Q.prototype.getState.call(this));return w.typeName=p.typeName,w},p.prototype.restoreState=function(w){var H=w;this.color=H.color,this.fontFamily=H.fontFamily,this.padding=H.padding,this.text=H.text,this.createVisual(),Q.prototype.restoreState.call(this,w),this.setSize()},p.prototype.scale=function(w,H){Q.prototype.scale.call(this,w,H),this.setSize(),this.sizeText(),this.positionTextEditor()},p.typeName="TextMarker",p.title="Text marker",p.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>',p}(ze),we=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.color="transparent",K.lineWidth=3,K.drawing=!1,K.pixelRatio=1,K.color=Z.defaultColor,K.lineWidth=Z.defaultStrokeWidth,K.pixelRatio=Z.freehandPixelRatio,K.setColor=K.setColor.bind(K),K.addCanvas=K.addCanvas.bind(K),K.finishCreation=K.finishCreation.bind(K),K.setLineWidth=K.setLineWidth.bind(K),K.colorPanel=new q("Color",Z.defaultColorSet,Z.defaultColor),K.colorPanel.onColorChanged=K.setColor,K.lineWidthPanel=new nt("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),K.lineWidthPanel.onWidthChanged=K.setLineWidth,K}return Be(p,Q),p.prototype.ownsTarget=function(w){return!(!Q.prototype.ownsTarget.call(this,w)&&w!==this.visual&&w!==this.drawingImage)},p.prototype.createVisual=function(){this.visual=ve.createGroup(),this.drawingImage=ve.createImage(),this.visual.appendChild(this.drawingImage);var w=ve.createTransform();this.visual.transform.baseVal.appendItem(w),this.addMarkerVisualToContainer(this.visual)},p.prototype.pointerDown=function(w,H){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(w.x,w.y),this.drawing=!0):Q.prototype.pointerDown.call(this,w,H)},p.prototype.manipulate=function(w){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(w.x,w.y),this.canvasContext.stroke()):Q.prototype.manipulate.call(this,w)},p.prototype.resize=function(w){Q.prototype.resize.call(this,w),ve.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ve.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},p.prototype.pointerUp=function(w){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Q.prototype.pointerUp.call(this,w)},p.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)},p.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Q.prototype.select.call(this)},p.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Q.prototype.deselect.call(this)},p.prototype.finishCreation=function(){for(var w=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),H=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Z=H[0],K=H[1],ye=H[2],He=H[3],rt=!1,ot=0;ot<this.canvasElement.height;ot++)for(var Ge=0;Ge<this.canvasElement.width;Ge++)w.data[ot*this.canvasElement.width*4+4*Ge+3]>0&&(rt=!0,ot<K&&(K=ot),Ge<Z&&(Z=Ge),ot>He&&(He=ot),Ge>ye&&(ye=Ge));if(rt){this.left=Z/this.pixelRatio,this.top=K/this.pixelRatio,this.width=(ye-Z)/this.pixelRatio,this.height=(He-K)/this.pixelRatio;var _t=document.createElement("canvas");_t.width=ye-Z,_t.height=He-K,_t.getContext("2d").putImageData(this.canvasContext.getImageData(Z,K,ye-Z,He-K),0,0),this.drawingImgUrl=_t.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},p.prototype.setDrawingImage=function(){ve.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ve.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},p.prototype.setColor=function(w){this.color=w,this.colorChanged(w)},p.prototype.setLineWidth=function(w){this.lineWidth=w},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var w=Object.assign({drawingImgUrl:this.drawingImgUrl},Q.prototype.getState.call(this));return w.typeName=p.typeName,w},p.prototype.restoreState=function(w){this.createVisual(),Q.prototype.restoreState.call(this,w),this.drawingImgUrl=w.drawingImgUrl,this.setDrawingImage()},p.prototype.scale=function(w,H){Q.prototype.scale.call(this,w,H),this.setDrawingImage()},p.typeName="FreehandMarker",p.title="Freehand marker",p.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>',p}(ze),ue=function(Q){function p(w,H,Z){var K=Q.call(this,w,Z||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return K.typeBoxes=[],K.currentType=H,K.setCurrentType=K.setCurrentType.bind(K),K}return Be(p,Q),p.prototype.getUi=function(){var w=this,H=document.createElement("div");H.style.display="flex",H.style.overflow="hidden",H.style.flexGrow="2";for(var Z=function(He){var rt="both";switch(He){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===K.currentType?K.uiStyleSettings.toolboxAccentColor:"transparent",ot.addEventListener("click",function(){w.setCurrentType(rt,ot)}),H.appendChild(ot),rt==="both"||rt==="start"){var Ge=document.createElement("div");Ge.style.display="flex",Ge.style.alignItems="center",Ge.style.minHeight="20px",Ge.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="`+(K.uiStyleSettings!==void 0?K.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Ge.style.marginLeft="5px",ot.appendChild(Ge)}var _t=document.createElement("div");_t.style.display="flex",_t.style.alignItems="center",_t.style.minHeight="20px",_t.style.flexGrow="2";var vt=document.createElement("hr");if(vt.style.minWidth="20px",vt.style.border="0px",vt.style.borderTop="3px solid "+(K.uiStyleSettings!==void 0?K.uiStyleSettings.toolboxColor:"#eeeeee"),vt.style.flexGrow="2",_t.appendChild(vt),ot.appendChild(_t),rt==="both"||rt==="end"){var Tt=document.createElement("div");Tt.style.display="flex",Tt.style.alignItems="center",Tt.style.minHeight="20px",Tt.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="`+(K.uiStyleSettings!==void 0?K.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Tt.style.marginRight="5px",ot.appendChild(Tt)}K.typeBoxes.push(ot)},K=this,ye=0;ye<4;ye++)Z(ye);return H},p.prototype.setCurrentType=function(w,H){var Z=this;this.currentType=w,this.typeBoxes.forEach(function(K){K.style.borderColor=K===H?Z.uiStyleSettings!==void 0?Z.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},p}($),ce=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.arrowType="end",K.arrowBaseHeight=10,K.arrowBaseWidth=10,K.getArrowPoints=K.getArrowPoints.bind(K),K.setArrowType=K.setArrowType.bind(K),K.arrowTypePanel=new ue("Arrow type","end"),K.arrowTypePanel.onArrowTypeChanged=K.setArrowType,K}return Be(p,Q),p.prototype.ownsTarget=function(w){return!(!Q.prototype.ownsTarget.call(this,w)&&w!==this.arrow1&&w!==this.arrow2)},p.prototype.getArrowPoints=function(w,H){var Z=this.arrowBaseWidth+2*this.strokeWidth,K=this.arrowBaseHeight+2*this.strokeWidth;return w-Z/2+","+(H+K/2)+" "+w+","+(H-K/2)+" "+(w+Z/2)+","+(H+K/2)},p.prototype.createTips=function(){this.arrow1=ve.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ve.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ve.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ve.createTransform()),this.visual.appendChild(this.arrow2)},p.prototype.pointerDown=function(w,H){Q.prototype.pointerDown.call(this,w,H),this.state==="creating"&&this.createTips()},p.prototype.adjustVisual=function(){if(Q.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",ve.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ve.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var w=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),H=this.arrow1.transform.baseVal.getItem(0);H.setRotate(w,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(H,0);var Z=this.arrow2.transform.baseVal.getItem(0);Z.setRotate(w+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Z,0)}},p.prototype.setArrowType=function(w){this.arrowType=w,this.adjustVisual(),this.stateChanged()},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var w=Object.assign({arrowType:this.arrowType},Q.prototype.getState.call(this));return w.typeName=p.typeName,w},p.prototype.restoreState=function(w){Q.prototype.restoreState.call(this,w);var H=w;this.arrowType=H.arrowType,this.createTips(),this.adjustVisual()},p.typeName="ArrowMarker",p.title="Arrow marker",p.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',p}(je),te=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.fillColor=Z.defaultFillColor,K.strokeWidth=0,K.fillPanel=new q("Color",Z.defaultColorSet,Z.defaultFillColor),K.fillPanel.onColorChanged=K.setFillColor,K}return Be(p,Q),Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var w=Q.prototype.getState.call(this);return w.typeName=p.typeName,w},p.typeName="CoverMarker",p.title="Cover marker",p.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',p}(Ze),ie=function(Q){function p(w,H,Z,K){var ye=Q.call(this,w,K||'<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 ye.opacities=[],ye.opacityBoxes=[],ye.opacities=H,ye.currentOpacity=Z,ye.setCurrentOpacity=ye.setCurrentOpacity.bind(ye),ye}return Be(p,Q),p.prototype.getUi=function(){var w=this,H=document.createElement("div");return H.style.display="flex",H.style.overflow="hidden",H.style.flexGrow="2",H.style.justifyContent="space-between",this.opacities.forEach(function(Z){var K=document.createElement("div");K.style.display="flex",K.style.alignItems="center",K.style.justifyContent="center",K.style.padding="5px",K.style.borderWidth="2px",K.style.borderStyle="solid",K.style.borderColor=Z===w.currentOpacity?w.uiStyleSettings.toolboxAccentColor:"transparent",K.addEventListener("click",function(){w.setCurrentOpacity(Z,K)}),H.appendChild(K);var ye=document.createElement("div");ye.innerText=100*Z+"%",K.appendChild(ye),w.opacityBoxes.push(K)}),H},p.prototype.setCurrentOpacity=function(w,H){var Z=this;this.currentOpacity=w,this.opacityBoxes.forEach(function(K){K.style.borderColor=K===H?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},p}($),le=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.setOpacity=K.setOpacity.bind(K),K.fillColor=Z.defaultHighlightColor,K.strokeWidth=0,K.opacity=Z.defaultHighlightOpacity,K.fillPanel=new q("Color",Z.defaultColorSet,K.fillColor),K.fillPanel.onColorChanged=K.setFillColor,K.opacityPanel=new ie("Opacity",Z.defaultOpacitySteps,K.opacity),K.opacityPanel.onOpacityChanged=K.setOpacity,K}return Be(p,Q),p.prototype.setOpacity=function(w){this.opacity=w,this.visual&&ve.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var w=Q.prototype.getState.call(this);return w.typeName=p.typeName,w},p.typeName="HighlightMarker",p.title="Highlight marker",p.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>',p}(te),fe='<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>',Ie=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.bgColor="transparent",K.tipPosition={x:0,y:0},K.tipBase1Position={x:0,y:0},K.tipBase2Position={x:0,y:0},K.tipMoving=!1,K.color=Z.defaultStrokeColor,K.bgColor=Z.defaultFillColor,K.fontFamily=Z.defaultFontFamily,K.defaultSize={x:100,y:30},K.setBgColor=K.setBgColor.bind(K),K.getTipPoints=K.getTipPoints.bind(K),K.positionTip=K.positionTip.bind(K),K.setTipPoints=K.setTipPoints.bind(K),K.colorPanel=new q("Text color",Z.defaultColorSet,K.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>'),K.colorPanel.onColorChanged=K.setColor,K.bgColorPanel=new q("Fill color",Z.defaultColorSet,K.bgColor,fe),K.bgColorPanel.onColorChanged=K.setBgColor,K.fontFamilyPanel=new Le("Font",Z.defaultFontFamilies,Z.defaultFontFamily),K.fontFamilyPanel.onFontChanged=K.setFont,K.tipGrip=new Ke,K.tipGrip.visual.transform.baseVal.appendItem(ve.createTransform()),K.controlBox.appendChild(K.tipGrip.visual),K}return Be(p,Q),p.prototype.ownsTarget=function(w){return Q.prototype.ownsTarget.call(this,w)||this.tipGrip.ownsTarget(w)||this.tip===w},p.prototype.createTip=function(){ve.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ve.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},p.prototype.pointerDown=function(w,H){this.state==="new"&&Q.prototype.pointerDown.call(this,w,H),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(H)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Q.prototype.pointerDown.call(this,w,H)},p.prototype.pointerUp=function(w){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Q.prototype.pointerUp.call(this,w);else{var H=this.state==="creating";Q.prototype.pointerUp.call(this,w),this.setTipPoints(H),this.positionTip()}},p.prototype.manipulate=function(w){if(this.tipMoving){var H=this.unrotatePoint(w);this.tipPosition={x:H.x-this.manipulationStartLeft,y:H.y-this.manipulationStartTop},this.positionTip()}else Q.prototype.manipulate.call(this,w)},p.prototype.setBgColor=function(w){this.bgRectangle&&this.tip&&(ve.setAttributes(this.bgRectangle,[["fill",w]]),ve.setAttributes(this.tip,[["fill",w]])),this.bgColor=w,this.fillColorChanged(w)},p.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},p.prototype.setTipPoints=function(w){w===void 0&&(w=!1);var H=Math.min(this.height/2,15),Z=this.height/5;w&&(this.tipPosition={x:H+Z/2,y:this.height+20});var K=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?K<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Z=this.width/5,H=Math.min(this.width/2,15),this.tipBase1Position={x:H,y:0},this.tipBase2Position={x:H+Z,y:0}):(this.tipBase1Position={x:0,y:H},this.tipBase2Position={x:0,y:H+Z}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?K<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Z=this.width/5,H=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-H-Z,y:0},this.tipBase2Position={x:this.width-H,y:0}):(this.tipBase1Position={x:this.width,y:H},this.tipBase2Position={x:this.width,y:H+Z}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?K<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Z=this.width/5,H=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-H-Z,y:this.height},this.tipBase2Position={x:this.width-H,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-H-Z},this.tipBase2Position={x:this.width,y:this.height-H}):K<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Z=this.width/5,H=Math.min(this.width/2,15),this.tipBase1Position={x:H,y:this.height},this.tipBase2Position={x:H+Z,y:this.height}):(this.tipBase1Position={x:0,y:this.height-H},this.tipBase2Position={x:0,y:this.height-H-Z})},p.prototype.resize=function(w){Q.prototype.resize.call(this,w),this.positionTip()},p.prototype.positionTip=function(){ve.setAttributes(this.tip,[["points",this.getTipPoints()]]);var w=this.tipGrip.visual.transform.baseVal.getItem(0);w.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(w,0)},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),p.prototype.select=function(){this.positionTip(),Q.prototype.select.call(this)},p.prototype.getState=function(){var w=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Q.prototype.getState.call(this));return w.typeName=p.typeName,w},p.prototype.restoreState=function(w){var H=w;this.bgColor=H.bgColor,this.tipPosition=H.tipPosition,Q.prototype.restoreState.call(this,w),this.createTip(),this.setTipPoints()},p.prototype.scale=function(w,H){Q.prototype.scale.call(this,w,H),this.tipPosition={x:this.tipPosition.x*w,y:this.tipPosition.y*H},this.positionTip()},p.typeName="CalloutMarker",p.title="Callout marker",p.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>',p}(Fe),Pe=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.fillColor="transparent",K.strokeColor="transparent",K.strokeWidth=0,K.strokeDasharray="",K.opacity=1,K.strokeColor=Z.defaultColor,K.strokeWidth=Z.defaultStrokeWidth,K.strokeDasharray=Z.defaultStrokeDasharray,K.fillColor=Z.defaultFillColor,K.setStrokeColor=K.setStrokeColor.bind(K),K.setFillColor=K.setFillColor.bind(K),K.setStrokeWidth=K.setStrokeWidth.bind(K),K.setStrokeDasharray=K.setStrokeDasharray.bind(K),K.setOpacity=K.setOpacity.bind(K),K.createVisual=K.createVisual.bind(K),K.strokePanel=new q("Line color",Ce(Z.defaultColorSet,["transparent"]),Z.defaultColor),K.strokePanel.onColorChanged=K.setStrokeColor,K.fillPanel=new q("Fill color",Ce(Z.defaultColorSet,["transparent"]),K.fillColor,fe),K.fillPanel.onColorChanged=K.setFillColor,K.strokeWidthPanel=new nt("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),K.strokeWidthPanel.onWidthChanged=K.setStrokeWidth,K.strokeStylePanel=new pt("Line style",Z.defaultStrokeDasharrays,Z.defaultStrokeDasharray),K.strokeStylePanel.onStyleChanged=K.setStrokeDasharray,K.opacityPanel=new ie("Opacity",Z.defaultOpacitySteps,K.opacity),K.opacityPanel.onOpacityChanged=K.setOpacity,K}return Be(p,Q),p.prototype.ownsTarget=function(w){return!(!Q.prototype.ownsTarget.call(this,w)&&w!==this.visual)},p.prototype.createVisual=function(){this.visual=ve.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)},p.prototype.pointerDown=function(w,H){Q.prototype.pointerDown.call(this,w,H),this.state==="new"&&(this.createVisual(),this.moveVisual(w),this._state="creating")},p.prototype.manipulate=function(w){Q.prototype.manipulate.call(this,w)},p.prototype.resize=function(w){Q.prototype.resize.call(this,w),this.setSize()},p.prototype.setSize=function(){Q.prototype.setSize.call(this),ve.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},p.prototype.pointerUp=function(w){Q.prototype.pointerUp.call(this,w),this.setSize()},p.prototype.setStrokeColor=function(w){this.strokeColor=w,this.visual&&ve.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(w),this.stateChanged()},p.prototype.setFillColor=function(w){this.fillColor=w,this.visual&&ve.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(w),this.stateChanged()},p.prototype.setStrokeWidth=function(w){this.strokeWidth=w,this.visual&&ve.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},p.prototype.setStrokeDasharray=function(w){this.strokeDasharray=w,this.visual&&ve.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},p.prototype.setOpacity=function(w){this.opacity=w,this.visual&&ve.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var w=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Q.prototype.getState.call(this));return w.typeName=p.typeName,w},p.prototype.restoreState=function(w){var H=w;this.fillColor=H.fillColor,this.strokeColor=H.strokeColor,this.strokeWidth=H.strokeWidth,this.strokeDasharray=H.strokeDasharray,this.opacity=H.opacity,this.createVisual(),Q.prototype.restoreState.call(this,w),this.setSize()},p.prototype.scale=function(w,H){Q.prototype.scale.call(this,w,H),this.setSize()},p.typeName="EllipseMarker",p.title="Ellipse marker",p.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>',p}(ze),qe=function(Q){function p(w,H,Z){return Q.call(this,w,H,Z)||this}return Be(p,Q),Object.defineProperty(p.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),p.prototype.ownsTarget=function(w){return!(!Q.prototype.ownsTarget.call(this,w)&&w!==this.tip1&&w!==this.tip2)},p.prototype.createTips=function(){this.tip1=ve.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(ve.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ve.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(ve.createTransform()),this.visual.appendChild(this.tip2)},p.prototype.pointerDown=function(w,H){Q.prototype.pointerDown.call(this,w,H),this.state==="creating"&&this.createTips()},p.prototype.adjustVisual=function(){if(Q.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ve.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()]]),ve.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 w=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),H=this.tip1.transform.baseVal.getItem(0);H.setRotate(w,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(H,0);var Z=this.tip2.transform.baseVal.getItem(0);Z.setRotate(w+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Z,0)}},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var w=Q.prototype.getState.call(this);return w.typeName=p.typeName,w},p.prototype.restoreState=function(w){Q.prototype.restoreState.call(this,w),this.createTips(),this.adjustVisual()},p.typeName="MeasurementMarker",p.title="Measurement marker",p.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>',p}(je),dt=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.strokePanel.colors=Z.defaultColorSet,K.fillColor="transparent",K}return Be(p,Q),Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var w=Q.prototype.getState.call(this);return w.typeName=p.typeName,w},p.typeName="EllipseFrameMarker",p.title="Ellipse frame marker",p.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>',p}(Pe),lt=function(){function Q(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Q.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Q.prototype.addUndoStep=function(p){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(p)||(this.undoStack.push(p),JSON.stringify(this.lastRedoStep)!==JSON.stringify(p)&&this.redoStack.splice(0,this.redoStack.length))},Q.prototype.replaceLastUndoStep=function(p){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=p)},Q.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Q.prototype.undo=function(){if(this.undoStack.length>1){var p=this.undoStack.pop();return p!==void 0&&this.redoStack.push(p),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Q.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Q}(),st=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.strokeColor="transparent",K.strokeWidth=0,K.strokeDasharray="",K.curveX=0,K.curveY=0,K.manipulationStartCurveX=0,K.manipulationStartCurveY=0,K.setStrokeColor=K.setStrokeColor.bind(K),K.setStrokeWidth=K.setStrokeWidth.bind(K),K.setStrokeDasharray=K.setStrokeDasharray.bind(K),K.positionGrips=K.positionGrips.bind(K),K.addControlGrips=K.addControlGrips.bind(K),K.adjustVisual=K.adjustVisual.bind(K),K.setupControlBox=K.setupControlBox.bind(K),K.resize=K.resize.bind(K),K.strokeColor=Z.defaultColor,K.strokeWidth=Z.defaultStrokeWidth,K.strokeDasharray=Z.defaultStrokeDasharray,K.strokePanel=new q("Line color",Z.defaultColorSet,Z.defaultColor),K.strokePanel.onColorChanged=K.setStrokeColor,K.strokeWidthPanel=new nt("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),K.strokeWidthPanel.onWidthChanged=K.setStrokeWidth,K.strokeStylePanel=new pt("Line style",Z.defaultStrokeDasharrays,Z.defaultStrokeDasharray),K.strokeStylePanel.onStyleChanged=K.setStrokeDasharray,K}return Be(p,Q),p.prototype.ownsTarget=function(w){return!(!Q.prototype.ownsTarget.call(this,w)&&w!==this.visual&&w!==this.selectorCurve&&w!==this.visibleCurve&&!this.curveGrip.ownsTarget(w))},p.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},p.prototype.createVisual=function(){this.visual=ve.createGroup(),this.selectorCurve=ve.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ve.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)},p.prototype.pointerDown=function(w,H){Q.prototype.pointerDown.call(this,w,H),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=w.x,this.curveY=w.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(H)&&(this.activeGrip=this.curveGrip,this._state="resize")},p.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ve.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ve.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ve.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},p.prototype.setupControlBox=function(){Q.prototype.setupControlBox.call(this),this.curveControlLine1=ve.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ve.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)},p.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Q.prototype.addControlGrips.call(this)},p.prototype.positionGrips=function(){Q.prototype.positionGrips.call(this);var w=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-w/2,this.curveY-w/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()))},p.prototype.manipulate=function(w){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+w.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+w.y-this.manipulationStartY),Q.prototype.manipulate.call(this,w)},p.prototype.resize=function(w){this.activeGrip===this.curveGrip&&(this.curveX=w.x,this.curveY=w.y),Q.prototype.resize.call(this,w),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},p.prototype.setStrokeColor=function(w){this.strokeColor=w,this.adjustVisual(),this.colorChanged(w)},p.prototype.setStrokeWidth=function(w){this.strokeWidth=w,this.adjustVisual()},p.prototype.setStrokeDasharray=function(w){this.strokeDasharray=w,this.adjustVisual()},p.prototype.scale=function(w,H){this.curveX=this.curveX*w,this.curveY=this.curveY*H,Q.prototype.scale.call(this,w,H)},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var w=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Q.prototype.getState.call(this));return w.typeName=p.typeName,w},p.prototype.restoreState=function(w){Q.prototype.restoreState.call(this,w);var H=w;this.strokeColor=H.strokeColor,this.strokeWidth=H.strokeWidth,this.strokeDasharray=H.strokeDasharray,this.curveX=H.curveX,this.curveY=H.curveY,this.createVisual(),this.adjustVisual()},p.typeName="CurveMarker",p.title="Curve marker",p.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>',p}(Qe),Lt=function(){function Q(p,w){w===void 0&&(w=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=p,this.cancelable=w}return Object.defineProperty(Q.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Q.prototype.preventDefault=function(){this._defaultPrevented=!0},Q}(),mt=function(Q){function p(w,H,Z){var K=Q.call(this,w,!1)||this;return K.dataUrl=H,K.state=Z,K}return Be(p,Q),p}(Lt),tt=function(Q){function p(w,H,Z){Z===void 0&&(Z=!1);var K=Q.call(this,w,Z)||this;return K.marker=H,K}return Be(p,Q),p}(Lt),er=function(){function Q(){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 Q.prototype.addEventListener=function(p,w){this[p].push(w)},Q.prototype.removeEventListener=function(p,w){var H=this[p].indexOf(w);H>-1&&this[p].splice(H,1)},Q}(),Jt=function(){function Q(p){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 lt,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=Q.instanceCounter++,this.styles=new We(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=p,this.targetRoot=document.body,this.width=p.clientWidth,this.height=p.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(Q.prototype,"ALL_MARKER_TYPES",{get:function(){return[xe,we,ce,Fe,dt,Pe,le,Ie,qe,te,je,st]},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[xe,we,ce,Fe,Pe,le,Ie]},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"BASIC_MARKER_TYPES",{get:function(){return[xe,we,ce,Fe,le]},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(p){var w=this;this._availableMarkerTypes.splice(0),p.forEach(function(H){if(typeof H=="string"){var Z=w.ALL_MARKER_TYPES.find(function(K){return K.typeName===H});Z!==void 0&&w._availableMarkerTypes.push(Z)}else w._availableMarkerTypes.push(H)})},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(p){this._zoomLevel=p,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(Q.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Q.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Ye.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Q.prototype.show=function(){var p=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(w){return w(new Lt(p))})},Q.prototype.render=function(){return Ne(this,void 0,void 0,function(){var p;return ke(this,function(w){switch(w.label){case 0:return this.setCurrentMarker(),(p=new ht).naturalSize=this.renderAtNaturalSize,p.imageType=this.renderImageType,p.imageQuality=this.renderImageQuality,p.markersOnly=this.renderMarkersOnly,p.width=this.renderWidth,p.height=this.renderHeight,[4,p.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return w.sent(),[4,p.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,w.sent()]}})})},Q.prototype.close=function(p){var w=this;if(p===void 0&&(p=!1),this.isOpen){var H=!1;p||this.eventListeners.beforeclose.forEach(function(Z){var K=new Lt(w,!0);Z(K),K.defaultPrevented&&(H=!0)}),H||(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(Z){return Z(new Lt(w))}),this.detachEvents(),this._isOpen=!1)}},Q.prototype.addMarkersToToolbar=function(){for(var p,w=[],H=0;H<arguments.length;H++)w[H]=arguments[H];(p=this._availableMarkerTypes).push.apply(p,w)},Q.prototype.addRenderEventListener=function(p){this.addEventListener("render",function(w){p(w.dataUrl,w.state)})},Q.prototype.removeRenderEventListener=function(p){},Q.prototype.addCloseEventListener=function(p){this.addEventListener("close",function(){p()})},Q.prototype.removeCloseEventListener=function(p){},Q.prototype.setupResizeObserver=function(){var p=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){p.resize(p.target.clientWidth,p.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return p.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Q.prototype.onPopupTargetResize=function(){var p=1*this.target.clientWidth/this.target.clientHeight,w=this.editorCanvas.clientWidth/p>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*p:this.editorCanvas.clientWidth,H=w<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/p;this.resize(w,H)},Q.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Q.prototype.resize=function(p,w){this._isResizing=!0;var H=p/this.imageWidth,Z=w/this.imageHeight;this.imageWidth=Math.round(p),this.imageHeight=Math.round(w),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(H,Z),this._isResizing=!1},Q.prototype.scaleMarkers=function(p,w){var H,Z=this;this._currentMarker&&this._currentMarker instanceof Fe?this._currentMarker.scale(p,w):(H=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(K){K!==Z._currentMarker&&K.scale(p,w)}),H!==void 0&&this.setCurrentMarker(H)},Q.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"},Q.prototype.setTopLeft=function(){var p=this.editingTarget.getBoundingClientRect(),w=this.editorCanvas.getBoundingClientRect();this.left=p.left-w.left,this.top=p.top-w.top},Q.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)},Q.prototype.addDefs=function(){for(var p,w=[],H=0;H<arguments.length;H++)w[H]=arguments[H];this.defs=ve.createDefs(),this.addDefsToImage(),(p=this.defs).append.apply(p,w)},Q.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Q.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)},Q.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Q.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Q.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)},Q.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Q.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)},Q.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 p=document.createElement("a");p.href="https://markerjs.com/",p.target="_blank",p.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>',p.title="Powered by marker.js",p.style.display="grid",p.style.alignItems="center",p.style.justifyItems="center",p.style.padding="3px",p.style.width="20px",p.style.height="20px",this.logoUI.appendChild(p),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Q.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")},Q.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"},Q.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Q.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 p=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=p+"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 J(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 k(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Q.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Q.prototype.removeMarker=function(p){this.markerImage.removeChild(p.container),this.markers.indexOf(p)>-1&&this.markers.splice(this.markers.indexOf(p),1),p.dispose()},Q.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())},Q.prototype.toolbarButtonClicked=function(p,w){if(p==="marker"&&w!==void 0)this.createNewMarker(w);else if(p==="action")switch(w){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()}},Q.prototype.deleteSelectedMarker=function(){var p=this;if(this._currentMarker!==void 0){var w=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Z){var K=new tt(p,p._currentMarker,!0);Z(K),K.defaultPrevented&&(w=!0)}),!w){var H=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(Z){return Z(new tt(p,H))})}}},Q.prototype.clear=function(){var p=this,w=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ye){var He=new tt(p,void 0,!0);ye(He),He.defaultPrevented&&(w=!0)}),!w)){this.setCurrentMarker();for(var H=function(ye){var He=Z.markers[ye];Z.setCurrentMarker(Z.markers[ye]),Z._currentMarker.dispose(),Z.markerImage.removeChild(Z._currentMarker.container),Z.markers.splice(Z.markers.indexOf(Z._currentMarker),1),Z.eventListeners.markerdelete.forEach(function(rt){return rt(new tt(p,He))})},Z=this,K=this.markers.length-1;K>=0;K--)H(K);this.addUndoStep()}},Object.defineProperty(Q.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Q.prototype.showNotesEditor=function(){var p;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=(p=this._currentMarker.notes)!==null&&p!==void 0?p:"",this.overlayContainer.appendChild(this.notesArea))},Q.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)},Q.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Q.prototype.addUndoStep=function(){var p=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var w=this.getState(),H=this.undoRedoManager.getLastUndoStep();if(!H||H.width===w.width&&H.height===w.height){var Z=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(w),Z<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(K){return K(new Lt(p))})}else this.undoRedoManager.replaceLastUndoStep(w),this.eventListeners.statechange.forEach(function(K){return K(new Lt(p))})}},Q.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Q.prototype.undoStep=function(){var p=this,w=this.undoRedoManager.undo();w!==void 0&&(this.restoreState(w),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(H){return H(new Lt(p))}))},Q.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Q.prototype.redoStep=function(){var p=this,w=this.undoRedoManager.redo();w!==void 0&&(this.restoreState(w),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(H){return H(new Lt(p))}))},Q.prototype.stepZoom=function(){var p=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=p<this.zoomSteps.length-1?this.zoomSteps[p+1]:this.zoomSteps[0]},Q.prototype.panTo=function(p){this.contentDiv.scrollBy({left:this.prevPanPoint.x-p.x,top:this.prevPanPoint.y-p.y}),this.prevPanPoint=p},Q.prototype.startRenderAndClose=function(){return Ne(this,void 0,void 0,function(){var p,w,H=this;return ke(this,function(Z){switch(Z.label){case 0:return[4,this.render()];case 1:return p=Z.sent(),w=this.getState(),this.eventListeners.render.forEach(function(K){return K(new mt(H,p,w))}),this.close(!0),[2]}})})},Q.prototype.getState=function(p){p===!0&&this.setCurrentMarker();var w={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(H){return w.markers.push(H.getState())}),w},Q.prototype.restoreState=function(p){var w=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);p.markers.forEach(function(H){var Z=w._availableMarkerTypes.find(function(ye){return ye.typeName===H.typeName});if(Z!==void 0){var K=w.addNewMarker(Z);K.restoreState(H),w.markers.push(K)}}),p.width&&p.height&&(p.width!==this.imageWidth||p.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/p.width,this.imageHeight/p.height),this.eventListeners.restorestate.forEach(function(H){return H(new Lt(w))})},Q.prototype.addNewMarker=function(p){var w=ve.createGroup();return this.markerImage.appendChild(w),new p(w,this.overlayContainer,this.settings)},Q.prototype.createNewMarker=function(p){var w,H=this;(w=typeof p=="string"?this._availableMarkerTypes.find(function(Z){return Z.typeName===p}):p)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(w),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(w.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Z){return Z(new tt(H,H._currentMarker))}))},Q.prototype.markerCreated=function(p){var w=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(p),this.setCurrentMarker(p),p instanceof we&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(we):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(H){return H(new tt(w,w._currentMarker))})},Q.prototype.colorChanged=function(p){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=p,this.settings.defaultStrokeColor=p)},Q.prototype.fillColorChanged=function(p){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=p)},Q.prototype.markerStateChanged=function(p){var w=this;this.eventListeners.markerchange.forEach(function(H){return H(new tt(w,p))})},Q.prototype.setCurrentMarker=function(p){var w=this;this._currentMarker!==p&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(H){return H(new tt(w,w._currentMarker))})),this._currentMarker=p,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(H){return H(new tt(w,w._currentMarker))}))},Q.prototype.onPointerDown=function(p){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||p.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var w=this.markers.find(function(H){return H.ownsTarget(p.target)});w!==void 0?(this.setCurrentMarker(w),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(p.clientX,p.clientY),p.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:p.clientX,y:p.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(p.clientX,p.clientY))},Q.prototype.onDblClick=function(p){if(this._isFocused||this.focus(),this.mode==="select"){var w=this.markers.find(function(H){return H.ownsTarget(p.target)});w!==void 0&&w!==this._currentMarker&&this.setCurrentMarker(w),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(p.clientX,p.clientY),p.target):this.setCurrentMarker()}},Q.prototype.onPointerMove=function(p){this.touchPoints!==1&&p.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||p.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(p.clientX,p.clientY)):this.zoomLevel>1&&this.panTo({x:p.clientX,y:p.clientY}))},Q.prototype.onPointerUp=function(p){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(p.clientX,p.clientY)),this.isDragging=!1,this.addUndoStep()},Q.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Q.prototype.onKeyUp=function(p){this._currentMarker===void 0||this.notesArea!==void 0||p.key!=="Delete"&&p.key!=="Backspace"||this.deleteSelectedMarker()},Q.prototype.clientToLocalCoordinates=function(p,w){var H=this.markerImage.getBoundingClientRect();return{x:(p-H.left)/this.zoomLevel,y:(w-H.top)/this.zoomLevel}},Q.prototype.onWindowResize=function(){this.positionUI()},Q.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var p=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=p+"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()},Q.prototype.addLicenseKey=function(p){Ye.addKey(p)},Q.prototype.addEventListener=function(p,w){this.eventListeners.addEventListener(p,w)},Q.prototype.removeEventListener=function(p,w){this.eventListeners.removeEventListener(p,w)},Q.prototype.renderState=function(p){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(p),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Q.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Q.prototype.focus=function(){var p=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(w){return w(new Lt(p))}))},Q.prototype.blur=function(){var p=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(w){return w(new Lt(p))}))},Q.instanceCounter=0,Q}();/* **********************************
|
|
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(Q,p){return(Ot=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,H){w.__proto__=H}||function(w,H){for(var Z in H)Object.prototype.hasOwnProperty.call(H,Z)&&(w[Z]=H[Z])})(Q,p)};function yt(Q,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function w(){this.constructor=Q}Ot(Q,p),Q.prototype=p===null?Object.create(p):(w.prototype=p.prototype,new w)}function Et(Q,p,w,H){return new(w||(w=Promise))(function(Z,K){function ye(ot){try{rt(H.next(ot))}catch(Ge){K(Ge)}}function He(ot){try{rt(H.throw(ot))}catch(Ge){K(Ge)}}function rt(ot){var Ge;ot.done?Z(ot.value):(Ge=ot.value,Ge instanceof w?Ge:new w(function(_t){_t(Ge)})).then(ye,He)}rt((H=H.apply(Q,p||[])).next())})}function wt(Q,p){var w,H,Z,K,ye={label:0,sent:function(){if(1&Z[0])throw Z[1];return Z[1]},trys:[],ops:[]};return K={next:He(0),throw:He(1),return:He(2)},typeof Symbol=="function"&&(K[Symbol.iterator]=function(){return this}),K;function He(rt){return function(ot){return function(Ge){if(w)throw new TypeError("Generator is already executing.");for(;ye;)try{if(w=1,H&&(Z=2&Ge[0]?H.return:Ge[0]?H.throw||((Z=H.return)&&Z.call(H),0):H.next)&&!(Z=Z.call(H,Ge[1])).done)return Z;switch(H=0,Z&&(Ge=[2&Ge[0],Z.value]),Ge[0]){case 0:case 1:Z=Ge;break;case 4:return ye.label++,{value:Ge[1],done:!1};case 5:ye.label++,H=Ge[1],Ge=[0];continue;case 7:Ge=ye.ops.pop(),ye.trys.pop();continue;default:if(!(Z=ye.trys,(Z=Z.length>0&&Z[Z.length-1])||Ge[0]!==6&&Ge[0]!==2)){ye=0;continue}if(Ge[0]===3&&(!Z||Ge[1]>Z[0]&&Ge[1]<Z[3])){ye.label=Ge[1];break}if(Ge[0]===6&&ye.label<Z[1]){ye.label=Z[1],Z=Ge;break}if(Z&&ye.label<Z[2]){ye.label=Z[2],ye.ops.push(Ge);break}Z[2]&&ye.ops.pop(),ye.trys.pop();continue}Ge=p.call(Q,ye)}catch(_t){Ge=[6,_t],H=0}finally{w=Z=0}if(5&Ge[0])throw Ge[1];return{value:Ge[0]?Ge[1]:void 0,done:!0}}([rt,ot])}}}var Mt=function(){function Q(){}return Q.addKey=function(p){Q.key=p},Object.defineProperty(Q,"isLicensed",{get:function(){return!!Q.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Q.key)},enumerable:!1,configurable:!0}),Q}(),ut=function(){function Q(){}return Q.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Q.setAttributes=function(p,w){for(var H=0,Z=w;H<Z.length;H++){var K=Z[H],ye=K[0],He=K[1];p.setAttribute(ye,He)}},Q.createRect=function(p,w,H){var Z=document.createElementNS("http://www.w3.org/2000/svg","rect");return Z.setAttribute("width",p.toString()),Z.setAttribute("height",w.toString()),H&&Q.setAttributes(Z,H),Z},Q.createLine=function(p,w,H,Z,K){var ye=document.createElementNS("http://www.w3.org/2000/svg","line");return ye.setAttribute("x1",p.toString()),ye.setAttribute("y1",w.toString()),ye.setAttribute("x2",H.toString()),ye.setAttribute("y2",Z.toString()),K&&Q.setAttributes(ye,K),ye},Q.createPolygon=function(p,w){var H=document.createElementNS("http://www.w3.org/2000/svg","polygon");return H.setAttribute("points",p),w&&Q.setAttributes(H,w),H},Q.createCircle=function(p,w){var H=document.createElementNS("http://www.w3.org/2000/svg","circle");return H.setAttribute("cx",(p/2).toString()),H.setAttribute("cy",(p/2).toString()),H.setAttribute("r",p.toString()),w&&Q.setAttributes(H,w),H},Q.createEllipse=function(p,w,H){var Z=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Z.setAttribute("cx",(p/2).toString()),Z.setAttribute("cy",(w/2).toString()),Z.setAttribute("rx",(p/2).toString()),Z.setAttribute("ry",(w/2).toString()),H&&Q.setAttributes(Z,H),Z},Q.createGroup=function(p){var w=document.createElementNS("http://www.w3.org/2000/svg","g");return p&&Q.setAttributes(w,p),w},Q.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Q.createMarker=function(p,w,H,Z,K,ye,He){var rt=document.createElementNS("http://www.w3.org/2000/svg","marker");return Q.setAttributes(rt,[["id",p],["orient",w],["markerWidth",H.toString()],["markerHeight",Z.toString()],["refX",K.toString()],["refY",ye.toString()]]),rt.appendChild(He),rt},Q.createText=function(p){var w=document.createElementNS("http://www.w3.org/2000/svg","text");return w.setAttribute("x","0"),w.setAttribute("y","0"),p&&Q.setAttributes(w,p),w},Q.createTSpan=function(p,w){var H=document.createElementNS("http://www.w3.org/2000/svg","tspan");return H.textContent=p,w&&Q.setAttributes(H,w),H},Q.createImage=function(p){var w=document.createElementNS("http://www.w3.org/2000/svg","image");return p&&Q.setAttributes(w,p),w},Q.createPoint=function(p,w){var H=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return H.x=p,H.y=w,H},Q.createPath=function(p,w){var H=document.createElementNS("http://www.w3.org/2000/svg","path");return H.setAttribute("d",p),w&&Q.setAttributes(H,w),H},Q.createElement=function(p,w){var H=document.createElementNS("http://www.w3.org/2000/svg",p);return w&&Q.setAttributes(H,w),H},Q.getHollowRectanglePath=function(p,w,H,Z,K,ye,He,rt){return"M"+p+","+w+"V"+(w+Z)+"H"+(p+H)+"V"+w+"H"+K+"V"+ye+"H"+(K+He)+"V"+(ye+rt)+"H"+K+"V"+w+"Z"},Q}(),lr=function(){function Q(p){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+p+"_"}return Object.defineProperty(Q.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Q.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(Q.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),Q.prototype.addClass=function(p){return this.styleSheet===void 0&&this.addStyleSheet(),p.name=""+this.classNamePrefix+p.localName,this.classes.push(p),this.styleSheet.sheet.insertRule("."+p.name+" {"+p.style+"}",this.styleSheet.sheet.cssRules.length),p},Q.prototype.addRule=function(p){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(p),this.styleSheet.sheet.insertRule(p.selector+" {"+p.style+"}",this.styleSheet.sheet.cssRules.length)},Q.prototype.addStyleSheet=function(){var p;this.styleSheet=document.createElement("style"),((p=this.styleSheetRoot)!==null&&p!==void 0?p:document.head).appendChild(this.styleSheet),this.addRule(new At("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new At("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new At("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new gt("_fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new gt("_fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},Q.prototype.removeStyleSheet=function(){var p;this.styleSheet&&(((p=this.styleSheetRoot)!==null&&p!==void 0?p:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Q}(),At=function(Q,p){this.selector=Q,this.style=p},gt=function(Q,p){this.localName=Q,this.style=p},Nt=function(){function Q(){this.blocks=[],this.display=""}return Q.prototype.addButtonBlock=function(p){p.className=this.blockClassName,p.buttonClassName=this.buttonClassName,p.buttonColorsClassName=this.buttonColorsClassName,p.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(p)},Q.prototype.addElementBlock=function(p){p.className===void 0&&(p.className=this.blockClassName),this.blocks.push(p)},Q.prototype.getUI=function(){var p=document.createElement("div");return p.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,p.style.display=this.display,this.blocks.forEach(function(w){return p.appendChild(w.getUI())}),p},Q}(),ir=function(){function Q(){}return Q.prototype.getUI=function(){var p=document.createElement("div");if(p.className=this.className,this.minWidth!==void 0&&(p.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":p.style.justifyContent="flex-start";break;case"center":p.style.justifyContent="center";break;case"end":p.style.justifyContent="flex-end"}return p.style.whiteSpace="nowrap",p},Q}(),yr=function(Q){function p(){var w=Q!==null&&Q.apply(this,arguments)||this;return w.buttons=[],w}return yt(p,Q),p.prototype.addButton=function(w){w.className=this.buttonClassName,w.colorsClassName=this.buttonColorsClassName,w.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(w)},p.prototype.getUI=function(){var w=Q.prototype.getUI.call(this);return this.buttons.forEach(function(H){return w.appendChild(H.getUI())}),w},p}(ir),br=function(){function Q(p,w){this._isActive=!1,this._isHidden=!1,this._icon=p,this.title=w,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(Q.prototype,"icon",{get:function(){return this._icon},set:function(p){this._icon=p,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isActive",{get:function(){return this._isActive},set:function(p){this._isActive=p,this.adjustClassName()},enumerable:!1,configurable:!0}),Q.prototype.getUI=function(){var p=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 p.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},Q.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,"")))},Q.prototype.hide=function(){this._isHidden=!0},Q}(),Rr=function(Q){function p(){var w=Q!==null&&Q.apply(this,arguments)||this;return w.elements=[],w}return yt(p,Q),p.prototype.addElement=function(w){this.elements.push(w)},p.prototype.getUI=function(){var w=Q.prototype.getUI.call(this);return this.elements.forEach(function(H){return w.appendChild(H)}),w},p}(ir),Dr=function(){function Q(p,w){this.horizontal=p,this.vertical=w}return Object.defineProperty(Q.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),Q.prototype.getVerticalLength=function(p){return p/this.ratio},Q.prototype.getHorizontalLength=function(p){return p*this.ratio},Q}(),Ht=function(){function Q(){}return Q.getIcon=function(p,w){if(p>0&&w>0){var H=new Dr(p,w),Z=H.ratio>=1?20:H.getHorizontalLength(20),K=H.ratio<1?20:H.getVerticalLength(20),ye=document.createElementNS("http://www.w3.org/2000/svg","svg");ye.setAttribute("xmlns","http://www.w3.org/2000/svg"),ye.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(ye);var He=ut.createDefs();ye.appendChild(He);var rt=ut.createElement("clipPath",[["id","text-bg-clip"]]);He.appendChild(rt);var ot=ut.createPath(ut.getHollowRectanglePath((24-Z)/2,(24-K)/2,Z,K,(24-Z)/2+2,(24-K)/2+2,Z-4,K-4));ye.appendChild(ot);var Ge=ut.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Ge.appendChild(ut.createTSpan(p+":"+w)),ye.appendChild(Ge);var _t=Ge.getBBox();ut.setAttributes(Ge,[["x",((24-_t.width)/2).toString()],["y",((24-_t.height)/2-_t.y).toString()]]);var vt=ut.createPath(ut.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(vt),ut.setAttributes(ot,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(ye),ye.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>'},Q}(),pr=function(Q){function p(w,H,Z){var K=Q.call(this,w,H)||this;return K.isDropdownOpen=!1,K.onClick=K.dropdownButtonClicked,K.dropdownButtons=Z,K}return yt(p,Q),p.prototype.setupDropdown=function(){var w=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(H){H.className=w.className,H.colorsClassName=w.colorsClassName,w.dropdownBlock.appendChild(H.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},p.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},p.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},p.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},p.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},p.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},p}(br),Lr=function(){function Q(p,w){this.GRIP_SIZE=10,this.color=p,this.fillColor=w,this.visual=ut.createGroup(),this.visual.appendChild(ut.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ut.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Q.prototype.ownsTarget=function(p){return p===this.visual||p===this.visual.childNodes[0]||p===this.visual.childNodes[1]},Q.prototype.setCenter=function(p,w){this.visual.childNodes.forEach(function(H){return ut.setAttributes(H,[["cx",p.toString()],["cy",w.toString()]])})},Q}(),Cr=function(){function Q(p,w,H,Z){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=p,this.canvasHeight=w,this.margin=H,this.container=Z,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(Q.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(p){this._aspectRatio=p,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(p){this._isGridVisible=p,this.gridContainer&&ut.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(p){this._zoomFactor=p,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Q.prototype.open=function(){var p=this;this.cropShadeElement=ut.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=ut.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var w=0;w<this.numberOfGridLines;w++)this.horizontalGridLines.push(ut.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(ut.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(H){return p.gridContainer.appendChild(H)}),this.verticalGridLines.forEach(function(H){return p.gridContainer.appendChild(H)}),this.cropRectElement=ut.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Lr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Lr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Lr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Lr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},Q.prototype.setCropRectangle=function(p){this.cropRect=p;var w=Object.assign({},this.cropRect);this.zoomFactor!==1&&(w.width=this.cropRect.width*this.zoomFactor,w.height=this.cropRect.height*this.zoomFactor,w.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-w.width/2,w.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-w.height/2),ut.setAttributes(this.cropRectElement,[["x",w.x.toString()],["y",w.y.toString()],["width",w.width.toString()],["height",w.height.toString()]]);var H=w.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(K,ye){var He=w.y+H*(ye+1);ut.setAttributes(K,[["x1",""+w.x],["y1",""+He],["x2",""+(w.x+w.width)],["y2",""+He]])});var Z=w.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(K,ye){var He=w.x+Z*(ye+1);ut.setAttributes(K,[["x1",""+He],["y1",""+w.y],["x2",""+He],["y2",""+(w.y+w.height)]])}),ut.setAttributes(this.cropShadeElement,[["d",ut.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,w.x,w.y,w.width,w.height)]]),this.topLeftGrip.setCenter(w.x,w.y),this.topRightGrip.setCenter(w.x+w.width,w.y),this.bottomLeftGrip.setCenter(w.x,w.y+w.height),this.bottomRightGrip.setCenter(w.x+w.width,w.y+w.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},Q.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)},Q.prototype.clientToLocalCoordinates=function(p,w){var H=this.container.getBoundingClientRect();return{x:p-H.left+this.margin,y:w-H.top+this.margin}},Q.prototype.onPointerDown=function(p){this.container.setPointerCapture(p.pointerId),this.previousPoint=this.clientToLocalCoordinates(p.clientX,p.clientY),this.cropRectElement===p.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(p.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(p.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(p.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(p.target)&&(this.activeGrip=this.bottomRightGrip)},Q.prototype.onPointerMove=function(p){if(this.isMoving)this.move(this.clientToLocalCoordinates(p.clientX,p.clientY));else if(this.activeGrip){var w=this.clientToLocalCoordinates(p.clientX,p.clientY);this.resize(w)}p.preventDefault()},Q.prototype.onPointerUp=function(p){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(p.pointerId)},Q.prototype.move=function(p){var w=p.x-this.previousPoint.x,H=p.y-this.previousPoint.y;this.zoomFactor!==1&&(w=-w/this.zoomFactor,H=-H/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+w),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+H),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=p},Q.prototype.resize=function(p){var w=Object.assign({},this.cropRect),H=p.x-this.previousPoint.x,Z=p.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:w.x+H<this.margin&&(H=this.margin-w.x),w.x+=H,w.width=this.cropRect.x+this.cropRect.width-w.x;break;case this.bottomRightGrip:case this.topRightGrip:w.width+H>this.canvasWidth*this.zoomFactor&&(H=this.canvasWidth*this.zoomFactor-w.width),w.width+=H}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(w.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(H),w.height=this.aspectRatio.getVerticalLength(w.width)):(w.y+=Z,w.height=this.cropRect.y+this.cropRect.height-w.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?w.height=this.aspectRatio.getVerticalLength(w.width):w.height+=Z}w.width<10&&(w.x=this.cropRect.x,w.width=10),w.height<10&&(w.y=this.cropRect.y,w.height=10),this.previousPoint=p,w.x>=this.margin&&w.y>=this.margin&&w.x-this.margin+w.width<=this.canvasWidth&&w.y-this.margin+w.height<=this.canvasHeight&&(this.cropRect=w,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},Q.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var p=this.cropRect.x+this.cropRect.width/2,w=this.cropRect.y+this.cropRect.height/2,H=this.aspectRatio.getHorizontalLength(this.cropRect.height),Z=this.aspectRatio.getVerticalLength(this.cropRect.width);H/this.canvasWidth<Z/this.canvasHeight?this.cropRect.width=H:this.cropRect.height=Z,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=p-this.cropRect.width/2,this.cropRect.y=w-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)}},Q.prototype.getRescaledRect=function(p,w,H,Z,K,ye){var He=H/p,rt=Z/w;return{x:(K.x-ye)*He+ye,y:(K.y-ye)*rt+ye,width:K.width*He,height:K.height*rt}},Q.prototype.scaleCanvas=function(p,w){var H=this.getRescaledRect(this.canvasWidth,this.canvasHeight,p,w,this.cropRect,this.margin);this.canvasWidth=p,this.canvasHeight=w,this.onCropChange&&this.onCropChange(H),this.setCropRectangle(H)},Q}(),Qr=function(){function Q(p){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=p,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(Q.prototype,"angle",{get:function(){return this._angle},set:function(p){this._angle=p,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),Q.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},Q.prototype.onPointerDown=function(p){this.controlContainer.setPointerCapture(p.pointerId),this.isDragging=!0,this.previousPoint={x:p.clientX,y:p.clientY}},Q.prototype.onPointerMove=function(p){this.isDragging&&(this.onAngleChange&&this.onAngleChange((p.clientX-this.previousPoint.x)/5),this.previousPoint.x=p.clientX)},Q.prototype.onPointerUp=function(p){this.isDragging&&this.onAngleChange&&this.onAngleChange((p.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(p.pointerId)},Q.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var p=this.angleLabelText.getBBox();ut.setAttributes(this.angleLabelElement,[["x",((this.width-p.width)/2).toString()],["y",(this.height/2).toString()]])}},Q.prototype.positionScaleShape=function(){if(this.scaleShape){var p=this.scaleShape.transform.baseVal.getItem(0);p.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(p,0)}},Q.prototype.getVisual=function(){var p=document.createElementNS("http://www.w3.org/2000/svg","svg");p.setAttribute("xmlns","http://www.w3.org/2000/svg"),p.setAttribute("width",this.width+"px"),p.setAttribute("height",this.height+"px"),p.setAttribute("viewBox","0 0 "+this.width+" "+this.height),p.style.flexShrink="0",document.body.appendChild(p);for(var w="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,H=1;H<=this.width/5+10;H++){var Z=H%5==0?this.height/3:this.height/6;w+="h4v"+-Z+"h1v"+Z}w+="v1H0Z",this.scaleShape=ut.createPath(w);var K=ut.createTransform();this.scaleShape.transform.baseVal.appendItem(K),p.appendChild(this.scaleShape),this.angleLabelElement=ut.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=ut.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var ye=ut.createTSpan("");return ye.innerHTML="°",this.angleLabelElement.appendChild(ye),p.appendChild(this.angleLabelElement),document.body.removeChild(p),p},Q}(),Ur=function(){function Q(){this.naturalSize=!1,this.imageType="image/png"}return Q.prototype.rasterize=function(p,w,H,Z,K,ye,He){var rt=this;return new Promise(function(ot){var Ge=document.createElement("canvas");Ge.width=p.width.baseVal.value-2*Z,Ge.height=p.height.baseVal.value-2*Z;var _t=1,vt=1;rt.naturalSize===!0?(_t=w.naturalWidth/(p.width.baseVal.value-2*Z)/ye,vt=w.naturalHeight/(p.height.baseVal.value-2*Z)/He,Ge.width=w.naturalWidth/ye,Ge.height=w.naturalHeight/He):rt.width!==void 0&&rt.height!==void 0&&(_t=rt.width/H.width,vt=rt.height/H.height,Ge.width*=_t,Ge.height*=vt);var Tt=Ge.getContext("2d");Tt.translate(Ge.width/2,Ge.height/2),Tt.rotate(K*Math.PI/180),Tt.scale(ye,He),Tt.translate(-Ge.width/2,-Ge.height/2),Tt.drawImage(w,0,0,Ge.width,Ge.height);var Pt=document.createElement("canvas");Pt.width=H.width*_t,Pt.height=H.height*vt,Pt.getContext("2d").putImageData(Tt.getImageData((H.x-Z)*_t,(H.y-Z)*vt,H.width*_t,H.height*vt),0,0),ot(Pt.toDataURL(rt.imageType,rt.imageQuality))})},Q}(),ae=function(){function Q(p){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=Q.instanceCounter++,this.styles=new lr(this.instanceNo),this.target=p,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(Q.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(p){this._zoomToCropEnabled=p,p?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(p){this._isGridVisible=p,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"gridLines",{get:function(){return this._gridLines},set:function(p){this._gridLines=p,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(p){this._rotationAngle=p,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"aspectRatio",{get:function(){var p;return(p=this._aspectRatio)!==null&&p!==void 0?p:this.aspectRatios[0]},set:function(p){this._aspectRatio=p},enumerable:!1,configurable:!0}),Q.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},Q.prototype.show=function(){this.showUI(),this.open()},Q.prototype.close=function(p){p===void 0&&(p=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),p||this.closeEventListeners.forEach(function(w){return w()}),this._isOpen=!1)},Q.prototype.addRenderEventListener=function(p){this.renderEventListeners.push(p)},Q.prototype.removeRenderEventListener=function(p){this.renderEventListeners.indexOf(p)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(p),1)},Q.prototype.addCloseEventListener=function(p){this.closeEventListeners.push(p)},Q.prototype.removeCloseEventListener=function(p){this.closeEventListeners.indexOf(p)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(p),1)},Q.prototype.setupResizeObserver=function(){var p=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){p.resize(p.target.clientWidth,p.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))},Q.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var p=1*this.target.clientWidth/this.target.clientHeight,w=this.contentDiv.clientWidth/p>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*p:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,H=w+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/p;this.resize(w,H)}},Q.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Q.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",ut.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},Q.prototype.resize=function(p,w){this.imageWidth=Math.round(p),this.imageHeight=Math.round(w),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()},Q.prototype.setEditingTarget=function(){var p=document.createElement("canvas");p.width=this.target.naturalWidth,p.height=this.target.naturalHeight,p.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var w=p.toDataURL();ut.setAttributes(this.editingTarget,[["href",w]]),this.setEditingTargetSize()},Q.prototype.setTopLeft=function(){var p=this.target.getBoundingClientRect(),w=this.editorCanvas.getBoundingClientRect();this.left=p.left-w.left-this.CANVAS_MARGIN,this.top=p.top-w.top-this.CANVAS_MARGIN},Q.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=ut.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=ut.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=ut.createGroup(),this.editingTargetRotationScaleContainer=ut.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var p=ut.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(p);var w=ut.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(w),this.editingTargetContainer=ut.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)},Q.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},Q.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=ut.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Cr(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()},Q.prototype.zoomToCrop=function(){if(this.cropRect){var p=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,w=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=p+"px "+w+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-p+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-w+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},Q.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)},Q.prototype.cropRectChanged=function(p){this.cropRect=p,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},Q.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},Q.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"},Q.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Q.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 p=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,w=this.target.offsetTop>p+this.CANVAS_MARGIN?this.target.offsetTop-(p+this.CANVAS_MARGIN):0;this.coverDiv.style.top=w+"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},Q.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},Q.prototype.addTopToolbar=function(){var p=this;this.topToolbar=new Nt,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 w=new yr;w.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(w);var H=[];this.aspectRatios.forEach(function(vt){var Tt=new br(Ht.getIcon(vt.horizontal,vt.vertical),vt.horizontal===0&&vt.vertical===0?"FREE":vt.horizontal+":"+vt.vertical);Tt.onClick=function(){return p.ratioButtonClicked(vt)},H.push(Tt)}),this.aspectRatioButton=new pr(Ht.getIcon(0,0),"Aspect ratio",H),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,w.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var Z=new br('<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");Z.isActive=this.isGridVisible,Z.onClick=function(){p.isGridVisible=!p.isGridVisible,Z.isActive=p.isGridVisible},w.addButton(Z);var K=new br('<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(K.isActive=this.zoomToCropEnabled,K.onClick=function(){p.zoomToCropEnabled=!p.zoomToCropEnabled,K.isActive=p.zoomToCropEnabled},w.addButton(K),!Mt.isLicensed){var ye=new Rr;this.topToolbar.addElementBlock(ye);var He=document.createElement("div");He.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>',He.appendChild(rt),ye.addElement(He)}var ot=new yr;ot.minWidth=3*this.toolbarHeight+"px",ot.contentAlign="end",this.topToolbar.addButtonBlock(ot);var Ge=new br('<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");Ge.onClick=this.startRenderAndClose,ot.addButton(Ge),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Ge.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var _t=new br('<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)},Q.prototype.addBottomToolbar=function(){var p=this;this.bottomToolbar=new Nt,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 w=new yr;w.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(w);var H=new br('<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");H.onClick=this.rotateLeftButtonClicked,w.addButton(H);var Z=new br('<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");Z.onClick=this.rotateRightButtonClicked,w.addButton(Z);var K=new Rr;K.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(K),this.straightener=new Qr("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){p.rotateBy(ot),p.straightener.angle=p.rotationAngle},K.addElement(this.straightener.getUI());var ye=new yr;ye.minWidth=2*this.toolbarHeight+"px",ye.contentAlign="end",this.bottomToolbar.addButtonBlock(ye);var He=new br('<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");He.onClick=this.flipHorizontallyButtonClicked,ye.addButton(He);var rt=new br('<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,ye.addButton(rt)},Q.prototype.ratioButtonClicked=function(p){this.aspectRatio=p,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},Q.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Ht.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},Q.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Dr(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},Q.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Q.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},Q.prototype.restoreState=function(p){if(p){var w=this.cropLayer.getRescaledRect(p.width,p.height,this.imageWidth,this.imageHeight,p.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(w),this.cropRectChanged(w),this.flippedHorizontally=p.flippedHorizontally,this.flippedVertically=p.flippedVertically,this.applyFlip(),this.rotationAngle=p.rotationAngle,this.applyRotation()}},Q.prototype.clientToLocalCoordinates=function(p,w){var H=this.cropImage.getBoundingClientRect();return{x:p-H.left,y:w-H.top}},Q.prototype.onWindowResize=function(){this.positionUI()},Q.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var p=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=p+"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()},Q.prototype.rotateLeftButtonClicked=function(){var p=this.rotationAngle-90;this.rotationAngle%90!=0&&(p+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(p)},Q.prototype.rotateRightButtonClicked=function(){var p=this.rotationAngle+90;this.rotationAngle%90!=0&&(p-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(p)},Q.prototype.rotateTo=function(p){p=(p=p>180?p-360:p)<=-180?p+360:p,this.rotationAngle=p,this.applyRotation()},Q.prototype.rotateBy=function(p){this.rotateTo((this.rotationAngle+p)%360)},Q.prototype.applyRotation=function(){var p=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var w=this.editingTargetRotationContainer.transform.baseVal.getItem(0);w.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(w,0);var H=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/H.width,this.imageHeight/H.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=p},Q.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},Q.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},Q.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},Q.prototype.startRenderAndClose=function(){return Et(this,void 0,void 0,function(){var p,w;return wt(this,function(H){switch(H.label){case 0:return[4,this.render()];case 1:return p=H.sent(),w=this.getState(),this.renderEventListeners.forEach(function(Z){return Z(p,w)}),this.close(!0),[2]}})})},Q.prototype.render=function(){return Et(this,void 0,void 0,function(){var p;return wt(this,function(w){switch(w.label){case 0:return(p=new Ur).naturalSize=this.renderAtNaturalSize,p.imageType=this.renderImageType,p.imageQuality=this.renderImageQuality,p.width=this.renderWidth,p.height=this.renderHeight,this.unzoomFromCrop(),ut.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,p.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 w.sent(),[4,p.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,w.sent()]}})})},Q.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new gt("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 gt("toolbar_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new gt("toolbar-block",`
|
|
display: flex;
|
|
align-items: center;
|
|
box-sizing: content-box;
|
|
`));var p=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new gt("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.toolbarHeight-2*p)+`px;
|
|
height: `+(this.toolbarHeight-2*p)+`px;
|
|
padding: `+p+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new gt("toolbar_button_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new gt("toolbar_active_button",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
`)),this.styles.addRule(new At("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new At("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new gt("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 gt("toolbar_dropdown_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new gt("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 gt("toolbar_straightener",`
|
|
display: flex;
|
|
overflow: hidden;
|
|
justify-content: center;
|
|
height: `+(this.toolbarHeight-2*p)+`px;
|
|
padding: `+p+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new gt("toolbar_straightener_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`))},Q.instanceCounter=0,Q}(),oe=j("8hTe"),de=j.n(oe),Te=/<pre[^>]*>/g;function Ve(Q){var p=document.createElement("div");return p.innerHTML=Q,p.childNodes.length===0?"":p.childNodes[0].nodeValue}var et=_e.a=function(Q){var p=Q.value,w=p===void 0?"":p,H=Q.edit,Z=H===void 0?!1:H,K=Q.className,ye=Q.showTextOnly,He=Q.showLines,rt=Q.replaces,ot=Q.zoomImg,Ge=Q.hasMask,_t=Q.style,vt=_t===void 0?{}:_t,Tt=Q.stylesPrev,Pt=Tt===void 0?{}:Tt,ur=String(w),Gt=Object(R.useRef)(),ar=Object(R.useRef)(),kt=Object(R.useState)(""),Tr=Object(X.a)(kt,2),mr=Tr[0],$t=Tr[1],De=Object(R.useState)("office"),Qt=Object(X.a)(De,2),Vt=Qt[0],Dt=Qt[1],jt=function(){var Ft=new ae(ar.current);Ft.displayMode="popup",Ft.addRenderEventListener(function(){var tr=Object(O.a)(e.a.mark(function Zt(xr){var qt;return e.a.wrap(function(gr){for(;;)switch(gr.prev=gr.next){case 0:return Gt.current.style.display="none",gr.next=3,Object(Oe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:xr}});case 3:qt=gr.sent,qt!=null&&qt.id&&rt(ar.current.getAttribute("src").replace(re.a.API_SERVER,""),"/api/attachments/".concat(qt==null?void 0:qt.id,"?type=").concat(qt.content_type));case 5:case"end":return gr.stop()}},Zt)}));return function(Zt){return tr.apply(this,arguments)}}()),Ft.show()},Kt=function(){var Ft=new Jt(ar.current);Ft.settings.displayMode="popup",Ft.addEventListener("render",function(){var tr=Object(O.a)(e.a.mark(function Zt(xr){var qt;return e.a.wrap(function(gr){for(;;)switch(gr.prev=gr.next){case 0:if(Gt.current.style.display="none",!ar.current){gr.next=6;break}return gr.next=4,Object(Oe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:xr.dataUrl}});case 4:qt=gr.sent,qt!=null&&qt.id&&rt(ar.current.getAttribute("src").replace(re.a.API_SERVER,""),"/api/attachments/".concat(qt==null?void 0:qt.id,"?type=").concat(qt.content_type));case 6:case"end":return gr.stop()}},Zt)}));return function(Zt){return tr.apply(this,arguments)}}()),Ft.show(),window.markerArea=Ft},Ar=Object(R.useMemo)(function(){Gt.current&&(Gt.current.style.zIndex=-1);try{var Wt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Ft=/\"\/api\/attachments\/|\"\/attachments\/download\//g,tr=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;ur=ur.replace(Wt,"("+re.a.API_SERVER+"/api/attachments/").replace(Ft,'"'+re.a.API_SERVER+"/api/attachments/").replace(tr,'"'+re.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(Fr){}var Zt=P(ur),xr=b();if(ur.match(/\[TOC\]/)&&(Zt=Zt.replace("<p>[TOC]</p>",B()),y()),Zt=Zt.replace(/(__special_katext_id_\d+__)/g,function(Fr,gr){var Kr=xr[gr],Pr=Kr.type,Nr=Kr.expression;return Object(me.renderToString)(Ve(Nr)||"",{displayMode:Pr==="block",throwOnError:!1,output:"html"})}),Zt=Zt.replace(/▁/g,"\u2581\u2581\u2581"),m(),ye){var qt=document.createElement("div");return qt.innerHTML=Zt,qt.innerText}return setTimeout(function(){return rr()},500),Zt},[ur]),zt=Object(R.useRef)();_.WebkitLineClamp=He,He&&(vt=Object(F.a)(Object(F.a)({},vt),_));function sr(Wt){var Ft=Wt.target;if(Ft.tagName.toUpperCase()==="IMG"){if(ot){var tr=Ft.getAttribute("src");$t(tr),Dt("image")}}else if(Ft.tagName.toUpperCase()==="A"){var Zt=Ft.getAttribute("href");if(Zt.indexOf("office")>-1)Wt.preventDefault(),$t(Zt),Dt("office");else if(Zt.indexOf("application/pdf")>-1)Wt.preventDefault(),$t(Zt),Dt("pdf");else if(Zt.indexOf("text/html")>-1)Wt.preventDefault(),$t(Zt),Dt("html");else if(Zt.startsWith("#")){Wt.preventDefault();var xr=document.getElementById(Zt.replace("#",""));xr&&xr.scrollIntoView(!0)}}}var rr=function(){var Ft,tr=(Ft=zt.current)===null||Ft===void 0?void 0:Ft.querySelectorAll("video");tr==null||tr.forEach(function(Zt){if(Zt.oncontextmenu=function(){return!1},Zt.src.indexOf(".m3u8")>-1&&!Zt.canPlayType("application/vnd.apple.mpegurl")){if(Y.a.isSupported()){var xr=new Y.a;xr.loadSource(Zt.src),xr.attachMedia(Zt)}}})};Object(R.useEffect)(function(){if(zt.current&&Ar&&(Ar.match(Te)&&window.PR.prettyPrint()),zt.current)return zt.current.addEventListener("click",sr),function(){zt.current.removeEventListener("click",sr),m(),y()}},[Ar,zt.current,sr]);var Ut=function(Ft){if(!Z)return;Ft.target.nodeName==="IMG"?(Gt.current.style.zIndex=1,Gt.current.style.display="flex",Gt.current.style.width=Ft.target.clientWidth+"px",Gt.current.style.height=Ft.target.clientHeight+"px",Gt.current.style.top=Ft.target.offsetTop+"px",Gt.current.style.left=Ft.target.offsetLeft+"px",ar.current.src=Ft.target.getAttribute("src")):Gt.current.style.display="none"};return g.a.createElement("div",{style:{position:"relative"}},g.a.createElement("div",{ref:zt,style:Object(F.a)({},vt),className:"".concat(K||""," markdown-body ").concat(de.a.mdBody),onMouseOver:Ut,dangerouslySetInnerHTML:{__html:Ar}}),g.a.createElement("div",{ref:Gt,className:de.a.button},g.a.createElement(G.a,null,g.a.createElement(V.a,{onClick:function(){return jt()}},"\u88C1\u526A"),g.a.createElement(V.a,{onClick:function(){return Kt()}},"\u7F16\u8F91"))),g.a.createElement("img",{ref:ar,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),g.a.createElement(ge.a,{close:!0,data:mr,type:mr!=null&&mr.length?Vt:"",style:Object(F.a)({},Pt),onClose:function(){return $t("")}}))}},BU3w:function(ct,_e,j){"use strict";j.d(_e,"a",function(){return O});var se=j("MNnm"),G="rc-util-key";function D(X){if(X.attachTo)return X.attachTo;var M=document.querySelector("head");return M||document.body}function V(X){var M,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(se.a)())return null;var R=document.createElement("style");if((M=e.csp)===null||M===void 0?void 0:M.nonce){var g;R.nonce=(g=e.csp)===null||g===void 0?void 0:g.nonce}R.innerHTML=X;var v=D(e),u=v.firstChild;return e.prepend&&v.prepend?v.prepend(R):e.prepend&&u?v.insertBefore(R,u):v.appendChild(R),R}var F=new Map;function O(X,M){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},R=D(e);if(!F.has(R)){var g=V("",e),v=g.parentNode;F.set(R,v),v.removeChild(g)}var u=Array.from(F.get(R).children).find(function(a){return a.tagName==="STYLE"&&a[G]===M});if(u){var s,i;if(((s=e.csp)===null||s===void 0?void 0:s.nonce)&&u.nonce!==((i=e.csp)===null||i===void 0?void 0:i.nonce)){var A;u.nonce=(A=e.csp)===null||A===void 0?void 0:A.nonce}return u.innerHTML!==X&&(u.innerHTML=X),u}var o=V(X,e);return o[G]=M,o}},"C/vA":function(ct,_e,j){"use strict";j.d(_e,"a",function(){return se});function se(G){const D=this;let V=!1,F;return function(){return V||(V=!0,F=G.apply(D,arguments)),F}}},"Cg/j":function(ct,_e,j){"use strict";j.d(_e,"b",function(){return se}),j.d(_e,"a",function(){return G}),j.d(_e,"c",function(){return V}),j.d(_e,"d",function(){return F});var se;(function(O){O.serviceIds=new Map,O.DI_TARGET="$di$target",O.DI_DEPENDENCIES="$di$dependencies";function X(M){return M[O.DI_DEPENDENCIES]||[]}O.getServiceDependencies=X})(se||(se={}));const G=V("instantiationService");function D(O,X,M,e){X[se.DI_TARGET]===X?X[se.DI_DEPENDENCIES].push({id:O,index:M,optional:e}):(X[se.DI_DEPENDENCIES]=[{id:O,index:M,optional:e}],X[se.DI_TARGET]=X)}function V(O){if(se.serviceIds.has(O))return se.serviceIds.get(O);const X=function(M,e,R){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");D(X,M,R,!1)};return X.toString=()=>O,se.serviceIds.set(O,X),X}function F(O){return function(X,M,e){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");D(O,X,e,!0)}}},DlQD:function(ct,_e,j){(function(se,G){ct.exports=G()})(this,function(){"use strict";function se(we,ue){for(var ce=0;ce<ue.length;ce++){var te=ue[ce];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(we,te.key,te)}}function G(we,ue,ce){return ue&&se(we.prototype,ue),ce&&se(we,ce),we}function D(we,ue){if(!we)return;if(typeof we=="string")return V(we,ue);var ce=Object.prototype.toString.call(we).slice(8,-1);if(ce==="Object"&&we.constructor&&(ce=we.constructor.name),ce==="Map"||ce==="Set")return Array.from(we);if(ce==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ce))return V(we,ue)}function V(we,ue){(ue==null||ue>we.length)&&(ue=we.length);for(var ce=0,te=new Array(ue);ce<ue;ce++)te[ce]=we[ce];return te}function F(we,ue){var ce;if(typeof Symbol=="undefined"||we[Symbol.iterator]==null){if(Array.isArray(we)||(ce=D(we))||ue&&we&&typeof we.length=="number"){ce&&(we=ce);var te=0;return function(){return te>=we.length?{done:!0}:{done:!1,value:we[te++]}}}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 ce=we[Symbol.iterator](),ce.next.bind(ce)}function O(we,ue){return ue={exports:{}},we(ue,ue.exports),ue.exports}var X=O(function(we){function ue(){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 ce(te){we.exports.defaults=te}we.exports={defaults:ue(),getDefaults:ue,changeDefaults:ce}}),M=X.defaults,e=X.getDefaults,R=X.changeDefaults,g=/[&<>"']/,v=/[&<>"']/g,u=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,i={"&":"&","<":"<",">":">",'"':""","'":"'"},A=function(ue){return i[ue]};function o(we,ue){if(ue){if(g.test(we))return we.replace(v,A)}else if(u.test(we))return we.replace(s,A);return we}var a=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function r(we){return we.replace(a,function(ue,ce){return ce=ce.toLowerCase(),ce==="colon"?":":ce.charAt(0)==="#"?ce.charAt(1)==="x"?String.fromCharCode(parseInt(ce.substring(2),16)):String.fromCharCode(+ce.substring(1)):""})}var t=/(^|[^\[])\^/g;function y(we,ue){we=we.source||we,ue=ue||"";var ce={replace:function(ie,le){return le=le.source||le,le=le.replace(t,"$1"),we=we.replace(ie,le),ce},getRegex:function(){return new RegExp(we,ue)}};return ce}var _=/[^\w:]/g,E=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function B(we,ue,ce){if(we){var te;try{te=decodeURIComponent(r(ce)).replace(_,"").toLowerCase()}catch(ie){return null}if(te.indexOf("javascript:")===0||te.indexOf("vbscript:")===0||te.indexOf("data:")===0)return null}ue&&!E.test(ce)&&(ce=d(ue,ce));try{ce=encodeURI(ce).replace(/%25/g,"%")}catch(ie){return null}return ce}var C={},h=/^[^:]+:\/*[^/]*$/,n=/^([^:]+:)[\s\S]*$/,l=/^([^:]+:\/*[^/]*)[\s\S]*$/;function d(we,ue){C[" "+we]||(h.test(we)?C[" "+we]=we+"/":C[" "+we]=L(we,"/",!0)),we=C[" "+we];var ce=we.indexOf(":")===-1;return ue.substring(0,2)==="//"?ce?ue:we.replace(n,"$1")+ue:ue.charAt(0)==="/"?ce?ue:we.replace(l,"$1")+ue:we+ue}var b={exec:function(){}};function m(we){for(var ue=1,ce,te;ue<arguments.length;ue++){ce=arguments[ue];for(te in ce)Object.prototype.hasOwnProperty.call(ce,te)&&(we[te]=ce[te])}return we}function c(we,ue){var ce=we.replace(/\|/g,function(le,fe,Ie){for(var Pe=!1,qe=fe;--qe>=0&&Ie[qe]==="\\";)Pe=!Pe;return Pe?"|":" |"}),te=ce.split(/ \|/),ie=0;if(te.length>ue)te.splice(ue);else for(;te.length<ue;)te.push("");for(;ie<te.length;ie++)te[ie]=te[ie].trim().replace(/\\\|/g,"|");return te}function L(we,ue,ce){var te=we.length;if(te===0)return"";for(var ie=0;ie<te;){var le=we.charAt(te-ie-1);if(le===ue&&!ce)ie++;else if(le!==ue&&ce)ie++;else break}return we.substr(0,te-ie)}function N(we,ue){if(we.indexOf(ue[1])===-1)return-1;for(var ce=we.length,te=0,ie=0;ie<ce;ie++)if(we[ie]==="\\")ie++;else if(we[ie]===ue[0])te++;else if(we[ie]===ue[1]&&(te--,te<0))return ie;return-1}function T(we){we&&we.sanitize&&!we.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 P={escape:o,unescape:r,edit:y,cleanUrl:B,resolveUrl:d,noopTest:b,merge:m,splitCells:c,rtrim:L,findClosingBracket:N,checkSanitizeDeprecation:T},W=X.defaults,U=P.rtrim,Y=P.splitCells,re=P.escape,me=P.findClosingBracket;function ge(we,ue,ce){var te=ue.href,ie=ue.title?re(ue.title):null,le=we[1].replace(/\\([\[\]])/g,"$1");return we[0].charAt(0)!=="!"?{type:"link",raw:ce,href:te,title:ie,text:le}:{type:"image",raw:ce,href:te,title:ie,text:re(le)}}function Oe(we,ue){var ce=we.match(/^(\s+)(?:```)/);if(ce===null)return ue;var te=ce[1];return ue.split(`
|
|
`).map(function(ie){var le=ie.match(/^\s+/);if(le===null)return ie;var fe=le[0];return fe.length>=te.length?ie.slice(te.length):ie}).join(`
|
|
`)}var Se=function(){function we(ce){this.options=ce||W}var ue=we.prototype;return ue.space=function(te){var ie=this.rules.block.newline.exec(te);if(ie)return ie[0].length>1?{type:"space",raw:ie[0]}:{raw:`
|
|
`}},ue.code=function(te,ie){var le=this.rules.block.code.exec(te);if(le){var fe=ie[ie.length-1];if(fe&&fe.type==="paragraph")return{raw:le[0],text:le[0].trimRight()};var Ie=le[0].replace(/^ {4}/gm,"");return{type:"code",raw:le[0],codeBlockStyle:"indented",text:this.options.pedantic?Ie:U(Ie,`
|
|
`)}}},ue.fences=function(te){var ie=this.rules.block.fences.exec(te);if(ie){var le=ie[0],fe=Oe(le,ie[3]||"");return{type:"code",raw:le,lang:ie[2]?ie[2].trim():ie[2],text:fe}}},ue.heading=function(te){var ie=this.rules.block.heading.exec(te);if(ie)return{type:"heading",raw:ie[0],depth:ie[1].length,text:ie[2]}},ue.nptable=function(te){var ie=this.rules.block.nptable.exec(te);if(ie){var le={type:"table",header:Y(ie[1].replace(/^ *| *\| *$/g,"")),align:ie[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ie[3]?ie[3].replace(/\n$/,"").split(`
|
|
`):[],raw:ie[0]};if(le.header.length===le.align.length){var fe=le.align.length,Ie;for(Ie=0;Ie<fe;Ie++)/^ *-+: *$/.test(le.align[Ie])?le.align[Ie]="right":/^ *:-+: *$/.test(le.align[Ie])?le.align[Ie]="center":/^ *:-+ *$/.test(le.align[Ie])?le.align[Ie]="left":le.align[Ie]=null;for(fe=le.cells.length,Ie=0;Ie<fe;Ie++)le.cells[Ie]=Y(le.cells[Ie],le.header.length);return le}}},ue.hr=function(te){var ie=this.rules.block.hr.exec(te);if(ie)return{type:"hr",raw:ie[0]}},ue.blockquote=function(te){var ie=this.rules.block.blockquote.exec(te);if(ie){var le=ie[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:ie[0],text:le}}},ue.list=function(te){var ie=this.rules.block.list.exec(te);if(ie){for(var le=ie[0],fe=ie[2],Ie=fe.length>1,Pe=fe[fe.length-1]===")",qe={type:"list",raw:le,ordered:Ie,start:Ie?+fe.slice(0,-1):"",loose:!1,items:[]},dt=ie[0].match(this.rules.block.item),lt=!1,st,Lt,mt,tt,er,Jt,Ot,yt=dt.length,Et=0;Et<yt;Et++)st=dt[Et],le=st,Lt=st.length,st=st.replace(/^ *([*+-]|\d+[.)]) */,""),~st.indexOf(`
|
|
`)&&(Lt-=st.length,st=this.options.pedantic?st.replace(/^ {1,4}/gm,""):st.replace(new RegExp("^ {1,"+Lt+"}","gm"),"")),Et!==yt-1&&(mt=this.rules.block.bullet.exec(dt[Et+1])[0],(Ie?mt.length===1||!Pe&&mt[mt.length-1]===")":mt.length>1||this.options.smartLists&&mt!==fe)&&(tt=dt.slice(Et+1).join(`
|
|
`),qe.raw=qe.raw.substring(0,qe.raw.length-tt.length),Et=yt-1)),er=lt||/\n\n(?!\s*$)/.test(st),Et!==yt-1&&(lt=st.charAt(st.length-1)===`
|
|
`,er||(er=lt)),er&&(qe.loose=!0),Jt=/^\[[ xX]\] /.test(st),Ot=void 0,Jt&&(Ot=st[1]!==" ",st=st.replace(/^\[[ xX]\] +/,"")),qe.items.push({type:"list_item",raw:le,task:Jt,checked:Ot,loose:er,text:st});return qe}},ue.html=function(te){var ie=this.rules.block.html.exec(te);if(ie)return{type:this.options.sanitize?"paragraph":"html",raw:ie[0],pre:!this.options.sanitizer&&(ie[1]==="pre"||ie[1]==="script"||ie[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ie[0]):re(ie[0]):ie[0]}},ue.def=function(te){var ie=this.rules.block.def.exec(te);if(ie){ie[3]&&(ie[3]=ie[3].substring(1,ie[3].length-1));var le=ie[1].toLowerCase().replace(/\s+/g," ");return{tag:le,raw:ie[0],href:ie[2],title:ie[3]}}},ue.table=function(te){var ie=this.rules.block.table.exec(te);if(ie){var le={type:"table",header:Y(ie[1].replace(/^ *| *\| *$/g,"")),align:ie[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ie[3]?ie[3].replace(/\n$/,"").split(`
|
|
`):[]};if(le.header.length===le.align.length){le.raw=ie[0];var fe=le.align.length,Ie;for(Ie=0;Ie<fe;Ie++)/^ *-+: *$/.test(le.align[Ie])?le.align[Ie]="right":/^ *:-+: *$/.test(le.align[Ie])?le.align[Ie]="center":/^ *:-+ *$/.test(le.align[Ie])?le.align[Ie]="left":le.align[Ie]=null;for(fe=le.cells.length,Ie=0;Ie<fe;Ie++)le.cells[Ie]=Y(le.cells[Ie].replace(/^ *\| *| *\| *$/g,""),le.header.length);return le}}},ue.lheading=function(te){var ie=this.rules.block.lheading.exec(te);if(ie)return{type:"heading",raw:ie[0],depth:ie[2].charAt(0)==="="?1:2,text:ie[1]}},ue.paragraph=function(te){var ie=this.rules.block.paragraph.exec(te);if(ie)return{type:"paragraph",raw:ie[0],text:ie[1].charAt(ie[1].length-1)===`
|
|
`?ie[1].slice(0,-1):ie[1]}},ue.text=function(te,ie){var le=this.rules.block.text.exec(te);if(le){var fe=ie[ie.length-1];return fe&&fe.type==="text"?{raw:le[0],text:le[0]}:{type:"text",raw:le[0],text:le[0]}}},ue.escape=function(te){var ie=this.rules.inline.escape.exec(te);if(ie)return{type:"escape",raw:ie[0],text:re(ie[1])}},ue.tag=function(te,ie,le){var fe=this.rules.inline.tag.exec(te);if(fe)return!ie&&/^<a /i.test(fe[0])?ie=!0:ie&&/^<\/a>/i.test(fe[0])&&(ie=!1),!le&&/^<(pre|code|kbd|script)(\s|>)/i.test(fe[0])?le=!0:le&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(fe[0])&&(le=!1),{type:this.options.sanitize?"text":"html",raw:fe[0],inLink:ie,inRawBlock:le,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(fe[0]):re(fe[0]):fe[0]}},ue.link=function(te){var ie=this.rules.inline.link.exec(te);if(ie){var le=me(ie[2],"()");if(le>-1){var fe=ie[0].indexOf("!")===0?5:4,Ie=fe+ie[1].length+le;ie[2]=ie[2].substring(0,le),ie[0]=ie[0].substring(0,Ie).trim(),ie[3]=""}var Pe=ie[2],qe="";if(this.options.pedantic){var dt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Pe);dt?(Pe=dt[1],qe=dt[3]):qe=""}else qe=ie[3]?ie[3].slice(1,-1):"";Pe=Pe.trim().replace(/^<([\s\S]*)>$/,"$1");var lt=ge(ie,{href:Pe&&Pe.replace(this.rules.inline._escapes,"$1"),title:qe&&qe.replace(this.rules.inline._escapes,"$1")},ie[0]);return lt}},ue.reflink=function(te,ie){var le;if((le=this.rules.inline.reflink.exec(te))||(le=this.rules.inline.nolink.exec(te))){var fe=(le[2]||le[1]).replace(/\s+/g," ");if(fe=ie[fe.toLowerCase()],!fe||!fe.href){var Ie=le[0].charAt(0);return{type:"text",raw:Ie,text:Ie}}var Pe=ge(le,fe,le[0]);return Pe}},ue.strong=function(te,ie,le){le===void 0&&(le="");var fe=this.rules.inline.strong.start.exec(te);if(fe&&(!fe[1]||fe[1]&&(le===""||this.rules.inline.punctuation.exec(le)))){ie=ie.slice(-1*te.length);var Ie=fe[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Ie.lastIndex=0;for(var Pe;(fe=Ie.exec(ie))!=null;)if(Pe=this.rules.inline.strong.middle.exec(ie.slice(0,fe.index+3)),Pe)return{type:"strong",raw:te.slice(0,Pe[0].length),text:te.slice(2,Pe[0].length-2)}}},ue.em=function(te,ie,le){le===void 0&&(le="");var fe=this.rules.inline.em.start.exec(te);if(fe&&(!fe[1]||fe[1]&&(le===""||this.rules.inline.punctuation.exec(le)))){ie=ie.slice(-1*te.length);var Ie=fe[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Ie.lastIndex=0;for(var Pe;(fe=Ie.exec(ie))!=null;)if(Pe=this.rules.inline.em.middle.exec(ie.slice(0,fe.index+2)),Pe)return{type:"em",raw:te.slice(0,Pe[0].length),text:te.slice(1,Pe[0].length-1)}}},ue.codespan=function(te){var ie=this.rules.inline.code.exec(te);if(ie){var le=ie[2].replace(/\n/g," "),fe=/[^ ]/.test(le),Ie=le.startsWith(" ")&&le.endsWith(" ");return fe&&Ie&&(le=le.substring(1,le.length-1)),le=re(le,!0),{type:"codespan",raw:ie[0],text:le}}},ue.br=function(te){var ie=this.rules.inline.br.exec(te);if(ie)return{type:"br",raw:ie[0]}},ue.del=function(te){var ie=this.rules.inline.del.exec(te);if(ie)return{type:"del",raw:ie[0],text:ie[1]}},ue.autolink=function(te,ie){var le=this.rules.inline.autolink.exec(te);if(le){var fe,Ie;return le[2]==="@"?(fe=re(this.options.mangle?ie(le[1]):le[1]),Ie="mailto:"+fe):(fe=re(le[1]),Ie=fe),{type:"link",raw:le[0],text:fe,href:Ie,tokens:[{type:"text",raw:fe,text:fe}]}}},ue.url=function(te,ie){var le;if(le=this.rules.inline.url.exec(te)){var fe,Ie;if(le[2]==="@")fe=re(this.options.mangle?ie(le[0]):le[0]),Ie="mailto:"+fe;else{var Pe;do Pe=le[0],le[0]=this.rules.inline._backpedal.exec(le[0])[0];while(Pe!==le[0]);fe=re(le[0]),le[1]==="www."?Ie="http://"+fe:Ie=fe}return{type:"link",raw:le[0],text:fe,href:Ie,tokens:[{type:"text",raw:fe,text:fe}]}}},ue.inlineText=function(te,ie,le){var fe=this.rules.inline.text.exec(te);if(fe){var Ie;return ie?Ie=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(fe[0]):re(fe[0]):fe[0]:Ie=re(this.options.smartypants?le(fe[0]):fe[0]),{type:"text",raw:fe[0],text:Ie}}},we}(),Be=P.noopTest,Ne=P.edit,ke=P.merge,Ce={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:Be,table:Be,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};Ce._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Ce._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Ce.def=Ne(Ce.def).replace("label",Ce._label).replace("title",Ce._title).getRegex(),Ce.bullet=/(?:[*+-]|\d{1,9}[.)])/,Ce.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,Ce.item=Ne(Ce.item,"gm").replace(/bull/g,Ce.bullet).getRegex(),Ce.list=Ne(Ce.list).replace(/bull/g,Ce.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Ce.def.source+")").getRegex(),Ce._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",Ce._comment=/<!--(?!-?>)[\s\S]*?-->/,Ce.html=Ne(Ce.html,"i").replace("comment",Ce._comment).replace("tag",Ce._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ce.paragraph=Ne(Ce._paragraph).replace("hr",Ce.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",Ce._tag).getRegex(),Ce.blockquote=Ne(Ce.blockquote).replace("paragraph",Ce.paragraph).getRegex(),Ce.normal=ke({},Ce),Ce.gfm=ke({},Ce.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*|$)"}),Ce.gfm.nptable=Ne(Ce.gfm.nptable).replace("hr",Ce.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",Ce._tag).getRegex(),Ce.gfm.table=Ne(Ce.gfm.table).replace("hr",Ce.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",Ce._tag).getRegex(),Ce.pedantic=ke({},Ce.normal,{html:Ne(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ce._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:Be,paragraph:Ne(Ce.normal._paragraph).replace("hr",Ce.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",Ce.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ve={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Be,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:Be,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};ve._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ve.punctuation=Ne(ve.punctuation).replace(/punctuation/g,ve._punctuation).getRegex(),ve._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ve._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ve.em.start=Ne(ve.em.start).replace(/punctuation/g,ve._punctuation).getRegex(),ve.em.middle=Ne(ve.em.middle).replace(/punctuation/g,ve._punctuation).replace(/overlapSkip/g,ve._overlapSkip).getRegex(),ve.em.endAst=Ne(ve.em.endAst,"g").replace(/punctuation/g,ve._punctuation).getRegex(),ve.em.endUnd=Ne(ve.em.endUnd,"g").replace(/punctuation/g,ve._punctuation).getRegex(),ve.strong.start=Ne(ve.strong.start).replace(/punctuation/g,ve._punctuation).getRegex(),ve.strong.middle=Ne(ve.strong.middle).replace(/punctuation/g,ve._punctuation).replace(/blockSkip/g,ve._blockSkip).getRegex(),ve.strong.endAst=Ne(ve.strong.endAst,"g").replace(/punctuation/g,ve._punctuation).getRegex(),ve.strong.endUnd=Ne(ve.strong.endUnd,"g").replace(/punctuation/g,ve._punctuation).getRegex(),ve.blockSkip=Ne(ve._blockSkip,"g").getRegex(),ve.overlapSkip=Ne(ve._overlapSkip,"g").getRegex(),ve._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ve._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ve._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])?)+(?![-_])/,ve.autolink=Ne(ve.autolink).replace("scheme",ve._scheme).replace("email",ve._email).getRegex(),ve._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ve.tag=Ne(ve.tag).replace("comment",Ce._comment).replace("attribute",ve._attribute).getRegex(),ve._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ve._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ve._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ve.link=Ne(ve.link).replace("label",ve._label).replace("href",ve._href).replace("title",ve._title).getRegex(),ve.reflink=Ne(ve.reflink).replace("label",ve._label).getRegex(),ve.reflinkSearch=Ne(ve.reflinkSearch,"g").replace("reflink",ve.reflink).replace("nolink",ve.nolink).getRegex(),ve.normal=ke({},ve),ve.pedantic=ke({},ve.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:Ne(/^!?\[(label)\]\((.*?)\)/).replace("label",ve._label).getRegex(),reflink:Ne(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ve._label).getRegex()}),ve.gfm=ke({},ve.normal,{escape:Ne(ve.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),ve.gfm.url=Ne(ve.gfm.url,"i").replace("email",ve.gfm._extended_email).getRegex(),ve.breaks=ke({},ve.gfm,{br:Ne(ve.br).replace("{2,}","*").getRegex(),text:Ne(ve.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Ye={block:Ce,inline:ve},ht=X.defaults,at=Ye.block,We=Ye.inline;function it(we){return we.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 ne(we){var ue="",ce,te,ie=we.length;for(ce=0;ce<ie;ce++)te=we.charCodeAt(ce),Math.random()>.5&&(te="x"+te.toString(16)),ue+="&#"+te+";";return ue}var J=function(){function we(ce){this.tokens=[],this.tokens.links=Object.create(null),this.options=ce||ht,this.options.tokenizer=this.options.tokenizer||new Se,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var te={block:at.normal,inline:We.normal};this.options.pedantic?(te.block=at.pedantic,te.inline=We.pedantic):this.options.gfm&&(te.block=at.gfm,this.options.breaks?te.inline=We.breaks:te.inline=We.gfm),this.tokenizer.rules=te}we.lex=function(te,ie){var le=new we(ie);return le.lex(te)};var ue=we.prototype;return ue.lex=function(te){return te=te.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(te,this.tokens,!0),this.inline(this.tokens),this.tokens},ue.blockTokens=function(te,ie,le){ie===void 0&&(ie=[]),le===void 0&&(le=!0),te=te.replace(/^ +$/gm,"");for(var fe,Ie,Pe,qe;te;){if(fe=this.tokenizer.space(te)){te=te.substring(fe.raw.length),fe.type&&ie.push(fe);continue}if(fe=this.tokenizer.code(te,ie)){te=te.substring(fe.raw.length),fe.type?ie.push(fe):(qe=ie[ie.length-1],qe.raw+=`
|
|
`+fe.raw,qe.text+=`
|
|
`+fe.text);continue}if(fe=this.tokenizer.fences(te)){te=te.substring(fe.raw.length),ie.push(fe);continue}if(fe=this.tokenizer.heading(te)){te=te.substring(fe.raw.length),ie.push(fe);continue}if(fe=this.tokenizer.nptable(te)){te=te.substring(fe.raw.length),ie.push(fe);continue}if(fe=this.tokenizer.hr(te)){te=te.substring(fe.raw.length),ie.push(fe);continue}if(fe=this.tokenizer.blockquote(te)){te=te.substring(fe.raw.length),fe.tokens=this.blockTokens(fe.text,[],le),ie.push(fe);continue}if(fe=this.tokenizer.list(te)){for(te=te.substring(fe.raw.length),Pe=fe.items.length,Ie=0;Ie<Pe;Ie++)fe.items[Ie].tokens=this.blockTokens(fe.items[Ie].text,[],!1);ie.push(fe);continue}if(fe=this.tokenizer.html(te)){te=te.substring(fe.raw.length),ie.push(fe);continue}if(le&&(fe=this.tokenizer.def(te))){te=te.substring(fe.raw.length),this.tokens.links[fe.tag]||(this.tokens.links[fe.tag]={href:fe.href,title:fe.title});continue}if(fe=this.tokenizer.table(te)){te=te.substring(fe.raw.length),ie.push(fe);continue}if(fe=this.tokenizer.lheading(te)){te=te.substring(fe.raw.length),ie.push(fe);continue}if(le&&(fe=this.tokenizer.paragraph(te))){te=te.substring(fe.raw.length),ie.push(fe);continue}if(fe=this.tokenizer.text(te,ie)){te=te.substring(fe.raw.length),fe.type?ie.push(fe):(qe=ie[ie.length-1],qe.raw+=`
|
|
`+fe.raw,qe.text+=`
|
|
`+fe.text);continue}if(te){var dt="Infinite loop on byte: "+te.charCodeAt(0);if(this.options.silent){console.error(dt);break}else throw new Error(dt)}}return ie},ue.inline=function(te){var ie,le,fe,Ie,Pe,qe,dt=te.length;for(ie=0;ie<dt;ie++){qe=te[ie];switch(qe.type){case"paragraph":case"text":case"heading":{qe.tokens=[],this.inlineTokens(qe.text,qe.tokens);break}case"table":{for(qe.tokens={header:[],cells:[]},Ie=qe.header.length,le=0;le<Ie;le++)qe.tokens.header[le]=[],this.inlineTokens(qe.header[le],qe.tokens.header[le]);for(Ie=qe.cells.length,le=0;le<Ie;le++)for(Pe=qe.cells[le],qe.tokens.cells[le]=[],fe=0;fe<Pe.length;fe++)qe.tokens.cells[le][fe]=[],this.inlineTokens(Pe[fe],qe.tokens.cells[le][fe]);break}case"blockquote":{this.inline(qe.tokens);break}case"list":{for(Ie=qe.items.length,le=0;le<Ie;le++)this.inline(qe.items[le].tokens);break}}}return te},ue.inlineTokens=function(te,ie,le,fe,Ie){ie===void 0&&(ie=[]),le===void 0&&(le=!1),fe===void 0&&(fe=!1),Ie===void 0&&(Ie="");var Pe,qe=te,dt;if(this.tokens.links){var lt=Object.keys(this.tokens.links);if(lt.length>0)for(;(dt=this.tokenizer.rules.inline.reflinkSearch.exec(qe))!=null;)lt.includes(dt[0].slice(dt[0].lastIndexOf("[")+1,-1))&&(qe=qe.slice(0,dt.index)+"["+"a".repeat(dt[0].length-2)+"]"+qe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(dt=this.tokenizer.rules.inline.blockSkip.exec(qe))!=null;)qe=qe.slice(0,dt.index)+"["+"a".repeat(dt[0].length-2)+"]"+qe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;te;){if(Pe=this.tokenizer.escape(te)){te=te.substring(Pe.raw.length),ie.push(Pe);continue}if(Pe=this.tokenizer.tag(te,le,fe)){te=te.substring(Pe.raw.length),le=Pe.inLink,fe=Pe.inRawBlock,ie.push(Pe);continue}if(Pe=this.tokenizer.link(te)){te=te.substring(Pe.raw.length),Pe.type==="link"&&(Pe.tokens=this.inlineTokens(Pe.text,[],!0,fe)),ie.push(Pe);continue}if(Pe=this.tokenizer.reflink(te,this.tokens.links)){te=te.substring(Pe.raw.length),Pe.type==="link"&&(Pe.tokens=this.inlineTokens(Pe.text,[],!0,fe)),ie.push(Pe);continue}if(Pe=this.tokenizer.strong(te,qe,Ie)){te=te.substring(Pe.raw.length),Pe.tokens=this.inlineTokens(Pe.text,[],le,fe),ie.push(Pe);continue}if(Pe=this.tokenizer.em(te,qe,Ie)){te=te.substring(Pe.raw.length),Pe.tokens=this.inlineTokens(Pe.text,[],le,fe),ie.push(Pe);continue}if(Pe=this.tokenizer.codespan(te)){te=te.substring(Pe.raw.length),ie.push(Pe);continue}if(Pe=this.tokenizer.br(te)){te=te.substring(Pe.raw.length),ie.push(Pe);continue}if(Pe=this.tokenizer.del(te)){te=te.substring(Pe.raw.length),Pe.tokens=this.inlineTokens(Pe.text,[],le,fe),ie.push(Pe);continue}if(Pe=this.tokenizer.autolink(te,ne)){te=te.substring(Pe.raw.length),ie.push(Pe);continue}if(!le&&(Pe=this.tokenizer.url(te,ne))){te=te.substring(Pe.raw.length),ie.push(Pe);continue}if(Pe=this.tokenizer.inlineText(te,fe,it)){te=te.substring(Pe.raw.length),Ie=Pe.raw.slice(-1),ie.push(Pe);continue}if(te){var st="Infinite loop on byte: "+te.charCodeAt(0);if(this.options.silent){console.error(st);break}else throw new Error(st)}}return ie},G(we,null,[{key:"rules",get:function(){return{block:at,inline:We}}}]),we}(),k=X.defaults,$=P.cleanUrl,q=P.escape,he=function(){function we(ce){this.options=ce||k}var ue=we.prototype;return ue.code=function(te,ie,le){var fe=(ie||"").match(/\S*/)[0];if(this.options.highlight){var Ie=this.options.highlight(te,fe);Ie!=null&&Ie!==te&&(le=!0,te=Ie)}return fe?'<pre><code class="'+this.options.langPrefix+q(fe,!0)+'">'+(le?te:q(te,!0))+`</code></pre>
|
|
`:"<pre><code>"+(le?te:q(te,!0))+`</code></pre>
|
|
`},ue.blockquote=function(te){return`<blockquote>
|
|
`+te+`</blockquote>
|
|
`},ue.html=function(te){return te},ue.heading=function(te,ie,le,fe){return this.options.headerIds?"<h"+ie+' id="'+this.options.headerPrefix+fe.slug(le)+'">'+te+"</h"+ie+`>
|
|
`:"<h"+ie+">"+te+"</h"+ie+`>
|
|
`},ue.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},ue.list=function(te,ie,le){var fe=ie?"ol":"ul",Ie=ie&&le!==1?' start="'+le+'"':"";return"<"+fe+Ie+`>
|
|
`+te+"</"+fe+`>
|
|
`},ue.listitem=function(te){return"<li>"+te+`</li>
|
|
`},ue.checkbox=function(te){return"<input "+(te?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},ue.paragraph=function(te){return"<p>"+te+`</p>
|
|
`},ue.table=function(te,ie){return ie&&(ie="<tbody>"+ie+"</tbody>"),`<table>
|
|
<thead>
|
|
`+te+`</thead>
|
|
`+ie+`</table>
|
|
`},ue.tablerow=function(te){return`<tr>
|
|
`+te+`</tr>
|
|
`},ue.tablecell=function(te,ie){var le=ie.header?"th":"td",fe=ie.align?"<"+le+' align="'+ie.align+'">':"<"+le+">";return fe+te+"</"+le+`>
|
|
`},ue.strong=function(te){return"<strong>"+te+"</strong>"},ue.em=function(te){return"<em>"+te+"</em>"},ue.codespan=function(te){return"<code>"+te+"</code>"},ue.br=function(){return this.options.xhtml?"<br/>":"<br>"},ue.del=function(te){return"<del>"+te+"</del>"},ue.link=function(te,ie,le){if(te=$(this.options.sanitize,this.options.baseUrl,te),te===null)return le;var fe='<a href="'+q(te)+'"';return ie&&(fe+=' title="'+ie+'"'),fe+=">"+le+"</a>",fe},ue.image=function(te,ie,le){if(te=$(this.options.sanitize,this.options.baseUrl,te),te===null)return le;var fe='<img src="'+te+'" alt="'+le+'"';return ie&&(fe+=' title="'+ie+'"'),fe+=this.options.xhtml?"/>":">",fe},ue.text=function(te){return te},we}(),pe=function(){function we(){}var ue=we.prototype;return ue.strong=function(te){return te},ue.em=function(te){return te},ue.codespan=function(te){return te},ue.del=function(te){return te},ue.html=function(te){return te},ue.text=function(te){return te},ue.link=function(te,ie,le){return""+le},ue.image=function(te,ie,le){return""+le},ue.br=function(){return""},we}(),Ke=function(){function we(){this.seen={}}var ue=we.prototype;return ue.slug=function(te){var ie=te.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ie)){var le=ie;do this.seen[le]++,ie=le+"-"+this.seen[le];while(this.seen.hasOwnProperty(ie))}return this.seen[ie]=0,ie},we}(),Je=X.defaults,ze=P.unescape,Ze=function(){function we(ce){this.options=ce||Je,this.options.renderer=this.options.renderer||new he,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new pe,this.slugger=new Ke}we.parse=function(te,ie){var le=new we(ie);return le.parse(te)};var ue=we.prototype;return ue.parse=function(te,ie){ie===void 0&&(ie=!0);var le="",fe,Ie,Pe,qe,dt,lt,st,Lt,mt,tt,er,Jt,Ot,yt,Et,wt,Mt,ut,lr=te.length;for(fe=0;fe<lr;fe++){tt=te[fe];switch(tt.type){case"space":continue;case"hr":{le+=this.renderer.hr();continue}case"heading":{le+=this.renderer.heading(this.parseInline(tt.tokens),tt.depth,ze(this.parseInline(tt.tokens,this.textRenderer)),this.slugger);continue}case"code":{le+=this.renderer.code(tt.text,tt.lang,tt.escaped);continue}case"table":{for(Lt="",st="",qe=tt.header.length,Ie=0;Ie<qe;Ie++)st+=this.renderer.tablecell(this.parseInline(tt.tokens.header[Ie]),{header:!0,align:tt.align[Ie]});for(Lt+=this.renderer.tablerow(st),mt="",qe=tt.cells.length,Ie=0;Ie<qe;Ie++){for(lt=tt.tokens.cells[Ie],st="",dt=lt.length,Pe=0;Pe<dt;Pe++)st+=this.renderer.tablecell(this.parseInline(lt[Pe]),{header:!1,align:tt.align[Pe]});mt+=this.renderer.tablerow(st)}le+=this.renderer.table(Lt,mt);continue}case"blockquote":{mt=this.parse(tt.tokens),le+=this.renderer.blockquote(mt);continue}case"list":{for(er=tt.ordered,Jt=tt.start,Ot=tt.loose,qe=tt.items.length,mt="",Ie=0;Ie<qe;Ie++)Et=tt.items[Ie],wt=Et.checked,Mt=Et.task,yt="",Et.task&&(ut=this.renderer.checkbox(wt),Ot?Et.tokens.length>0&&Et.tokens[0].type==="text"?(Et.tokens[0].text=ut+" "+Et.tokens[0].text,Et.tokens[0].tokens&&Et.tokens[0].tokens.length>0&&Et.tokens[0].tokens[0].type==="text"&&(Et.tokens[0].tokens[0].text=ut+" "+Et.tokens[0].tokens[0].text)):Et.tokens.unshift({type:"text",text:ut}):yt+=ut),yt+=this.parse(Et.tokens,Ot),mt+=this.renderer.listitem(yt,Mt,wt);le+=this.renderer.list(mt,er,Jt);continue}case"html":{le+=this.renderer.html(tt.text);continue}case"paragraph":{le+=this.renderer.paragraph(this.parseInline(tt.tokens));continue}case"text":{for(mt=tt.tokens?this.parseInline(tt.tokens):tt.text;fe+1<lr&&te[fe+1].type==="text";)tt=te[++fe],mt+=`
|
|
`+(tt.tokens?this.parseInline(tt.tokens):tt.text);le+=ie?this.renderer.paragraph(mt):mt;continue}default:{var At='Token with "'+tt.type+'" type was not found.';if(this.options.silent){console.error(At);return}else throw new Error(At)}}}return le},ue.parseInline=function(te,ie){ie=ie||this.renderer;var le="",fe,Ie,Pe=te.length;for(fe=0;fe<Pe;fe++){Ie=te[fe];switch(Ie.type){case"escape":{le+=ie.text(Ie.text);break}case"html":{le+=ie.html(Ie.text);break}case"link":{le+=ie.link(Ie.href,Ie.title,this.parseInline(Ie.tokens,ie));break}case"image":{le+=ie.image(Ie.href,Ie.title,Ie.text);break}case"strong":{le+=ie.strong(this.parseInline(Ie.tokens,ie));break}case"em":{le+=ie.em(this.parseInline(Ie.tokens,ie));break}case"codespan":{le+=ie.codespan(Ie.text);break}case"br":{le+=ie.br();break}case"del":{le+=ie.del(this.parseInline(Ie.tokens,ie));break}case"text":{le+=ie.text(Ie.text);break}default:{var qe='Token with "'+Ie.type+'" type was not found.';if(this.options.silent){console.error(qe);return}else throw new Error(qe)}}}return le},we}(),nt=P.merge,pt=P.checkSanitizeDeprecation,xe=P.escape,Ue=X.getDefaults,Qe=X.changeDefaults,je=X.defaults;function Le(we,ue,ce){if(typeof we=="undefined"||we===null)throw new Error("marked(): input parameter is undefined or null");if(typeof we!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(we)+", string expected");if(typeof ue=="function"&&(ce=ue,ue=null),ue=nt({},Le.defaults,ue||{}),pt(ue),ce){var te=ue.highlight,ie;try{ie=J.lex(we,ue)}catch(Pe){return ce(Pe)}var le=function(qe){var dt;if(!qe)try{dt=Ze.parse(ie,ue)}catch(lt){qe=lt}return ue.highlight=te,qe?ce(qe):ce(null,dt)};if(!te||te.length<3)return le();if(delete ue.highlight,!ie.length)return le();var fe=0;Le.walkTokens(ie,function(Pe){Pe.type==="code"&&(fe++,setTimeout(function(){te(Pe.text,Pe.lang,function(qe,dt){if(qe)return le(qe);dt!=null&&dt!==Pe.text&&(Pe.text=dt,Pe.escaped=!0),fe--,fe===0&&le()})},0))}),fe===0&&le();return}try{var Ie=J.lex(we,ue);return ue.walkTokens&&Le.walkTokens(Ie,ue.walkTokens),Ze.parse(Ie,ue)}catch(Pe){if(Pe.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,ue.silent)return"<p>An error occurred:</p><pre>"+xe(Pe.message+"",!0)+"</pre>";throw Pe}}Le.options=Le.setOptions=function(we){return nt(Le.defaults,we),Qe(Le.defaults),Le},Le.getDefaults=Ue,Le.defaults=je,Le.use=function(we){var ue=nt({},we);if(we.renderer&&function(){var te=Le.defaults.renderer||new he,ie=function(Ie){var Pe=te[Ie];te[Ie]=function(){for(var qe=arguments.length,dt=new Array(qe),lt=0;lt<qe;lt++)dt[lt]=arguments[lt];var st=we.renderer[Ie].apply(te,dt);return st===!1&&(st=Pe.apply(te,dt)),st}};for(var le in we.renderer)ie(le);ue.renderer=te}(),we.tokenizer&&function(){var te=Le.defaults.tokenizer||new Se,ie=function(Ie){var Pe=te[Ie];te[Ie]=function(){for(var qe=arguments.length,dt=new Array(qe),lt=0;lt<qe;lt++)dt[lt]=arguments[lt];var st=we.tokenizer[Ie].apply(te,dt);return st===!1&&(st=Pe.apply(te,dt)),st}};for(var le in we.tokenizer)ie(le);ue.tokenizer=te}(),we.walkTokens){var ce=Le.defaults.walkTokens;ue.walkTokens=function(te){we.walkTokens(te),ce&&ce(te)}}Le.setOptions(ue)},Le.walkTokens=function(we,ue){for(var ce=F(we),te;!(te=ce()).done;){var ie=te.value;ue(ie);switch(ie.type){case"table":{for(var le=F(ie.tokens.header),fe;!(fe=le()).done;){var Ie=fe.value;Le.walkTokens(Ie,ue)}for(var Pe=F(ie.tokens.cells),qe;!(qe=Pe()).done;)for(var dt=qe.value,lt=F(dt),st;!(st=lt()).done;){var Lt=st.value;Le.walkTokens(Lt,ue)}break}case"list":{Le.walkTokens(ie.items,ue);break}default:ie.tokens&&Le.walkTokens(ie.tokens,ue)}}},Le.Parser=Ze,Le.parser=Ze.parse,Le.Renderer=he,Le.TextRenderer=pe,Le.Lexer=J,Le.lexer=J.lex,Le.Tokenizer=Se,Le.Slugger=Ke,Le.parse=Le;var Fe=Le;return Fe})},FWmy:function(ct,_e,j){"use strict";j.d(_e,"a",function(){return se});function se(G,D){if(!G)throw new Error(D?`Assertion failed (${D})`:"Assertion Failed")}},H7XF:function(ct,_e,j){"use strict";_e.byteLength=M,_e.toByteArray=R,_e.fromByteArray=u;for(var se=[],G=[],D=typeof Uint8Array!="undefined"?Uint8Array:Array,V="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",F=0,O=V.length;F<O;++F)se[F]=V[F],G[V.charCodeAt(F)]=F;G["-".charCodeAt(0)]=62,G["_".charCodeAt(0)]=63;function X(s){var i=s.length;if(i%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var A=s.indexOf("=");A===-1&&(A=i);var o=A===i?0:4-A%4;return[A,o]}function M(s){var i=X(s),A=i[0],o=i[1];return(A+o)*3/4-o}function e(s,i,A){return(i+A)*3/4-A}function R(s){var i,A=X(s),o=A[0],a=A[1],r=new D(e(s,o,a)),t=0,y=a>0?o-4:o,_;for(_=0;_<y;_+=4)i=G[s.charCodeAt(_)]<<18|G[s.charCodeAt(_+1)]<<12|G[s.charCodeAt(_+2)]<<6|G[s.charCodeAt(_+3)],r[t++]=i>>16&255,r[t++]=i>>8&255,r[t++]=i&255;return a===2&&(i=G[s.charCodeAt(_)]<<2|G[s.charCodeAt(_+1)]>>4,r[t++]=i&255),a===1&&(i=G[s.charCodeAt(_)]<<10|G[s.charCodeAt(_+1)]<<4|G[s.charCodeAt(_+2)]>>2,r[t++]=i>>8&255,r[t++]=i&255),r}function g(s){return se[s>>18&63]+se[s>>12&63]+se[s>>6&63]+se[s&63]}function v(s,i,A){for(var o,a=[],r=i;r<A;r+=3)o=(s[r]<<16&16711680)+(s[r+1]<<8&65280)+(s[r+2]&255),a.push(g(o));return a.join("")}function u(s){for(var i,A=s.length,o=A%3,a=[],r=16383,t=0,y=A-o;t<y;t+=r)a.push(v(s,t,t+r>y?y:t+r));return o===1?(i=s[A-1],a.push(se[i>>2]+se[i<<4&63]+"==")):o===2&&(i=(s[A-2]<<8)+s[A-1],a.push(se[i>>10]+se[i>>4&63]+se[i<<2&63]+"=")),a.join("")}},HDXh:function(ct,_e,j){"use strict";(function(se){/*!
|
|
* The buffer module from node.js, for the browser.
|
|
*
|
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
* @license MIT
|
|
*/var G=j("H7XF"),D=j("kVK+"),V=j("49sm");_e.Buffer=M,_e.SlowBuffer=a,_e.INSPECT_MAX_BYTES=50,M.TYPED_ARRAY_SUPPORT=se.TYPED_ARRAY_SUPPORT!==void 0?se.TYPED_ARRAY_SUPPORT:F(),_e.kMaxLength=O();function F(){try{var ne=new Uint8Array(1);return ne.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ne.foo()===42&&typeof ne.subarray=="function"&&ne.subarray(1,1).byteLength===0}catch(J){return!1}}function O(){return M.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function X(ne,J){if(O()<J)throw new RangeError("Invalid typed array length");return M.TYPED_ARRAY_SUPPORT?(ne=new Uint8Array(J),ne.__proto__=M.prototype):(ne===null&&(ne=new M(J)),ne.length=J),ne}function M(ne,J,k){if(!M.TYPED_ARRAY_SUPPORT&&!(this instanceof M))return new M(ne,J,k);if(typeof ne=="number"){if(typeof J=="string")throw new Error("If encoding is specified then the first argument must be a string");return v(this,ne)}return e(this,ne,J,k)}M.poolSize=8192,M._augment=function(ne){return ne.__proto__=M.prototype,ne};function e(ne,J,k,$){if(typeof J=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&J instanceof ArrayBuffer?i(ne,J,k,$):typeof J=="string"?u(ne,J,k):A(ne,J)}M.from=function(ne,J,k){return e(null,ne,J,k)},M.TYPED_ARRAY_SUPPORT&&(M.prototype.__proto__=Uint8Array.prototype,M.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&M[Symbol.species]===M&&Object.defineProperty(M,Symbol.species,{value:null,configurable:!0}));function R(ne){if(typeof ne!="number")throw new TypeError('"size" argument must be a number');if(ne<0)throw new RangeError('"size" argument must not be negative')}function g(ne,J,k,$){return R(J),J<=0?X(ne,J):k!==void 0?typeof $=="string"?X(ne,J).fill(k,$):X(ne,J).fill(k):X(ne,J)}M.alloc=function(ne,J,k){return g(null,ne,J,k)};function v(ne,J){if(R(J),ne=X(ne,J<0?0:o(J)|0),!M.TYPED_ARRAY_SUPPORT)for(var k=0;k<J;++k)ne[k]=0;return ne}M.allocUnsafe=function(ne){return v(null,ne)},M.allocUnsafeSlow=function(ne){return v(null,ne)};function u(ne,J,k){if((typeof k!="string"||k==="")&&(k="utf8"),!M.isEncoding(k))throw new TypeError('"encoding" must be a valid string encoding');var $=r(J,k)|0;ne=X(ne,$);var q=ne.write(J,k);return q!==$&&(ne=ne.slice(0,q)),ne}function s(ne,J){var k=J.length<0?0:o(J.length)|0;ne=X(ne,k);for(var $=0;$<k;$+=1)ne[$]=J[$]&255;return ne}function i(ne,J,k,$){if(J.byteLength,k<0||J.byteLength<k)throw new RangeError("'offset' is out of bounds");if(J.byteLength<k+($||0))throw new RangeError("'length' is out of bounds");return k===void 0&&$===void 0?J=new Uint8Array(J):$===void 0?J=new Uint8Array(J,k):J=new Uint8Array(J,k,$),M.TYPED_ARRAY_SUPPORT?(ne=J,ne.__proto__=M.prototype):ne=s(ne,J),ne}function A(ne,J){if(M.isBuffer(J)){var k=o(J.length)|0;return ne=X(ne,k),ne.length===0||J.copy(ne,0,0,k),ne}if(J){if(typeof ArrayBuffer!="undefined"&&J.buffer instanceof ArrayBuffer||"length"in J)return typeof J.length!="number"||it(J.length)?X(ne,0):s(ne,J);if(J.type==="Buffer"&&V(J.data))return s(ne,J.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function o(ne){if(ne>=O())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+O().toString(16)+" bytes");return ne|0}function a(ne){return+ne!=ne&&(ne=0),M.alloc(+ne)}M.isBuffer=function(J){return!!(J!=null&&J._isBuffer)},M.compare=function(J,k){if(!M.isBuffer(J)||!M.isBuffer(k))throw new TypeError("Arguments must be Buffers");if(J===k)return 0;for(var $=J.length,q=k.length,he=0,pe=Math.min($,q);he<pe;++he)if(J[he]!==k[he]){$=J[he],q=k[he];break}return $<q?-1:q<$?1:0},M.isEncoding=function(J){switch(String(J).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}},M.concat=function(J,k){if(!V(J))throw new TypeError('"list" argument must be an Array of Buffers');if(J.length===0)return M.alloc(0);var $;if(k===void 0)for(k=0,$=0;$<J.length;++$)k+=J[$].length;var q=M.allocUnsafe(k),he=0;for($=0;$<J.length;++$){var pe=J[$];if(!M.isBuffer(pe))throw new TypeError('"list" argument must be an Array of Buffers');pe.copy(q,he),he+=pe.length}return q};function r(ne,J){if(M.isBuffer(ne))return ne.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(ne)||ne instanceof ArrayBuffer))return ne.byteLength;typeof ne!="string"&&(ne=""+ne);var k=ne.length;if(k===0)return 0;for(var $=!1;;)switch(J){case"ascii":case"latin1":case"binary":return k;case"utf8":case"utf-8":case void 0:return ve(ne).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k*2;case"hex":return k>>>1;case"base64":return at(ne).length;default:if($)return ve(ne).length;J=(""+J).toLowerCase(),$=!0}}M.byteLength=r;function t(ne,J,k){var $=!1;if((J===void 0||J<0)&&(J=0),J>this.length)return"";if((k===void 0||k>this.length)&&(k=this.length),k<=0)return"";if(k>>>=0,J>>>=0,k<=J)return"";for(ne||(ne="utf8");;)switch(ne){case"hex":return P(this,J,k);case"utf8":case"utf-8":return m(this,J,k);case"ascii":return N(this,J,k);case"latin1":case"binary":return T(this,J,k);case"base64":return b(this,J,k);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return W(this,J,k);default:if($)throw new TypeError("Unknown encoding: "+ne);ne=(ne+"").toLowerCase(),$=!0}}M.prototype._isBuffer=!0;function y(ne,J,k){var $=ne[J];ne[J]=ne[k],ne[k]=$}M.prototype.swap16=function(){var J=this.length;if(J%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var k=0;k<J;k+=2)y(this,k,k+1);return this},M.prototype.swap32=function(){var J=this.length;if(J%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var k=0;k<J;k+=4)y(this,k,k+3),y(this,k+1,k+2);return this},M.prototype.swap64=function(){var J=this.length;if(J%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var k=0;k<J;k+=8)y(this,k,k+7),y(this,k+1,k+6),y(this,k+2,k+5),y(this,k+3,k+4);return this},M.prototype.toString=function(){var J=this.length|0;return J===0?"":arguments.length===0?m(this,0,J):t.apply(this,arguments)},M.prototype.equals=function(J){if(!M.isBuffer(J))throw new TypeError("Argument must be a Buffer");return this===J?!0:M.compare(this,J)===0},M.prototype.inspect=function(){var J="",k=_e.INSPECT_MAX_BYTES;return this.length>0&&(J=this.toString("hex",0,k).match(/.{2}/g).join(" "),this.length>k&&(J+=" ... ")),"<Buffer "+J+">"},M.prototype.compare=function(J,k,$,q,he){if(!M.isBuffer(J))throw new TypeError("Argument must be a Buffer");if(k===void 0&&(k=0),$===void 0&&($=J?J.length:0),q===void 0&&(q=0),he===void 0&&(he=this.length),k<0||$>J.length||q<0||he>this.length)throw new RangeError("out of range index");if(q>=he&&k>=$)return 0;if(q>=he)return-1;if(k>=$)return 1;if(k>>>=0,$>>>=0,q>>>=0,he>>>=0,this===J)return 0;for(var pe=he-q,Ke=$-k,Je=Math.min(pe,Ke),ze=this.slice(q,he),Ze=J.slice(k,$),nt=0;nt<Je;++nt)if(ze[nt]!==Ze[nt]){pe=ze[nt],Ke=Ze[nt];break}return pe<Ke?-1:Ke<pe?1:0};function _(ne,J,k,$,q){if(ne.length===0)return-1;if(typeof k=="string"?($=k,k=0):k>2147483647?k=2147483647:k<-2147483648&&(k=-2147483648),k=+k,isNaN(k)&&(k=q?0:ne.length-1),k<0&&(k=ne.length+k),k>=ne.length){if(q)return-1;k=ne.length-1}else if(k<0)if(q)k=0;else return-1;if(typeof J=="string"&&(J=M.from(J,$)),M.isBuffer(J))return J.length===0?-1:E(ne,J,k,$,q);if(typeof J=="number")return J=J&255,M.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?q?Uint8Array.prototype.indexOf.call(ne,J,k):Uint8Array.prototype.lastIndexOf.call(ne,J,k):E(ne,[J],k,$,q);throw new TypeError("val must be string, number or Buffer")}function E(ne,J,k,$,q){var he=1,pe=ne.length,Ke=J.length;if($!==void 0&&($=String($).toLowerCase(),$==="ucs2"||$==="ucs-2"||$==="utf16le"||$==="utf-16le")){if(ne.length<2||J.length<2)return-1;he=2,pe/=2,Ke/=2,k/=2}function Je(xe,Ue){return he===1?xe[Ue]:xe.readUInt16BE(Ue*he)}var ze;if(q){var Ze=-1;for(ze=k;ze<pe;ze++)if(Je(ne,ze)===Je(J,Ze===-1?0:ze-Ze)){if(Ze===-1&&(Ze=ze),ze-Ze+1===Ke)return Ze*he}else Ze!==-1&&(ze-=ze-Ze),Ze=-1}else for(k+Ke>pe&&(k=pe-Ke),ze=k;ze>=0;ze--){for(var nt=!0,pt=0;pt<Ke;pt++)if(Je(ne,ze+pt)!==Je(J,pt)){nt=!1;break}if(nt)return ze}return-1}M.prototype.includes=function(J,k,$){return this.indexOf(J,k,$)!==-1},M.prototype.indexOf=function(J,k,$){return _(this,J,k,$,!0)},M.prototype.lastIndexOf=function(J,k,$){return _(this,J,k,$,!1)};function B(ne,J,k,$){k=Number(k)||0;var q=ne.length-k;$?($=Number($),$>q&&($=q)):$=q;var he=J.length;if(he%2!==0)throw new TypeError("Invalid hex string");$>he/2&&($=he/2);for(var pe=0;pe<$;++pe){var Ke=parseInt(J.substr(pe*2,2),16);if(isNaN(Ke))return pe;ne[k+pe]=Ke}return pe}function C(ne,J,k,$){return We(ve(J,ne.length-k),ne,k,$)}function h(ne,J,k,$){return We(Ye(J),ne,k,$)}function n(ne,J,k,$){return h(ne,J,k,$)}function l(ne,J,k,$){return We(at(J),ne,k,$)}function d(ne,J,k,$){return We(ht(J,ne.length-k),ne,k,$)}M.prototype.write=function(J,k,$,q){if(k===void 0)q="utf8",$=this.length,k=0;else if($===void 0&&typeof k=="string")q=k,$=this.length,k=0;else if(isFinite(k))k=k|0,isFinite($)?($=$|0,q===void 0&&(q="utf8")):(q=$,$=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var he=this.length-k;if(($===void 0||$>he)&&($=he),J.length>0&&($<0||k<0)||k>this.length)throw new RangeError("Attempt to write outside buffer bounds");q||(q="utf8");for(var pe=!1;;)switch(q){case"hex":return B(this,J,k,$);case"utf8":case"utf-8":return C(this,J,k,$);case"ascii":return h(this,J,k,$);case"latin1":case"binary":return n(this,J,k,$);case"base64":return l(this,J,k,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d(this,J,k,$);default:if(pe)throw new TypeError("Unknown encoding: "+q);q=(""+q).toLowerCase(),pe=!0}},M.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function b(ne,J,k){return J===0&&k===ne.length?G.fromByteArray(ne):G.fromByteArray(ne.slice(J,k))}function m(ne,J,k){k=Math.min(ne.length,k);for(var $=[],q=J;q<k;){var he=ne[q],pe=null,Ke=he>239?4:he>223?3:he>191?2:1;if(q+Ke<=k){var Je,ze,Ze,nt;switch(Ke){case 1:he<128&&(pe=he);break;case 2:Je=ne[q+1],(Je&192)===128&&(nt=(he&31)<<6|Je&63,nt>127&&(pe=nt));break;case 3:Je=ne[q+1],ze=ne[q+2],(Je&192)===128&&(ze&192)===128&&(nt=(he&15)<<12|(Je&63)<<6|ze&63,nt>2047&&(nt<55296||nt>57343)&&(pe=nt));break;case 4:Je=ne[q+1],ze=ne[q+2],Ze=ne[q+3],(Je&192)===128&&(ze&192)===128&&(Ze&192)===128&&(nt=(he&15)<<18|(Je&63)<<12|(ze&63)<<6|Ze&63,nt>65535&&nt<1114112&&(pe=nt))}}pe===null?(pe=65533,Ke=1):pe>65535&&(pe-=65536,$.push(pe>>>10&1023|55296),pe=56320|pe&1023),$.push(pe),q+=Ke}return L($)}var c=4096;function L(ne){var J=ne.length;if(J<=c)return String.fromCharCode.apply(String,ne);for(var k="",$=0;$<J;)k+=String.fromCharCode.apply(String,ne.slice($,$+=c));return k}function N(ne,J,k){var $="";k=Math.min(ne.length,k);for(var q=J;q<k;++q)$+=String.fromCharCode(ne[q]&127);return $}function T(ne,J,k){var $="";k=Math.min(ne.length,k);for(var q=J;q<k;++q)$+=String.fromCharCode(ne[q]);return $}function P(ne,J,k){var $=ne.length;(!J||J<0)&&(J=0),(!k||k<0||k>$)&&(k=$);for(var q="",he=J;he<k;++he)q+=Ce(ne[he]);return q}function W(ne,J,k){for(var $=ne.slice(J,k),q="",he=0;he<$.length;he+=2)q+=String.fromCharCode($[he]+$[he+1]*256);return q}M.prototype.slice=function(J,k){var $=this.length;J=~~J,k=k===void 0?$:~~k,J<0?(J+=$,J<0&&(J=0)):J>$&&(J=$),k<0?(k+=$,k<0&&(k=0)):k>$&&(k=$),k<J&&(k=J);var q;if(M.TYPED_ARRAY_SUPPORT)q=this.subarray(J,k),q.__proto__=M.prototype;else{var he=k-J;q=new M(he,void 0);for(var pe=0;pe<he;++pe)q[pe]=this[pe+J]}return q};function U(ne,J,k){if(ne%1!==0||ne<0)throw new RangeError("offset is not uint");if(ne+J>k)throw new RangeError("Trying to access beyond buffer length")}M.prototype.readUIntLE=function(J,k,$){J=J|0,k=k|0,$||U(J,k,this.length);for(var q=this[J],he=1,pe=0;++pe<k&&(he*=256);)q+=this[J+pe]*he;return q},M.prototype.readUIntBE=function(J,k,$){J=J|0,k=k|0,$||U(J,k,this.length);for(var q=this[J+--k],he=1;k>0&&(he*=256);)q+=this[J+--k]*he;return q},M.prototype.readUInt8=function(J,k){return k||U(J,1,this.length),this[J]},M.prototype.readUInt16LE=function(J,k){return k||U(J,2,this.length),this[J]|this[J+1]<<8},M.prototype.readUInt16BE=function(J,k){return k||U(J,2,this.length),this[J]<<8|this[J+1]},M.prototype.readUInt32LE=function(J,k){return k||U(J,4,this.length),(this[J]|this[J+1]<<8|this[J+2]<<16)+this[J+3]*16777216},M.prototype.readUInt32BE=function(J,k){return k||U(J,4,this.length),this[J]*16777216+(this[J+1]<<16|this[J+2]<<8|this[J+3])},M.prototype.readIntLE=function(J,k,$){J=J|0,k=k|0,$||U(J,k,this.length);for(var q=this[J],he=1,pe=0;++pe<k&&(he*=256);)q+=this[J+pe]*he;return he*=128,q>=he&&(q-=Math.pow(2,8*k)),q},M.prototype.readIntBE=function(J,k,$){J=J|0,k=k|0,$||U(J,k,this.length);for(var q=k,he=1,pe=this[J+--q];q>0&&(he*=256);)pe+=this[J+--q]*he;return he*=128,pe>=he&&(pe-=Math.pow(2,8*k)),pe},M.prototype.readInt8=function(J,k){return k||U(J,1,this.length),this[J]&128?(255-this[J]+1)*-1:this[J]},M.prototype.readInt16LE=function(J,k){k||U(J,2,this.length);var $=this[J]|this[J+1]<<8;return $&32768?$|4294901760:$},M.prototype.readInt16BE=function(J,k){k||U(J,2,this.length);var $=this[J+1]|this[J]<<8;return $&32768?$|4294901760:$},M.prototype.readInt32LE=function(J,k){return k||U(J,4,this.length),this[J]|this[J+1]<<8|this[J+2]<<16|this[J+3]<<24},M.prototype.readInt32BE=function(J,k){return k||U(J,4,this.length),this[J]<<24|this[J+1]<<16|this[J+2]<<8|this[J+3]},M.prototype.readFloatLE=function(J,k){return k||U(J,4,this.length),D.read(this,J,!0,23,4)},M.prototype.readFloatBE=function(J,k){return k||U(J,4,this.length),D.read(this,J,!1,23,4)},M.prototype.readDoubleLE=function(J,k){return k||U(J,8,this.length),D.read(this,J,!0,52,8)},M.prototype.readDoubleBE=function(J,k){return k||U(J,8,this.length),D.read(this,J,!1,52,8)};function Y(ne,J,k,$,q,he){if(!M.isBuffer(ne))throw new TypeError('"buffer" argument must be a Buffer instance');if(J>q||J<he)throw new RangeError('"value" argument is out of bounds');if(k+$>ne.length)throw new RangeError("Index out of range")}M.prototype.writeUIntLE=function(J,k,$,q){if(J=+J,k=k|0,$=$|0,!q){var he=Math.pow(2,8*$)-1;Y(this,J,k,$,he,0)}var pe=1,Ke=0;for(this[k]=J&255;++Ke<$&&(pe*=256);)this[k+Ke]=J/pe&255;return k+$},M.prototype.writeUIntBE=function(J,k,$,q){if(J=+J,k=k|0,$=$|0,!q){var he=Math.pow(2,8*$)-1;Y(this,J,k,$,he,0)}var pe=$-1,Ke=1;for(this[k+pe]=J&255;--pe>=0&&(Ke*=256);)this[k+pe]=J/Ke&255;return k+$},M.prototype.writeUInt8=function(J,k,$){return J=+J,k=k|0,$||Y(this,J,k,1,255,0),M.TYPED_ARRAY_SUPPORT||(J=Math.floor(J)),this[k]=J&255,k+1};function re(ne,J,k,$){J<0&&(J=65535+J+1);for(var q=0,he=Math.min(ne.length-k,2);q<he;++q)ne[k+q]=(J&255<<8*($?q:1-q))>>>($?q:1-q)*8}M.prototype.writeUInt16LE=function(J,k,$){return J=+J,k=k|0,$||Y(this,J,k,2,65535,0),M.TYPED_ARRAY_SUPPORT?(this[k]=J&255,this[k+1]=J>>>8):re(this,J,k,!0),k+2},M.prototype.writeUInt16BE=function(J,k,$){return J=+J,k=k|0,$||Y(this,J,k,2,65535,0),M.TYPED_ARRAY_SUPPORT?(this[k]=J>>>8,this[k+1]=J&255):re(this,J,k,!1),k+2};function me(ne,J,k,$){J<0&&(J=4294967295+J+1);for(var q=0,he=Math.min(ne.length-k,4);q<he;++q)ne[k+q]=J>>>($?q:3-q)*8&255}M.prototype.writeUInt32LE=function(J,k,$){return J=+J,k=k|0,$||Y(this,J,k,4,4294967295,0),M.TYPED_ARRAY_SUPPORT?(this[k+3]=J>>>24,this[k+2]=J>>>16,this[k+1]=J>>>8,this[k]=J&255):me(this,J,k,!0),k+4},M.prototype.writeUInt32BE=function(J,k,$){return J=+J,k=k|0,$||Y(this,J,k,4,4294967295,0),M.TYPED_ARRAY_SUPPORT?(this[k]=J>>>24,this[k+1]=J>>>16,this[k+2]=J>>>8,this[k+3]=J&255):me(this,J,k,!1),k+4},M.prototype.writeIntLE=function(J,k,$,q){if(J=+J,k=k|0,!q){var he=Math.pow(2,8*$-1);Y(this,J,k,$,he-1,-he)}var pe=0,Ke=1,Je=0;for(this[k]=J&255;++pe<$&&(Ke*=256);)J<0&&Je===0&&this[k+pe-1]!==0&&(Je=1),this[k+pe]=(J/Ke>>0)-Je&255;return k+$},M.prototype.writeIntBE=function(J,k,$,q){if(J=+J,k=k|0,!q){var he=Math.pow(2,8*$-1);Y(this,J,k,$,he-1,-he)}var pe=$-1,Ke=1,Je=0;for(this[k+pe]=J&255;--pe>=0&&(Ke*=256);)J<0&&Je===0&&this[k+pe+1]!==0&&(Je=1),this[k+pe]=(J/Ke>>0)-Je&255;return k+$},M.prototype.writeInt8=function(J,k,$){return J=+J,k=k|0,$||Y(this,J,k,1,127,-128),M.TYPED_ARRAY_SUPPORT||(J=Math.floor(J)),J<0&&(J=255+J+1),this[k]=J&255,k+1},M.prototype.writeInt16LE=function(J,k,$){return J=+J,k=k|0,$||Y(this,J,k,2,32767,-32768),M.TYPED_ARRAY_SUPPORT?(this[k]=J&255,this[k+1]=J>>>8):re(this,J,k,!0),k+2},M.prototype.writeInt16BE=function(J,k,$){return J=+J,k=k|0,$||Y(this,J,k,2,32767,-32768),M.TYPED_ARRAY_SUPPORT?(this[k]=J>>>8,this[k+1]=J&255):re(this,J,k,!1),k+2},M.prototype.writeInt32LE=function(J,k,$){return J=+J,k=k|0,$||Y(this,J,k,4,2147483647,-2147483648),M.TYPED_ARRAY_SUPPORT?(this[k]=J&255,this[k+1]=J>>>8,this[k+2]=J>>>16,this[k+3]=J>>>24):me(this,J,k,!0),k+4},M.prototype.writeInt32BE=function(J,k,$){return J=+J,k=k|0,$||Y(this,J,k,4,2147483647,-2147483648),J<0&&(J=4294967295+J+1),M.TYPED_ARRAY_SUPPORT?(this[k]=J>>>24,this[k+1]=J>>>16,this[k+2]=J>>>8,this[k+3]=J&255):me(this,J,k,!1),k+4};function ge(ne,J,k,$,q,he){if(k+$>ne.length)throw new RangeError("Index out of range");if(k<0)throw new RangeError("Index out of range")}function Oe(ne,J,k,$,q){return q||ge(ne,J,k,4,34028234663852886e22,-34028234663852886e22),D.write(ne,J,k,$,23,4),k+4}M.prototype.writeFloatLE=function(J,k,$){return Oe(this,J,k,!0,$)},M.prototype.writeFloatBE=function(J,k,$){return Oe(this,J,k,!1,$)};function Se(ne,J,k,$,q){return q||ge(ne,J,k,8,17976931348623157e292,-17976931348623157e292),D.write(ne,J,k,$,52,8),k+8}M.prototype.writeDoubleLE=function(J,k,$){return Se(this,J,k,!0,$)},M.prototype.writeDoubleBE=function(J,k,$){return Se(this,J,k,!1,$)},M.prototype.copy=function(J,k,$,q){if($||($=0),!q&&q!==0&&(q=this.length),k>=J.length&&(k=J.length),k||(k=0),q>0&&q<$&&(q=$),q===$)return 0;if(J.length===0||this.length===0)return 0;if(k<0)throw new RangeError("targetStart out of bounds");if($<0||$>=this.length)throw new RangeError("sourceStart out of bounds");if(q<0)throw new RangeError("sourceEnd out of bounds");q>this.length&&(q=this.length),J.length-k<q-$&&(q=J.length-k+$);var he=q-$,pe;if(this===J&&$<k&&k<q)for(pe=he-1;pe>=0;--pe)J[pe+k]=this[pe+$];else if(he<1e3||!M.TYPED_ARRAY_SUPPORT)for(pe=0;pe<he;++pe)J[pe+k]=this[pe+$];else Uint8Array.prototype.set.call(J,this.subarray($,$+he),k);return he},M.prototype.fill=function(J,k,$,q){if(typeof J=="string"){if(typeof k=="string"?(q=k,k=0,$=this.length):typeof $=="string"&&(q=$,$=this.length),J.length===1){var he=J.charCodeAt(0);he<256&&(J=he)}if(q!==void 0&&typeof q!="string")throw new TypeError("encoding must be a string");if(typeof q=="string"&&!M.isEncoding(q))throw new TypeError("Unknown encoding: "+q)}else typeof J=="number"&&(J=J&255);if(k<0||this.length<k||this.length<$)throw new RangeError("Out of range index");if($<=k)return this;k=k>>>0,$=$===void 0?this.length:$>>>0,J||(J=0);var pe;if(typeof J=="number")for(pe=k;pe<$;++pe)this[pe]=J;else{var Ke=M.isBuffer(J)?J:ve(new M(J,q).toString()),Je=Ke.length;for(pe=0;pe<$-k;++pe)this[pe+k]=Ke[pe%Je]}return this};var Be=/[^+\/0-9A-Za-z-_]/g;function Ne(ne){if(ne=ke(ne).replace(Be,""),ne.length<2)return"";for(;ne.length%4!==0;)ne=ne+"=";return ne}function ke(ne){return ne.trim?ne.trim():ne.replace(/^\s+|\s+$/g,"")}function Ce(ne){return ne<16?"0"+ne.toString(16):ne.toString(16)}function ve(ne,J){J=J||Infinity;for(var k,$=ne.length,q=null,he=[],pe=0;pe<$;++pe){if(k=ne.charCodeAt(pe),k>55295&&k<57344){if(!q){if(k>56319){(J-=3)>-1&&he.push(239,191,189);continue}else if(pe+1===$){(J-=3)>-1&&he.push(239,191,189);continue}q=k;continue}if(k<56320){(J-=3)>-1&&he.push(239,191,189),q=k;continue}k=(q-55296<<10|k-56320)+65536}else q&&((J-=3)>-1&&he.push(239,191,189));if(q=null,k<128){if((J-=1)<0)break;he.push(k)}else if(k<2048){if((J-=2)<0)break;he.push(k>>6|192,k&63|128)}else if(k<65536){if((J-=3)<0)break;he.push(k>>12|224,k>>6&63|128,k&63|128)}else if(k<1114112){if((J-=4)<0)break;he.push(k>>18|240,k>>12&63|128,k>>6&63|128,k&63|128)}else throw new Error("Invalid code point")}return he}function Ye(ne){for(var J=[],k=0;k<ne.length;++k)J.push(ne.charCodeAt(k)&255);return J}function ht(ne,J){for(var k,$,q,he=[],pe=0;pe<ne.length&&!((J-=2)<0);++pe)k=ne.charCodeAt(pe),$=k>>8,q=k%256,he.push(q),he.push($);return he}function at(ne){return G.toByteArray(Ne(ne))}function We(ne,J,k,$){for(var q=0;q<$&&!(q+k>=J.length||q>=ne.length);++q)J[q+k]=ne[q];return q}function it(ne){return ne!==ne}}).call(this,j("IyRk"))},IBYe:function(ct,_e,j){"use strict";function se(G){return null}_e.a=se},J66h:function(ct,_e,j){(function(se){var G,D;(function(V,F){ct.exports=F(V)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof se!="undefined"?se:this,function(V){"use strict";V=V||{};var F=V.Base64,O="2.6.4",X="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",M=function(c){for(var L={},N=0,T=c.length;N<T;N++)L[c.charAt(N)]=N;return L}(X),e=String.fromCharCode,R=function(c){if(c.length<2){var L=c.charCodeAt(0);return L<128?c:L<2048?e(192|L>>>6)+e(128|L&63):e(224|L>>>12&15)+e(128|L>>>6&63)+e(128|L&63)}else{var L=65536+(c.charCodeAt(0)-55296)*1024+(c.charCodeAt(1)-56320);return e(240|L>>>18&7)+e(128|L>>>12&63)+e(128|L>>>6&63)+e(128|L&63)}},g=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,v=function(c){return c.replace(g,R)},u=function(c){var L=[0,2,1][c.length%3],N=c.charCodeAt(0)<<16|(c.length>1?c.charCodeAt(1):0)<<8|(c.length>2?c.charCodeAt(2):0),T=[X.charAt(N>>>18),X.charAt(N>>>12&63),L>=2?"=":X.charAt(N>>>6&63),L>=1?"=":X.charAt(N&63)];return T.join("")},s=V.btoa&&typeof V.btoa=="function"?function(c){return V.btoa(c)}:function(c){if(c.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return c.replace(/[\s\S]{1,3}/g,u)},i=function(c){return s(v(String(c)))},A=function(c){return c.replace(/[+\/]/g,function(L){return L=="+"?"-":"_"}).replace(/=/g,"")},o=function(c,L){return L?A(i(c)):i(c)},a=function(c){return o(c,!0)},r;V.Uint8Array&&(r=function(c,L){for(var N="",T=0,P=c.length;T<P;T+=3){var W=c[T],U=c[T+1],Y=c[T+2],re=W<<16|U<<8|Y;N+=X.charAt(re>>>18)+X.charAt(re>>>12&63)+(typeof U!="undefined"?X.charAt(re>>>6&63):"=")+(typeof Y!="undefined"?X.charAt(re&63):"=")}return L?A(N):N});var t=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,y=function(c){switch(c.length){case 4:var L=(7&c.charCodeAt(0))<<18|(63&c.charCodeAt(1))<<12|(63&c.charCodeAt(2))<<6|63&c.charCodeAt(3),N=L-65536;return e((N>>>10)+55296)+e((N&1023)+56320);case 3:return e((15&c.charCodeAt(0))<<12|(63&c.charCodeAt(1))<<6|63&c.charCodeAt(2));default:return e((31&c.charCodeAt(0))<<6|63&c.charCodeAt(1))}},_=function(c){return c.replace(t,y)},E=function(c){var L=c.length,N=L%4,T=(L>0?M[c.charAt(0)]<<18:0)|(L>1?M[c.charAt(1)]<<12:0)|(L>2?M[c.charAt(2)]<<6:0)|(L>3?M[c.charAt(3)]:0),P=[e(T>>>16),e(T>>>8&255),e(T&255)];return P.length-=[0,0,2,1][N],P.join("")},B=V.atob&&typeof V.atob=="function"?function(c){return V.atob(c)}:function(c){return c.replace(/\S{1,4}/g,E)},C=function(c){return B(String(c).replace(/[^A-Za-z0-9\+\/]/g,""))},h=function(c){return _(B(c))},n=function(c){return String(c).replace(/[-_]/g,function(L){return L=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},l=function(c){return h(n(c))},d;V.Uint8Array&&(d=function(c){return Uint8Array.from(C(n(c)),function(L){return L.charCodeAt(0)})});var b=function(){var c=V.Base64;return V.Base64=F,c};if(V.Base64={VERSION:O,atob:C,btoa:s,fromBase64:l,toBase64:o,utob:v,encode:o,encodeURI:a,btou:_,decode:l,noConflict:b,fromUint8Array:r,toUint8Array:d},typeof Object.defineProperty=="function"){var m=function(c){return{value:c,enumerable:!1,writable:!0,configurable:!0}};V.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",m(function(){return l(this)})),Object.defineProperty(String.prototype,"toBase64",m(function(c){return o(this,c)})),Object.defineProperty(String.prototype,"toBase64URI",m(function(){return o(this,!0)}))}}return V.Meteor&&(Base64=V.Base64),ct.exports?ct.exports.Base64=V.Base64:!(G=[],D=function(){return V.Base64}.apply(_e,G),D!==void 0&&(ct.exports=D)),{Base64:V.Base64}})}).call(this,j("IyRk"))},JYp7:function(ct,_e,j){"use strict";j.d(_e,"a",function(){return se});var se;(function(G){function D(t){return t&&typeof t=="object"&&typeof t[Symbol.iterator]=="function"}G.is=D;const V=Object.freeze([]);function F(){return V}G.empty=F;function*O(t){yield t}G.single=O;function X(t){return t||V}G.from=X;function M(t){return!t||t[Symbol.iterator]().next().done===!0}G.isEmpty=M;function e(t){return t[Symbol.iterator]().next().value}G.first=e;function R(t,y){for(const _ of t)if(y(_))return!0;return!1}G.some=R;function g(t,y){for(const _ of t)if(y(_))return _;return}G.find=g;function*v(t,y){for(const _ of t)y(_)&&(yield _)}G.filter=v;function*u(t,y){let _=0;for(const E of t)yield y(E,_++)}G.map=u;function*s(...t){for(const y of t)for(const _ of y)yield _}G.concat=s;function*i(t){for(const y of t)for(const _ of y)yield _}G.concatNested=i;function A(t,y,_){let E=_;for(const B of t)E=y(E,B);return E}G.reduce=A;function*o(t,y,_=t.length){for(y<0&&(y+=t.length),_<0?_+=t.length:_>t.length&&(_=t.length);y<_;y++)yield t[y]}G.slice=o;function a(t,y=Number.POSITIVE_INFINITY){const _=[];if(y===0)return[_,t];const E=t[Symbol.iterator]();for(let B=0;B<y;B++){const C=E.next();if(C.done)return[_,G.empty()];_.push(C.value)}return[_,{[Symbol.iterator](){return E}}]}G.consume=a;function r(t,y,_=(E,B)=>E===B){const E=t[Symbol.iterator](),B=y[Symbol.iterator]();for(;;){const C=E.next(),h=B.next();if(C.done!==h.done)return!1;if(C.done)return!0;if(!_(C.value,h.value))return!1}}G.equals=r})(se||(se={}))},LdHM:function(ct,_e,j){"use strict";j.d(_e,"b",function(){return t}),j.d(_e,"a",function(){return _});var se=j("1OyB"),G=j("vuIU"),D=j("Ji7U"),V=j("LK+K"),F=j("q1tI"),O=j("rePB"),X=j("Ff2n"),M=j("ODXe"),e=j("4IlW"),R=j("bX4T"),g=j("YrtM"),v=j("TSYQ"),u=j.n(v),s=j("+nKL"),i=j("8OUc"),A=function(Y,re){var me=Y.prefixCls,ge=Y.id,Oe=Y.flattenOptions,Se=Y.childrenAsData,Be=Y.values,Ne=Y.searchValue,ke=Y.multiple,Ce=Y.defaultActiveFirstOption,ve=Y.height,Ye=Y.itemHeight,ht=Y.notFoundContent,at=Y.open,We=Y.menuItemSelectedIcon,it=Y.virtual,ne=Y.onSelect,J=Y.onToggleOpen,k=Y.onActiveValue,$=Y.onScroll,q=Y.onMouseEnter,he="".concat(me,"-item"),pe=Object(g.a)(function(){return Oe},[at,Oe],function(Fe,we){return we[0]&&Fe[1]!==we[1]}),Ke=F.useRef(null),Je=function(we){we.preventDefault()},ze=function(we){Ke.current&&Ke.current.scrollTo({index:we})},Ze=function(we){for(var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ce=pe.length,te=0;te<ce;te+=1){var ie=(we+te*ue+ce)%ce,le=pe[ie],fe=le.group,Ie=le.data;if(!fe&&!Ie.disabled)return ie}return-1},nt=F.useState(function(){return Ze(0)}),pt=Object(M.a)(nt,2),xe=pt[0],Ue=pt[1],Qe=function(we){Ue(we);var ue=pe[we];if(!ue){k(null,-1);return}k(ue.data.value,we)};F.useEffect(function(){Qe(Ce!==!1?Ze(0):-1)},[pe.length,Ne]),F.useEffect(function(){var Fe=setTimeout(function(){if(!ke&&at&&Be.size===1){var we=Array.from(Be)[0],ue=pe.findIndex(function(ce){var te=ce.data;return te.value===we});Qe(ue),ze(ue)}});return function(){return clearTimeout(Fe)}},[at]);var je=function(we){we!==void 0&&ne(we,{selected:!Be.has(we)}),ke||J(!1)};if(F.useImperativeHandle(re,function(){return{onKeyDown:function(we){var ue=we.which;switch(ue){case e.a.UP:case e.a.DOWN:{var ce=0;if(ue===e.a.UP?ce=-1:ue===e.a.DOWN&&(ce=1),ce!==0){var te=Ze(xe+ce,ce);ze(te),Qe(te)}break}case e.a.ENTER:{var ie=pe[xe];ie&&!ie.data.disabled?je(ie.data.value):je(void 0),at&&we.preventDefault();break}case e.a.ESC:J(!1)}},onKeyUp:function(){},scrollTo:function(we){ze(we)}}}),pe.length===0)return F.createElement("div",{role:"listbox",id:"".concat(ge,"_list"),className:"".concat(he,"-empty"),onMouseDown:Je},ht);function Le(Fe){var we=pe[Fe];if(!we)return null;var ue=we.data||{},ce=ue.value,te=ue.label,ie=ue.children,le=Object(R.a)(ue,!0),fe=Se?ie:te;return we?F.createElement("div",Object.assign({"aria-label":typeof fe=="string"?fe:null},le,{key:Fe,role:"option",id:"".concat(ge,"_list_").concat(Fe),"aria-selected":Be.has(ce)}),ce):null}return F.createElement(F.Fragment,null,F.createElement("div",{role:"listbox",id:"".concat(ge,"_list"),style:{height:0,width:0,overflow:"hidden"}},Le(xe-1),Le(xe),Le(xe+1)),F.createElement(s.a,{itemKey:"key",ref:Ke,data:pe,height:ve,itemHeight:Ye,fullHeight:!1,onMouseDown:Je,onScroll:$,virtual:it,onMouseEnter:q},function(Fe,we){var ue,ce=Fe.group,te=Fe.groupOption,ie=Fe.data,le=ie.label,fe=ie.key;if(ce)return F.createElement("div",{className:u()(he,"".concat(he,"-group"))},le!==void 0?le:fe);var Ie=ie.disabled,Pe=ie.value,qe=ie.title,dt=ie.children,lt=ie.style,st=ie.className,Lt=Object(X.a)(ie,["disabled","value","title","children","style","className"]),mt=Be.has(Pe),tt="".concat(he,"-option"),er=u()(he,tt,st,(ue={},Object(O.a)(ue,"".concat(tt,"-grouped"),te),Object(O.a)(ue,"".concat(tt,"-active"),xe===we&&!Ie),Object(O.a)(ue,"".concat(tt,"-disabled"),Ie),Object(O.a)(ue,"".concat(tt,"-selected"),mt),ue)),Jt=Se?dt:le,Ot=!We||typeof We=="function"||mt;return F.createElement("div",Object.assign({},Lt,{"aria-selected":mt,className:er,title:qe,onMouseMove:function(){if(xe===we||Ie)return;Qe(we)},onClick:function(){Ie||je(Pe)},style:lt}),F.createElement("div",{className:"".concat(tt,"-content")},Jt||Pe),F.isValidElement(We)||mt,Ot&&F.createElement(i.a,{className:"".concat(he,"-option-state"),customizeIcon:We,customizeIconProps:{isSelected:mt}},mt?"\u2713":null))}))},o=F.forwardRef(A);o.displayName="OptionList";var a=o,r=function(){return null};r.isSelectOption=!0;var t=r,y=function(){return null};y.isSelectOptGroup=!0;var _=y,E=j("VTBJ"),B=j("Zm9Q");function C(U){var Y=U.key,re=U.props,me=re.children,ge=re.value,Oe=Object(X.a)(re,["children","value"]);return Object(E.a)({key:Y,value:ge!==void 0?ge:Y,children:me},Oe)}function h(U){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(B.a)(U).map(function(re,me){if(!F.isValidElement(re)||!re.type)return null;var ge=re.type.isSelectOptGroup,Oe=re.key,Se=re.props,Be=Se.children,Ne=Object(X.a)(Se,["children"]);return Y||!ge?C(re):Object(E.a)(Object(E.a)({key:"__RC_SELECT_GRP__".concat(Oe===null?me:Oe,"__"),label:Oe},Ne),{},{options:h(Be)})}).filter(function(re){return re})}var n=j("2Qr1"),l=j("qNPg"),d=j("U8pU"),b=j("Kwbf"),m=j("WKfj");function c(U){var Y=U.mode,re=U.options,me=U.children,ge=U.backfill,Oe=U.allowClear,Se=U.placeholder,Be=U.getInputElement,Ne=U.showSearch,ke=U.onSearch,Ce=U.defaultOpen,ve=U.autoFocus,Ye=U.labelInValue,ht=U.value,at=U.inputValue,We=U.optionLabelProp,it=Y==="multiple"||Y==="tags",ne=Ne!==void 0?Ne:it||Y==="combobox",J=re||h(me);if(Object(b.a)(Y!=="tags"||J.every(function(he){return!he.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Y==="tags"||Y==="combobox"){var k=J.some(function(he){return he.options?he.options.some(function(pe){return typeof("value"in pe?pe.value:pe.key)=="number"}):typeof("value"in he?he.value:he.key)=="number"});Object(b.a)(!k,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(b.a)(Y!=="combobox"||!We,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(b.a)(Y==="combobox"||!ge,"`backfill` only works with `combobox` mode."),Object(b.a)(Y==="combobox"||!Be,"`getInputElement` only work with `combobox` mode."),Object(b.b)(Y!=="combobox"||!Be||!Oe||!Se,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ke&&!ne&&Y!=="combobox"&&Y!=="tags"&&Object(b.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(b.b)(!Ce||ve,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),ht!=null){var $=Object(m.d)(ht);Object(b.a)(!Ye||$.every(function(he){return Object(d.a)(he)==="object"&&("key"in he||"value"in he)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(b.a)(!it||Array.isArray(ht),"`value` should be array when `mode` is `multiple` or `tags`")}if(me){var q=null;Object(B.a)(me).some(function(he){if(!F.isValidElement(he)||!he.type)return!1;var pe=he.type;if(pe.isSelectOption)return!1;if(pe.isSelectOptGroup){var Ke=Object(B.a)(he.props.children).every(function(Je){return!F.isValidElement(Je)||!he.type||Je.type.isSelectOption?!0:(q=Je.type,!1)});return!Ke}return q=pe,!0}),q&&Object(b.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(q.displayName||q.name||q,"`.")),Object(b.a)(at===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var L=c,N=Object(l.a)({prefixCls:"rc-select",components:{optionList:a},convertChildrenToData:h,flattenOptions:n.d,getLabeledValue:n.e,filterOptions:n.b,isValueDisabled:n.g,findValueOption:n.c,warningProps:L,fillOptionsWithMissingValue:n.a}),T=function(U){Object(D.a)(re,U);var Y=Object(V.a)(re);function re(){var me;return Object(se.a)(this,re),me=Y.apply(this,arguments),me.selectRef=F.createRef(),me.focus=function(){me.selectRef.current.focus()},me.blur=function(){me.selectRef.current.blur()},me}return Object(G.a)(re,[{key:"render",value:function(){return F.createElement(N,Object.assign({ref:this.selectRef},this.props))}}]),re}(F.Component);T.Option=t,T.OptGroup=_;var P=T,W=_e.c=P},MI8n:function(ct,_e,j){"use strict";j.d(_e,"c",function(){return F}),j.d(_e,"b",function(){return e}),j.d(_e,"e",function(){return R}),j.d(_e,"a",function(){return g}),j.d(_e,"d",function(){return v}),j.d(_e,"f",function(){return u});var se=j("/cxE"),G=j("pmY6"),D=j("24hK"),V=j("5Y4S"),F;(function(s){s.None=()=>G.a.None;function i(c){return(L,N=null,T)=>{let P=!1,W;return W=c(U=>P?void 0:(W?W.dispose():P=!0,L.call(N,U)),null,T),P&&W.dispose(),W}}s.once=i;function A(c,L){return _((N,T=null,P)=>c(W=>N.call(T,L(W)),null,P))}s.map=A;function o(c,L){return _((N,T=null,P)=>c(W=>{L(W),N.call(T,W)},null,P))}s.forEach=o;function a(c,L){return _((N,T=null,P)=>c(W=>L(W)&&N.call(T,W),null,P))}s.filter=a;function r(c){return c}s.signal=r;function t(...c){return(L,N=null,T)=>Object(G.e)(...c.map(P=>P(W=>L.call(N,W),null,T)))}s.any=t;function y(c,L,N){let T=N;return A(c,P=>(T=L(T,P),T))}s.reduce=y;function _(c){let L;const N=new e({onFirstListenerAdd(){L=c(N.fire,N)},onLastListenerRemove(){L.dispose()}});return N.event}function E(c,L,N=100,T=!1,P){let W,U,Y,re=0;const me=new e({leakWarningThreshold:P,onFirstListenerAdd(){W=c(ge=>{re++,U=L(U,ge),T&&!Y&&(me.fire(U),U=void 0),clearTimeout(Y),Y=setTimeout(()=>{const Oe=U;U=void 0,Y=void 0,(!T||re>1)&&me.fire(Oe),re=0},N)})},onLastListenerRemove(){W.dispose()}});return me.event}s.debounce=E;function B(c,L=(N,T)=>N===T){let N=!0,T;return a(c,P=>{const W=N||!L(P,T);return N=!1,T=P,W})}s.latch=B;function C(c,L){return[s.filter(c,L),s.filter(c,N=>!L(N))]}s.split=C;function h(c,L=!1,N=[]){let T=N.slice(),P=c(Y=>{T?T.push(Y):U.fire(Y)});const W=()=>{T&&T.forEach(Y=>U.fire(Y)),T=null},U=new e({onFirstListenerAdd(){P||(P=c(Y=>U.fire(Y)))},onFirstListenerDidAdd(){T&&(L?setTimeout(W):W())},onLastListenerRemove(){P&&P.dispose(),P=null}});return U.event}s.buffer=h;class n{constructor(c){this.event=c}map(c){return new n(A(this.event,c))}forEach(c){return new n(o(this.event,c))}filter(c){return new n(a(this.event,c))}reduce(c,L){return new n(y(this.event,c,L))}latch(){return new n(B(this.event))}debounce(c,L=100,N=!1,T){return new n(E(this.event,c,L,N,T))}on(c,L,N){return this.event(c,L,N)}once(c,L,N){return i(this.event)(c,L,N)}}function l(c){return new n(c)}s.chain=l;function d(c,L,N=T=>T){const T=(...Y)=>U.fire(N(...Y)),P=()=>c.on(L,T),W=()=>c.removeListener(L,T),U=new e({onFirstListenerAdd:P,onLastListenerRemove:W});return U.event}s.fromNodeEventEmitter=d;function b(c,L,N=T=>T){const T=(...Y)=>U.fire(N(...Y)),P=()=>c.addEventListener(L,T),W=()=>c.removeEventListener(L,T),U=new e({onFirstListenerAdd:P,onLastListenerRemove:W});return U.event}s.fromDOMEventEmitter=b;function m(c){return new Promise(L=>i(c)(L))}s.toPromise=m})(F||(F={}));class O{constructor(s){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${s}_${O._idPool++}`}start(s){this._stopWatch=new V.a(!0),this._listenerCount=s}stop(){if(this._stopWatch){const s=this._stopWatch.elapsed();this._elapsedOverall+=s,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${s.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}O._idPool=0;let X=-1;class M{constructor(s,i=Math.random().toString(18).slice(2,5)){this.customThreshold=s,this.name=i,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(s){let i=X;if(typeof this.customThreshold=="number"&&(i=this.customThreshold),i<=0||s<i)return;this._stacks||(this._stacks=new Map);const A=new Error().stack.split(`
|
|
`).slice(3).join(`
|
|
`),o=this._stacks.get(A)||0;if(this._stacks.set(A,o+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=i*.5;let a,r=0;for(const[t,y]of this._stacks)(!a||r<y)&&(a=t,r=y);console.warn(`[${this.name}] potential listener LEAK detected, having ${s} listeners already. MOST frequent listener (${r}):`),console.warn(a)}return()=>{const a=this._stacks.get(A)||0;this._stacks.set(A,a-1)}}}class e{constructor(s){var i;this._disposed=!1,this._options=s,this._leakageMon=X>0?new M(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((i=this._options)===null||i===void 0?void 0:i._profName)?new O(this._options._profName):void 0}get event(){return this._event||(this._event=(s,i,A)=>{var o;this._listeners||(this._listeners=new D.a);const a=this._listeners.isEmpty();a&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const r=this._listeners.push(i?[s,i]:s);a&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,s,i);const t=(o=this._leakageMon)===null||o===void 0?void 0:o.check(this._listeners.size),y=Object(G.i)(()=>{if(t&&t(),!this._disposed&&(r(),this._options&&this._options.onLastListenerRemove)){const _=this._listeners&&!this._listeners.isEmpty();_||this._options.onLastListenerRemove(this)}});return A instanceof G.b?A.add(y):Array.isArray(A)&&A.push(y),y}),this._event}fire(s){var i,A;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new D.a);for(let o of this._listeners)this._deliveryQueue.push([o,s]);for((i=this._perfMon)===null||i===void 0||i.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[o,a]=this._deliveryQueue.shift();try{typeof o=="function"?o.call(void 0,a):o[0].call(o[1],a)}catch(r){Object(se.f)(r)}}(A=this._perfMon)===null||A===void 0||A.stop()}}dispose(){var s,i,A,o,a;this._disposed||(this._disposed=!0,(s=this._listeners)===null||s===void 0||s.clear(),(i=this._deliveryQueue)===null||i===void 0||i.clear(),(o=(A=this._options)===null||A===void 0?void 0:A.onLastListenerRemove)===null||o===void 0||o.call(A),(a=this._leakageMon)===null||a===void 0||a.dispose())}}class R extends e{constructor(s){super(s);this._isPaused=0,this._eventQueue=new D.a,this._mergeFn=s==null?void 0:s.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const s=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(s))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(s){this._listeners&&(this._isPaused!==0?this._eventQueue.push(s):super.fire(s))}}class g extends R{constructor(s){var i;super(s);this._delay=(i=s.delay)!==null&&i!==void 0?i:100}fire(s){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(s)}}class v{constructor(){this.buffers=[]}wrapEvent(s){return(i,A,o)=>s(a=>{const r=this.buffers[this.buffers.length-1];r?r.push(()=>i.call(A,a)):i.call(A,a)},void 0,o)}bufferEvents(s){const i=[];this.buffers.push(i);const A=s();return this.buffers.pop(),i.forEach(o=>o()),A}}class u{constructor(){this.listening=!1,this.inputEvent=F.None,this.inputEventListener=G.a.None,this.emitter=new e({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(s){this.inputEvent=s,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=s(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(ct,_e,j){"use strict";(function(se,G){j.d(_e,"b",function(){return A}),j.d(_e,"i",function(){return t}),j.d(_e,"f",function(){return y}),j.d(_e,"d",function(){return _}),j.d(_e,"g",function(){return E}),j.d(_e,"h",function(){return B}),j.d(_e,"c",function(){return C}),j.d(_e,"k",function(){return h}),j.d(_e,"j",function(){return n}),j.d(_e,"a",function(){return l}),j.d(_e,"e",function(){return m});var D;const V="en";let F=!1,O=!1,X=!1,M=!1,e=!1,R=!1,g=!1,v,u=V,s,i;const A=typeof self=="object"?self:typeof se=="object"?se:{};let o;typeof A.vscode!="undefined"&&typeof A.vscode.process!="undefined"?o=A.vscode.process:typeof G!="undefined"&&(o=G);const a=typeof((D=o==null?void 0:o.versions)===null||D===void 0?void 0:D.electron)=="string"&&o.type==="renderer";if(typeof navigator=="object"&&!a)i=navigator.userAgent,F=i.indexOf("Windows")>=0,O=i.indexOf("Macintosh")>=0,g=(i.indexOf("Macintosh")>=0||i.indexOf("iPad")>=0||i.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,X=i.indexOf("Linux")>=0,R=!0,v=navigator.language,u=v;else if(typeof o=="object"){F=o.platform==="win32",O=o.platform==="darwin",X=o.platform==="linux",M=X&&!!o.env.SNAP&&!!o.env.SNAP_REVISION,v=V,u=V;const c=o.env.VSCODE_NLS_CONFIG;if(c)try{const L=JSON.parse(c),N=L.availableLanguages["*"];v=L.locale,u=N||V,s=L._translationsConfigFile}catch(L){}e=!0}else console.error("Unable to resolve platform.");let r=0;O?r=1:F?r=3:X&&(r=2);const t=F,y=O,_=X,E=e,B=R,C=g,h=i,n=function(){if(A.setImmediate)return A.setImmediate.bind(A);if(typeof A.postMessage=="function"&&!A.importScripts){let N=[];A.addEventListener("message",P=>{if(P.data&&P.data.vscodeSetImmediateId)for(let W=0,U=N.length;W<U;W++){const Y=N[W];if(Y.id===P.data.vscodeSetImmediateId){N.splice(W,1),Y.callback();return}}});let T=0;return P=>{const W=++T;N.push({id:W,callback:P}),A.postMessage({vscodeSetImmediateId:W},"*")}}if(typeof(o==null?void 0:o.nextTick)=="function")return o.nextTick.bind(o);const L=Promise.resolve();return N=>L.then(N)}(),l=O||g?2:F?1:3;let d=!0,b=!1;function m(){if(!b){b=!0;const c=new Uint8Array(2);c[0]=1,c[1]=2;const L=new Uint16Array(c.buffer);d=L[0]===(2<<8)+1}return d}}).call(this,j("IyRk"),j("Q2Ig"))},N0LK:function(ct,_e,j){"use strict";j.d(_e,"C",function(){return se}),j.d(_e,"v",function(){return D}),j.d(_e,"s",function(){return V}),j.d(_e,"t",function(){return F}),j.d(_e,"U",function(){return O}),j.d(_e,"J",function(){return X}),j.d(_e,"O",function(){return M}),j.d(_e,"p",function(){return e}),j.d(_e,"T",function(){return R}),j.d(_e,"q",function(){return g}),j.d(_e,"N",function(){return v}),j.d(_e,"M",function(){return u}),j.d(_e,"Q",function(){return s}),j.d(_e,"u",function(){return i}),j.d(_e,"x",function(){return A}),j.d(_e,"I",function(){return o}),j.d(_e,"f",function(){return a}),j.d(_e,"h",function(){return r}),j.d(_e,"g",function(){return t}),j.d(_e,"i",function(){return y}),j.d(_e,"G",function(){return _}),j.d(_e,"H",function(){return E}),j.d(_e,"r",function(){return B}),j.d(_e,"R",function(){return C}),j.d(_e,"d",function(){return h}),j.d(_e,"e",function(){return n}),j.d(_e,"E",function(){return l}),j.d(_e,"F",function(){return d}),j.d(_e,"j",function(){return b}),j.d(_e,"z",function(){return m}),j.d(_e,"K",function(){return L}),j.d(_e,"L",function(){return N}),j.d(_e,"m",function(){return P}),j.d(_e,"k",function(){return U}),j.d(_e,"A",function(){return re}),j.d(_e,"a",function(){return me}),j.d(_e,"n",function(){return ge}),j.d(_e,"l",function(){return Oe}),j.d(_e,"D",function(){return Se}),j.d(_e,"B",function(){return Be}),j.d(_e,"b",function(){return Ne}),j.d(_e,"S",function(){return ke}),j.d(_e,"o",function(){return Ce}),j.d(_e,"P",function(){return ve}),j.d(_e,"w",function(){return Ye}),j.d(_e,"c",function(){return ht}),j.d(_e,"y",function(){return it});function se($){return!$||typeof $!="string"?!0:$.trim().length===0}const G=/{(\d+)}/g;function D($,...q){return q.length===0?$:$.replace(G,function(he,pe){const Ke=parseInt(pe,10);return isNaN(Ke)||Ke<0||Ke>=q.length?he:q[Ke]})}function V($){return $.replace(/[<>&]/g,function(q){switch(q){case"<":return"<";case">":return">";case"&":return"&";default:return q}})}function F($){return $.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function O($,q=" "){const he=X($,q);return M(he,q)}function X($,q){if(!$||!q)return $;const he=q.length;if(he===0||$.length===0)return $;let pe=0;for(;$.indexOf(q,pe)===pe;)pe=pe+he;return $.substring(pe)}function M($,q){if(!$||!q)return $;const he=q.length,pe=$.length;if(he===0||pe===0)return $;let Ke=pe,Je=-1;for(;!(Je=$.lastIndexOf(q,Ke-1),Je===-1||Je+he!==Ke);){if(Je===0)return"";Ke=Je}return $.substring(0,Ke)}function e($){return $.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function R($){return $.replace(/\*/g,"")}function g($,q,he={}){if(!$)throw new Error("Cannot create regex from empty string");q||($=F($)),he.wholeWord&&(/\B/.test($.charAt(0))||($="\\b"+$),/\B/.test($.charAt($.length-1))||($=$+"\\b"));let pe="";return he.global&&(pe+="g"),he.matchCase||(pe+="i"),he.multiline&&(pe+="m"),he.unicode&&(pe+="u"),new RegExp($,pe)}function v($){if($.source==="^"||$.source==="^$"||$.source==="$"||$.source==="^\\s*$")return!1;const q=$.exec("");return!!(q&&$.lastIndex===0)}function u($){return($.global?"g":"")+($.ignoreCase?"i":"")+($.multiline?"m":"")+($.unicode?"u":"")}function s($){return $.split(/\r\n|\r|\n/)}function i($){for(let q=0,he=$.length;q<he;q++){const pe=$.charCodeAt(q);if(pe!==32&&pe!==9)return q}return-1}function A($,q=0,he=$.length){for(let pe=q;pe<he;pe++){const Ke=$.charCodeAt(pe);if(Ke!==32&&Ke!==9)return $.substring(q,pe)}return $.substring(q,he)}function o($,q=$.length-1){for(let he=q;he>=0;he--){const pe=$.charCodeAt(he);if(pe!==32&&pe!==9)return he}return-1}function a($,q){return $<q?-1:$>q?1:0}function r($,q,he=0,pe=$.length,Ke=0,Je=q.length){for(;he<pe&&Ke<Je;he++,Ke++){let nt=$.charCodeAt(he),pt=q.charCodeAt(Ke);if(nt<pt)return-1;if(nt>pt)return 1}const ze=pe-he,Ze=Je-Ke;return ze<Ze?-1:ze>Ze?1:0}function t($,q){return y($,q,0,$.length,0,q.length)}function y($,q,he=0,pe=$.length,Ke=0,Je=q.length){for(;he<pe&&Ke<Je;he++,Ke++){let nt=$.charCodeAt(he),pt=q.charCodeAt(Ke);if(nt===pt)continue;if(nt>=128||pt>=128)return r($.toLowerCase(),q.toLowerCase(),he,pe,Ke,Je);_(nt)&&(nt-=32),_(pt)&&(pt-=32);const xe=nt-pt;if(xe===0)continue;return xe}const ze=pe-he,Ze=Je-Ke;return ze<Ze?-1:ze>Ze?1:0}function _($){return $>=97&&$<=122}function E($){return $>=65&&$<=90}function B($,q){return $.length===q.length&&y($,q)===0}function C($,q){const he=q.length;return q.length>$.length?!1:y($,q,0,he)===0}function h($,q){let he,pe=Math.min($.length,q.length);for(he=0;he<pe;he++)if($.charCodeAt(he)!==q.charCodeAt(he))return he;return pe}function n($,q){let he,pe=Math.min($.length,q.length);const Ke=$.length-1,Je=q.length-1;for(he=0;he<pe;he++)if($.charCodeAt(Ke-he)!==q.charCodeAt(Je-he))return he;return pe}function l($){return 55296<=$&&$<=56319}function d($){return 56320<=$&&$<=57343}function b($,q){return($-55296<<10)+(q-56320)+65536}function m($,q,he){const pe=$.charCodeAt(he);if(l(pe)&&he+1<q){const Ke=$.charCodeAt(he+1);if(d(Ke))return b(pe,Ke)}return pe}function c($,q){const he=$.charCodeAt(q-1);if(d(he)&&q>1){const pe=$.charCodeAt(q-2);if(l(pe))return b(pe,he)}return he}function L($,q){const he=at.getInstance(),pe=q,Ke=$.length,Je=m($,Ke,q);q+=Je>=65536?2:1;let ze=he.getGraphemeBreakType(Je);for(;q<Ke;){const Ze=m($,Ke,q),nt=he.getGraphemeBreakType(Ze);if(ht(ze,nt))break;q+=Ze>=65536?2:1,ze=nt}return q-pe}function N($,q){const he=at.getInstance(),pe=q,Ke=c($,q);q-=Ke>=65536?2:1;let Je=he.getGraphemeBreakType(Ke);for(;q>0;){const ze=c($,q),Ze=he.getGraphemeBreakType(ze);if(ht(Ze,Je))break;q-=ze>=65536?2:1,Je=Ze}return pe-q}const T=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function P($){return T.test($)}const W=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function U($){return W.test($)}const Y=/^[\t\n\r\x20-\x7E]*$/;function re($){return Y.test($)}const me=/[\u2028\u2029]/;function ge($){return me.test($)}function Oe($){for(let q=0,he=$.length;q<he;q++)if(Se($.charCodeAt(q)))return!0;return!1}function Se($){return $=+$,$>=11904&&$<=55215||$>=63744&&$<=64255||$>=65281&&$<=65374}function Be($){return $>=127462&&$<=127487||$===8986||$===8987||$===9200||$===9203||$>=9728&&$<=10175||$===11088||$===11093||$>=127744&&$<=128591||$>=128640&&$<=128764||$>=128992&&$<=129003||$>=129280&&$<=129535||$>=129648&&$<=129750}const Ne=String.fromCharCode(65279);function ke($){return!!($&&$.length>0&&$.charCodeAt(0)===65279)}function Ce($,q=!1){return $?(q&&($=$.replace(/\\./g,"")),$.toLowerCase()!==$):!1}function ve($){const q=90-65+1;return $=$%(2*q),$<q?String.fromCharCode(97+$):String.fromCharCode(65+$-q)}function Ye($){const q=at.getInstance();return q.getGraphemeBreakType($)}function ht($,q){return $===0?q!==5&&q!==7:$===2&&q===3?!1:$===4||$===2||$===3||(q===4||q===2||q===3)?!0:$===8&&(q===8||q===9||q===11||q===12)||(($===11||$===9)&&(q===9||q===10)||(($===12||$===10)&&q===10||(q===5||q===13||(q===7||($===1||$===13&&q===14)))))?!1:!($===6&&q===6)}class at{constructor(){this._data=We()}static getInstance(){return at._INSTANCE||(at._INSTANCE=new at),at._INSTANCE}getGraphemeBreakType($){if($<32)return $===10?3:$===13?2:4;if($<127)return 0;const q=this._data,he=q.length/3;let pe=1;for(;pe<=he;)if($<q[3*pe])pe=2*pe;else if($>q[3*pe+1])pe=2*pe+1;else return q[3*pe+2];return 0}}at._INSTANCE=null;function We(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function it($,q){if($===0)return 0;const he=ne($,q);if(he!==void 0)return he;const pe=c(q,$);return $-=J(pe),$}function ne($,q){let he=c(q,$);for($-=J(he);k(he)||he===65039||he===8419;){if($===0)return;he=c(q,$),$-=J(he)}if(!Be(he))return;if($>=0){const pe=c(q,$);pe===8205&&($-=J(pe))}return $}function J($){return $>=65536?2:1}function k($){return 127995<=$&&$<=127999}},NKYn:function(ct,_e,j){"use strict";j.d(_e,"a",function(){return e});var se=j("14J3"),G=j("BMrR"),D=j("jCWc"),V=j("kPKH"),F=j("tJVT"),O=j("q1tI"),X=j.n(O),M=j("9Bee"),e=function(g){var v=g.data,u=Object(O.useState)(!1),s=Object(F.a)(u,2),i=s[0],A=s[1],o=function(){var r,t;switch(v.question_type){case 3:return X.a.createElement("aside",{className:"mt20"},X.a.createElement("span",{style:{cursor:"pointer"},className:"font14 c-blue current",onClick:function(){A(!i)}},i?"\u9690\u85CF\u53C2\u8003\u7B54\u6848":"\u67E5\u770B\u53C2\u8003\u7B54\u6848"),i&&X.a.createElement("div",null,v==null||((r=v.standard_answer)===null||r===void 0)?void 0:r.map(function(y,_){var E;return X.a.createElement(G.a,{style:{alignItems:"baseline"},className:"mr20"},X.a.createElement(V.a,{flex:"50px"},X.a.createElement("span",{className:"mt10"},"\u586B\u7A7A",y.choice_id,":")),X.a.createElement(V.a,{flex:1},y==null||((E=y.answer_text)===null||E===void 0)?void 0:E.map(function(B,C){return X.a.createElement("div",null,B)})))})));case 4:return X.a.createElement("aside",{className:"mt20"},X.a.createElement("span",{style:{cursor:"pointer"},className:"font14 c-blue current",onClick:function(){A(!i)}},i?"\u9690\u85CF\u53C2\u8003\u7B54\u6848":"\u67E5\u770B\u53C2\u8003\u7B54\u6848"),i&&X.a.createElement("div",null,X.a.createElement(M.a,{value:v==null||((t=v.standard_answer)===null||t===void 0)?void 0:t.join(" ")})))}};return X.a.createElement("section",null,o())}},NvD2:function(ct,_e,j){"use strict";j.d(_e,"a",function(){return O});var se=j("Kwbf");function G(X,M){var e=new Set;return X.forEach(function(R){M.has(R)||e.add(R)}),e}function D(X){var M=X||{},e=M.disabled,R=M.disableCheckbox,g=M.checkable;return!!(e||R)||g===!1}function V(X,M,e,R){for(var g=new Set(X),v=new Set,u=0;u<=e;u+=1){var s=M.get(u)||new Set;s.forEach(function(a){var r=a.key,t=a.node,y=a.children,_=y===void 0?[]:y;g.has(r)&&!R(t)&&_.filter(function(E){return!R(E.node)}).forEach(function(E){g.add(E.key)})})}for(var i=new Set,A=e;A>=0;A-=1){var o=M.get(A)||new Set;o.forEach(function(a){var r=a.parent,t=a.node;if(R(t)||!a.parent||i.has(a.parent.key))return;if(R(a.parent.node)){i.add(r.key);return}var y=!0,_=!1;(r.children||[]).filter(function(E){return!R(E.node)}).forEach(function(E){var B=E.key,C=g.has(B);y&&!C&&(y=!1),!_&&(C||v.has(B))&&(_=!0)}),y&&g.add(r.key),_&&v.add(r.key),i.add(r.key)})}return{checkedKeys:Array.from(g),halfCheckedKeys:Array.from(G(v,g))}}function F(X,M,e,R,g){for(var v=new Set(X),u=new Set(M),s=0;s<=R;s+=1){var i=e.get(s)||new Set;i.forEach(function(r){var t=r.key,y=r.node,_=r.children,E=_===void 0?[]:_;!v.has(t)&&!u.has(t)&&!g(y)&&E.filter(function(B){return!g(B.node)}).forEach(function(B){v.delete(B.key)})})}u=new Set;for(var A=new Set,o=R;o>=0;o-=1){var a=e.get(o)||new Set;a.forEach(function(r){var t=r.parent,y=r.node;if(g(y)||!r.parent||A.has(r.parent.key))return;if(g(r.parent.node)){A.add(t.key);return}var _=!0,E=!1;(t.children||[]).filter(function(B){return!g(B.node)}).forEach(function(B){var C=B.key,h=v.has(C);_&&!h&&(_=!1),!E&&(h||u.has(C))&&(E=!0)}),_||v.delete(t.key),E&&u.add(t.key),A.add(t.key)})}return{checkedKeys:Array.from(v),halfCheckedKeys:Array.from(G(u,v))}}function O(X,M,e,R){var g=[],v;R?v=R:v=D;var u=new Set(X.filter(function(o){var a=!!e[o];return a||g.push(o),a})),s=new Map,i=0;Object.keys(e).forEach(function(o){var a=e[o],r=a.level,t=s.get(r);t||(t=new Set,s.set(r,t)),t.add(a),i=Math.max(i,r)}),Object(se.a)(!g.length,"Tree missing follow keys: ".concat(g.slice(0,100).map(function(o){return"'".concat(o,"'")}).join(", ")));var A;return M===!0?A=V(u,s,i,v):A=F(u,M.halfCheckedKeys,s,i,v),A}},OZM5:function(ct,_e,j){"use strict";j.d(_e,"b",function(){return R}),j.d(_e,"a",function(){return g}),j.d(_e,"k",function(){return v}),j.d(_e,"h",function(){return u}),j.d(_e,"i",function(){return s}),j.d(_e,"g",function(){return i}),j.d(_e,"c",function(){return A}),j.d(_e,"d",function(){return o}),j.d(_e,"j",function(){return t}),j.d(_e,"e",function(){return y}),j.d(_e,"f",function(){return _});var se=j("KQm4"),G=j("U8pU"),D=j("Ff2n"),V=j("q1tI"),F=j.n(V),O=j("Kwbf"),X=j("WaYH"),M=.25,e=2;function R(E,B){var C=E.slice(),h=C.indexOf(B);return h>=0&&C.splice(h,1),C}function g(E,B){var C=E.slice();return C.indexOf(B)===-1&&C.push(B),C}function v(E){return E.split("-")}function u(E,B){return"".concat(E,"-").concat(B)}function s(E){return E&&E.type&&E.type.isTreeNode}function i(E,B){var C=[E],h=B[E];function n(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];l.forEach(function(d){var b=d.key,m=d.children;C.push(b),n(m)})}return n(h.children),C}function A(E,B){var C=E.clientY,h=B.selectHandle.getBoundingClientRect(),n=h.top,l=h.bottom,d=h.height,b=Math.max(d*M,e);return C<=n+b?-1:C>=l-b?1:0}function o(E,B){if(!E)return;var C=B.multiple;return C?E.slice():E.length?[E[0]]:E}var a=function(B){return B};function r(E,B){if(!E)return[];var C=B||{},h=C.processProps,n=h===void 0?a:h,l=Array.isArray(E)?E:[E];return l.map(function(d){var b=d.children,m=Object(D.a)(d,["children"]),c=r(b,B);return F.a.createElement(X.a,Object.assign({},n(m)),c)})}function t(E){if(!E)return null;var B;if(Array.isArray(E))B={checkedKeys:E,halfCheckedKeys:void 0};else if(Object(G.a)(E)==="object")B={checkedKeys:E.checked||void 0,halfCheckedKeys:E.halfChecked||void 0};else return Object(O.a)(!1,"`checkedKeys` is not an array or an object"),null;return B}function y(E,B){var C=new Set;function h(n){if(C.has(n))return;var l=B[n];if(!l)return;C.add(n);var d=l.parent,b=l.node;if(b.disabled)return;d&&h(d.key)}return(E||[]).forEach(function(n){h(n)}),Object(se.a)(C)}function _(E){var B={};return Object.keys(E).forEach(function(C){(C.startsWith("data-")||C.startsWith("aria-"))&&(B[C]=E[C])}),B}},"SA+Z":function(ct,_e,j){var se=j("wTVA"),G=j("EbDI"),D=j("ZhPi"),V=j("wkBT");function F(O){return se(O)||G(O)||D(O)||V()}ct.exports=F,ct.exports.__esModule=!0,ct.exports.default=ct.exports},SJMd:function(ct,_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 j,se,G,D=!1,V,F;window.PR_SHOULD_USE_CONTINUATION=!0;var O,X;(function(){var M=window,e=["break,continue,do,else,for,if,return,while"],R=[e,"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"],g=[R,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],v=[g,"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=[g,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],s=[g,"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"],i="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=[g,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],o="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",a=[e,"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"],r=[e,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],t=[e,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],y=[v,s,u,A,o,a,r,t],_=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,E="str",B="kwd",C="com",h="typ",n="lit",l="pun",d="pln",b="tag",m="dec",c="src",L="atn",N="atv",T="nocode",P="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function W(ne){for(var J=0,k=!1,$=!1,q=0,he=ne.length;q<he;++q){var pe=ne[q];if(pe.ignoreCase)$=!0;else if(/[a-z]/i.test(pe.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){k=!0,$=!1;break}}var Ke={b:8,t:9,n:10,v:11,f:12,r:13};function Je(xe){var Ue=xe.charCodeAt(0);if(Ue!==92)return Ue;var Qe=xe.charAt(1);return Ue=Ke[Qe],Ue||("0"<=Qe&&Qe<="7"?parseInt(xe.substring(1),8):Qe==="u"||Qe==="x"?parseInt(xe.substring(2),16):xe.charCodeAt(1))}function ze(xe){if(xe<32)return(xe<16?"\\x0":"\\x")+xe.toString(16);var Ue=String.fromCharCode(xe);return Ue==="\\"||Ue==="-"||Ue==="]"||Ue==="^"?"\\"+Ue:Ue}function Ze(xe){var Ue=xe.substring(1,xe.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),Qe=[],je=Ue[0]==="^",Le=["["];je&&Le.push("^");for(var Fe=je?1:0,we=Ue.length;Fe<we;++Fe){var ue=Ue[Fe];if(/\\[bdsw]/i.test(ue))Le.push(ue);else{var ce=Je(ue),te;Fe+2<we&&Ue[Fe+1]==="-"?(te=Je(Ue[Fe+2]),Fe+=2):te=ce,Qe.push([ce,te]),te<65||ce>122||(te<65||ce>90||Qe.push([Math.max(65,ce)|32,Math.min(te,90)|32]),te<97||ce>122||Qe.push([Math.max(97,ce)&~32,Math.min(te,122)&~32]))}}Qe.sort(function(Ie,Pe){return Ie[0]-Pe[0]||Pe[1]-Ie[1]});for(var ie=[],le=[],Fe=0;Fe<Qe.length;++Fe){var fe=Qe[Fe];fe[0]<=le[1]+1?le[1]=Math.max(le[1],fe[1]):ie.push(le=fe)}for(var Fe=0;Fe<ie.length;++Fe){var fe=ie[Fe];Le.push(ze(fe[0])),fe[1]>fe[0]&&(fe[1]+1>fe[0]&&Le.push("-"),Le.push(ze(fe[1])))}return Le.push("]"),Le.join("")}function nt(xe){for(var Ue=xe.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),Qe=Ue.length,je=[],Le=0,Fe=0;Le<Qe;++Le){var we=Ue[Le];if(we==="(")++Fe;else if(we.charAt(0)==="\\"){var ue=+we.substring(1);ue&&(ue<=Fe?je[ue]=-1:Ue[Le]=ze(ue))}}for(var Le=1;Le<je.length;++Le)je[Le]===-1&&(je[Le]=++J);for(var Le=0,Fe=0;Le<Qe;++Le){var we=Ue[Le];if(we==="(")++Fe,je[Fe]||(Ue[Le]="(?:");else if(we.charAt(0)==="\\"){var ue=+we.substring(1);ue&&ue<=Fe&&(Ue[Le]="\\"+je[ue])}}for(var Le=0;Le<Qe;++Le)Ue[Le]==="^"&&Ue[Le+1]!=="^"&&(Ue[Le]="");if(xe.ignoreCase&&k)for(var Le=0;Le<Qe;++Le){var we=Ue[Le],ce=we.charAt(0);we.length>=2&&ce==="["?Ue[Le]=Ze(we):ce!=="\\"&&(Ue[Le]=we.replace(/[a-zA-Z]/g,function(le){var fe=le.charCodeAt(0);return"["+String.fromCharCode(fe&~32,fe|32)+"]"}))}return Ue.join("")}for(var pt=[],q=0,he=ne.length;q<he;++q){var pe=ne[q];if(pe.global||pe.multiline)throw new Error(""+pe);pt.push("(?:"+nt(pe)+")")}return new RegExp(pt.join("|"),$?"gi":"g")}function U(ne,J){var k=/(?:^|\s)nocode(?:\s|$)/,$=[],q=0,he=[],pe=0;function Ke(Je){var ze=Je.nodeType;if(ze==1){if(k.test(Je.className))return;for(var Ze=Je.firstChild;Ze;Ze=Ze.nextSibling)Ke(Ze);var nt=Je.nodeName.toLowerCase();(nt==="br"||nt==="li")&&($[pe]=`
|
|
`,he[pe<<1]=q++,he[pe++<<1|1]=Je)}else if(ze==3||ze==4){var pt=Je.nodeValue;pt.length&&(J?pt=pt.replace(/\r\n?/g,`
|
|
`):pt=pt.replace(/[ \t\r\n]+/g," "),$[pe]=pt,he[pe<<1]=q,q+=pt.length,he[pe++<<1|1]=Je)}}return Ke(ne),{sourceCode:$.join("").replace(/\n$/,""),spans:he}}function Y(ne,J,k,$,q){if(!k)return;var he={sourceNode:ne,pre:1,langExtension:null,numberLines:null,sourceCode:k,spans:null,basePos:J,decorations:null};$(he),q.push.apply(q,he.decorations)}var re=/\S/;function me(ne){for(var J=void 0,k=ne.firstChild;k;k=k.nextSibling){var $=k.nodeType;J=$===1?J?ne:k:$===3&&re.test(k.nodeValue)?ne:J}return J===ne?void 0:J}function ge(ne,J){var k={},$;(function(){for(var pe=ne.concat(J),Ke=[],Je={},ze=0,Ze=pe.length;ze<Ze;++ze){var nt=pe[ze],pt=nt[3];if(pt)for(var xe=pt.length;--xe>=0;)k[pt.charAt(xe)]=nt;var Ue=nt[1],Qe=""+Ue;Je.hasOwnProperty(Qe)||(Ke.push(Ue),Je[Qe]=null)}Ke.push(/[\0-\uffff]/),$=W(Ke)})();var q=J.length,he=function(pe){for(var Ke=pe.sourceCode,Je=pe.basePos,ze=pe.sourceNode,Ze=[Je,d],nt=0,pt=Ke.match($)||[],xe={},Ue=0,Qe=pt.length;Ue<Qe;++Ue){var je=pt[Ue],Le=xe[je],Fe=void 0,we;if(typeof Le=="string")we=!1;else{var ue=k[je.charAt(0)];if(ue)Fe=je.match(ue[1]),Le=ue[0];else{for(var ce=0;ce<q;++ce)if(ue=J[ce],Fe=je.match(ue[1]),Fe){Le=ue[0];break}Fe||(Le=d)}we=Le.length>=5&&Le.substring(0,5)==="lang-",we&&!(Fe&&typeof Fe[1]=="string")&&(we=!1,Le=c),we||(xe[je]=Le)}var te=nt;if(nt+=je.length,!we)Ze.push(Je+te,Le);else{var ie=Fe[1],le=je.indexOf(ie),fe=le+ie.length;Fe[2]&&(fe=je.length-Fe[2].length,le=fe-ie.length);var Ie=Le.substring(5);Y(ze,Je+te,je.substring(0,le),he,Ze),Y(ze,Je+te+le,ie,ve(Ie,ie),Ze),Y(ze,Je+te+fe,je.substring(fe),he,Ze)}}pe.decorations=Ze};return he}function Oe(ne){var J=[],k=[];ne.tripleQuotedStrings?J.push([E,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ne.multiLineStrings?J.push([E,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):J.push([E,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ne.verbatimStrings&&k.push([E,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var $=ne.hashComments;$&&(ne.cStyleComments?($>1?J.push([C,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):J.push([C,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),k.push([E,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):J.push([C,/^#[^\r\n]*/,null,"#"])),ne.cStyleComments&&(k.push([C,/^\/\/[^\r\n]*/,null]),k.push([C,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var q=ne.regexLiterals;if(q){var he=q>1?"":`
|
|
\r`,pe=he?".":"[\\S\\s]",Ke="/(?=[^/*"+he+"])(?:[^/\\x5B\\x5C"+he+"]|\\x5C"+pe+"|\\x5B(?:[^\\x5C\\x5D"+he+"]|\\x5C"+pe+")*(?:\\x5D|$))+/";k.push(["lang-regex",RegExp("^"+P+"("+Ke+")")])}var Je=ne.types;Je&&k.push([h,Je]);var ze=(""+ne.keywords).replace(/^ | $/g,"");ze.length&&k.push([B,new RegExp("^(?:"+ze.replace(/[\s,]+/g,"|")+")\\b"),null]),J.push([d,/^\s+/,null,` \r
|
|
\xA0`]);var Ze="^.[^\\s\\w.$@'\"`/\\\\]*";return ne.regexLiterals&&(Ze+="(?!s*/)"),k.push([n,/^@[a-z_$][a-z_$@0-9]*/i,null],[h,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[d,/^[a-z_$][a-z_$@0-9]*/i,null],[n,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[d,/^\\[\s\S]?/,null],[l,new RegExp(Ze),null]),ge(J,k)}var Se=Oe({keywords:y,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Be(ne,J,k){for(var $=/(?:^|\s)nocode(?:\s|$)/,q=/\r\n?|\n/,he=ne.ownerDocument,pe=he.createElement("li");ne.firstChild;)pe.appendChild(ne.firstChild);var Ke=[pe];function Je(Ue){var Qe=Ue.nodeType;if(Qe==1&&!$.test(Ue.className))if(Ue.nodeName==="br")ze(Ue),Ue.parentNode&&Ue.parentNode.removeChild(Ue);else for(var je=Ue.firstChild;je;je=je.nextSibling)Je(je);else if((Qe==3||Qe==4)&&k){var Le=Ue.nodeValue,Fe=Le.match(q);if(Fe){var we=Le.substring(0,Fe.index);Ue.nodeValue=we;var ue=Le.substring(Fe.index+Fe[0].length);if(ue){var ce=Ue.parentNode;ce.insertBefore(he.createTextNode(ue),Ue.nextSibling)}ze(Ue),we||Ue.parentNode.removeChild(Ue)}}}function ze(Ue){for(;!Ue.nextSibling;)if(Ue=Ue.parentNode,!Ue)return;function Qe(Fe,we){var ue=we?Fe.cloneNode(!1):Fe,ce=Fe.parentNode;if(ce){var te=Qe(ce,1),ie=Fe.nextSibling;te.appendChild(ue);for(var le=ie;le;le=ie)ie=le.nextSibling,te.appendChild(le)}return ue}for(var je=Qe(Ue.nextSibling,0),Le;(Le=je.parentNode)&&Le.nodeType===1;)je=Le;Ke.push(je)}for(var Ze=0;Ze<Ke.length;++Ze)Je(Ke[Ze]);J===(J|0)&&Ke[0].setAttribute("value",J);var nt=he.createElement("ol");nt.className="linenums";for(var pt=Math.max(0,J-1|0)||0,Ze=0,xe=Ke.length;Ze<xe;++Ze)pe=Ke[Ze],pe.className="L"+(Ze+pt)%10,pe.firstChild||pe.appendChild(he.createTextNode("\xA0")),nt.appendChild(pe);ne.appendChild(nt)}function Ne(ne){var J=/\bMSIE\s(\d+)/.exec(navigator.userAgent);J=J&&+J[1]<=8;var k=/\n/g,$=ne.sourceCode,q=$.length,he=0,pe=ne.spans,Ke=pe.length,Je=0,ze=ne.decorations,Ze=ze.length,nt=0;ze[Ze]=q;var pt,xe;for(xe=pt=0;xe<Ze;)ze[xe]!==ze[xe+2]?(ze[pt++]=ze[xe++],ze[pt++]=ze[xe++]):xe+=2;for(Ze=pt,xe=pt=0;xe<Ze;){for(var Ue=ze[xe],Qe=ze[xe+1],je=xe+2;je+2<=Ze&&ze[je+1]===Qe;)je+=2;ze[pt++]=Ue,ze[pt++]=Qe,xe=je}Ze=ze.length=pt;var Le=ne.sourceNode,Fe="";Le&&(Fe=Le.style.display,Le.style.display="none");try{for(var we=null;Je<Ke;){var ue=pe[Je],ce=pe[Je+2]||q,te=ze[nt+2]||q,je=Math.min(ce,te),ie=pe[Je+1],le;if(ie.nodeType!==1&&(le=$.substring(he,je))){J&&(le=le.replace(k,"\r")),ie.nodeValue=le;var fe=ie.ownerDocument,Ie=fe.createElement("span");Ie.className=ze[nt+1];var Pe=ie.parentNode;Pe.replaceChild(Ie,ie),Ie.appendChild(ie),he<ce&&(pe[Je+1]=ie=fe.createTextNode($.substring(je,ce)),Pe.insertBefore(ie,Ie.nextSibling))}he=je,he>=ce&&(Je+=2),he>=te&&(nt+=2)}}finally{Le&&(Le.style.display=Fe)}}var ke={};function Ce(ne,J){for(var k=J.length;--k>=0;){var $=J[k];ke.hasOwnProperty($)?M.console&&console.warn("cannot override language handler %s",$):ke[$]=ne}}function ve(ne,J){return ne&&ke.hasOwnProperty(ne)||(ne=/^\s*</.test(J)?"default-markup":"default-code"),ke[ne]}Ce(Se,["default-code"]),Ce(ge([],[[d,/^[^<?]+/],[m,/^<!\w[^>]*(?:>|$)/],[C,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[l,/^(?:<[%?]|[%?]>)/],["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"]),Ce(ge([[d,/^[\s]+/,null,` \r
|
|
`],[N,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[b,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[L,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[l,/^[=<>\/]+/],["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"]),Ce(ge([],[[N,/^[\s\S]+/]]),["uq.val"]),Ce(Oe({keywords:v,hashComments:!0,cStyleComments:!0,types:_}),["c","cc","cpp","cxx","cyc","m"]),Ce(Oe({keywords:"null,true,false"}),["json"]),Ce(Oe({keywords:s,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:_}),["cs"]),Ce(Oe({keywords:u,cStyleComments:!0}),["java"]),Ce(Oe({keywords:t,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),Ce(Oe({keywords:a,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),Ce(Oe({keywords:o,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),Ce(Oe({keywords:r,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),Ce(Oe({keywords:A,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),Ce(Oe({keywords:i,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),Ce(ge([],[[E,/^[\s\S]+/]]),["regex"]);function Ye(ne){var J=ne.langExtension;try{var k=U(ne.sourceNode,ne.pre),$=k.sourceCode;ne.sourceCode=$,ne.spans=k.spans,ne.basePos=0,ve(J,$)(ne),Ne(ne)}catch(q){M.console&&console.log(q&&q.stack||q)}}function ht(ne,J,k){var $=k||!1,q=J||null,he=document.createElement("div");he.innerHTML="<pre>"+ne+"</pre>",he=he.firstChild,$&&Be(he,$,!0);var pe={langExtension:q,numberLines:$,sourceNode:he,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Ye(pe),he.innerHTML}function at(ne,J){var k=J||document.body,$=k.ownerDocument||document;function q(ue){return k.getElementsByTagName(ue)}for(var he=[q("pre"),q("code"),q("xmp")],pe=[],Ke=0;Ke<he.length;++Ke)for(var Je=0,ze=he[Ke].length;Je<ze;++Je)pe.push(he[Ke][Je]);he=null;var Ze=Date;Ze.now||(Ze={now:function(){return+new Date}});var nt=0,pt=/\blang(?:uage)?-([\w.]+)(?!\S)/,xe=/\bprettyprint\b/,Ue=/\bprettyprinted\b/,Qe=/pre|xmp/i,je=/^code$/i,Le=/^(?:pre|code|xmp)$/i,Fe={};function we(){for(var ue=M.PR_SHOULD_USE_CONTINUATION?Ze.now()+250:Infinity;nt<pe.length&&Ze.now()<ue;nt++){for(var ce=pe[nt],te=Fe,ie=ce;ie=ie.previousSibling;){var le=ie.nodeType,fe=(le===7||le===8)&&ie.nodeValue;if(fe?!/^\??prettify\b/.test(fe):le!==3||/\S/.test(ie.nodeValue))break;if(fe){te={},fe.replace(/\b(\w+)=([\w:.%+-]+)/g,function(yt,Et,wt){te[Et]=wt});break}}var Ie=ce.className;if((te!==Fe||xe.test(Ie))&&!Ue.test(Ie)){for(var Pe=!1,qe=ce.parentNode;qe;qe=qe.parentNode){var dt=qe.tagName;if(Le.test(dt)&&qe.className&&xe.test(qe.className)){Pe=!0;break}}if(!Pe){ce.className+=" prettyprinted";var lt=te.lang;if(!lt){lt=Ie.match(pt);var st;!lt&&(st=me(ce))&&je.test(st.tagName)&&(lt=st.className.match(pt)),lt&&(lt=lt[1])}var Lt;if(Qe.test(ce.tagName))Lt=1;else{var mt=ce.currentStyle,tt=$.defaultView,er=mt?mt.whiteSpace:tt&&tt.getComputedStyle?tt.getComputedStyle(ce,null).getPropertyValue("white-space"):0;Lt=er&&er.substring(0,3)==="pre"}var Jt=te.linenums;(Jt=Jt==="true"||+Jt)||(Jt=Ie.match(/\blinenums\b(?::(\d+))?/),Jt=Jt?Jt[1]&&Jt[1].length?+Jt[1]:!0:!1),Jt&&Be(ce,Jt,Lt);var Ot={langExtension:lt,sourceNode:ce,numberLines:Jt,pre:Lt,sourceCode:null,basePos:null,spans:null,decorations:null};Ye(Ot)}}}nt<pe.length?M.setTimeout(we,250):typeof ne=="function"&&ne()}we()}var We=M.PR={createSimpleLexer:ge,registerLangHandler:Ce,sourceDecorator:Oe,PR_ATTRIB_NAME:L,PR_ATTRIB_VALUE:N,PR_COMMENT:C,PR_DECLARATION:m,PR_KEYWORD:B,PR_LITERAL:n,PR_NOCODE:T,PR_PLAIN:d,PR_PUNCTUATION:l,PR_SOURCE:c,PR_STRING:E,PR_TAG:b,PR_TYPE:h,prettyPrintOne:D?M.prettyPrintOne=ht:O=ht,prettyPrint:X=D?M.prettyPrint=at:X=at},it=M.define;typeof it=="function"&&it.amd&&it("google-code-prettify",[],function(){return We})})()},T8No:function(ct,_e,j){"use strict";j.d(_e,"a",function(){return X}),j.d(_e,"e",function(){return M}),j.d(_e,"c",function(){return l}),j.d(_e,"b",function(){return d}),j.d(_e,"d",function(){return b}),j.d(_e,"f",function(){return L});var se=j("MNsG"),G=j("N0LK"),D=j("Cg/j");let V=se.k||"";const F=new Map;F.set("false",!1),F.set("true",!0),F.set("isMac",se.f),F.set("isLinux",se.d),F.set("isWindows",se.i),F.set("isWeb",se.h),F.set("isMacNative",se.f&&!se.h),F.set("isEdge",V.indexOf("Edg/")>=0),F.set("isFirefox",V.indexOf("Firefox")>=0),F.set("isChrome",V.indexOf("Chrome")>=0),F.set("isSafari",V.indexOf("Safari")>=0);const O=Object.prototype.hasOwnProperty;class X{static has(T){return v.create(T)}static equals(T,P){return u.create(T,P)}static regex(T,P){return E.create(T,P)}static not(T){return o.create(T)}static and(...T){return h.create(T,null)}static or(...T){return n.create(T,null,!0)}static deserialize(T,P=!1){return T?this._deserializeOrExpression(T,P):void 0}static _deserializeOrExpression(T,P){let W=T.split("||");return n.create(W.map(U=>this._deserializeAndExpression(U,P)),null,!0)}static _deserializeAndExpression(T,P){let W=T.split("&&");return h.create(W.map(U=>this._deserializeOne(U,P)),null)}static _deserializeOne(T,P){if(T=T.trim(),T.indexOf("!=")>=0){let W=T.split("!=");return A.create(W[0].trim(),this._deserializeValue(W[1],P))}if(T.indexOf("==")>=0){let W=T.split("==");return u.create(W[0].trim(),this._deserializeValue(W[1],P))}if(T.indexOf("=~")>=0){let W=T.split("=~");return E.create(W[0].trim(),this._deserializeRegexValue(W[1],P))}if(T.indexOf(" in ")>=0){let W=T.split(" in ");return s.create(W[0].trim(),W[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(T)){const W=T.split(">=");return t.create(W[0].trim(),W[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(T)){const W=T.split(">");return r.create(W[0].trim(),W[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(T)){const W=T.split("<=");return _.create(W[0].trim(),W[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(T)){const W=T.split("<");return y.create(W[0].trim(),W[1].trim())}return/^\!\s*/.test(T)?o.create(T.substr(1).trim()):v.create(T)}static _deserializeValue(T,P){if(T=T.trim(),T==="true")return!0;if(T==="false")return!1;let W=/^'([^']*)'$/.exec(T);return W?W[1].trim():T}static _deserializeRegexValue(T,P){if(Object(G.C)(T)){if(P)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let W=T.indexOf("/"),U=T.lastIndexOf("/");if(W===U||W<0){if(P)throw new Error(`bad regexp-value '${T}', missing /-enclosure`);return console.warn(`bad regexp-value '${T}', missing /-enclosure`),null}let Y=T.slice(W+1,U),re=T[U+1]==="i"?"i":"";try{return new RegExp(Y,re)}catch(me){if(P)throw new Error(`bad regexp-value '${T}', parse error: ${me}`);return console.warn(`bad regexp-value '${T}', parse error: ${me}`),null}}}function M(T,P){const W=T?T.substituteConstants():void 0,U=P?P.substituteConstants():void 0;return!W&&!U?!0:!W||!U?!1:W.equals(U)}function e(T,P){return T.cmp(P)}class R{constructor(){this.type=0}cmp(T){return this.type-T.type}equals(T){return T.type===this.type}substituteConstants(){return this}evaluate(T){return!1}serialize(){return"false"}keys(){return[]}negate(){return g.INSTANCE}}R.INSTANCE=new R;class g{constructor(){this.type=1}cmp(T){return this.type-T.type}equals(T){return T.type===this.type}substituteConstants(){return this}evaluate(T){return!0}serialize(){return"true"}keys(){return[]}negate(){return R.INSTANCE}}g.INSTANCE=new g;class v{constructor(T,P){this.key=T,this.negated=P,this.type=2}static create(T,P=null){const W=F.get(T);return typeof W=="boolean"?W?g.INSTANCE:R.INSTANCE:new v(T,P)}cmp(T){return T.type!==this.type?this.type-T.type:m(this.key,T.key)}equals(T){return T.type===this.type?this.key===T.key:!1}substituteConstants(){const T=F.get(this.key);return typeof T=="boolean"?T?g.INSTANCE:R.INSTANCE:this}evaluate(T){return!!T.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=o.create(this.key,this)),this.negated}}class u{constructor(T,P,W){this.key=T,this.value=P,this.negated=W,this.type=4}static create(T,P,W=null){if(typeof P=="boolean")return P?v.create(T,W):o.create(T,W);const U=F.get(T);if(typeof U=="boolean"){const Y=U?"true":"false";return P===Y?g.INSTANCE:R.INSTANCE}return new u(T,P,W)}cmp(T){return T.type!==this.type?this.type-T.type:c(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){const T=F.get(this.key);if(typeof T=="boolean"){const P=T?"true":"false";return this.value===P?g.INSTANCE:R.INSTANCE}return this}evaluate(T){return T.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=A.create(this.key,this.value,this)),this.negated}}class s{constructor(T,P){this.key=T,this.valueKey=P,this.type=10,this.negated=null}static create(T,P){return new s(T,P)}cmp(T){return T.type!==this.type?this.type-T.type:c(this.key,this.valueKey,T.key,T.valueKey)}equals(T){return T.type===this.type?this.key===T.key&&this.valueKey===T.valueKey:!1}substituteConstants(){return this}evaluate(T){const P=T.getValue(this.valueKey),W=T.getValue(this.key);return Array.isArray(P)?P.indexOf(W)>=0:typeof W=="string"&&typeof P=="object"&&P!==null?O.call(P,W):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=i.create(this)),this.negated}}class i{constructor(T){this._actual=T,this.type=11}static create(T){return new i(T)}cmp(T){return T.type!==this.type?this.type-T.type:this._actual.cmp(T._actual)}equals(T){return T.type===this.type?this._actual.equals(T._actual):!1}substituteConstants(){return this}evaluate(T){return!this._actual.evaluate(T)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class A{constructor(T,P,W){this.key=T,this.value=P,this.negated=W,this.type=5}static create(T,P,W=null){if(typeof P=="boolean")return P?o.create(T,W):v.create(T,W);const U=F.get(T);if(typeof U=="boolean"){const Y=U?"true":"false";return P===Y?R.INSTANCE:g.INSTANCE}return new A(T,P,W)}cmp(T){return T.type!==this.type?this.type-T.type:c(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){const T=F.get(this.key);if(typeof T=="boolean"){const P=T?"true":"false";return this.value===P?R.INSTANCE:g.INSTANCE}return this}evaluate(T){return T.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=u.create(this.key,this.value,this)),this.negated}}class o{constructor(T,P){this.key=T,this.negated=P,this.type=3}static create(T,P=null){const W=F.get(T);return typeof W=="boolean"?W?R.INSTANCE:g.INSTANCE:new o(T,P)}cmp(T){return T.type!==this.type?this.type-T.type:m(this.key,T.key)}equals(T){return T.type===this.type?this.key===T.key:!1}substituteConstants(){const T=F.get(this.key);return typeof T=="boolean"?T?R.INSTANCE:g.INSTANCE:this}evaluate(T){return!T.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=v.create(this.key,this)),this.negated}}function a(T,P){if(typeof T=="string"){const W=parseFloat(T);isNaN(W)||(T=W)}return typeof T=="string"||typeof T=="number"?P(T):R.INSTANCE}class r{constructor(T,P,W){this.key=T,this.value=P,this.negated=W,this.type=12}static create(T,P,W=null){return a(P,U=>new r(T,U,W))}cmp(T){return T.type!==this.type?this.type-T.type:c(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){return this}evaluate(T){return typeof this.value=="string"?!1:parseFloat(T.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=_.create(this.key,this.value,this)),this.negated}}class t{constructor(T,P,W){this.key=T,this.value=P,this.negated=W,this.type=13}static create(T,P,W=null){return a(P,U=>new t(T,U,W))}cmp(T){return T.type!==this.type?this.type-T.type:c(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){return this}evaluate(T){return typeof this.value=="string"?!1:parseFloat(T.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=y.create(this.key,this.value,this)),this.negated}}class y{constructor(T,P,W){this.key=T,this.value=P,this.negated=W,this.type=14}static create(T,P,W=null){return a(P,U=>new y(T,U,W))}cmp(T){return T.type!==this.type?this.type-T.type:c(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){return this}evaluate(T){return typeof this.value=="string"?!1:parseFloat(T.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=t.create(this.key,this.value,this)),this.negated}}class _{constructor(T,P,W){this.key=T,this.value=P,this.negated=W,this.type=15}static create(T,P,W=null){return a(P,U=>new _(T,U,W))}cmp(T){return T.type!==this.type?this.type-T.type:c(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){return this}evaluate(T){return typeof this.value=="string"?!1:parseFloat(T.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=r.create(this.key,this.value,this)),this.negated}}class E{constructor(T,P){this.key=T,this.regexp=P,this.type=7,this.negated=null}static create(T,P){return new E(T,P)}cmp(T){if(T.type!==this.type)return this.type-T.type;if(this.key<T.key)return-1;if(this.key>T.key)return 1;const P=this.regexp?this.regexp.source:"",W=T.regexp?T.regexp.source:"";return P<W?-1:P>W?1:0}equals(T){if(T.type===this.type){const P=this.regexp?this.regexp.source:"",W=T.regexp?T.regexp.source:"";return this.key===T.key&&P===W}return!1}substituteConstants(){return this}evaluate(T){let P=T.getValue(this.key);return this.regexp?this.regexp.test(P):!1}serialize(){const T=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${T}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=B.create(this)),this.negated}}class B{constructor(T){this._actual=T,this.type=8}static create(T){return new B(T)}cmp(T){return T.type!==this.type?this.type-T.type:this._actual.cmp(T._actual)}equals(T){return T.type===this.type?this._actual.equals(T._actual):!1}substituteConstants(){return this}evaluate(T){return!this._actual.evaluate(T)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function C(T){let P=null;for(let W=0,U=T.length;W<U;W++){const Y=T[W].substituteConstants();if(T[W]!==Y&&P===null){P=[];for(let re=0;re<W;re++)P[re]=T[re]}P!==null&&(P[W]=Y)}return P===null?T:P}class h{constructor(T,P){this.expr=T,this.negated=P,this.type=6}static create(T,P){return h._normalizeArr(T,P)}cmp(T){if(T.type!==this.type)return this.type-T.type;if(this.expr.length<T.expr.length)return-1;if(this.expr.length>T.expr.length)return 1;for(let P=0,W=this.expr.length;P<W;P++){const U=e(this.expr[P],T.expr[P]);if(U!==0)return U}return 0}equals(T){if(T.type===this.type){if(this.expr.length!==T.expr.length)return!1;for(let P=0,W=this.expr.length;P<W;P++)if(!this.expr[P].equals(T.expr[P]))return!1;return!0}return!1}substituteConstants(){const T=C(this.expr);return T===this.expr?this:h.create(T,this.negated)}evaluate(T){for(let P=0,W=this.expr.length;P<W;P++)if(!this.expr[P].evaluate(T))return!1;return!0}static _normalizeArr(T,P){const W=[];let U=!1;for(const Y of T){if(!Y)continue;if(Y.type===1){U=!0;continue}if(Y.type===0)return R.INSTANCE;if(Y.type===6){W.push(...Y.expr);continue}W.push(Y)}if(W.length===0&&U)return g.INSTANCE;if(W.length===0)return;if(W.length===1)return W[0];W.sort(e);for(let Y=1;Y<W.length;Y++)W[Y-1].equals(W[Y])&&(W.splice(Y,1),Y--);if(W.length===1)return W[0];for(;W.length>1;){const Y=W[W.length-1];if(Y.type!==9)break;W.pop();const re=W.pop(),me=W.length===0,ge=n.create(Y.expr.map(Oe=>h.create([Oe,re],null)),null,me);ge&&(W.push(ge),W.sort(e))}return W.length===1?W[0]:new h(W,P)}serialize(){return this.expr.map(T=>T.serialize()).join(" && ")}keys(){const T=[];for(let P of this.expr)T.push(...P.keys());return T}negate(){if(!this.negated){const T=[];for(let P of this.expr)T.push(P.negate());this.negated=n.create(T,this,!0)}return this.negated}}class n{constructor(T,P){this.expr=T,this.negated=P,this.type=9}static create(T,P,W){return n._normalizeArr(T,P,W)}cmp(T){if(T.type!==this.type)return this.type-T.type;if(this.expr.length<T.expr.length)return-1;if(this.expr.length>T.expr.length)return 1;for(let P=0,W=this.expr.length;P<W;P++){const U=e(this.expr[P],T.expr[P]);if(U!==0)return U}return 0}equals(T){if(T.type===this.type){if(this.expr.length!==T.expr.length)return!1;for(let P=0,W=this.expr.length;P<W;P++)if(!this.expr[P].equals(T.expr[P]))return!1;return!0}return!1}substituteConstants(){const T=C(this.expr);return T===this.expr?this:n.create(T,this.negated,!1)}evaluate(T){for(let P=0,W=this.expr.length;P<W;P++)if(this.expr[P].evaluate(T))return!0;return!1}static _normalizeArr(T,P,W){let U=[],Y=!1;if(T){for(let re=0,me=T.length;re<me;re++){const ge=T[re];if(!ge)continue;if(ge.type===0){Y=!0;continue}if(ge.type===1)return g.INSTANCE;if(ge.type===9){U=U.concat(ge.expr);continue}U.push(ge)}if(U.length===0&&Y)return R.INSTANCE;U.sort(e)}if(U.length===0)return;if(U.length===1)return U[0];for(let re=1;re<U.length;re++)U[re-1].equals(U[re])&&(U.splice(re,1),re--);if(U.length===1)return U[0];if(W){for(let re=0;re<U.length;re++)for(let me=re+1;me<U.length;me++)L(U[re],U[me])&&(U.splice(me,1),me--);if(U.length===1)return U[0]}return new n(U,P)}serialize(){return this.expr.map(T=>T.serialize()).join(" || ")}keys(){const T=[];for(let P of this.expr)T.push(...P.keys());return T}negate(){if(!this.negated){let T=[];for(let P of this.expr)T.push(P.negate());for(;T.length>1;){const P=T.shift(),W=T.shift(),U=[];for(const re of N(P))for(const me of N(W))U.push(h.create([re,me],null));const Y=T.length===0;T.unshift(n.create(U,null,Y))}this.negated=T[0]}return this.negated}}class l extends v{constructor(T,P,W){super(T,null);this._defaultValue=P,typeof W=="object"?l._info.push(Object.assign(Object.assign({},W),{key:T})):W!==!0&&l._info.push({key:T,description:W,type:P!=null?typeof P:void 0})}static all(){return l._info.values()}bindTo(T){return T.createKey(this.key,this._defaultValue)}getValue(T){return T.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(T){return u.create(this.key,T)}}l._info=[];const d=Object(D.c)("contextKeyService"),b="setContext";function m(T,P){return T<P?-1:T>P?1:0}function c(T,P,W,U){return T<W?-1:T>W?1:P<U?-1:P>U?1:0}function L(T,P){if(P.type===6&&T.type!==9&&T.type!==6){for(const Y of P.expr)if(T.equals(Y))return!0}const W=T.negate(),U=N(W).concat(N(P));U.sort(e);for(let Y=0;Y<U.length;Y++){const re=U[Y],me=re.negate();for(let ge=Y+1;ge<U.length;ge++){const Oe=U[ge];if(me.equals(Oe))return!0}}return!1}function N(T){return T.type===9?T.expr:[T]}},TXwP:function(ct,_e,j){var se,G;(function(){var D;(function(){"use strict";var F=[,,function(e){function R(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=[]}R.prototype.clone_empty=function(){var u=new R(this.__parent);return u.set_indent(this.__indent_count,this.__alignment_count),u},R.prototype.item=function(u){return u<0?this.__items[this.__items.length+u]:this.__items[u]},R.prototype.has_match=function(u){for(var s=this.__items.length-1;s>=0;s--)if(this.__items[s].match(u))return!0;return!1},R.prototype.set_indent=function(u,s){this.is_empty()&&(this.__indent_count=u||0,this.__alignment_count=s||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},R.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)},R.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},R.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},R.prototype.is_empty=function(){return this.__items.length===0},R.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},R.prototype.push=function(u){this.__items.push(u);var s=u.lastIndexOf(`
|
|
`);s!==-1?this.__character_count=u.length-s:this.__character_count+=u.length},R.prototype.pop=function(){var u=null;return this.is_empty()||(u=this.__items.pop(),this.__character_count-=u.length),u},R.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},R.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},R.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},R.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 g(u,s){this.__cache=[""],this.__indent_size=u.indent_size,this.__indent_string=u.indent_char,u.indent_with_tabs||(this.__indent_string=new Array(u.indent_size+1).join(u.indent_char)),s=s||"",u.indent_level>0&&(s=new Array(u.indent_level+1).join(this.__indent_string)),this.__base_string=s,this.__base_string_length=s.length}g.prototype.get_indent_size=function(u,s){var i=this.__base_string_length;return s=s||0,u<0&&(i=0),i+=u*this.__indent_size,i+=s,i},g.prototype.get_indent_string=function(u,s){var i=this.__base_string;return s=s||0,u<0&&(u=0,i=""),s+=u*this.__indent_size,this.__ensure_cache(s),i+=this.__cache[s],i},g.prototype.__ensure_cache=function(u){for(;u>=this.__cache.length;)this.__add_column()},g.prototype.__add_column=function(){var u=this.__cache.length,s=0,i="";this.__indent_size&&u>=this.__indent_size&&(s=Math.floor(u/this.__indent_size),u-=s*this.__indent_size,i=new Array(s+1).join(this.__indent_string)),u&&(i+=new Array(u+1).join(" ")),this.__cache.push(i)};function v(u,s){this.__indent_cache=new g(u,s),this.raw=!1,this._end_with_newline=u.end_with_newline,this.indent_size=u.indent_size,this.wrap_line_length=u.wrap_line_length,this.indent_empty_lines=u.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new R(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}v.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},v.prototype.get_line_number=function(){return this.__lines.length},v.prototype.get_indent_string=function(u,s){return this.__indent_cache.get_indent_string(u,s)},v.prototype.get_indent_size=function(u,s){return this.__indent_cache.get_indent_size(u,s)},v.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},v.prototype.add_new_line=function(u){return this.is_empty()||!u&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},v.prototype.get_code=function(u){this.trim(!0);var s=this.current_line.pop();s&&(s[s.length-1]===`
|
|
`&&(s=s.replace(/\n+$/g,"")),this.current_line.push(s)),this._end_with_newline&&this.__add_outputline();var i=this.__lines.join(`
|
|
`);return u!==`
|
|
`&&(i=i.replace(/[\n]/g,u)),i},v.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},v.prototype.set_indent=function(u,s){return u=u||0,s=s||0,this.next_line.set_indent(u,s),this.__lines.length>1?(this.current_line.set_indent(u,s),!0):(this.current_line.set_indent(),!1)},v.prototype.add_raw_token=function(u){for(var s=0;s<u.newlines;s++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(u.whitespace_before),this.current_line.push(u.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},v.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()},v.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(" "))},v.prototype.remove_indent=function(u){for(var s=this.__lines.length;u<s;)this.__lines[u]._remove_indent(),u++;this.current_line._remove_wrap_indent()},v.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},v.prototype.just_added_newline=function(){return this.current_line.is_empty()},v.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},v.prototype.ensure_empty_line_above=function(u,s){for(var i=this.__lines.length-2;i>=0;){var A=this.__lines[i];if(A.is_empty())break;if(A.item(0).indexOf(u)!==0&&A.item(-1)!==s){this.__lines.splice(i+1,0,new R(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},e.exports.Output=v},,,,function(e){function R(u,s){this.raw_options=g(u,s),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}R.prototype._get_array=function(u,s){var i=this.raw_options[u],A=s||[];return typeof i=="object"?i!==null&&typeof i.concat=="function"&&(A=i.concat()):typeof i=="string"&&(A=i.split(/[^a-zA-Z0-9_\/\-]+/)),A},R.prototype._get_boolean=function(u,s){var i=this.raw_options[u],A=i===void 0?!!s:!!i;return A},R.prototype._get_characters=function(u,s){var i=this.raw_options[u],A=s||"";return typeof i=="string"&&(A=i.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),A},R.prototype._get_number=function(u,s){var i=this.raw_options[u];s=parseInt(s,10),isNaN(s)&&(s=0);var A=parseInt(i,10);return isNaN(A)&&(A=s),A},R.prototype._get_selection=function(u,s,i){var A=this._get_selection_list(u,s,i);if(A.length!==1)throw new Error("Invalid Option Value: The option '"+u+`' can only be one of the following values:
|
|
`+s+`
|
|
You passed in: '`+this.raw_options[u]+"'");return A[0]},R.prototype._get_selection_list=function(u,s,i){if(!s||s.length===0)throw new Error("Selection list cannot be empty.");if(i=i||[s[0]],!this._is_valid_selection(i,s))throw new Error("Invalid Default Value!");var A=this._get_array(u,i);if(!this._is_valid_selection(A,s))throw new Error("Invalid Option Value: The option '"+u+`' can contain only the following values:
|
|
`+s+`
|
|
You passed in: '`+this.raw_options[u]+"'");return A},R.prototype._is_valid_selection=function(u,s){return u.length&&s.length&&!u.some(function(i){return s.indexOf(i)===-1})};function g(u,s){var i={};u=v(u);var A;for(A in u)A!==s&&(i[A]=u[A]);if(s&&u[s])for(A in u[s])i[A]=u[s][A];return i}function v(u){var s={},i;for(i in u){var A=i.replace(/-/g,"_");s[A]=u[i]}return s}e.exports.Options=R,e.exports.normalizeOpts=v,e.exports.mergeOpts=g},,function(e){var R=RegExp.prototype.hasOwnProperty("sticky");function g(v){this.__input=v||"",this.__input_length=this.__input.length,this.__position=0}g.prototype.restart=function(){this.__position=0},g.prototype.back=function(){this.__position>0&&(this.__position-=1)},g.prototype.hasNext=function(){return this.__position<this.__input_length},g.prototype.next=function(){var v=null;return this.hasNext()&&(v=this.__input.charAt(this.__position),this.__position+=1),v},g.prototype.peek=function(v){var u=null;return v=v||0,v+=this.__position,v>=0&&v<this.__input_length&&(u=this.__input.charAt(v)),u},g.prototype.__match=function(v,u){v.lastIndex=u;var s=v.exec(this.__input);return s&&!(R&&v.sticky)&&(s.index!==u&&(s=null)),s},g.prototype.test=function(v,u){return u=u||0,u+=this.__position,u>=0&&u<this.__input_length?!!this.__match(v,u):!1},g.prototype.testChar=function(v,u){var s=this.peek(u);return v.lastIndex=0,s!==null&&v.test(s)},g.prototype.match=function(v){var u=this.__match(v,this.__position);return u?this.__position+=u[0].length:u=null,u},g.prototype.read=function(v,u,s){var i="",A;return v&&(A=this.match(v),A&&(i+=A[0])),u&&(A||!v)&&(i+=this.readUntil(u,s)),i},g.prototype.readUntil=function(v,u){var s="",i=this.__position;v.lastIndex=this.__position;var A=v.exec(this.__input);return A?(i=A.index,u&&(i+=A[0].length)):i=this.__input_length,s=this.__input.substring(this.__position,i),this.__position=i,s},g.prototype.readUntilAfter=function(v){return this.readUntil(v,!0)},g.prototype.get_regexp=function(v,u){var s=null,i="g";return u&&R&&(i="y"),typeof v=="string"&&v!==""?s=new RegExp(v,i):v&&(s=new RegExp(v.source,i)),s},g.prototype.get_literal_regexp=function(v){return RegExp(v.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},g.prototype.peekUntilAfter=function(v){var u=this.__position,s=this.readUntilAfter(v);return this.__position=u,s},g.prototype.lookBack=function(v){var u=this.__position-1;return u>=v.length&&this.__input.substring(u-v.length,u).toLowerCase()===v},e.exports.InputScanner=g},,,,,function(e){function R(g,v){g=typeof g=="string"?g:g.source,v=typeof v=="string"?v:v.source,this.__directives_block_pattern=new RegExp(g+/ beautify( \w+[:]\w+)+ /.source+v,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(g+/\sbeautify\signore:end\s/.source+v,"g")}R.prototype.get_directives=function(g){if(!g.match(this.__directives_block_pattern))return null;var v={};this.__directive_pattern.lastIndex=0;for(var u=this.__directive_pattern.exec(g);u;)v[u[1]]=u[2],u=this.__directive_pattern.exec(g);return v},R.prototype.readIgnored=function(g){return g.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=R},,function(e,R,g){var v=g(16).Beautifier,u=g(17).Options;function s(i,A){var o=new v(i,A);return o.beautify()}e.exports=s,e.exports.defaultOptions=function(){return new u}},function(e,R,g){var v=g(17).Options,u=g(2).Output,s=g(8).InputScanner,i=g(13).Directives,A=new i(/\/\*/,/\*\//),o=/\r\n|[\r\n]/,a=/\r\n|[\r\n]/g,r=/\s/,t=/(?:\s|\n)+/g,y=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,_=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function E(B,C){this._source_text=B||"",this._options=new v(C),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"]}E.prototype.eatString=function(B){var C="";for(this._ch=this._input.next();this._ch;){if(C+=this._ch,this._ch==="\\")C+=this._input.next();else if(B.indexOf(this._ch)!==-1||this._ch===`
|
|
`)break;this._ch=this._input.next()}return C},E.prototype.eatWhitespace=function(B){for(var C=r.test(this._input.peek()),h=0;r.test(this._input.peek());)this._ch=this._input.next(),B&&this._ch===`
|
|
`&&((h===0||h<this._options.max_preserve_newlines)&&(h++,this._output.add_new_line(!0)));return C},E.prototype.foundNestedPseudoClass=function(){for(var B=0,C=1,h=this._input.peek(C);h;){if(h==="{")return!0;if(h==="(")B+=1;else if(h===")"){if(B===0)return!1;B-=1}else if(h===";"||h==="}")return!1;C++,h=this._input.peek(C)}return!1},E.prototype.print_string=function(B){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(B)},E.prototype.preserveSingleSpace=function(B){B&&(this._output.space_before_token=!0)},E.prototype.indent=function(){this._indentLevel++},E.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},E.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var B=this._source_text,C=this._options.eol;C==="auto"&&(C=`
|
|
`,B&&o.test(B||"")&&(C=B.match(o)[0])),B=B.replace(a,`
|
|
`);var h=B.match(/^[\t ]*/)[0];this._output=new u(this._options,h),this._input=new s(B),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var n=0,l=!1,d=!1,b=!1,m=!1,c=!1,L=!1,N=this._ch,T=!1,P,W,U;P=this._input.read(t),W=P!=="",U=N,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),N=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var Y=this._input.read(y),re=A.get_directives(Y);re&&re.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(_)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(W),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"?m=!0:me==="import"&&(c=!0),me in this.NESTED_AT_RULE?(this._nestedLevel+=1,me in this.CONDITIONAL_GROUP_RULE&&(b=!0)):!l&&n===0&&me.indexOf(":")!==-1&&(d=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(W),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")d&&(d=!1,this.outdent()),b?(b=!1,l=this._indentLevel>=this._nestedLevel):l=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&l&&(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)):(U==="("?this._output.space_before_token=!1:U!==","&&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(),U==="{"&&this._output.trim(!0),c=!1,m=!1,d&&(this.outdent(),d=!1),this.print_string(this._ch),l=!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 ge=0;ge<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;ge++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[ge])){T=!0;break}(l||b)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!m&&n===0?(this.print_string(":"),d||(d=!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=U==='"'||U==="'";this.preserveSingleSpace(Oe||W),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")T=!1,n===0?(d&&(this.outdent(),d=!1),m=!1,c=!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(),n++,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(")")),n&&(n--,this.outdent()));else{var Se=!1;this._input.lookBack("with")&&(Se=!0),this.preserveSingleSpace(W||Se),this.print_string(this._ch),d&&U==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),L=!0):(this.eatWhitespace(),n++,this.indent())}else if(this._ch===")")n&&(n--,this.outdent()),L&&this._input.peek()===";"&&this._options.selector_separator_newline&&(L=!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&&(!d||L)&&n===0&&!c&&!m?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!d&&n===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&&r.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(W),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),r.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 Be=U==='"'||U==="'";this.preserveSingleSpace(Be||W),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
`&&T&&this._output.add_new_line()}var Ne=this._output.get_code(C);return Ne},e.exports.Beautifier=E},function(e,R,g){var v=g(6).Options;function u(s){v.call(this,s,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var i=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||i;var A=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var o=0;o<A.length;o++)A[o]!=="expand"?this.brace_style="collapse":this.brace_style=A[o]}u.prototype=new v,e.exports.Options=u}],O={};function X(e){var R=O[e];if(R!==void 0)return R.exports;var g=O[e]={exports:{}};return F[e](g,g.exports,X),g.exports}var M=X(15);D=M})();var V=D;!(se=[],G=function(){return{css_beautify:V}}.apply(_e,se),G!==void 0&&(ct.exports=G))})()},Vhoy:function(ct,_e,j){"use strict";j.d(_e,"d",function(){return V}),j.d(_e,"e",function(){return F}),j.d(_e,"c",function(){return O}),j.d(_e,"b",function(){return X}),j.d(_e,"a",function(){return M});var se=j("MI8n");class G{constructor(){this._icons=new Map,this._onDidRegister=new se.b}add(e){const R=this._icons.get(e.id);R?e.description?R.description=e.description:console.error(`Duplicate registration of codicon ${e.id}`):(this._icons.set(e.id,e),this._onDidRegister.fire(e))}get(e){return this._icons.get(e)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const D=new G,V=D;function F(e,R){return new X(e,R)}function O(e){return e?e.replace(/\$\((.*?)\)/g,(R,g)=>` ${g} `).trim():""}class X{constructor(e,R,g){this.id=e,this.definition=R,this.description=g,D.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var M;(function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9\\-]+",e.iconModifierExpression="~[A-Za-z]+";const R=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function g(s){if(s instanceof X)return["codicon","codicon-"+s.id];const i=R.exec(s.id);if(!i)return g(X.error);let[,A,o]=i;const a=["codicon","codicon-"+A];return o&&a.push("codicon-modifier-"+o.substr(1)),a}e.asClassNameArray=g;function v(s){return g(s).join(" ")}e.asClassName=v;function u(s){return"."+g(s).join(".")}e.asCSSSelector=u})(M||(M={})),function(e){e.add=new e("add",{fontCharacter:"\\ea60"}),e.plus=new e("plus",e.add.definition),e.gistNew=new e("gist-new",e.add.definition),e.repoCreate=new e("repo-create",e.add.definition),e.lightbulb=new e("lightbulb",{fontCharacter:"\\ea61"}),e.lightBulb=new e("light-bulb",{fontCharacter:"\\ea61"}),e.repo=new e("repo",{fontCharacter:"\\ea62"}),e.repoDelete=new e("repo-delete",{fontCharacter:"\\ea62"}),e.gistFork=new e("gist-fork",{fontCharacter:"\\ea63"}),e.repoForked=new e("repo-forked",{fontCharacter:"\\ea63"}),e.gitPullRequest=new e("git-pull-request",{fontCharacter:"\\ea64"}),e.gitPullRequestAbandoned=new e("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),e.recordKeys=new e("record-keys",{fontCharacter:"\\ea65"}),e.keyboard=new e("keyboard",{fontCharacter:"\\ea65"}),e.tag=new e("tag",{fontCharacter:"\\ea66"}),e.tagAdd=new e("tag-add",{fontCharacter:"\\ea66"}),e.tagRemove=new e("tag-remove",{fontCharacter:"\\ea66"}),e.person=new e("person",{fontCharacter:"\\ea67"}),e.personFollow=new e("person-follow",{fontCharacter:"\\ea67"}),e.personOutline=new e("person-outline",{fontCharacter:"\\ea67"}),e.personFilled=new e("person-filled",{fontCharacter:"\\ea67"}),e.gitBranch=new e("git-branch",{fontCharacter:"\\ea68"}),e.gitBranchCreate=new e("git-branch-create",{fontCharacter:"\\ea68"}),e.gitBranchDelete=new e("git-branch-delete",{fontCharacter:"\\ea68"}),e.sourceControl=new e("source-control",{fontCharacter:"\\ea68"}),e.mirror=new e("mirror",{fontCharacter:"\\ea69"}),e.mirrorPublic=new e("mirror-public",{fontCharacter:"\\ea69"}),e.star=new e("star",{fontCharacter:"\\ea6a"}),e.starAdd=new e("star-add",{fontCharacter:"\\ea6a"}),e.starDelete=new e("star-delete",{fontCharacter:"\\ea6a"}),e.starEmpty=new e("star-empty",{fontCharacter:"\\ea6a"}),e.comment=new e("comment",{fontCharacter:"\\ea6b"}),e.commentAdd=new e("comment-add",{fontCharacter:"\\ea6b"}),e.alert=new e("alert",{fontCharacter:"\\ea6c"}),e.warning=new e("warning",{fontCharacter:"\\ea6c"}),e.search=new e("search",{fontCharacter:"\\ea6d"}),e.searchSave=new e("search-save",{fontCharacter:"\\ea6d"}),e.logOut=new e("log-out",{fontCharacter:"\\ea6e"}),e.signOut=new e("sign-out",{fontCharacter:"\\ea6e"}),e.logIn=new e("log-in",{fontCharacter:"\\ea6f"}),e.signIn=new e("sign-in",{fontCharacter:"\\ea6f"}),e.eye=new e("eye",{fontCharacter:"\\ea70"}),e.eyeUnwatch=new e("eye-unwatch",{fontCharacter:"\\ea70"}),e.eyeWatch=new e("eye-watch",{fontCharacter:"\\ea70"}),e.circleFilled=new e("circle-filled",{fontCharacter:"\\ea71"}),e.primitiveDot=new e("primitive-dot",{fontCharacter:"\\ea71"}),e.closeDirty=new e("close-dirty",{fontCharacter:"\\ea71"}),e.debugBreakpoint=new e("debug-breakpoint",{fontCharacter:"\\ea71"}),e.debugBreakpointDisabled=new e("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),e.debugHint=new e("debug-hint",{fontCharacter:"\\ea71"}),e.primitiveSquare=new e("primitive-square",{fontCharacter:"\\ea72"}),e.edit=new e("edit",{fontCharacter:"\\ea73"}),e.pencil=new e("pencil",{fontCharacter:"\\ea73"}),e.info=new e("info",{fontCharacter:"\\ea74"}),e.issueOpened=new e("issue-opened",{fontCharacter:"\\ea74"}),e.gistPrivate=new e("gist-private",{fontCharacter:"\\ea75"}),e.gitForkPrivate=new e("git-fork-private",{fontCharacter:"\\ea75"}),e.lock=new e("lock",{fontCharacter:"\\ea75"}),e.mirrorPrivate=new e("mirror-private",{fontCharacter:"\\ea75"}),e.close=new e("close",{fontCharacter:"\\ea76"}),e.removeClose=new e("remove-close",{fontCharacter:"\\ea76"}),e.x=new e("x",{fontCharacter:"\\ea76"}),e.repoSync=new e("repo-sync",{fontCharacter:"\\ea77"}),e.sync=new e("sync",{fontCharacter:"\\ea77"}),e.clone=new e("clone",{fontCharacter:"\\ea78"}),e.desktopDownload=new e("desktop-download",{fontCharacter:"\\ea78"}),e.beaker=new e("beaker",{fontCharacter:"\\ea79"}),e.microscope=new e("microscope",{fontCharacter:"\\ea79"}),e.vm=new e("vm",{fontCharacter:"\\ea7a"}),e.deviceDesktop=new e("device-desktop",{fontCharacter:"\\ea7a"}),e.file=new e("file",{fontCharacter:"\\ea7b"}),e.fileText=new e("file-text",{fontCharacter:"\\ea7b"}),e.more=new e("more",{fontCharacter:"\\ea7c"}),e.ellipsis=new e("ellipsis",{fontCharacter:"\\ea7c"}),e.kebabHorizontal=new e("kebab-horizontal",{fontCharacter:"\\ea7c"}),e.mailReply=new e("mail-reply",{fontCharacter:"\\ea7d"}),e.reply=new e("reply",{fontCharacter:"\\ea7d"}),e.organization=new e("organization",{fontCharacter:"\\ea7e"}),e.organizationFilled=new e("organization-filled",{fontCharacter:"\\ea7e"}),e.organizationOutline=new e("organization-outline",{fontCharacter:"\\ea7e"}),e.newFile=new e("new-file",{fontCharacter:"\\ea7f"}),e.fileAdd=new e("file-add",{fontCharacter:"\\ea7f"}),e.newFolder=new e("new-folder",{fontCharacter:"\\ea80"}),e.fileDirectoryCreate=new e("file-directory-create",{fontCharacter:"\\ea80"}),e.trash=new e("trash",{fontCharacter:"\\ea81"}),e.trashcan=new e("trashcan",{fontCharacter:"\\ea81"}),e.history=new e("history",{fontCharacter:"\\ea82"}),e.clock=new e("clock",{fontCharacter:"\\ea82"}),e.folder=new e("folder",{fontCharacter:"\\ea83"}),e.fileDirectory=new e("file-directory",{fontCharacter:"\\ea83"}),e.symbolFolder=new e("symbol-folder",{fontCharacter:"\\ea83"}),e.logoGithub=new e("logo-github",{fontCharacter:"\\ea84"}),e.markGithub=new e("mark-github",{fontCharacter:"\\ea84"}),e.github=new e("github",{fontCharacter:"\\ea84"}),e.terminal=new e("terminal",{fontCharacter:"\\ea85"}),e.console=new e("console",{fontCharacter:"\\ea85"}),e.repl=new e("repl",{fontCharacter:"\\ea85"}),e.zap=new e("zap",{fontCharacter:"\\ea86"}),e.symbolEvent=new e("symbol-event",{fontCharacter:"\\ea86"}),e.error=new e("error",{fontCharacter:"\\ea87"}),e.stop=new e("stop",{fontCharacter:"\\ea87"}),e.variable=new e("variable",{fontCharacter:"\\ea88"}),e.symbolVariable=new e("symbol-variable",{fontCharacter:"\\ea88"}),e.array=new e("array",{fontCharacter:"\\ea8a"}),e.symbolArray=new e("symbol-array",{fontCharacter:"\\ea8a"}),e.symbolModule=new e("symbol-module",{fontCharacter:"\\ea8b"}),e.symbolPackage=new e("symbol-package",{fontCharacter:"\\ea8b"}),e.symbolNamespace=new e("symbol-namespace",{fontCharacter:"\\ea8b"}),e.symbolObject=new e("symbol-object",{fontCharacter:"\\ea8b"}),e.symbolMethod=new e("symbol-method",{fontCharacter:"\\ea8c"}),e.symbolFunction=new e("symbol-function",{fontCharacter:"\\ea8c"}),e.symbolConstructor=new e("symbol-constructor",{fontCharacter:"\\ea8c"}),e.symbolBoolean=new e("symbol-boolean",{fontCharacter:"\\ea8f"}),e.symbolNull=new e("symbol-null",{fontCharacter:"\\ea8f"}),e.symbolNumeric=new e("symbol-numeric",{fontCharacter:"\\ea90"}),e.symbolNumber=new e("symbol-number",{fontCharacter:"\\ea90"}),e.symbolStructure=new e("symbol-structure",{fontCharacter:"\\ea91"}),e.symbolStruct=new e("symbol-struct",{fontCharacter:"\\ea91"}),e.symbolParameter=new e("symbol-parameter",{fontCharacter:"\\ea92"}),e.symbolTypeParameter=new e("symbol-type-parameter",{fontCharacter:"\\ea92"}),e.symbolKey=new e("symbol-key",{fontCharacter:"\\ea93"}),e.symbolText=new e("symbol-text",{fontCharacter:"\\ea93"}),e.symbolReference=new e("symbol-reference",{fontCharacter:"\\ea94"}),e.goToFile=new e("go-to-file",{fontCharacter:"\\ea94"}),e.symbolEnum=new e("symbol-enum",{fontCharacter:"\\ea95"}),e.symbolValue=new e("symbol-value",{fontCharacter:"\\ea95"}),e.symbolRuler=new e("symbol-ruler",{fontCharacter:"\\ea96"}),e.symbolUnit=new e("symbol-unit",{fontCharacter:"\\ea96"}),e.activateBreakpoints=new e("activate-breakpoints",{fontCharacter:"\\ea97"}),e.archive=new e("archive",{fontCharacter:"\\ea98"}),e.arrowBoth=new e("arrow-both",{fontCharacter:"\\ea99"}),e.arrowDown=new e("arrow-down",{fontCharacter:"\\ea9a"}),e.arrowLeft=new e("arrow-left",{fontCharacter:"\\ea9b"}),e.arrowRight=new e("arrow-right",{fontCharacter:"\\ea9c"}),e.arrowSmallDown=new e("arrow-small-down",{fontCharacter:"\\ea9d"}),e.arrowSmallLeft=new e("arrow-small-left",{fontCharacter:"\\ea9e"}),e.arrowSmallRight=new e("arrow-small-right",{fontCharacter:"\\ea9f"}),e.arrowSmallUp=new e("arrow-small-up",{fontCharacter:"\\eaa0"}),e.arrowUp=new e("arrow-up",{fontCharacter:"\\eaa1"}),e.bell=new e("bell",{fontCharacter:"\\eaa2"}),e.bold=new e("bold",{fontCharacter:"\\eaa3"}),e.book=new e("book",{fontCharacter:"\\eaa4"}),e.bookmark=new e("bookmark",{fontCharacter:"\\eaa5"}),e.debugBreakpointConditionalUnverified=new e("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),e.debugBreakpointConditional=new e("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),e.debugBreakpointConditionalDisabled=new e("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),e.debugBreakpointDataUnverified=new e("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),e.debugBreakpointData=new e("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),e.debugBreakpointDataDisabled=new e("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),e.debugBreakpointLogUnverified=new e("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),e.debugBreakpointLog=new e("debug-breakpoint-log",{fontCharacter:"\\eaab"}),e.debugBreakpointLogDisabled=new e("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),e.briefcase=new e("briefcase",{fontCharacter:"\\eaac"}),e.broadcast=new e("broadcast",{fontCharacter:"\\eaad"}),e.browser=new e("browser",{fontCharacter:"\\eaae"}),e.bug=new e("bug",{fontCharacter:"\\eaaf"}),e.calendar=new e("calendar",{fontCharacter:"\\eab0"}),e.caseSensitive=new e("case-sensitive",{fontCharacter:"\\eab1"}),e.check=new e("check",{fontCharacter:"\\eab2"}),e.checklist=new e("checklist",{fontCharacter:"\\eab3"}),e.chevronDown=new e("chevron-down",{fontCharacter:"\\eab4"}),e.dropDownButton=new e("drop-down-button",e.chevronDown.definition),e.chevronLeft=new e("chevron-left",{fontCharacter:"\\eab5"}),e.chevronRight=new e("chevron-right",{fontCharacter:"\\eab6"}),e.chevronUp=new e("chevron-up",{fontCharacter:"\\eab7"}),e.chromeClose=new e("chrome-close",{fontCharacter:"\\eab8"}),e.chromeMaximize=new e("chrome-maximize",{fontCharacter:"\\eab9"}),e.chromeMinimize=new e("chrome-minimize",{fontCharacter:"\\eaba"}),e.chromeRestore=new e("chrome-restore",{fontCharacter:"\\eabb"}),e.circleOutline=new e("circle-outline",{fontCharacter:"\\eabc"}),e.debugBreakpointUnverified=new e("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),e.circleSlash=new e("circle-slash",{fontCharacter:"\\eabd"}),e.circuitBoard=new e("circuit-board",{fontCharacter:"\\eabe"}),e.clearAll=new e("clear-all",{fontCharacter:"\\eabf"}),e.clippy=new e("clippy",{fontCharacter:"\\eac0"}),e.closeAll=new e("close-all",{fontCharacter:"\\eac1"}),e.cloudDownload=new e("cloud-download",{fontCharacter:"\\eac2"}),e.cloudUpload=new e("cloud-upload",{fontCharacter:"\\eac3"}),e.code=new e("code",{fontCharacter:"\\eac4"}),e.collapseAll=new e("collapse-all",{fontCharacter:"\\eac5"}),e.colorMode=new e("color-mode",{fontCharacter:"\\eac6"}),e.commentDiscussion=new e("comment-discussion",{fontCharacter:"\\eac7"}),e.compareChanges=new e("compare-changes",{fontCharacter:"\\eafd"}),e.creditCard=new e("credit-card",{fontCharacter:"\\eac9"}),e.dash=new e("dash",{fontCharacter:"\\eacc"}),e.dashboard=new e("dashboard",{fontCharacter:"\\eacd"}),e.database=new e("database",{fontCharacter:"\\eace"}),e.debugContinue=new e("debug-continue",{fontCharacter:"\\eacf"}),e.debugDisconnect=new e("debug-disconnect",{fontCharacter:"\\ead0"}),e.debugPause=new e("debug-pause",{fontCharacter:"\\ead1"}),e.debugRestart=new e("debug-restart",{fontCharacter:"\\ead2"}),e.debugStart=new e("debug-start",{fontCharacter:"\\ead3"}),e.debugStepInto=new e("debug-step-into",{fontCharacter:"\\ead4"}),e.debugStepOut=new e("debug-step-out",{fontCharacter:"\\ead5"}),e.debugStepOver=new e("debug-step-over",{fontCharacter:"\\ead6"}),e.debugStop=new e("debug-stop",{fontCharacter:"\\ead7"}),e.debug=new e("debug",{fontCharacter:"\\ead8"}),e.deviceCameraVideo=new e("device-camera-video",{fontCharacter:"\\ead9"}),e.deviceCamera=new e("device-camera",{fontCharacter:"\\eada"}),e.deviceMobile=new e("device-mobile",{fontCharacter:"\\eadb"}),e.diffAdded=new e("diff-added",{fontCharacter:"\\eadc"}),e.diffIgnored=new e("diff-ignored",{fontCharacter:"\\eadd"}),e.diffModified=new e("diff-modified",{fontCharacter:"\\eade"}),e.diffRemoved=new e("diff-removed",{fontCharacter:"\\eadf"}),e.diffRenamed=new e("diff-renamed",{fontCharacter:"\\eae0"}),e.diff=new e("diff",{fontCharacter:"\\eae1"}),e.discard=new e("discard",{fontCharacter:"\\eae2"}),e.editorLayout=new e("editor-layout",{fontCharacter:"\\eae3"}),e.emptyWindow=new e("empty-window",{fontCharacter:"\\eae4"}),e.exclude=new e("exclude",{fontCharacter:"\\eae5"}),e.extensions=new e("extensions",{fontCharacter:"\\eae6"}),e.eyeClosed=new e("eye-closed",{fontCharacter:"\\eae7"}),e.fileBinary=new e("file-binary",{fontCharacter:"\\eae8"}),e.fileCode=new e("file-code",{fontCharacter:"\\eae9"}),e.fileMedia=new e("file-media",{fontCharacter:"\\eaea"}),e.filePdf=new e("file-pdf",{fontCharacter:"\\eaeb"}),e.fileSubmodule=new e("file-submodule",{fontCharacter:"\\eaec"}),e.fileSymlinkDirectory=new e("file-symlink-directory",{fontCharacter:"\\eaed"}),e.fileSymlinkFile=new e("file-symlink-file",{fontCharacter:"\\eaee"}),e.fileZip=new e("file-zip",{fontCharacter:"\\eaef"}),e.files=new e("files",{fontCharacter:"\\eaf0"}),e.filter=new e("filter",{fontCharacter:"\\eaf1"}),e.flame=new e("flame",{fontCharacter:"\\eaf2"}),e.foldDown=new e("fold-down",{fontCharacter:"\\eaf3"}),e.foldUp=new e("fold-up",{fontCharacter:"\\eaf4"}),e.fold=new e("fold",{fontCharacter:"\\eaf5"}),e.folderActive=new e("folder-active",{fontCharacter:"\\eaf6"}),e.folderOpened=new e("folder-opened",{fontCharacter:"\\eaf7"}),e.gear=new e("gear",{fontCharacter:"\\eaf8"}),e.gift=new e("gift",{fontCharacter:"\\eaf9"}),e.gistSecret=new e("gist-secret",{fontCharacter:"\\eafa"}),e.gist=new e("gist",{fontCharacter:"\\eafb"}),e.gitCommit=new e("git-commit",{fontCharacter:"\\eafc"}),e.gitCompare=new e("git-compare",{fontCharacter:"\\eafd"}),e.gitMerge=new e("git-merge",{fontCharacter:"\\eafe"}),e.githubAction=new e("github-action",{fontCharacter:"\\eaff"}),e.githubAlt=new e("github-alt",{fontCharacter:"\\eb00"}),e.globe=new e("globe",{fontCharacter:"\\eb01"}),e.grabber=new e("grabber",{fontCharacter:"\\eb02"}),e.graph=new e("graph",{fontCharacter:"\\eb03"}),e.gripper=new e("gripper",{fontCharacter:"\\eb04"}),e.heart=new e("heart",{fontCharacter:"\\eb05"}),e.home=new e("home",{fontCharacter:"\\eb06"}),e.horizontalRule=new e("horizontal-rule",{fontCharacter:"\\eb07"}),e.hubot=new e("hubot",{fontCharacter:"\\eb08"}),e.inbox=new e("inbox",{fontCharacter:"\\eb09"}),e.issueClosed=new e("issue-closed",{fontCharacter:"\\eba4"}),e.issueReopened=new e("issue-reopened",{fontCharacter:"\\eb0b"}),e.issues=new e("issues",{fontCharacter:"\\eb0c"}),e.italic=new e("italic",{fontCharacter:"\\eb0d"}),e.jersey=new e("jersey",{fontCharacter:"\\eb0e"}),e.json=new e("json",{fontCharacter:"\\eb0f"}),e.kebabVertical=new e("kebab-vertical",{fontCharacter:"\\eb10"}),e.key=new e("key",{fontCharacter:"\\eb11"}),e.law=new e("law",{fontCharacter:"\\eb12"}),e.lightbulbAutofix=new e("lightbulb-autofix",{fontCharacter:"\\eb13"}),e.linkExternal=new e("link-external",{fontCharacter:"\\eb14"}),e.link=new e("link",{fontCharacter:"\\eb15"}),e.listOrdered=new e("list-ordered",{fontCharacter:"\\eb16"}),e.listUnordered=new e("list-unordered",{fontCharacter:"\\eb17"}),e.liveShare=new e("live-share",{fontCharacter:"\\eb18"}),e.loading=new e("loading",{fontCharacter:"\\eb19"}),e.location=new e("location",{fontCharacter:"\\eb1a"}),e.mailRead=new e("mail-read",{fontCharacter:"\\eb1b"}),e.mail=new e("mail",{fontCharacter:"\\eb1c"}),e.markdown=new e("markdown",{fontCharacter:"\\eb1d"}),e.megaphone=new e("megaphone",{fontCharacter:"\\eb1e"}),e.mention=new e("mention",{fontCharacter:"\\eb1f"}),e.milestone=new e("milestone",{fontCharacter:"\\eb20"}),e.mortarBoard=new e("mortar-board",{fontCharacter:"\\eb21"}),e.move=new e("move",{fontCharacter:"\\eb22"}),e.multipleWindows=new e("multiple-windows",{fontCharacter:"\\eb23"}),e.mute=new e("mute",{fontCharacter:"\\eb24"}),e.noNewline=new e("no-newline",{fontCharacter:"\\eb25"}),e.note=new e("note",{fontCharacter:"\\eb26"}),e.octoface=new e("octoface",{fontCharacter:"\\eb27"}),e.openPreview=new e("open-preview",{fontCharacter:"\\eb28"}),e.package_=new e("package",{fontCharacter:"\\eb29"}),e.paintcan=new e("paintcan",{fontCharacter:"\\eb2a"}),e.pin=new e("pin",{fontCharacter:"\\eb2b"}),e.play=new e("play",{fontCharacter:"\\eb2c"}),e.run=new e("run",{fontCharacter:"\\eb2c"}),e.plug=new e("plug",{fontCharacter:"\\eb2d"}),e.preserveCase=new e("preserve-case",{fontCharacter:"\\eb2e"}),e.preview=new e("preview",{fontCharacter:"\\eb2f"}),e.project=new e("project",{fontCharacter:"\\eb30"}),e.pulse=new e("pulse",{fontCharacter:"\\eb31"}),e.question=new e("question",{fontCharacter:"\\eb32"}),e.quote=new e("quote",{fontCharacter:"\\eb33"}),e.radioTower=new e("radio-tower",{fontCharacter:"\\eb34"}),e.reactions=new e("reactions",{fontCharacter:"\\eb35"}),e.references=new e("references",{fontCharacter:"\\eb36"}),e.refresh=new e("refresh",{fontCharacter:"\\eb37"}),e.regex=new e("regex",{fontCharacter:"\\eb38"}),e.remoteExplorer=new e("remote-explorer",{fontCharacter:"\\eb39"}),e.remote=new e("remote",{fontCharacter:"\\eb3a"}),e.remove=new e("remove",{fontCharacter:"\\eb3b"}),e.replaceAll=new e("replace-all",{fontCharacter:"\\eb3c"}),e.replace=new e("replace",{fontCharacter:"\\eb3d"}),e.repoClone=new e("repo-clone",{fontCharacter:"\\eb3e"}),e.repoForcePush=new e("repo-force-push",{fontCharacter:"\\eb3f"}),e.repoPull=new e("repo-pull",{fontCharacter:"\\eb40"}),e.repoPush=new e("repo-push",{fontCharacter:"\\eb41"}),e.report=new e("report",{fontCharacter:"\\eb42"}),e.requestChanges=new e("request-changes",{fontCharacter:"\\eb43"}),e.rocket=new e("rocket",{fontCharacter:"\\eb44"}),e.rootFolderOpened=new e("root-folder-opened",{fontCharacter:"\\eb45"}),e.rootFolder=new e("root-folder",{fontCharacter:"\\eb46"}),e.rss=new e("rss",{fontCharacter:"\\eb47"}),e.ruby=new e("ruby",{fontCharacter:"\\eb48"}),e.saveAll=new e("save-all",{fontCharacter:"\\eb49"}),e.saveAs=new e("save-as",{fontCharacter:"\\eb4a"}),e.save=new e("save",{fontCharacter:"\\eb4b"}),e.screenFull=new e("screen-full",{fontCharacter:"\\eb4c"}),e.screenNormal=new e("screen-normal",{fontCharacter:"\\eb4d"}),e.searchStop=new e("search-stop",{fontCharacter:"\\eb4e"}),e.server=new e("server",{fontCharacter:"\\eb50"}),e.settingsGear=new e("settings-gear",{fontCharacter:"\\eb51"}),e.settings=new e("settings",{fontCharacter:"\\eb52"}),e.shield=new e("shield",{fontCharacter:"\\eb53"}),e.smiley=new e("smiley",{fontCharacter:"\\eb54"}),e.sortPrecedence=new e("sort-precedence",{fontCharacter:"\\eb55"}),e.splitHorizontal=new e("split-horizontal",{fontCharacter:"\\eb56"}),e.splitVertical=new e("split-vertical",{fontCharacter:"\\eb57"}),e.squirrel=new e("squirrel",{fontCharacter:"\\eb58"}),e.starFull=new e("star-full",{fontCharacter:"\\eb59"}),e.starHalf=new e("star-half",{fontCharacter:"\\eb5a"}),e.symbolClass=new e("symbol-class",{fontCharacter:"\\eb5b"}),e.symbolColor=new e("symbol-color",{fontCharacter:"\\eb5c"}),e.symbolConstant=new e("symbol-constant",{fontCharacter:"\\eb5d"}),e.symbolEnumMember=new e("symbol-enum-member",{fontCharacter:"\\eb5e"}),e.symbolField=new e("symbol-field",{fontCharacter:"\\eb5f"}),e.symbolFile=new e("symbol-file",{fontCharacter:"\\eb60"}),e.symbolInterface=new e("symbol-interface",{fontCharacter:"\\eb61"}),e.symbolKeyword=new e("symbol-keyword",{fontCharacter:"\\eb62"}),e.symbolMisc=new e("symbol-misc",{fontCharacter:"\\eb63"}),e.symbolOperator=new e("symbol-operator",{fontCharacter:"\\eb64"}),e.symbolProperty=new e("symbol-property",{fontCharacter:"\\eb65"}),e.wrench=new e("wrench",{fontCharacter:"\\eb65"}),e.wrenchSubaction=new e("wrench-subaction",{fontCharacter:"\\eb65"}),e.symbolSnippet=new e("symbol-snippet",{fontCharacter:"\\eb66"}),e.tasklist=new e("tasklist",{fontCharacter:"\\eb67"}),e.telescope=new e("telescope",{fontCharacter:"\\eb68"}),e.textSize=new e("text-size",{fontCharacter:"\\eb69"}),e.threeBars=new e("three-bars",{fontCharacter:"\\eb6a"}),e.thumbsdown=new e("thumbsdown",{fontCharacter:"\\eb6b"}),e.thumbsup=new e("thumbsup",{fontCharacter:"\\eb6c"}),e.tools=new e("tools",{fontCharacter:"\\eb6d"}),e.triangleDown=new e("triangle-down",{fontCharacter:"\\eb6e"}),e.triangleLeft=new e("triangle-left",{fontCharacter:"\\eb6f"}),e.triangleRight=new e("triangle-right",{fontCharacter:"\\eb70"}),e.triangleUp=new e("triangle-up",{fontCharacter:"\\eb71"}),e.twitter=new e("twitter",{fontCharacter:"\\eb72"}),e.unfold=new e("unfold",{fontCharacter:"\\eb73"}),e.unlock=new e("unlock",{fontCharacter:"\\eb74"}),e.unmute=new e("unmute",{fontCharacter:"\\eb75"}),e.unverified=new e("unverified",{fontCharacter:"\\eb76"}),e.verified=new e("verified",{fontCharacter:"\\eb77"}),e.versions=new e("versions",{fontCharacter:"\\eb78"}),e.vmActive=new e("vm-active",{fontCharacter:"\\eb79"}),e.vmOutline=new e("vm-outline",{fontCharacter:"\\eb7a"}),e.vmRunning=new e("vm-running",{fontCharacter:"\\eb7b"}),e.watch=new e("watch",{fontCharacter:"\\eb7c"}),e.whitespace=new e("whitespace",{fontCharacter:"\\eb7d"}),e.wholeWord=new e("whole-word",{fontCharacter:"\\eb7e"}),e.window=new e("window",{fontCharacter:"\\eb7f"}),e.wordWrap=new e("word-wrap",{fontCharacter:"\\eb80"}),e.zoomIn=new e("zoom-in",{fontCharacter:"\\eb81"}),e.zoomOut=new e("zoom-out",{fontCharacter:"\\eb82"}),e.listFilter=new e("list-filter",{fontCharacter:"\\eb83"}),e.listFlat=new e("list-flat",{fontCharacter:"\\eb84"}),e.listSelection=new e("list-selection",{fontCharacter:"\\eb85"}),e.selection=new e("selection",{fontCharacter:"\\eb85"}),e.listTree=new e("list-tree",{fontCharacter:"\\eb86"}),e.debugBreakpointFunctionUnverified=new e("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),e.debugBreakpointFunction=new e("debug-breakpoint-function",{fontCharacter:"\\eb88"}),e.debugBreakpointFunctionDisabled=new e("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),e.debugStackframeActive=new e("debug-stackframe-active",{fontCharacter:"\\eb89"}),e.debugStackframeDot=new e("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),e.debugStackframe=new e("debug-stackframe",{fontCharacter:"\\eb8b"}),e.debugStackframeFocused=new e("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),e.debugBreakpointUnsupported=new e("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),e.symbolString=new e("symbol-string",{fontCharacter:"\\eb8d"}),e.debugReverseContinue=new e("debug-reverse-continue",{fontCharacter:"\\eb8e"}),e.debugStepBack=new e("debug-step-back",{fontCharacter:"\\eb8f"}),e.debugRestartFrame=new e("debug-restart-frame",{fontCharacter:"\\eb90"}),e.callIncoming=new e("call-incoming",{fontCharacter:"\\eb92"}),e.callOutgoing=new e("call-outgoing",{fontCharacter:"\\eb93"}),e.menu=new e("menu",{fontCharacter:"\\eb94"}),e.expandAll=new e("expand-all",{fontCharacter:"\\eb95"}),e.feedback=new e("feedback",{fontCharacter:"\\eb96"}),e.groupByRefType=new e("group-by-ref-type",{fontCharacter:"\\eb97"}),e.ungroupByRefType=new e("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),e.account=new e("account",{fontCharacter:"\\eb99"}),e.bellDot=new e("bell-dot",{fontCharacter:"\\eb9a"}),e.debugConsole=new e("debug-console",{fontCharacter:"\\eb9b"}),e.library=new e("library",{fontCharacter:"\\eb9c"}),e.output=new e("output",{fontCharacter:"\\eb9d"}),e.runAll=new e("run-all",{fontCharacter:"\\eb9e"}),e.syncIgnored=new e("sync-ignored",{fontCharacter:"\\eb9f"}),e.pinned=new e("pinned",{fontCharacter:"\\eba0"}),e.githubInverted=new e("github-inverted",{fontCharacter:"\\eba1"}),e.debugAlt=new e("debug-alt",{fontCharacter:"\\eb91"}),e.serverProcess=new e("server-process",{fontCharacter:"\\eba2"}),e.serverEnvironment=new e("server-environment",{fontCharacter:"\\eba3"}),e.pass=new e("pass",{fontCharacter:"\\eba4"}),e.stopCircle=new e("stop-circle",{fontCharacter:"\\eba5"}),e.playCircle=new e("play-circle",{fontCharacter:"\\eba6"}),e.record=new e("record",{fontCharacter:"\\eba7"}),e.debugAltSmall=new e("debug-alt-small",{fontCharacter:"\\eba8"}),e.vmConnect=new e("vm-connect",{fontCharacter:"\\eba9"}),e.cloud=new e("cloud",{fontCharacter:"\\ebaa"}),e.merge=new e("merge",{fontCharacter:"\\ebab"}),e.exportIcon=new e("export",{fontCharacter:"\\ebac"}),e.graphLeft=new e("graph-left",{fontCharacter:"\\ebad"}),e.magnet=new e("magnet",{fontCharacter:"\\ebae"}),e.notebook=new e("notebook",{fontCharacter:"\\ebaf"}),e.redo=new e("redo",{fontCharacter:"\\ebb0"}),e.checkAll=new e("check-all",{fontCharacter:"\\ebb1"}),e.pinnedDirty=new e("pinned-dirty",{fontCharacter:"\\ebb2"}),e.passFilled=new e("pass-filled",{fontCharacter:"\\ebb3"}),e.circleLargeFilled=new e("circle-large-filled",{fontCharacter:"\\ebb4"}),e.circleLargeOutline=new e("circle-large-outline",{fontCharacter:"\\ebb5"}),e.combine=new e("combine",{fontCharacter:"\\ebb6"}),e.gather=new e("gather",{fontCharacter:"\\ebb6"}),e.table=new e("table",{fontCharacter:"\\ebb7"}),e.variableGroup=new e("variable-group",{fontCharacter:"\\ebb8"}),e.typeHierarchy=new e("type-hierarchy",{fontCharacter:"\\ebb9"}),e.typeHierarchySub=new e("type-hierarchy-sub",{fontCharacter:"\\ebba"}),e.typeHierarchySuper=new e("type-hierarchy-super",{fontCharacter:"\\ebbb"}),e.gitPullRequestCreate=new e("git-pull-request-create",{fontCharacter:"\\ebbc"}),e.runAbove=new e("run-above",{fontCharacter:"\\ebbd"}),e.runBelow=new e("run-below",{fontCharacter:"\\ebbe"}),e.notebookTemplate=new e("notebook-template",{fontCharacter:"\\ebbf"}),e.debugRerun=new e("debug-rerun",{fontCharacter:"\\ebc0"}),e.workspaceTrusted=new e("workspace-trusted",{fontCharacter:"\\ebc1"}),e.workspaceUntrusted=new e("workspace-untrusted",{fontCharacter:"\\ebc2"}),e.workspaceUnspecified=new e("workspace-unspecified",{fontCharacter:"\\ebc3"}),e.terminalCmd=new e("terminal-cmd",{fontCharacter:"\\ebc4"}),e.terminalDebian=new e("terminal-debian",{fontCharacter:"\\ebc5"}),e.terminalLinux=new e("terminal-linux",{fontCharacter:"\\ebc6"}),e.terminalPowershell=new e("terminal-powershell",{fontCharacter:"\\ebc7"}),e.terminalTmux=new e("terminal-tmux",{fontCharacter:"\\ebc8"}),e.terminalUbuntu=new e("terminal-ubuntu",{fontCharacter:"\\ebc9"}),e.terminalBash=new e("terminal-bash",{fontCharacter:"\\ebca"}),e.arrowSwap=new e("arrow-swap",{fontCharacter:"\\ebcb"}),e.copy=new e("copy",{fontCharacter:"\\ebcc"}),e.personAdd=new e("person-add",{fontCharacter:"\\ebcd"}),e.filterFilled=new e("filter-filled",{fontCharacter:"\\ebce"}),e.wand=new e("wand",{fontCharacter:"\\ebcf"}),e.debugLineByLine=new e("debug-line-by-line",{fontCharacter:"\\ebd0"}),e.inspect=new e("inspect",{fontCharacter:"\\ebd1"}),e.layers=new e("layers",{fontCharacter:"\\ebd2"}),e.layersDot=new e("layers-dot",{fontCharacter:"\\ebd3"}),e.layersActive=new e("layers-active",{fontCharacter:"\\ebd4"}),e.compass=new e("compass",{fontCharacter:"\\ebd5"}),e.compassDot=new e("compass-dot",{fontCharacter:"\\ebd6"}),e.compassActive=new e("compass-active",{fontCharacter:"\\ebd7"}),e.azure=new e("azure",{fontCharacter:"\\ebd8"}),e.issueDraft=new e("issue-draft",{fontCharacter:"\\ebd9"}),e.gitPullRequestClosed=new e("git-pull-request-closed",{fontCharacter:"\\ebda"}),e.gitPullRequestDraft=new e("git-pull-request-draft",{fontCharacter:"\\ebdb"}),e.debugAll=new e("debug-all",{fontCharacter:"\\ebdc"}),e.debugCoverage=new e("debug-coverage",{fontCharacter:"\\ebdd"}),e.runErrors=new e("run-errors",{fontCharacter:"\\ebde"}),e.folderLibrary=new e("folder-library",{fontCharacter:"\\ebdf"}),e.debugContinueSmall=new e("debug-continue-small",{fontCharacter:"\\ebe0"}),e.beakerStop=new e("beaker-stop",{fontCharacter:"\\ebe1"}),e.graphLine=new e("graph-line",{fontCharacter:"\\ebe2"}),e.graphScatter=new e("graph-scatter",{fontCharacter:"\\ebe3"}),e.pieChart=new e("pie-chart",{fontCharacter:"\\ebe4"}),e.bracket=new e("bracket",e.json.definition),e.bracketDot=new e("bracket-dot",{fontCharacter:"\\ebe5"}),e.bracketError=new e("bracket-error",{fontCharacter:"\\ebe6"}),e.lockSmall=new e("lock-small",{fontCharacter:"\\ebe7"}),e.azureDevops=new e("azure-devops",{fontCharacter:"\\ebe8"}),e.verifiedFilled=new e("verified-filled",{fontCharacter:"\\ebe9"})}(X||(X={}))},WaYH:function(ct,_e,j){"use strict";var se=j("rePB"),G=j("Ff2n"),D=j("VTBJ"),V=j("1OyB"),F=j("vuIU"),O=j("JX7q"),X=j("Ji7U"),M=j("LK+K"),e=j("q1tI"),R=j("TSYQ"),g=j.n(R),v=j("sboe"),u=j("OZM5"),s=function(B){var C=B.prefixCls,h=B.level,n=B.isStart,l=B.isEnd;if(!h)return null;for(var d="".concat(C,"-indent-unit"),b=[],m=0;m<h;m+=1){var c;b.push(e.createElement("span",{key:m,className:g()(d,(c={},Object(se.a)(c,"".concat(d,"-start"),n[m+1]),Object(se.a)(c,"".concat(d,"-end"),l[m+1]),Object(se.a)(c,"".concat(d,"-end-first-level"),!m&&l[0]),c))}))}return e.createElement("span",{"aria-hidden":"true",className:"".concat(C,"-indent")},b)},i=s,A=j("815F"),o="open",a="close",r="---",t=function(E){Object(X.a)(C,E);var B=Object(M.a)(C);function C(){var h;return Object(V.a)(this,C),h=B.apply(this,arguments),h.state={dragNodeHighlight:!1},h.onSelectorClick=function(n){var l=h.props.context.onNodeClick;l(n,Object(A.b)(h.props)),h.isSelectable()?h.onSelect(n):h.onCheck(n)},h.onSelectorDoubleClick=function(n){var l=h.props.context.onNodeDoubleClick;l(n,Object(A.b)(h.props))},h.onSelect=function(n){if(h.isDisabled())return;var l=h.props.context.onNodeSelect;n.preventDefault(),l(n,Object(A.b)(h.props))},h.onCheck=function(n){if(h.isDisabled())return;var l=h.props,d=l.disableCheckbox,b=l.checked,m=h.props.context.onNodeCheck;if(!h.isCheckable()||d)return;n.preventDefault();var c=!b;m(n,Object(A.b)(h.props),c)},h.onMouseEnter=function(n){var l=h.props.context.onNodeMouseEnter;l(n,Object(A.b)(h.props))},h.onMouseLeave=function(n){var l=h.props.context.onNodeMouseLeave;l(n,Object(A.b)(h.props))},h.onContextMenu=function(n){var l=h.props.context.onNodeContextMenu;l(n,Object(A.b)(h.props))},h.onDragStart=function(n){var l=h.props.context.onNodeDragStart;n.stopPropagation(),h.setState({dragNodeHighlight:!0}),l(n,Object(O.a)(h));try{n.dataTransfer.setData("text/plain","")}catch(d){}},h.onDragEnter=function(n){var l=h.props.context.onNodeDragEnter;n.preventDefault(),n.stopPropagation(),l(n,Object(O.a)(h))},h.onDragOver=function(n){var l=h.props.context.onNodeDragOver;n.preventDefault(),n.stopPropagation(),l(n,Object(O.a)(h))},h.onDragLeave=function(n){var l=h.props.context.onNodeDragLeave;n.stopPropagation(),l(n,Object(O.a)(h))},h.onDragEnd=function(n){var l=h.props.context.onNodeDragEnd;n.stopPropagation(),h.setState({dragNodeHighlight:!1}),l(n,Object(O.a)(h))},h.onDrop=function(n){var l=h.props.context.onNodeDrop;n.preventDefault(),n.stopPropagation(),h.setState({dragNodeHighlight:!1}),l(n,Object(O.a)(h))},h.onExpand=function(n){var l=h.props.context.onNodeExpand;l(n,Object(A.b)(h.props))},h.setSelectHandle=function(n){h.selectHandle=n},h.getNodeState=function(){var n=h.props.expanded;return h.isLeaf()?null:n?o:a},h.hasChildren=function(){var n=h.props.eventKey,l=h.props.context.keyEntities,d=l[n]||{},b=d.children;return!!(b||[]).length},h.isLeaf=function(){var n=h.props,l=n.isLeaf,d=n.loaded,b=h.props.context.loadData,m=h.hasChildren();return l===!1?!1:l||!b&&!m||b&&d&&!m},h.isDisabled=function(){var n=h.props.disabled,l=h.props.context.disabled;return!!(l||n)},h.isCheckable=function(){var n=h.props.checkable,l=h.props.context.checkable;return!l||n===!1?!1:l},h.syncLoadData=function(n){var l=n.expanded,d=n.loading,b=n.loaded,m=h.props.context,c=m.loadData,L=m.onNodeLoad;if(d)return;c&&l&&!h.isLeaf()&&(!h.hasChildren()&&!b&&L(Object(A.b)(h.props)))},h.renderSwitcher=function(){var n=h.props,l=n.expanded,d=n.switcherIcon,b=h.props.context,m=b.prefixCls,c=b.switcherIcon,L=d||c;if(h.isLeaf())return e.createElement("span",{className:g()("".concat(m,"-switcher"),"".concat(m,"-switcher-noop"))},typeof L=="function"?L(Object(D.a)(Object(D.a)({},h.props),{},{isLeaf:!0})):L);var N=g()("".concat(m,"-switcher"),"".concat(m,"-switcher_").concat(l?o:a));return e.createElement("span",{onClick:h.onExpand,className:N},typeof L=="function"?L(Object(D.a)(Object(D.a)({},h.props),{},{isLeaf:!1})):L)},h.renderCheckbox=function(){var n=h.props,l=n.checked,d=n.halfChecked,b=n.disableCheckbox,m=h.props.context.prefixCls,c=h.isDisabled(),L=h.isCheckable();if(!L)return null;var N=typeof L!="boolean"?L:null;return e.createElement("span",{className:g()("".concat(m,"-checkbox"),l&&"".concat(m,"-checkbox-checked"),!l&&d&&"".concat(m,"-checkbox-indeterminate"),(c||b)&&"".concat(m,"-checkbox-disabled")),onClick:h.onCheck},N)},h.renderIcon=function(){var n=h.props.loading,l=h.props.context.prefixCls;return e.createElement("span",{className:g()("".concat(l,"-iconEle"),"".concat(l,"-icon__").concat(h.getNodeState()||"docu"),n&&"".concat(l,"-icon_loading"))})},h.renderSelector=function(){var n=h.state.dragNodeHighlight,l=h.props,d=l.title,b=l.selected,m=l.icon,c=l.loading,L=l.data,N=h.props.context,T=N.prefixCls,P=N.showIcon,W=N.icon,U=N.draggable,Y=N.loadData,re=N.titleRender,me=h.isDisabled(),ge="".concat(T,"-node-content-wrapper"),Oe;if(P){var Se=m||W;Oe=Se?e.createElement("span",{className:g()("".concat(T,"-iconEle"),"".concat(T,"-icon__customize"))},typeof Se=="function"?Se(h.props):Se):h.renderIcon()}else Y&&c&&(Oe=h.renderIcon());var Be;typeof d=="function"?Be=d(L):re?Be=re(L):Be=d;var Ne=e.createElement("span",{className:"".concat(T,"-title")},Be);return e.createElement("span",{ref:h.setSelectHandle,title:typeof d=="string"?d:"",className:g()("".concat(ge),"".concat(ge,"-").concat(h.getNodeState()||"normal"),!me&&(b||n)&&"".concat(T,"-node-selected"),!me&&U&&"draggable"),draggable:!me&&U||void 0,"aria-grabbed":!me&&U||void 0,onMouseEnter:h.onMouseEnter,onMouseLeave:h.onMouseLeave,onContextMenu:h.onContextMenu,onClick:h.onSelectorClick,onDoubleClick:h.onSelectorDoubleClick,onDragStart:U?h.onDragStart:void 0},Oe,Ne)},h}return Object(F.a)(C,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var n=this.props.selectable,l=this.props.context.selectable;return typeof n=="boolean"?n:l}},{key:"render",value:function(){var n,l=this.props,d=l.eventKey,b=l.className,m=l.style,c=l.dragOver,L=l.dragOverGapTop,N=l.dragOverGapBottom,T=l.isLeaf,P=l.isStart,W=l.isEnd,U=l.expanded,Y=l.selected,re=l.checked,me=l.halfChecked,ge=l.loading,Oe=l.domRef,Se=l.active,Be=l.onMouseMove,Ne=Object(G.a)(l,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),ke=this.props.context,Ce=ke.prefixCls,ve=ke.filterTreeNode,Ye=ke.draggable,ht=ke.keyEntities,at=this.isDisabled(),We=Object(u.f)(Ne),it=ht[d]||{},ne=it.level,J=W[W.length-1];return e.createElement("div",Object.assign({ref:Oe,className:g()(b,"".concat(Ce,"-treenode"),(n={},Object(se.a)(n,"".concat(Ce,"-treenode-disabled"),at),Object(se.a)(n,"".concat(Ce,"-treenode-switcher-").concat(U?"open":"close"),!T),Object(se.a)(n,"".concat(Ce,"-treenode-checkbox-checked"),re),Object(se.a)(n,"".concat(Ce,"-treenode-checkbox-indeterminate"),me),Object(se.a)(n,"".concat(Ce,"-treenode-selected"),Y),Object(se.a)(n,"".concat(Ce,"-treenode-loading"),ge),Object(se.a)(n,"".concat(Ce,"-treenode-active"),Se),Object(se.a)(n,"".concat(Ce,"-treenode-leaf-last"),J),Object(se.a)(n,"drag-over",!at&&c),Object(se.a)(n,"drag-over-gap-top",!at&&L),Object(se.a)(n,"drag-over-gap-bottom",!at&&N),Object(se.a)(n,"filter-node",ve&&ve(Object(A.b)(this.props))),n)),style:m,onDragEnter:Ye?this.onDragEnter:void 0,onDragOver:Ye?this.onDragOver:void 0,onDragLeave:Ye?this.onDragLeave:void 0,onDrop:Ye?this.onDrop:void 0,onDragEnd:Ye?this.onDragEnd:void 0,onMouseMove:Be},We),e.createElement(i,{prefixCls:Ce,level:ne,isStart:P,isEnd:W}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),C}(e.Component),y=function(B){return e.createElement(v.a.Consumer,null,function(C){return e.createElement(t,Object.assign({},B,{context:C}))})};y.displayName="TreeNode",y.defaultProps={title:r},y.isTreeNode=1;var _=_e.a=y},Y1PL:function(ct,_e,j){"use strict";j.r(_e),j.d(_e,"ResizableTextArea",function(){return me});var se=j("wx14"),G=j("1OyB"),D=j("vuIU"),V=j("Ji7U"),F=j("LK+K"),O=j("q1tI"),X=j("VTBJ"),M=j("rePB"),e=j("Zm9Q"),R=j("Kwbf"),g=j("c+Xe"),v=j("m+aA"),u=j("bdgK"),s=new Map;function i(Se){Se.forEach(function(Be){var Ne,ke=Be.target;(Ne=s.get(ke))===null||Ne===void 0||Ne.forEach(function(Ce){return Ce(ke)})})}var A=new u.default(i),o=null,a=null;function r(Se,Be){s.has(Se)||(s.set(Se,new Set),A.observe(Se)),s.get(Se).add(Be)}function t(Se,Be){s.has(Se)&&(s.get(Se).delete(Be),s.get(Se).size||(A.unobserve(Se),s.delete(Se)))}var y=function(Se){Object(V.a)(Ne,Se);var Be=Object(F.a)(Ne);function Ne(){return Object(G.a)(this,Ne),Be.apply(this,arguments)}return Object(D.a)(Ne,[{key:"render",value:function(){return this.props.children}}]),Ne}(O.Component),_=O.createContext(null);function E(Se){var Be=Se.children,Ne=Se.onBatchResize,ke=O.useRef(0),Ce=O.useRef([]),ve=O.useContext(_),Ye=O.useCallback(function(ht,at,We){ke.current+=1;var it=ke.current;Ce.current.push({size:ht,element:at,data:We}),Promise.resolve().then(function(){it===ke.current&&(Ne==null||Ne(Ce.current),Ce.current=[])}),ve==null||ve(ht,at,We)},[Ne,ve]);return O.createElement(_.Provider,{value:Ye},Be)}function B(Se){var Be=Se.children,Ne=Se.disabled,ke=O.useRef(null),Ce=O.useRef(null),ve=O.useContext(_),Ye=O.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),ht=O.isValidElement(Be)&&Object(g.c)(Be),at=ht?Be.ref:null,We=O.useMemo(function(){return Object(g.a)(at,ke)},[at,ke]),it=O.useRef(Se);it.current=Se;var ne=O.useCallback(function(J){var k=it.current,$=k.onResize,q=k.data,he=J.getBoundingClientRect(),pe=he.width,Ke=he.height,Je=J.offsetWidth,ze=J.offsetHeight,Ze=Math.floor(pe),nt=Math.floor(Ke);if(Ye.current.width!==Ze||Ye.current.height!==nt||Ye.current.offsetWidth!==Je||Ye.current.offsetHeight!==ze){var pt={width:Ze,height:nt,offsetWidth:Je,offsetHeight:ze};Ye.current=pt;var xe=Je===Math.round(pe)?pe:Je,Ue=ze===Math.round(Ke)?Ke:ze,Qe=Object(X.a)(Object(X.a)({},pt),{},{offsetWidth:xe,offsetHeight:Ue});ve==null||ve(Qe,J,q),$&&Promise.resolve().then(function(){$(Qe,J)})}},[]);return O.useEffect(function(){var J=Object(v.a)(ke.current)||Object(v.a)(Ce.current);return J&&!Ne&&r(J,ne),function(){return t(J,ne)}},[ke.current,Ne]),O.createElement(y,{ref:Ce},ht?O.cloneElement(Be,{ref:We}):Be)}var C="rc-observer-key";function h(Se){var Be=Se.children,Ne=Object(e.a)(Be);return Ne.map(function(ke,Ce){var ve=(ke==null?void 0:ke.key)||"".concat(C,"-").concat(Ce);return O.createElement(B,Object(se.a)({},Se,{key:ve}),ke)})}h.Collection=E;var n=h,l=j("bT9E"),d=j("TSYQ"),b=j.n(d),m=`
|
|
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
|
|
`,c=["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"],L={},N;function T(Se){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ne=Se.getAttribute("id")||Se.getAttribute("data-reactid")||Se.getAttribute("name");if(Be&&L[Ne])return L[Ne];var ke=window.getComputedStyle(Se),Ce=ke.getPropertyValue("box-sizing")||ke.getPropertyValue("-moz-box-sizing")||ke.getPropertyValue("-webkit-box-sizing"),ve=parseFloat(ke.getPropertyValue("padding-bottom"))+parseFloat(ke.getPropertyValue("padding-top")),Ye=parseFloat(ke.getPropertyValue("border-bottom-width"))+parseFloat(ke.getPropertyValue("border-top-width")),ht=c.map(function(We){return"".concat(We,":").concat(ke.getPropertyValue(We))}).join(";"),at={sizingStyle:ht,paddingSize:ve,borderSize:Ye,boxSizing:Ce};return Be&&Ne&&(L[Ne]=at),at}function P(Se){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ke=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;N||(N=document.createElement("textarea"),N.setAttribute("tab-index","-1"),N.setAttribute("aria-hidden","true"),document.body.appendChild(N)),Se.getAttribute("wrap")?N.setAttribute("wrap",Se.getAttribute("wrap")):N.removeAttribute("wrap");var Ce=T(Se,Be),ve=Ce.paddingSize,Ye=Ce.borderSize,ht=Ce.boxSizing,at=Ce.sizingStyle;N.setAttribute("style","".concat(at,";").concat(m)),N.value=Se.value||Se.placeholder||"";var We=Number.MIN_SAFE_INTEGER,it=Number.MAX_SAFE_INTEGER,ne=N.scrollHeight,J;if(ht==="border-box"?ne+=Ye:ht==="content-box"&&(ne-=ve),Ne!==null||ke!==null){N.value=" ";var k=N.scrollHeight-ve;Ne!==null&&(We=k*Ne,ht==="border-box"&&(We=We+ve+Ye),ne=Math.max(We,ne)),ke!==null&&(it=k*ke,ht==="border-box"&&(it=it+ve+Ye),J=ne>it?"":"hidden",ne=Math.min(it,ne))}return{height:ne,minHeight:We,maxHeight:it,overflowY:J,resize:"none"}}var W=j("Gytx"),U=j.n(W),Y;(function(Se){Se[Se.NONE=0]="NONE",Se[Se.RESIZING=1]="RESIZING",Se[Se.RESIZED=2]="RESIZED"})(Y||(Y={}));var re=function(Se){Object(V.a)(Ne,Se);var Be=Object(F.a)(Ne);function Ne(ke){var Ce;return Object(G.a)(this,Ne),Ce=Be.call(this,ke),Ce.nextFrameActionId=void 0,Ce.resizeFrameId=void 0,Ce.textArea=void 0,Ce.saveTextArea=function(ve){Ce.textArea=ve},Ce.handleResize=function(ve){var Ye=Ce.state.resizeStatus,ht=Ce.props,at=ht.autoSize,We=ht.onResize;if(Ye!==Y.NONE)return;typeof We=="function"&&We(ve),at&&Ce.resizeOnNextFrame()},Ce.resizeOnNextFrame=function(){cancelAnimationFrame(Ce.nextFrameActionId),Ce.nextFrameActionId=requestAnimationFrame(Ce.resizeTextarea)},Ce.resizeTextarea=function(){var ve=Ce.props.autoSize;if(!ve||!Ce.textArea)return;var Ye=ve.minRows,ht=ve.maxRows,at=P(Ce.textArea,!1,Ye,ht);Ce.setState({textareaStyles:at,resizeStatus:Y.RESIZING},function(){cancelAnimationFrame(Ce.resizeFrameId),Ce.resizeFrameId=requestAnimationFrame(function(){Ce.setState({resizeStatus:Y.RESIZED},function(){Ce.resizeFrameId=requestAnimationFrame(function(){Ce.setState({resizeStatus:Y.NONE}),Ce.fixFirefoxAutoScroll()})})})})},Ce.renderTextArea=function(){var ve=Ce.props,Ye=ve.prefixCls,ht=Ye===void 0?"rc-textarea":Ye,at=ve.autoSize,We=ve.onResize,it=ve.className,ne=ve.disabled,J=Ce.state,k=J.textareaStyles,$=J.resizeStatus,q=Object(l.a)(Ce.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),he=b()(ht,it,Object(M.a)({},"".concat(ht,"-disabled"),ne));"value"in q&&(q.value=q.value||"");var pe=Object(X.a)(Object(X.a)(Object(X.a)({},Ce.props.style),k),$===Y.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return O.createElement(n,{onResize:Ce.handleResize,disabled:!(at||We)},O.createElement("textarea",Object(se.a)({},q,{className:he,style:pe,ref:Ce.saveTextArea})))},Ce.state={textareaStyles:{},resizeStatus:Y.NONE},Ce}return Object(D.a)(Ne,[{key:"componentDidUpdate",value:function(Ce){(Ce.value!==this.props.value||!U()(Ce.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 Ce=this.textArea.selectionStart,ve=this.textArea.selectionEnd;this.textArea.setSelectionRange(Ce,ve)}}catch(Ye){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Ne}(O.Component),me=re,ge=function(Se){Object(V.a)(Ne,Se);var Be=Object(F.a)(Ne);function Ne(ke){var Ce;Object(G.a)(this,Ne),Ce=Be.call(this,ke),Ce.resizableTextArea=void 0,Ce.focus=function(){Ce.resizableTextArea.textArea.focus()},Ce.saveTextArea=function(Ye){Ce.resizableTextArea=Ye},Ce.handleChange=function(Ye){var ht=Ce.props.onChange;Ce.setValue(Ye.target.value,function(){Ce.resizableTextArea.resizeTextarea()}),ht&&ht(Ye)},Ce.handleKeyDown=function(Ye){var ht=Ce.props,at=ht.onPressEnter,We=ht.onKeyDown;Ye.keyCode===13&&at&&at(Ye),We&&We(Ye)};var ve=typeof ke.value=="undefined"||ke.value===null?ke.defaultValue:ke.value;return Ce.state={value:ve},Ce}return Object(D.a)(Ne,[{key:"setValue",value:function(Ce,ve){"value"in this.props||this.setState({value:Ce},ve)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return O.createElement(me,Object(se.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(Ce){return"value"in Ce?{value:Ce.value}:null}}]),Ne}(O.Component),Oe=_e.default=ge},ZPm4:function(ct,_e,j){ct.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(ct,_e,j){"use strict";j.d(_e,"a",function(){return W});var se=j("k1fw"),G=j("oBTY"),D=j("miYZ"),V=j("tsqr"),F=j("rAM+"),O=j("tJVT"),X=j("PpiC"),M=j("q1tI"),e=j.n(M),R=j("bdgK"),g=j("9og8"),v=j("WmNS"),u=j.n(v),s={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"]},i={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","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
`)}]},o={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(`
|
|
`)}]},a=j("5VLF"),r=j.n(a),t={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"]}},y=function(Y,re){return re.map(function(me){return{label:me,kind:Y.languages.CompletionItemKind.Keyword,insertText:me}})},_=function(Y){return Object.keys(t.tables).map(function(re){return{label:re,kind:Y.languages.CompletionItemKind.Variable,insertText:re}})},E=function(Y,re){var me=t.tables[Y];return me?me.map(function(ge){return{label:ge,kind:re.languages.CompletionItemKind.Field,insertText:ge}}):[]};function B(U,Y,re,me,ge){var Oe=Y.getWordUntilPosition(re),Se={startLineNumber:re.lineNumber,endLineNumber:re.lineNumber,startColumn:Oe.startColumn,endColumn:Oe.endColumn},Be=me.map(function(Ne){return{label:Ne,kind:U.languages.CompletionItemKind.Keyword,insertText:Ne,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}});return ge.map(function(Ne){Be.push(Object(se.a)(Object(se.a)({},Ne),{},{range:Se}))}),Be}var C=function(U){t.languages.map(function(ge){return U.languages.registerDocumentFormattingEditProvider(ge,{provideDocumentFormattingEdits:function(Se,Be,Ne){return Object(g.a)(u.a.mark(function ke(){var Ce;return u.a.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:return Ce=r()(Se.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}),Ye.abrupt("return",[{range:Se.getFullModelRange(),text:Ce}]);case 2:case"end":return Ye.stop()}},ke)}))()}}),ge});var Y=A.quickKey.map(function(ge){return{label:ge.label,kind:U.languages.CompletionItemKind.Method,insertText:ge.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),re=o.quickKey.map(function(ge){return{label:ge.label,kind:U.languages.CompletionItemKind.Method,insertText:ge.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),me=i.quickKey.map(function(ge){return{label:ge.label,kind:U.languages.CompletionItemKind.Method,insertText:ge.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet}});U.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Oe,Se){var Be=Oe.getWordUntilPosition(Se),Ne={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn},ke=Oe.getLineContent(Se.lineNumber).substring(Be.startColumn-2,Be.endColumn);return{suggestions:[].concat(Object(G.a)(A.keywords.map(function(Ce){return{label:Ce,kind:U.languages.CompletionItemKind.Function,documentation:Ce,insertText:Ce,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ne}})),Object(G.a)(A.quickKey.map(function(Ce){return{label:Ce.label,kind:U.languages.CompletionItemKind.Function,documentation:Ce.content,insertText:ke.startsWith("#")?Ce.content.replace(/#/,""):Ce.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ne}})))}}}),U.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Oe,Se){var Be=Oe.getWordUntilPosition(Se),Ne={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn};return{suggestions:Object(G.a)(s.keywords.map(function(ke){return{label:ke,kind:U.languages.CompletionItemKind.Function,documentation:ke,insertText:ke,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ne}}))}}}),U.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Oe,Se){var Be=Oe.getWordUntilPosition(Se),Ne={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn},ke=Oe.getLineContent(Se.lineNumber).substring(Be.startColumn-2,Be.endColumn);return{suggestions:[].concat(Object(G.a)(i.keywords.map(function(Ce){return{label:Ce,kind:U.languages.CompletionItemKind.Function,documentation:Ce,insertText:Ce,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ne}})),Object(G.a)(i.quickKey.map(function(Ce){return{label:Ce.label,kind:U.languages.CompletionItemKind.Function,documentation:Ce.content,insertText:ke.startsWith("#")?Ce.content.replace(/#/,""):Ce.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ne}})))}}}),U.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Oe,Se){var Be=Oe.getWordUntilPosition(Se),Ne={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn},ke=Oe.getLineContent(Se.lineNumber).substring(Be.startColumn-2,Be.endColumn);return{suggestions:[].concat(Object(G.a)(o.keywords.map(function(Ce){return{label:Ce,kind:U.languages.CompletionItemKind.Function,documentation:Ce,insertText:Ce,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ne}})),Object(G.a)(o.quickKey.map(function(Ce){return{label:Ce.label,kind:U.languages.CompletionItemKind.Function,documentation:Ce.content,insertText:ke.startsWith("#")?Ce.content.replace(/#/,""):Ce.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ne}})))}}})},h="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",n=j("fjLI"),l=j("LvDl"),d=j("+ua5");function b(U){return/^\d+$/.test(U)?"".concat(U,"px"):U}function m(){}var c=!1,L={"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 N(){var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Y=U;if(Array.isArray(U)){for(var re=0;re<U.length;re++){var me=L[U[re]];if(me)return me}return Y[0]}return L[Y]||Y}var T=null,P=_e.b=function(U){var Y=U.width,re=Y===void 0?"100%":Y,me=U.height,ge=me===void 0?"100%":me,Oe=U.value,Se=U.language,Be=Se===void 0?"javascript":Se,Ne=U.style,ke=Ne===void 0?{}:Ne,Ce=U.options,ve=Ce===void 0?{}:Ce,Ye=U.overrideServices,ht=Ye===void 0?{}:Ye,at=U.theme,We=at===void 0?"vs-dark":at,it=U.onEditBlur,ne=U.onSave,J=U.autoHeight,k=J===void 0?!1:J,$=U.forbidCopy,q=$===void 0?!1:$,he=U.onChange,pe=he===void 0?m:he,Ke=U.editorDidMount,Je=Ke===void 0?m:Ke,ze=U.onFocus,Ze=ze===void 0?m:ze,nt=U.filename,pt=nt===void 0?"educoder.txt":nt,xe=U.errorLine,Ue=U.errorContent,Qe=Ue===void 0?"":Ue,je=Object(X.a)(U,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),Le=Object(M.useRef)(),Fe=Object(M.useRef)({}),we=Object(M.useRef)(),ue=Object(M.useRef)(),ce=Object(M.useRef)(!1),te=Object(M.useRef)(),ie=Object(M.useState)(!1),le=Object(O.a)(ie,2),fe=le[0],Ie=le[1];function Pe(){var At;return Le.current&&(At=new R.default(function(gt){var Nt=Object(F.a)(gt),ir;try{for(Nt.s();!(ir=Nt.n()).done;){var yr=ir.value;(yr.target.offsetHeight>0||yr.target.offsetWidth>0)&&Fe.current.instance.layout()}}catch(br){Nt.e(br)}finally{Nt.f()}}),At.observe(Le.current)),At}function qe(){V.b.warn(decodeURIComponent(h))}var dt=function(){var gt=Fe.current.instance;if(Oe!=null&>&&fe){var Nt=gt.getModel();Nt&&Oe!==Nt.getValue()&&(c=!0,Nt.setValue(Oe),gt.layout(),c=!1)}};Object(M.useEffect)(function(){ue.current&&clearTimeout(ue.current),ue.current=setTimeout(function(){dt()},500)},[Oe,fe,Fe.current]),Object(M.useEffect)(function(){if(xe&&Fe.current&&Fe.current.instance){var At=Fe.current.instance;At.changeViewZones(function(Nt){var ir=document.createElement("div");ir.style.padding="10px 20px",ir.style.width="calc(100% - 20px)",ir.className="my-error-line-wrp",ir.innerHTML=Qe,Nt.addZone({afterLineNumber:xe||11,heightInLines:3,domNode:ir})});var gt={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}};At.addOverlayWidget(gt),At.revealPositionInCenter({lineNumber:20,column:1})}},[xe,Fe.current,fe]);function lt(){var At=Fe.current.instance;if(At){var gt=At.getSelection(),Nt=Fe.current.pastePos||{},ir=new T.Range(Nt.startLineNumber||gt.endLineNumber,Nt.startColumn||gt.endColumn,Nt.endLineNumber||gt.endLineNumber,Nt.endColumn||gt.endColumn);setTimeout(function(){At.executeEdits("",[{range:ir,text:""}])},300)}}function st(At){(window.navigator.platform.match("Mac")?At.metaKey:At.ctrlKey)&&At.keyCode==83&&(At.preventDefault(),ne())}var Lt=function(){if(k&&Fe.current.instance){var gt=Fe.current.instance.getContentHeight();ut(gt<ge?ge:gt)}else ut(ge)};function mt(At){var gt=document.createEvent("MouseEvents");gt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),At.dispatchEvent(gt)}function tt(At,gt){var Nt=window.URL||window.webkitURL||window,ir=new Blob([gt]),yr=document.createElementNS("http://www.w3.org/1999/xhtml","a");yr.href=Nt.createObjectURL(ir),yr.download=At,mt(yr)}Object(M.useEffect)(function(){Lt()},[Lt]),Object(M.useEffect)(function(){Le.current&&!fe&&Promise.all([j.e(15),j.e(27)]).then(j.t.bind(null,"M/lh",7)).then(function(At){try{T=At,Fe.current.instance=T.editor.create(Le.current,{value:Oe,language:N(Be),theme:We,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},ht);var gt=Fe.current.instance,Nt=n.d._menuItems,ir=Object(G.a)(Nt).find(function(Ht){return Ht[0]._debugName=="EditorContext"}),yr=ir[1],br=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Rr=function(pr,Lr){var Cr=pr._first;do{var Qr,Ur,ae=Lr.includes((Qr=Cr.element)===null||Qr===void 0||((Ur=Qr.command)===null||Ur===void 0)?void 0:Ur.id);ae&&pr._remove(Cr)}while(Cr=Cr.next)};if(Je(gt,T),setTimeout(function(){Lt(),Fe.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){tt(pt||"educoder.txt",gt.getValue())}}),gt.getDomNode().addEventListener("input",function(){we.current.autoFormat&>.getAction("editor.action.formatDocument").run()})},500),Fe.current.subscription=gt.onDidChangeModelContent(function(Ht){ce.current?clearTimeout(te.current):(Lt(),pe(gt.getValue(),Ht)),te.current=setTimeout(function(){ce.current=!1},500)}),window.Monaco||C(T,N(Be)),q&&(Rr(yr,br),Le.current.classList.add("noCopyPaste"),gt.onKeyDown(function(Ht){var pr=Ht.keyCode,Lr=Ht.ctrlKey,Cr=Ht.metaKey;(pr===33||pr===52)&&(Cr||Lr)&&(qe(),Ht.preventDefault())})),window.Monaco=T,it&>.onDidBlurEditorWidget(function(){it(gt.getValue())}),Ze&>.onDidFocusEditorText(function(){Ze(gt.getValue())}),q){gt.addCommand(T.KeyMod.CtrlCmd|T.KeyCode.KEY_V,function(){return qe(),null}),gt.onDidPaste(function(Ht){Fe.current.pastePos=Ht});try{window.addEventListener("paste",lt)}catch(Ht){}}var Dr=Pe();return Ie(!0),function(){var Ht=Fe.current.instance;Ht.dispose();var pr=Ht.getModel();pr&&pr.dispose(),Fe.current.subscription&&Fe.current.subscription.dispose(),q&&window.removeEventListener("paste",lt),Dr.unobserve(Le.current)}}catch(Ht){}})},[]),Object(M.useEffect)(function(){var At=Fe.current.instance;if(At&&fe)return document.addEventListener("keydown",st,!1),function(){document.removeEventListener("keydown",st)}},[ne,fe]),Object(M.useEffect)(function(){var At=Fe.current.instance;if(At&&fe){var gt=N(Be);T.editor.setModelLanguage(At.getModel(),gt),console.log("language:",Be,At.getModel(),gt)}},[Be,fe]),Object(M.useEffect)(function(){var At=Fe.current.instance;At&&fe&&T.editor.setTheme(We)},[We,fe]),Object(M.useEffect)(function(){var At=Fe.current.instance;we.current=ve,At&&fe&&(At.updateOptions(Object(se.a)({},ve)),setTimeout(function(){At.getModel().updateOptions(Object(se.a)({},ve))},200))},[JSON.stringify(ve),fe]),Object(M.useEffect)(function(){var At=Fe.current.instance;At&&fe&&At.layout()},[re,ge,fe]);var er=Object(M.useState)(b(re)),Jt=Object(O.a)(er,2),Ot=Jt[0],yt=Jt[1],Et=Object(M.useState)(b(ge)),wt=Object(O.a)(Et,2),Mt=wt[0],ut=wt[1],lr=Object(se.a)(Object(se.a)({},ke),{},{width:Ot,height:Mt});return e.a.createElement("div",{className:"my-monaco-editor",ref:Le,style:lr})};function W(U){var Y=U.width,re=Y===void 0?"100%":Y,me=U.height,ge=me===void 0?"100%":me,Oe=U.original,Se=U.modified,Be=U.language,Ne=U.options,ke=Ne===void 0?{}:Ne,Ce=Object(M.useRef)(),ve=Object(M.useState)(null),Ye=Object(O.a)(ve,2),ht=Ye[0],at=Ye[1];function We(k){var $;return Ce.current&&($=new R.default(function(q){var he=Object(F.a)(q),pe;try{for(he.s();!(pe=he.n()).done;){var Ke=pe.value;(Ke.target.offsetHeight>0||Ke.target.offsetWidth>0)&&k.layout()}}catch(Je){he.e(Je)}finally{he.f()}}),$.observe(Ce.current)),$}Object(M.useEffect)(function(){Ce.current&&Promise.all([j.e(15),j.e(27)]).then(j.t.bind(null,"M/lh",7)).then(function(k){T=k;var $=T.editor.createDiffEditor(Ce.current,Object(se.a)(Object(se.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},ke),{},{wordWrap:!0}));at($);var q=We($);return function(){$.dispose();var he=$.getModel();he&&he.dispose(),q.unobserve(Ce.current)}})},[]),Object(M.useEffect)(function(){ht&&ht.setModel({original:T.editor.createModel(Oe,Be),modified:T.editor.createModel(Se,Be)})},[Oe,Se,Be,ht]);var it=b(re),ne=b(ge),J={width:it,height:ne};return e.a.createElement("div",{className:"my-diff-editor",ref:Ce,style:J})}},bT9E:function(ct,_e,j){"use strict";j.d(_e,"a",function(){return G});var se=j("VTBJ");function G(D,V){var F=Object(se.a)({},D);return Array.isArray(V)&&V.forEach(function(O){delete F[O]}),F}},biw7:function(ct,_e,j){"use strict";var se=j("q1tI"),G=j.n(se),D=se.createContext(null);_e.a=D},crp1:function(ct,_e,j){"use strict";j.d(_e,"b",function(){return Ot}),j.d(_e,"a",function(){return Mt});var se={},G=function(ae,oe,de,Te,Ve){var et=se[oe]||(se[oe]=URL.createObjectURL(new Blob([ae],{type:"text/javascript"}))),Q=new Worker(et);return Q.onerror=function(p){return Ve(p.error,null)},Q.onmessage=function(p){return Ve(null,p.data)},Q.postMessage(de,Te),Q},D=Uint8Array,V=Uint16Array,F=Uint32Array,O=new D([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]),X=new D([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]),M=new D([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),e=function(ae,oe){for(var de=new V(31),Te=0;Te<31;++Te)de[Te]=oe+=1<<ae[Te-1];for(var Ve=new F(de[30]),Te=1;Te<30;++Te)for(var et=de[Te];et<de[Te+1];++et)Ve[et]=et-de[Te]<<5|Te;return[de,Ve]},R=e(O,2),g=R[0],v=R[1];g[28]=258,v[258]=28;for(var u=e(X,0),s=u[0],i=u[1],A=new V(32768),o=0;o<32768;++o){var a=(o&43690)>>>1|(o&21845)<<1;a=(a&52428)>>>2|(a&13107)<<2,a=(a&61680)>>>4|(a&3855)<<4,A[o]=((a&65280)>>>8|(a&255)<<8)>>>1}for(var r=function(ae,oe,de){for(var Te=ae.length,Ve=0,et=new V(oe);Ve<Te;++Ve)++et[ae[Ve]-1];var Q=new V(oe);for(Ve=0;Ve<oe;++Ve)Q[Ve]=Q[Ve-1]+et[Ve-1]<<1;var p;if(de){p=new V(1<<oe);var w=15-oe;for(Ve=0;Ve<Te;++Ve)if(ae[Ve])for(var H=Ve<<4|ae[Ve],Z=oe-ae[Ve],K=Q[ae[Ve]-1]++<<Z,ye=K|(1<<Z)-1;K<=ye;++K)p[A[K]>>>w]=H}else for(p=new V(Te),Ve=0;Ve<Te;++Ve)p[Ve]=A[Q[ae[Ve]-1]++]>>>15-ae[Ve];return p},t=new D(288),o=0;o<144;++o)t[o]=8;for(var o=144;o<256;++o)t[o]=9;for(var o=256;o<280;++o)t[o]=7;for(var o=280;o<288;++o)t[o]=8;for(var y=new D(32),o=0;o<32;++o)y[o]=5;var _=r(t,9,0),E=r(t,9,1),B=r(y,5,0),C=r(y,5,1),h=function(ae){for(var oe=ae[0],de=1;de<ae.length;++de)ae[de]>oe&&(oe=ae[de]);return oe},n=function(ae,oe,de){var Te=oe/8>>0;return(ae[Te]|ae[Te+1]<<8)>>>(oe&7)&de},l=function(ae,oe){var de=oe/8>>0;return(ae[de]|ae[de+1]<<8|ae[de+2]<<16)>>>(oe&7)},d=function(ae){return(ae/8>>0)+(ae&7&&1)},b=function(ae,oe,de){(oe==null||oe<0)&&(oe=0),(de==null||de>ae.length)&&(de=ae.length);var Te=new(ae instanceof V?V:ae instanceof F?F:D)(de-oe);return Te.set(ae.subarray(oe,de)),Te},m=function(ae,oe,de){var Te=ae.length,Ve=!oe||de,et=!de||de.i;de||(de={}),oe||(oe=new D(Te*3));var Q=function(Zt){var xr=oe.length;if(Zt>xr){var qt=new D(Math.max(xr*2,Zt));qt.set(oe),oe=qt}},p=de.f||0,w=de.p||0,H=de.b||0,Z=de.l,K=de.d,ye=de.m,He=de.n,rt=Te*8;do{if(!Z){de.f=p=n(ae,w,1);var ot=n(ae,w+1,3);if(w+=3,ot)if(ot==1)Z=E,K=C,ye=9,He=5;else if(ot==2){var Tt=n(ae,w,31)+257,Pt=n(ae,w+10,15)+4,ur=Tt+n(ae,w+5,31)+1;w+=14;for(var Gt=new D(ur),ar=new D(19),kt=0;kt<Pt;++kt)ar[M[kt]]=n(ae,w+kt*3,7);w+=Pt*3;var Tr=h(ar),mr=(1<<Tr)-1;if(!et&&w+ur*(Tr+7)>rt)break;for(var $t=r(ar,Tr,1),kt=0;kt<ur;){var De=$t[n(ae,w,mr)];w+=De&15;var Ge=De>>>4;if(Ge<16)Gt[kt++]=Ge;else{var Qt=0,Vt=0;for(Ge==16?(Vt=3+n(ae,w,3),w+=2,Qt=Gt[kt-1]):Ge==17?(Vt=3+n(ae,w,7),w+=3):Ge==18&&(Vt=11+n(ae,w,127),w+=7);Vt--;)Gt[kt++]=Qt}}var Dt=Gt.subarray(0,Tt),jt=Gt.subarray(Tt);ye=h(Dt),He=h(jt),Z=r(Dt,ye,1),K=r(jt,He,1)}else throw"invalid block type";else{var Ge=d(w)+4,_t=ae[Ge-4]|ae[Ge-3]<<8,vt=Ge+_t;if(vt>Te){if(et)throw"unexpected EOF";break}Ve&&Q(H+_t),oe.set(ae.subarray(Ge,vt),H),de.b=H+=_t,de.p=w=vt*8;continue}if(w>rt)throw"unexpected EOF"}Ve&&Q(H+131072);for(var Kt=(1<<ye)-1,Ar=(1<<He)-1,zt=ye+He+18;et||w+zt<rt;){var Qt=Z[l(ae,w)&Kt],sr=Qt>>>4;if(w+=Qt&15,w>rt)throw"unexpected EOF";if(!Qt)throw"invalid length/literal";if(sr<256)oe[H++]=sr;else if(sr==256){Z=null;break}else{var rr=sr-254;if(sr>264){var kt=sr-257,Ut=O[kt];rr=n(ae,w,(1<<Ut)-1)+g[kt],w+=Ut}var Wt=K[l(ae,w)&Ar],Ft=Wt>>>4;if(!Wt)throw"invalid distance";w+=Wt&15;var jt=s[Ft];if(Ft>3){var Ut=X[Ft];jt+=l(ae,w)&(1<<Ut)-1,w+=Ut}if(w>rt)throw"unexpected EOF";Ve&&Q(H+131072);for(var tr=H+rr;H<tr;H+=4)oe[H]=oe[H-jt],oe[H+1]=oe[H+1-jt],oe[H+2]=oe[H+2-jt],oe[H+3]=oe[H+3-jt];H=tr}}de.l=Z,de.p=w,de.b=H,Z&&(p=1,de.m=ye,de.d=K,de.n=He)}while(!p);return H==oe.length?oe:b(oe,0,H)},c=function(ae,oe,de){de<<=oe&7;var Te=oe/8>>0;ae[Te]|=de,ae[Te+1]|=de>>>8},L=function(ae,oe,de){de<<=oe&7;var Te=oe/8>>0;ae[Te]|=de,ae[Te+1]|=de>>>8,ae[Te+2]|=de>>>16},N=function(ae,oe){for(var de=[],Te=0;Te<ae.length;++Te)ae[Te]&&de.push({s:Te,f:ae[Te]});var Ve=de.length,et=de.slice();if(!Ve)return[new D(0),0];if(Ve==1){var Q=new D(de[0].s+1);return Q[de[0].s]=1,[Q,1]}de.sort(function(ur,Gt){return ur.f-Gt.f}),de.push({s:-1,f:25001});var p=de[0],w=de[1],H=0,Z=1,K=2;for(de[0]={s:-1,f:p.f+w.f,l:p,r:w};Z!=Ve-1;)p=de[de[H].f<de[K].f?H++:K++],w=de[H!=Z&&de[H].f<de[K].f?H++:K++],de[Z++]={s:-1,f:p.f+w.f,l:p,r:w};for(var ye=et[0].s,Te=1;Te<Ve;++Te)et[Te].s>ye&&(ye=et[Te].s);var He=new V(ye+1),rt=T(de[Z-1],He,0);if(rt>oe){var Te=0,ot=0,Ge=rt-oe,_t=1<<Ge;for(et.sort(function(Gt,ar){return He[ar.s]-He[Gt.s]||Gt.f-ar.f});Te<Ve;++Te){var vt=et[Te].s;if(He[vt]>oe)ot+=_t-(1<<rt-He[vt]),He[vt]=oe;else break}for(ot>>>=Ge;ot>0;){var Tt=et[Te].s;He[Tt]<oe?ot-=1<<oe-He[Tt]++-1:++Te}for(;Te>=0&&ot;--Te){var Pt=et[Te].s;He[Pt]==oe&&(--He[Pt],++ot)}rt=oe}return[new D(He),rt]},T=function(ae,oe,de){return ae.s==-1?Math.max(T(ae.l,oe,de+1),T(ae.r,oe,de+1)):oe[ae.s]=de},P=function(ae){for(var oe=ae.length;oe&&!ae[--oe];);for(var de=new V(++oe),Te=0,Ve=ae[0],et=1,Q=function(w){de[Te++]=w},p=1;p<=oe;++p)if(ae[p]==Ve&&p!=oe)++et;else{if(!Ve&&et>2){for(;et>138;et-=138)Q(32754);et>2&&(Q(et>10?et-11<<5|28690:et-3<<5|12305),et=0)}else if(et>3){for(Q(Ve),--et;et>6;et-=6)Q(8304);et>2&&(Q(et-3<<5|8208),et=0)}for(;et--;)Q(Ve);et=1,Ve=ae[p]}return[de.subarray(0,Te),oe]},W=function(ae,oe){for(var de=0,Te=0;Te<oe.length;++Te)de+=ae[Te]*oe[Te];return de},U=function(ae,oe,de){var Te=de.length,Ve=d(oe+2);ae[Ve]=Te&255,ae[Ve+1]=Te>>>8,ae[Ve+2]=ae[Ve]^255,ae[Ve+3]=ae[Ve+1]^255;for(var et=0;et<Te;++et)ae[Ve+et+4]=de[et];return(Ve+4+Te)*8},Y=function(ae,oe,de,Te,Ve,et,Q,p,w,H,Z){c(oe,Z++,de),++Ve[256];for(var K=N(Ve,15),ye=K[0],He=K[1],rt=N(et,15),ot=rt[0],Ge=rt[1],_t=P(ye),vt=_t[0],Tt=_t[1],Pt=P(ot),ur=Pt[0],Gt=Pt[1],ar=new V(19),kt=0;kt<vt.length;++kt)ar[vt[kt]&31]++;for(var kt=0;kt<ur.length;++kt)ar[ur[kt]&31]++;for(var Tr=N(ar,7),mr=Tr[0],$t=Tr[1],De=19;De>4&&!mr[M[De-1]];--De);var Qt=H+5<<3,Vt=W(Ve,t)+W(et,y)+Q,Dt=W(Ve,ye)+W(et,ot)+Q+14+3*De+W(ar,mr)+(2*ar[16]+3*ar[17]+7*ar[18]);if(Qt<=Vt&&Qt<=Dt)return U(oe,Z,ae.subarray(w,w+H));var jt,Kt,Ar,zt;if(c(oe,Z,1+(Dt<Vt)),Z+=2,Dt<Vt){jt=r(ye,He,0),Kt=ye,Ar=r(ot,Ge,0),zt=ot;var sr=r(mr,$t,0);c(oe,Z,Tt-257),c(oe,Z+5,Gt-1),c(oe,Z+10,De-4),Z+=14;for(var kt=0;kt<De;++kt)c(oe,Z+3*kt,mr[M[kt]]);Z+=3*De;for(var rr=[vt,ur],Ut=0;Ut<2;++Ut)for(var Wt=rr[Ut],kt=0;kt<Wt.length;++kt){var Ft=Wt[kt]&31;c(oe,Z,sr[Ft]),Z+=mr[Ft],Ft>15&&(c(oe,Z,Wt[kt]>>>5&127),Z+=Wt[kt]>>>12)}}else jt=_,Kt=t,Ar=B,zt=y;for(var kt=0;kt<p;++kt)if(Te[kt]>255){var Ft=Te[kt]>>>18&31;L(oe,Z,jt[Ft+257]),Z+=Kt[Ft+257],Ft>7&&(c(oe,Z,Te[kt]>>>23&31),Z+=O[Ft]);var tr=Te[kt]&31;L(oe,Z,Ar[tr]),Z+=zt[tr],tr>3&&(L(oe,Z,Te[kt]>>>5&8191),Z+=X[tr])}else L(oe,Z,jt[Te[kt]]),Z+=Kt[Te[kt]];return L(oe,Z,jt[256]),Z+Kt[256]},re=new F([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),me=new D(0),ge=function(ae,oe,de,Te,Ve,et){var Q=ae.length,p=new D(Te+Q+5*(1+Math.floor(Q/7e3))+Ve),w=p.subarray(Te,p.length-Ve),H=0;if(!oe||Q<8)for(var Z=0;Z<=Q;Z+=65535){var K=Z+65535;K<Q?H=U(w,H,ae.subarray(Z,K)):(w[Z]=et,H=U(w,H,ae.subarray(Z,Q)))}else{for(var ye=re[oe-1],He=ye>>>13,rt=ye&8191,ot=(1<<de)-1,Ge=new V(32768),_t=new V(ot+1),vt=Math.ceil(de/3),Tt=2*vt,Pt=function(fr){return(ae[fr]^ae[fr+1]<<vt^ae[fr+2]<<Tt)&ot},ur=new F(25e3),Gt=new V(288),ar=new V(32),kt=0,Tr=0,Z=0,mr=0,$t=0,De=0;Z<Q;++Z){var Qt=Pt(Z),Vt=Z&32767,Dt=_t[Qt];if(Ge[Vt]=Dt,_t[Qt]=Vt,$t<=Z){var jt=Q-Z;if((kt>7e3||mr>24576)&&jt>423){H=Y(ae,w,0,ur,Gt,ar,Tr,mr,De,Z-De,H),mr=kt=Tr=0,De=Z;for(var Kt=0;Kt<286;++Kt)Gt[Kt]=0;for(var Kt=0;Kt<30;++Kt)ar[Kt]=0}var Ar=2,zt=0,sr=rt,rr=Vt-Dt&32767;if(jt>2&&Qt==Pt(Z-rr))for(var Ut=Math.min(He,jt)-1,Wt=Math.min(32767,Z),Ft=Math.min(258,jt);rr<=Wt&&--sr&&Vt!=Dt;){if(ae[Z+Ar]==ae[Z+Ar-rr]){for(var tr=0;tr<Ft&&ae[Z+tr]==ae[Z+tr-rr];++tr);if(tr>Ar){if(Ar=tr,zt=rr,tr>Ut)break;for(var Zt=Math.min(rr,tr-2),xr=0,Kt=0;Kt<Zt;++Kt){var qt=Z-rr+Kt+32768&32767,Fr=Ge[qt],gr=qt-Fr+32768&32767;gr>xr&&(xr=gr,Dt=qt)}}}Vt=Dt,Dt=Ge[Vt],rr+=Vt-Dt+32768&32767}if(zt){ur[mr++]=268435456|v[Ar]<<18|i[zt];var Kr=v[Ar]&31,Pr=i[zt]&31;Tr+=O[Kr]+X[Pr],++Gt[257+Kr],++ar[Pr],$t=Z+Ar,++kt}else ur[mr++]=ae[Z],++Gt[ae[Z]]}}H=Y(ae,w,et,ur,Gt,ar,Tr,mr,De,Z-De,H),et||(H=U(w,H,me))}return b(p,0,Te+d(H)+Ve)},Oe=function(){for(var ae=new F(256),oe=0;oe<256;++oe){for(var de=oe,Te=9;--Te;)de=(de&1&&3988292384)^de>>>1;ae[oe]=de}return ae}(),Se=function(){var ae=4294967295;return{p:function(oe){for(var de=ae,Te=0;Te<oe.length;++Te)de=Oe[de&255^oe[Te]]^de>>>8;ae=de},d:function(){return ae^4294967295}}},Be=function(){var ae=1,oe=0;return{p:function(de){for(var Te=ae,Ve=oe,et=de.length,Q=0;Q!=et;){for(var p=Math.min(Q+5552,et);Q<p;++Q)Te+=de[Q],Ve+=Te;Te%=65521,Ve%=65521}ae=Te,oe=Ve},d:function(){return(ae>>>8<<16|(oe&255)<<8|oe>>>8)+((ae&255)<<23)*2}}},Ne=function(ae,oe,de,Te,Ve){return ge(ae,oe.level==null?6:oe.level,oe.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(ae.length)))*1.5):12+oe.mem,de,Te,!Ve)},ke=function(ae,oe){var de={};for(var Te in ae)de[Te]=ae[Te];for(var Te in oe)de[Te]=oe[Te];return de},Ce=function(ae,oe,de){for(var Te=ae(),Ve=ae.toString(),et=Ve.slice(Ve.indexOf("[")+1,Ve.lastIndexOf("]")).replace(/ /g,"").split(","),Q=0;Q<Te.length;++Q){var p=Te[Q],w=et[Q];if(typeof p=="function"){oe+=";"+w+"=";var H=p.toString();if(p.prototype)if(H.indexOf("[native code]")!=-1){var Z=H.indexOf(" ",8)+1;oe+=H.slice(Z,H.indexOf("(",Z))}else{oe+=H;for(var K in p.prototype)oe+=";"+w+".prototype."+K+"="+p.prototype[K].toString()}else oe+=H}else de[w]=p}return[oe,de]},ve=[],Ye=function(ae){var oe=[];for(var de in ae)(ae[de]instanceof D||ae[de]instanceof V||ae[de]instanceof F)&&oe.push((ae[de]=new ae[de].constructor(ae[de])).buffer);return oe},ht=function(ae,oe,de,Te){var Ve;if(!ve[de]){for(var et="",Q={},p=ae.length-1,w=0;w<p;++w)Ve=Ce(ae[w],et,Q),et=Ve[0],Q=Ve[1];ve[de]=Ce(ae[p],et,Q)}var H=ke({},ve[de][1]);return G(ve[de][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+oe.toString()+"}",de,H,Ye(H),Te)},at=function(){return[D,V,F,O,X,M,g,s,E,C,A,r,h,n,l,d,b,m,fe,$,q]},We=function(){return[D,V,F,O,X,M,v,i,_,t,B,y,A,re,me,r,c,L,N,T,P,W,U,Y,d,b,ge,Ne,ce,$]},it=function(){return[nt,Ue,Ze,Se,Oe]},ne=function(){return[pt,xe]},J=function(){return[Qe,Ze,Be]},k=function(){return[je]},$=function(ae){return postMessage(ae,[ae.buffer])},q=function(ae){return ae&&ae.size&&new D(ae.size)},he=function(ae,oe,de,Te,Ve,et){var Q=ht(de,Te,Ve,function(p,w){Q.terminate(),et(p,w)});return oe.consume||(ae=new D(ae)),Q.postMessage([ae,oe],[ae.buffer]),function(){Q.terminate()}},pe=function(ae){return ae.ondata=function(oe,de){return postMessage([oe,de],[oe.buffer])},function(oe){return ae.push(oe.data[0],oe.data[1])}},Ke=function(ae,oe,de,Te,Ve){var et,Q=ht(ae,Te,Ve,function(p,w){p?(Q.terminate(),oe.ondata.call(oe,p)):(w[1]&&Q.terminate(),oe.ondata.call(oe,p,w[0],w[1]))});Q.postMessage(de),oe.push=function(p,w){if(et)throw"stream finished";if(!oe.ondata)throw"no stream handler";Q.postMessage([p,et=w],[p.buffer])},oe.terminate=function(){Q.terminate()}},Je=function(ae,oe){return ae[oe]|ae[oe+1]<<8},ze=function(ae,oe){return(ae[oe]|ae[oe+1]<<8|ae[oe+2]<<16)+(ae[oe+3]<<23)*2},Ze=function(ae,oe,de){for(;de;++oe)ae[oe]=de,de>>>=8},nt=function(ae,oe){var de=oe.filename;if(ae[0]=31,ae[1]=139,ae[2]=8,ae[8]=oe.level<2?4:oe.level==9?2:0,ae[9]=3,oe.mtime!=0&&Ze(ae,4,Math.floor(new Date(oe.mtime||Date.now())/1e3)),de){ae[3]=8;for(var Te=0;Te<=de.length;++Te)ae[Te+10]=de.charCodeAt(Te)}},pt=function(ae){if(ae[0]!=31||ae[1]!=139||ae[2]!=8)throw"invalid gzip data";var oe=ae[3],de=10;oe&4&&(de+=ae[10]|(ae[11]<<8)+2);for(var Te=(oe>>3&1)+(oe>>4&1);Te>0;Te-=!ae[de++]);return de+(oe&2)},xe=function(ae){var oe=ae.length;return(ae[oe-4]|ae[oe-3]<<8|ae[oe-2]<<16)+2*(ae[oe-1]<<23)},Ue=function(ae){return 10+(ae.filename&&ae.filename.length+1||0)},Qe=function(ae,oe){var de=oe.level,Te=de==0?0:de<6?1:de==9?3:2;ae[0]=120,ae[1]=Te<<6|(Te?32-2*Te:1)},je=function(ae){if((ae[0]&15)!=8||ae[0]>>>4>7||(ae[0]<<8|ae[1])%31)throw"invalid zlib data";if(ae[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function Le(ae,oe){return!oe&&typeof ae=="function"&&(oe=ae,ae={}),this.ondata=oe,ae}var Fe=function(){function ae(oe,de){!de&&typeof oe=="function"&&(de=oe,oe={}),this.ondata=de,this.o=oe||{}}return ae.prototype.p=function(oe,de){this.ondata(Ne(oe,this.o,0,0,!de),de)},ae.prototype.push=function(oe,de){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";this.d=de,this.p(oe,de||!1)},ae}(),we=function(){function ae(oe,de){Ke([We,function(){return[pe,Fe]}],this,Le.call(this,oe,de),function(Te){var Ve=new Fe(Te.data);onmessage=pe(Ve)},6)}return ae}();function ue(ae,oe,de){if(de||(de=oe,oe={}),typeof de!="function")throw"no callback";return he(ae,oe,[We],function(Te){return $(ce(Te.data[0],Te.data[1]))},0,de)}function ce(ae,oe){return oe===void 0&&(oe={}),Ne(ae,oe,0,0)}var te=function(){function ae(oe){this.s={},this.p=new D(0),this.ondata=oe}return ae.prototype.e=function(oe){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";var de=this.p.length,Te=new D(de+oe.length);Te.set(this.p),Te.set(oe,de),this.p=Te},ae.prototype.c=function(oe){this.d=this.s.i=oe||!1;var de=this.s.b,Te=m(this.p,this.o,this.s);this.ondata(b(Te,de,this.s.b),this.d),this.o=b(Te,this.s.b-32768),this.s.b=this.o.length,this.p=b(this.p,this.s.p/8>>0),this.s.p&=7},ae.prototype.push=function(oe,de){this.e(oe),this.c(de)},ae}(),ie=function(){function ae(oe){this.ondata=oe,Ke([at,function(){return[pe,te]}],this,0,function(){var de=new te;onmessage=pe(de)},7)}return ae}();function le(ae,oe,de){if(de||(de=oe,oe={}),typeof de!="function")throw"no callback";return he(ae,oe,[at],function(Te){return $(fe(Te.data[0],q(Te.data[1])))},1,de)}function fe(ae,oe){return m(ae,oe)}var Ie=function(){function ae(oe,de){this.c=Se(),this.l=0,this.v=1,Fe.call(this,oe,de)}return ae.prototype.push=function(oe,de){Fe.prototype.push.call(this,oe,de)},ae.prototype.p=function(oe,de){this.c.p(oe),this.l+=oe.length;var Te=Ne(oe,this.o,this.v&&Ue(this.o),de&&8,!de);this.v&&(nt(Te,this.o),this.v=0),de&&(Ze(Te,Te.length-8,this.c.d()),Ze(Te,Te.length-4,this.l)),this.ondata(Te,de)},ae}(),Pe=function(){function ae(oe,de){Ke([We,it,function(){return[pe,Fe,Ie]}],this,Le.call(this,oe,de),function(Te){var Ve=new Ie(Te.data);onmessage=pe(Ve)},8)}return ae}();function qe(ae,oe,de){if(de||(de=oe,oe={}),typeof de!="function")throw"no callback";return he(ae,oe,[We,it,function(){return[dt]}],function(Te){return $(dt(Te.data[0],Te.data[1]))},2,de)}function dt(ae,oe){oe===void 0&&(oe={});var de=Se(),Te=ae.length;de.p(ae);var Ve=Ne(ae,oe,Ue(oe),8),et=Ve.length;return nt(Ve,oe),Ze(Ve,et-8,de.d()),Ze(Ve,et-4,Te),Ve}var lt=function(){function ae(oe){this.v=1,te.call(this,oe)}return ae.prototype.push=function(oe,de){if(te.prototype.e.call(this,oe),this.v){var Te=pt(this.p);if(Te>=this.p.length&&!de)return;this.p=this.p.subarray(Te),this.v=0}if(de){if(this.p.length<8)throw"invalid gzip stream";this.p=this.p.subarray(0,-8)}te.prototype.c.call(this,de)},ae}(),st=function(){function ae(oe){this.ondata=oe,Ke([at,ne,function(){return[pe,te,lt]}],this,0,function(){var de=new lt;onmessage=pe(de)},9)}return ae}();function Lt(ae,oe,de){if(de||(de=oe,oe={}),typeof de!="function")throw"no callback";return he(ae,oe,[at,ne,function(){return[mt]}],function(Te){return $(mt(Te.data[0]))},3,de)}function mt(ae,oe){return m(ae.subarray(pt(ae),-8),oe||new D(xe(ae)))}var tt=function(){function ae(oe,de){this.c=Be(),this.v=1,Fe.call(this,oe,de)}return ae.prototype.push=function(oe,de){Fe.prototype.push.call(this,oe,de)},ae.prototype.p=function(oe,de){this.c.p(oe);var Te=Ne(oe,this.o,this.v&&2,de&&4,!de);this.v&&(Qe(Te,this.o),this.v=0),de&&Ze(Te,Te.length-4,this.c.d()),this.ondata(Te,de)},ae}(),er=function(){function ae(oe,de){Ke([We,J,function(){return[pe,Fe,tt]}],this,Le.call(this,oe,de),function(Te){var Ve=new tt(Te.data);onmessage=pe(Ve)},10)}return ae}();function Jt(ae,oe,de){if(de||(de=oe,oe={}),typeof de!="function")throw"no callback";return he(ae,oe,[We,J,function(){return[Ot]}],function(Te){return $(Ot(Te.data[0],Te.data[1]))},4,de)}function Ot(ae,oe){oe===void 0&&(oe={});var de=Be();de.p(ae);var Te=Ne(ae,oe,2,4);return Qe(Te,oe),Ze(Te,Te.length-4,de.d()),Te}var yt=function(){function ae(oe){this.v=1,te.call(this,oe)}return ae.prototype.push=function(oe,de){if(te.prototype.e.call(this,oe),this.v){if(this.p.length<2&&!de)return;this.p=this.p.subarray(2),this.v=0}if(de){if(this.p.length<4)throw"invalid zlib stream";this.p=this.p.subarray(0,-4)}te.prototype.c.call(this,de)},ae}(),Et=function(){function ae(oe){this.ondata=oe,Ke([at,k,function(){return[pe,te,yt]}],this,0,function(){var de=new yt;onmessage=pe(de)},11)}return ae}();function wt(ae,oe,de){if(de||(de=oe,oe={}),typeof de!="function")throw"no callback";return he(ae,oe,[at,k,function(){return[Mt]}],function(Te){return $(Mt(Te.data[0],q(Te.data[1])))},5,de)}function Mt(ae,oe){return m((je(ae),ae.subarray(2,-4)),oe)}var ut=function(){function ae(oe){this.G=lt,this.I=te,this.Z=yt,this.ondata=oe}return ae.prototype.push=function(oe,de){if(!this.ondata)throw"no stream handler";if(this.s)this.s.push(oe,de);else{if(this.p&&this.p.length){var Te=new D(this.p.length+oe.length);Te.set(this.p),Te.set(oe,this.p.length)}else this.p=oe;if(this.p.length>2){var Ve=this,et=function(){Ve.ondata.apply(Ve,arguments)};this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(et):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(et):new this.Z(et),this.s.push(this.p,de),this.p=null}}},ae}(),lr=function(){function ae(oe){this.G=st,this.I=ie,this.Z=Et,this.ondata=oe}return ae.prototype.push=function(oe,de){ut.prototype.push.call(this,oe,de)},ae}();function At(ae,oe,de){if(de||(de=oe,oe={}),typeof de!="function")throw"no callback";return ae[0]==31&&ae[1]==139&&ae[2]==8?Lt(ae,oe,de):(ae[0]&15)!=8||ae[0]>>4>7||(ae[0]<<8|ae[1])%31?le(ae,oe,de):wt(ae,oe,de)}function gt(ae,oe){return ae[0]==31&&ae[1]==139&&ae[2]==8?mt(ae,oe):(ae[0]&15)!=8||ae[0]>>4>7||(ae[0]<<8|ae[1])%31?fe(ae,oe):Mt(ae,oe)}var Nt=function(ae,oe,de,Te){for(var Ve in ae){var et=ae[Ve],Q=oe+Ve;et instanceof D?de[Q]=[et,Te]:Array.isArray(et)?de[Q]=[et[0],ke(Te,et[1])]:Nt(et,Q+"/",de,Te)}};function ir(ae,oe){var de=ae.length;if(!oe&&typeof TextEncoder!="undefined")return new TextEncoder().encode(ae);for(var Te=new D(ae.length+(ae.length>>>1)),Ve=0,et=function(H){Te[Ve++]=H},Q=0;Q<de;++Q){if(Ve+5>Te.length){var p=new D(Ve+8+(de-Q<<1));p.set(Te),Te=p}var w=ae.charCodeAt(Q);w<128||oe?et(w):w<2048?(et(192|w>>>6),et(128|w&63)):w>55295&&w<57344?(w=65536+(w&1023<<10)|ae.charCodeAt(++Q)&1023,et(240|w>>>18),et(128|w>>>12&63),et(128|w>>>6&63),et(128|w&63)):(et(224|w>>>12),et(128|w>>>6&63),et(128|w&63))}return b(Te,0,Ve)}function yr(ae,oe){var de="";if(!oe&&typeof TextDecoder!="undefined")return new TextDecoder().decode(ae);for(var Te=0;Te<ae.length;){var Ve=ae[Te++];Ve<128||oe?de+=String.fromCharCode(Ve):Ve<224?de+=String.fromCharCode((Ve&31)<<6|ae[Te++]&63):Ve<240?de+=String.fromCharCode((Ve&15)<<12|(ae[Te++]&63)<<6|ae[Te++]&63):(Ve=((Ve&15)<<18|(ae[Te++]&63)<<12|(ae[Te++]&63)<<6|ae[Te++]&63)-65536,de+=String.fromCharCode(55296|Ve>>10,56320|Ve&1023))}return de}var br=function(ae,oe){return oe+30+Je(ae,oe+26)+Je(ae,oe+28)},Rr=function(ae,oe,de){var Te=Je(ae,oe+28),Ve=yr(ae.subarray(oe+46,oe+46+Te),!(Je(ae,oe+8)&2048)),et=oe+46+Te,Q=de?Dr(ae,et):[ze(ae,oe+20),ze(ae,oe+24),ze(ae,oe+42)],p=Q[0],w=Q[1],H=Q[2];return[Je(ae,oe+10),p,w,Ve,et+Je(ae,oe+30)+Je(ae,oe+32),H]},Dr=function(ae,oe){for(;Je(ae,oe)!=1;oe+=4+Je(ae,oe+2));return[ze(ae,oe+12),ze(ae,oe+4),ze(ae,oe+20)]},Ht=function(ae,oe,de,Te,Ve,et,Q,p,w,H){var Z=et.length,K=Te.length;Ze(ae,oe,w!=null?33639248:67324752),oe+=4,w!=null&&(ae[oe]=20,oe+=2),ae[oe]=20,oe+=2,ae[oe++]=H==8&&(p.level==1?6:p.level<6?4:p.level==9?2:0),ae[oe++]=Q&&8,ae[oe]=H,oe+=2;var ye=new Date(p.mtime||Date.now()),He=ye.getFullYear()-1980;if(He<0||He>119)throw"date not in range 1980-2099";Ze(ae,oe,(He<<24)*2|ye.getMonth()+1<<21|ye.getDate()<<16|ye.getHours()<<11|ye.getMinutes()<<5|ye.getSeconds()>>>1),oe+=4,Ze(ae,oe,de),Ze(ae,oe+4,K),Ze(ae,oe+8,Ve),Ze(ae,oe+12,Z),oe+=16,w!=null&&(Ze(ae,oe+=10,w),oe+=4),ae.set(et,oe),oe+=Z,w==null&&ae.set(Te,oe)},pr=function(ae,oe,de,Te,Ve){Ze(ae,oe,101010256),Ze(ae,oe+8,de),Ze(ae,oe+10,de),Ze(ae,oe+12,Te),Ze(ae,oe+16,Ve)};function Lr(ae,oe,de){if(de||(de=oe,oe={}),typeof de!="function")throw"no callback";var Te={};Nt(ae,"",Te,oe);var Ve=Object.keys(Te),et=Ve.length,Q=0,p=0,w=et,H=new Array(et),Z=[],K=function(){for(var ot=0;ot<Z.length;++ot)Z[ot]()},ye=function(){var ot=new D(p+22),Ge=Q,_t=p-Q;p=0;for(var vt=0;vt<w;++vt){var Tt=H[vt];try{Ht(ot,p,Tt.c,Tt.d,Tt.m,Tt.n,Tt.u,Tt.p,null,Tt.t),Ht(ot,Q,Tt.c,Tt.d,Tt.m,Tt.n,Tt.u,Tt.p,p,Tt.t),Q+=46+Tt.n.length,p+=30+Tt.n.length+Tt.d.length}catch(Pt){return de(Pt,null)}}pr(ot,Q,H.length,_t,Ge),de(null,ot)};et||ye();for(var He=function(ot){var Ge=Ve[ot],_t=Te[Ge],vt=_t[0],Tt=_t[1],Pt=Se(),ur=vt.length;Pt.p(vt);var Gt=ir(Ge),ar=Gt.length,kt=Tt.level==0?0:8,Tr=function(mr,$t){if(mr)K(),de(mr,null);else{var De=$t.length;H[ot]={t:kt,d:$t,m:ur,c:Pt.d(),u:Ge.length!=De,n:Gt,p:Tt},Q+=30+ar+De,p+=76+2*ar+De,--et||ye()}};if(Gt.length>65535&&Tr("filename too long",null),!kt)Tr(null,vt);else if(ur<16e4)try{Tr(null,ce(vt,Tt))}catch(mr){Tr(mr,null)}else Z.push(ue(vt,Tt,Tr))},rt=0;rt<w;++rt)He(rt);return K}function Cr(ae,oe){oe===void 0&&(oe={});var de={},Te=[];Nt(ae,"",de,oe);var Ve=0,et=0;for(var Q in de){var p=de[Q],w=p[0],H=p[1],Z=H.level==0?0:8,K=ir(Q),ye=K.length;if(K.length>65535)throw"filename too long";var He=Z?ce(w,H):w,rt=He.length,ot=Se();ot.p(w),Te.push({t:Z,d:He,m:w.length,c:ot.d(),u:Q.length!=ye,n:K,o:Ve,p:H}),Ve+=30+ye+rt,et+=76+2*ye+rt}for(var Ge=new D(et+22),_t=Ve,vt=et-Ve,Tt=0;Tt<Te.length;++Tt){var Pt=Te[Tt];Ht(Ge,Pt.o,Pt.c,Pt.d,Pt.m,Pt.n,Pt.u,Pt.p,null,Pt.t),Ht(Ge,Ve,Pt.c,Pt.d,Pt.m,Pt.n,Pt.u,Pt.p,Pt.o,Pt.t),Ve+=46+Pt.n.length}return pr(Ge,Ve,Te.length,vt,_t),Ge}function Qr(ae,oe){if(typeof oe!="function")throw"no callback";for(var de=[],Te=function(){for(var ye=0;ye<de.length;++ye)de[ye]()},Ve={},et=ae.length-22;ze(ae,et)!=101010256;--et)if(!et||ae.length-et>65558){oe("invalid zip file",null);return}var Q=Je(ae,et+8);Q||oe(null,{});var p=Q,w=ze(ae,et+16),H=w==4294967295;if(H){if(et=ze(ae,et-12),ze(ae,et)!=101075792)throw"invalid zip file";p=Q=ze(ae,et+32),w=ze(ae,et+48)}for(var Z=function(ye){var He=Rr(ae,w,H),rt=He[0],ot=He[1],Ge=He[2],_t=He[3],vt=He[4],Tt=He[5],Pt=br(ae,Tt);w=vt;var ur=function(ar,kt){ar?(Te(),oe(ar,null)):(Ve[_t]=kt,--Q||oe(null,Ve))};if(!rt)ur(null,b(ae,Pt,Pt+ot));else if(rt==8){var Gt=ae.subarray(Pt,Pt+ot);if(ot<32e4)try{ur(null,fe(Gt,new D(Ge)))}catch(ar){ur(ar,null)}else de.push(le(Gt,{size:Ge},ur))}else ur("unknown compression type "+rt,null)},K=0;K<p;++K)Z(K);return Te}function Ur(ae){for(var oe={},de=ae.length-22;ze(ae,de)!=101010256;--de)if(!de||ae.length-de>65558)throw"invalid zip file";var Te=Je(ae,de+8);if(!Te)return{};var Ve=ze(ae,de+16),et=Ve==4294967295;if(et){if(de=ze(ae,de-12),ze(ae,de)!=101075792)throw"invalid zip file";Te=ze(ae,de+32),Ve=ze(ae,de+48)}for(var Q=0;Q<Te;++Q){var p=Rr(ae,Ve,et),w=p[0],H=p[1],Z=p[2],K=p[3],ye=p[4],He=p[5],rt=br(ae,He);if(Ve=ye,!w)oe[K]=b(ae,rt,rt+H);else if(w==8)oe[K]=fe(ae.subarray(rt,rt+H),new D(Z));else throw"unknown compression type "+w}return oe}},cw1j:function(ct,_e,j){"use strict";var se=j("k1fw"),G=j("tJVT"),D=j("5NDa"),V=j("5rEg"),F=j("q1tI"),O=j.n(F),X=j("9Bee"),M=j("NKYn"),e=j("tJYV"),R=j.n(e),g=V.a.TextArea,v=function(s){var i=s.item,A=s.answerData,o=s.changeScoreData,a=s.textValue,r=s.textOnChange,t=r===void 0?function(){}:r,y=s.seeAnswerVisible,_=y===void 0?!0:y,E=Object(F.useState)([]),B=Object(G.a)(E,2),C=B[0],h=B[1],n=Object(F.useState)(!1),l=Object(G.a)(n,2),d=l[0],b=l[1];return Object(F.useEffect)(function(){o!=null&&o[i.q_position]?!d&&b(!0):d&&b(!1)},[o==null?void 0:o[i==null?void 0:i.q_position]]),Object(F.useEffect)(function(){for(var m=[],c=function(T){var P,W=(i==null||((P=i.user_answer)===null||P===void 0)?void 0:P.find(function(U){return U.choice_id===T+1}))||{choice_id:T+1,answer_text:""};m.push(Object(se.a)({},W))},L=0;L<(i==null?void 0:i.multi_count);L++)c(L);h(m)},[i==null?void 0:i.user_answer]),O.a.createElement("div",{className:R.a.fillBg},O.a.createElement("aside",{className:"font14 c-light-primary mb5"},"\u5B66\u751F\u7B54\u9898"),C==null?void 0:C.map(function(m,c){return O.a.createElement("div",null,O.a.createElement("span",null,"\u7B54\u6848(\u586B\u7A7A",c+1,"):"),O.a.createElement("div",null,O.a.createElement(X.a,{value:m==null?void 0:m.answer_text})))}),_&&O.a.createElement(M.a,{data:i}))};_e.a=v},dmUQ:function(ct,_e,j){"use strict";var se=j("Ff2n"),G=j("rePB"),D=j("1OyB"),V=j("vuIU"),F=j("Ji7U"),O=j("md7G"),X=j("foSv"),M=j("q1tI"),e=j.n(M),R=j("TSYQ"),g=j.n(R),v=j("4IlW");function u(l,d){var b=Object.keys(l);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(l);d&&(m=m.filter(function(c){return Object.getOwnPropertyDescriptor(l,c).enumerable})),b.push.apply(b,m)}return b}function s(l){for(var d=1;d<arguments.length;d++){var b=arguments[d]!=null?arguments[d]:{};d%2?u(Object(b),!0).forEach(function(m){Object(G.a)(l,m,b[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(b)):u(Object(b)).forEach(function(m){Object.defineProperty(l,m,Object.getOwnPropertyDescriptor(b,m))})}return l}function i(l){var d=A();return function(){var m=Object(X.a)(l),c;if(d){var L=Object(X.a)(this).constructor;c=Reflect.construct(m,arguments,L)}else c=m.apply(this,arguments);return Object(O.a)(this,c)}}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(l){return!1}}function o(){}function a(l){l.preventDefault()}var r=function(d){return d.replace(/[^\w.-]+/g,"")},t=200,y=600,_=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,E=function(d){return d!=null},B=function(d,b){return b===d||typeof b=="number"&&typeof d=="number"&&isNaN(b)&&isNaN(d)},C=function(l){Object(F.a)(b,l);var d=i(b);function b(m){var c;Object(D.a)(this,b),c=d.call(this,m),c.onKeyDown=function(T){var P=c.props,W=P.onKeyDown,U=P.onPressEnter;if(T.keyCode===v.a.UP){var Y=c.getRatio(T);c.up(T,Y,null),c.stop()}else if(T.keyCode===v.a.DOWN){var re=c.getRatio(T);c.down(T,re,null),c.stop()}else T.keyCode===v.a.ENTER&&U&&U(T);if(c.recordCursorPosition(),c.lastKeyCode=T.keyCode,W){for(var me=arguments.length,ge=new Array(me>1?me-1:0),Oe=1;Oe<me;Oe++)ge[Oe-1]=arguments[Oe];W.apply(void 0,[T].concat(ge))}},c.onKeyUp=function(T){var P=c.props.onKeyUp;if(c.stop(),c.recordCursorPosition(),P){for(var W=arguments.length,U=new Array(W>1?W-1:0),Y=1;Y<W;Y++)U[Y-1]=arguments[Y];P.apply(void 0,[T].concat(U))}},c.onChange=function(T){var P=c.props.onChange;c.state.focused&&(c.inputting=!0),c.rawInput=c.props.parser(c.getValueFromEvent(T)),c.setState({inputValue:c.rawInput}),P(c.toNumber(c.rawInput))},c.onMouseUp=function(){var T=c.props.onMouseUp;c.recordCursorPosition(),T&&T.apply(void 0,arguments)},c.onFocus=function(){var T;c.setState({focused:!0}),(T=c.props).onFocus.apply(T,arguments)},c.onBlur=function(){var T=c.props.onBlur;c.inputting=!1,c.setState({focused:!1});var P=c.getCurrentValidValue(c.state.inputValue),W=c.setValue(P,o);if(T){var U=c.input.value,Y=c.getInputDisplayValue({focus:!1,value:W});c.input.value=Y&&Number(Y),T.apply(void 0,arguments),c.input.value=U}},c.getRatio=function(T){var P=1;return T.metaKey||T.ctrlKey?P=.1:T.shiftKey&&(P=10),P},c.getFullNum=function(T){return isNaN(T)?T:/e/i.test(String(T))?Number(T).toFixed(18).replace(/\.?0+$/,""):T},c.getPrecision=function(T){if(E(c.props.precision))return c.props.precision;var P=String(T);if(P.indexOf("e-")>=0)return parseInt(P.slice(P.indexOf("e-")+2),10);var W=0;return P.indexOf(".")>=0&&(W=P.length-P.indexOf(".")-1),W},c.getInputDisplayValue=function(T){var P=T||c.state,W=P.focused,U=P.inputValue,Y=P.value,re;W?re=U:re=c.toPrecisionAsStep(Y),re==null&&(re="");var me=c.formatWrapper(re);return E(c.props.decimalSeparator)&&(me=me.toString().replace(".",c.props.decimalSeparator)),me},c.recordCursorPosition=function(){try{c.cursorStart=c.input.selectionStart,c.cursorEnd=c.input.selectionEnd,c.currentValue=c.input.value,c.cursorBefore=c.input.value.substring(0,c.cursorStart),c.cursorAfter=c.input.value.substring(c.cursorEnd)}catch(T){}},c.restoreByAfter=function(T){if(T===void 0)return!1;var P=c.input.value,W=P.lastIndexOf(T);if(W===-1)return!1;var U=c.cursorBefore.length;return c.lastKeyCode===v.a.DELETE&&c.cursorBefore.charAt(U-1)===T[0]?(c.fixCaret(U,U),!0):W+T.length===P.length?(c.fixCaret(W,W),!0):!1},c.partRestoreByAfter=function(T){return T===void 0?!1:Array.prototype.some.call(T,function(P,W){var U=T.substring(W);return c.restoreByAfter(U)})},c.isNotCompleteNumber=function(T){return isNaN(T)||T===""||T===null||T&&T.toString().indexOf(".")===T.toString().length-1},c.stop=function(){c.autoStepTimer&&clearTimeout(c.autoStepTimer)},c.down=function(T,P,W){c.pressingUpOrDown=!0,c.step("down",T,P,W)},c.up=function(T,P,W){c.pressingUpOrDown=!0,c.step("up",T,P,W)},c.saveInput=function(T){c.input=T};var L=m.value;L===void 0&&(L=m.defaultValue),c.state={focused:m.autoFocus};var N=c.getValidValue(c.toNumber(L));return c.state=s(s({},c.state),{},{inputValue:c.toPrecisionAsStep(N),value:N}),c}return Object(V.a)(b,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(c){var L=this.props,N=L.value,T=L.onChange,P=L.max,W=L.min,U=this.state.focused;if(c){if(!B(c.value,N)||!B(c.max,P)||!B(c.min,W)){var Y=U?N:this.getValidValue(N),re;this.pressingUpOrDown?re=Y:this.inputting?re=this.rawInput:re=this.toPrecisionAsStep(Y),this.setState({value:Y,inputValue:re})}var me="value"in this.props?N:this.state.value;"max"in this.props&&c.max!==P&&typeof me=="number"&&me>P&&T&&T(P),"min"in this.props&&c.min!==W&&typeof me=="number"&&me<W&&T&&T(W)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var ge=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===v.a.BACKSPACE?ge=this.cursorStart-1:this.lastKeyCode===v.a.DELETE&&(ge=this.cursorStart):ge=this.input.value.length,this.fixCaret(ge,ge)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case v.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case v.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(c){var L=c;return L===""?L="":this.isNotCompleteNumber(parseFloat(L))?L=this.state.value:L=this.getValidValue(L),this.toNumber(L)}},{key:"getValueFromEvent",value:function(c){var L=c.target.value.trim().replace(/。/g,".");return E(this.props.decimalSeparator)&&(L=L.replace(this.props.decimalSeparator,".")),L}},{key:"getValidValue",value:function(c){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,T=parseFloat(c);return isNaN(T)?c:(T<L&&(T=L),T>N&&(T=N),T)}},{key:"setValue",value:function(c,L){var N=this.props.precision,T=this.isNotCompleteNumber(parseFloat(c))?null:parseFloat(c),P=this.state.value,W=P===void 0?null:P,U=this.state.inputValue,Y=U===void 0?null:U,re=typeof T=="number"?T.toFixed(N):"".concat(T),me=T!==W||re!=="".concat(Y);return"value"in this.props?(Y=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:Y},L)):this.setState({value:T,inputValue:this.toPrecisionAsStep(c)},L),me&&this.props.onChange(T),T}},{key:"getMaxPrecision",value:function(c){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,N=this.props,T=N.precision,P=N.step;if(E(T))return T;var W=this.getPrecision(L),U=this.getPrecision(P),Y=this.getPrecision(c);return c?Math.max(Y,W+U):W+U}},{key:"getPrecisionFactor",value:function(c){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,N=this.getMaxPrecision(c,L);return Math.pow(10,N)}},{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(c){return this.props.formatter?this.props.formatter(c):c}},{key:"toPrecisionAsStep",value:function(c){if(this.isNotCompleteNumber(c)||c==="")return c;var L=Math.abs(this.getMaxPrecision(c));return isNaN(L)?c.toString():Number(c).toFixed(L)}},{key:"toNumber",value:function(c){var L=this.props.precision,N=this.state.focused,T=c&&c.length>16&&N;return this.isNotCompleteNumber(c)||T?c:E(L)?Math.round(c*Math.pow(10,L))/Math.pow(10,L):Number(c)}},{key:"upStep",value:function(c,L){var N=this.props.step,T=this.getPrecisionFactor(c,L),P=Math.abs(this.getMaxPrecision(c,L)),W=((T*c+T*N*L)/T).toFixed(P);return this.toNumber(W)}},{key:"downStep",value:function(c,L){var N=this.props.step,T=this.getPrecisionFactor(c,L),P=Math.abs(this.getMaxPrecision(c,L)),W=((T*c-T*N*L)/T).toFixed(P);return this.toNumber(W)}},{key:"step",value:function(c,L){var N=this,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,P=arguments.length>3?arguments[3]:void 0;this.stop(),L&&(L.persist(),L.preventDefault());var W=this.props;if(W.disabled)return;var U=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(U))return;var Y=this["".concat(c,"Step")](U,T),re=Y>W.max||Y<W.min;if(Y>W.max?Y=W.max:Y<W.min&&(Y=W.min),this.setValue(Y,null),this.setState({focused:!0},function(){N.pressingUpOrDown=!1}),re)return;this.autoStepTimer=setTimeout(function(){N[c](L,T,!0)},P?t:y)}},{key:"fixCaret",value:function(c,L){if(c===void 0||L===void 0||!this.input||!this.input.value)return;try{var N=this.input.selectionStart,T=this.input.selectionEnd;(c!==N||L!==T)&&this.input.setSelectionRange(c,L)}catch(P){}}},{key:"render",value:function(){var c,L=this.props,N=L.prefixCls,T=L.disabled,P=L.readOnly,W=L.useTouch,U=L.autoComplete,Y=L.upHandler,re=L.downHandler,me=L.className,ge=L.max,Oe=L.min,Se=L.style,Be=L.title,Ne=L.onMouseEnter,ke=L.onMouseLeave,Ce=L.onMouseOver,ve=L.onMouseOut,Ye=L.required,ht=L.onClick,at=L.tabIndex,We=L.type,it=L.placeholder,ne=L.id,J=L.inputMode,k=L.pattern,$=L.step,q=L.maxLength,he=L.autoFocus,pe=L.name,Ke=L.onPaste,Je=L.onInput,ze=Object(se.a)(L,["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"]),Ze=this.state,nt=Ze.value,pt=Ze.focused,xe=g()(N,(c={},Object(G.a)(c,me,!!me),Object(G.a)(c,"".concat(N,"-disabled"),T),Object(G.a)(c,"".concat(N,"-focused"),pt),c)),Ue={};Object.keys(ze).forEach(function(fe){(fe.substr(0,5)==="data-"||fe.substr(0,5)==="aria-"||fe==="role")&&(Ue[fe]=ze[fe])});var Qe=!P&&!T,je=this.getInputDisplayValue(null),Le=(nt||nt===0)&&(isNaN(nt)||Number(nt)>=ge),Fe=(nt||nt===0)&&(isNaN(nt)||Number(nt)<=Oe),we=Le||T||P,ue=Fe||T||P,ce=g()("".concat(N,"-handler"),"".concat(N,"-handler-up"),Object(G.a)({},"".concat(N,"-handler-up-disabled"),we)),te=g()("".concat(N,"-handler"),"".concat(N,"-handler-down"),Object(G.a)({},"".concat(N,"-handler-down-disabled"),ue)),ie=W?{onTouchStart:we?o:this.up,onTouchEnd:this.stop}:{onMouseDown:we?o:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},le=W?{onTouchStart:ue?o:this.down,onTouchEnd:this.stop}:{onMouseDown:ue?o:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return e.a.createElement("div",{className:xe,style:Se,title:Be,onMouseEnter:Ne,onMouseLeave:ke,onMouseOver:Ce,onMouseOut:ve,onFocus:function(){return null},onBlur:function(){return null}},e.a.createElement("div",{className:"".concat(N,"-handler-wrap")},e.a.createElement("span",Object.assign({unselectable:"on"},ie,{role:"button","aria-label":"Increase Value","aria-disabled":we,className:ce}),Y||e.a.createElement("span",{unselectable:"on",className:"".concat(N,"-handler-up-inner"),onClick:a})),e.a.createElement("span",Object.assign({unselectable:"on"},le,{role:"button","aria-label":"Decrease Value","aria-disabled":ue,className:te}),re||e.a.createElement("span",{unselectable:"on",className:"".concat(N,"-handler-down-inner"),onClick:a}))),e.a.createElement("div",{className:"".concat(N,"-input-wrap")},e.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Oe,"aria-valuemax":ge,"aria-valuenow":nt,required:Ye,type:We,placeholder:it,onPaste:Ke,onClick:ht,onMouseUp:this.onMouseUp,className:"".concat(N,"-input"),tabIndex:at,autoComplete:U,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Qe?this.onKeyDown:o,onKeyUp:Qe?this.onKeyUp:o,autoFocus:he,maxLength:q,readOnly:P,disabled:T,max:ge,min:Oe,step:$,name:pe,title:Be,id:ne,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(je),pattern:k,inputMode:J,onInput:Je},Ue))))}}]),b}(e.a.Component);C.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:_,min:-_,step:1,style:{},onChange:o,onKeyDown:o,onPressEnter:o,onFocus:o,onBlur:o,parser:r,required:!1,autoComplete:"off"};var h=C,n=_e.a=h},fjLI:function(ct,_e,j){"use strict";j.d(_e,"f",function(){return u}),j.d(_e,"b",function(){return s}),j.d(_e,"a",function(){return i}),j.d(_e,"d",function(){return A}),j.d(_e,"e",function(){return o}),j.d(_e,"c",function(){return a});var se=j("8HAY"),G=j("Vhoy"),D=j("MI8n"),V=j("JYp7"),F=j("pmY6"),O=j("24hK"),X=j("nnTU"),M=j("T8No"),e=j("Cg/j"),R=j("t9D7"),g=function(r,t,y,_){var E=arguments.length,B=E<3?t:_===null?_=Object.getOwnPropertyDescriptor(t,y):_,C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(r,t,y,_);else for(var h=r.length-1;h>=0;h--)(C=r[h])&&(B=(E<3?C(B):E>3?C(t,y,B):C(t,y))||B);return E>3&&B&&Object.defineProperty(t,y,B),B},v=function(r,t){return function(y,_){t(y,_,r)}};function u(r){return r.command!==void 0}class s{constructor(r){this.id=s._idPool++,this._debugName=r}}s._idPool=0,s.CommandPalette=new s("CommandPalette"),s.EditorContext=new s("EditorContext"),s.SimpleEditorContext=new s("SimpleEditorContext"),s.EditorContextCopy=new s("EditorContextCopy"),s.EditorContextPeek=new s("EditorContextPeek"),s.MenubarEditMenu=new s("MenubarEditMenu"),s.MenubarCopy=new s("MenubarCopy"),s.MenubarGoMenu=new s("MenubarGoMenu"),s.MenubarSelectionMenu=new s("MenubarSelectionMenu"),s.InlineCompletionsActions=new s("InlineCompletionsActions");const i=Object(e.c)("menuService"),A=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new D.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:r=>r===s.CommandPalette}}addCommand(r){return this.addCommands(V.a.single(r))}addCommands(r){for(const t of r)this._commands.set(t.id,t);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(F.i)(()=>{let t=!1;for(const y of r)t=this._commands.delete(y.id)||t;t&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(r){return this._commands.get(r)}getCommands(){const r=new Map;return this._commands.forEach((t,y)=>r.set(y,t)),r}appendMenuItem(r,t){return this.appendMenuItems(V.a.single({id:r,item:t}))}appendMenuItems(r){const t=new Set,y=new O.a;for(const{id:_,item:E}of r){let B=this._menuItems.get(_);B||(B=new O.a,this._menuItems.set(_,B)),y.push(B.push(E)),t.add(_)}return this._onDidChangeMenu.fire(t),Object(F.i)(()=>{if(y.size>0){for(let _ of y)_();this._onDidChangeMenu.fire(t),y.clear()}})}getMenuItems(r){let t;return this._menuItems.has(r)?t=[...this._menuItems.get(r)]:t=[],r===s.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(r){const t=new Set;for(const y of r)u(y)&&(t.add(y.command.id),y.alt&&t.add(y.alt.id));this._commands.forEach((y,_)=>{t.has(_)||r.push({command:y})})}};class o extends se.e{constructor(r,t,y,_){super(`submenuitem.${r.submenu.id}`,typeof r.title=="string"?r.title:r.title.value,[],"submenu");this.item=r,this._menuService=t,this._contextKeyService=y,this._options=_}get actions(){const r=[],t=this._menuService.createMenu(this.item.submenu,this._contextKeyService),y=t.getActions(this._options);t.dispose();for(const[,_]of y)_.length>0&&(r.push(..._),r.push(new se.d));return r.length&&r.pop(),r}}let a=class r{constructor(t,y,_,E,B){var C,h;if(this._commandService=B,this.id=t.id,this.label=(_==null?void 0:_.renderShortTitle)&&t.shortTitle?typeof t.shortTitle=="string"?t.shortTitle:t.shortTitle.value:typeof t.title=="string"?t.title:t.title.value,this.tooltip=(h=typeof t.tooltip=="string"?t.tooltip:(C=t.tooltip)===null||C===void 0?void 0:C.value)!==null&&h!==void 0?h:"",this.enabled=!t.precondition||E.contextMatchesRules(t.precondition),this.checked=void 0,t.toggled){const n=t.toggled.condition?t.toggled:{condition:t.toggled};this.checked=E.contextMatchesRules(n.condition),this.checked&&n.tooltip&&(this.tooltip=typeof n.tooltip=="string"?n.tooltip:n.tooltip.value),n.title&&(this.label=typeof n.title=="string"?n.title:n.title.value)}this.item=t,this.alt=y?new r(y,void 0,_,E,B):void 0,this._options=_,R.d.isThemeIcon(t.icon)&&(this.class=G.a.asClassName(t.icon))}dispose(){}run(...t){var y,_;let E=[];return((y=this._options)===null||y===void 0?void 0:y.arg)&&(E=[...E,this._options.arg]),((_=this._options)===null||_===void 0?void 0:_.shouldForwardArgs)&&(E=[...E,...t]),this._commandService.executeCommand(this.id,...E)}};a=g([v(3,M.b),v(4,X.b)],a)},fyJ8:function(ct,_e,j){"use strict";var se=j("rePB"),G=j("VTBJ"),D=j("Ff2n"),V=j("U8pU"),F=j("q1tI"),O=j.n(F),X=j("TSYQ"),M=j.n(X),e=j("c+Xe"),R=j("sR1s");function g(A){return A&&Object(V.a)(A)==="object"&&!Array.isArray(A)&&!F.isValidElement(A)}function v(A){return typeof A=="string"?!0:Object(e.c)(A)}function u(A,o){var a,r=A.prefixCls,t=A.className,y=A.record,_=A.index,E=A.dataIndex,B=A.render,C=A.children,h=A.component,n=h===void 0?"td":h,l=A.colSpan,d=A.rowSpan,b=A.fixLeft,m=A.fixRight,c=A.firstFixLeft,L=A.lastFixLeft,N=A.firstFixRight,T=A.lastFixRight,P=A.appendNode,W=A.additionalProps,U=W===void 0?{}:W,Y=A.ellipsis,re=A.align,me=A.rowType,ge=A.isSticky,Oe="".concat(r,"-cell"),Se,Be;if(C)Be=C;else{var Ne=Object(R.b)(y,E);if(Be=Ne,B){var ke=B(Ne,y,_);g(ke)?(Be=ke.children,Se=ke.props):Be=ke}}Object(V.a)(Be)==="object"&&!Array.isArray(Be)&&!F.isValidElement(Be)&&(Be=null),Y&&(L||N)&&(Be=F.createElement("span",{className:"".concat(Oe,"-content")},Be));var Ce=Se||{},ve=Ce.colSpan,Ye=Ce.rowSpan,ht=Ce.style,at=Ce.className,We=Object(D.a)(Ce,["colSpan","rowSpan","style","className"]),it=ve!==void 0?ve:l,ne=Ye!==void 0?Ye:d;if(it===0||ne===0)return null;var J={},k=typeof b=="number",$=typeof m=="number";k&&(J.position="sticky",J.left=b),$&&(J.position="sticky",J.right=m);var q={};re&&(q.textAlign=re);var he,pe=Y===!0?{showTitle:!0}:Y;pe&&(pe.showTitle||me==="header")&&(typeof Be=="string"||typeof Be=="number"?he=Be.toString():F.isValidElement(Be)&&typeof Be.props.children=="string"&&(he=Be.props.children));var Ke=Object(G.a)(Object(G.a)(Object(G.a)({title:he},We),U),{},{colSpan:it&&it!==1?it:null,rowSpan:ne&&ne!==1?ne:null,className:M()(Oe,t,(a={},Object(se.a)(a,"".concat(Oe,"-fix-left"),k),Object(se.a)(a,"".concat(Oe,"-fix-left-first"),c),Object(se.a)(a,"".concat(Oe,"-fix-left-last"),L),Object(se.a)(a,"".concat(Oe,"-fix-right"),$),Object(se.a)(a,"".concat(Oe,"-fix-right-first"),N),Object(se.a)(a,"".concat(Oe,"-fix-right-last"),T),Object(se.a)(a,"".concat(Oe,"-ellipsis"),Y),Object(se.a)(a,"".concat(Oe,"-with-append"),P),Object(se.a)(a,"".concat(Oe,"-fix-sticky"),(k||$)&&ge),a),U.className,at),style:Object(G.a)(Object(G.a)(Object(G.a)(Object(G.a)({},U.style),q),J),ht),ref:v(n)?o:null});return F.createElement(n,Object.assign({},Ke),P,Be)}var s=F.forwardRef(u);s.displayName="Cell";var i=F.memo(s,function(A,o){return o.shouldCellUpdate?!o.shouldCellUpdate(o.record,A.record):!1});_e.a=i},hQp1:function(ct,_e,j){"use strict";j.d(_e,"a",function(){return G});var se;(function(D){D.FirstPage="firstPage",D.PrevPage="prevPage",D.NextPage="nextPage"})(se||(se={}));var G;(function(D){D[D.Single=0]="Single",D[D.Multiple=1]="Multiple",D[D.Judge=2]="Judge",D[D.Fill=3]="Fill",D[D.Subjective=4]="Subjective",D[D.Shixun=5]="Shixun",D[D.Program=6]="Program",D[D.Combine=7]="Combine"})(G||(G={}))},hW8S:function(ct,_e,j){"use strict";j.d(_e,"a",function(){return V}),j.d(_e,"c",function(){return F}),j.d(_e,"b",function(){return O});var se=j("VTBJ"),G=j("Ff2n"),D=j("Kwbf"),V="RC_TABLE_INTERNAL_COL_DEFINE";function F(X){var M=X.expandable,e=Object(G.a)(X,["expandable"]);return"expandable"in X?Object(se.a)(Object(se.a)({},e),M):e}function O(X){return Object.keys(X).reduce(function(M,e){return(e.substr(0,5)==="data-"||e.substr(0,5)==="aria-")&&(M[e]=X[e]),M},{})}},ic2d:function(ct,_e,j){"use strict";j.d(_e,"a",function(){return V});var se=j("FWmy"),G=j("746U");class D{constructor(){this.data=new Map}add(F,O){se.a(G.l(F)),se.a(G.k(O)),se.a(!this.data.has(F),"There is already an extension with this id"),this.data.set(F,O)}as(F){return this.data.get(F)||null}}const V=new D},k5F3:function(ct,_e,j){"use strict";var se=j("g9YV"),G=j("wCAj"),D=j("9og8"),V=j("oBTY"),F=j("k1fw"),O=j("tJVT"),X=j("WmNS"),M=j.n(X),e=j("q1tI"),R=j.n(e),g=j("Ty5D"),v=j("9kvl"),u=j("uJ6K"),s=j.n(u),i=j("V0Rq"),A=j("9Bee"),o=j("1vsH"),a=function(t){var y,_,E,B,C=t.isPreview,h=C===void 0?!1:C,n=t.isExportBlank,l=n===void 0?!1:n,d=t.activeTabs,b=t.exercise,m=t.globalSetting,c=t.loading,L=t.user,N=t.dispatch,T=Object(g.i)(),P=L.userInfo,W=Object(e.useState)(),U=Object(O.a)(W,2),Y=U[0],re=U[1],me=Object(e.useState)(),ge=Object(O.a)(me,2),Oe=ge[0],Se=ge[1],Be=Object(e.useRef)(null),Ne=Object(e.useState)(21),ke=Object(O.a)(Ne,2),Ce=ke[0],ve=ke[1];Object(e.useEffect)(function(){Object(o.P)(d)||d==="2"&&Ye()},[T.userId,T.coursesId,T.exerciseId,T.categoryId,d]),Object(e.useEffect)(function(){Be.current&&ve(Be.current.clientHeight)},[Be.current]),Object(e.useEffect)(function(){var it;if((it=b.exerciseExportHeadData)!==null&&it!==void 0&&it.title){var ne=b.exerciseExportHeadData;re(Object(F.a)({},ne||{}));var J=ne||{},k=J.table,$,q;(k!=null&&k.total_singles_scores||k!=null&&k.total_doubles_scores||k!=null&&k.total_nulls_scores||k!=null&&k.total_judges_scores||k!=null&&k.total_pros_scores||k!=null&&k.total_shixuns_scores||k!=null&&k.total_mains_scores||k!=null&&k.total_combination_scores)&&($=Number(k==null?void 0:k.total_singles_scores)+Number(k==null?void 0:k.total_doubles_scores)+Number(k==null?void 0:k.total_nulls_scores)+Number(k==null?void 0:k.total_judges_scores)+Number(k==null?void 0:k.total_pros_scores)+Number(k==null?void 0:k.total_shixuns_scores)+Number(k==null?void 0:k.total_mains_scores)+Number(k==null?void 0:k.total_combination_scores)),(k!=null&&k.singles_scores||k!=null&&k.doubles_scores||k!=null&&k.nulls_scores||k!=null&&k.judges_scores||k!=null&&k.pros_scores||k!=null&&k.shixuns_scores||k!=null&&k.mains_scores||k!=null&&k.combination_scores)&&(q=Number(k==null?void 0:k.singles_scores)+Number(k==null?void 0:k.doubles_scores)+Number(k==null?void 0:k.nulls_scores)+Number(k==null?void 0:k.judges_scores)+Number(k==null?void 0:k.pros_scores)+Number(k==null?void 0:k.shixuns_scores)+Number(k==null?void 0:k.mains_scores)+Number(k==null?void 0:k.combination_scores));var he=[{key:"1",name:"\u5E94\u5F97\u5206",singles_score:k==null?void 0:k.total_singles_scores,doubles_score:k==null?void 0:k.total_doubles_scores,nulls_score:k==null?void 0:k.total_nulls_scores,judges_score:k==null?void 0:k.total_judges_scores,pros_score:k==null?void 0:k.total_pros_scores,shixuns_score:k==null?void 0:k.total_shixuns_scores,mains_score:k==null?void 0:k.total_mains_scores,total_combination_scores:k==null?void 0:k.total_combination_scores,total_score:$},{key:"2",name:"\u5B9E\u5F97\u5206",singles_score:k==null?void 0:k.singles_scores,doubles_score:k==null?void 0:k.doubles_scores,nulls_score:k==null?void 0:k.nulls_scores,judges_score:k==null?void 0:k.judges_scores,pros_score:k==null?void 0:k.pros_scores,shixuns_score:k==null?void 0:k.shixuns_scores,mains_score:k==null?void 0:k.mains_scores,total_combination_scores:k==null?void 0:k.combination_scores,total_score:q},{key:"3",name:"\u8BC4\u5377\u4EBA"}],pe=[{key:"1",name:"\u5E94\u5F97\u5206",singles_score:k==null?void 0:k.total_singles_scores,doubles_score:k==null?void 0:k.total_doubles_scores,nulls_score:k==null?void 0:k.total_nulls_scores,judges_score:k==null?void 0:k.total_judges_scores,pros_score:k==null?void 0:k.total_pros_scores,shixuns_score:k==null?void 0:k.total_shixuns_scores,mains_score:k==null?void 0:k.total_mains_scores,total_combination_scores:k==null?void 0:k.total_combination_scores,total_score:$},{key:"2",name:"\u5B9E\u5F97\u5206"},{key:"3",name:"\u8BC4\u5377\u4EBA"}];Se(Object(V.a)(l?pe:he))}},[b.exerciseExportHeadData]);var Ye=function(){var it=Object(D.a)(M.a.mark(function ne(){var J,k,$,q,he,pe,Ke,Je;return M.a.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:return J={id:T.exerciseId||T.categoryId,identify:(P==null?void 0:P.login)||null},Ze.next=3,Object(i.v)(J);case 3:k=Ze.sent,re(k||{}),$=k||{},q=$.table,(q!=null&&q.total_singles_scores||q!=null&&q.total_doubles_scores||q!=null&&q.total_nulls_scores||q!=null&&q.total_judges_scores||q!=null&&q.total_pros_scores||q!=null&&q.total_shixuns_scores||q!=null&&q.total_mains_scores||q!=null&&q.total_combination_scores)&&(he=Number(q==null?void 0:q.total_singles_scores)+Number(q==null?void 0:q.total_doubles_scores)+Number(q==null?void 0:q.total_nulls_scores)+Number(q==null?void 0:q.total_judges_scores)+Number(q==null?void 0:q.total_pros_scores)+Number(q==null?void 0:q.total_shixuns_scores)+Number(q==null?void 0:q.total_mains_scores)+Number(q==null?void 0:q.total_combination_scores)),(q!=null&&q.singles_scores||q!=null&&q.doubles_scores||q!=null&&q.nulls_scores||q!=null&&q.judges_scores||q!=null&&q.pros_scores||q!=null&&q.shixuns_scores||q!=null&&q.mains_scores||q!=null&&q.combination_scores)&&(pe=Number(q==null?void 0:q.singles_scores)+Number(q==null?void 0:q.doubles_scores)+Number(q==null?void 0:q.nulls_scores)+Number(q==null?void 0:q.judges_scores)+Number(q==null?void 0:q.pros_scores)+Number(q==null?void 0:q.shixuns_scores)+Number(q==null?void 0:q.mains_scores)+Number(q==null?void 0:q.combination_scores)),Ke=[{key:"1",name:"\u5E94\u5F97\u5206",singles_score:q==null?void 0:q.total_singles_scores,doubles_score:q==null?void 0:q.total_doubles_scores,nulls_score:q==null?void 0:q.total_nulls_scores,judges_score:q==null?void 0:q.total_judges_scores,pros_score:q==null?void 0:q.total_pros_scores,shixuns_score:q==null?void 0:q.total_shixuns_scores,mains_score:q==null?void 0:q.total_mains_scores,total_combination_scores:q==null?void 0:q.total_combination_scores,total_score:he},{key:"2",name:"\u5B9E\u5F97\u5206",singles_score:q==null?void 0:q.singles_scores,doubles_score:q==null?void 0:q.doubles_scores,nulls_score:q==null?void 0:q.nulls_scores,judges_score:q==null?void 0:q.judges_scores,pros_score:q==null?void 0:q.pros_scores,shixuns_score:q==null?void 0:q.shixuns_scores,mains_score:q==null?void 0:q.mains_scores,total_combination_scores:q==null?void 0:q.combination_scores,total_score:pe},{key:"3",name:"\u8BC4\u5377\u4EBA"}],Je=[{key:"1",name:"\u5E94\u5F97\u5206"},{key:"2",name:"\u5B9E\u5F97\u5206"},{key:"3",name:"\u8BC4\u5377\u4EBA"}],Se(l?Je:Ke);case 11:case"end":return Ze.stop()}},ne)}));return function(){return it.apply(this,arguments)}}(),ht=[{width:"10%",title:"\u9898\u578B",align:"center",dataIndex:"name",render:function(ne){return R.a.createElement("a",null,ne)}},{width:"10%",title:"\u5355\u9009\u9898",align:"center",dataIndex:"singles_score",render:function(ne){return R.a.createElement("a",null,ne==="0.0"?0:ne)}},{width:"10%",title:"\u591A\u9009\u9898",align:"center",dataIndex:"doubles_score",render:function(ne){return R.a.createElement("a",null,ne==="0.0"?0:ne)}},{width:"10%",title:"\u586B\u7A7A\u9898",align:"center",dataIndex:"nulls_score",render:function(ne){return R.a.createElement("a",null,ne==="0.0"?0:ne)}},{width:140,title:"\u5224\u65AD\u9898",align:"center",dataIndex:"judges_score",render:function(ne){return R.a.createElement("a",null,ne==="0.0"?0:ne)}},{width:"10%",title:"\u7F16\u7A0B\u9898",align:"center",dataIndex:"pros_score",render:function(ne){return R.a.createElement("a",null,ne==="0.0"?0:ne)}},{width:"10%",title:"\u5B9E\u8BAD\u9898",align:"center",dataIndex:"shixuns_score",render:function(ne){return R.a.createElement("a",null,ne==="0.0"?0:ne)}},{width:"10%",title:"\u7B80\u7B54\u9898",align:"center",dataIndex:"mains_score",render:function(ne){return R.a.createElement("a",null,ne==="0.0"?0:ne)}},{width:"10%",title:"\u7EC4\u5408\u9898",align:"center",dataIndex:"total_combination_scores",render:function(ne){return R.a.createElement("a",null,ne==="0.0"?0:ne)}},{width:"10%",title:"\u603B\u5206",align:"center",dataIndex:"total_score",render:function(ne){return R.a.createElement("a",null,ne==="0.0"?0:ne)}}],at=Y||{},We=at.exercise_header;return R.a.createElement(R.a.Fragment,null,((We==null?void 0:We.show_user)||(We==null?void 0:We.show_no)||(We==null?void 0:We.show_group))&&R.a.createElement("section",{className:s.a.glassSeal},(We==null?void 0:We.show_user)&&R.a.createElement("span",null,"\u59D3\u540D\uFF1A",R.a.createElement("span",null,Y==null?void 0:Y.user)),(We==null?void 0:We.show_no)&&R.a.createElement("span",null,"\u5B66\u53F7\uFF1A",R.a.createElement("span",null,Y==null?void 0:Y.student_id)),(We==null?void 0:We.show_group)&&R.a.createElement("span",null,"\u4E13\u4E1A\u73ED\u7EA7\uFF1A",R.a.createElement("span",null,Y==null?void 0:Y.group_name))),R.a.createElement("section",{className:"".concat(s.a.wrap," ").concat(h?"pl20":""," ")},(Y==null?void 0:Y.photo_url)&&R.a.createElement("img",{className:s.a.img,src:Y==null?void 0:Y.photo_url}),(We==null?void 0:We.show_title)&&R.a.createElement("p",{className:"font16 tc c-grey-333"},R.a.createElement("strong",null,Y==null?void 0:Y.title)),(We==null?void 0:We.show_body)&&((b==null||((y=b.exerciseExportHeadData)===null||y===void 0)?void 0:y.exercise_description)||(b==null||((_=b.commonHeader)===null||_===void 0)?void 0:_.exercise_description))&&R.a.createElement("span",{ref:Be,style:{justifyContent:Ce===21?"center":"left",wordBreak:"break-all",display:"flex",textAlign:"left"},className:"tc c-grey-333"},"\u8BD5\u5377\u987B\u77E5\uFF1A".concat((b==null||((E=b.exerciseExportHeadData)===null||E===void 0)?void 0:E.exercise_description)||(b==null||((B=b.commonHeader)===null||B===void 0)?void 0:B.exercise_description))),(We==null?void 0:We.show_info)&&R.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"),(We==null?void 0:We.show_desc)&&R.a.createElement("div",{className:"mt10"},R.a.createElement("p",{className:"font16"},"\u8003\u8BD5\u8BF4\u660E\uFF1A"),R.a.createElement(A.a,{value:Y==null?void 0:Y.description})),(We==null?void 0:We.show_table)&&R.a.createElement("div",{className:"mt10"},R.a.createElement(G.a,{className:s.a.table,columns:ht,dataSource:Object(V.a)(Oe||[]),bordered:!0,pagination:!1}))))};_e.a=Object(v.a)(function(r){var t=r.exercise,y=r.loading,_=r.user,E=r.globalSetting;return{exercise:t,globalSetting:E,user:_,loading:y.effects}})(a)},"kVK+":function(ct,_e){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */_e.read=function(j,se,G,D,V){var F,O,X=V*8-D-1,M=(1<<X)-1,e=M>>1,R=-7,g=G?V-1:0,v=G?-1:1,u=j[se+g];for(g+=v,F=u&(1<<-R)-1,u>>=-R,R+=X;R>0;F=F*256+j[se+g],g+=v,R-=8);for(O=F&(1<<-R)-1,F>>=-R,R+=D;R>0;O=O*256+j[se+g],g+=v,R-=8);if(F===0)F=1-e;else{if(F===M)return O?NaN:(u?-1:1)*Infinity;O=O+Math.pow(2,D),F=F-e}return(u?-1:1)*O*Math.pow(2,F-D)},_e.write=function(j,se,G,D,V,F){var O,X,M,e=F*8-V-1,R=(1<<e)-1,g=R>>1,v=V===23?Math.pow(2,-24)-Math.pow(2,-77):0,u=D?0:F-1,s=D?1:-1,i=se<0||se===0&&1/se<0?1:0;for(se=Math.abs(se),isNaN(se)||se===Infinity?(X=isNaN(se)?1:0,O=R):(O=Math.floor(Math.log(se)/Math.LN2),se*(M=Math.pow(2,-O))<1&&(O--,M*=2),O+g>=1?se+=v/M:se+=v*Math.pow(2,1-g),se*M>=2&&(O++,M/=2),O+g>=R?(X=0,O=R):O+g>=1?(X=(se*M-1)*Math.pow(2,V),O=O+g):(X=se*Math.pow(2,g-1)*Math.pow(2,V),O=0));V>=8;j[G+u]=X&255,u+=s,X/=256,V-=8);for(O=O<<V|X,e+=V;e>0;j[G+u]=O&255,u+=s,O/=256,e-=8);j[G+u-s]|=i*128}},mrIW:function(ct,_e,j){"use strict";j.r(_e);var se=j("+L6B"),G=j("2/Rp"),D=j("sPJy"),V=j("bE4q"),F=j("oBTY"),O=j("/zsF"),X=j("PArb"),M=j("sRBo"),e=j("kaz8"),R=j("14J3"),g=j("BMrR"),v=j("jCWc"),u=j("kPKH"),s=j("7Kak"),i=j("9yH6"),A=j("2qtc"),o=j("kLXV"),a=j("k1fw"),r=j("9og8"),t=j("tJVT"),y=j("PpiC"),_=j("5NDa"),E=j("5rEg"),B=j("WmNS"),C=j.n(B),h=j("q1tI"),n=j.n(h),l=j("Ty5D"),d=j("55Ip"),b=j("9kvl"),m=j("xOOu"),c=j.n(m),L=j("jhfD"),N=j("dF/Y"),T=j("q5bB"),P=j.n(T),W=j("9Bee"),U=j("1vsH"),Y=j("cw1j"),re=j("g9YV"),me=j("wCAj"),ge=j("giR+"),Oe=j("fyUT"),Se=j("miYZ"),Be=j("tsqr"),Ne=j("5Dmo"),ke=j("3S7+"),Ce=j("xKgJ"),ve=j("wd/R"),Ye=j.n(ve),ht=j("ZW9T"),at=j("tJYV"),We=j.n(at),it=function(je){var Le,Fe,we,ue=je.item,ce=je.answerData,te=je.hasChangeScore,ie=te===void 0?!0:te,le=je.autoHeight,fe=je.saveChangeScore,Ie=fe===void 0?function(){}:fe,Pe=Object(h.useState)([]),qe=Object(t.a)(Pe,2),dt=qe[0],lt=qe[1],st=Object(h.useState)([]),Lt=Object(t.a)(st,2),mt=Lt[0],tt=Lt[1];Object(h.useEffect)(function(){var yt;if(!(ue!=null&&(yt=ue.shixun_details)!==null&&yt!==void 0&&yt.length))return;for(var Et=[],wt=[],Mt=0;Mt<(ue==null||((ut=ue.shixun_details)===null||ut===void 0)?void 0:ut.length);Mt++){for(var ut,lr,At,gt=0;gt<(ue==null?void 0:ue.shixun_details[Mt].stage_list.length);gt++){var Nt,ir,yr,br,Rr,Dr=ue==null?void 0:ue.shixun_details[Mt].stage_list[gt];Et.push(Object(a.a)(Object(a.a)({},Dr),{operation:ue==null||((Nt=ue.shixun_details)===null||Nt===void 0||((ir=Nt[Mt])===null||ir===void 0||((yr=ir.shixun_detail)===null||yr===void 0||((br=yr[0])===null||br===void 0))))?void 0:br.game_identifier,shixun_challenge_id:ue==null||((Rr=ue.shixun_details[Mt])===null||Rr===void 0)?void 0:Rr.shixun_challenge_id}))}if(ue!=null&&(lr=ue.shixun_details)!==null&&lr!==void 0&&(At=lr[Mt])!==null&&At!==void 0&&At.shixun_detail){var Ht,pr,Lr;wt.push(ue==null||((Ht=ue.shixun_details)===null||Ht===void 0||((pr=Ht[Mt])===null||pr===void 0||((Lr=pr.shixun_detail)===null||Lr===void 0)))?void 0:Lr[0])}}tt(wt),lt([].concat(Et))},[ue==null?void 0:ue.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(Et){return n.a.createElement(ke.a,{title:Et},n.a.createElement("span",{className:"overflowHidden1",style:{maxWidth:"400px"},title:Et&&Et.length>25?Et:""},Et))}},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"evaluate_count",key:"evaluate_count",align:"center",render:function(Et,wt){return n.a.createElement("span",null,wt.evaluate_count?wt.evaluate_count:n.a.createElement("span",{className:"color-grey-9"},"--"))}},{title:"\u5B8C\u6210\u65F6\u95F4",key:"finished_time",dataIndex:"finished_time",align:"center",render:function(Et,wt){var Mt=!1;return wt.finished_time&&ce!==null&&ce!==void 0&&ce.exercise&&ce!==null&&ce!==void 0&&ce.exercise_answer_user&&((ce==null?void 0:ce.exercise.time)===-1?Mt=Ye()(ce==null?void 0:ce.exercise.end_time).isBefore(wt.finished_time):Mt=Ye()(ce==null?void 0:ce.exercise_answer_user.start_at).add(ce==null?void 0:ce.exercise.time,"m").isBefore(wt.finished_time)),n.a.createElement("span",null,wt.finished_time||n.a.createElement("span",{className:"c-grey-999"},"--"),n.a.createElement("span",{className:"c-orange-ff9 "},Mt?"\uFF08\u5DF2\u8D85\u65F6\uFF09":""))}},{title:"\u8017\u65F6",dataIndex:"time_consuming",key:"time_consuming",align:"center",render:function(Et,wt){return n.a.createElement("span",null,wt.time_consuming||n.a.createElement("span",{className:"color-grey-9"},"--"))}},{title:"\u67E5\u770B\u7B54\u6848",dataIndex:"view_answer",key:"view_answer",align:"center",render:function(Et,wt){return n.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(Et,wt){return n.a.createElement("span",null,n.a.createElement("span",{className:"c-orange"},wt.user_score),"/",wt.game_score)}},ie&&{title:"\u8C03\u5206",dataIndex:"user_score",key:"user_score",align:"center",render:function(Et,wt,Mt){return n.a.createElement(Oe.a,{min:0,max:Number(wt.game_score),defaultValue:Et,onBlur:function(){var ut=Object(r.a)(C.a.mark(function lr(At){var gt;return C.a.wrap(function(ir){for(;;)switch(ir.prev=ir.next){case 0:if(!(At.target.value!=Et)){ir.next=6;break}return ir.next=3,Ie(Object(a.a)(Object(a.a)({},ue),{shixun_challenge_id:wt.shixun_challenge_id,shixunScore:At.target.value}));case 3:gt=ir.sent,console.log("res: ",gt),gt!=null&>.question_comments&&Be.b.success("\u5DF2\u4FEE\u6539\u5F53\u524D\u8BC4\u5206");case 6:case"end":return ir.stop()}},lr)}));return function(lr){return ut.apply(this,arguments)}}()})}}].filter(function(yt){return!!yt}),Jt=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"key",width:"127px",key:"key",align:"center",render:function(Et,wt){return n.a.createElement("span",null,wt.key)}},{title:"\u8BE6\u7EC6\u4FE1\u606F",dataIndex:"error_msg",key:"error_msg",align:"center",render:function(Et,wt){return n.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(Et,wt){return n.a.createElement("span",null,wt.updated_at?wt.updated_at:"--")}}],Ot={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1};return n.a.createElement(n.a.Fragment,null,((ce==null||((Le=ce.exercise)===null||Le===void 0)?void 0:Le.student_commit_status)!==0||(ce==null||((Fe=ce.exercise)===null||Fe===void 0)?void 0:Fe.user_exercise_status)!==0)&&n.a.createElement("div",{className:"mt15"},n.a.createElement("p",{className:"font16 c-grey-666"},"\u9636\u6BB5\u6210\u7EE9"),!!(dt!=null&&dt.length)&&n.a.createElement(me.a,{columns:er,dataSource:dt,pagination:!1})),!!(mt!=null&&mt.length)&&n.a.createElement(n.a.Fragment,null,n.a.createElement("p",{className:"font16 c-grey-666 mt10"},"\u5B9E\u8BAD\u8BE6\u60C5"),mt==null?void 0:mt.map(function(yt,Et){var wt;return n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:"mt5"},n.a.createElement("span",{className:"font16 mr15"}," ","\u7B2C",yt.position,"\u5173"),n.a.createElement(d.a,{className:"current c-black font16",to:"/tasks/".concat(yt.game_identifier)},yt.name)),!!(yt!=null&&(wt=yt.outputs)!==null&&wt!==void 0&&wt.length)&&n.a.createElement(me.a,{bordered:!0,dataSource:yt.outputs.map(function(Mt){return{key:Mt.position,error_msg:Mt.output_detail,updated_at:Mt.updated_at}}),columns:Jt,pagination:!1}),(yt==null?void 0:yt.st)===0&&yt.passed_code&&n.a.createElement("div",{className:We.a.shixunWrp},n.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",n.a.createElement("span",{className:"c-light-black"},yt.path)),n.a.createElement(ht.b,{height:300,autoHeight:le,language:"python",theme:"default",value:yt.passed_code,options:Ot})))})),Object(Ce.s)()&&n.a.createElement(W.a,{className:"c-grey-999 mt20 mb20",value:ue==null?void 0:ue.question_title}),ue==null||((we=ue.shixun)===null||we===void 0)?void 0:we.map(function(yt,Et){return n.a.createElement("p",{className:"font16 c-grey-666 mb5"},n.a.createElement("span",{className:"mr20"},"\u7B2C",yt==null?void 0:yt.challenge_position,"\u5173 ",yt==null?void 0:yt.challenge_name),n.a.createElement("span",null,yt==null?void 0:yt.challenge_score,"\u5206"))}),n.a.createElement("div",{className:"mb15"}))},ne=it,J=j("J66h"),k=j("ZPm4"),$=j.n(k),q=function(je){var Le,Fe,we,ue,ce,te=je.item,ie=je.answerData,le=je.autoHeight,fe=Object(h.useState)([]),Ie=Object(t.a)(fe,2),Pe=Ie[0],qe=Ie[1];Object(h.useEffect)(function(){var st;if((te==null||((st=te.evaluate_codes)===null||st===void 0)?void 0:st.length)>0){var Lt;qe(te==null||((Lt=te.evaluate_codes)===null||Lt===void 0)?void 0:Lt.map(function(mt,tt){return{key:tt+1,error_msg:mt!=null&&mt.error_msg?J.Base64.decode(mt==null?void 0:mt.error_msg):"",created_at:mt.created_at}}))}else qe([{key:"--",error_msg:"--"}])},[te==null?void 0:te.evaluate_codes]);var dt=[{title:"\u8BC4\u6D4B\u5E8F\u53F7",dataIndex:"key",width:"127px",key:"key",align:"center",render:function(Lt,mt){return n.a.createElement("span",null,mt.key)}},{title:"\u8BC4\u6D4B\u65F6\u95F4",dataIndex:"created_at",key:"created_at",align:"center",width:200,render:function(Lt,mt){return n.a.createElement("span",null,mt.created_at?Ye()(mt.created_at).format("YYYY-MM-DD HH:mm"):"--")}},{title:"\u8BC4\u6D4B\u7ED3\u679C",dataIndex:"error_msg",key:"error_msg",align:"center",render:function(Lt,mt){var tt;return n.a.createElement("span",null,mt.error_msg?((tt=mt.error_msg)===null||tt===void 0?void 0:tt.length)>1e3?mt.error_msg.substring(0,1e3)+"...":mt.error_msg:"--")}}],lt={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1};return n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:"mt15 mb15"},n.a.createElement(W.a,{value:te==null?void 0:te.description})),(!!(ie!=null&&(Le=ie.exercise)!==null&&Le!==void 0&&Le.student_commit_status)&&(ie==null||((Fe=ie.exercise)===null||Fe===void 0)?void 0:Fe.student_commit_status)!==0||!!(ie!=null&&(we=ie.exercise)!==null&&we!==void 0&&we.user_exercise_status)&&(ie==null||((ue=ie.exercise)===null||ue===void 0)?void 0:ue.user_exercise_status)!==0)&&n.a.createElement(me.a,{className:"mt5",bordered:!0,dataSource:Pe,columns:dt,pagination:!1}),!!(te!=null&&(ce=te.user_answer)!==null&&ce!==void 0&&ce.length)&&(te==null?void 0:te.passed_code)&&n.a.createElement("aside",{className:$.a.shixunWrp},n.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"),n.a.createElement(ht.b,{style:{border:"1px solid #ccc"},height:300,language:"python",theme:"vs-light",value:te!=null&&te.passed_code?J.Base64.decode(te==null?void 0:te.passed_code):"",autoHeight:le,options:lt})))},he=q,pe=j("k5F3"),Ke=j("1n7x"),Je=j.n(Ke),ze=j("hQp1"),Ze=30,nt=E.a.TextArea,pt=["\u5355\u9009\u9898","\u591A\u9009\u9898","\u5224\u65AD\u9898","\u586B\u7A7A\u9898","\u7B80\u7B54\u9898","\u5B9E\u8BAD\u9898","\u7F16\u7A0B\u9898"],xe=function(je){var Le,Fe,we,ue,ce,te,ie,le=je.exercise,fe=je.globalSetting,Ie=je.loading,Pe=je.user,qe=je.dispatch,dt=Object(y.a)(je,["exercise","globalSetting","loading","user","dispatch"]),lt=Object(l.i)(),st=Pe.userInfo,Lt=Object(h.useState)({}),mt=Object(t.a)(Lt,2),tt=mt[0],er=mt[1],Jt=Object(h.useRef)(),Ot=Object(h.useRef)(!1),yt=Object(h.useState)(!1),Et=Object(t.a)(yt,2),wt=Et[0],Mt=Et[1],ut=Object(h.useState)({}),lr=Object(t.a)(ut,2),At=lr[0],gt=lr[1],Nt=Object(h.useState)(new c.a),ir=Object(t.a)(Nt,2),yr=ir[0],br=ir[1],Rr=Object(h.useState)([]),Dr=Object(t.a)(Rr,2),Ht=Dr[0],pr=Dr[1],Lr=Object(h.useState)(!1),Cr=Object(t.a)(Lr,2),Qr=Cr[0],Ur=Cr[1],ae=Object(h.useState)(!1),oe=Object(t.a)(ae,2),de=oe[0],Te=oe[1],Ve=Object(h.useState)(!1),et=Object(t.a)(Ve,2),Q=et[0],p=et[1],w=Object(h.useState)(!1),H=Object(t.a)(w,2),Z=H[0],K=H[1],ye=Object(h.useState)(!1),He=Object(t.a)(ye,2),rt=He[0],ot=He[1];Object(h.useEffect)(function(){st!=null&&st.login&&Tt();try{pr(JSON.parse(localStorage.total_exercise_users))}catch($t){}},[lt.userId,lt.coursesId,lt.exerciseId,st]);var Ge=function(){document.querySelectorAll("canvas").forEach(function(De){(!De.clientWidth||!De.clientHeight)&&De.remove()})},_t=function(){document.body.scrollIntoView()},vt=function(De){var Qt,Vt,Dt,jt=De==null||((Qt=De.exercise_answer_user)===null||Qt===void 0)?void 0:Qt.user_id;if(De!=null&&(Vt=De.exercise)!==null&&Vt!==void 0&&Vt.question_random||De!=null&&(Dt=De.exercise)!==null&&Dt!==void 0&&Dt.choice_random){var Kt,Ar=1;De.exercise.question_random=De==null||((Kt=De.exercise_question_types)===null||Kt===void 0)?void 0:Kt.map(function(zt){var sr,rr;return De!=null&&(sr=De.exercise)!==null&&sr!==void 0&&sr.choice_random&&((zt.question_type===0||zt.question_type===1)&&zt.items.map(function(Ut){return Ut.question_choices=Object(U.U)(Ut.question_choices,jt),Ut}),zt.question_type===7&&zt.items.forEach(function(Ut){Ut.sub_exercise_questions.forEach(function(Wt){Wt.question_choices=Object(U.U)(Wt.question_choices,jt)})})),De!=null&&(rr=De.exercise)!==null&&rr!==void 0&&rr.question_random&&(zt.items=Object(U.U)(zt.items,jt)),zt.items.map(function(Ut){return Ut.question_num=Ar,Ar++,Ut}),zt})}},Tt=function(){var $t=Object(r.a)(C.a.mark(function De(){var Qt;return C.a.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:if(qe({type:"exercise/getExerciseExportHeadData",payload:{id:lt.exerciseId||lt.categoryId,identify:lt.userId||null}}),!lt.userId){Dt.next=9;break}return Dt.next=4,qe({type:"exercise/getReviewExercise",payload:{exerciseId:lt.exerciseId,login:lt.userId}});case 4:Qt=Dt.sent,vt(Qt),Ot.current=!1,Dt.next=13;break;case 9:return Dt.next=11,qe({type:"exercise/editExercise",payload:{coursesId:lt.coursesId,categoryId:lt.exerciseId}});case 11:Qt=Dt.sent,Ot.current=!0;case 13:gt(Object(a.a)({},Qt||{})),setTimeout(function(){var jt=1,Kt=document.getElementById("export-id-all"),Ar=860,zt=0},1500);case 15:case"end":return Dt.stop()}},De)}));return function(){return $t.apply(this,arguments)}}(),Pt=function(){yr.generateAsync({type:"blob"}).then(function(De){var Qt,Vt,Dt,jt=document.createElement("a");jt.href=window.URL.createObjectURL(De),jt.download=Object.keys(yr.files).length>1?At==null||((Qt=At.exercise)===null||Qt===void 0)?void 0:Qt.exercise_name:((le==null||((Vt=le.exerciseExportHeadData)===null||Vt===void 0)?void 0:Vt.user)||(At==null||((Dt=At.exercise)===null||Dt===void 0)?void 0:Dt.exercise_name))+".zip",document.body.appendChild(jt);var Kt=document.createEvent("MouseEvents");Kt.initEvent("click",!1,!1),jt.dispatchEvent(Kt),document.body.removeChild(jt),br(new c.a)}),Te(!1),K(!1),p(!1),Ur(!1)},ur=function(){var $t=Object(r.a)(C.a.mark(function De(Qt){var Vt,Dt,jt,Kt,Ar,zt,sr,rr,Ut,Wt,Ft,tr,Zt;return C.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return Zt=function(){return Zt=Object(r.a)(C.a.mark(function gr(){var Kr;return C.a.wrap(function(Nr){for(;;)switch(Nr.prev=Nr.next){case 0:return Dt++,Ot.current=!1,_t(),Nr.next=5,qe({type:"exercise/getExerciseExportHeadData",payload:{id:lt.exerciseId||lt.categoryId,identify:Ht[Dt-1].user_login}});case 5:return Nr.next=7,qe({type:"exercise/getReviewExercise",payload:{exerciseId:lt.exerciseId,login:Ht[Dt-1].user_login}});case 7:Kr=Nr.sent,vt(Kr),gt(Object(a.a)({},Kr||{})),setTimeout(Object(r.a)(C.a.mark(function fr(){var qr,Xt,Sr;return C.a.wrap(function($r){for(;;)switch($r.prev=$r.next){case 0:Ge(),qr=Je()(),Xt=C.a.mark(function un(Yr){return C.a.wrap(function(mn){for(;;)switch(mn.prev=mn.next){case 0:return mn.next=2,qr.set(rr).from(Kt[Yr]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var Qn=Object(r.a)(C.a.mark(function Jr(cn){return C.a.wrap(function(gn){for(;;)switch(gn.prev=gn.next){case 0:if(!(Yr<Kt.length-1)){gn.next=3;break}return gn.next=3,cn.addPage();case 3:case"end":return gn.stop()}},Jr)}));return function(Jr){return Qn.apply(this,arguments)}}());case 2:case"end":return mn.stop()}},un)}),Sr=0;case 4:if(!(Sr<Kt.length)){$r.next=9;break}return $r.delegateYield(Xt(Sr),"t0",6);case 6:Sr++,$r.next=4;break;case 9:yr.file("".concat(Ht[Dt-1].user_name,"-").concat(Ye()().format("YYYY-MM-DD HH:mm:ss"),".pdf"),qr.output("blob")),jt.update({content:n.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",n.a.createElement("span",{className:"c-blue"},Dt+1),"/",Ht==null?void 0:Ht.length)}),Dt==(Ht==null?void 0:Ht.length)?(jt.destroy(),Mt(!1),Pt()):tr();case 12:case"end":return $r.stop()}},fr)})),2600);case 11:case"end":return Nr.stop()}},gr)})),Zt.apply(this,arguments)},tr=function(){return Zt.apply(this,arguments)},Qt==="all"?Ot.current=!1:lt.userId||(Ot.current=!0),_t(),Ur(!0),Dt=0,Qt!=="all"&&Mt(!0),jt=o.a.info({width:460,title:n.a.createElement("div",null,"\u6B63\u5728\u5BFC\u51FA\u8BD5\u5377,",n.a.createElement("span",{className:"c-red"},"\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3")),content:Qt==="all"?n.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",n.a.createElement("span",{className:"c-blue"},Dt+1),"/",Ht==null?void 0:Ht.length):null,maskClosable:!1,className:P.a.modal,onOk:function(){}}),Ge(),qt.next=11,new Promise(function(Fr,gr){setTimeout(function(){Fr("")},1e3)});case 11:Kt=Jt.current.children,Ar="".concat(Ye()().format("YYYY-MM-DD HH:mm:ss")),(Vt=le.exerciseExportHeadData)!==null&&Vt!==void 0&&Vt.user&&(Ar="".concat(((zt=le.exerciseExportHeadData)===null||zt===void 0?void 0:zt.student_id)||"").concat((sr=le.exerciseExportHeadData)===null||sr===void 0?void 0:sr.user)),rr={html2canvas:{letterRendering:!0,useCORS:!0,allowTaint:!1},jsPDF:{unit:"in",format:"letter",orientation:"portrait"}},Ut=Je()(),Wt=C.a.mark(function Fr(gr){return C.a.wrap(function(Pr){for(;;)switch(Pr.prev=Pr.next){case 0:return Pr.next=2,Ut.set(rr).from(Kt[gr]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var Nr=Object(r.a)(C.a.mark(function fr(qr){return C.a.wrap(function(Sr){for(;;)switch(Sr.prev=Sr.next){case 0:if(!(gr<Kt.length-1)){Sr.next=3;break}return Sr.next=3,qr.addPage();case 3:case"end":return Sr.stop()}},fr)}));return function(fr){return Nr.apply(this,arguments)}}());case 2:case"end":return Pr.stop()}},Fr)}),Ft=0;case 18:if(!(Ft<Kt.length)){qt.next=23;break}return qt.delegateYield(Wt(Ft),"t0",20);case 20:Ft++,qt.next=18;break;case 23:!!(Ht!=null&&Ht.length)&&Qt==="all"?tr():(yr.file("".concat(Ar,".pdf"),Ut.output("blob"),{base64:!1}),jt.destroy(),Mt(!1),Pt());case 24:case"end":return qt.stop()}},De)}));return function(Qt){return $t.apply(this,arguments)}}(),Gt=function(De){for(var Qt=De.internal.getNumberOfPages(),Vt=1;Vt<=Qt;Vt+=1)De.setPage(Vt),De.setFontSize(9),De.setTextColor("#6a6a6a"),De.text("".concat(Vt," / ").concat(Qt),De.internal.pageSize.getWidth()-20,De.internal.pageSize.getHeight()-6)},ar=function(De,Qt){var Vt,Dt,jt,Kt,Ar,zt,sr,rr,Ut,Wt,Ft,tr,Zt,xr,qt,Fr,gr,Kr,Pr,Nr,fr,qr;return n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{style:{display:"flex"},className:P.a.programTitle},n.a.createElement("span",{style:{flexShrink:0},className:"font18"},Qt,"."),n.a.createElement(W.a,{value:De.question_title}),n.a.createElement("span",{style:{flexShrink:0},className:"font16"},"\uFF08",(De==null?void 0:De.question_type)===7?"\u5171".concat(De==null?void 0:De.sub_q_count,"\u5C0F\u9898"):""," ",De.question_score,"\u5206\uFF09")),De.question_type===ze.a.Single&&n.a.createElement(n.a.Fragment,null,(Vt=De.question_choices)===null||Vt===void 0?void 0:Vt.map(function(Xt,Sr){var kr;return n.a.createElement(g.a,{key:Sr},n.a.createElement(u.a,{flex:"25px"},n.a.createElement("div",{style:{width:25,overflow:"hidden"}},n.a.createElement(i.a,{checked:(kr=De.user_answer)===null||kr===void 0?void 0:kr.includes(Xt.choice_id),style:{width:25}}))),n.a.createElement(u.a,{flex:"1"},n.a.createElement(W.a,{value:Xt.choice_text||""})))})),De.question_type===ze.a.Multiple&&n.a.createElement(n.a.Fragment,null,(Dt=De.question_choices)===null||Dt===void 0?void 0:Dt.map(function(Xt,Sr){var kr;return n.a.createElement(g.a,{key:Sr},n.a.createElement(u.a,{flex:"25px"},n.a.createElement("div",{style:{width:25,overflow:"hidden"}},n.a.createElement(e.a,{checked:(kr=De.user_answer)===null||kr===void 0?void 0:kr.includes(Xt.choice_id),style:{width:25}}))),n.a.createElement(u.a,{flex:"1"},n.a.createElement(W.a,{value:Xt.choice_text||""})))})),De.question_type===ze.a.Judge&&n.a.createElement("div",{className:P.a.flexRow},(jt=De.question_choices)===null||jt===void 0?void 0:jt.map(function(Xt,Sr){var kr;return n.a.createElement(g.a,{key:Sr},n.a.createElement(u.a,{flex:"25px"},n.a.createElement("div",{style:{width:25,overflow:"hidden"}},n.a.createElement(i.a,{checked:(kr=De.user_answer)===null||kr===void 0?void 0:kr.includes(Xt.choice_id),style:{width:25}}))),n.a.createElement(u.a,{flex:"1"},Xt.choice_text))})),De.question_type===ze.a.Fill&&!Ot.current&&n.a.createElement(Y.a,{item:De,answerData:At,changeScoreData:tt,textValue:(Kt=tt[De.q_position])===null||Kt===void 0?void 0:Kt.text,textOnChange:function(Sr){tt[De.q_position].text=Sr,er(Object(a.a)({},tt))},seeAnswerVisible:!1}),De.question_type===ze.a.Shixun&&n.a.createElement(ne,{item:De,answerData:At,hasChangeScore:!1,autoHeight:Qr}),De.question_type===ze.a.Subjective&&De!==null&&De!==void 0&&(Ar=De.user_answer)!==null&&Ar!==void 0&&Ar[0]?n.a.createElement("div",{className:P.a.simpleBg},n.a.createElement("aside",{className:"font14 c-light-primary mb5"},"\u5B66\u751F\u7B54\u9898"),n.a.createElement("div",null,Z?n.a.createElement(W.a,{value:De==null||((zt=De.user_answer_light)===null||zt===void 0)?void 0:zt[0]}):n.a.createElement(W.a,{value:De==null||((sr=De.user_answer)===null||sr===void 0)?void 0:sr[0]}))):null,De.question_type===ze.a.Program&&n.a.createElement(he,{item:De,answerData:At,autoHeight:Qr}),De.question_type===ze.a.Combine&&n.a.createElement(n.a.Fragment,null,(rr=De.sub_exercise_questions)===null||rr===void 0?void 0:rr.map(function(Xt,Sr){var kr,$r;return n.a.createElement("div",{style:{marginLeft:10}},n.a.createElement("span",{style:{fontSize:"16px"}},Qt,".",Sr+1,"\uFF08\u5355\u9009\u9898\uFF09",Xt==null?void 0:Xt.question_title,"\uFF08",Xt==null?void 0:Xt.question_score,"\u5206\uFF09"),(kr=Xt.question_choices)===null||kr===void 0?void 0:kr.map(function(un,Yr){var rn;return n.a.createElement(g.a,{key:Yr},n.a.createElement(u.a,{flex:"25px"},n.a.createElement("div",{style:{width:25,overflow:"hidden"}},n.a.createElement(i.a,{checked:(rn=Xt.user_answer)===null||rn===void 0?void 0:rn.includes(un.choice_id),style:{width:25}}))),n.a.createElement(u.a,{flex:"1"},n.a.createElement(W.a,{value:un.choice_text||""})))}),(Xt==null?void 0:Xt.standard_answer_show)&&de&&n.a.createElement("span",{className:"font16 "},"\u6B63\u786E\u7B54\u6848\uFF1A",Xt==null?void 0:Xt.standard_answer_show),((Xt==null?void 0:Xt.standard_answer_show)||(Xt==null||(($r=Xt.standard_answer)===null||$r===void 0)?void 0:$r.length)>0)&&de&&n.a.createElement(g.a,{style:{marginTop:14}},n.a.createElement("span",{className:"font16 "},"\u89E3\u6790\uFF1A"),n.a.createElement(W.a,{className:P.a.renderHtml,value:(Xt==null?void 0:Xt.analysis)||"\u6682\u65E0\u89E3\u6790"})))})),de&&n.a.createElement("div",{style:{marginTop:10}},(De==null?void 0:De.question_type)<3&&(De==null?void 0:De.standard_answer_show)&&n.a.createElement("span",{className:"font16 "},"\u6B63\u786E\u7B54\u6848\uFF1A",De==null?void 0:De.standard_answer_show),!!(De!=null&&(Ut=De.standard_answer)!==null&&Ut!==void 0&&Ut.length)&&de&&(De==null?void 0:De.question_type)===3&&n.a.createElement("div",null,De==null||((Wt=De.standard_answer)===null||Wt===void 0)?void 0:Wt.map(function(Xt,Sr){return n.a.createElement("div",null,n.a.createElement("span",null,"\u53C2\u8003\u7B54\u6848\uFF1A\uFF08\u586B\u7A7A",Sr+1,"\uFF09:"),n.a.createElement("div",null,n.a.createElement(nt,{autoSize:!0,disabled:!0,value:Xt==null?void 0:Xt.answer_text[0]})))})),(De==null?void 0:De.standard_answer)&&(De==null?void 0:De.question_type)===4&&n.a.createElement("div",null,n.a.createElement("p",{className:"mt10 mb0"},"\u53C2\u8003\u7B54\u6848\uFF1A"),n.a.createElement("div",{style:{border:"1px solid #eee",background:"#f5f5f5",borderRadius:4,padding:5}},n.a.createElement(W.a,{value:De==null||((Ft=De.standard_answer)===null||Ft===void 0)?void 0:Ft[0]}))),(De==null?void 0:De.question_type)<=4&&((De==null?void 0:De.standard_answer_show)||(De==null||((tr=De.standard_answer)===null||tr===void 0)?void 0:tr.length)>0)&&n.a.createElement(g.a,{style:{marginTop:14}},n.a.createElement("span",{className:"font16 "},"\u89E3\u6790\uFF1A"),n.a.createElement(W.a,{className:P.a.renderHtml,value:(De==null?void 0:De.analysis)||"\u6682\u65E0\u89E3\u6790"}))),Q&&!Number.isNaN(parseFloat(De==null?void 0:De.user_score))&&(De==null?void 0:De.question_type)!==ze.a.Shixun&&n.a.createElement("span",null,n.a.createElement("span",{style:{color:"#0152d9"}},"\u5B66\u751F\u5F97\u5206\uFF1A"),De==null?void 0:De.user_score,"\u5206"),Z&&((De==null?void 0:De.question_type)===4||(De==null?void 0:De.question_type)===3||(De==null?void 0:De.question_type)===6)&&n.a.createElement("div",{style:{display:"flex",flexFlow:"column"}},(De==null||((Zt=De.answer_comments)===null||Zt===void 0||((xr=Zt[0])===null||xr===void 0||((qt=xr.user)===null||qt===void 0)))?void 0:qt.name)&&n.a.createElement("span",null,"\u8BC4\u9605\u6559\u5E08\uFF1A",De==null||((Fr=De.answer_comments)===null||Fr===void 0||((gr=Fr[0])===null||gr===void 0||((Kr=gr.user)===null||Kr===void 0)))?void 0:Kr.name," "),(De==null||((Pr=De.answer_comments)===null||Pr===void 0||((Nr=Pr[0])===null||Nr===void 0))?void 0:Nr.comment)&&n.a.createElement("span",null,"\u6559\u5E08\u8BC4\u8BED\uFF1A",De==null||((fr=De.answer_comments)===null||fr===void 0||((qr=fr[0])===null||qr===void 0))?void 0:qr.comment," ")),n.a.createElement(X.a,{style:Ot.current?{marginTop:30}:{}}))},kt=function(De){var Qt=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],Vt=["","\u5341","\u767E","\u5343","\u4E07"];De=parseInt(De);var Dt=function(zt){for(var sr=zt.toString().split("").reverse(),rr="",Ut=0;Ut<sr.length;Ut++)rr=(Ut==0&&sr[Ut]==0||Ut>0&&sr[Ut]==0&&sr[Ut-1]==0?"":Qt[sr[Ut]]+(sr[Ut]==0?Vt[0]:Vt[Ut]))+rr;return rr},jt=Math.floor(De/1e4),Kt=De%1e4;return Kt.toString().length<4&&(Kt="0"+Kt),jt?Dt(jt)+"\u4E07"+Dt(Kt):Dt(De)},Tr=function(De,Qt){return De.category?n.a.createElement("div",null,n.a.createElement("span",{className:"font16 c-light-primary"},kt(De.key+1),"\u3001",De.name),n.a.createElement("span",{className:"c-grey-999"},"\uFF08\u5171",De.count,"\u9898\uFF0C",(De==null?void 0:De.question_type)===7?"\u5305\u542B".concat(De==null?void 0:De.sub_count,"\u5C0F\u9898\uFF1B"):"","\u5171",De.score,"\u5206\uFF09")):ar(De,Qt)},mr=Object(h.useCallback)(function(){var $t,De,Qt,Vt,Dt,jt,Kt,Ar=(le==null||(($t=le.exerciseExportHeadData)===null||$t===void 0||((De=$t.exercise_header)===null||De===void 0))?void 0:De.export_page_num)||40,zt=At==null||((Qt=At.exercise_question_types)===null||Qt===void 0||((Vt=Qt.map(function(rr,Ut){return[Object(a.a)(Object(a.a)({},rr),{},{items:null,category:1,key:Ut})].concat(Object(F.a)(rr.items))}))===null||Vt===void 0))?void 0:Vt.flat(),sr=0;return zt!=null&&zt.length?(Dt=new Array(Math.ceil((zt==null?void 0:zt.length)/Ar)))===null||Dt===void 0||((jt=Dt.fill([]))===null||jt===void 0||((Kt=jt.map(function(rr,Ut){return zt.slice(Ut*Ar,Ut*Ar+Ar)}))===null||Kt===void 0))?void 0:Kt.map(function(rr,Ut){return n.a.createElement("div",{className:"pl60 pr30",style:{minHeight:Ut===0?1e3:"auto"}},Ut===0&&n.a.createElement(n.a.Fragment,null,n.a.createElement(pe.a,{isExportBlank:Ot.current}),n.a.createElement(X.a,{className:P.a.divider})),rr==null?void 0:rr.map(function(Wt,Ft){return Wt.question_title&&++sr,Tr(Wt,sr)}))}):null},[At==null?void 0:At.exercise_question_types,Qr]);return n.a.createElement("section",{className:"edu-container"},n.a.createElement("section",{className:"animated fadeIn"},n.a.createElement("aside",{className:"mt10"},st&&n.a.createElement(V.a,{separator:">"},n.a.createElement(V.a.Item,null,n.a.createElement(d.a,{to:"/classrooms/".concat(lt.coursesId,"/exercise")},st==null||((Le=st.course)===null||Le===void 0)?void 0:Le.course_name)),n.a.createElement(V.a.Item,null,n.a.createElement(d.a,{to:"/classrooms/".concat(lt.coursesId,"/exercise")},"\u8BD5\u5377\u5217\u8868")),n.a.createElement(V.a.Item,null,n.a.createElement(d.a,{to:"/classrooms/".concat(lt.coursesId,"/exercise/").concat(At==null||((Fe=At.exercise)===null||Fe===void 0)?void 0:Fe.id,"/detail")},"\u8BD5\u5377\u8BE6\u60C5")),n.a.createElement(V.a.Item,null,(At==null||((we=At.exercise_answer_user)===null||we===void 0)?void 0:we.user_name)||(At==null||((ue=At.exercise)===null||ue===void 0)?void 0:ue.exercise_name)))),n.a.createElement("aside",{className:[P.a.title,"mt20"].join(" ")},n.a.createElement(g.a,{style:{width:"100%"}},n.a.createElement(u.a,{flex:"1",style:{lineHeight:"24px"}},n.a.createElement(d.a,{to:"/classrooms/".concat(lt.coursesId,"/exercise/").concat(At==null||((ce=At.exercise)===null||ce===void 0)?void 0:ce.id,"/detail")},n.a.createElement(L.a,{className:"font16 c-black"})),Object(U.A)((te=At.exercise)===null||te===void 0?void 0:te.exercise_status),n.a.createElement("strong",{className:"font20 ml5"},At==null||((ie=At.exercise)===null||ie===void 0)?void 0:ie.exercise_name)),n.a.createElement(u.a,null,n.a.createElement(G.a,{type:"primary",onClick:function(){Te(!0),setTimeout(function(){ur("")},500)}},n.a.createElement(N.a,null),"\u5BFC\u51FA\u7A7A\u767D\u8BD5\u5377+\u7B54\u6848"),n.a.createElement(G.a,{type:"primary",className:"ml10",onClick:function(){return ur("")},loading:wt},n.a.createElement(N.a,null),"\u5BFC\u51FA\u7A7A\u767D\u8BD5\u5377"),Object(Ce.c)()&&n.a.createElement(G.a,{disabled:wt,className:"ml10",type:"primary",onClick:function(){ot(!0)}},n.a.createElement(N.a,null),"\u5BFC\u51FA\u6240\u6709\u5B66\u751F\u8BD5\u5377"))))),n.a.createElement(o.a,{title:"\u5BFC\u51FA\u8BD5\u5377\u9009\u62E9",visible:rt,footer:n.a.createElement("div",null,n.a.createElement(G.a,{type:"primary",onClick:function(){K(!0),p(!0),ot(!1),ur("all")}},"\u662F"),n.a.createElement(G.a,{onClick:function(){p(!0),ot(!1),ur("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"),n.a.createElement("section",{id:"export-all",className:[P.a.bg,"pt30","pb30","mt20","mb20","relative"].join(" "),ref:Jt},mr()))},Ue=_e.default=Object(b.a)(function(Qe){var je=Qe.exercise,Le=Qe.loading,Fe=Qe.user,we=Qe.globalSetting;return{exercise:je,globalSetting:we,user:Fe,loading:Le.effects}})(xe)},n6Qo:function(ct,_e,j){"use strict";j.d(_e,"a",function(){return M});var se=j("q1tI"),G=j("biw7"),D=j("fyJ8");function V(e){var R=e.className,g=e.index,v=e.children,u=e.colSpan,s=e.rowSpan,i=se.useContext(G.a),A=i.prefixCls,o=i.fixedInfoList,a=o[g];return se.createElement(D.a,Object.assign({className:R,index:g,component:"td",prefixCls:A,record:null,dataIndex:null,render:function(){return{children:v,props:{colSpan:u,rowSpan:s}}}},a))}function F(e){return se.createElement("tr",Object.assign({},e))}function O(e){var R=e.children,g=se.useContext(G.a),v=g.prefixCls;return se.createElement("tfoot",{className:"".concat(v,"-summary")},R)}var X=_e.b=O,M={Cell:V,Row:F}},nEHx:function(ct,_e,j){"use strict";j.d(_e,"a",function(){return se});var se;(function(G){G.DARK="dark",G.LIGHT="light",G.HIGH_CONTRAST="hc"})(se||(se={}))},nnTU:function(ct,_e,j){"use strict";j.d(_e,"b",function(){return X}),j.d(_e,"a",function(){return M});var se=j("MI8n"),G=j("JYp7"),D=j("pmY6"),V=j("24hK"),F=j("746U"),O=j("Cg/j");const X=Object(O.c)("commandService"),M=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new se.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,R){if(!e)throw new Error("invalid command");if(typeof e=="string"){if(!R)throw new Error("invalid command");return this.registerCommand({id:e,handler:R})}if(e.description){const i=[];for(let o of e.description.args)i.push(o.constraint);const A=e.handler;e.handler=function(o,...a){return Object(F.o)(a,i),A(o,...a)}}const{id:g}=e;let v=this._commands.get(g);v||(v=new V.a,this._commands.set(g,v));let u=v.unshift(e),s=Object(D.i)(()=>{u();const i=this._commands.get(g);(i==null?void 0:i.isEmpty())&&this._commands.delete(g)});return this._onDidRegisterCommand.fire(g),s}registerCommandAlias(e,R){return M.registerCommand(e,(g,...v)=>g.get(X).executeCommand(R,...v))}getCommand(e){const R=this._commands.get(e);return!R||R.isEmpty()?void 0:G.a.first(R)}getCommands(){const e=new Map;for(const R of this._commands.keys()){const g=this.getCommand(R);g&&e.set(R,g)}return e}};M.registerCommand("noop",()=>{})},p5ED:function(ct,_e,j){"use strict";var se=j("+L6B"),G=j("2/Rp"),D=j("5Dmo"),V=j("3S7+"),F=j("k1fw"),O=j("tJVT"),X=j("q1tI"),M=j.n(X),e=j("vHTk"),R=j.n(e),g=j("yEEn"),v=j("ZW9T"),u=j("1vsH");_e.a=function(s){var i=s.name,A=s.data,o=s.theme,a=s.type,r=s.filename,t=s.monacoEditor,y=s.className,_=s.style,E=s.close,B=s.onClose,C=s.hasMask,h=Object(X.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),n=Object(O.a)(h,2),l=n[0],d=n[1],b=Object(X.useState)(""),m=Object(O.a)(b,2),c=m[0],L=m[1],N,T=1024*1024,P=10*T,W=Object(X.useRef)();a==="office"&&(N=Object(u.T)(A).filesize,N>P&&(a="other")),r&&(t.filename=r),Object(X.useEffect)(function(){var re,me,ge=(re=document.cookie)===null||re===void 0||((me=re.replace(/\s/g,""))===null||me===void 0)?void 0:me.split(";");ge==null||ge.map(function(Oe){var Se=Oe.split("=");Se[0]==="_educoder_session"&&L(Se[1])})},[]);var U=function(){if(A.startsWith("http")||A.startsWith("/")){Y();return}Object(u.z)(r||"educoder",A,r)},Y=function(){Object(u.x)(r||i,A)};return console.log("data:",A,"fileanme:",r," name:",i),M.a.createElement("div",{style:Object(F.a)({},_||{}),className:"".concat(C&&R.a.bgBlack," ").concat(a?R.a.wrp:"hide")},E&&M.a.createElement("div",{className:R.a.close,ref:W},M.a.createElement(V.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return W.current}},M.a.createElement("span",{onClick:Y},M.a.createElement("i",{className:"icon-quxiaozhiding"}))),M.a.createElement(V.a,{title:"\u5173\u95ED",getPopupContainer:function(){return W.current}},M.a.createElement("span",{className:"",onClick:B},M.a.createElement("i",{className:"icon-guanbi1"})))),M.a.createElement("div",{className:"".concat(R.a[y]," ").concat(y," ").concat(R.a.monaco," ").concat(a==="txt"?"show":"hide")},a==="txt"&&M.a.createElement(v.b,t)),a==="audio"&&M.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}),a==="video"&&M.a.createElement(M.a.Fragment,null,A!=null&&A.startsWith("/")?M.a.createElement("video",{controls:!0,src:"".concat(A),autoPlay:!0}):M.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(A),autoPlay:!0})),a==="html"&&M.a.createElement("iframe",{src:A+"&disposition=inline"}),a==="pdf"&&M.a.createElement("embed",{className:R.a.embed,src:A}),a==="image"&&M.a.createElement(M.a.Fragment,null,M.a.createElement("img",{src:"".concat(A!=null&&A.startsWith("/")||(A==null?void 0:A.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(A)})),a==="other"&&M.a.createElement("div",null,M.a.createElement(G.a,{type:"primary",size:"large",onClick:U},M.a.createElement(g.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(a==="download"||a==="office")&&M.a.createElement(G.a,{type:"primary",size:"large",onClick:U},M.a.createElement(g.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},pmY6:function(ct,_e,j){"use strict";j.d(_e,"h",function(){return R}),j.d(_e,"g",function(){return v}),j.d(_e,"f",function(){return u}),j.d(_e,"e",function(){return s}),j.d(_e,"i",function(){return i}),j.d(_e,"b",function(){return A}),j.d(_e,"a",function(){return o}),j.d(_e,"d",function(){return a}),j.d(_e,"c",function(){return r});var se=j("C/vA"),G=j("JYp7");const D=!1;let V=null;function F(t){V=t}if(D){const t="__is_disposable_tracked__";F(new class{trackDisposable(y){const _=new Error("Potentially leaked disposable").stack;setTimeout(()=>{y[t]||console.log(_)},3e3)}setParent(y,_){if(y&&y!==o.None)try{y[t]=!0}catch(E){}}markAsDisposed(y){if(y&&y!==o.None)try{y[t]=!0}catch(_){}}markAsSingleton(y){}})}function O(t){return V==null||V.trackDisposable(t),t}function X(t){V==null||V.markAsDisposed(t)}function M(t,y){V==null||V.setParent(t,y)}function e(t,y){if(!V)return;for(const _ of t)V.setParent(_,y)}function R(t){return V==null||V.markAsSingleton(t),t}class g extends Error{constructor(t){super(`Encountered errors while disposing of store. Errors: [${t.join(", ")}]`);this.errors=t}}function v(t){return typeof t.dispose=="function"&&t.dispose.length===0}function u(t){if(G.a.is(t)){let y=[];for(const _ of t)if(_)try{_.dispose()}catch(E){y.push(E)}if(y.length===1)throw y[0];if(y.length>1)throw new g(y);return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function s(...t){const y=i(()=>u(t));return e(t,y),y}function i(t){const y=O({dispose:Object(se.a)(()=>{X(y),t()})});return y}class A{constructor(){this._toDispose=new Set,this._isDisposed=!1,O(this)}dispose(){if(this._isDisposed)return;X(this),this._isDisposed=!0,this.clear()}clear(){try{u(this._toDispose.values())}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return M(t,this),this._isDisposed?A.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}}A.DISABLE_DISPOSED_WARNING=!1;class o{constructor(){this._store=new A,O(this),M(this._store,this)}dispose(){X(this),this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}}o.None=Object.freeze({dispose(){}});class a{constructor(){this._isDisposed=!1,O(this)}get value(){return this._isDisposed?void 0:this._value}set value(t){var y;if(this._isDisposed||t===this._value)return;(y=this._value)===null||y===void 0||y.dispose(),t&&M(t,this),this._value=t}clear(){this.value=void 0}dispose(){var t;this._isDisposed=!0,X(this),(t=this._value)===null||t===void 0||t.dispose(),this._value=void 0}clearAndLeak(){const t=this._value;return this._value=void 0,t&&M(t,null),t}}class r{constructor(t){this.object=t}dispose(){}}},psGv:function(ct,_e,j){var se,G;(function(){var D;(function(){"use strict";var X=[,,function(g){function v(i){this.__parent=i,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=[]}v.prototype.clone_empty=function(){var i=new v(this.__parent);return i.set_indent(this.__indent_count,this.__alignment_count),i},v.prototype.item=function(i){return i<0?this.__items[this.__items.length+i]:this.__items[i]},v.prototype.has_match=function(i){for(var A=this.__items.length-1;A>=0;A--)if(this.__items[A].match(i))return!0;return!1},v.prototype.set_indent=function(i,A){this.is_empty()&&(this.__indent_count=i||0,this.__alignment_count=A||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},v.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)},v.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},v.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var i=this.__parent.current_line;return i.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),i.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),i.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,i.__items[0]===" "&&(i.__items.splice(0,1),i.__character_count-=1),!0}return!1},v.prototype.is_empty=function(){return this.__items.length===0},v.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},v.prototype.push=function(i){this.__items.push(i);var A=i.lastIndexOf(`
|
|
`);A!==-1?this.__character_count=i.length-A:this.__character_count+=i.length},v.prototype.pop=function(){var i=null;return this.is_empty()||(i=this.__items.pop(),this.__character_count-=i.length),i},v.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},v.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},v.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},v.prototype.toString=function(){var i="";return this.is_empty()?this.__parent.indent_empty_lines&&(i=this.__parent.get_indent_string(this.__indent_count)):(i=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),i+=this.__items.join("")),i};function u(i,A){this.__cache=[""],this.__indent_size=i.indent_size,this.__indent_string=i.indent_char,i.indent_with_tabs||(this.__indent_string=new Array(i.indent_size+1).join(i.indent_char)),A=A||"",i.indent_level>0&&(A=new Array(i.indent_level+1).join(this.__indent_string)),this.__base_string=A,this.__base_string_length=A.length}u.prototype.get_indent_size=function(i,A){var o=this.__base_string_length;return A=A||0,i<0&&(o=0),o+=i*this.__indent_size,o+=A,o},u.prototype.get_indent_string=function(i,A){var o=this.__base_string;return A=A||0,i<0&&(i=0,o=""),A+=i*this.__indent_size,this.__ensure_cache(A),o+=this.__cache[A],o},u.prototype.__ensure_cache=function(i){for(;i>=this.__cache.length;)this.__add_column()},u.prototype.__add_column=function(){var i=this.__cache.length,A=0,o="";this.__indent_size&&i>=this.__indent_size&&(A=Math.floor(i/this.__indent_size),i-=A*this.__indent_size,o=new Array(A+1).join(this.__indent_string)),i&&(o+=new Array(i+1).join(" ")),this.__cache.push(o)};function s(i,A){this.__indent_cache=new u(i,A),this.raw=!1,this._end_with_newline=i.end_with_newline,this.indent_size=i.indent_size,this.wrap_line_length=i.wrap_line_length,this.indent_empty_lines=i.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new v(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}s.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},s.prototype.get_line_number=function(){return this.__lines.length},s.prototype.get_indent_string=function(i,A){return this.__indent_cache.get_indent_string(i,A)},s.prototype.get_indent_size=function(i,A){return this.__indent_cache.get_indent_size(i,A)},s.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},s.prototype.add_new_line=function(i){return this.is_empty()||!i&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},s.prototype.get_code=function(i){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 o=this.__lines.join(`
|
|
`);return i!==`
|
|
`&&(o=o.replace(/[\n]/g,i)),o},s.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},s.prototype.set_indent=function(i,A){return i=i||0,A=A||0,this.next_line.set_indent(i,A),this.__lines.length>1?(this.current_line.set_indent(i,A),!0):(this.current_line.set_indent(),!1)},s.prototype.add_raw_token=function(i){for(var A=0;A<i.newlines;A++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(i.whitespace_before),this.current_line.push(i.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},s.prototype.add_token=function(i){this.__add_space_before_token(),this.current_line.push(i),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},s.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(" "))},s.prototype.remove_indent=function(i){for(var A=this.__lines.length;i<A;)this.__lines[i]._remove_indent(),i++;this.current_line._remove_wrap_indent()},s.prototype.trim=function(i){for(i=i===void 0?!1:i,this.current_line.trim();i&&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},s.prototype.just_added_newline=function(){return this.current_line.is_empty()},s.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},s.prototype.ensure_empty_line_above=function(i,A){for(var o=this.__lines.length-2;o>=0;){var a=this.__lines[o];if(a.is_empty())break;if(a.item(0).indexOf(i)!==0&&a.item(-1)!==A){this.__lines.splice(o+1,0,new v(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},g.exports.Output=s},function(g){function v(u,s,i,A){this.type=u,this.text=s,this.comments_before=null,this.newlines=i||0,this.whitespace_before=A||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}g.exports.Token=v},,,function(g){function v(i,A){this.raw_options=u(i,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"])}v.prototype._get_array=function(i,A){var o=this.raw_options[i],a=A||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(a=o.concat()):typeof o=="string"&&(a=o.split(/[^a-zA-Z0-9_\/\-]+/)),a},v.prototype._get_boolean=function(i,A){var o=this.raw_options[i],a=o===void 0?!!A:!!o;return a},v.prototype._get_characters=function(i,A){var o=this.raw_options[i],a=A||"";return typeof o=="string"&&(a=o.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),a},v.prototype._get_number=function(i,A){var o=this.raw_options[i];A=parseInt(A,10),isNaN(A)&&(A=0);var a=parseInt(o,10);return isNaN(a)&&(a=A),a},v.prototype._get_selection=function(i,A,o){var a=this._get_selection_list(i,A,o);if(a.length!==1)throw new Error("Invalid Option Value: The option '"+i+`' can only be one of the following values:
|
|
`+A+`
|
|
You passed in: '`+this.raw_options[i]+"'");return a[0]},v.prototype._get_selection_list=function(i,A,o){if(!A||A.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[A[0]],!this._is_valid_selection(o,A))throw new Error("Invalid Default Value!");var a=this._get_array(i,o);if(!this._is_valid_selection(a,A))throw new Error("Invalid Option Value: The option '"+i+`' can contain only the following values:
|
|
`+A+`
|
|
You passed in: '`+this.raw_options[i]+"'");return a},v.prototype._is_valid_selection=function(i,A){return i.length&&A.length&&!i.some(function(o){return A.indexOf(o)===-1})};function u(i,A){var o={};i=s(i);var a;for(a in i)a!==A&&(o[a]=i[a]);if(A&&i[A])for(a in i[A])o[a]=i[A][a];return o}function s(i){var A={},o;for(o in i){var a=o.replace(/-/g,"_");A[a]=i[o]}return A}g.exports.Options=v,g.exports.normalizeOpts=s,g.exports.mergeOpts=u},,function(g){var v=RegExp.prototype.hasOwnProperty("sticky");function u(s){this.__input=s||"",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 s=null;return this.hasNext()&&(s=this.__input.charAt(this.__position),this.__position+=1),s},u.prototype.peek=function(s){var i=null;return s=s||0,s+=this.__position,s>=0&&s<this.__input_length&&(i=this.__input.charAt(s)),i},u.prototype.__match=function(s,i){s.lastIndex=i;var A=s.exec(this.__input);return A&&!(v&&s.sticky)&&(A.index!==i&&(A=null)),A},u.prototype.test=function(s,i){return i=i||0,i+=this.__position,i>=0&&i<this.__input_length?!!this.__match(s,i):!1},u.prototype.testChar=function(s,i){var A=this.peek(i);return s.lastIndex=0,A!==null&&s.test(A)},u.prototype.match=function(s){var i=this.__match(s,this.__position);return i?this.__position+=i[0].length:i=null,i},u.prototype.read=function(s,i,A){var o="",a;return s&&(a=this.match(s),a&&(o+=a[0])),i&&(a||!s)&&(o+=this.readUntil(i,A)),o},u.prototype.readUntil=function(s,i){var A="",o=this.__position;s.lastIndex=this.__position;var a=s.exec(this.__input);return a?(o=a.index,i&&(o+=a[0].length)):o=this.__input_length,A=this.__input.substring(this.__position,o),this.__position=o,A},u.prototype.readUntilAfter=function(s){return this.readUntil(s,!0)},u.prototype.get_regexp=function(s,i){var A=null,o="g";return i&&v&&(o="y"),typeof s=="string"&&s!==""?A=new RegExp(s,o):s&&(A=new RegExp(s.source,o)),A},u.prototype.get_literal_regexp=function(s){return RegExp(s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},u.prototype.peekUntilAfter=function(s){var i=this.__position,A=this.readUntilAfter(s);return this.__position=i,A},u.prototype.lookBack=function(s){var i=this.__position-1;return i>=s.length&&this.__input.substring(i-s.length,i).toLowerCase()===s},g.exports.InputScanner=u},function(g,v,u){var s=u(8).InputScanner,i=u(3).Token,A=u(10).TokenStream,o=u(11).WhitespacePattern,a={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},r=function(t,y){this._input=new s(t),this._options=y||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};r.prototype.tokenize=function(){this._input.restart(),this.__tokens=new A,this._reset();for(var t,y=new i(a.START,""),_=null,E=[],B=new A;y.type!==a.EOF;){for(t=this._get_next_token(y,_);this._is_comment(t);)B.add(t),t=this._get_next_token(y,_);B.isEmpty()||(t.comments_before=B,B=new A),t.parent=_,this._is_opening(t)?(E.push(_),_=t):_&&this._is_closing(t,_)&&(t.opened=_,_.closed=t,_=E.pop(),t.parent=_),t.previous=y,y.next=t,this.__tokens.add(t),y=t}return this.__tokens},r.prototype._is_first_token=function(){return this.__tokens.isEmpty()},r.prototype._reset=function(){},r.prototype._get_next_token=function(t,y){this._readWhitespace();var _=this._input.read(/.+/g);return _?this._create_token(a.RAW,_):this._create_token(a.EOF,"")},r.prototype._is_comment=function(t){return!1},r.prototype._is_opening=function(t){return!1},r.prototype._is_closing=function(t,y){return!1},r.prototype._create_token=function(t,y){var _=new i(t,y,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return _},r.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},g.exports.Tokenizer=r,g.exports.TOKEN=a},function(g){function v(u){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=u}v.prototype.restart=function(){this.__position=0},v.prototype.isEmpty=function(){return this.__tokens_length===0},v.prototype.hasNext=function(){return this.__position<this.__tokens_length},v.prototype.next=function(){var u=null;return this.hasNext()&&(u=this.__tokens[this.__position],this.__position+=1),u},v.prototype.peek=function(u){var s=null;return u=u||0,u+=this.__position,u>=0&&u<this.__tokens_length&&(s=this.__tokens[u]),s},v.prototype.add=function(u){this.__parent_token&&(u.parent=this.__parent_token),this.__tokens.push(u),this.__tokens_length+=1},g.exports.TokenStream=v},function(g,v,u){var s=u(12).Pattern;function i(A,o){s.call(this,A,o),o?this._line_regexp=this._input.get_regexp(o._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}i.prototype=new s,i.prototype.__set_whitespace_patterns=function(A,o){A+="\\t ",o+="\\n\\r",this._match_pattern=this._input.get_regexp("["+A+o+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+o+"]")},i.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 o=this.__split(this._newline_regexp,A);this.newline_count=o.length-1,this.whitespace_before_token=o[this.newline_count]}return A},i.prototype.matching=function(A,o){var a=this._create();return a.__set_whitespace_patterns(A,o),a._update(),a},i.prototype._create=function(){return new i(this._input,this)},i.prototype.__split=function(A,o){A.lastIndex=0;for(var a=0,r=[],t=A.exec(o);t;)r.push(o.substring(a,t.index)),a=t.index+t[0].length,t=A.exec(o);return a<o.length?r.push(o.substring(a,o.length)):r.push(""),r},g.exports.WhitespacePattern=i},function(g){function v(u,s){this._input=u,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,s&&(this._starting_pattern=this._input.get_regexp(s._starting_pattern,!0),this._match_pattern=this._input.get_regexp(s._match_pattern,!0),this._until_pattern=this._input.get_regexp(s._until_pattern),this._until_after=s._until_after)}v.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},v.prototype.read_match=function(){return this._input.match(this._match_pattern)},v.prototype.until_after=function(u){var s=this._create();return s._until_after=!0,s._until_pattern=this._input.get_regexp(u),s._update(),s},v.prototype.until=function(u){var s=this._create();return s._until_after=!1,s._until_pattern=this._input.get_regexp(u),s._update(),s},v.prototype.starting_with=function(u){var s=this._create();return s._starting_pattern=this._input.get_regexp(u,!0),s._update(),s},v.prototype.matching=function(u){var s=this._create();return s._match_pattern=this._input.get_regexp(u,!0),s._update(),s},v.prototype._create=function(){return new v(this._input,this)},v.prototype._update=function(){},g.exports.Pattern=v},function(g){function v(u,s){u=typeof u=="string"?u:u.source,s=typeof s=="string"?s:s.source,this.__directives_block_pattern=new RegExp(u+/ beautify( \w+[:]\w+)+ /.source+s,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(u+/\sbeautify\signore:end\s/.source+s,"g")}v.prototype.get_directives=function(u){if(!u.match(this.__directives_block_pattern))return null;var s={};this.__directive_pattern.lastIndex=0;for(var i=this.__directive_pattern.exec(u);i;)s[i[1]]=i[2],i=this.__directive_pattern.exec(u);return s},v.prototype.readIgnored=function(u){return u.readUntilAfter(this.__directives_end_ignore_pattern)},g.exports.Directives=v},function(g,v,u){var s=u(12).Pattern,i={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function A(o,a){s.call(this,o,a),this.__template_pattern=null,this._disabled=Object.assign({},i),this._excluded=Object.assign({},i),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 r=new s(o);this.__patterns={handlebars_comment:r.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:r.starting_with(/{{{/).until_after(/}}}/),handlebars:r.starting_with(/{{/).until_after(/}}/),php:r.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:r.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:r.starting_with(/{%/).until_after(/%}/),django_value:r.starting_with(/{{/).until_after(/}}/),django_comment:r.starting_with(/{#/).until_after(/#}/),smarty:r.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:r.starting_with(/{\*/).until_after(/\*}/),smarty_literal:r.starting_with(/{literal}/).until_after(/{\/literal}/)}}A.prototype=new s,A.prototype._create=function(){return new A(this._input,this)},A.prototype._update=function(){this.__set_templated_pattern()},A.prototype.disable=function(o){var a=this._create();return a._disabled[o]=!0,a._update(),a},A.prototype.read_options=function(o){var a=this._create();for(var r in i)a._disabled[r]=o.templating.indexOf(r)===-1;return a._update(),a},A.prototype.exclude=function(o){var a=this._create();return a._excluded[o]=!0,a._update(),a},A.prototype.read=function(){var o="";this._match_pattern?o=this._input.read(this._starting_pattern):o=this._input.read(this._starting_pattern,this.__template_pattern);for(var a=this._read_template();a;)this._match_pattern?a+=this._input.read(this._match_pattern):a+=this._input.readUntil(this.__template_pattern),o+=a,a=this._read_template();return this._until_after&&(o+=this._input.readUntilAfter(this._until_pattern)),o},A.prototype.__set_templated_pattern=function(){var o=[];this._disabled.php||o.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||o.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||o.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(o.push(this.__patterns.django._starting_pattern.source),o.push(this.__patterns.django_value._starting_pattern.source),o.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||o.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&o.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+o.join("|")+")")},A.prototype._read_template=function(){var o="",a=this._input.peek();if(a==="<"){var r=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&r==="?"&&(o=o||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&r==="%"&&(o=o||this.__patterns.erb.read())}else a==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(o=o||this.__patterns.handlebars_comment.read(),o=o||this.__patterns.handlebars_unescaped.read(),o=o||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(o=o||this.__patterns.django_value.read()),this._excluded.django||(o=o||this.__patterns.django_comment.read(),o=o||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(o=o||this.__patterns.smarty_comment.read(),o=o||this.__patterns.smarty_literal.read(),o=o||this.__patterns.smarty.read()));return o},g.exports.TemplatablePattern=A},,,,function(g,v,u){var s=u(19).Beautifier,i=u(20).Options;function A(o,a,r,t){var y=new s(o,a,r,t);return y.beautify()}g.exports=A,g.exports.defaultOptions=function(){return new i}},function(g,v,u){var s=u(20).Options,i=u(2).Output,A=u(21).Tokenizer,o=u(21).TOKEN,a=/\r\n|[\r\n]/,r=/\r\n|[\r\n]/g,t=function(b,m){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=b.max_preserve_newlines,this.preserve_newlines=b.preserve_newlines,this._output=new i(b,m)};t.prototype.current_line_has_match=function(b){return this._output.current_line.has_match(b)},t.prototype.set_space_before_token=function(b,m){this._output.space_before_token=b,this._output.non_breaking_space=m},t.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},t.prototype.add_raw_token=function(b){this._output.add_raw_token(b)},t.prototype.print_preserved_newlines=function(b){var m=0;b.type!==o.TEXT&&b.previous.type!==o.TEXT&&(m=b.newlines?1:0),this.preserve_newlines&&(m=b.newlines<this.max_preserve_newlines+1?b.newlines:this.max_preserve_newlines+1);for(var c=0;c<m;c++)this.print_newline(c>0);return m!==0},t.prototype.traverse_whitespace=function(b){return b.whitespace_before||b.newlines?(this.print_preserved_newlines(b)||(this._output.space_before_token=!0),!0):!1},t.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},t.prototype.print_newline=function(b){this._output.add_new_line(b)},t.prototype.print_token=function(b){b.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(b.text))},t.prototype.indent=function(){this.indent_level++},t.prototype.get_full_indent=function(b){return b=this.indent_level+(b||0),b<1?"":this._output.get_indent_string(b)};var y=function(b){for(var m=null,c=b.next;c.type!==o.EOF&&b.closed!==c;){if(c.type===o.ATTRIBUTE&&c.text==="type"){c.next&&c.next.type===o.EQUALS&&c.next.next&&c.next.next.type===o.VALUE&&(m=c.next.next.text);break}c=c.next}return m},_=function(b,m){var c=null,L=null;return m.closed?(b==="script"?c="text/javascript":b==="style"&&(c="text/css"),c=y(m)||c,c.search("text/css")>-1?L="css":c.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?L="javascript":c.search(/(text|application|dojo)\/(x-)?(html)/)>-1?L="html":c.search(/test\/null/)>-1&&(L="null"),L):null};function E(b,m){return m.indexOf(b)!==-1}function B(b,m,c){this.parent=b||null,this.tag=m?m.tag_name:"",this.indent_level=c||0,this.parser_token=m||null}function C(b){this._printer=b,this._current_frame=null}C.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},C.prototype.record_tag=function(b){var m=new B(this._current_frame,b,this._printer.indent_level);this._current_frame=m},C.prototype._try_pop_frame=function(b){var m=null;return b&&(m=b.parser_token,this._printer.indent_level=b.indent_level,this._current_frame=b.parent),m},C.prototype._get_frame=function(b,m){for(var c=this._current_frame;c&&!(b.indexOf(c.tag)!==-1);){if(m&&m.indexOf(c.tag)!==-1){c=null;break}c=c.parent}return c},C.prototype.try_pop=function(b,m){var c=this._get_frame([b],m);return this._try_pop_frame(c)},C.prototype.indent_to_tag=function(b){var m=this._get_frame(b);m&&(this._printer.indent_level=m.indent_level)};function h(b,m,c,L){this._source_text=b||"",m=m||{},this._js_beautify=c,this._css_beautify=L,this._tag_stack=null;var N=new s(m,"html");this._options=N,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"}h.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var b=this._source_text,m=this._options.eol;this._options.eol==="auto"&&(m=`
|
|
`,b&&a.test(b)&&(m=b.match(a)[0])),b=b.replace(r,`
|
|
`);var c=b.match(/^[\t ]*/)[0],L={text:"",type:""},N=new n,T=new t(this._options,c),P=new A(b,this._options).tokenize();this._tag_stack=new C(T);for(var W=null,U=P.next();U.type!==o.EOF;)U.type===o.TAG_OPEN||U.type===o.COMMENT?(W=this._handle_tag_open(T,U,N,L),N=W):U.type===o.ATTRIBUTE||U.type===o.EQUALS||U.type===o.VALUE||U.type===o.TEXT&&!N.tag_complete?W=this._handle_inside_tag(T,U,N,P):U.type===o.TAG_CLOSE?W=this._handle_tag_close(T,U,N):U.type===o.TEXT?W=this._handle_text(T,U,N):T.add_raw_token(U),L=W,U=P.next();var Y=T._output.get_code(m);return Y},h.prototype._handle_tag_close=function(b,m,c){var L={text:m.text,type:m.type};return b.alignment_size=0,c.tag_complete=!0,b.set_space_before_token(m.newlines||m.whitespace_before!=="",!0),c.is_unformatted?b.add_raw_token(m):(c.tag_start_char==="<"&&(b.set_space_before_token(m.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&c.has_wrapped_attrs&&b.print_newline(!1)),b.print_token(m)),c.indent_content&&!(c.is_unformatted||c.is_content_unformatted)&&(b.indent(),c.indent_content=!1),!c.is_inline_element&&!(c.is_unformatted||c.is_content_unformatted)&&b.set_wrap_point(),L},h.prototype._handle_inside_tag=function(b,m,c,L){var N=c.has_wrapped_attrs,T={text:m.text,type:m.type};if(b.set_space_before_token(m.newlines||m.whitespace_before!=="",!0),c.is_unformatted)b.add_raw_token(m);else if(c.tag_start_char==="{"&&m.type===o.TEXT)b.print_preserved_newlines(m)?(m.newlines=0,b.add_raw_token(m)):b.print_token(m);else{if(m.type===o.ATTRIBUTE?(b.set_space_before_token(!0),c.attr_count+=1):(m.type===o.EQUALS||m.type===o.VALUE&&m.previous.type===o.EQUALS)&&b.set_space_before_token(!1),m.type===o.ATTRIBUTE&&c.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(b.traverse_whitespace(m),N=N||m.newlines!==0),this._is_wrap_attributes_force)){var P=c.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&c.attr_count===1){var W=!0,U=0,Y;do{if(Y=L.peek(U),Y.type===o.ATTRIBUTE){W=!1;break}U+=1}while(U<4&&Y.type!==o.EOF&&Y.type!==o.TAG_CLOSE);P=!W}P&&(b.print_newline(!1),N=!0)}b.print_token(m),N=N||b.previous_token_wrapped(),c.has_wrapped_attrs=N}return T},h.prototype._handle_text=function(b,m,c){var L={text:m.text,type:"TK_CONTENT"};return c.custom_beautifier_name?this._print_custom_beatifier_text(b,m,c):c.is_unformatted||c.is_content_unformatted?b.add_raw_token(m):(b.traverse_whitespace(m),b.print_token(m)),L},h.prototype._print_custom_beatifier_text=function(b,m,c){var L=this;if(m.text!==""){var N=m.text,T,P=1,W="",U="";c.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?T=this._js_beautify:c.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?T=this._css_beautify:c.custom_beautifier_name==="html"&&(T=function(Se,Be){var Ne=new h(Se,Be,L._js_beautify,L._css_beautify);return Ne.beautify()}),this._options.indent_scripts==="keep"?P=0:this._options.indent_scripts==="separate"&&(P=-b.indent_level);var Y=b.get_full_indent(P);if(N=N.replace(/\n[ \t]*$/,""),c.custom_beautifier_name!=="html"&&N[0]==="<"&&N.match(/^(<!--|<!\[CDATA\[)/)){var re=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(N);if(!re){b.add_raw_token(m);return}W=Y+re[1]+`
|
|
`,N=re[4],re[5]&&(U=Y+re[5]),N=N.replace(/\n[ \t]*$/,""),(re[2]||re[3].indexOf(`
|
|
`)!==-1)&&(re=re[3].match(/[ \t]+$/),re&&(m.whitespace_before=re[0]))}if(N)if(T){var me=function(){this.eol=`
|
|
`};me.prototype=this._options.raw_options;var ge=new me;N=T(Y+N,ge)}else{var Oe=m.whitespace_before;Oe&&(N=N.replace(new RegExp(`
|
|
(`+Oe+")?","g"),`
|
|
`)),N=Y+N.replace(/\n/g,`
|
|
`+Y)}W&&(N?N=W+N+`
|
|
`+U:N=W+U),b.print_newline(!1),N&&(m.text=N,m.whitespace_before="",m.newlines=0,b.add_raw_token(m),b.print_newline(!0))}},h.prototype._handle_tag_open=function(b,m,c,L){var N=this._get_tag_open_token(m);return(c.is_unformatted||c.is_content_unformatted)&&!c.is_empty_element&&m.type===o.TAG_OPEN&&m.text.indexOf("</")===0?(b.add_raw_token(m),N.start_tag_token=this._tag_stack.try_pop(N.tag_name)):(b.traverse_whitespace(m),this._set_tag_position(b,m,N,c,L),N.is_inline_element||b.set_wrap_point(),b.print_token(m)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(N.alignment_size=m.text.length+1),!N.tag_complete&&!N.is_unformatted&&(b.alignment_size=N.alignment_size),N};var n=function(b,m){if(this.parent=b||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!m)this.tag_complete=!0;else{var c;this.tag_start_char=m.text[0],this.text=m.text,this.tag_start_char==="<"?(c=m.text.match(/^<([^\s>]*)/),this.tag_check=c?c[1]:""):(c=m.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=c?c[1]:"",(m.text.startsWith("{{#>")||m.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&m.next!==null?this.tag_check=m.next.text.split(" ")[0]:this.tag_check=m.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),m.type===o.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||m.closed&&m.closed.text==="/>";var L=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(L=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(L)))}};h.prototype._get_tag_open_token=function(b){var m=new n(this._tag_stack.get_parser_token(),b);return m.alignment_size=this._options.wrap_attributes_indent_size,m.is_end_tag=m.is_end_tag||E(m.tag_check,this._options.void_elements),m.is_empty_element=m.tag_complete||m.is_start_tag&&m.is_end_tag,m.is_unformatted=!m.tag_complete&&E(m.tag_check,this._options.unformatted),m.is_content_unformatted=!m.is_empty_element&&E(m.tag_check,this._options.content_unformatted),m.is_inline_element=E(m.tag_name,this._options.inline)||m.tag_name.includes("-")||m.tag_start_char==="{",m},h.prototype._set_tag_position=function(b,m,c,L,N){if(c.is_empty_element||(c.is_end_tag?c.start_tag_token=this._tag_stack.try_pop(c.tag_name):(this._do_optional_end_element(c)&&(c.is_inline_element||b.print_newline(!1)),this._tag_stack.record_tag(c),(c.tag_name==="script"||c.tag_name==="style")&&!(c.is_unformatted||c.is_content_unformatted)&&(c.custom_beautifier_name=_(c.tag_check,m)))),E(c.tag_check,this._options.extra_liners)&&(b.print_newline(!1),b._output.just_added_blankline()||b.print_newline(!0)),c.is_empty_element){if(c.tag_start_char==="{"&&c.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),c.indent_content=!0;var T=b.current_line_has_match(/{{#if/);T||b.print_newline(!1)}c.tag_name==="!--"&&N.type===o.TAG_CLOSE&&L.is_end_tag&&c.text.indexOf(`
|
|
`)===-1||(c.is_inline_element||c.is_unformatted||b.print_newline(!1),this._calcluate_parent_multiline(b,c))}else if(c.is_end_tag){var P=!1;P=c.start_tag_token&&c.start_tag_token.multiline_content,P=P||!c.is_inline_element&&!(L.is_inline_element||L.is_unformatted)&&!(N.type===o.TAG_CLOSE&&c.start_tag_token===L)&&N.type!=="TK_CONTENT",(c.is_content_unformatted||c.is_unformatted)&&(P=!1),P&&b.print_newline(!1)}else c.indent_content=!c.custom_beautifier_name,c.tag_start_char==="<"&&(c.tag_name==="html"?c.indent_content=this._options.indent_inner_html:c.tag_name==="head"?c.indent_content=this._options.indent_head_inner_html:c.tag_name==="body"&&(c.indent_content=this._options.indent_body_inner_html)),!(c.is_inline_element||c.is_unformatted)&&(N.type!=="TK_CONTENT"||c.is_content_unformatted)&&b.print_newline(!1),this._calcluate_parent_multiline(b,c)},h.prototype._calcluate_parent_multiline=function(b,m){m.parent&&b._output.just_added_newline()&&!((m.is_inline_element||m.is_unformatted)&&m.parent.is_inline_element)&&(m.parent.multiline_content=!0)};var l=["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"],d=["a","audio","del","ins","map","noscript","video"];h.prototype._do_optional_end_element=function(b){var m=null;if(b.is_empty_element||!b.is_start_tag||!b.parent)return;if(b.tag_name==="body")m=m||this._tag_stack.try_pop("head");else if(b.tag_name==="li")m=m||this._tag_stack.try_pop("li",["ol","ul"]);else if(b.tag_name==="dd"||b.tag_name==="dt")m=m||this._tag_stack.try_pop("dt",["dl"]),m=m||this._tag_stack.try_pop("dd",["dl"]);else if(b.parent.tag_name==="p"&&l.indexOf(b.tag_name)!==-1){var c=b.parent.parent;(!c||d.indexOf(c.tag_name)===-1)&&(m=m||this._tag_stack.try_pop("p"))}else b.tag_name==="rp"||b.tag_name==="rt"?(m=m||this._tag_stack.try_pop("rt",["ruby","rtc"]),m=m||this._tag_stack.try_pop("rp",["ruby","rtc"])):b.tag_name==="optgroup"?m=m||this._tag_stack.try_pop("optgroup",["select"]):b.tag_name==="option"?m=m||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):b.tag_name==="colgroup"?m=m||this._tag_stack.try_pop("caption",["table"]):b.tag_name==="thead"?(m=m||this._tag_stack.try_pop("caption",["table"]),m=m||this._tag_stack.try_pop("colgroup",["table"])):b.tag_name==="tbody"||b.tag_name==="tfoot"?(m=m||this._tag_stack.try_pop("caption",["table"]),m=m||this._tag_stack.try_pop("colgroup",["table"]),m=m||this._tag_stack.try_pop("thead",["table"]),m=m||this._tag_stack.try_pop("tbody",["table"])):b.tag_name==="tr"?(m=m||this._tag_stack.try_pop("caption",["table"]),m=m||this._tag_stack.try_pop("colgroup",["table"]),m=m||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(b.tag_name==="th"||b.tag_name==="td")&&(m=m||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),m=m||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return b.parent=this._tag_stack.get_parser_token(),m},g.exports.Beautifier=h},function(g,v,u){var s=u(6).Options;function i(A){s.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"])}i.prototype=new s,g.exports.Options=i},function(g,v,u){var s=u(9).Tokenizer,i=u(9).TOKEN,A=u(13).Directives,o=u(14).TemplatablePattern,a=u(12).Pattern,r={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:i.START,RAW:i.RAW,EOF:i.EOF},t=new A(/<\!--/,/-->/),y=function(_,E){s.call(this,_,E),this._current_tag_name="";var B=new o(this._input).read_options(this._options),C=new a(this._input);if(this.__patterns={word:B.until(/[\n\r\t <]/),single_quote:B.until_after(/'/),double_quote:B.until_after(/"/),attribute:B.until(/[\n\r\t =>]|\/>/),element_name:B.until(/[\n\r\t >\/]/),handlebars_comment:C.starting_with(/{{!--/).until_after(/--}}/),handlebars:C.starting_with(/{{/).until_after(/}}/),handlebars_open:C.until(/[\n\r\t }]/),handlebars_raw_close:C.until(/}}/),comment:C.starting_with(/<!--/).until_after(/-->/),cdata:C.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:C.starting_with(/<!\[/).until_after(/]>/),processing:C.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 h=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=C.matching(h).until_after(h)}};y.prototype=new s,y.prototype._is_comment=function(_){return!1},y.prototype._is_opening=function(_){return _.type===r.TAG_OPEN},y.prototype._is_closing=function(_,E){return _.type===r.TAG_CLOSE&&E&&((_.text===">"||_.text==="/>")&&E.text[0]==="<"||_.text==="}}"&&E.text[0]==="{"&&E.text[1]==="{")},y.prototype._reset=function(){this._current_tag_name=""},y.prototype._get_next_token=function(_,E){var B=null;this._readWhitespace();var C=this._input.peek();return C===null?this._create_token(r.EOF,""):(B=B||this._read_open_handlebars(C,E),B=B||this._read_attribute(C,_,E),B=B||this._read_close(C,E),B=B||this._read_raw_content(C,_,E),B=B||this._read_content_word(C),B=B||this._read_comment_or_cdata(C),B=B||this._read_processing(C),B=B||this._read_open(C,E),B=B||this._create_token(r.UNKNOWN,this._input.next()),B)},y.prototype._read_comment_or_cdata=function(_){var E=null,B=null,C=null;if(_==="<"){var h=this._input.peek(1);h==="!"&&(B=this.__patterns.comment.read(),B?(C=t.get_directives(B),C&&C.ignore==="start"&&(B+=t.readIgnored(this._input))):B=this.__patterns.cdata.read()),B&&(E=this._create_token(r.COMMENT,B),E.directives=C)}return E},y.prototype._read_processing=function(_){var E=null,B=null,C=null;if(_==="<"){var h=this._input.peek(1);(h==="!"||h==="?")&&(B=this.__patterns.conditional_comment.read(),B=B||this.__patterns.processing.read()),B&&(E=this._create_token(r.COMMENT,B),E.directives=C)}return E},y.prototype._read_open=function(_,E){var B=null,C=null;return E||_==="<"&&(B=this._input.next(),this._input.peek()==="/"&&(B+=this._input.next()),B+=this.__patterns.element_name.read(),C=this._create_token(r.TAG_OPEN,B)),C},y.prototype._read_open_handlebars=function(_,E){var B=null,C=null;return E||this._options.indent_handlebars&&_==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(B=this.__patterns.handlebars_comment.read(),B=B||this.__patterns.handlebars.read(),C=this._create_token(r.COMMENT,B)):(B=this.__patterns.handlebars_open.read(),C=this._create_token(r.TAG_OPEN,B))),C},y.prototype._read_close=function(_,E){var B=null,C=null;return E&&(E.text[0]==="<"&&(_===">"||_==="/"&&this._input.peek(1)===">")?(B=this._input.next(),_==="/"&&(B+=this._input.next()),C=this._create_token(r.TAG_CLOSE,B)):E.text[0]==="{"&&_==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),C=this._create_token(r.TAG_CLOSE,"}}"))),C},y.prototype._read_attribute=function(_,E,B){var C=null,h="";if(B&&B.text[0]==="<")if(_==="=")C=this._create_token(r.EQUALS,this._input.next());else if(_==='"'||_==="'"){var n=this._input.next();_==='"'?n+=this.__patterns.double_quote.read():n+=this.__patterns.single_quote.read(),C=this._create_token(r.VALUE,n)}else h=this.__patterns.attribute.read(),h&&(E.type===r.EQUALS?C=this._create_token(r.VALUE,h):C=this._create_token(r.ATTRIBUTE,h));return C},y.prototype._is_content_unformatted=function(_){return this._options.void_elements.indexOf(_)===-1&&(this._options.content_unformatted.indexOf(_)!==-1||this._options.unformatted.indexOf(_)!==-1)},y.prototype._read_raw_content=function(_,E,B){var C="";if(B&&B.text[0]==="{")C=this.__patterns.handlebars_raw_close.read();else if(E.type===r.TAG_CLOSE&&E.opened.text[0]==="<"&&E.text[0]!=="/"){var h=E.opened.text.substr(1).toLowerCase();if(h==="script"||h==="style"){var n=this._read_comment_or_cdata(_);if(n)return n.type=r.TEXT,n;C=this._input.readUntil(new RegExp("</"+h+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(h)&&(C=this._input.readUntil(new RegExp("</"+h+"[\\n\\r\\t ]*?>","ig")))}return C?this._create_token(r.TEXT,C):null},y.prototype._read_content_word=function(_){var E="";if(this._options.unformatted_content_delimiter&&(_===this._options.unformatted_content_delimiter[0]&&(E=this.__patterns.unformatted_content_delimiter.read())),E||(E=this.__patterns.word.read()),E)return this._create_token(r.TEXT,E)},g.exports.Tokenizer=y,g.exports.TOKEN=r}],M={};function e(g){var v=M[g];if(v!==void 0)return v.exports;var u=M[g]={exports:{}};return X[g](u,u.exports,e),u.exports}var R=e(18);D=R})();var V=D;if(!0)!(se=[j,j("6UM0"),j("TXwP")],G=function(X){var M=j("6UM0"),e=j("TXwP");return{html_beautify:function(R,g){return V(R,g,M.js_beautify,e.css_beautify)}}}.apply(_e,se),G!==void 0&&(ct.exports=G));else var F,O})()},q5bB:function(ct,_e,j){ct.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(ct,_e,j){"use strict";j.d(_e,"a",function(){return G});var se=j("Qw5x");function G(D,V){var F;if(typeof Symbol=="undefined"||D[Symbol.iterator]==null){if(Array.isArray(D)||(F=Object(se.a)(D))||V&&D&&typeof D.length=="number"){F&&(D=F);var O=0,X=function(){};return{s:X,n:function(){return O>=D.length?{done:!0}:{done:!1,value:D[O++]}},e:function(v){throw v},f:X}}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 M=!0,e=!1,R;return{s:function(){F=D[Symbol.iterator]()},n:function(){var v=F.next();return M=v.done,v},e:function(v){e=!0,R=v},f:function(){try{!M&&F.return!=null&&F.return()}finally{if(e)throw R}}}}},rUJ1:function(ct,_e){const j=/[&<>"']/,se=/[&<>"']/g,G=/[<>"']|&(?!#?\w+;)/,D=/[<>"']|&(?!#?\w+;)/g,V={"&":"&","<":"<",">":">",'"':""","'":"'"},F=C=>V[C];function O(C,h){if(h){if(j.test(C))return C.replace(se,F)}else if(G.test(C))return C.replace(D,F);return C}const X=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function M(C){return C.replace(X,(h,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const e=/(^|[^\[])\^/g;function R(C,h){C=C.source||C,h=h||"";const n={replace:(l,d)=>(d=d.source||d,d=d.replace(e,"$1"),C=C.replace(l,d),n),getRegex:()=>new RegExp(C,h)};return n}const g=/[^\w:]/g,v=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function u(C,h,n){if(C){let l;try{l=decodeURIComponent(M(n)).replace(g,"").toLowerCase()}catch(d){return null}if(l.indexOf("javascript:")===0||l.indexOf("vbscript:")===0||l.indexOf("data:")===0)return null}h&&!v.test(n)&&(n=a(h,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(l){return null}return n}const s={},i=/^[^:]+:\/*[^/]*$/,A=/^([^:]+:)[\s\S]*$/,o=/^([^:]+:\/*[^/]*)[\s\S]*$/;function a(C,h){s[" "+C]||(i.test(C)?s[" "+C]=C+"/":s[" "+C]=_(C,"/",!0)),C=s[" "+C];const n=C.indexOf(":")===-1;return h.substring(0,2)==="//"?n?h:C.replace(A,"$1")+h:h.charAt(0)==="/"?n?h:C.replace(o,"$1")+h:C+h}const r={exec:function(){}};function t(C){let h=1,n,l;for(;h<arguments.length;h++){n=arguments[h];for(l in n)Object.prototype.hasOwnProperty.call(n,l)&&(C[l]=n[l])}return C}function y(C,h){const n=C.replace(/\|/g,(b,m,c)=>{let L=!1,N=m;for(;--N>=0&&c[N]==="\\";)L=!L;return L?"|":" |"}),l=n.split(/ \|/);let d=0;if(l.length>h)l.splice(h);else for(;l.length<h;)l.push("");for(;d<l.length;d++)l[d]=l[d].trim().replace(/\\\|/g,"|");return l}function _(C,h,n){const l=C.length;if(l===0)return"";let d=0;for(;d<l;){const b=C.charAt(l-d-1);if(b===h&&!n)d++;else if(b!==h&&n)d++;else break}return C.substr(0,l-d)}function E(C,h){if(C.indexOf(h[1])===-1)return-1;const n=C.length;let l=0,d=0;for(;d<n;d++)if(C[d]==="\\")d++;else if(C[d]===h[0])l++;else if(C[d]===h[1]&&(l--,l<0))return d;return-1}function B(C){C&&C.sanitize&&!C.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")}ct.exports={escape:O,unescape:M,edit:R,cleanUrl:u,resolveUrl:a,noopTest:r,merge:t,splitCells:y,rtrim:_,findClosingBracket:E,checkSanitizeDeprecation:B}},sR1s:function(ct,_e,j){"use strict";j.d(_e,"b",function(){return V}),j.d(_e,"a",function(){return F}),j.d(_e,"c",function(){return O}),j.d(_e,"d",function(){return X});var se=j("U8pU"),G="RC_TABLE_KEY";function D(M){return M==null?[]:Array.isArray(M)?M:[M]}function V(M,e){if(!e&&typeof e!="number")return M;for(var R=D(e),g=M,v=0;v<R.length;v+=1){if(!g)return null;var u=R[v];g=g[u]}return g}function F(M){var e=[],R={};return M.forEach(function(g){for(var v=g||{},u=v.key,s=v.dataIndex,i=u||D(s).join("-")||G;R[i];)i="".concat(i,"_next");R[i]=!0,e.push(i)}),e}function O(){var M={};function e(u,s){s&&Object.keys(s).forEach(function(i){var A=s[i];A&&Object(se.a)(A)==="object"?(u[i]=u[i]||{},e(u[i],A)):u[i]=A})}for(var R=arguments.length,g=new Array(R),v=0;v<R;v++)g[v]=arguments[v];return g.forEach(function(u){e(M,u)}),M}function X(M){return M!=null}},sboe:function(ct,_e,j){"use strict";j.d(_e,"a",function(){return D});var se=j("q1tI"),G=j.n(se),D=se.createContext(null)},t23M:function(ct,_e,j){"use strict";var se=j("VTBJ"),G=j("1OyB"),D=j("vuIU"),V=j("Ji7U"),F=j("LK+K"),O=j("q1tI"),X=j.n(O),M=j("m+aA"),e=j("Zm9Q"),R=j("Kwbf"),g=j("c+Xe"),v=j("bdgK"),u="rc-observer-key",s=function(i){Object(V.a)(o,i);var A=Object(F.a)(o);function o(){var a;return Object(G.a)(this,o),a=A.apply(this,arguments),a.resizeObserver=null,a.childNode=null,a.currentElement=null,a.state={width:0,height:0,offsetHeight:0,offsetWidth:0},a.onResize=function(r){var t=a.props.onResize,y=r[0].target,_=y.getBoundingClientRect(),E=_.width,B=_.height,C=y.offsetWidth,h=y.offsetHeight,n=Math.floor(E),l=Math.floor(B);if(a.state.width!==n||a.state.height!==l||a.state.offsetWidth!==C||a.state.offsetHeight!==h){var d={width:n,height:l,offsetWidth:C,offsetHeight:h};a.setState(d),t&&Promise.resolve().then(function(){t(Object(se.a)(Object(se.a)({},d),{},{offsetWidth:C,offsetHeight:h}))})}},a.setChildNode=function(r){a.childNode=r},a}return Object(D.a)(o,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var r=this.props.disabled;if(r){this.destroyObserver();return}var t=Object(M.a)(this.childNode||this),y=t!==this.currentElement;y&&(this.destroyObserver(),this.currentElement=t),!this.resizeObserver&&t&&(this.resizeObserver=new v.default(this.onResize),this.resizeObserver.observe(t))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var r=this.props.children,t=Object(e.a)(r);if(t.length>1)Object(R.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(t.length===0)return Object(R.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var y=t[0];if(O.isValidElement(y)&&Object(g.c)(y)){var _=y.ref;t[0]=O.cloneElement(y,{ref:Object(g.a)(_,this.setChildNode)})}return t.length===1?t[0]:t.map(function(E,B){return!O.isValidElement(E)||"key"in E&&E.key!==null?E:O.cloneElement(E,{key:"".concat(u,"-").concat(B)})})}}]),o}(O.Component);s.displayName="ResizeObserver",_e.a=s},t9D7:function(ct,_e,j){"use strict";j.d(_e,"b",function(){return X}),j.d(_e,"g",function(){return e}),j.d(_e,"d",function(){return R}),j.d(_e,"e",function(){return g}),j.d(_e,"a",function(){return v}),j.d(_e,"f",function(){return i}),j.d(_e,"c",function(){return A});var se=j("Vhoy"),G=j("MI8n"),D=j("pmY6"),V=j("Cg/j"),F=j("ic2d"),O=j("nEHx");const X=Object(V.c)("themeService");var M;(function(o){function a(r){return r&&typeof r=="object"&&typeof r.id=="string"}o.isThemeColor=a})(M||(M={}));function e(o){return{id:o}}var R;(function(o){function a(B){return B&&typeof B=="object"&&typeof B.id=="string"&&(typeof B.color=="undefined"||M.isThemeColor(B.color))}o.isThemeIcon=a;const r=new RegExp(`^\\$\\((${se.a.iconNameExpression}(?:${se.a.iconModifierExpression})?)\\)$`);function t(B){const C=r.exec(B);if(!C)return;let[,h]=C;return{id:h}}o.fromString=t;function y(B,C){let h=B.id;const n=h.lastIndexOf("~");return n!==-1&&(h=h.substring(0,n)),C&&(h=`${h}~${C}`),{id:h}}o.modify=y;function _(B,C){var h,n;return B.id===C.id&&((h=B.color)===null||h===void 0?void 0:h.id)===((n=C.color)===null||n===void 0?void 0:n.id)}o.isEqual=_;function E(B,C){return{id:B.id,color:C?e(C):void 0}}o.asThemeIcon=E,o.asClassNameArray=se.a.asClassNameArray,o.asClassName=se.a.asClassName,o.asCSSSelector=se.a.asCSSSelector})(R||(R={}));function g(o){switch(o){case O.a.DARK:return"vs-dark";case O.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const v={ThemingContribution:"base.contributions.theming"};class u{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new G.b}onColorThemeChange(o){return this.themingParticipants.push(o),this.onThemingParticipantAddedEmitter.fire(o),Object(D.i)(()=>{const a=this.themingParticipants.indexOf(o);this.themingParticipants.splice(a,1)})}getThemingParticipants(){return this.themingParticipants}}let s=new u;F.a.add(v.ThemingContribution,s);function i(o){return s.onColorThemeChange(o)}class A extends D.a{constructor(o){super();this.themeService=o,this.theme=o.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(a=>this.onThemeChange(a)))}onThemeChange(o){this.theme=o,this.updateStyles()}updateStyles(){}}},tJYV:function(ct,_e,j){ct.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(ct,_e,j){ct.exports={wrap:"wrap___1AALq",img:"img___20GEO",table:"table___26NT5",totalScore:"totalScore___1t1Bx",people:"people___BMR7K",glassSeal:"glassSeal___2woZ-"}},ulZh:function(ct,_e,j){typeof window!="undefined"&&function(G,D){ct.exports=D()}(this,function(){return function(se){var G={};function D(V){if(G[V])return G[V].exports;var F=G[V]={i:V,l:!1,exports:{}};return se[V].call(F.exports,F,F.exports,D),F.l=!0,F.exports}return D.m=se,D.c=G,D.d=function(V,F,O){D.o(V,F)||Object.defineProperty(V,F,{enumerable:!0,get:O})},D.r=function(V){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(V,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(V,"__esModule",{value:!0})},D.t=function(V,F){if(F&1&&(V=D(V)),F&8)return V;if(F&4&&typeof V=="object"&&V&&V.__esModule)return V;var O=Object.create(null);if(D.r(O),Object.defineProperty(O,"default",{enumerable:!0,value:V}),F&2&&typeof V!="string")for(var X in V)D.d(O,X,function(M){return V[M]}.bind(null,X));return O},D.n=function(V){var F=V&&V.__esModule?function(){return V.default}:function(){return V};return D.d(F,"a",F),F},D.o=function(V,F){return Object.prototype.hasOwnProperty.call(V,F)},D.p="/dist/",D(D.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(se,G,D){"use strict";var V=Object.prototype.hasOwnProperty,F="~";function O(){}Object.create&&(O.prototype=Object.create(null),new O().__proto__||(F=!1));function X(g,v,u){this.fn=g,this.context=v,this.once=u||!1}function M(g,v,u,s,i){if(typeof u!="function")throw new TypeError("The listener must be a function");var A=new X(u,s||g,i),o=F?F+v:v;return g._events[o]?g._events[o].fn?g._events[o]=[g._events[o],A]:g._events[o].push(A):(g._events[o]=A,g._eventsCount++),g}function e(g,v){--g._eventsCount===0?g._events=new O:delete g._events[v]}function R(){this._events=new O,this._eventsCount=0}R.prototype.eventNames=function(){var v=[],u,s;if(this._eventsCount===0)return v;for(s in u=this._events)V.call(u,s)&&v.push(F?s.slice(1):s);return Object.getOwnPropertySymbols?v.concat(Object.getOwnPropertySymbols(u)):v},R.prototype.listeners=function(v){var u=F?F+v:v,s=this._events[u];if(!s)return[];if(s.fn)return[s.fn];for(var i=0,A=s.length,o=new Array(A);i<A;i++)o[i]=s[i].fn;return o},R.prototype.listenerCount=function(v){var u=F?F+v:v,s=this._events[u];return s?s.fn?1:s.length:0},R.prototype.emit=function(v,u,s,i,A,o){var a=F?F+v:v;if(!this._events[a])return!1;var r=this._events[a],t=arguments.length,y,_;if(r.fn){r.once&&this.removeListener(v,r.fn,void 0,!0);switch(t){case 1:return r.fn.call(r.context),!0;case 2:return r.fn.call(r.context,u),!0;case 3:return r.fn.call(r.context,u,s),!0;case 4:return r.fn.call(r.context,u,s,i),!0;case 5:return r.fn.call(r.context,u,s,i,A),!0;case 6:return r.fn.call(r.context,u,s,i,A,o),!0}for(_=1,y=new Array(t-1);_<t;_++)y[_-1]=arguments[_];r.fn.apply(r.context,y)}else{var E=r.length,B;for(_=0;_<E;_++){r[_].once&&this.removeListener(v,r[_].fn,void 0,!0);switch(t){case 1:r[_].fn.call(r[_].context);break;case 2:r[_].fn.call(r[_].context,u);break;case 3:r[_].fn.call(r[_].context,u,s);break;case 4:r[_].fn.call(r[_].context,u,s,i);break;default:if(!y)for(B=1,y=new Array(t-1);B<t;B++)y[B-1]=arguments[B];r[_].fn.apply(r[_].context,y)}}}return!0},R.prototype.on=function(v,u,s){return M(this,v,u,s,!1)},R.prototype.once=function(v,u,s){return M(this,v,u,s,!0)},R.prototype.removeListener=function(v,u,s,i){var A=F?F+v:v;if(!this._events[A])return this;if(!u)return e(this,A),this;var o=this._events[A];if(o.fn)o.fn===u&&(!i||o.once)&&(!s||o.context===s)&&e(this,A);else{for(var a=0,r=[],t=o.length;a<t;a++)(o[a].fn!==u||i&&!o[a].once||s&&o[a].context!==s)&&r.push(o[a]);r.length?this._events[A]=r.length===1?r[0]:r:e(this,A)}return this},R.prototype.removeAllListeners=function(v){var u;return v?(u=F?F+v:v,this._events[u]&&e(this,u)):(this._events=new O,this._eventsCount=0),this},R.prototype.off=R.prototype.removeListener,R.prototype.addListener=R.prototype.on,R.prefixed=F,R.EventEmitter=R,se.exports=R},"./node_modules/url-toolkit/src/url-toolkit.js":function(se,G,D){(function(V){var F=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,O=/^([^\/?#]*)([^]*)$/,X=/(?:\/|^)\.(?=\/)/g,M=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,e={buildAbsoluteURL:function(R,g,v){if(v=v||{},R=R.trim(),g=g.trim(),!g){if(!v.alwaysNormalize)return R;var u=e.parseURL(R);if(!u)throw new Error("Error trying to parse base URL.");return u.path=e.normalizePath(u.path),e.buildURLFromParts(u)}var s=e.parseURL(g);if(!s)throw new Error("Error trying to parse relative URL.");if(s.scheme)return v.alwaysNormalize?(s.path=e.normalizePath(s.path),e.buildURLFromParts(s)):g;var i=e.parseURL(R);if(!i)throw new Error("Error trying to parse base URL.");if(!i.netLoc&&i.path&&i.path[0]!=="/"){var A=O.exec(i.path);i.netLoc=A[1],i.path=A[2]}i.netLoc&&!i.path&&(i.path="/");var o={scheme:i.scheme,netLoc:s.netLoc,path:null,params:s.params,query:s.query,fragment:s.fragment};if(!s.netLoc&&(o.netLoc=i.netLoc,s.path[0]!=="/"))if(!s.path)o.path=i.path,s.params||(o.params=i.params,s.query||(o.query=i.query));else{var a=i.path,r=a.substring(0,a.lastIndexOf("/")+1)+s.path;o.path=e.normalizePath(r)}return o.path===null&&(o.path=v.alwaysNormalize?e.normalizePath(s.path):s.path),e.buildURLFromParts(o)},parseURL:function(R){var g=F.exec(R);return g?{scheme:g[1]||"",netLoc:g[2]||"",path:g[3]||"",params:g[4]||"",query:g[5]||"",fragment:g[6]||""}:null},normalizePath:function(R){for(R=R.split("").reverse().join("").replace(X,"");R.length!==(R=R.replace(M,"")).length;);return R.split("").reverse().join("")},buildURLFromParts:function(R){return R.scheme+R.netLoc+R.path+R.params+R.query+R.fragment}};se.exports=e})(this)},"./node_modules/webworkify-webpack/index.js":function(se,G,D){function V(v){var u={};function s(A){if(u[A])return u[A].exports;var o=u[A]={i:A,l:!1,exports:{}};return v[A].call(o.exports,o,o.exports,s),o.l=!0,o.exports}s.m=v,s.c=u,s.i=function(A){return A},s.d=function(A,o,a){s.o(A,o)||Object.defineProperty(A,o,{configurable:!1,enumerable:!0,get:a})},s.r=function(A){Object.defineProperty(A,"__esModule",{value:!0})},s.n=function(A){var o=A&&A.__esModule?function(){return A.default}:function(){return A};return s.d(o,"a",o),o},s.o=function(A,o){return Object.prototype.hasOwnProperty.call(A,o)},s.p="/",s.oe=function(A){throw console.error(A),A};var i=s(s.s=ENTRY_MODULE);return i.default||i}var F="[\\.|\\-|\\+|\\w|/|@]+",O="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+F+").*?\\)";function X(v){return(v+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function M(v){return!isNaN(1*v)}function e(v,u,s){var i={};i[s]=[];var A=u.toString(),o=A.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!o)return i;for(var a=o[1],r=new RegExp("(\\\\n|\\W)"+X(a)+O,"g"),t;t=r.exec(A);){if(t[3]==="dll-reference")continue;i[s].push(t[3])}for(r=new RegExp("\\("+X(a)+'\\("(dll-reference\\s('+F+'))"\\)\\)'+O,"g");t=r.exec(A);)v[t[2]]||(i[s].push(t[1]),v[t[2]]=D(t[1]).m),i[t[2]]=i[t[2]]||[],i[t[2]].push(t[4]);for(var y=Object.keys(i),_=0;_<y.length;_++)for(var E=0;E<i[y[_]].length;E++)M(i[y[_]][E])&&(i[y[_]][E]=1*i[y[_]][E]);return i}function R(v){var u=Object.keys(v);return u.reduce(function(s,i){return s||v[i].length>0},!1)}function g(v,u){for(var s={main:[u]},i={main:[]},A={main:{}};R(s);)for(var o=Object.keys(s),a=0;a<o.length;a++){var r=o[a],t=s[r],y=t.pop();if(A[r]=A[r]||{},A[r][y]||!v[r][y])continue;A[r][y]=!0,i[r]=i[r]||[],i[r].push(y);for(var _=e(v,v[r][y],r),E=Object.keys(_),B=0;B<E.length;B++)s[E[B]]=s[E[B]]||[],s[E[B]]=s[E[B]].concat(_[E[B]])}return i}se.exports=function(v,u){u=u||{};var s={main:D.m},i=u.all?{main:Object.keys(s.main)}:g(s,v),A="";Object.keys(i).filter(function(y){return y!=="main"}).forEach(function(y){for(var _=0;i[y][_];)_++;i[y].push(_),s[y][_]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",A=A+"var "+y+" = ("+V.toString().replace("ENTRY_MODULE",JSON.stringify(_))+")({"+i[y].map(function(E){return""+JSON.stringify(E)+": "+s[y][E].toString()}).join(",")+`});
|
|
`}),A=A+"new (("+V.toString().replace("ENTRY_MODULE",JSON.stringify(v))+")({"+i.main.map(function(y){return""+JSON.stringify(y)+": "+s.main[y].toString()}).join(",")+"}))(self);";var o=new window.Blob([A],{type:"text/javascript"});if(u.bare)return o;var a=window.URL||window.webkitURL||window.mozURL||window.msURL,r=a.createObjectURL(o),t=new window.Worker(r);return t.objectURL=r,t}},"./src/config.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"hlsDefaultConfig",function(){return B}),D.d(G,"mergeConfig",function(){return h}),D.d(G,"enableStreamingMode",function(){return n});var V=D("./src/controller/abr-controller.ts"),F=D("./src/controller/audio-stream-controller.ts"),O=D("./src/controller/audio-track-controller.ts"),X=D("./src/controller/subtitle-stream-controller.ts"),M=D("./src/controller/subtitle-track-controller.ts"),e=D("./src/controller/buffer-controller.ts"),R=D("./src/controller/timeline-controller.ts"),g=D("./src/controller/cap-level-controller.ts"),v=D("./src/controller/fps-controller.ts"),u=D("./src/controller/eme-controller.ts"),s=D("./src/controller/cmcd-controller.ts"),i=D("./src/utils/xhr-loader.ts"),A=D("./src/utils/fetch-loader.ts"),o=D("./src/utils/cues.ts"),a=D("./src/utils/mediakeys-helper.ts"),r=D("./src/utils/logger.ts");function t(){return t=Object.assign||function(l){for(var d=1;d<arguments.length;d++){var b=arguments[d];for(var m in b)Object.prototype.hasOwnProperty.call(b,m)&&(l[m]=b[m])}return l},t.apply(this,arguments)}function y(l,d){var b=Object.keys(l);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(l);d&&(m=m.filter(function(c){return Object.getOwnPropertyDescriptor(l,c).enumerable})),b.push.apply(b,m)}return b}function _(l){for(var d=1;d<arguments.length;d++){var b=arguments[d]!=null?arguments[d]:{};d%2?y(Object(b),!0).forEach(function(m){E(l,m,b[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(b)):y(Object(b)).forEach(function(m){Object.defineProperty(l,m,Object.getOwnPropertyDescriptor(b,m))})}return l}function E(l,d,b){return d in l?Object.defineProperty(l,d,{value:b,enumerable:!0,configurable:!0,writable:!0}):l[d]=b,l}var B=_(_({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:i.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:V.default,bufferController:e.default,capLevelController:g.default,fpsController:v.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:a.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},C()),{},{subtitleStreamController:X.SubtitleStreamController,subtitleTrackController:M.default,timelineController:R.TimelineController,audioStreamController:F.default,audioTrackController:O.default,emeController:u.default,cmcdController:s.default});function C(){return{cueHandler:o.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 h(l,d){if((d.liveSyncDurationCount||d.liveMaxLatencyDurationCount)&&(d.liveSyncDuration||d.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(d.liveMaxLatencyDurationCount!==void 0&&(d.liveSyncDurationCount===void 0||d.liveMaxLatencyDurationCount<=d.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(d.liveMaxLatencyDuration!==void 0&&(d.liveSyncDuration===void 0||d.liveMaxLatencyDuration<=d.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return t({},l,d)}function n(l){var d=l.loader;if(d!==A.default&&d!==i.default)r.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),l.progressive=!1;else{var b=Object(A.fetchSupported)();b&&(l.loader=A.default,l.progressive=!0,l.enableSoftwareAES=!0,r.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/polyfills/number.ts"),F=D("./src/utils/ewma-bandwidth-estimator.ts"),O=D("./src/events.ts"),X=D("./src/utils/buffer-helper.ts"),M=D("./src/errors.ts"),e=D("./src/types/loader.ts"),R=D("./src/utils/logger.ts");function g(s,i){for(var A=0;A<i.length;A++){var o=i[A];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(s,o.key,o)}}function v(s,i,A){return i&&g(s.prototype,i),A&&g(s,A),s}var u=function(){function s(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 o=A.config;this.bwEstimator=new F.default(o.abrEwmaSlowVoD,o.abrEwmaFastVoD,o.abrEwmaDefaultEstimate),this.registerListeners()}var i=s.prototype;return i.registerListeners=function(){var o=this.hls;o.on(O.Events.FRAG_LOADING,this.onFragLoading,this),o.on(O.Events.FRAG_LOADED,this.onFragLoaded,this),o.on(O.Events.FRAG_BUFFERED,this.onFragBuffered,this),o.on(O.Events.LEVEL_LOADED,this.onLevelLoaded,this),o.on(O.Events.ERROR,this.onError,this)},i.unregisterListeners=function(){var o=this.hls;o.off(O.Events.FRAG_LOADING,this.onFragLoading,this),o.off(O.Events.FRAG_LOADED,this.onFragLoaded,this),o.off(O.Events.FRAG_BUFFERED,this.onFragBuffered,this),o.off(O.Events.LEVEL_LOADED,this.onLevelLoaded,this),o.off(O.Events.ERROR,this.onError,this)},i.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},i.onFragLoading=function(o,a){var r=a.frag;if(r.type===e.PlaylistLevelType.MAIN&&!this.timer){var t;this.fragCurrent=r,this.partCurrent=(t=a.part)!=null?t:null,this.timer=self.setInterval(this.onCheck,100)}},i.onLevelLoaded=function(o,a){var r=this.hls.config;a.details.live?this.bwEstimator.update(r.abrEwmaSlowLive,r.abrEwmaFastLive):this.bwEstimator.update(r.abrEwmaSlowVoD,r.abrEwmaFastVoD)},i._abandonRulesCheck=function(){var o=this.fragCurrent,a=this.partCurrent,r=this.hls,t=r.autoLevelEnabled,y=r.config,_=r.media;if(!o||!_)return;var E=a?a.stats:o.stats,B=a?a.duration:o.duration;if(E.aborted){R.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!t||_.paused||!_.playbackRate||!_.readyState)return;var C=performance.now()-E.loading.start,h=Math.abs(_.playbackRate);if(C<=500*B/h)return;var n=r.levels,l=r.minAutoLevel,d=n[o.level],b=E.total||Math.max(E.loaded,Math.round(B*d.maxBitrate/8)),m=Math.max(1,E.bwEstimate?E.bwEstimate/8:E.loaded*1e3/C),c=(b-E.loaded)/m,L=_.currentTime,N=(X.BufferHelper.bufferInfo(_,L,y.maxBufferHole).end-L)/h;if(N>=2*B/h||c<=N)return;var T=Number.POSITIVE_INFINITY,P;for(P=o.level-1;P>l;P--){var W=n[P].maxBitrate;if(T=B*W/(8*.8*m),T<N)break}if(T>=c)return;var U=this.bwEstimator.getEstimate();R.logger.warn("Fragment "+o.sn+(a?" part "+a.index:"")+" of level "+o.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+P+`
|
|
Current BW estimate: `+(Object(V.isFiniteNumber)(U)?(U/1024).toFixed(3):"Unknown")+` Kb/s
|
|
Estimated load time for current fragment: `+c.toFixed(3)+` s
|
|
Estimated load time for the next fragment: `+T.toFixed(3)+` s
|
|
Time to underbuffer: `+N.toFixed(3)+" s"),r.nextLoadLevel=P,this.bwEstimator.sample(C,E.loaded),this.clearTimer(),o.loader&&(this.fragCurrent=this.partCurrent=null,o.loader.abort()),r.trigger(O.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:o,part:a,stats:E})},i.onFragLoaded=function(o,a){var r=a.frag,t=a.part;if(r.type===e.PlaylistLevelType.MAIN&&Object(V.isFiniteNumber)(r.sn)){var y=t?t.stats:r.stats,_=t?t.duration:r.duration;if(this.clearTimer(),this.lastLoadedFragLevel=r.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var E=this.hls.levels[r.level],B=(E.loaded?E.loaded.bytes:0)+y.loaded,C=(E.loaded?E.loaded.duration:0)+_;E.loaded={bytes:B,duration:C},E.realBitrate=Math.round(8*B/C)}if(r.bitrateTest){var h={stats:y,frag:r,part:t,id:r.type};this.onFragBuffered(O.Events.FRAG_BUFFERED,h),r.bitrateTest=!1}}},i.onFragBuffered=function(o,a){var r=a.frag,t=a.part,y=t?t.stats:r.stats;if(y.aborted)return;if(r.type!==e.PlaylistLevelType.MAIN||r.sn==="initSegment")return;var _=y.parsing.end-y.loading.start;this.bwEstimator.sample(_,y.loaded),y.bwEstimate=this.bwEstimator.getEstimate(),r.bitrateTest?this.bitrateTestDelay=_/1e3:this.bitrateTestDelay=0},i.onError=function(o,a){switch(a.details){case M.ErrorDetails.FRAG_LOAD_ERROR:case M.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},i.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},i.getNextABRAutoLevel=function(){var o=this.fragCurrent,a=this.partCurrent,r=this.hls,t=r.maxAutoLevel,y=r.config,_=r.minAutoLevel,E=r.media,B=a?a.duration:o?o.duration:0,C=E?E.currentTime:0,h=E&&E.playbackRate!==0?Math.abs(E.playbackRate):1,n=this.bwEstimator?this.bwEstimator.getEstimate():y.abrEwmaDefaultEstimate,l=(X.BufferHelper.bufferInfo(E,C,y.maxBufferHole).end-C)/h,d=this.findBestLevel(n,_,t,l,y.abrBandWidthFactor,y.abrBandWidthUpFactor);if(d>=0)return d;R.logger.trace((l?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var b=B?Math.min(B,y.maxStarvationDelay):y.maxStarvationDelay,m=y.abrBandWidthFactor,c=y.abrBandWidthUpFactor;if(!l){var L=this.bitrateTestDelay;if(L){var N=B?Math.min(B,y.maxLoadingDelay):y.maxLoadingDelay;b=N-L,R.logger.trace("bitrate test took "+Math.round(1e3*L)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*b)+" ms"),m=c=1}}return d=this.findBestLevel(n,_,t,l+b,m,c),Math.max(d,0)},i.findBestLevel=function(o,a,r,t,y,_){for(var E,B=this.fragCurrent,C=this.partCurrent,h=this.lastLoadedFragLevel,n=this.hls.levels,l=n[h],d=!!(l!=null&&(E=l.details)!==null&&E!==void 0&&E.live),b=l==null?void 0:l.codecSet,m=C?C.duration:B?B.duration:0,c=r;c>=a;c--){var L=n[c];if(!L||b&&L.codecSet!==b)continue;var N=L.details,T=(C?N==null?void 0:N.partTarget:N==null?void 0:N.averagetargetduration)||m,P=void 0;c<=h?P=y*o:P=_*o;var W=n[c].maxBitrate,U=W*T/P;if(R.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+c+"/"+Math.round(P)+"/"+W+"/"+T+"/"+t+"/"+U),P>W&&(!U||d&&!this.bitrateTestDelay||U<t))return c}return-1},v(s,[{key:"nextAutoLevel",get:function(){var o=this._nextAutoLevel,a=this.bwEstimator;if(o!==-1&&(!a||!a.canEstimate()))return o;var r=this.getNextABRAutoLevel();return o!==-1&&(r=Math.min(o,r)),r},set:function(o){this._nextAutoLevel=o}}]),s}();G.default=u},"./src/controller/audio-stream-controller.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/polyfills/number.ts"),F=D("./src/controller/base-stream-controller.ts"),O=D("./src/events.ts"),X=D("./src/utils/buffer-helper.ts"),M=D("./src/controller/fragment-tracker.ts"),e=D("./src/types/level.ts"),R=D("./src/types/loader.ts"),g=D("./src/loader/fragment.ts"),v=D("./src/demux/chunk-cache.ts"),u=D("./src/demux/transmuxer-interface.ts"),s=D("./src/types/transmuxer.ts"),i=D("./src/controller/fragment-finders.ts"),A=D("./src/utils/discontinuities.ts"),o=D("./src/errors.ts"),a=D("./src/utils/logger.ts");function r(){return r=Object.assign||function(B){for(var C=1;C<arguments.length;C++){var h=arguments[C];for(var n in h)Object.prototype.hasOwnProperty.call(h,n)&&(B[n]=h[n])}return B},r.apply(this,arguments)}function t(B,C){B.prototype=Object.create(C.prototype),B.prototype.constructor=B,y(B,C)}function y(B,C){return y=Object.setPrototypeOf||function(n,l){return n.__proto__=l,n},y(B,C)}var _=100,E=function(B){t(C,B);function C(n,l){var d;return d=B.call(this,n,l,"[audio-stream-controller]")||this,d.videoBuffer=null,d.videoTrackCC=-1,d.waitingVideoCC=-1,d.audioSwitch=!1,d.trackId=-1,d.waitingData=null,d.mainDetails=null,d.bufferFlushed=!1,d._registerListeners(),d}var h=C.prototype;return h.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},h._registerListeners=function(){var l=this.hls;l.on(O.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.on(O.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(O.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(O.Events.LEVEL_LOADED,this.onLevelLoaded,this),l.on(O.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),l.on(O.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),l.on(O.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),l.on(O.Events.ERROR,this.onError,this),l.on(O.Events.BUFFER_RESET,this.onBufferReset,this),l.on(O.Events.BUFFER_CREATED,this.onBufferCreated,this),l.on(O.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),l.on(O.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),l.on(O.Events.FRAG_BUFFERED,this.onFragBuffered,this)},h._unregisterListeners=function(){var l=this.hls;l.off(O.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.off(O.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.off(O.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(O.Events.LEVEL_LOADED,this.onLevelLoaded,this),l.off(O.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),l.off(O.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),l.off(O.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),l.off(O.Events.ERROR,this.onError,this),l.off(O.Events.BUFFER_RESET,this.onBufferReset,this),l.off(O.Events.BUFFER_CREATED,this.onBufferCreated,this),l.off(O.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),l.off(O.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),l.off(O.Events.FRAG_BUFFERED,this.onFragBuffered,this)},h.onInitPtsFound=function(l,d){var b=d.frag,m=d.id,c=d.initPTS;if(m==="main"){var L=b.cc;this.initPTS[b.cc]=c,this.log("InitPTS for cc: "+L+" found from main: "+c),this.videoTrackCC=L,this.state===F.State.WAITING_INIT_PTS&&this.tick()}},h.startLoad=function(l){if(!this.levels){this.startPosition=l,this.state=F.State.STOPPED;return}var d=this.lastCurrentTime;this.stopLoad(),this.setInterval(_),this.fragLoadError=0,d>0&&l===-1?(this.log("Override startPosition with lastCurrentTime @"+d.toFixed(3)),this.state=F.State.IDLE):(this.loadedmetadata=!1,this.state=F.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=l,this.tick()},h.doTick=function(){switch(this.state){case F.State.IDLE:this.doTickIdle();break;case F.State.WAITING_TRACK:{var l,d=this.levels,b=this.trackId,m=d==null||((l=d[b])===null||l===void 0)?void 0:l.details;if(m){if(this.waitForCdnTuneIn(m))break;this.state=F.State.WAITING_INIT_PTS}break}case F.State.FRAG_LOADING_WAITING_RETRY:{var c,L=performance.now(),N=this.retryDate;(!N||L>=N||(c=this.media)!==null&&c!==void 0&&c.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=F.State.IDLE);break}case F.State.WAITING_INIT_PTS:{var T=this.waitingData;if(T){var P=T.frag,W=T.part,U=T.cache,Y=T.complete;if(this.initPTS[P.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=F.State.FRAG_LOADING;var re=U.flush(),me={frag:P,part:W,payload:re,networkDetails:null};this._handleFragmentLoadProgress(me),Y&&B.prototype._handleFragmentLoadComplete.call(this,me)}else if(this.videoTrackCC!==this.waitingVideoCC)a.logger.log("Waiting fragment cc ("+P.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var ge=this.getLoadPosition(),Oe=X.BufferHelper.bufferInfo(this.mediaBuffer,ge,this.config.maxBufferHole),Se=Object(i.fragmentWithinToleranceTest)(Oe.end,this.config.maxFragLookUpTolerance,P);Se<0&&(a.logger.log("Waiting fragment cc ("+P.cc+") @ "+P.start+" cancelled because another fragment at "+Oe.end+" is needed"),this.clearWaitingFragment())}}else this.state=F.State.IDLE}}this.onTickEnd()},h.clearWaitingFragment=function(){var l=this.waitingData;l&&(this.fragmentTracker.removeFragment(l.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=F.State.IDLE)},h.onTickEnd=function(){var l=this.media;if(!l||!l.readyState)return;var d=this.mediaBuffer?this.mediaBuffer:l,b=d.buffered;!this.loadedmetadata&&b.length&&(this.loadedmetadata=!0),this.lastCurrentTime=l.currentTime},h.doTickIdle=function(){var l,d,b=this.hls,m=this.levels,c=this.media,L=this.trackId,N=b.config;if(!m||!m[L])return;if(!c&&(this.startFragRequested||!N.startFragPrefetch))return;var T=m[L],P=T.details;if(!P||P.live&&this.levelLastLoaded!==L||this.waitForCdnTuneIn(P)){this.state=F.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,g.ElementaryStreamTypes.AUDIO,R.PlaylistLevelType.AUDIO));var W=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,R.PlaylistLevelType.AUDIO);if(W===null)return;var U=W.len,Y=this.getMaxBufferLength(),re=this.audioSwitch;if(U>=Y&&!re)return;if(!re&&this._streamEnded(W,P)){b.trigger(O.Events.BUFFER_EOS,{type:"audio"}),this.state=F.State.ENDED;return}var me=P.fragments,ge=me[0].start,Oe=W.end;if(re){var Se=this.getLoadPosition();Oe=Se,P.PTSKnown&&Se<ge&&((W.end>ge||W.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),c.currentTime=ge+.05))}var Be=this.getNextFragment(Oe,P);if(!Be){this.bufferFlushed=!0;return}((l=Be.decryptdata)===null||l===void 0?void 0:l.keyFormat)==="identity"&&!((d=Be.decryptdata)!==null&&d!==void 0&&d.key)?this.loadKey(Be,P):this.loadFragment(Be,P,Oe)},h.getMaxBufferLength=function(){var l=B.prototype.getMaxBufferLength.call(this),d=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,R.PlaylistLevelType.MAIN);return d===null?l:Math.max(l,d.len)},h.onMediaDetaching=function(){this.videoBuffer=null,B.prototype.onMediaDetaching.call(this)},h.onAudioTracksUpdated=function(l,d){var b=d.audioTracks;this.resetTransmuxer(),this.levels=b.map(function(m){return new e.Level(m)})},h.onAudioTrackSwitching=function(l,d){var b=!!d.url;this.trackId=d.id;var m=this.fragCurrent;m!=null&&m.loader&&m.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),b?this.setInterval(_):this.resetTransmuxer(),b?(this.audioSwitch=!0,this.state=F.State.IDLE):this.state=F.State.STOPPED,this.tick()},h.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},h.onLevelLoaded=function(l,d){this.mainDetails=d.details},h.onAudioTrackLoaded=function(l,d){var b,m=this.levels,c=d.details,L=d.id;if(!m){this.warn("Audio tracks were reset while loading level "+L);return}this.log("Track "+L+" loaded ["+c.startSN+","+c.endSN+"],duration:"+c.totalduration);var N=m[L],T=0;if(c.live||(b=N.details)!==null&&b!==void 0&&b.live){var P=this.mainDetails;if(c.fragments[0]||(c.deltaUpdateFailed=!0),c.deltaUpdateFailed||!P)return;!N.details&&c.hasProgramDateTime&&P.hasProgramDateTime?(Object(A.alignMediaPlaylistByPDT)(c,P),T=c.fragments[0].start):T=this.alignPlaylists(c,N.details)}N.details=c,this.levelLastLoaded=L,!this.startFragRequested&&(this.mainDetails||!c.live)&&this.setStartPosition(N.details,T),this.state===F.State.WAITING_TRACK&&!this.waitForCdnTuneIn(c)&&(this.state=F.State.IDLE),this.tick()},h._handleFragmentLoadProgress=function(l){var d,b=l.frag,m=l.part,c=l.payload,L=this.config,N=this.trackId,T=this.levels;if(!T){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+b.sn+" of level "+b.level+" will not be buffered");return}var P=T[N];console.assert(P,"Audio track is defined on fragment load progress");var W=P.details;console.assert(W,"Audio track details are defined on fragment load progress");var U=L.defaultAudioCodec||P.audioCodec||"mp4a.40.2",Y=this.transmuxer;Y||(Y=this.transmuxer=new u.default(this.hls,R.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var re=this.initPTS[b.cc],me=(d=b.initSegment)===null||d===void 0?void 0:d.data;if(re!==void 0){var ge=!1,Oe=m?m.index:-1,Se=Oe!==-1,Be=new s.ChunkMetadata(b.level,b.sn,b.stats.chunkCount,c.byteLength,Oe,Se);Y.push(c,me,U,"",b,m,W.totalduration,ge,Be,re)}else{a.logger.log("Unknown video PTS for cc "+b.cc+", waiting for video PTS before demuxing audio frag "+b.sn+" of ["+W.startSN+" ,"+W.endSN+"],track "+N);var Ne=this.waitingData=this.waitingData||{frag:b,part:m,cache:new v.default,complete:!1},ke=Ne.cache;ke.push(new Uint8Array(c)),this.waitingVideoCC=this.videoTrackCC,this.state=F.State.WAITING_INIT_PTS}},h._handleFragmentLoadComplete=function(l){if(this.waitingData){this.waitingData.complete=!0;return}B.prototype._handleFragmentLoadComplete.call(this,l)},h.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},h.onBufferCreated=function(l,d){var b=d.tracks.audio;b&&(this.mediaBuffer=b.buffer),d.tracks.video&&(this.videoBuffer=d.tracks.video.buffer)},h.onFragBuffered=function(l,d){var b=d.frag,m=d.part;if(b.type!==R.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(b)){this.warn("Fragment "+b.sn+(m?" p: "+m.index:"")+" of level "+b.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}b.sn!=="initSegment"&&(this.fragPrevious=b,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(O.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(b,m)},h.onError=function(l,d){switch(d.details){case o.ErrorDetails.FRAG_LOAD_ERROR:case o.ErrorDetails.FRAG_LOAD_TIMEOUT:case o.ErrorDetails.KEY_LOAD_ERROR:case o.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(R.PlaylistLevelType.AUDIO,d);break;case o.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case o.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==F.State.ERROR&&this.state!==F.State.STOPPED&&(this.state=d.fatal?F.State.ERROR:F.State.IDLE,this.warn(d.details+" while loading frag, switching to "+this.state+" state"));break;case o.ErrorDetails.BUFFER_FULL_ERROR:if(d.parent==="audio"&&(this.state===F.State.PARSING||this.state===F.State.PARSED)){var b=!0,m=this.getFwdBufferInfo(this.mediaBuffer,R.PlaylistLevelType.AUDIO);m&&m.len>.5&&(b=!this.reduceMaxBufferLength(m.len)),b&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,B.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},h.onBufferFlushed=function(l,d){var b=d.type;b===g.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},h._handleTransmuxComplete=function(l){var d,b="audio",m=this.hls,c=l.remuxResult,L=l.chunkMeta,N=this.getCurrentContext(L);if(!N){this.warn("The loading context changed while buffering fragment "+L.sn+" of level "+L.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(L.level);return}var T=N.frag,P=N.part,W=c.audio,U=c.text,Y=c.id3,re=c.initSegment;if(this.fragContextChanged(T))return;if(this.state=F.State.PARSING,this.audioSwitch&&W&&this.completeAudioSwitch(),re!=null&&re.tracks&&(this._bufferInitSegment(re.tracks,T,L),m.trigger(O.Events.FRAG_PARSING_INIT_SEGMENT,{frag:T,id:b,tracks:re.tracks})),W){var me=W.startPTS,ge=W.endPTS,Oe=W.startDTS,Se=W.endDTS;P&&(P.elementaryStreams[g.ElementaryStreamTypes.AUDIO]={startPTS:me,endPTS:ge,startDTS:Oe,endDTS:Se}),T.setElementaryStreamInfo(g.ElementaryStreamTypes.AUDIO,me,ge,Oe,Se),this.bufferFragmentData(W,T,P,L)}if(Y!=null&&(d=Y.samples)!==null&&d!==void 0&&d.length){var Be=r({frag:T,id:b},Y);m.trigger(O.Events.FRAG_PARSING_METADATA,Be)}if(U){var Ne=r({frag:T,id:b},U);m.trigger(O.Events.FRAG_PARSING_USERDATA,Ne)}},h._bufferInitSegment=function(l,d,b){if(this.state!==F.State.PARSING)return;l.video&&delete l.video;var m=l.audio;if(!m)return;m.levelCodec=m.codec,m.id="audio",this.log("Init audio buffer, container:"+m.container+", codecs[parsed]=["+m.codec+"]"),this.hls.trigger(O.Events.BUFFER_CODECS,l);var c=m.initSegment;if(c!=null&&c.byteLength){var L={type:"audio",frag:d,part:null,chunkMeta:b,parent:d.type,data:c};this.hls.trigger(O.Events.BUFFER_APPENDING,L)}this.tick()},h.loadFragment=function(l,d,b){var m=this.fragmentTracker.getState(l);this.fragCurrent=l,(this.audioSwitch||m===M.FragmentState.NOT_LOADED||m===M.FragmentState.PARTIAL)&&(l.sn==="initSegment"?this._loadInitSegment(l):d.live&&!Object(V.isFiniteNumber)(this.initPTS[l.cc])?(this.log("Waiting for video PTS in continuity counter "+l.cc+" of live stream before loading audio fragment "+l.sn+" of level "+this.trackId),this.state=F.State.WAITING_INIT_PTS):(this.startFragRequested=!0,B.prototype.loadFragment.call(this,l,d,b)))},h.completeAudioSwitch=function(){var l=this.hls,d=this.media,b=this.trackId;d&&(this.log("Switching audio track : flushing all audio"),B.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,l.trigger(O.Events.AUDIO_TRACK_SWITCHED,{id:b})},C}(F.default);G.default=E},"./src/controller/audio-track-controller.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/events.ts"),F=D("./src/errors.ts"),O=D("./src/controller/base-playlist-controller.ts"),X=D("./src/types/loader.ts");function M(u,s){for(var i=0;i<s.length;i++){var A=s[i];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(u,A.key,A)}}function e(u,s,i){return s&&M(u.prototype,s),i&&M(u,i),u}function R(u,s){u.prototype=Object.create(s.prototype),u.prototype.constructor=u,g(u,s)}function g(u,s){return g=Object.setPrototypeOf||function(A,o){return A.__proto__=o,A},g(u,s)}var v=function(u){R(s,u);function s(A){var o;return o=u.call(this,A,"[audio-track-controller]")||this,o.tracks=[],o.groupId=null,o.tracksInGroup=[],o.trackId=-1,o.trackName="",o.selectDefaultTrack=!0,o.registerListeners(),o}var i=s.prototype;return i.registerListeners=function(){var o=this.hls;o.on(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.on(V.Events.LEVEL_LOADING,this.onLevelLoading,this),o.on(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),o.on(V.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),o.on(V.Events.ERROR,this.onError,this)},i.unregisterListeners=function(){var o=this.hls;o.off(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.off(V.Events.LEVEL_LOADING,this.onLevelLoading,this),o.off(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),o.off(V.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),o.off(V.Events.ERROR,this.onError,this)},i.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,u.prototype.destroy.call(this)},i.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},i.onManifestParsed=function(o,a){this.tracks=a.audioTracks||[]},i.onAudioTrackLoaded=function(o,a){var r=a.id,t=a.details,y=this.tracksInGroup[r];if(!y){this.warn("Invalid audio track id "+r);return}var _=y.details;y.details=a.details,this.log("audioTrack "+r+" loaded ["+t.startSN+"-"+t.endSN+"]"),r===this.trackId&&(this.retryCount=0,this.playlistLoaded(r,a,_))},i.onLevelLoading=function(o,a){this.switchLevel(a.level)},i.onLevelSwitching=function(o,a){this.switchLevel(a.level)},i.switchLevel=function(o){var a=this.hls.levels[o];if(!(a!=null&&a.audioGroupIds))return;var r=a.audioGroupIds[a.urlId];if(this.groupId!==r){this.groupId=r;var t=this.tracks.filter(function(_){return!r||_.groupId===r});this.selectDefaultTrack&&!t.some(function(_){return _.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=t;var y={audioTracks:t};this.log("Updating audio tracks, "+t.length+' track(s) found in "'+r+'" group-id'),this.hls.trigger(V.Events.AUDIO_TRACKS_UPDATED,y),this.selectInitialTrack()}},i.onError=function(o,a){if(u.prototype.onError.call(this,o,a),a.fatal||!a.context)return;a.context.type===X.PlaylistContextType.AUDIO_TRACK&&a.context.id===this.trackId&&a.context.groupId===this.groupId&&this.retryLoadingOrFail(a)},i.setAudioTrack=function(o){var a=this.tracksInGroup;if(o<0||o>=a.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var r=a[this.trackId];this.log("Now switching to audio-track index "+o);var t=a[o],y=t.id,_=t.groupId,E=_===void 0?"":_,B=t.name,C=t.type,h=t.url;if(this.trackId=o,this.trackName=B,this.selectDefaultTrack=!1,this.hls.trigger(V.Events.AUDIO_TRACK_SWITCHING,{id:y,groupId:E,name:B,type:C,url:h}),t.details&&!t.details.live)return;var n=this.switchParams(t.url,r==null?void 0:r.details);this.loadPlaylist(n)},i.selectInitialTrack=function(){var o=this.tracksInGroup;console.assert(o.length,"Initial audio track should be selected when tracks are known");var a=this.trackName,r=this.findTrackId(a)||this.findTrackId();r!==-1?this.setAudioTrack(r):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(V.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},i.findTrackId=function(o){for(var a=this.tracksInGroup,r=0;r<a.length;r++){var t=a[r];if((!this.selectDefaultTrack||t.default)&&(!o||o===t.name))return t.id}return-1},i.loadPlaylist=function(o){var a=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(a)){var r=a.id,t=a.groupId,y=a.url;if(o)try{y=o.addDirectives(y)}catch(_){this.warn("Could not construct new URL with HLS Delivery Directives: "+_)}this.log("loading audio-track playlist for id: "+r),this.clearTimer(),this.hls.trigger(V.Events.AUDIO_TRACK_LOADING,{url:y,id:r,groupId:t,deliveryDirectives:o||null})}},e(s,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(o){this.selectDefaultTrack=!1,this.setAudioTrack(o)}}]),s}(O.default);G.default=v},"./src/controller/base-playlist-controller.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return e});var V=D("./src/polyfills/number.ts"),F=D("./src/types/level.ts"),O=D("./src/controller/level-helper.ts"),X=D("./src/utils/logger.ts"),M=D("./src/errors.ts"),e=function(){function R(v,u){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=X.logger.log.bind(X.logger,u+":"),this.warn=X.logger.warn.bind(X.logger,u+":"),this.hls=v}var g=R.prototype;return g.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},g.onError=function(u,s){s.fatal&&s.type===M.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},g.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},g.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},g.stopLoad=function(){this.canLoad=!1,this.clearTimer()},g.switchParams=function(u,s){var i=s==null?void 0:s.renditionReports;if(i)for(var A=0;A<i.length;A++){var o=i[A],a=""+o.URI;if(a===u.substr(-a.length)){var r=parseInt(o["LAST-MSN"]),t=parseInt(o["LAST-PART"]);if(s&&this.hls.config.lowLatencyMode){var y=Math.min(s.age-s.partTarget,s.targetduration);t!==void 0&&y>s.partTarget&&(t+=1)}if(Object(V.isFiniteNumber)(r))return new F.HlsUrlParameters(r,Object(V.isFiniteNumber)(t)?t:void 0,F.HlsSkip.No)}}},g.loadPlaylist=function(u){},g.shouldLoadTrack=function(u){return this.canLoad&&u&&!!u.url&&(!u.details||u.details.live)},g.playlistLoaded=function(u,s,i){var A=this,o=s.details,a=s.stats,r=a.loading.end?Math.max(0,self.performance.now()-a.loading.end):0;if(o.advancedDateTime=Date.now()-r,o.live||i!=null&&i.live){if(o.reloaded(i),i&&this.log("live playlist "+u+" "+(o.advanced?"REFRESHED "+o.lastPartSn+"-"+o.lastPartIndex:"MISSED")),i&&o.fragments.length>0&&Object(O.mergeDetails)(i,o),!this.canLoad||!o.live)return;var t,y=void 0,_=void 0;if(o.canBlockReload&&o.endSN&&o.advanced){var E=this.hls.config.lowLatencyMode,B=o.lastPartSn,C=o.endSN,h=o.lastPartIndex,n=h!==-1,l=B===C,d=E?0:h;n?(y=l?C+1:B,_=l?d:h+1):y=C+1;var b=o.age,m=b+o.ageHeader,c=Math.min(m-o.partTarget,o.targetduration*1.5);if(c>0){if(i&&c>i.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+i.tuneInGoal+" to: "+c+" with playlist age: "+o.age),c=0;else{var L=Math.floor(c/o.targetduration);if(y+=L,_!==void 0){var N=Math.round(c%o.targetduration/o.partTarget);_+=N}this.log("CDN Tune-in age: "+o.ageHeader+"s last advanced "+b.toFixed(2)+"s goal: "+c+" skip sn "+L+" to part "+_)}o.tuneInGoal=c}if(t=this.getDeliveryDirectives(o,s.deliveryDirectives,y,_),E||!l){this.loadPlaylist(t);return}}else t=this.getDeliveryDirectives(o,s.deliveryDirectives,y,_);var T=Object(O.computeReloadInterval)(o,a);y!==void 0&&o.canBlockReload&&(T-=o.partTarget||1),this.log("reload live playlist "+u+" in "+Math.round(T)+" ms"),this.timer=self.setTimeout(function(){return A.loadPlaylist(t)},T)}else this.clearTimer()},g.getDeliveryDirectives=function(u,s,i,A){var o=Object(F.getSkipValue)(u,i);return s!=null&&s.skip&&u.deltaUpdateFailed&&(i=s.msn,A=s.part,o=F.HlsSkip.No),new F.HlsUrlParameters(i,A,o)},g.retryLoadingOrFail=function(u){var s=this,i=this.hls.config,A=this.retryCount<i.levelLoadingMaxRetry;if(A){var o;if(this.retryCount++,u.details.indexOf("LoadTimeOut")>-1&&(o=u.context)!==null&&o!==void 0&&o.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+u.details+'"'),this.loadPlaylist();else{var a=Math.min(Math.pow(2,this.retryCount)*i.levelLoadingRetryDelay,i.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return s.loadPlaylist()},a),this.warn("retry playlist loading #"+this.retryCount+" in "+a+' ms after "'+u.details+'"')}}else this.warn('cannot recover from error "'+u.details+'"'),this.clearTimer(),u.fatal=!0;return A},R}()},"./src/controller/base-stream-controller.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"State",function(){return C}),D.d(G,"default",function(){return h});var V=D("./src/polyfills/number.ts"),F=D("./src/task-loop.ts"),O=D("./src/controller/fragment-tracker.ts"),X=D("./src/utils/buffer-helper.ts"),M=D("./src/utils/logger.ts"),e=D("./src/events.ts"),R=D("./src/errors.ts"),g=D("./src/types/transmuxer.ts"),v=D("./src/utils/mp4-tools.ts"),u=D("./src/utils/discontinuities.ts"),s=D("./src/controller/fragment-finders.ts"),i=D("./src/controller/level-helper.ts"),A=D("./src/loader/fragment-loader.ts"),o=D("./src/crypt/decrypter.ts"),a=D("./src/utils/time-ranges.ts"),r=D("./src/types/loader.ts");function t(n,l){for(var d=0;d<l.length;d++){var b=l[d];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(n,b.key,b)}}function y(n,l,d){return l&&t(n.prototype,l),d&&t(n,d),n}function _(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function E(n,l){n.prototype=Object.create(l.prototype),n.prototype.constructor=n,B(n,l)}function B(n,l){return B=Object.setPrototypeOf||function(b,m){return b.__proto__=m,b},B(n,l)}var C={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"},h=function(n){E(l,n);function l(b,m,c){var L;return L=n.call(this)||this,L.hls=void 0,L.fragPrevious=null,L.fragCurrent=null,L.fragmentTracker=void 0,L.transmuxer=null,L._state=C.STOPPED,L.media=void 0,L.mediaBuffer=void 0,L.config=void 0,L.bitrateTest=!1,L.lastCurrentTime=0,L.nextLoadPosition=0,L.startPosition=0,L.loadedmetadata=!1,L.fragLoadError=0,L.retryDate=0,L.levels=null,L.fragmentLoader=void 0,L.levelLastLoaded=null,L.startFragRequested=!1,L.decrypter=void 0,L.initPTS=[],L.onvseeking=null,L.onvended=null,L.logPrefix="",L.log=void 0,L.warn=void 0,L.logPrefix=c,L.log=M.logger.log.bind(M.logger,c+":"),L.warn=M.logger.warn.bind(M.logger,c+":"),L.hls=b,L.fragmentLoader=new A.default(b.config),L.fragmentTracker=m,L.config=b.config,L.decrypter=new o.default(b,b.config),b.on(e.Events.KEY_LOADED,L.onKeyLoaded,_(L)),L}var d=l.prototype;return d.doTick=function(){this.onTickEnd()},d.onTickEnd=function(){},d.startLoad=function(m){},d.stopLoad=function(){this.fragmentLoader.abort();var m=this.fragCurrent;m&&this.fragmentTracker.removeFragment(m),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=C.STOPPED},d._streamEnded=function(m,c){var L=this.fragCurrent,N=this.fragmentTracker;if(!c.live&&L&&L.sn===c.endSN&&!m.nextStart){var T=N.getState(L);return T===O.FragmentState.PARTIAL||T===O.FragmentState.OK}return!1},d.onMediaAttached=function(m,c){var L=this.media=this.mediaBuffer=c.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),L.addEventListener("seeking",this.onvseeking),L.addEventListener("ended",this.onvended);var N=this.config;this.levels&&N.autoStartLoad&&this.state===C.STOPPED&&this.startLoad(N.startPosition)},d.onMediaDetaching=function(){var m=this.media;m!=null&&m.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),m&&(m.removeEventListener("seeking",this.onvseeking),m.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},d.onMediaSeeking=function(){var m=this.config,c=this.fragCurrent,L=this.media,N=this.mediaBuffer,T=this.state,P=L?L.currentTime:0,W=X.BufferHelper.bufferInfo(N||L,P,m.maxBufferHole);if(this.log("media seeking to "+(Object(V.isFiniteNumber)(P)?P.toFixed(3):P)+", state: "+T),T===C.ENDED)this.resetLoadingState();else if(c&&!W.len){var U=m.maxFragLookUpTolerance,Y=c.start-U,re=c.start+c.duration+U,me=P>re;(P<Y||me)&&(me&&c.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),c.loader.abort()),this.resetLoadingState())}L&&(this.lastCurrentTime=P),!this.loadedmetadata&&!W.len&&(this.nextLoadPosition=this.startPosition=P),this.tickImmediate()},d.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},d.onKeyLoaded=function(m,c){if(this.state!==C.KEY_LOADING||c.frag!==this.fragCurrent||!this.levels)return;this.state=C.IDLE;var L=this.levels[c.frag.level].details;L&&this.loadFragment(c.frag,L,c.frag.start)},d.onHandlerDestroying=function(){this.stopLoad(),n.prototype.onHandlerDestroying.call(this)},d.onHandlerDestroyed=function(){this.state=C.STOPPED,this.hls.off(e.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,n.prototype.onHandlerDestroyed.call(this)},d.loadKey=function(m,c){this.log("Loading key for "+m.sn+" of ["+c.startSN+"-"+c.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+m.level),this.state=C.KEY_LOADING,this.fragCurrent=m,this.hls.trigger(e.Events.KEY_LOADING,{frag:m})},d.loadFragment=function(m,c,L){this._loadFragForPlayback(m,c,L)},d._loadFragForPlayback=function(m,c,L){var N=this,T=function(W){if(N.fragContextChanged(m)){N.warn("Fragment "+m.sn+(W.part?" p: "+W.part.index:"")+" of level "+m.level+" was dropped during download."),N.fragmentTracker.removeFragment(m);return}m.stats.chunkCount++,N._handleFragmentLoadProgress(W)};this._doFragLoad(m,c,L,T).then(function(P){if(!P)return;N.fragLoadError=0;var W=N.state;if(N.fragContextChanged(m)){(W===C.FRAG_LOADING||W===C.BACKTRACKING||!N.fragCurrent&&W===C.PARSING)&&(N.fragmentTracker.removeFragment(m),N.state=C.IDLE);return}if("payload"in P&&(N.log("Loaded fragment "+m.sn+" of level "+m.level),N.hls.trigger(e.Events.FRAG_LOADED,P),N.state===C.BACKTRACKING)){N.fragmentTracker.backtrack(m,P),N.resetFragmentLoading(m);return}N._handleFragmentLoadComplete(P)}).catch(function(P){N.warn(P),N.resetFragmentLoading(m)})},d.flushMainBuffer=function(m,c,L){if(L===void 0&&(L=null),!(m-c))return;var N={startOffset:m,endOffset:c,type:L};this.fragLoadError=0,this.hls.trigger(e.Events.BUFFER_FLUSHING,N)},d._loadInitSegment=function(m){var c=this;this._doFragLoad(m).then(function(L){if(!L||c.fragContextChanged(m)||!c.levels)throw new Error("init load aborted");return L}).then(function(L){var N=c.hls,T=L.payload,P=m.decryptdata;if(T&&T.byteLength>0&&P&&P.key&&P.iv&&P.method==="AES-128"){var W=self.performance.now();return c.decrypter.webCryptoDecrypt(new Uint8Array(T),P.key.buffer,P.iv.buffer).then(function(U){var Y=self.performance.now();return N.trigger(e.Events.FRAG_DECRYPTED,{frag:m,payload:U,stats:{tstart:W,tdecrypt:Y}}),L.payload=U,L})}return L}).then(function(L){var N=c.fragCurrent,T=c.hls,P=c.levels;if(!P)throw new Error("init load aborted, missing levels");var W=P[m.level].details;console.assert(W,"Level details are defined when init segment is loaded");var U=m.stats;c.state=C.IDLE,c.fragLoadError=0,m.data=new Uint8Array(L.payload),U.parsing.start=U.buffering.start=self.performance.now(),U.parsing.end=U.buffering.end=self.performance.now(),L.frag===N&&T.trigger(e.Events.FRAG_BUFFERED,{stats:U,frag:N,part:null,id:m.type}),c.tick()}).catch(function(L){c.warn(L),c.resetFragmentLoading(m)})},d.fragContextChanged=function(m){var c=this.fragCurrent;return!m||!c||m.level!==c.level||m.sn!==c.sn||m.urlId!==c.urlId},d.fragBufferedComplete=function(m,c){var L=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+m.type+" sn: "+m.sn+(c?" part: "+c.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+m.level+" "+a.default.toString(X.BufferHelper.getBuffered(L))),this.state=C.IDLE,this.tick()},d._handleFragmentLoadComplete=function(m){var c=this.transmuxer;if(!c)return;var L=m.frag,N=m.part,T=m.partsLoaded,P=!T||T.length===0||T.some(function(U){return!U}),W=new g.ChunkMetadata(L.level,L.sn,L.stats.chunkCount+1,0,N?N.index:-1,!P);c.flush(W)},d._handleFragmentLoadProgress=function(m){},d._doFragLoad=function(m,c,L,N){var T=this;if(L===void 0&&(L=null),!this.levels)throw new Error("frag load aborted, missing levels");if(L=Math.max(m.start,L||0),this.config.lowLatencyMode&&c){var P=c.partList;if(P&&N){L>m.end&&c.fragmentHint&&(m=c.fragmentHint);var W=this.getNextPart(P,m,L);if(W>-1){var U=P[W];return this.log("Loading part sn: "+m.sn+" p: "+U.index+" cc: "+m.cc+" of playlist ["+c.startSN+"-"+c.endSN+"] parts [0-"+W+"-"+(P.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+m.level+", target: "+parseFloat(L.toFixed(3))),this.nextLoadPosition=U.start+U.duration,this.state=C.FRAG_LOADING,this.hls.trigger(e.Events.FRAG_LOADING,{frag:m,part:P[W],targetBufferTime:L}),this.doFragPartsLoad(m,P,W,N).catch(function(Y){return T.handleFragLoadError(Y)})}else if(!m.url||this.loadedEndOfParts(P,L))return Promise.resolve(null)}}return this.log("Loading fragment "+m.sn+" cc: "+m.cc+" "+(c?"of ["+c.startSN+"-"+c.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+m.level+", target: "+parseFloat(L.toFixed(3))),Object(V.isFiniteNumber)(m.sn)&&!this.bitrateTest&&(this.nextLoadPosition=m.start+m.duration),this.state=C.FRAG_LOADING,this.hls.trigger(e.Events.FRAG_LOADING,{frag:m,targetBufferTime:L}),this.fragmentLoader.load(m,N).catch(function(Y){return T.handleFragLoadError(Y)})},d.doFragPartsLoad=function(m,c,L,N){var T=this;return new Promise(function(P,W){var U=[],Y=function re(me){var ge=c[me];T.fragmentLoader.loadPart(m,ge,N).then(function(Oe){U[ge.index]=Oe;var Se=Oe.part;T.hls.trigger(e.Events.FRAG_LOADED,Oe);var Be=c[me+1];if(Be&&Be.fragment===m)re(me+1);else return P({frag:m,part:Se,partsLoaded:U})}).catch(W)};Y(L)})},d.handleFragLoadError=function(m){var c=m.data;return c&&c.details===R.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(c.frag,c.part):this.hls.trigger(e.Events.ERROR,c),null},d._handleTransmuxerFlush=function(m){var c=this.getCurrentContext(m);if(!c||this.state!==C.PARSING){this.fragCurrent||(this.state=C.IDLE);return}var L=c.frag,N=c.part,T=c.level,P=self.performance.now();L.stats.parsing.end=P,N&&(N.stats.parsing.end=P),this.updateLevelTiming(L,N,T,m.partial)},d.getCurrentContext=function(m){var c=this.levels,L=m.level,N=m.sn,T=m.part;if(!c||!c[L])return this.warn("Levels object was unset while buffering fragment "+N+" of level "+L+". The current chunk will not be buffered."),null;var P=c[L],W=T>-1?Object(i.getPartWith)(P,N,T):null,U=W?W.fragment:Object(i.getFragmentWithSN)(P,N,this.fragCurrent);return U?{frag:U,part:W,level:P}:null},d.bufferFragmentData=function(m,c,L,N){if(!m||this.state!==C.PARSING)return;var T=m.data1,P=m.data2,W=T;if(T&&P&&(W=Object(v.appendUint8Array)(T,P)),!W||!W.length)return;var U={type:m.type,frag:c,part:L,chunkMeta:N,parent:c.type,data:W};this.hls.trigger(e.Events.BUFFER_APPENDING,U),m.dropped&&m.independent&&!L&&this.flushBufferGap(c)},d.flushBufferGap=function(m){var c=this.media;if(!c)return;if(!X.BufferHelper.isBuffered(c,c.currentTime)){this.flushMainBuffer(0,m.start);return}var L=c.currentTime,N=X.BufferHelper.bufferInfo(c,L,0),T=m.duration,P=Math.min(this.config.maxFragLookUpTolerance*2,T*.25),W=Math.max(Math.min(m.start-P,N.end-P),L+P);m.start-W>P&&this.flushMainBuffer(W,m.start)},d.getFwdBufferInfo=function(m,c){var L=this.config,N=this.getLoadPosition();if(!Object(V.isFiniteNumber)(N))return null;var T=X.BufferHelper.bufferInfo(m,N,L.maxBufferHole);if(T.len===0&&T.nextStart!==void 0){var P=this.fragmentTracker.getBufferedFrag(N,c);if(P&&T.nextStart<P.end)return X.BufferHelper.bufferInfo(m,N,Math.max(T.nextStart,L.maxBufferHole))}return T},d.getMaxBufferLength=function(m){var c=this.config,L;return m?L=Math.max(8*c.maxBufferSize/m,c.maxBufferLength):L=c.maxBufferLength,Math.min(L,c.maxMaxBufferLength)},d.reduceMaxBufferLength=function(m){var c=this.config,L=m||c.maxBufferLength;return c.maxMaxBufferLength>=L?(c.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+c.maxMaxBufferLength+"s"),!0):!1},d.getNextFragment=function(m,c){var L,N,T=c.fragments,P=T.length;if(!P)return null;var W=this.config,U=T[0].start,Y;if(c.live){var re=W.initialLiveManifestSize;if(P<re)return this.warn("Not enough fragments to start playback (have: "+P+", need: "+re+")"),null;!c.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(Y=this.getInitialLiveFragment(c,T),this.startPosition=Y?this.hls.liveSyncPosition||Y.start:m)}else m<=U&&(Y=T[0]);if(!Y){var me=W.lowLatencyMode?c.partEnd:c.fragmentEnd;Y=this.getFragmentAtPosition(m,me,c)}return(L=Y)!==null&&L!==void 0&&L.initSegment&&!((N=Y)!==null&&N!==void 0&&N.initSegment.data)&&!this.bitrateTest&&(Y=Y.initSegment),Y},d.getNextPart=function(m,c,L){for(var N=-1,T=!1,P=!0,W=0,U=m.length;W<U;W++){var Y=m[W];if(P=P&&!Y.independent,N>-1&&L<Y.start)break;var re=Y.loaded;!re&&(T||Y.independent||P)&&Y.fragment===c&&(N=W),T=re}return N},d.loadedEndOfParts=function(m,c){var L=m[m.length-1];return L&&c>L.start&&L.loaded},d.getInitialLiveFragment=function(m,c){var L=this.fragPrevious,N=null;if(L){if(m.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+L.programDateTime),N=Object(s.findFragmentByPDT)(c,L.endProgramDateTime,this.config.maxFragLookUpTolerance)),!N){var T=L.sn+1;if(T>=m.startSN&&T<=m.endSN){var P=c[T-m.startSN];L.cc===P.cc&&(N=P,this.log("Live playlist, switching playlist, load frag with next SN: "+N.sn))}N||(N=Object(s.findFragWithCC)(c,L.cc),N&&this.log("Live playlist, switching playlist, load frag with same CC: "+N.sn))}}else{var W=this.hls.liveSyncPosition;W!==null&&(N=this.getFragmentAtPosition(W,this.bitrateTest?m.fragmentEnd:m.edge,m))}return N},d.getFragmentAtPosition=function(m,c,L){var N=this.config,T=this.fragPrevious,P=L.fragments,W=L.endSN,U=L.fragmentHint,Y=N.maxFragLookUpTolerance,re=!!(N.lowLatencyMode&&L.partList&&U);re&&U&&!this.bitrateTest&&(P=P.concat(U),W=U.sn);var me;if(m<c){var ge=m>c-Y?0:Y;me=Object(s.findFragmentByPTS)(T,P,m,ge)}else me=P[P.length-1];if(me){var Oe=me.sn-L.startSN,Se=T&&me.level===T.level,Be=P[Oe+1],Ne=this.fragmentTracker.getState(me);if(Ne===O.FragmentState.BACKTRACKED){me=null;for(var ke=Oe;P[ke]&&this.fragmentTracker.getState(P[ke])===O.FragmentState.BACKTRACKED;)T?me=P[ke--]:me=P[--ke];me||(me=Be)}else T&&me.sn===T.sn&&!re&&(Se&&(me.sn<W&&this.fragmentTracker.getState(Be)!==O.FragmentState.OK?(this.log("SN "+me.sn+" just loaded, load next one: "+Be.sn),me=Be):me=null))}return me},d.synchronizeToLiveEdge=function(m){var c=this.config,L=this.media;if(!L)return;var N=this.hls.liveSyncPosition,T=L.currentTime,P=m.fragments[0].start,W=m.edge,U=T>=P-c.maxFragLookUpTolerance&&T<=W;if(N!==null&&L.duration>N&&(T<N||!U)){var Y=c.liveMaxLatencyDuration!==void 0?c.liveMaxLatencyDuration:c.liveMaxLatencyDurationCount*m.targetduration;(!U&&L.readyState<4||T<W-Y)&&(this.loadedmetadata||(this.nextLoadPosition=N),L.readyState&&(this.warn("Playback: "+T.toFixed(3)+" is located too far from the end of live sliding playlist: "+W+", reset currentTime to : "+N.toFixed(3)),L.currentTime=N))}},d.alignPlaylists=function(m,c){var L=this.levels,N=this.levelLastLoaded,T=this.fragPrevious,P=N!==null?L[N]:null,W=m.fragments.length;if(!W)return this.warn("No fragments in live playlist"),0;var U=m.fragments[0].start,Y=!c,re=m.alignedSliding&&Object(V.isFiniteNumber)(U);if(Y||!re&&!U){Object(u.alignStream)(T,P,m);var me=m.fragments[0].start;return this.log("Live playlist sliding: "+me.toFixed(2)+" start-sn: "+(c?c.startSN:"na")+"->"+m.startSN+" prev-sn: "+(T?T.sn:"na")+" fragments: "+W),me}return U},d.waitForCdnTuneIn=function(m){var c=3;return m.live&&m.canBlockReload&&m.tuneInGoal>Math.max(m.partHoldBack,m.partTarget*c)},d.setStartPosition=function(m,c){var L=this.startPosition;if(L<c&&(L=-1),L===-1||this.lastCurrentTime===-1){var N=m.startTimeOffset;Object(V.isFiniteNumber)(N)?(L=c+N,N<0&&(L+=m.totalduration),L=Math.min(Math.max(c,L),c+m.totalduration),this.log("Start time offset "+N+" found in playlist, adjust startPosition to "+L),this.startPosition=L):m.live?L=this.hls.liveSyncPosition||c:this.startPosition=L=0,this.lastCurrentTime=L}this.nextLoadPosition=L},d.getLoadPosition=function(){var m=this.media,c=0;return this.loadedmetadata&&m?c=m.currentTime:this.nextLoadPosition&&(c=this.nextLoadPosition),c},d.handleFragLoadAborted=function(m,c){this.transmuxer&&m.sn!=="initSegment"&&m.stats.aborted&&(this.warn("Fragment "+m.sn+(c?" part"+c.index:"")+" of level "+m.level+" was aborted"),this.resetFragmentLoading(m))},d.resetFragmentLoading=function(m){(!this.fragCurrent||!this.fragContextChanged(m))&&(this.state=C.IDLE)},d.onFragmentOrKeyLoadError=function(m,c){if(c.fatal)return;var L=c.frag;if(!L||L.type!==m)return;var N=this.fragCurrent;console.assert(N&&L.sn===N.sn&&L.level===N.level&&L.urlId===N.urlId,"Frag load error must match current frag to retry");var T=this.config;if(this.fragLoadError+1<=T.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(L.level))return;var P=Math.min(Math.pow(2,this.fragLoadError)*T.fragLoadingRetryDelay,T.fragLoadingMaxRetryTimeout);this.warn("Fragment "+L.sn+" of "+m+" "+L.level+" failed to load, retrying in "+P+"ms"),this.retryDate=self.performance.now()+P,this.fragLoadError++,this.state=C.FRAG_LOADING_WAITING_RETRY}else c.levelRetry?(m===r.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=C.IDLE):(M.logger.error(c.details+" reaches max retry, redispatch as fatal ..."),c.fatal=!0,this.hls.stopLoad(),this.state=C.ERROR)},d.afterBufferFlushed=function(m,c,L){if(!m)return;var N=X.BufferHelper.getBuffered(m);this.fragmentTracker.detectEvictedFragments(c,N,L),this.state===C.ENDED&&this.resetLoadingState()},d.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=C.IDLE},d.resetLiveStartWhenNotLoaded=function(m){if(!this.loadedmetadata){this.startFragRequested=!1;var c=this.levels?this.levels[m].details:null;if(c!=null&&c.live)return this.startPosition=-1,this.setStartPosition(c,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},d.updateLevelTiming=function(m,c,L,N){var T=this,P=L.details;console.assert(!!P,"level.details must be defined");var W=Object.keys(m.elementaryStreams).reduce(function(U,Y){var re=m.elementaryStreams[Y];if(re){var me=re.endPTS-re.startPTS;if(me<=0)return T.warn("Could not parse fragment "+m.sn+" "+Y+" duration reliably ("+me+") resetting transmuxer to fallback to playlist timing"),T.resetTransmuxer(),U||!1;var ge=N?0:Object(i.updateFragPTSDTS)(P,m,re.startPTS,re.endPTS,re.startDTS,re.endDTS);return T.hls.trigger(e.Events.LEVEL_PTS_UPDATED,{details:P,level:L,drift:ge,type:Y,frag:m,start:re.startPTS,end:re.endPTS}),!0}return U},!1);W?(this.state=C.PARSED,this.hls.trigger(e.Events.FRAG_PARSED,{frag:m,part:c})):this.resetLoadingState()},d.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},y(l,[{key:"state",get:function(){return this._state},set:function(m){var c=this._state;c!==m&&(this._state=m,this.log(c+"->"+m))}}]),l}(F.default)},"./src/controller/buffer-controller.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return s});var V=D("./src/polyfills/number.ts"),F=D("./src/events.ts"),O=D("./src/utils/logger.ts"),X=D("./src/errors.ts"),M=D("./src/utils/buffer-helper.ts"),e=D("./src/utils/mediasource-helper.ts"),R=D("./src/loader/fragment.ts"),g=D("./src/controller/buffer-operation-queue.ts"),v=Object(e.getMediaSource)(),u=/([ha]vc.)(?:\.[^.,]+)+/,s=function(){function i(o){var a=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 r=a.hls,t=a.media,y=a.mediaSource;O.logger.log("[buffer-controller]: Media source opened"),t&&(a.updateMediaElementDuration(),r.trigger(F.Events.MEDIA_ATTACHED,{media:t})),y&&y.removeEventListener("sourceopen",a._onMediaSourceOpen),a.checkPendingTracks()},this._onMediaSourceClose=function(){O.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){O.logger.log("[buffer-controller]: Media source ended")},this.hls=o,this._initSourceBuffer(),this.registerListeners()}var A=i.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 a=this.hls;a.on(F.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.on(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(F.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(F.Events.BUFFER_RESET,this.onBufferReset,this),a.on(F.Events.BUFFER_APPENDING,this.onBufferAppending,this),a.on(F.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.on(F.Events.BUFFER_EOS,this.onBufferEos,this),a.on(F.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),a.on(F.Events.LEVEL_UPDATED,this.onLevelUpdated,this),a.on(F.Events.FRAG_PARSED,this.onFragParsed,this),a.on(F.Events.FRAG_CHANGED,this.onFragChanged,this)},A.unregisterListeners=function(){var a=this.hls;a.off(F.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.off(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(F.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(F.Events.BUFFER_RESET,this.onBufferReset,this),a.off(F.Events.BUFFER_APPENDING,this.onBufferAppending,this),a.off(F.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.off(F.Events.BUFFER_EOS,this.onBufferEos,this),a.off(F.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),a.off(F.Events.LEVEL_UPDATED,this.onLevelUpdated,this),a.off(F.Events.FRAG_PARSED,this.onFragParsed,this),a.off(F.Events.FRAG_CHANGED,this.onFragChanged,this)},A._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new g.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},A.onManifestParsed=function(a,r){var t=2;(r.audio&&!r.video||!r.altAudio)&&(t=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=t,this.details=null,O.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},A.onMediaAttaching=function(a,r){var t=this.media=r.media;if(t&&v){var y=this.mediaSource=new v;y.addEventListener("sourceopen",this._onMediaSourceOpen),y.addEventListener("sourceended",this._onMediaSourceEnded),y.addEventListener("sourceclose",this._onMediaSourceClose),t.src=self.URL.createObjectURL(y),this._objectUrl=t.src}},A.onMediaDetaching=function(){var a=this.media,r=this.mediaSource,t=this._objectUrl;if(r){if(O.logger.log("[buffer-controller]: media source detaching"),r.readyState==="open")try{r.endOfStream()}catch(y){O.logger.warn("[buffer-controller]: onMediaDetaching: "+y.message+" while calling endOfStream")}this.onBufferReset(),r.removeEventListener("sourceopen",this._onMediaSourceOpen),r.removeEventListener("sourceended",this._onMediaSourceEnded),r.removeEventListener("sourceclose",this._onMediaSourceClose),a&&(t&&self.URL.revokeObjectURL(t),a.src===t?(a.removeAttribute("src"),a.load()):O.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(F.Events.MEDIA_DETACHED,void 0)},A.onBufferReset=function(){var a=this;this.getSourceBufferTypes().forEach(function(r){var t=a.sourceBuffer[r];try{t&&(a.removeBufferListeners(r),a.mediaSource&&a.mediaSource.removeSourceBuffer(t),a.sourceBuffer[r]=void 0)}catch(y){O.logger.warn("[buffer-controller]: Failed to reset the "+r+" buffer",y)}}),this._initSourceBuffer()},A.onBufferCodecs=function(a,r){var t=this,y=this.getSourceBufferTypes().length;if(Object.keys(r).forEach(function(_){if(y){var E=t.tracks[_];if(E&&typeof E.buffer.changeType=="function"){var B=r[_],C=B.codec,h=B.levelCodec,n=B.container,l=(E.levelCodec||E.codec).replace(u,"$1"),d=(h||C).replace(u,"$1");if(l!==d){var b=n+";codecs="+(h||C);t.appendChangeType(_,b)}}}else t.pendingTracks[_]=r[_]}),y)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},A.appendChangeType=function(a,r){var t=this,y=this.operationQueue,_={execute:function(){var B=t.sourceBuffer[a];B&&(O.logger.log("[buffer-controller]: changing "+a+" sourceBuffer type to "+r),B.changeType(r)),y.shiftAndExecuteNext(a)},onStart:function(){},onComplete:function(){},onError:function(B){O.logger.warn("[buffer-controller]: Failed to change "+a+" SourceBuffer type",B)}};y.append(_,a)},A.onBufferAppending=function(a,r){var t=this,y=this.hls,_=this.operationQueue,E=this.tracks,B=r.data,C=r.type,h=r.frag,n=r.part,l=r.chunkMeta,d=l.buffering[C],b=self.performance.now();d.start=b;var m=h.stats.buffering,c=n?n.stats.buffering:null;m.start===0&&(m.start=b),c&&c.start===0&&(c.start=b);var L=E.audio,N=C==="audio"&&l.id===1&&(L==null?void 0:L.container)==="audio/mpeg",T={execute:function(){if(d.executeStart=self.performance.now(),N){var W=t.sourceBuffer[C];if(W){var U=h.start-W.timestampOffset;Math.abs(U)>=.1&&(O.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+h.start+" (delta: "+U+") sn: "+h.sn+")"),W.timestampOffset=h.start)}}t.appendExecutor(B,C)},onStart:function(){},onComplete:function(){var W=self.performance.now();d.executeEnd=d.end=W,m.first===0&&(m.first=W),c&&c.first===0&&(c.first=W);var U=t.sourceBuffer,Y={};for(var re in U)Y[re]=M.BufferHelper.getBuffered(U[re]);t.appendError=0,t.hls.trigger(F.Events.BUFFER_APPENDED,{type:C,frag:h,part:n,chunkMeta:l,parent:h.type,timeRanges:Y})},onError:function(W){O.logger.error("[buffer-controller]: Error encountered while trying to append to the "+C+" SourceBuffer",W);var U={type:X.ErrorTypes.MEDIA_ERROR,parent:h.type,details:X.ErrorDetails.BUFFER_APPEND_ERROR,err:W,fatal:!1};W.code===DOMException.QUOTA_EXCEEDED_ERR?U.details=X.ErrorDetails.BUFFER_FULL_ERROR:(t.appendError++,U.details=X.ErrorDetails.BUFFER_APPEND_ERROR,t.appendError>y.config.appendErrorMaxRetry&&(O.logger.error("[buffer-controller]: Failed "+y.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),U.fatal=!0)),y.trigger(F.Events.ERROR,U)}};_.append(T,C)},A.onBufferFlushing=function(a,r){var t=this,y=this.operationQueue,_=function(B){return{execute:t.removeExecutor.bind(t,B,r.startOffset,r.endOffset),onStart:function(){},onComplete:function(){t.hls.trigger(F.Events.BUFFER_FLUSHED,{type:B})},onError:function(h){O.logger.warn("[buffer-controller]: Failed to remove from "+B+" SourceBuffer",h)}}};r.type?y.append(_(r.type),r.type):this.getSourceBufferTypes().forEach(function(E){y.append(_(E),E)})},A.onFragParsed=function(a,r){var t=this,y=r.frag,_=r.part,E=[],B=_?_.elementaryStreams:y.elementaryStreams;B[R.ElementaryStreamTypes.AUDIOVIDEO]?E.push("audiovideo"):(B[R.ElementaryStreamTypes.AUDIO]&&E.push("audio"),B[R.ElementaryStreamTypes.VIDEO]&&E.push("video"));var C=function(){var n=self.performance.now();y.stats.buffering.end=n,_&&(_.stats.buffering.end=n);var l=_?_.stats:y.stats;t.hls.trigger(F.Events.FRAG_BUFFERED,{frag:y,part:_,stats:l,id:y.type})};E.length===0&&O.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+y.type+" level: "+y.level+" sn: "+y.sn),this.blockBuffers(C,E)},A.onFragChanged=function(a,r){this.flushBackBuffer()},A.onBufferEos=function(a,r){var t=this,y=this.getSourceBufferTypes().reduce(function(_,E){var B=t.sourceBuffer[E];return(!r.type||r.type===E)&&(B&&!B.ended&&(B.ended=!0,O.logger.log("[buffer-controller]: "+E+" sourceBuffer now EOS"))),_&&!!(!B||B.ended)},!0);y&&this.blockBuffers(function(){var _=t.mediaSource;if(!_||_.readyState!=="open")return;_.endOfStream()})},A.onLevelUpdated=function(a,r){var t=r.details;if(!t.fragments.length)return;this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},A.flushBackBuffer=function(){var a=this.hls,r=this.details,t=this.media,y=this.sourceBuffer;if(!t||r===null)return;var _=this.getSourceBufferTypes();if(!_.length)return;var E=r.live&&a.config.liveBackBufferLength!==null?a.config.liveBackBufferLength:a.config.backBufferLength;if(!Object(V.isFiniteNumber)(E)||E<0)return;var B=t.currentTime,C=r.levelTargetDuration,h=Math.max(E,C),n=Math.floor(B/C)*C-h;_.forEach(function(l){var d=y[l];if(d){var b=M.BufferHelper.getBuffered(d);b.length>0&&n>b.start(0)&&(a.trigger(F.Events.BACK_BUFFER_REACHED,{bufferEnd:n}),r.live&&a.trigger(F.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:n}),a.trigger(F.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:n,type:l}))}})},A.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var a=this.details,r=this.hls,t=this.media,y=this.mediaSource,_=a.fragments[0].start+a.totalduration,E=t.duration,B=Object(V.isFiniteNumber)(y.duration)?y.duration:0;a.live&&r.config.liveDurationInfinity?(O.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),y.duration=Infinity,this.updateSeekableRange(a)):(_>B&&_>E||!Object(V.isFiniteNumber)(E))&&(O.logger.log("[buffer-controller]: Updating Media Source duration to "+_.toFixed(3)),y.duration=_)},A.updateSeekableRange=function(a){var r=this.mediaSource,t=a.fragments,y=t.length;if(y&&a.live&&r!==null&&r!==void 0&&r.setLiveSeekableRange){var _=Math.max(0,t[0].start),E=Math.max(_,_+a.totalduration);r.setLiveSeekableRange(_,E)}},A.checkPendingTracks=function(){var a=this.bufferCodecEventsExpected,r=this.operationQueue,t=this.pendingTracks,y=Object.keys(t).length;if(y&&!a||y===2){this.createSourceBuffers(t),this.pendingTracks={};var _=this.getSourceBufferTypes();if(_.length===0){this.hls.trigger(F.Events.ERROR,{type:X.ErrorTypes.MEDIA_ERROR,details:X.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}_.forEach(function(E){r.executeNext(E)})}},A.createSourceBuffers=function(a){var r=this.sourceBuffer,t=this.mediaSource;if(!t)throw Error("createSourceBuffers called when mediaSource was null");var y=0;for(var _ in a)if(!r[_]){var E=a[_];if(!E)throw Error("source buffer exists for track "+_+", however track does not");var B=E.levelCodec||E.codec,C=E.container+";codecs="+B;O.logger.log("[buffer-controller]: creating sourceBuffer("+C+")");try{var h=r[_]=t.addSourceBuffer(C),n=_;this.addBufferListener(n,"updatestart",this._onSBUpdateStart),this.addBufferListener(n,"updateend",this._onSBUpdateEnd),this.addBufferListener(n,"error",this._onSBUpdateError),this.tracks[_]={buffer:h,codec:B,container:E.container,levelCodec:E.levelCodec,id:E.id},y++}catch(l){O.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+l.message),this.hls.trigger(F.Events.ERROR,{type:X.ErrorTypes.MEDIA_ERROR,details:X.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:l,mimeType:C})}}y&&this.hls.trigger(F.Events.BUFFER_CREATED,{tracks:this.tracks})},A._onSBUpdateStart=function(a){var r=this.operationQueue,t=r.current(a);t.onStart()},A._onSBUpdateEnd=function(a){var r=this.operationQueue,t=r.current(a);t.onComplete(),r.shiftAndExecuteNext(a)},A._onSBUpdateError=function(a,r){O.logger.error("[buffer-controller]: "+a+" SourceBuffer error",r),this.hls.trigger(F.Events.ERROR,{type:X.ErrorTypes.MEDIA_ERROR,details:X.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var t=this.operationQueue.current(a);t&&t.onError(r)},A.removeExecutor=function(a,r,t){var y=this.media,_=this.mediaSource,E=this.operationQueue,B=this.sourceBuffer,C=B[a];if(!y||!_||!C){O.logger.warn("[buffer-controller]: Attempting to remove from the "+a+" SourceBuffer, but it does not exist"),E.shiftAndExecuteNext(a);return}var h=Object(V.isFiniteNumber)(y.duration)?y.duration:Infinity,n=Object(V.isFiniteNumber)(_.duration)?_.duration:Infinity,l=Math.max(0,r),d=Math.min(t,h,n);d>l?(O.logger.log("[buffer-controller]: Removing ["+l+","+d+"] from the "+a+" SourceBuffer"),console.assert(!C.updating,a+" sourceBuffer must not be updating"),C.remove(l,d)):E.shiftAndExecuteNext(a)},A.appendExecutor=function(a,r){var t=this.operationQueue,y=this.sourceBuffer,_=y[r];if(!_){O.logger.warn("[buffer-controller]: Attempting to append to the "+r+" SourceBuffer, but it does not exist"),t.shiftAndExecuteNext(r);return}_.ended=!1,console.assert(!_.updating,r+" sourceBuffer must not be updating"),_.appendBuffer(a)},A.blockBuffers=function(a,r){var t=this;if(r===void 0&&(r=this.getSourceBufferTypes()),!r.length){O.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(a);return}var y=this.operationQueue,_=r.map(function(E){return y.appendBlocker(E)});Promise.all(_).then(function(){a(),r.forEach(function(E){var B=t.sourceBuffer[E];(!B||!B.updating)&&y.shiftAndExecuteNext(E)})})},A.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},A.addBufferListener=function(a,r,t){var y=this.sourceBuffer[a];if(!y)return;var _=t.bind(this,a);this.listeners[a].push({event:r,listener:_}),y.addEventListener(r,_)},A.removeBufferListeners=function(a){var r=this.sourceBuffer[a];if(!r)return;this.listeners[a].forEach(function(t){r.removeEventListener(t.event,t.listener)})},i}()},"./src/controller/buffer-operation-queue.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return F});var V=D("./src/utils/logger.ts"),F=function(){function O(M){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=M}var X=O.prototype;return X.append=function(e,R){var g=this.queues[R];g.push(e),g.length===1&&this.buffers[R]&&this.executeNext(R)},X.insertAbort=function(e,R){var g=this.queues[R];g.unshift(e),this.executeNext(R)},X.appendBlocker=function(e){var R,g=new Promise(function(u){R=u}),v={execute:R,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(v,e),g},X.executeNext=function(e){var R=this.buffers,g=this.queues,v=R[e],u=g[e];if(u.length){var s=u[0];try{s.execute()}catch(i){V.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),s.onError(i),(!v||!v.updating)&&(u.shift(),this.executeNext(e))}}},X.shiftAndExecuteNext=function(e){this.queues[e].shift(),this.executeNext(e)},X.current=function(e){return this.queues[e][0]},O}()},"./src/controller/cap-level-controller.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/events.ts");function F(M,e){for(var R=0;R<e.length;R++){var g=e[R];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(M,g.key,g)}}function O(M,e,R){return e&&F(M.prototype,e),R&&F(M,R),M}var X=function(){function M(R){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=R,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var e=M.prototype;return e.setStreamController=function(g){this.streamController=g},e.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},e.registerListeners=function(){var g=this.hls;g.on(V.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),g.on(V.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),g.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),g.on(V.Events.BUFFER_CODECS,this.onBufferCodecs,this),g.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},e.unregisterListener=function(){var g=this.hls;g.off(V.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),g.off(V.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),g.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),g.off(V.Events.BUFFER_CODECS,this.onBufferCodecs,this),g.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},e.onFpsDropLevelCapping=function(g,v){M.isLevelAllowed(v.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(v.droppedLevel)},e.onMediaAttaching=function(g,v){this.media=v.media instanceof HTMLVideoElement?v.media:null},e.onManifestParsed=function(g,v){var u=this.hls;this.restrictedLevels=[],this.firstLevel=v.firstLevel,u.config.capLevelToPlayerSize&&v.video&&this.startCapping()},e.onBufferCodecs=function(g,v){var u=this.hls;u.config.capLevelToPlayerSize&&v.video&&this.startCapping()},e.onMediaDetaching=function(){this.stopCapping()},e.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var g=this.hls.levels;if(g.length){var v=this.hls;v.autoLevelCapping=this.getMaxLevel(g.length-1),v.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=v.autoLevelCapping}}},e.getMaxLevel=function(g){var v=this,u=this.hls.levels;if(!u.length)return-1;var s=u.filter(function(i,A){return M.isLevelAllowed(A,v.restrictedLevels)&&A<=g});return this.clientRect=null,M.getMaxLevelByMediaSize(s,this.mediaWidth,this.mediaHeight)},e.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()},e.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},e.getDimensions=function(){if(this.clientRect)return this.clientRect;var g=this.media,v={width:0,height:0};if(g){var u=g.getBoundingClientRect();v.width=u.width,v.height=u.height,!v.width&&!v.height&&(v.width=u.right-u.left||g.width||0,v.height=u.bottom-u.top||g.height||0)}return this.clientRect=v,v},M.isLevelAllowed=function(g,v){return v===void 0&&(v=[]),v.indexOf(g)===-1},M.getMaxLevelByMediaSize=function(g,v,u){if(!g||!g.length)return-1;for(var s=function(r,t){return t?r.width!==t.width||r.height!==t.height:!0},i=g.length-1,A=0;A<g.length;A+=1){var o=g[A];if((o.width>=v||o.height>=u)&&s(o,g[A+1])){i=A;break}}return i},O(M,[{key:"mediaWidth",get:function(){return this.getDimensions().width*M.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*M.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var g=1;try{g=self.devicePixelRatio}catch(v){}return g}}]),M}();G.default=X},"./src/controller/cmcd-controller.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return s});var V=D("./src/events.ts"),F=D("./src/types/cmcd.ts"),O=D("./src/utils/buffer-helper.ts"),X=D("./src/utils/logger.ts");function M(i,A){for(var o=0;o<A.length;o++){var a=A[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(i,a.key,a)}}function e(i,A,o){return A&&M(i.prototype,A),o&&M(i,o),i}function R(i,A){var o=typeof Symbol!="undefined"&&i[Symbol.iterator]||i["@@iterator"];if(o)return(o=o.call(i)).next.bind(o);if(Array.isArray(i)||(o=g(i))||A&&i&&typeof i.length=="number"){o&&(i=o);var a=0;return function(){return a>=i.length?{done:!0}:{done:!1,value:i[a++]}}}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 g(i,A){if(!i)return;if(typeof i=="string")return v(i,A);var o=Object.prototype.toString.call(i).slice(8,-1);if(o==="Object"&&i.constructor&&(o=i.constructor.name),o==="Map"||o==="Set")return Array.from(i);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return v(i,A)}function v(i,A){(A==null||A>i.length)&&(A=i.length);for(var o=0,a=new Array(A);o<A;o++)a[o]=i[o];return a}function u(){return u=Object.assign||function(i){for(var A=1;A<arguments.length;A++){var o=arguments[A];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(i[a]=o[a])}return i},u.apply(this,arguments)}var s=function(){function i(o){var a=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(){a.initialized&&(a.starved=!0),a.buffering=!0},this.onPlaying=function(){a.initialized||(a.initialized=!0),a.buffering=!1},this.applyPlaylistData=function(y){try{a.apply(y,{ot:F.CMCDObjectType.MANIFEST,su:!a.initialized})}catch(_){X.logger.warn("Could not generate manifest CMCD data.",_)}},this.applyFragmentData=function(y){try{var _=y.frag,E=a.hls.levels[_.level],B=a.getObjectType(_),C={d:_.duration*1e3,ot:B};(B===F.CMCDObjectType.VIDEO||B===F.CMCDObjectType.AUDIO||B==F.CMCDObjectType.MUXED)&&(C.br=E.bitrate/1e3,C.tb=a.getTopBandwidth(B),C.bl=a.getBufferLength(B)),a.apply(y,C)}catch(h){X.logger.warn("Could not generate segment CMCD data.",h)}},this.hls=o;var r=this.config=o.config,t=r.cmcd;t!=null&&(r.pLoader=this.createPlaylistLoader(),r.fLoader=this.createFragmentLoader(),this.sid=t.sessionId||i.uuid(),this.cid=t.contentId,this.useHeaders=t.useHeaders===!0,this.registerListeners())}var A=i.prototype;return A.registerListeners=function(){var a=this.hls;a.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.on(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),a.on(V.Events.BUFFER_CREATED,this.onBufferCreated,this)},A.unregisterListeners=function(){var a=this.hls;a.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.off(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),a.off(V.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(a,r){this.media=r.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(a,r){var t,y;this.audioBuffer=(t=r.tracks.audio)===null||t===void 0?void 0:t.buffer,this.videoBuffer=(y=r.tracks.video)===null||y===void 0?void 0:y.buffer},A.createData=function(){var a;return{v:F.CMCDVersion,sf:F.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(a=this.media)===null||a===void 0?void 0:a.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},A.apply=function(a,r){r===void 0&&(r={}),u(r,this.createData());var t=r.ot===F.CMCDObjectType.INIT||r.ot===F.CMCDObjectType.VIDEO||r.ot===F.CMCDObjectType.MUXED;if(this.starved&&t&&(r.bs=!0,r.su=!0,this.starved=!1),r.su==null&&(r.su=this.buffering),this.useHeaders){var y=i.toHeaders(r);if(!Object.keys(y).length)return;a.headers||(a.headers={}),u(a.headers,y)}else{var _=i.toQuery(r);if(!_)return;a.url=i.appendQueryToUri(a.url,_)}},A.getObjectType=function(a){var r=a.type;return r==="subtitle"?F.CMCDObjectType.TIMED_TEXT:a.sn==="initSegment"?F.CMCDObjectType.INIT:r==="audio"?F.CMCDObjectType.AUDIO:r==="main"?this.hls.audioTracks.length?F.CMCDObjectType.VIDEO:F.CMCDObjectType.MUXED:void 0},A.getTopBandwidth=function(a){for(var r=0,t=a===F.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,y=R(t),_;!(_=y()).done;){var E=_.value;E.bitrate>r&&(r=E.bitrate)}return r>0?r:NaN},A.getBufferLength=function(a){var r=this.hls.media,t=a===F.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!t||!r)return NaN;var y=O.BufferHelper.bufferInfo(t,r.currentTime,this.config.maxBufferHole);return y.len*1e3},A.createPlaylistLoader=function(){var a=this.config.pLoader,r=this.applyPlaylistData,t=a||this.config.loader;return function(){function y(E){this.loader=void 0,this.loader=new t(E)}var _=y.prototype;return _.destroy=function(){this.loader.destroy()},_.abort=function(){this.loader.abort()},_.load=function(B,C,h){r(B),this.loader.load(B,C,h)},e(y,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),y}()},A.createFragmentLoader=function(){var a=this.config.fLoader,r=this.applyFragmentData,t=a||this.config.loader;return function(){function y(E){this.loader=void 0,this.loader=new t(E)}var _=y.prototype;return _.destroy=function(){this.loader.destroy()},_.abort=function(){this.loader.abort()},_.load=function(B,C,h){r(B),this.loader.load(B,C,h)},e(y,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),y}()},i.uuid=function(){var a=URL.createObjectURL(new Blob),r=a.toString();return URL.revokeObjectURL(a),r.substr(r.lastIndexOf("/")+1)},i.serialize=function(a){for(var r=[],t=function(N){return!Number.isNaN(N)&&N!=null&&N!==""&&N!==!1},y=function(N){return Math.round(N)},_=function(N){return y(N/100)*100},E=function(N){return encodeURIComponent(N)},B={br:y,d:y,bl:_,dl:_,mtp:_,nor:E,rtp:_,tb:y},C=Object.keys(a||{}).sort(),h=R(C),n;!(n=h()).done;){var l=n.value,d=a[l];if(!t(d))continue;if(l==="v"&&d===1)continue;if(l=="pr"&&d===1)continue;var b=B[l];b&&(d=b(d));var m=typeof d,c=void 0;l==="ot"||l==="sf"||l==="st"?c=l+"="+d:m==="boolean"?c=l:m==="number"?c=l+"="+d:c=l+"="+JSON.stringify(d),r.push(c)}return r.join(",")},i.toHeaders=function(a){for(var r=Object.keys(a),t={},y=["Object","Request","Session","Status"],_=[{},{},{},{}],E={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},B=0,C=r;B<C.length;B++){var h=C[B],n=E[h]!=null?E[h]:1;_[n][h]=a[h]}for(var l=0;l<_.length;l++){var d=i.serialize(_[l]);d&&(t["CMCD-"+y[l]]=d)}return t},i.toQuery=function(a){return"CMCD="+encodeURIComponent(i.serialize(a))},i.appendQueryToUri=function(a,r){if(!r)return a;var t=a.includes("?")?"&":"?";return""+a+t+r},i}()},"./src/controller/eme-controller.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/events.ts"),F=D("./src/errors.ts"),O=D("./src/utils/logger.ts"),X=D("./src/utils/mediakeys-helper.ts");function M(s,i){for(var A=0;A<i.length;A++){var o=i[A];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(s,o.key,o)}}function e(s,i,A){return i&&M(s.prototype,i),A&&M(s,A),s}var R=3,g=function(i,A,o){var a={audioCapabilities:[],videoCapabilities:[]};return i.forEach(function(r){a.audioCapabilities.push({contentType:'audio/mp4; codecs="'+r+'"',robustness:o.audioRobustness||""})}),A.forEach(function(r){a.videoCapabilities.push({contentType:'video/mp4; codecs="'+r+'"',robustness:o.videoRobustness||""})}),[a]},v=function(i,A,o,a){switch(i){case X.KeySystems.WIDEVINE:return g(A,o,a);default:throw new Error("Unknown key-system: "+i)}},u=function(){function s(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 i=s.prototype;return i.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},i._registerListeners=function(){this.hls.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this)},i._unregisterListeners=function(){this.hls.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this)},i.getLicenseServerUrl=function(o){switch(o){case X.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+o+'"')},i._attemptKeySystemAccess=function(o,a,r){var t=this,y=v(o,a,r,this._drmSystemOptions);O.logger.log("Requesting encrypted media key-system access");var _=this.requestMediaKeySystemAccess(o,y);this.mediaKeysPromise=_.then(function(E){return t._onMediaKeySystemAccessObtained(o,E)}),_.catch(function(E){O.logger.error('Failed to obtain key-system "'+o+'" access:',E)})},i._onMediaKeySystemAccessObtained=function(o,a){var r=this;O.logger.log('Access for key-system "'+o+'" obtained');var t={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:a,mediaKeySystemDomain:o};this._mediaKeysList.push(t);var y=Promise.resolve().then(function(){return a.createMediaKeys()}).then(function(_){return t.mediaKeys=_,O.logger.log('Media-keys created for key-system "'+o+'"'),r._onMediaKeysCreated(),_});return y.catch(function(_){O.logger.error("Failed to create media-keys:",_)}),y},i._onMediaKeysCreated=function(){var o=this;this._mediaKeysList.forEach(function(a){a.mediaKeysSession||(a.mediaKeysSession=a.mediaKeys.createSession(),o._onNewMediaKeySession(a.mediaKeysSession))})},i._onNewMediaKeySession=function(o){var a=this;O.logger.log("New key-system session "+o.sessionId),o.addEventListener("message",function(r){a._onKeySessionMessage(o,r.message)},!1)},i._onKeySessionMessage=function(o,a){O.logger.log("Got EME message event, creating license request"),this._requestLicense(a,function(r){O.logger.log("Received license data (length: "+(r&&r.byteLength)+"), updating key-session"),o.update(r)})},i.onMediaEncrypted=function(o){var a=this;if(O.logger.log('Media is encrypted using "'+o.initDataType+'" init data type'),!this.mediaKeysPromise){O.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(V.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var r=function(y){if(!a._media)return;a._attemptSetMediaKeys(y),a._generateRequestWithPreferredKeySession(o.initDataType,o.initData)};this.mediaKeysPromise.then(r).catch(r)},i._attemptSetMediaKeys=function(o){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var a=this._mediaKeysList[0];if(!a||!a.mediaKeys){O.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(V.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}O.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(a.mediaKeys),this._hasSetMediaKeys=!0}},i._generateRequestWithPreferredKeySession=function(o,a){var r=this,t=this._mediaKeysList[0];if(!t){O.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(V.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(t.mediaKeysSessionInitialized){O.logger.warn("Key-Session already initialized but requested again");return}var y=t.mediaKeysSession;if(!y){O.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(V.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!a){O.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(V.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}O.logger.log('Generating key-session request for "'+o+'" init data type'),t.mediaKeysSessionInitialized=!0,y.generateRequest(o,a).then(function(){O.logger.debug("Key-session generation succeeded")}).catch(function(_){O.logger.error("Error generating key-session request:",_),r.hls.trigger(V.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},i._createLicenseXhr=function(o,a,r){var t=new XMLHttpRequest;t.responseType="arraybuffer",t.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,t,o,a,r);var y=this._licenseXhrSetup;if(y)try{y.call(this.hls,t,o),y=void 0}catch(_){O.logger.error(_)}try{t.readyState||t.open("POST",o,!0),y&&y.call(this.hls,t,o)}catch(_){throw new Error("issue setting up KeySystem license XHR "+_)}return t},i._onLicenseRequestReadyStageChange=function(o,a,r,t){switch(o.readyState){case 4:if(o.status===200){this._requestLicenseFailureCount=0,O.logger.log("License request succeeded");var y=o.response,_=this._licenseResponseCallback;if(_)try{y=_.call(this.hls,o,a)}catch(B){O.logger.error(B)}t(y)}else{if(O.logger.error("License Request XHR failed ("+a+"). Status: "+o.status+" ("+o.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>R){this.hls.trigger(V.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var E=R-this._requestLicenseFailureCount+1;O.logger.warn("Retrying license request, "+E+" attempts left"),this._requestLicense(r,t)}break}},i._generateLicenseRequestChallenge=function(o,a){switch(o.mediaKeySystemDomain){case X.KeySystems.WIDEVINE:return a}throw new Error("unsupported key-system: "+o.mediaKeySystemDomain)},i._requestLicense=function(o,a){O.logger.log("Requesting content license for key-system");var r=this._mediaKeysList[0];if(!r){O.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(V.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var t=this.getLicenseServerUrl(r.mediaKeySystemDomain),y=this._createLicenseXhr(t,o,a);O.logger.log("Sending license request to URL: "+t);var _=this._generateLicenseRequestChallenge(r,o);y.send(_)}catch(E){O.logger.error("Failure requesting DRM license: "+E),this.hls.trigger(V.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},i.onMediaAttached=function(o,a){if(!this._emeEnabled)return;var r=a.media;this._media=r,r.addEventListener("encrypted",this._onMediaEncrypted)},i.onMediaDetached=function(){var o=this._media,a=this._mediaKeysList;if(!o)return;o.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(a.map(function(r){if(r.mediaKeysSession)return r.mediaKeysSession.close().catch(function(){})})).then(function(){return o.setMediaKeys(null)}).catch(function(){})},i.onManifestParsed=function(o,a){if(!this._emeEnabled)return;var r=a.levels.map(function(y){return y.audioCodec}).filter(function(y){return!!y}),t=a.levels.map(function(y){return y.videoCodec}).filter(function(y){return!!y});this._attemptKeySystemAccess(X.KeySystems.WIDEVINE,r,t)},e(s,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),s}();G.default=u},"./src/controller/fps-controller.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/events.ts"),F=D("./src/utils/logger.ts"),O=function(){function X(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}var M=X.prototype;return M.setStreamController=function(R){this.streamController=R},M.registerListeners=function(){this.hls.on(V.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},M.unregisterListeners=function(){this.hls.off(V.Events.MEDIA_ATTACHING,this.onMediaAttaching)},M.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},M.onMediaAttaching=function(R,g){var v=this.hls.config;if(v.capLevelOnFPSDrop){var u=g.media instanceof self.HTMLVideoElement?g.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),v.fpsDroppedMonitoringPeriod)}},M.checkFPS=function(R,g,v){var u=performance.now();if(g){if(this.lastTime){var s=u-this.lastTime,i=v-this.lastDroppedFrames,A=g-this.lastDecodedFrames,o=1e3*i/s,a=this.hls;if(a.trigger(V.Events.FPS_DROP,{currentDropped:i,currentDecoded:A,totalDroppedFrames:v}),o>0&&i>a.config.fpsDroppedMonitoringThreshold*A){var r=a.currentLevel;F.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+r),r>0&&(a.autoLevelCapping===-1||a.autoLevelCapping>=r)&&(r=r-1,a.trigger(V.Events.FPS_DROP_LEVEL_CAPPING,{level:r,droppedLevel:a.currentLevel}),a.autoLevelCapping=r,this.streamController.nextLevelSwitch())}}this.lastTime=u,this.lastDroppedFrames=v,this.lastDecodedFrames=g}},M.checkFPSInterval=function(){var R=this.media;if(R)if(this.isVideoPlaybackQualityAvailable){var g=R.getVideoPlaybackQuality();this.checkFPS(R,g.totalVideoFrames,g.droppedVideoFrames)}else this.checkFPS(R,R.webkitDecodedFrameCount,R.webkitDroppedFrameCount)},X}();G.default=O},"./src/controller/fragment-finders.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"findFragmentByPDT",function(){return O}),D.d(G,"findFragmentByPTS",function(){return X}),D.d(G,"fragmentWithinToleranceTest",function(){return M}),D.d(G,"pdtWithinToleranceTest",function(){return e}),D.d(G,"findFragWithCC",function(){return R});var V=D("./src/polyfills/number.ts"),F=D("./src/utils/binary-search.ts");function O(g,v,u){if(v===null||!Array.isArray(g)||!g.length||!Object(V.isFiniteNumber)(v))return null;var s=g[0].programDateTime;if(v<(s||0))return null;var i=g[g.length-1].endProgramDateTime;if(v>=(i||0))return null;u=u||0;for(var A=0;A<g.length;++A){var o=g[A];if(e(v,u,o))return o}return null}function X(g,v,u,s){u===void 0&&(u=0),s===void 0&&(s=0);var i=null;if(g?i=v[g.sn-v[0].sn+1]||null:u===0&&v[0].start===0&&(i=v[0]),i&&M(u,s,i)===0)return i;var A=F.default.search(v,M.bind(null,u,s));return A||i}function M(g,v,u){g===void 0&&(g=0),v===void 0&&(v=0);var s=Math.min(v,u.duration+(u.deltaPTS?u.deltaPTS:0));return u.start+u.duration-s<=g?1:u.start-s>g&&u.start?-1:0}function e(g,v,u){var s=Math.min(v,u.duration+(u.deltaPTS?u.deltaPTS:0))*1e3,i=u.endProgramDateTime||0;return i-s>g}function R(g,v){return F.default.search(g,function(u){return u.cc<v?1:u.cc>v?-1:0})}},"./src/controller/fragment-tracker.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"FragmentState",function(){return O}),D.d(G,"FragmentTracker",function(){return X});var V=D("./src/events.ts"),F=D("./src/types/loader.ts"),O;(function(R){R.NOT_LOADED="NOT_LOADED",R.BACKTRACKED="BACKTRACKED",R.APPENDING="APPENDING",R.PARTIAL="PARTIAL",R.OK="OK"})(O||(O={}));var X=function(){function R(v){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=v,this._registerListeners()}var g=R.prototype;return g._registerListeners=function(){var u=this.hls;u.on(V.Events.BUFFER_APPENDED,this.onBufferAppended,this),u.on(V.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.on(V.Events.FRAG_LOADED,this.onFragLoaded,this)},g._unregisterListeners=function(){var u=this.hls;u.off(V.Events.BUFFER_APPENDED,this.onBufferAppended,this),u.off(V.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.off(V.Events.FRAG_LOADED,this.onFragLoaded,this)},g.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},g.getAppendedFrag=function(u,s){if(s===F.PlaylistLevelType.MAIN){var i=this.activeFragment,A=this.activeParts;if(!i)return null;if(A)for(var o=A.length;o--;){var a=A[o],r=a?a.end:i.appendedPTS;if(a.start<=u&&r!==void 0&&u<=r)return o>9&&(this.activeParts=A.slice(o-9)),a}else if(i.start<=u&&i.appendedPTS!==void 0&&u<=i.appendedPTS)return i}return this.getBufferedFrag(u,s)},g.getBufferedFrag=function(u,s){for(var i=this.fragments,A=Object.keys(i),o=A.length;o--;){var a=i[A[o]];if((a==null?void 0:a.body.type)===s&&a.buffered){var r=a.body;if(r.start<=u&&u<=r.end)return r}}return null},g.detectEvictedFragments=function(u,s,i){var A=this;Object.keys(this.fragments).forEach(function(o){var a=A.fragments[o];if(!a)return;if(!a.buffered){a.body.type===i&&A.removeFragment(a.body);return}var r=a.range[u];if(!r)return;r.time.some(function(t){var y=!A.isTimeBuffered(t.startPTS,t.endPTS,s);return y&&A.removeFragment(a.body),y})})},g.detectPartialFragments=function(u){var s=this,i=this.timeRanges,A=u.frag,o=u.part;if(!i||A.sn==="initSegment")return;var a=e(A),r=this.fragments[a];if(!r)return;Object.keys(i).forEach(function(t){var y=A.elementaryStreams[t];if(!y)return;var _=i[t],E=o!==null||y.partial===!0;r.range[t]=s.getBufferedTimes(A,o,E,_)}),r.backtrack=r.loaded=null,Object.keys(r.range).length?r.buffered=!0:this.removeFragment(r.body)},g.fragBuffered=function(u){var s=e(u),i=this.fragments[s];i&&(i.backtrack=i.loaded=null,i.buffered=!0)},g.getBufferedTimes=function(u,s,i,A){for(var o={time:[],partial:i},a=s?s.start:u.start,r=s?s.end:u.end,t=u.minEndPTS||r,y=u.maxStartPTS||a,_=0;_<A.length;_++){var E=A.start(_)-this.bufferPadding,B=A.end(_)+this.bufferPadding;if(y>=E&&t<=B){o.time.push({startPTS:Math.max(a,A.start(_)),endPTS:Math.min(r,A.end(_))});break}else if(a<B&&r>E)o.partial=!0,o.time.push({startPTS:Math.max(a,A.start(_)),endPTS:Math.min(r,A.end(_))});else if(r<=E)break}return o},g.getPartialFragment=function(u){var s=null,i,A,o,a=0,r=this.bufferPadding,t=this.fragments;return Object.keys(t).forEach(function(y){var _=t[y];if(!_)return;M(_)&&(A=_.body.start-r,o=_.body.end+r,u>=A&&u<=o&&(i=Math.min(u-A,o-u),a<=i&&(s=_.body,a=i)))}),s},g.getState=function(u){var s=e(u),i=this.fragments[s];return i?i.buffered?M(i)?O.PARTIAL:O.OK:i.backtrack?O.BACKTRACKED:O.APPENDING:O.NOT_LOADED},g.backtrack=function(u,s){var i=e(u),A=this.fragments[i];if(!A||A.backtrack)return null;var o=A.backtrack=s||A.loaded;return A.loaded=null,o},g.getBacktrackData=function(u){var s=e(u),i=this.fragments[s];if(i){var A,o=i.backtrack;if(o!=null&&(A=o.payload)!==null&&A!==void 0&&A.byteLength)return o;this.removeFragment(u)}return null},g.isTimeBuffered=function(u,s,i){for(var A,o,a=0;a<i.length;a++){if(A=i.start(a)-this.bufferPadding,o=i.end(a)+this.bufferPadding,u>=A&&s<=o)return!0;if(s<=A)return!1}return!1},g.onFragLoaded=function(u,s){var i=s.frag,A=s.part;if(i.sn==="initSegment"||i.bitrateTest||A)return;var o=e(i);this.fragments[o]={body:i,loaded:s,backtrack:null,buffered:!1,range:Object.create(null)}},g.onBufferAppended=function(u,s){var i=this,A=s.frag,o=s.part,a=s.timeRanges;if(A.type===F.PlaylistLevelType.MAIN)if(this.activeFragment=A,o){var r=this.activeParts;r||(this.activeParts=r=[]),r.push(o)}else this.activeParts=null;this.timeRanges=a,Object.keys(a).forEach(function(t){var y=a[t];if(i.detectEvictedFragments(t,y),!o)for(var _=0;_<y.length;_++)A.appendedPTS=Math.max(y.end(_),A.appendedPTS||0)})},g.onFragBuffered=function(u,s){this.detectPartialFragments(s)},g.hasFragment=function(u){var s=e(u);return!!this.fragments[s]},g.removeFragmentsInRange=function(u,s,i){var A=this;Object.keys(this.fragments).forEach(function(o){var a=A.fragments[o];if(!a)return;if(a.buffered){var r=a.body;r.type===i&&r.start<s&&r.end>u&&A.removeFragment(r)}})},g.removeFragment=function(u){var s=e(u);u.stats.loaded=0,u.clearElementaryStreamInfo(),delete this.fragments[s]},g.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},R}();function M(R){var g,v;return R.buffered&&(((g=R.range.video)===null||g===void 0?void 0:g.partial)||((v=R.range.audio)===null||v===void 0?void 0:v.partial))}function e(R){return R.type+"_"+R.level+"_"+R.urlId+"_"+R.sn}},"./src/controller/gap-controller.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"STALL_MINIMUM_DURATION_MS",function(){return M}),D.d(G,"MAX_START_GAP_JUMP",function(){return e}),D.d(G,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return R}),D.d(G,"SKIP_BUFFER_RANGE_START",function(){return g}),D.d(G,"default",function(){return v});var V=D("./src/utils/buffer-helper.ts"),F=D("./src/errors.ts"),O=D("./src/events.ts"),X=D("./src/utils/logger.ts"),M=250,e=2,R=.1,g=.05,v=function(){function u(i,A,o,a){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=i,this.media=A,this.fragmentTracker=o,this.hls=a}var s=u.prototype;return s.destroy=function(){this.hls=this.fragmentTracker=this.media=null},s.poll=function(A){var o=this.config,a=this.media,r=this.stalled,t=a.currentTime,y=a.seeking,_=this.seeking&&!y,E=!this.seeking&&y;if(this.seeking=y,t!==A){if(this.moved=!0,r!==null){if(this.stallReported){var B=self.performance.now()-r;X.logger.warn("playback not stuck anymore @"+t+", after "+Math.round(B)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((E||_)&&(this.stalled=null),a.paused||a.ended||a.playbackRate===0||!V.BufferHelper.getBuffered(a).length)return;var C=V.BufferHelper.bufferInfo(a,t,0),h=C.len>0,n=C.nextStart||0;if(!h&&!n)return;if(y){var l=C.len>e,d=!n||n-t>e&&!this.fragmentTracker.getPartialFragment(t);if(l||d)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var b,m=Math.max(n,C.start||0)-t,c=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,L=c==null||((b=c.details)===null||b===void 0)?void 0:b.live,N=L?c.details.targetduration*2:e;if(m>0&&m<=N){this._trySkipBufferHole(null);return}}var T=self.performance.now();if(r===null){this.stalled=T;return}var P=T-r;!y&&P>=M&&this._reportStall(C.len);var W=V.BufferHelper.bufferInfo(a,t,o.maxBufferHole);this._tryFixBufferStall(W,P)},s._tryFixBufferStall=function(A,o){var a=this.config,r=this.fragmentTracker,t=this.media,y=t.currentTime,_=r.getPartialFragment(y);if(_){var E=this._trySkipBufferHole(_);if(E)return}A.len>a.maxBufferHole&&o>a.highBufferWatchdogPeriod*1e3&&(X.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},s._reportStall=function(A){var o=this.hls,a=this.media,r=this.stallReported;r||(this.stallReported=!0,X.logger.warn("Playback stalling at @"+a.currentTime+" due to low buffer (buffer="+A+")"),o.trigger(O.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:A}))},s._trySkipBufferHole=function(A){for(var o=this.config,a=this.hls,r=this.media,t=r.currentTime,y=0,_=V.BufferHelper.getBuffered(r),E=0;E<_.length;E++){var B=_.start(E);if(t+o.maxBufferHole>=y&&t<B){var C=Math.max(B+g,r.currentTime+R);return X.logger.warn("skipping hole, adjusting currentTime from "+t+" to "+C),this.moved=!0,this.stalled=null,r.currentTime=C,A&&a.trigger(O.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+t+" to "+C,frag:A}),C}y=_.end(E)}return 0},s._tryNudgeBuffer=function(){var A=this.config,o=this.hls,a=this.media,r=a.currentTime,t=(this.nudgeRetry||0)+1;if(this.nudgeRetry=t,t<A.nudgeMaxRetry){var y=r+t*A.nudgeOffset;X.logger.warn("Nudging 'currentTime' from "+r+" to "+y),a.currentTime=y,o.trigger(O.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else X.logger.error("Playhead still not moving while enough data buffered @"+r+" after "+A.nudgeMaxRetry+" nudges"),o.trigger(O.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},u}()},"./src/controller/id3-track-controller.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/events.ts"),F=D("./src/utils/texttrack-utils.ts"),O=D("./src/demux/id3.ts"),X=.25,M=function(){function e(g){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=g,this._registerListeners()}var R=e.prototype;return R.destroy=function(){this._unregisterListeners()},R._registerListeners=function(){var v=this.hls;v.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),v.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),v.on(V.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),v.on(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},R._unregisterListeners=function(){var v=this.hls;v.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),v.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),v.off(V.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),v.off(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},R.onMediaAttached=function(v,u){this.media=u.media},R.onMediaDetaching=function(){if(!this.id3Track)return;Object(F.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},R.getID3Track=function(v){if(!this.media)return;for(var u=0;u<v.length;u++){var s=v[u];if(s.kind==="metadata"&&s.label==="id3")return Object(F.sendAddTrackEvent)(s,this.media),s}return this.media.addTextTrack("metadata","id3")},R.onFragParsingMetadata=function(v,u){if(!this.media)return;var s=u.frag,i=u.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var A=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,o=0;o<i.length;o++){var a=O.getID3Frames(i[o].data);if(a){var r=i[o].pts,t=o<i.length-1?i[o+1].pts:s.end,y=t-r;y<=0&&(t=r+X);for(var _=0;_<a.length;_++){var E=a[_];if(!O.isTimeStampFrame(E)){var B=new A(r,t,"");B.value=E,this.id3Track.addCue(B)}}}}},R.onBufferFlushing=function(v,u){var s=u.startOffset,i=u.endOffset,A=u.type;if(!A||A==="audio"){var o=this.id3Track;o&&Object(F.removeCuesInRange)(o,s,i)}},e}();G.default=M},"./src/controller/latency-controller.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return e});var V=D("./src/errors.ts"),F=D("./src/events.ts"),O=D("./src/utils/logger.ts");function X(R,g){for(var v=0;v<g.length;v++){var u=g[v];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(R,u.key,u)}}function M(R,g,v){return g&&X(R.prototype,g),v&&X(R,v),R}var e=function(){function R(v){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=v,this.config=v.config,this.registerListeners()}var g=R.prototype;return g.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},g.registerListeners=function(){this.hls.on(F.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(F.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(F.Events.ERROR,this.onError,this)},g.unregisterListeners=function(){this.hls.off(F.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(F.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(F.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(F.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(F.Events.ERROR,this.onError)},g.onMediaAttached=function(u,s){this.media=s.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},g.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},g.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},g.onLevelUpdated=function(u,s){var i=s.details;this.levelDetails=i,i.advanced&&this.timeupdate(),!i.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},g.onError=function(u,s){if(s.details!==V.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,O.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},g.timeupdate=function(){var u=this.media,s=this.levelDetails;if(!u||!s)return;this.currentTime=u.currentTime;var i=this.computeLatency();if(i===null)return;this._latency=i;var A=this.config,o=A.lowLatencyMode,a=A.maxLiveSyncPlaybackRate;if(!o||a===1)return;var r=this.targetLatency;if(r===null)return;var t=i-r,y=Math.min(this.maxLatency,r+s.targetduration),_=t<y;if(s.live&&_&&t>.05&&this.forwardBufferLength>1){var E=Math.min(2,Math.max(1,a)),B=Math.round(2/(1+Math.exp(-.75*t-this.edgeStalled))*20)/20;u.playbackRate=Math.min(E,Math.max(1,B))}else u.playbackRate!==1&&u.playbackRate!==0&&(u.playbackRate=1)},g.estimateLiveEdge=function(){var u=this.levelDetails;return u===null?null:u.edge+u.age},g.computeLatency=function(){var u=this.estimateLiveEdge();return u===null?null:u-this.currentTime},M(R,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var u=this.config,s=this.levelDetails;return u.liveMaxLatencyDuration!==void 0?u.liveMaxLatencyDuration:s?u.liveMaxLatencyDurationCount*s.targetduration:0}},{key:"targetLatency",get:function(){var u=this.levelDetails;if(u===null)return null;var s=u.holdBack,i=u.partHoldBack,A=u.targetduration,o=this.config,a=o.liveSyncDuration,r=o.liveSyncDurationCount,t=o.lowLatencyMode,y=this.hls.userConfig,_=t&&i||s;(y.liveSyncDuration||y.liveSyncDurationCount||_===0)&&(_=a!==void 0?a:r*A);var E=A,B=1;return _+Math.min(this.stallCount*B,E)}},{key:"liveSyncPosition",get:function(){var u=this.estimateLiveEdge(),s=this.targetLatency,i=this.levelDetails;if(u===null||s===null||i===null)return null;var A=i.edge,o=u-s-this.edgeStalled,a=A-i.totalduration,r=A-(this.config.lowLatencyMode&&i.partTarget||i.targetduration);return Math.min(Math.max(a,o),r)}},{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 s=(this.config.lowLatencyMode&&u.partTarget||u.targetduration)*3;return Math.max(u.age-s,0)}},{key:"forwardBufferLength",get:function(){var u=this.media,s=this.levelDetails;if(!u||!s)return 0;var i=u.buffered.length;return i?u.buffered.end(i-1):s.edge-this.currentTime}}]),R}()},"./src/controller/level-controller.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return o});var V=D("./src/types/level.ts"),F=D("./src/events.ts"),O=D("./src/errors.ts"),X=D("./src/utils/codecs.ts"),M=D("./src/controller/level-helper.ts"),e=D("./src/controller/base-playlist-controller.ts"),R=D("./src/types/loader.ts");function g(){return g=Object.assign||function(a){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var y in t)Object.prototype.hasOwnProperty.call(t,y)&&(a[y]=t[y])}return a},g.apply(this,arguments)}function v(a,r){for(var t=0;t<r.length;t++){var y=r[t];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(a,y.key,y)}}function u(a,r,t){return r&&v(a.prototype,r),t&&v(a,t),a}function s(a,r){a.prototype=Object.create(r.prototype),a.prototype.constructor=a,i(a,r)}function i(a,r){return i=Object.setPrototypeOf||function(y,_){return y.__proto__=_,y},i(a,r)}var A=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),o=function(a){s(r,a);function r(y){var _;return _=a.call(this,y,"[level-controller]")||this,_._levels=[],_._firstLevel=-1,_._startLevel=void 0,_.currentLevelIndex=-1,_.manualLevelIndex=-1,_.onParsedComplete=void 0,_._registerListeners(),_}var t=r.prototype;return t._registerListeners=function(){var _=this.hls;_.on(F.Events.MANIFEST_LOADED,this.onManifestLoaded,this),_.on(F.Events.LEVEL_LOADED,this.onLevelLoaded,this),_.on(F.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),_.on(F.Events.FRAG_LOADED,this.onFragLoaded,this),_.on(F.Events.ERROR,this.onError,this)},t._unregisterListeners=function(){var _=this.hls;_.off(F.Events.MANIFEST_LOADED,this.onManifestLoaded,this),_.off(F.Events.LEVEL_LOADED,this.onLevelLoaded,this),_.off(F.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),_.off(F.Events.FRAG_LOADED,this.onFragLoaded,this),_.off(F.Events.ERROR,this.onError,this)},t.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,a.prototype.destroy.call(this)},t.startLoad=function(){var _=this._levels;_.forEach(function(E){E.loadError=0}),a.prototype.startLoad.call(this)},t.onManifestLoaded=function(_,E){var B=[],C=[],h=[],n,l={},d,b=!1,m=!1,c=!1;if(E.levels.forEach(function(P){var W=P.attrs;b=b||!!(P.width&&P.height),m=m||!!P.videoCodec,c=c||!!P.audioCodec,A&&P.audioCodec&&P.audioCodec.indexOf("mp4a.40.34")!==-1&&(P.audioCodec=void 0);var U=P.bitrate+"-"+P.attrs.RESOLUTION+"-"+P.attrs.CODECS;d=l[U],d?d.url.push(P.url):(d=new V.Level(P),l[U]=d,B.push(d)),W&&(W.AUDIO&&Object(M.addGroupId)(d,"audio",W.AUDIO),W.SUBTITLES&&Object(M.addGroupId)(d,"text",W.SUBTITLES))}),(b||m)&&c&&(B=B.filter(function(P){var W=P.videoCodec,U=P.width,Y=P.height;return!!W||!!(U&&Y)})),B=B.filter(function(P){var W=P.audioCodec,U=P.videoCodec;return(!W||Object(X.isCodecSupportedInMp4)(W,"audio"))&&(!U||Object(X.isCodecSupportedInMp4)(U,"video"))}),E.audioTracks&&(C=E.audioTracks.filter(function(P){return!P.audioCodec||Object(X.isCodecSupportedInMp4)(P.audioCodec,"audio")}),Object(M.assignTrackIdsByGroup)(C)),E.subtitles&&(h=E.subtitles,Object(M.assignTrackIdsByGroup)(h)),B.length>0){n=B[0].bitrate,B.sort(function(P,W){return P.bitrate-W.bitrate}),this._levels=B;for(var L=0;L<B.length;L++)if(B[L].bitrate===n){this._firstLevel=L,this.log("manifest loaded, "+B.length+" level(s) found, first bitrate: "+n);break}var N=c&&!m,T={levels:B,audioTracks:C,subtitleTracks:h,firstLevel:this._firstLevel,stats:E.stats,audio:c,video:m,altAudio:!N&&C.some(function(P){return!!P.url})};this.hls.trigger(F.Events.MANIFEST_PARSED,T),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(F.Events.ERROR,{type:O.ErrorTypes.MEDIA_ERROR,details:O.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:E.url,reason:"no level with compatible codecs found in manifest"})},t.onError=function(_,E){if(a.prototype.onError.call(this,_,E),E.fatal)return;var B=E.context,C=this._levels[this.currentLevelIndex];if(B&&(B.type===R.PlaylistContextType.AUDIO_TRACK&&C.audioGroupIds&&B.groupId===C.audioGroupIds[C.urlId]||B.type===R.PlaylistContextType.SUBTITLE_TRACK&&C.textGroupIds&&B.groupId===C.textGroupIds[C.urlId])){this.redundantFailover(this.currentLevelIndex);return}var h=!1,n=!0,l;switch(E.details){case O.ErrorDetails.FRAG_LOAD_ERROR:case O.ErrorDetails.FRAG_LOAD_TIMEOUT:case O.ErrorDetails.KEY_LOAD_ERROR:case O.ErrorDetails.KEY_LOAD_TIMEOUT:if(E.frag){var d=this._levels[E.frag.level];d?(d.fragmentError++,d.fragmentError>this.hls.config.fragLoadingMaxRetry&&(l=E.frag.level)):l=E.frag.level}break;case O.ErrorDetails.LEVEL_LOAD_ERROR:case O.ErrorDetails.LEVEL_LOAD_TIMEOUT:B&&(B.deliveryDirectives&&(n=!1),l=B.level),h=!0;break;case O.ErrorDetails.REMUX_ALLOC_ERROR:l=E.level,h=!0;break}l!==void 0&&this.recoverLevel(E,l,h,n)},t.recoverLevel=function(_,E,B,C){var h=_.details,n=this._levels[E];if(n.loadError++,B){var l=this.retryLoadingOrFail(_);if(l)_.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(C){var d=n.url.length;if(d>1&&n.loadError<d)_.levelRetry=!0,this.redundantFailover(E);else if(this.manualLevelIndex===-1){var b=E===0?this._levels.length-1:E-1;this.currentLevelIndex!==b&&this._levels[b].loadError===0&&(this.warn(h+": switch to "+b),_.levelRetry=!0,this.hls.nextAutoLevel=b)}}},t.redundantFailover=function(_){var E=this._levels[_],B=E.url.length;if(B>1){var C=(E.urlId+1)%B;this.warn("Switching to redundant URL-id "+C),this._levels.forEach(function(h){h.urlId=C}),this.level=_}},t.onFragLoaded=function(_,E){var B=E.frag;if(B!==void 0&&B.type===R.PlaylistLevelType.MAIN){var C=this._levels[B.level];C!==void 0&&(C.fragmentError=0,C.loadError=0)}},t.onLevelLoaded=function(_,E){var B,C=E.level,h=E.details,n=this._levels[C];if(!n){var l;this.warn("Invalid level index "+C),(l=E.deliveryDirectives)!==null&&l!==void 0&&l.skip&&(h.deltaUpdateFailed=!0);return}C===this.currentLevelIndex?(n.fragmentError===0&&(n.loadError=0,this.retryCount=0),this.playlistLoaded(C,E,n.details)):(B=E.deliveryDirectives)!==null&&B!==void 0&&B.skip&&(h.deltaUpdateFailed=!0)},t.onAudioTrackSwitched=function(_,E){var B=this.hls.levels[this.currentLevelIndex];if(!B)return;if(B.audioGroupIds){for(var C=-1,h=this.hls.audioTracks[E.id].groupId,n=0;n<B.audioGroupIds.length;n++)if(B.audioGroupIds[n]===h){C=n;break}C!==B.urlId&&(B.urlId=C,this.startLoad())}},t.loadPlaylist=function(_){var E=this.currentLevelIndex,B=this._levels[E];if(this.canLoad&&B&&B.url.length>0){var C=B.urlId,h=B.url[C];if(_)try{h=_.addDirectives(h)}catch(n){this.warn("Could not construct new URL with HLS Delivery Directives: "+n)}this.log("Attempt loading level index "+E+(_?" at sn "+_.msn+" part "+_.part:"")+" with URL-id "+C+" "+h),this.clearTimer(),this.hls.trigger(F.Events.LEVEL_LOADING,{url:h,level:E,id:C,deliveryDirectives:_||null})}},t.removeLevel=function(_,E){var B=function(n,l){return l!==E},C=this._levels.filter(function(h,n){return n!==_?!0:h.url.length>1&&E!==void 0?(h.url=h.url.filter(B),h.audioGroupIds&&(h.audioGroupIds=h.audioGroupIds.filter(B)),h.textGroupIds&&(h.textGroupIds=h.textGroupIds.filter(B)),h.urlId=0,!0):!1}).map(function(h,n){var l=h.details;return l!=null&&l.fragments&&l.fragments.forEach(function(d){d.level=n}),h});this._levels=C,this.hls.trigger(F.Events.LEVELS_UPDATED,{levels:C})},u(r,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(_){var E,B=this._levels;if(B.length===0)return;if(this.currentLevelIndex===_&&(E=B[_])!==null&&E!==void 0&&E.details)return;if(_<0||_>=B.length){var C=_<0;if(this.hls.trigger(F.Events.ERROR,{type:O.ErrorTypes.OTHER_ERROR,details:O.ErrorDetails.LEVEL_SWITCH_ERROR,level:_,fatal:C,reason:"invalid level idx"}),C)return;_=Math.min(_,B.length-1)}this.clearTimer();var h=this.currentLevelIndex,n=B[h],l=B[_];this.log("switching to level "+_+" from "+h),this.currentLevelIndex=_;var d=g({},l,{level:_,maxBitrate:l.maxBitrate,uri:l.uri,urlId:l.urlId});delete d._urlId,this.hls.trigger(F.Events.LEVEL_SWITCHING,d);var b=l.details;if(!b||b.live){var m=this.switchParams(l.uri,n==null?void 0:n.details);this.loadPlaylist(m)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(_){this.manualLevelIndex=_,this._startLevel===void 0&&(this._startLevel=_),_!==-1&&(this.level=_)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(_){this._firstLevel=_}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var _=this.hls.config.startLevel;return _!==void 0?_:this._firstLevel}else return this._startLevel},set:function(_){this._startLevel=_}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(_){this.level=_,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=_)}}]),r}(e.default)},"./src/controller/level-helper.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"addGroupId",function(){return O}),D.d(G,"assignTrackIdsByGroup",function(){return X}),D.d(G,"updatePTS",function(){return M}),D.d(G,"updateFragPTSDTS",function(){return R}),D.d(G,"mergeDetails",function(){return g}),D.d(G,"mapPartIntersection",function(){return v}),D.d(G,"mapFragmentIntersection",function(){return u}),D.d(G,"adjustSliding",function(){return s}),D.d(G,"addSliding",function(){return i}),D.d(G,"computeReloadInterval",function(){return A}),D.d(G,"getFragmentWithSN",function(){return o}),D.d(G,"getPartWith",function(){return a});var V=D("./src/polyfills/number.ts"),F=D("./src/utils/logger.ts");function O(r,t,y){switch(t){case"audio":r.audioGroupIds||(r.audioGroupIds=[]),r.audioGroupIds.push(y);break;case"text":r.textGroupIds||(r.textGroupIds=[]),r.textGroupIds.push(y);break}}function X(r){var t={};r.forEach(function(y){var _=y.groupId||"";y.id=t[_]=t[_]||0,t[_]++})}function M(r,t,y){var _=r[t],E=r[y];e(_,E)}function e(r,t){var y=t.startPTS;if(Object(V.isFiniteNumber)(y)){var _=0,E;t.sn>r.sn?(_=y-r.start,E=r):(_=r.start-y,E=t),E.duration!==_&&(E.duration=_)}else if(t.sn>r.sn){var B=r.cc===t.cc;B&&r.minEndPTS?t.start=r.start+(r.minEndPTS-r.start):t.start=r.start+r.duration}else t.start=Math.max(r.start-t.duration,0)}function R(r,t,y,_,E,B){var C=_-y;C<=0&&(F.logger.warn("Fragment should have a positive duration",t),_=y+t.duration,B=E+t.duration);var h=y,n=_,l=t.startPTS,d=t.endPTS;if(Object(V.isFiniteNumber)(l)){var b=Math.abs(l-y);Object(V.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(b,t.deltaPTS):t.deltaPTS=b,h=Math.max(y,l),y=Math.min(y,l),E=Math.min(E,t.startDTS),n=Math.min(_,d),_=Math.max(_,d),B=Math.max(B,t.endDTS)}t.duration=_-y;var m=y-t.start;t.appendedPTS=_,t.start=t.startPTS=y,t.maxStartPTS=h,t.startDTS=E,t.endPTS=_,t.minEndPTS=n,t.endDTS=B;var c=t.sn;if(!r||c<r.startSN||c>r.endSN)return 0;var L,N=c-r.startSN,T=r.fragments;for(T[N]=t,L=N;L>0;L--)e(T[L],T[L-1]);for(L=N;L<T.length-1;L++)e(T[L],T[L+1]);return r.fragmentHint&&e(T[T.length-1],r.fragmentHint),r.PTSKnown=r.alignedSliding=!0,m}function g(r,t){for(var y=null,_=r.fragments,E=_.length-1;E>=0;E--){var B=_[E].initSegment;if(B){y=B;break}}r.fragmentHint&&delete r.fragmentHint.endPTS;var C=0,h;if(u(r,t,function(L,N){L.relurl&&(C=L.cc-N.cc),Object(V.isFiniteNumber)(L.startPTS)&&Object(V.isFiniteNumber)(L.endPTS)&&(N.start=N.startPTS=L.startPTS,N.startDTS=L.startDTS,N.appendedPTS=L.appendedPTS,N.maxStartPTS=L.maxStartPTS,N.endPTS=L.endPTS,N.endDTS=L.endDTS,N.minEndPTS=L.minEndPTS,N.duration=L.endPTS-L.startPTS,N.duration&&(h=N),t.PTSKnown=t.alignedSliding=!0),N.elementaryStreams=L.elementaryStreams,N.loader=L.loader,N.stats=L.stats,N.urlId=L.urlId,L.initSegment&&(N.initSegment=L.initSegment,y=L.initSegment)}),y){var n=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments;n.forEach(function(L){var N;(!L.initSegment||L.initSegment.relurl===((N=y)===null||N===void 0?void 0:N.relurl))&&(L.initSegment=y)})}if(t.skippedSegments&&(t.deltaUpdateFailed=t.fragments.some(function(L){return!L}),t.deltaUpdateFailed)){F.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var l=t.skippedSegments;l--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}var d=t.fragments;if(C){F.logger.warn("discontinuity sliding from playlist, take drift into account");for(var b=0;b<d.length;b++)d[b].cc+=C}t.skippedSegments&&(t.startCC=t.fragments[0].cc),v(r.partList,t.partList,function(L,N){N.elementaryStreams=L.elementaryStreams,N.stats=L.stats}),h?R(t,h,h.startPTS,h.endPTS,h.startDTS,h.endDTS):s(r,t),d.length&&(t.totalduration=t.edge-d[0].start),t.driftStartTime=r.driftStartTime,t.driftStart=r.driftStart;var m=t.advancedDateTime;if(t.advanced&&m){var c=t.edge;t.driftStart||(t.driftStartTime=m,t.driftStart=c),t.driftEndTime=m,t.driftEnd=c}else t.driftEndTime=r.driftEndTime,t.driftEnd=r.driftEnd,t.advancedDateTime=r.advancedDateTime}function v(r,t,y){if(r&&t)for(var _=0,E=0,B=r.length;E<=B;E++){var C=r[E],h=t[E+_];C&&h&&C.index===h.index&&C.fragment.sn===h.fragment.sn?y(C,h):_--}}function u(r,t,y){for(var _=t.skippedSegments,E=Math.max(r.startSN,t.startSN)-t.startSN,B=(r.fragmentHint?1:0)+(_?t.endSN:Math.min(r.endSN,t.endSN))-t.startSN,C=t.startSN-r.startSN,h=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,n=r.fragmentHint?r.fragments.concat(r.fragmentHint):r.fragments,l=E;l<=B;l++){var d=n[C+l],b=h[l];_&&!b&&l<_&&(b=t.fragments[l]=d),d&&b&&y(d,b)}}function s(r,t){var y=t.startSN+t.skippedSegments-r.startSN,_=r.fragments;if(y<0||y>=_.length)return;i(t,_[y].start)}function i(r,t){if(t){for(var y=r.fragments,_=r.skippedSegments;_<y.length;_++)y[_].start+=t;r.fragmentHint&&(r.fragmentHint.start+=t)}}function A(r,t){var y=1e3*r.levelTargetDuration,_=y/2,E=r.age,B=E>0&&E<y*3,C=t.loading.end-t.loading.start,h,n=r.availabilityDelay;if(r.updated===!1)if(B){var l=333*r.misses;h=Math.max(Math.min(_,C*2),l),r.availabilityDelay=(r.availabilityDelay||0)+h}else h=_;else B?(n=Math.min(n||y/2,E),r.availabilityDelay=n,h=n+y-E):h=y-C;return Math.round(h)}function o(r,t,y){if(!r||!r.details)return null;var _=r.details,E=_.fragments[t-_.startSN];return E||(E=_.fragmentHint,E&&E.sn===t?E:t<_.startSN&&y&&y.sn===t?y:null)}function a(r,t,y){if(!r||!r.details)return null;var _=r.details.partList;if(_)for(var E=_.length;E--;){var B=_[E];if(B.index===y&&B.fragment.sn===t)return B}return null}},"./src/controller/stream-controller.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return _});var V=D("./src/polyfills/number.ts"),F=D("./src/controller/base-stream-controller.ts"),O=D("./src/is-supported.ts"),X=D("./src/events.ts"),M=D("./src/utils/buffer-helper.ts"),e=D("./src/controller/fragment-tracker.ts"),R=D("./src/types/loader.ts"),g=D("./src/loader/fragment.ts"),v=D("./src/demux/transmuxer-interface.ts"),u=D("./src/types/transmuxer.ts"),s=D("./src/controller/gap-controller.ts"),i=D("./src/errors.ts"),A=D("./src/utils/logger.ts");function o(E,B){for(var C=0;C<B.length;C++){var h=B[C];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(E,h.key,h)}}function a(E,B,C){return B&&o(E.prototype,B),C&&o(E,C),E}function r(E,B){E.prototype=Object.create(B.prototype),E.prototype.constructor=E,t(E,B)}function t(E,B){return t=Object.setPrototypeOf||function(h,n){return h.__proto__=n,h},t(E,B)}var y=100,_=function(E){r(B,E);function B(h,n){var l;return l=E.call(this,h,n,"[stream-controller]")||this,l.audioCodecSwap=!1,l.gapController=null,l.level=-1,l._forceStartLoad=!1,l.altAudio=!1,l.audioOnly=!1,l.fragPlaying=null,l.onvplaying=null,l.onvseeked=null,l.fragLastKbps=0,l.stalled=!1,l.couldBacktrack=!1,l.audioCodecSwitch=!1,l.videoBuffer=null,l._registerListeners(),l}var C=B.prototype;return C._registerListeners=function(){var n=this.hls;n.on(X.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(X.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(X.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(X.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(X.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(X.Events.LEVEL_LOADED,this.onLevelLoaded,this),n.on(X.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),n.on(X.Events.ERROR,this.onError,this),n.on(X.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),n.on(X.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),n.on(X.Events.BUFFER_CREATED,this.onBufferCreated,this),n.on(X.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),n.on(X.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),n.on(X.Events.FRAG_BUFFERED,this.onFragBuffered,this)},C._unregisterListeners=function(){var n=this.hls;n.off(X.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(X.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(X.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(X.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(X.Events.LEVEL_LOADED,this.onLevelLoaded,this),n.off(X.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),n.off(X.Events.ERROR,this.onError,this),n.off(X.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),n.off(X.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),n.off(X.Events.BUFFER_CREATED,this.onBufferCreated,this),n.off(X.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),n.off(X.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),n.off(X.Events.FRAG_BUFFERED,this.onFragBuffered,this)},C.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},C.startLoad=function(n){if(this.levels){var l=this.lastCurrentTime,d=this.hls;if(this.stopLoad(),this.setInterval(y),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var b=d.startLevel;b===-1&&(d.config.testBandwidth?(b=0,this.bitrateTest=!0):b=d.nextAutoLevel),this.level=d.nextLoadLevel=b,this.loadedmetadata=!1}l>0&&n===-1&&(this.log("Override startPosition with lastCurrentTime @"+l.toFixed(3)),n=l),this.state=F.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=n,this.tick()}else this._forceStartLoad=!0,this.state=F.State.STOPPED},C.stopLoad=function(){this._forceStartLoad=!1,E.prototype.stopLoad.call(this)},C.doTick=function(){switch(this.state){case F.State.IDLE:this.doTickIdle();break;case F.State.WAITING_LEVEL:{var n,l=this.levels,d=this.level,b=l==null||((n=l[d])===null||n===void 0)?void 0:n.details;if(b&&(!b.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(b))break;this.state=F.State.IDLE;break}break}case F.State.FRAG_LOADING_WAITING_RETRY:{var m,c=self.performance.now(),L=this.retryDate;(!L||c>=L||(m=this.media)!==null&&m!==void 0&&m.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=F.State.IDLE)}break;default:break}this.onTickEnd()},C.onTickEnd=function(){E.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},C.doTickIdle=function(){var n,l,d=this.hls,b=this.levelLastLoaded,m=this.levels,c=this.media,L=d.config,N=d.nextLoadLevel;if(b===null||!c&&(this.startFragRequested||!L.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!m||!m[N])return;var T=m[N];this.level=d.nextLoadLevel=N;var P=T.details;if(!P||this.state===F.State.WAITING_LEVEL||P.live&&this.levelLastLoaded!==N){this.state=F.State.WAITING_LEVEL;return}var W=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:c,R.PlaylistLevelType.MAIN);if(W===null)return;var U=W.len,Y=this.getMaxBufferLength(T.maxBitrate);if(U>=Y)return;if(this._streamEnded(W,P)){var re={};this.altAudio&&(re.type="video"),this.hls.trigger(X.Events.BUFFER_EOS,re),this.state=F.State.ENDED;return}var me=W.end,ge=this.getNextFragment(me,P);if(this.couldBacktrack&&!this.fragPrevious&&ge&&ge.sn!=="initSegment"){var Oe=ge.sn-P.startSN;Oe>1&&(ge=P.fragments[Oe-1],this.fragmentTracker.removeFragment(ge))}if(ge&&this.fragmentTracker.getState(ge)===e.FragmentState.OK&&this.nextLoadPosition>me){var Se=this.audioOnly&&!this.altAudio?g.ElementaryStreamTypes.AUDIO:g.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(c,Se,R.PlaylistLevelType.MAIN),ge=this.getNextFragment(this.nextLoadPosition,P)}if(!ge)return;ge.initSegment&&!ge.initSegment.data&&!this.bitrateTest&&(ge=ge.initSegment),((n=ge.decryptdata)===null||n===void 0?void 0:n.keyFormat)==="identity"&&!((l=ge.decryptdata)!==null&&l!==void 0&&l.key)?this.loadKey(ge,P):this.loadFragment(ge,P,me)},C.loadFragment=function(n,l,d){var b,m=this.fragmentTracker.getState(n);if(this.fragCurrent=n,m===e.FragmentState.BACKTRACKED){var c=this.fragmentTracker.getBacktrackData(n);if(c){this._handleFragmentLoadProgress(c),this._handleFragmentLoadComplete(c);return}else m=e.FragmentState.NOT_LOADED}m===e.FragmentState.NOT_LOADED||m===e.FragmentState.PARTIAL?n.sn==="initSegment"?this._loadInitSegment(n):this.bitrateTest?(n.bitrateTest=!0,this.log("Fragment "+n.sn+" of level "+n.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(n)):(this.startFragRequested=!0,E.prototype.loadFragment.call(this,n,l,d)):m===e.FragmentState.APPENDING?this.reduceMaxBufferLength(n.duration)&&this.fragmentTracker.removeFragment(n):((b=this.media)===null||b===void 0?void 0:b.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},C.getAppendedFrag=function(n){var l=this.fragmentTracker.getAppendedFrag(n,R.PlaylistLevelType.MAIN);return l&&"fragment"in l?l.fragment:l},C.getBufferedFrag=function(n){return this.fragmentTracker.getBufferedFrag(n,R.PlaylistLevelType.MAIN)},C.followingBufferedFrag=function(n){return n?this.getBufferedFrag(n.end+.5):null},C.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},C.nextLevelSwitch=function(){var n=this.levels,l=this.media;if(l!=null&&l.readyState){var d,b=this.getAppendedFrag(l.currentTime);if(b&&b.start>1&&this.flushMainBuffer(0,b.start-1),!l.paused&&n){var m=this.hls.nextLoadLevel,c=n[m],L=this.fragLastKbps;L&&this.fragCurrent?d=this.fragCurrent.duration*c.maxBitrate/(1e3*L)+1:d=0}else d=0;var N=this.getBufferedFrag(l.currentTime+d);if(N){var T=this.followingBufferedFrag(N);if(T){this.abortCurrentFrag();var P=T.maxStartPTS?T.maxStartPTS:T.start,W=T.duration,U=Math.max(N.end,P+Math.min(Math.max(W-this.config.maxFragLookUpTolerance,W*.5),W*.75));this.flushMainBuffer(U,Number.POSITIVE_INFINITY)}}}},C.abortCurrentFrag=function(){var n=this.fragCurrent;this.fragCurrent=null,n!=null&&n.loader&&n.loader.abort(),this.state===F.State.KEY_LOADING&&(this.state=F.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},C.flushMainBuffer=function(n,l){E.prototype.flushMainBuffer.call(this,n,l,this.altAudio?"video":null)},C.onMediaAttached=function(n,l){E.prototype.onMediaAttached.call(this,n,l);var d=l.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),d.addEventListener("playing",this.onvplaying),d.addEventListener("seeked",this.onvseeked),this.gapController=new s.default(this.config,d,this.fragmentTracker,this.hls)},C.onMediaDetaching=function(){var n=this.media;n&&(n.removeEventListener("playing",this.onvplaying),n.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),E.prototype.onMediaDetaching.call(this)},C.onMediaPlaying=function(){this.tick()},C.onMediaSeeked=function(){var n=this.media,l=n?n.currentTime:null;Object(V.isFiniteNumber)(l)&&this.log("Media seeked to "+l.toFixed(3)),this.tick()},C.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(X.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},C.onManifestParsed=function(n,l){var d=!1,b=!1,m;l.levels.forEach(function(c){m=c.audioCodec,m&&(m.indexOf("mp4a.40.2")!==-1&&(d=!0),m.indexOf("mp4a.40.5")!==-1&&(b=!0))}),this.audioCodecSwitch=d&&b&&!Object(O.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=l.levels,this.startFragRequested=!1},C.onLevelLoading=function(n,l){var d=this.levels;if(!d||this.state!==F.State.IDLE)return;var b=d[l.level];(!b.details||b.details.live&&this.levelLastLoaded!==l.level||this.waitForCdnTuneIn(b.details))&&(this.state=F.State.WAITING_LEVEL)},C.onLevelLoaded=function(n,l){var d,b=this.levels,m=l.level,c=l.details,L=c.totalduration;if(!b){this.warn("Levels were reset while loading level "+m);return}this.log("Level "+m+" loaded ["+c.startSN+","+c.endSN+"], cc ["+c.startCC+", "+c.endCC+"] duration:"+L);var N=this.fragCurrent;N&&(this.state===F.State.FRAG_LOADING||this.state===F.State.FRAG_LOADING_WAITING_RETRY)&&(N.level!==l.level&&N.loader&&(this.state=F.State.IDLE,N.loader.abort()));var T=b[m],P=0;if(c.live||(d=T.details)!==null&&d!==void 0&&d.live){if(c.fragments[0]||(c.deltaUpdateFailed=!0),c.deltaUpdateFailed)return;P=this.alignPlaylists(c,T.details)}if(T.details=c,this.levelLastLoaded=m,this.hls.trigger(X.Events.LEVEL_UPDATED,{details:c,level:m}),this.state===F.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(c))return;this.state=F.State.IDLE}this.startFragRequested?c.live&&this.synchronizeToLiveEdge(c):this.setStartPosition(c,P),this.tick()},C._handleFragmentLoadProgress=function(n){var l,d=n.frag,b=n.part,m=n.payload,c=this.levels;if(!c){this.warn("Levels were reset while fragment load was in progress. Fragment "+d.sn+" of level "+d.level+" will not be buffered");return}var L=c[d.level],N=L.details;if(!N){this.warn("Dropping fragment "+d.sn+" of level "+d.level+" after level details were reset");return}var T=L.videoCodec,P=N.PTSKnown||!N.live,W=(l=d.initSegment)===null||l===void 0?void 0:l.data,U=this._getAudioCodec(L),Y=this.transmuxer=this.transmuxer||new v.default(this.hls,R.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),re=b?b.index:-1,me=re!==-1,ge=new u.ChunkMetadata(d.level,d.sn,d.stats.chunkCount,m.byteLength,re,me),Oe=this.initPTS[d.cc];Y.push(m,W,U,T,d,b,N.totalduration,P,ge,Oe)},C.onAudioTrackSwitching=function(n,l){var d=this.altAudio,b=!!l.url,m=l.id;if(!b){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var c=this.fragCurrent;c!=null&&c.loader&&(this.log("Switching to main audio track, cancel main fragment load"),c.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var L=this.hls;d&&L.trigger(X.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),L.trigger(X.Events.AUDIO_TRACK_SWITCHED,{id:m})}},C.onAudioTrackSwitched=function(n,l){var d=l.id,b=!!this.hls.audioTracks[d].url;if(b){var m=this.videoBuffer;m&&this.mediaBuffer!==m&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=m)}this.altAudio=b,this.tick()},C.onBufferCreated=function(n,l){var d=l.tracks,b,m,c=!1;for(var L in d){var N=d[L];if(N.id==="main"){if(m=L,b=N,L==="video"){var T=d[L];T&&(this.videoBuffer=T.buffer)}}else c=!0}c&&b?(this.log("Alternate track found, use "+m+".buffered to schedule main fragment loading"),this.mediaBuffer=b.buffer):this.mediaBuffer=this.media},C.onFragBuffered=function(n,l){var d=l.frag,b=l.part;if(d&&d.type!==R.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(d)){this.warn("Fragment "+d.sn+(b?" p: "+b.index:"")+" of level "+d.level+" finished buffering, but was aborted. state: "+this.state),this.state===F.State.PARSED&&(this.state=F.State.IDLE);return}var m=b?b.stats:d.stats;this.fragLastKbps=Math.round(8*m.total/(m.buffering.end-m.loading.first)),d.sn!=="initSegment"&&(this.fragPrevious=d),this.fragBufferedComplete(d,b)},C.onError=function(n,l){switch(l.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:this.onFragmentOrKeyLoadError(R.PlaylistLevelType.MAIN,l);break;case i.ErrorDetails.LEVEL_LOAD_ERROR:case i.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==F.State.ERROR&&(l.fatal?(this.warn(""+l.details),this.state=F.State.ERROR):!l.levelRetry&&this.state===F.State.WAITING_LEVEL&&(this.state=F.State.IDLE));break;case i.ErrorDetails.BUFFER_FULL_ERROR:if(l.parent==="main"&&(this.state===F.State.PARSING||this.state===F.State.PARSED)){var d=!0,b=this.getFwdBufferInfo(this.media,R.PlaylistLevelType.MAIN);b&&b.len>.5&&(d=!this.reduceMaxBufferLength(b.len)),d&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},C.checkBuffer=function(){var n=this.media,l=this.gapController;if(!n||!l||!n.readyState)return;var d=M.BufferHelper.getBuffered(n);!this.loadedmetadata&&d.length?(this.loadedmetadata=!0,this.seekToStartPos()):l.poll(this.lastCurrentTime),this.lastCurrentTime=n.currentTime},C.onFragLoadEmergencyAborted=function(){this.state=F.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},C.onBufferFlushed=function(n,l){var d=l.type;if(d!==g.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var b=(d===g.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(b,d,R.PlaylistLevelType.MAIN)}},C.onLevelsUpdated=function(n,l){this.levels=l.levels},C.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},C.seekToStartPos=function(){var n=this.media,l=n.currentTime,d=this.startPosition;if(d>=0&&l<d){if(n.seeking){A.logger.log("could not seek to "+d+", already seeking at "+l);return}var b=M.BufferHelper.getBuffered(n),m=b.length?b.start(0):0,c=m-d;c>0&&(c<this.config.maxBufferHole||c<this.config.maxFragLookUpTolerance)&&(A.logger.log("adjusting start position by "+c+" to match buffer start"),d+=c,this.startPosition=d),this.log("seek to target start position "+d+" from current time "+l),n.currentTime=d}},C._getAudioCodec=function(n){var l=this.config.defaultAudioCodec||n.audioCodec;return this.audioCodecSwap&&l&&(this.log("Swapping audio codec"),l.indexOf("mp4a.40.5")!==-1?l="mp4a.40.2":l="mp4a.40.5"),l},C._loadBitrateTestFrag=function(n){var l=this;this._doFragLoad(n).then(function(d){var b=l.hls;if(!d||b.nextLoadLevel||l.fragContextChanged(n))return;l.fragLoadError=0,l.state=F.State.IDLE,l.startFragRequested=!1,l.bitrateTest=!1;var m=n.stats;m.parsing.start=m.parsing.end=m.buffering.start=m.buffering.end=self.performance.now(),b.trigger(X.Events.FRAG_LOADED,d)})},C._handleTransmuxComplete=function(n){var l,d="main",b=this.hls,m=n.remuxResult,c=n.chunkMeta,L=this.getCurrentContext(c);if(!L){this.warn("The loading context changed while buffering fragment "+c.sn+" of level "+c.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(c.level);return}var N=L.frag,T=L.part,P=L.level,W=m.video,U=m.text,Y=m.id3,re=m.initSegment,me=this.altAudio?void 0:m.audio;if(this.fragContextChanged(N))return;if(this.state=F.State.PARSING,re){re.tracks&&(this._bufferInitSegment(P,re.tracks,N,c),b.trigger(X.Events.FRAG_PARSING_INIT_SEGMENT,{frag:N,id:d,tracks:re.tracks}));var ge=re.initPTS,Oe=re.timescale;Object(V.isFiniteNumber)(ge)&&(this.initPTS[N.cc]=ge,b.trigger(X.Events.INIT_PTS_FOUND,{frag:N,id:d,initPTS:ge,timescale:Oe}))}if(W&&m.independent!==!1){if(P.details){var Se=W.startPTS,Be=W.endPTS,Ne=W.startDTS,ke=W.endDTS;if(T)T.elementaryStreams[W.type]={startPTS:Se,endPTS:Be,startDTS:Ne,endDTS:ke};else if(W.firstKeyFrame&&W.independent&&(this.couldBacktrack=!0),W.dropped&&W.independent){var Ce=this.getLoadPosition()+this.config.maxBufferHole;if(Ce<Se){this.backtrack(N);return}N.setElementaryStreamInfo(W.type,N.start,Be,N.start,ke,!0)}N.setElementaryStreamInfo(W.type,Se,Be,Ne,ke),this.bufferFragmentData(W,N,T,c)}}else if(m.independent===!1){this.backtrack(N);return}if(me){var ve=me.startPTS,Ye=me.endPTS,ht=me.startDTS,at=me.endDTS;T&&(T.elementaryStreams[g.ElementaryStreamTypes.AUDIO]={startPTS:ve,endPTS:Ye,startDTS:ht,endDTS:at}),N.setElementaryStreamInfo(g.ElementaryStreamTypes.AUDIO,ve,Ye,ht,at),this.bufferFragmentData(me,N,T,c)}if(Y!=null&&(l=Y.samples)!==null&&l!==void 0&&l.length){var We={frag:N,id:d,samples:Y.samples};b.trigger(X.Events.FRAG_PARSING_METADATA,We)}if(U){var it={frag:N,id:d,samples:U.samples};b.trigger(X.Events.FRAG_PARSING_USERDATA,it)}},C._bufferInitSegment=function(n,l,d,b){var m=this;if(this.state!==F.State.PARSING)return;this.audioOnly=!!l.audio&&!l.video,this.altAudio&&!this.audioOnly&&delete l.audio;var c=l.audio,L=l.video,N=l.audiovideo;if(c){var T=n.audioCodec,P=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(T&&(T.indexOf("mp4a.40.5")!==-1?T="mp4a.40.2":T="mp4a.40.5"),c.metadata.channelCount!==1&&P.indexOf("firefox")===-1&&(T="mp4a.40.5")),P.indexOf("android")!==-1&&c.container!=="audio/mpeg"&&(T="mp4a.40.2",this.log("Android: force audio codec to "+T)),n.audioCodec&&n.audioCodec!==T&&this.log('Swapping manifest audio codec "'+n.audioCodec+'" for "'+T+'"'),c.levelCodec=T,c.id="main",this.log("Init audio buffer, container:"+c.container+", codecs[selected/level/parsed]=["+(T||"")+"/"+(n.audioCodec||"")+"/"+c.codec+"]")}L&&(L.levelCodec=n.videoCodec,L.id="main",this.log("Init video buffer, container:"+L.container+", codecs[level/parsed]=["+(n.videoCodec||"")+"/"+L.codec+"]")),N&&this.log("Init audiovideo buffer, container:"+N.container+", codecs[level/parsed]=["+(n.attrs.CODECS||"")+"/"+N.codec+"]"),this.hls.trigger(X.Events.BUFFER_CODECS,l),Object.keys(l).forEach(function(W){var U=l[W],Y=U.initSegment;Y!=null&&Y.byteLength&&m.hls.trigger(X.Events.BUFFER_APPENDING,{type:W,data:Y,frag:d,part:null,chunkMeta:b,parent:d.type})}),this.tick()},C.backtrack=function(n){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(n);var l=this.fragmentTracker.backtrack(n);this.fragPrevious=null,this.nextLoadPosition=n.start,l?this.resetFragmentLoading(n):this.state=F.State.BACKTRACKING},C.checkFragmentChanged=function(){var n=this.media,l=null;if(n&&n.readyState>1&&n.seeking===!1){var d=n.currentTime;if(M.BufferHelper.isBuffered(n,d)?l=this.getAppendedFrag(d):M.BufferHelper.isBuffered(n,d+.1)&&(l=this.getAppendedFrag(d+.1)),l){var b=this.fragPlaying,m=l.level;(!b||l.sn!==b.sn||b.level!==m||l.urlId!==b.urlId)&&(this.hls.trigger(X.Events.FRAG_CHANGED,{frag:l}),(!b||b.level!==m)&&this.hls.trigger(X.Events.LEVEL_SWITCHED,{level:m}),this.fragPlaying=l)}}},a(B,[{key:"nextLevel",get:function(){var n=this.nextBufferedFrag;return n?n.level:-1}},{key:"currentLevel",get:function(){var n=this.media;if(n){var l=this.getAppendedFrag(n.currentTime);if(l)return l.level}return-1}},{key:"nextBufferedFrag",get:function(){var n=this.media;if(n){var l=this.getAppendedFrag(n.currentTime);return this.followingBufferedFrag(l)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),B}(F.default)},"./src/controller/subtitle-stream-controller.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"SubtitleStreamController",function(){return r});var V=D("./src/events.ts"),F=D("./src/utils/logger.ts"),O=D("./src/utils/buffer-helper.ts"),X=D("./src/controller/fragment-finders.ts"),M=D("./src/utils/discontinuities.ts"),e=D("./src/controller/level-helper.ts"),R=D("./src/controller/fragment-tracker.ts"),g=D("./src/controller/base-stream-controller.ts"),v=D("./src/types/loader.ts"),u=D("./src/types/level.ts");function s(t,y){for(var _=0;_<y.length;_++){var E=y[_];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(t,E.key,E)}}function i(t,y,_){return y&&s(t.prototype,y),_&&s(t,_),t}function A(t,y){t.prototype=Object.create(y.prototype),t.prototype.constructor=t,o(t,y)}function o(t,y){return o=Object.setPrototypeOf||function(E,B){return E.__proto__=B,E},o(t,y)}var a=500,r=function(t){A(y,t);function y(E,B){var C;return C=t.call(this,E,B,"[subtitle-stream-controller]")||this,C.levels=[],C.currentTrackId=-1,C.tracksBuffered=[],C.mainDetails=null,C._registerListeners(),C}var _=y.prototype;return _.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},_._registerListeners=function(){var B=this.hls;B.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),B.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),B.on(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),B.on(V.Events.LEVEL_LOADED,this.onLevelLoaded,this),B.on(V.Events.ERROR,this.onError,this),B.on(V.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),B.on(V.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),B.on(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),B.on(V.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),B.on(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},_._unregisterListeners=function(){var B=this.hls;B.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),B.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),B.off(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),B.off(V.Events.LEVEL_LOADED,this.onLevelLoaded,this),B.off(V.Events.ERROR,this.onError,this),B.off(V.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),B.off(V.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),B.off(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),B.off(V.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),B.off(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},_.startLoad=function(){this.stopLoad(),this.state=g.State.IDLE,this.setInterval(a),this.tick()},_.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},_.onLevelLoaded=function(B,C){this.mainDetails=C.details},_.onSubtitleFragProcessed=function(B,C){var h=C.frag,n=C.success;if(this.fragPrevious=h,this.state=g.State.IDLE,!n)return;var l=this.tracksBuffered[this.currentTrackId];if(!l)return;for(var d,b=h.start,m=0;m<l.length;m++)if(b>=l[m].start&&b<=l[m].end){d=l[m];break}var c=h.start+h.duration;d?d.end=c:(d={start:b,end:c},l.push(d)),this.fragmentTracker.fragBuffered(h)},_.onBufferFlushing=function(B,C){var h=C.startOffset,n=C.endOffset;if(h===0&&n!==Number.POSITIVE_INFINITY){var l=this.currentTrackId,d=this.levels;if(!d.length||!d[l]||!d[l].details)return;var b=d[l].details,m=b.targetduration,c=n-m;if(c<=0)return;C.endOffsetSubtitles=Math.max(0,c),this.tracksBuffered.forEach(function(L){for(var N=0;N<L.length;){if(L[N].end<=c){L.shift();continue}else if(L[N].start<c)L[N].start=c;else break;N++}}),this.fragmentTracker.removeFragmentsInRange(h,c,v.PlaylistLevelType.SUBTITLE)}},_.onError=function(B,C){var h,n=C.frag;if(!n||n.type!==v.PlaylistLevelType.SUBTITLE)return;(h=this.fragCurrent)!==null&&h!==void 0&&h.loader&&this.fragCurrent.loader.abort(),this.state=g.State.IDLE},_.onSubtitleTracksUpdated=function(B,C){var h=this,n=C.subtitleTracks;this.tracksBuffered=[],this.levels=n.map(function(l){return new u.Level(l)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(l){h.tracksBuffered[l.id]=[]}),this.mediaBuffer=null},_.onSubtitleTrackSwitch=function(B,C){if(this.currentTrackId=C.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var h=this.levels[this.currentTrackId];h!=null&&h.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,h&&this.setInterval(a)},_.onSubtitleTrackLoaded=function(B,C){var h,n=C.details,l=C.id,d=this.currentTrackId,b=this.levels;if(!b.length)return;var m=b[d];if(l>=b.length||l!==d||!m)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,n.live||(h=m.details)!==null&&h!==void 0&&h.live){var c=this.mainDetails;if(n.deltaUpdateFailed||!c)return;var L=c.fragments[0];if(!m.details)n.hasProgramDateTime&&c.hasProgramDateTime?Object(M.alignMediaPlaylistByPDT)(n,c):L&&Object(e.addSliding)(n,L.start);else{var N=this.alignPlaylists(n,m.details);N===0&&L&&Object(e.addSliding)(n,L.start)}}if(m.details=n,this.levelLastLoaded=l,this.tick(),n.live&&!this.fragCurrent&&this.media&&this.state===g.State.IDLE){var T=Object(X.findFragmentByPTS)(null,n.fragments,this.media.currentTime,0);T||(this.warn("Subtitle playlist not aligned with playback"),m.details=void 0)}},_._handleFragmentLoadComplete=function(B){var C=B.frag,h=B.payload,n=C.decryptdata,l=this.hls;if(this.fragContextChanged(C))return;if(h&&h.byteLength>0&&n&&n.key&&n.iv&&n.method==="AES-128"){var d=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(h),n.key.buffer,n.iv.buffer).then(function(b){var m=performance.now();l.trigger(V.Events.FRAG_DECRYPTED,{frag:C,payload:b,stats:{tstart:d,tdecrypt:m}})})}},_.doTick=function(){if(!this.media){this.state=g.State.IDLE;return}if(this.state===g.State.IDLE){var B,C=this.currentTrackId,h=this.levels;if(!h.length||!h[C]||!h[C].details)return;var n=h[C].details,l=n.targetduration,d=this.config,b=this.media,m=O.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,b.currentTime-l,d.maxBufferHole),c=m.end,L=m.len,N=this.getMaxBufferLength()+l;if(L>N)return;console.assert(n,"Subtitle track details are defined on idle subtitle stream controller tick");var T=n.fragments,P=T.length,W=n.edge,U,Y=this.fragPrevious;if(c<W){var re=d.maxFragLookUpTolerance;Y&&n.hasProgramDateTime&&(U=Object(X.findFragmentByPDT)(T,Y.endProgramDateTime,re)),U||(U=Object(X.findFragmentByPTS)(Y,T,c,re),!U&&Y&&Y.start<T[0].start&&(U=T[0]))}else U=T[P-1];(B=U)!==null&&B!==void 0&&B.encrypted?(F.logger.log("Loading key for "+U.sn),this.state=g.State.KEY_LOADING,this.hls.trigger(V.Events.KEY_LOADING,{frag:U})):U&&this.fragmentTracker.getState(U)===R.FragmentState.NOT_LOADED&&this.loadFragment(U,n,c)}},_.loadFragment=function(B,C,h){this.fragCurrent=B,t.prototype.loadFragment.call(this,B,C,h)},i(y,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),y}(g.default)},"./src/controller/subtitle-track-controller.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/events.ts"),F=D("./src/utils/texttrack-utils.ts"),O=D("./src/controller/base-playlist-controller.ts"),X=D("./src/types/loader.ts");function M(s,i){for(var A=0;A<i.length;A++){var o=i[A];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(s,o.key,o)}}function e(s,i,A){return i&&M(s.prototype,i),A&&M(s,A),s}function R(s,i){s.prototype=Object.create(i.prototype),s.prototype.constructor=s,g(s,i)}function g(s,i){return g=Object.setPrototypeOf||function(o,a){return o.__proto__=a,o},g(s,i)}var v=function(s){R(i,s);function i(o){var a;return a=s.call(this,o,"[subtitle-track-controller]")||this,a.media=null,a.tracks=[],a.groupId=null,a.tracksInGroup=[],a.trackId=-1,a.selectDefaultTrack=!0,a.queuedDefaultTrack=-1,a.trackChangeListener=function(){return a.onTextTracksChanged()},a.asyncPollTrackChange=function(){return a.pollTrackChange(0)},a.useTextTrackPolling=!1,a.subtitlePollingInterval=-1,a.subtitleDisplay=!0,a.registerListeners(),a}var A=i.prototype;return A.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,s.prototype.destroy.call(this)},A.registerListeners=function(){var a=this.hls;a.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(V.Events.LEVEL_LOADING,this.onLevelLoading,this),a.on(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),a.on(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),a.on(V.Events.ERROR,this.onError,this)},A.unregisterListeners=function(){var a=this.hls;a.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(V.Events.LEVEL_LOADING,this.onLevelLoading,this),a.off(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),a.off(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),a.off(V.Events.ERROR,this.onError,this)},A.onMediaAttached=function(a,r){if(this.media=r.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(a){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,a)},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 a=u(this.media.textTracks);a.forEach(function(r){Object(F.clearCurrentCues)(r)}),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(a,r){this.tracks=r.subtitleTracks},A.onSubtitleTrackLoaded=function(a,r){var t=r.id,y=r.details,_=this.trackId,E=this.tracksInGroup[_];if(!E){this.warn("Invalid subtitle track id "+t);return}var B=E.details;E.details=r.details,this.log("subtitle track "+t+" loaded ["+y.startSN+"-"+y.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,r,B))},A.onLevelLoading=function(a,r){this.switchLevel(r.level)},A.onLevelSwitching=function(a,r){this.switchLevel(r.level)},A.switchLevel=function(a){var r=this.hls.levels[a];if(!(r!=null&&r.textGroupIds))return;var t=r.textGroupIds[r.urlId];if(this.groupId!==t){var y=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,_=this.tracks.filter(function(C){return!t||C.groupId===t});this.tracksInGroup=_;var E=this.findTrackId(y==null?void 0:y.name)||this.findTrackId();this.groupId=t;var B={subtitleTracks:_};this.log("Updating subtitle tracks, "+_.length+' track(s) found in "'+t+'" group-id'),this.hls.trigger(V.Events.SUBTITLE_TRACKS_UPDATED,B),E!==-1&&this.setSubtitleTrack(E,y)}},A.findTrackId=function(a){for(var r=this.tracksInGroup,t=0;t<r.length;t++){var y=r[t];if((!this.selectDefaultTrack||y.default)&&(!a||a===y.name))return y.id}return-1},A.onError=function(a,r){if(s.prototype.onError.call(this,a,r),r.fatal||!r.context)return;r.context.type===X.PlaylistContextType.SUBTITLE_TRACK&&r.context.id===this.trackId&&r.context.groupId===this.groupId&&this.retryLoadingOrFail(r)},A.loadPlaylist=function(a){var r=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(r)){var t=r.id,y=r.groupId,_=r.url;if(a)try{_=a.addDirectives(_)}catch(E){this.warn("Could not construct new URL with HLS Delivery Directives: "+E)}this.log("Loading subtitle playlist for id "+t),this.hls.trigger(V.Events.SUBTITLE_TRACK_LOADING,{url:_,id:t,groupId:y,deliveryDirectives:a||null})}},A.toggleTrackModes=function(a){var r=this,t=this.media,y=this.subtitleDisplay,_=this.trackId;if(!t)return;var E=u(t.textTracks),B=E.filter(function(n){return n.groupId===r.groupId});if(a===-1)[].slice.call(E).forEach(function(n){n.mode="disabled"});else{var C=B[_];C&&(C.mode="disabled")}var h=B[a];h&&(h.mode=y?"showing":"hidden")},A.setSubtitleTrack=function(a,r){var t,y=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=a;return}if(this.trackId!==a&&this.toggleTrackModes(a),this.trackId===a&&(a===-1||(t=y[a])!==null&&t!==void 0&&t.details)||a<-1||a>=y.length)return;this.clearTimer();var _=y[a];if(this.log("Switching to subtitle track "+a),this.trackId=a,_){var E=_.id,B=_.groupId,C=B===void 0?"":B,h=_.name,n=_.type,l=_.url;this.hls.trigger(V.Events.SUBTITLE_TRACK_SWITCH,{id:E,groupId:C,name:h,type:n,url:l});var d=this.switchParams(_.url,r==null?void 0:r.details);this.loadPlaylist(d)}else this.hls.trigger(V.Events.SUBTITLE_TRACK_SWITCH,{id:a})},A.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var a=-1,r=u(this.media.textTracks),t=0;t<r.length;t++)if(r[t].mode==="hidden")a=t;else if(r[t].mode==="showing"){a=t;break}this.subtitleTrack!==a&&(this.subtitleTrack=a)},e(i,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(a){this.selectDefaultTrack=!1;var r=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(a,r)}}]),i}(O.default);function u(s){for(var i=[],A=0;A<s.length;A++){var o=s[A];o.kind==="subtitles"&&o.label&&i.push(s[A])}return i}G.default=v},"./src/controller/timeline-controller.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"TimelineController",function(){return u});var V=D("./src/polyfills/number.ts"),F=D("./src/events.ts"),O=D("./src/utils/cea-608-parser.ts"),X=D("./src/utils/output-filter.ts"),M=D("./src/utils/webvtt-parser.ts"),e=D("./src/utils/texttrack-utils.ts"),R=D("./src/utils/imsc1-ttml-parser.ts"),g=D("./src/types/loader.ts"),v=D("./src/utils/logger.ts"),u=function(){function o(r){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=r,this.config=r.config,this.Cues=r.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 t=new X.default(this,"textTrack1"),y=new X.default(this,"textTrack2"),_=new X.default(this,"textTrack3"),E=new X.default(this,"textTrack4");this.cea608Parser1=new O.default(1,t,y),this.cea608Parser2=new O.default(3,_,E)}r.on(F.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.on(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.on(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.on(F.Events.MANIFEST_LOADED,this.onManifestLoaded,this),r.on(F.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),r.on(F.Events.FRAG_LOADING,this.onFragLoading,this),r.on(F.Events.FRAG_LOADED,this.onFragLoaded,this),r.on(F.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),r.on(F.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),r.on(F.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),r.on(F.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),r.on(F.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var a=o.prototype;return a.destroy=function(){var t=this.hls;t.off(F.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(F.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(F.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.off(F.Events.FRAG_LOADING,this.onFragLoading,this),t.off(F.Events.FRAG_LOADED,this.onFragLoaded,this),t.off(F.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.off(F.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),t.off(F.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.off(F.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.off(F.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},a.addCues=function(t,y,_,E,B){for(var C=!1,h=B.length;h--;){var n=B[h],l=i(n[0],n[1],y,_);if(l>=0&&(n[0]=Math.min(n[0],y),n[1]=Math.max(n[1],_),C=!0,l/(_-y)>.5))return}if(C||B.push([y,_]),this.config.renderTextTracksNatively){var d=this.captionsTracks[t];this.Cues.newCue(d,y,_,E)}else{var b=this.Cues.newCue(null,y,_,E);this.hls.trigger(F.Events.CUES_PARSED,{type:"captions",cues:b,track:t})}},a.onInitPtsFound=function(t,y){var _=this,E=y.frag,B=y.id,C=y.initPTS,h=y.timescale,n=this.unparsedVttFrags;B==="main"&&(this.initPTS[E.cc]=C,this.timescale[E.cc]=h),n.length&&(this.unparsedVttFrags=[],n.forEach(function(l){_.onFragLoaded(F.Events.FRAG_LOADED,l)}))},a.getExistingTrack=function(t){var y=this.media;if(y)for(var _=0;_<y.textTracks.length;_++){var E=y.textTracks[_];if(E[t])return E}return null},a.createCaptionsTrack=function(t){this.config.renderTextTracksNatively?this.createNativeTrack(t):this.createNonNativeTrack(t)},a.createNativeTrack=function(t){if(this.captionsTracks[t])return;var y=this.captionsProperties,_=this.captionsTracks,E=this.media,B=y[t],C=B.label,h=B.languageCode,n=this.getExistingTrack(t);if(n)_[t]=n,Object(e.clearCurrentCues)(_[t]),Object(e.sendAddTrackEvent)(_[t],E);else{var l=this.createTextTrack("captions",C,h);l&&(l[t]=!0,_[t]=l)}},a.createNonNativeTrack=function(t){if(this.nonNativeCaptionsTracks[t])return;var y=this.captionsProperties[t];if(!y)return;var _=y.label,E={_id:t,label:_,kind:"captions",default:y.media?!!y.media.default:!1,closedCaptions:y.media};this.nonNativeCaptionsTracks[t]=E,this.hls.trigger(F.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[E]})},a.createTextTrack=function(t,y,_){var E=this.media;return E?E.addTextTrack(t,y,_):void 0},a.onMediaAttaching=function(t,y){this.media=y.media,this._cleanTracks()},a.onMediaDetaching=function(){var t=this.captionsTracks;Object.keys(t).forEach(function(y){Object(e.clearCurrentCues)(t[y]),delete t[y]}),this.nonNativeCaptionsTracks={}},a.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())},a._cleanTracks=function(){var t=this.media;if(!t)return;var y=t.textTracks;if(y)for(var _=0;_<y.length;_++)Object(e.clearCurrentCues)(y[_])},a.onSubtitleTracksUpdated=function(t,y){var _=this;this.textTracks=[];var E=y.subtitleTracks||[],B=E.some(function(l){return l.textCodec===R.IMSC1_CODEC});if(this.config.enableWebVTT||B&&this.config.enableIMSC1){var C=this.tracks&&E&&this.tracks.length===E.length;if(this.tracks=E||[],this.config.renderTextTracksNatively){var h=this.media?this.media.textTracks:[];this.tracks.forEach(function(l,d){var b;if(d<h.length){for(var m=null,c=0;c<h.length;c++)if(s(h[c],l)){m=h[c];break}m&&(b=m)}b?Object(e.clearCurrentCues)(b):(b=_.createTextTrack("subtitles",l.name,l.lang),b&&(b.mode="disabled")),b&&(b.groupId=l.groupId,_.textTracks.push(b))})}else if(!C&&this.tracks&&this.tracks.length){var n=this.tracks.map(function(l){return{label:l.name,kind:l.type.toLowerCase(),default:l.default,subtitleTrack:l}});this.hls.trigger(F.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:n})}}},a.onManifestLoaded=function(t,y){var _=this;this.config.enableCEA708Captions&&y.captions&&y.captions.forEach(function(E){var B=/(?:CC|SERVICE)([1-4])/.exec(E.instreamId);if(!B)return;var C="textTrack"+B[1],h=_.captionsProperties[C];if(!h)return;h.label=E.name,E.lang&&(h.languageCode=E.lang),h.media=E})},a.onFragLoading=function(t,y){var _=this.cea608Parser1,E=this.cea608Parser2,B=this.lastSn,C=this.lastPartIndex;if(!this.enabled||!(_&&E))return;if(y.frag.type===g.PlaylistLevelType.MAIN){var h,n,l=y.frag.sn,d=(h=y==null||((n=y.part)===null||n===void 0)?void 0:n.index)!=null?h:-1;l===B+1||l===B&&d===C+1||(_.reset(),E.reset()),this.lastSn=l,this.lastPartIndex=d}},a.onFragLoaded=function(t,y){var _=y.frag,E=y.payload,B=this.initPTS,C=this.unparsedVttFrags;if(_.type===g.PlaylistLevelType.SUBTITLE)if(E.byteLength){if(!Object(V.isFiniteNumber)(B[_.cc])){C.push(y),B.length&&this.hls.trigger(F.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:_,error:new Error("Missing initial subtitle PTS")});return}var h=_.decryptdata;if(h==null||h.key==null||h.method!=="AES-128"){var n=this.tracks[_.level],l=this.vttCCs;l[_.cc]||(l[_.cc]={start:_.start,prevCC:this.prevCC,new:!0},this.prevCC=_.cc),n&&n.textCodec===R.IMSC1_CODEC?this._parseIMSC1(_,E):this._parseVTTs(_,E,l)}}else this.hls.trigger(F.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:_,error:new Error("Empty subtitle payload")})},a._parseIMSC1=function(t,y){var _=this,E=this.hls;Object(R.parseIMSC1)(y,this.initPTS[t.cc],this.timescale[t.cc],function(B){_._appendCues(B,t.level),E.trigger(F.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(B){v.logger.log("Failed to parse IMSC1: "+B),E.trigger(F.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:B})})},a._parseVTTs=function(t,y,_){var E=this,B=this.hls;Object(M.parseWebVTT)(y,this.initPTS[t.cc],this.timescale[t.cc],_,t.cc,t.start,function(C){E._appendCues(C,t.level),B.trigger(F.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(C){E._fallbackToIMSC1(t,y),v.logger.log("Failed to parse VTT cue: "+C),B.trigger(F.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:C})})},a._fallbackToIMSC1=function(t,y){var _=this,E=this.tracks[t.level];E.textCodec||Object(R.parseIMSC1)(y,this.initPTS[t.cc],this.timescale[t.cc],function(){E.textCodec=R.IMSC1_CODEC,_._parseIMSC1(t,y)},function(){E.textCodec="wvtt"})},a._appendCues=function(t,y){var _=this.hls;if(this.config.renderTextTracksNatively){var E=this.textTracks[y];if(E.mode==="disabled")return;t.forEach(function(h){return Object(e.addCueToTrack)(E,h)})}else{var B=this.tracks[y],C=B.default?"default":"subtitles"+y;_.trigger(F.Events.CUES_PARSED,{type:"subtitles",cues:t,track:C})}},a.onFragDecrypted=function(t,y){var _=y.frag;if(_.type===g.PlaylistLevelType.SUBTITLE){if(!Object(V.isFiniteNumber)(this.initPTS[_.cc])){this.unparsedVttFrags.push(y);return}this.onFragLoaded(F.Events.FRAG_LOADED,y)}},a.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},a.onFragParsingUserdata=function(t,y){var _=this.cea608Parser1,E=this.cea608Parser2;if(!this.enabled||!(_&&E))return;for(var B=0;B<y.samples.length;B++){var C=y.samples[B].bytes;if(C){var h=this.extractCea608Data(C);_.addData(y.samples[B].pts,h[0]),E.addData(y.samples[B].pts,h[1])}}},a.onBufferFlushing=function(t,y){var _=y.startOffset,E=y.endOffset,B=y.endOffsetSubtitles,C=y.type,h=this.media;if(!h||h.currentTime<E)return;if(!C||C==="video"){var n=this.captionsTracks;Object.keys(n).forEach(function(d){return Object(e.removeCuesInRange)(n[d],_,E)})}if(this.config.renderTextTracksNatively&&(_===0&&B!==void 0)){var l=this.textTracks;Object.keys(l).forEach(function(d){return Object(e.removeCuesInRange)(l[d],_,B)})}},a.extractCea608Data=function(t){for(var y=t[0]&31,_=2,E=[[],[]],B=0;B<y;B++){var C=t[_++],h=127&t[_++],n=127&t[_++],l=(4&C)!==0,d=3&C;if(h===0&&n===0)continue;l&&((d===0||d===1)&&(E[d].push(h),E[d].push(n)))}return E},o}();function s(o,a){return o&&o.label===a.name&&!(o.textTrack1||o.textTrack2)}function i(o,a,r,t){return Math.min(a,t)-Math.max(o,r)}function A(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return V});var V=function(){function F(X,M){this.subtle=void 0,this.aesIV=void 0,this.subtle=X,this.aesIV=M}var O=F.prototype;return O.decrypt=function(M,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,M)},F}()},"./src/crypt/aes-decryptor.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"removePadding",function(){return F}),D.d(G,"default",function(){return O});var V=D("./src/utils/typed-array.ts");function F(X){var M=X.byteLength,e=M&&new DataView(X.buffer).getUint8(M-1);return e?Object(V.sliceUint8)(X,0,M-e):X}var O=function(){function X(){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 M=X.prototype;return M.uint8ArrayToUint32Array_=function(R){for(var g=new DataView(R),v=new Uint32Array(4),u=0;u<4;u++)v[u]=g.getUint32(u*4);return v},M.initTable=function(){var R=this.sBox,g=this.invSBox,v=this.subMix,u=v[0],s=v[1],i=v[2],A=v[3],o=this.invSubMix,a=o[0],r=o[1],t=o[2],y=o[3],_=new Uint32Array(256),E=0,B=0,C=0;for(C=0;C<256;C++)C<128?_[C]=C<<1:_[C]=C<<1^283;for(C=0;C<256;C++){var h=B^B<<1^B<<2^B<<3^B<<4;h=h>>>8^h&255^99,R[E]=h,g[h]=E;var n=_[E],l=_[n],d=_[l],b=_[h]*257^h*16843008;u[E]=b<<24|b>>>8,s[E]=b<<16|b>>>16,i[E]=b<<8|b>>>24,A[E]=b,b=d*16843009^l*65537^n*257^E*16843008,a[h]=b<<24|b>>>8,r[h]=b<<16|b>>>16,t[h]=b<<8|b>>>24,y[h]=b,E?(E=n^_[_[_[d^n]]],B^=_[_[B]]):E=B=1}},M.expandKey=function(R){for(var g=this.uint8ArrayToUint32Array_(R),v=!0,u=0;u<g.length&&v;)v=g[u]===this.key[u],u++;if(v)return;this.key=g;var s=this.keySize=g.length;if(s!==4&&s!==6&&s!==8)throw new Error("Invalid aes key size="+s);var i=this.ksRows=(s+6+1)*4,A,o,a=this.keySchedule=new Uint32Array(i),r=this.invKeySchedule=new Uint32Array(i),t=this.sBox,y=this.rcon,_=this.invSubMix,E=_[0],B=_[1],C=_[2],h=_[3],n,l;for(A=0;A<i;A++){if(A<s){n=a[A]=g[A];continue}l=n,A%s===0?(l=l<<8|l>>>24,l=t[l>>>24]<<24|t[l>>>16&255]<<16|t[l>>>8&255]<<8|t[l&255],l^=y[A/s|0]<<24):s>6&&A%s===4&&(l=t[l>>>24]<<24|t[l>>>16&255]<<16|t[l>>>8&255]<<8|t[l&255]),a[A]=n=(a[A-s]^l)>>>0}for(o=0;o<i;o++)A=i-o,o&3?l=a[A]:l=a[A-4],o<4||A<=4?r[o]=l:r[o]=E[t[l>>>24]]^B[t[l>>>16&255]]^C[t[l>>>8&255]]^h[t[l&255]],r[o]=r[o]>>>0},M.networkToHostOrderSwap=function(R){return R<<24|(R&65280)<<8|(R&16711680)>>8|R>>>24},M.decrypt=function(R,g,v){for(var u=this.keySize+6,s=this.invKeySchedule,i=this.invSBox,A=this.invSubMix,o=A[0],a=A[1],r=A[2],t=A[3],y=this.uint8ArrayToUint32Array_(v),_=y[0],E=y[1],B=y[2],C=y[3],h=new Int32Array(R),n=new Int32Array(h.length),l,d,b,m,c,L,N,T,P,W,U,Y,re,me,ge=this.networkToHostOrderSwap;g<h.length;){for(P=ge(h[g]),W=ge(h[g+1]),U=ge(h[g+2]),Y=ge(h[g+3]),c=P^s[0],L=Y^s[1],N=U^s[2],T=W^s[3],re=4,me=1;me<u;me++)l=o[c>>>24]^a[L>>16&255]^r[N>>8&255]^t[T&255]^s[re],d=o[L>>>24]^a[N>>16&255]^r[T>>8&255]^t[c&255]^s[re+1],b=o[N>>>24]^a[T>>16&255]^r[c>>8&255]^t[L&255]^s[re+2],m=o[T>>>24]^a[c>>16&255]^r[L>>8&255]^t[N&255]^s[re+3],c=l,L=d,N=b,T=m,re=re+4;l=i[c>>>24]<<24^i[L>>16&255]<<16^i[N>>8&255]<<8^i[T&255]^s[re],d=i[L>>>24]<<24^i[N>>16&255]<<16^i[T>>8&255]<<8^i[c&255]^s[re+1],b=i[N>>>24]<<24^i[T>>16&255]<<16^i[c>>8&255]<<8^i[L&255]^s[re+2],m=i[T>>>24]<<24^i[c>>16&255]<<16^i[L>>8&255]<<8^i[N&255]^s[re+3],n[g]=ge(l^_),n[g+1]=ge(m^E),n[g+2]=ge(b^B),n[g+3]=ge(d^C),_=P,E=W,B=U,C=Y,g=g+4}return n.buffer},X}()},"./src/crypt/decrypter.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return g});var V=D("./src/crypt/aes-crypto.ts"),F=D("./src/crypt/fast-aes-key.ts"),O=D("./src/crypt/aes-decryptor.ts"),X=D("./src/utils/logger.ts"),M=D("./src/utils/mp4-tools.ts"),e=D("./src/utils/typed-array.ts"),R=16,g=function(){function v(s,i,A){var o=A===void 0?{}:A,a=o.removePKCS7Padding,r=a===void 0?!0:a;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=s,this.config=i,this.removePKCS7Padding=r,r)try{var t=self.crypto;t&&(this.subtle=t.subtle||t.webkitSubtle)}catch(y){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var u=v.prototype;return u.destroy=function(){this.observer=null},u.isSync=function(){return this.config.enableSoftwareAES},u.flush=function(){var i=this.currentResult;if(!i){this.reset();return}var A=new Uint8Array(i);return this.reset(),this.removePKCS7Padding?Object(O.removePadding)(A):A},u.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},u.decrypt=function(i,A,o,a){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(i),A,o);var r=this.flush();r&&a(r.buffer)}else this.webCryptoDecrypt(new Uint8Array(i),A,o).then(a)},u.softwareDecrypt=function(i,A,o){var a=this.currentIV,r=this.currentResult,t=this.remainderData;this.logOnce("JS AES decrypt"),t&&(i=Object(M.appendUint8Array)(t,i),this.remainderData=null);var y=this.getValidChunk(i);if(!y.length)return null;a&&(o=a);var _=this.softwareDecrypter;_||(_=this.softwareDecrypter=new O.default),_.expandKey(A);var E=r;return this.currentResult=_.decrypt(y.buffer,0,o),this.currentIV=Object(e.sliceUint8)(y,-16).buffer,E||null},u.webCryptoDecrypt=function(i,A,o){var a=this,r=this.subtle;return(this.key!==A||!this.fastAesKey)&&(this.key=A,this.fastAesKey=new F.default(r,A)),this.fastAesKey.expandKey().then(function(t){if(!r)return Promise.reject(new Error("web crypto not initialized"));var y=new V.default(r,o);return y.decrypt(i.buffer,t)}).catch(function(t){return a.onWebCryptoError(t,i,A,o)})},u.onWebCryptoError=function(i,A,o,a){return X.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",i),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(A,o,a)},u.getValidChunk=function(i){var A=i,o=i.length-i.length%R;return o!==i.length&&(A=Object(e.sliceUint8)(i,0,o),this.remainderData=Object(e.sliceUint8)(i,o)),A},u.logOnce=function(i){if(!this.logEnabled)return;X.logger.log("[decrypter.ts]: "+i),this.logEnabled=!1},v}()},"./src/crypt/fast-aes-key.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return V});var V=function(){function F(X,M){this.subtle=void 0,this.key=void 0,this.subtle=X,this.key=M}var O=F.prototype;return O.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},F}()},"./src/demux/aacdemuxer.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/demux/base-audio-demuxer.ts"),F=D("./src/demux/adts.ts"),O=D("./src/utils/logger.ts"),X=D("./src/demux/id3.ts");function M(g,v){g.prototype=Object.create(v.prototype),g.prototype.constructor=g,e(g,v)}function e(g,v){return e=Object.setPrototypeOf||function(s,i){return s.__proto__=i,s},e(g,v)}var R=function(g){M(v,g);function v(s,i){var A;return A=g.call(this)||this,A.observer=void 0,A.config=void 0,A.observer=s,A.config=i,A}var u=v.prototype;return u.resetInitSegment=function(i,A,o){g.prototype.resetInitSegment.call(this,i,A,o),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:i,duration:o,inputTimeScale:9e4,dropped:0}},v.probe=function(i){if(!i)return!1;for(var A=X.getID3Data(i,0)||[],o=A.length,a=i.length;o<a;o++)if(F.probe(i,o))return O.logger.log("ADTS sync word found !"),!0;return!1},u.canParse=function(i,A){return F.canParse(i,A)},u.appendFrame=function(i,A,o){F.initTrackConfig(i,this.observer,A,o,i.manifestCodec);var a=F.appendFrame(i,A,o,this.initPTS,this.frameIndex);if(a&&a.missing===0)return a},v}(V.default);R.minProbeByteLength=9,G.default=R},"./src/demux/adts.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"getAudioConfig",function(){return X}),D.d(G,"isHeaderPattern",function(){return M}),D.d(G,"getHeaderLength",function(){return e}),D.d(G,"getFullFrameLength",function(){return R}),D.d(G,"canGetFrameLength",function(){return g}),D.d(G,"isHeader",function(){return v}),D.d(G,"canParse",function(){return u}),D.d(G,"probe",function(){return s}),D.d(G,"initTrackConfig",function(){return i}),D.d(G,"getFrameDuration",function(){return A}),D.d(G,"parseFrameHeader",function(){return o}),D.d(G,"appendFrame",function(){return a});var V=D("./src/utils/logger.ts"),F=D("./src/errors.ts"),O=D("./src/events.ts");function X(r,t,y,_){var E,B,C,h,n=navigator.userAgent.toLowerCase(),l=_,d=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];E=((t[y+2]&192)>>>6)+1;var b=(t[y+2]&60)>>>2;if(b>d.length-1){r.trigger(O.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+b});return}return C=(t[y+2]&1)<<2,C|=(t[y+3]&192)>>>6,V.logger.log("manifest codec:"+_+", ADTS type:"+E+", samplingIndex:"+b),/firefox/i.test(n)?b>=6?(E=5,h=new Array(4),B=b-3):(E=2,h=new Array(2),B=b):n.indexOf("android")!==-1?(E=2,h=new Array(2),B=b):(E=5,h=new Array(4),_&&(_.indexOf("mp4a.40.29")!==-1||_.indexOf("mp4a.40.5")!==-1)||!_&&b>=6?B=b-3:((_&&_.indexOf("mp4a.40.2")!==-1&&(b>=6&&C===1||/vivaldi/i.test(n))||!_&&C===1)&&(E=2,h=new Array(2)),B=b)),h[0]=E<<3,h[0]|=(b&14)>>1,h[1]|=(b&1)<<7,h[1]|=C<<3,E===5&&(h[1]|=(B&14)>>1,h[2]=(B&1)<<7,h[2]|=2<<2,h[3]=0),{config:h,samplerate:d[b],channelCount:C,codec:"mp4a.40."+E,manifestCodec:l}}function M(r,t){return r[t]===255&&(r[t+1]&246)===240}function e(r,t){return r[t+1]&1?7:9}function R(r,t){return(r[t+3]&3)<<11|r[t+4]<<3|(r[t+5]&224)>>>5}function g(r,t){return t+5<r.length}function v(r,t){return t+1<r.length&&M(r,t)}function u(r,t){return g(r,t)&&M(r,t)&&R(r,t)<=r.length-t}function s(r,t){if(v(r,t)){var y=e(r,t);if(t+y>=r.length)return!1;var _=R(r,t);if(_<=y)return!1;var E=t+_;return E===r.length||v(r,E)}return!1}function i(r,t,y,_,E){if(!r.samplerate){var B=X(t,y,_,E);if(!B)return;r.config=B.config,r.samplerate=B.samplerate,r.channelCount=B.channelCount,r.codec=B.codec,r.manifestCodec=B.manifestCodec,V.logger.log("parsed codec:"+r.codec+", rate:"+B.samplerate+", channels:"+B.channelCount)}}function A(r){return 1024*9e4/r}function o(r,t,y,_,E){var B=e(r,t),C=R(r,t);if(C-=B,C>0){var h=y+_*E;return{headerLength:B,frameLength:C,stamp:h}}}function a(r,t,y,_,E){var B=A(r.samplerate),C=o(t,y,_,E,B);if(C){var h=C.frameLength,n=C.headerLength,l=C.stamp,d=n+h,b=Math.max(0,y+d-t.length),m;b?(m=new Uint8Array(d-n),m.set(t.subarray(y+n,t.length),0)):m=t.subarray(y+n,y+d);var c={unit:m,pts:l};return b||r.samples.push(c),{sample:c,length:d,missing:b}}}},"./src/demux/base-audio-demuxer.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"initPTSFn",function(){return R});var V=D("./src/polyfills/number.ts"),F=D("./src/demux/id3.ts"),O=D("./src/demux/dummy-demuxed-track.ts"),X=D("./src/utils/mp4-tools.ts"),M=D("./src/utils/typed-array.ts"),e=function(){function g(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var v=g.prototype;return v.resetInitSegment=function(s,i,A){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},v.resetTimeStamp=function(){},v.resetContiguity=function(){},v.canParse=function(s,i){return!1},v.appendFrame=function(s,i,A){},v.demux=function(s,i){this.cachedData&&(s=Object(X.appendUint8Array)(this.cachedData,s),this.cachedData=null);var A=F.getID3Data(s,0),o=A?A.length:0,a,r,t=this._audioTrack,y=this._id3Track,_=A?F.getTimeStamp(A):void 0,E=s.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=R(_,i)),A&&A.length>0&&y.samples.push({pts:this.initPTS,dts:this.initPTS,data:A}),r=this.initPTS;o<E;){if(this.canParse(s,o)){var B=this.appendFrame(t,s,o);B?(this.frameIndex++,r=B.sample.pts,o+=B.length,a=o):o=E}else F.canParse(s,o)?(A=F.getID3Data(s,o),y.samples.push({pts:r,dts:r,data:A}),o+=A.length,a=o):o++;if(o===E&&a!==E){var C=Object(M.sliceUint8)(s,a);this.cachedData?this.cachedData=Object(X.appendUint8Array)(this.cachedData,C):this.cachedData=C}}return{audioTrack:t,avcTrack:Object(O.dummyTrack)(),id3Track:y,textTrack:Object(O.dummyTrack)()}},v.demuxSampleAes=function(s,i,A){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},v.flush=function(s){var i=this.cachedData;return i&&(this.cachedData=null,this.demux(i,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(O.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(O.dummyTrack)()}},v.destroy=function(){},g}(),R=function(v,u){return Object(V.isFiniteNumber)(v)?v*90:u*9e4};G.default=e},"./src/demux/chunk-cache.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return V});var V=function(){function O(){this.chunks=[],this.dataLength=0}var X=O.prototype;return X.push=function(e){this.chunks.push(e),this.dataLength+=e.length},X.flush=function(){var e=this.chunks,R=this.dataLength,g;if(e.length)e.length===1?g=e[0]:g=F(e,R);else return new Uint8Array(0);return this.reset(),g},X.reset=function(){this.chunks.length=0,this.dataLength=0},O}();function F(O,X){for(var M=new Uint8Array(X),e=0,R=0;R<O.length;R++){var g=O[R];M.set(g,e),e+=g.length}return M}},"./src/demux/dummy-demuxed-track.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"dummyTrack",function(){return V});function V(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/utils/logger.ts"),F=function(){function O(M){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=M,this.bytesAvailable=M.byteLength,this.word=0,this.bitsAvailable=0}var X=O.prototype;return X.loadWord=function(){var e=this.data,R=this.bytesAvailable,g=e.byteLength-R,v=new Uint8Array(4),u=Math.min(4,R);if(u===0)throw new Error("no bytes available");v.set(e.subarray(g,g+u)),this.word=new DataView(v.buffer).getUint32(0),this.bitsAvailable=u*8,this.bytesAvailable-=u},X.skipBits=function(e){var R;this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,R=e>>3,e-=R>>3,this.bytesAvailable-=R,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},X.readBits=function(e){var R=Math.min(this.bitsAvailable,e),g=this.word>>>32-R;return e>32&&V.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=R,this.bitsAvailable>0?this.word<<=R:this.bytesAvailable>0&&this.loadWord(),R=e-R,R>0&&this.bitsAvailable?g<<R|this.readBits(R):g},X.skipLZ=function(){var e;for(e=0;e<this.bitsAvailable;++e)if((this.word&2147483648>>>e)!==0)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},X.skipUEG=function(){this.skipBits(1+this.skipLZ())},X.skipEG=function(){this.skipBits(1+this.skipLZ())},X.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},X.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},X.readBoolean=function(){return this.readBits(1)===1},X.readUByte=function(){return this.readBits(8)},X.readUShort=function(){return this.readBits(16)},X.readUInt=function(){return this.readBits(32)},X.skipScalingList=function(e){for(var R=8,g=8,v,u=0;u<e;u++)g!==0&&(v=this.readEG(),g=(R+v+256)%256),R=g===0?R:g},X.readSPS=function(){var e=0,R=0,g=0,v=0,u,s,i,A=this.readUByte.bind(this),o=this.readBits.bind(this),a=this.readUEG.bind(this),r=this.readBoolean.bind(this),t=this.skipBits.bind(this),y=this.skipEG.bind(this),_=this.skipUEG.bind(this),E=this.skipScalingList.bind(this);A();var B=A();if(o(5),t(3),A(),_(),B===100||B===110||B===122||B===244||B===44||B===83||B===86||B===118||B===128){var C=a();if(C===3&&t(1),_(),_(),t(1),r())for(s=C!==3?8:12,i=0;i<s;i++)r()&&(i<6?E(16):E(64))}_();var h=a();if(h===0)a();else if(h===1)for(t(1),y(),y(),u=a(),i=0;i<u;i++)y();_(),t(1);var n=a(),l=a(),d=o(1);d===0&&t(1),t(1),r()&&(e=a(),R=a(),g=a(),v=a());var b=[1,1];if(r()&&r()){var m=A();switch(m){case 1:b=[1,1];break;case 2:b=[12,11];break;case 3:b=[10,11];break;case 4:b=[16,11];break;case 5:b=[40,33];break;case 6:b=[24,11];break;case 7:b=[20,11];break;case 8:b=[32,11];break;case 9:b=[80,33];break;case 10:b=[18,11];break;case 11:b=[15,11];break;case 12:b=[64,33];break;case 13:b=[160,99];break;case 14:b=[4,3];break;case 15:b=[3,2];break;case 16:b=[2,1];break;case 255:{b=[A()<<8|A(),A()<<8|A()];break}}}return{width:Math.ceil((n+1)*16-e*2-R*2),height:(2-d)*(l+1)*16-(d?2:4)*(g+v),pixelRatio:b}},X.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},O}();G.default=F},"./src/demux/id3.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"isHeader",function(){return V}),D.d(G,"isFooter",function(){return F}),D.d(G,"getID3Data",function(){return O}),D.d(G,"canParse",function(){return M}),D.d(G,"getTimeStamp",function(){return e}),D.d(G,"isTimeStampFrame",function(){return R}),D.d(G,"getID3Frames",function(){return v}),D.d(G,"decodeFrame",function(){return u}),D.d(G,"utf8ArrayToStr",function(){return a}),D.d(G,"testables",function(){return r});var V=function(E,B){return B+10<=E.length&&(E[B]===73&&E[B+1]===68&&E[B+2]===51&&(E[B+3]<255&&E[B+4]<255&&(E[B+6]<128&&E[B+7]<128&&E[B+8]<128&&E[B+9]<128)))},F=function(E,B){return B+10<=E.length&&(E[B]===51&&E[B+1]===68&&E[B+2]===73&&(E[B+3]<255&&E[B+4]<255&&(E[B+6]<128&&E[B+7]<128&&E[B+8]<128&&E[B+9]<128)))},O=function(E,B){for(var C=B,h=0;V(E,B);){h+=10;var n=X(E,B+6);h+=n,F(E,B+10)&&(h+=10),B+=h}return h>0?E.subarray(C,C+h):void 0},X=function(E,B){var C=0;return C=(E[B]&127)<<21,C|=(E[B+1]&127)<<14,C|=(E[B+2]&127)<<7,C|=E[B+3]&127,C},M=function(E,B){return V(E,B)&&X(E,B+6)+10<=E.length-B},e=function(E){for(var B=v(E),C=0;C<B.length;C++){var h=B[C];if(R(h))return o(h)}return},R=function(E){return E&&E.key==="PRIV"&&E.info==="com.apple.streaming.transportStreamTimestamp"},g=function(E){var B=String.fromCharCode(E[0],E[1],E[2],E[3]),C=X(E,4),h=10;return{type:B,size:C,data:E.subarray(h,h+C)}},v=function(E){for(var B=0,C=[];V(E,B);){var h=X(E,B+6);B+=10;for(var n=B+h;B+8<n;){var l=g(E.subarray(B)),d=u(l);d&&C.push(d),B+=l.size+10}F(E,B)&&(B+=10)}return C},u=function(E){return E.type==="PRIV"?s(E):E.type[0]==="W"?A(E):i(E)},s=function(E){if(E.size<2)return;var B=a(E.data,!0),C=new Uint8Array(E.data.subarray(B.length+1));return{key:E.type,info:B,data:C.buffer}},i=function(E){if(E.size<2)return;if(E.type==="TXXX"){var B=1,C=a(E.data.subarray(B),!0);B+=C.length+1;var h=a(E.data.subarray(B));return{key:E.type,info:C,data:h}}var n=a(E.data.subarray(1));return{key:E.type,data:n}},A=function(E){if(E.type==="WXXX"){if(E.size<2)return;var B=1,C=a(E.data.subarray(B),!0);B+=C.length+1;var h=a(E.data.subarray(B));return{key:E.type,info:C,data:h}}var n=a(E.data);return{key:E.type,data:n}},o=function(E){if(E.data.byteLength===8){var B=new Uint8Array(E.data),C=B[3]&1,h=(B[4]<<23)+(B[5]<<15)+(B[6]<<7)+B[7];return h/=45,C&&(h+=4772185884e-2),Math.round(h)}return},a=function(E,B){B===void 0&&(B=!1);var C=y();if(C){var h=C.decode(E);if(B){var n=h.indexOf("\0");return n!==-1?h.substring(0,n):h}return h.replace(/\0/g,"")}for(var l=E.length,d,b,m,c="",L=0;L<l;){if(d=E[L++],d===0&&B)return c;if(d===0||d===3)continue;switch(d>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c+=String.fromCharCode(d);break;case 12:case 13:b=E[L++],c+=String.fromCharCode((d&31)<<6|b&63);break;case 14:b=E[L++],m=E[L++],c+=String.fromCharCode((d&15)<<12|(b&63)<<6|(m&63)<<0);break;default:}}return c},r={decodeTextFrame:i},t;function y(){return!t&&typeof self.TextDecoder!="undefined"&&(t=new self.TextDecoder("utf-8")),t}},"./src/demux/mp3demuxer.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/demux/base-audio-demuxer.ts"),F=D("./src/demux/id3.ts"),O=D("./src/utils/logger.ts"),X=D("./src/demux/mpegaudio.ts");function M(g,v){g.prototype=Object.create(v.prototype),g.prototype.constructor=g,e(g,v)}function e(g,v){return e=Object.setPrototypeOf||function(s,i){return s.__proto__=i,s},e(g,v)}var R=function(g){M(v,g);function v(){return g.apply(this,arguments)||this}var u=v.prototype;return u.resetInitSegment=function(i,A,o){g.prototype.resetInitSegment.call(this,i,A,o),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:i,duration:o,inputTimeScale:9e4,dropped:0}},v.probe=function(i){if(!i)return!1;for(var A=F.getID3Data(i,0)||[],o=A.length,a=i.length;o<a;o++)if(X.probe(i,o))return O.logger.log("MPEG Audio sync word found !"),!0;return!1},u.canParse=function(i,A){return X.canParse(i,A)},u.appendFrame=function(i,A,o){return this.initPTS===null?void 0:X.appendFrame(i,A,o,this.initPTS,this.frameIndex)},v}(V.default);R.minProbeByteLength=4,G.default=R},"./src/demux/mp4demuxer.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/utils/mp4-tools.ts"),F=D("./src/demux/dummy-demuxed-track.ts"),O=function(){function X(e,R){this.remainderData=null,this.config=void 0,this.config=R}var M=X.prototype;return M.resetTimeStamp=function(){},M.resetInitSegment=function(){},M.resetContiguity=function(){},X.probe=function(R){return Object(V.findBox)({data:R,start:0,end:Math.min(R.length,16384)},["moof"]).length>0},M.demux=function(R){var g=R,v=Object(F.dummyTrack)();if(this.config.progressive){this.remainderData&&(g=Object(V.appendUint8Array)(this.remainderData,R));var u=Object(V.segmentValidRange)(g);this.remainderData=u.remainder,v.samples=u.valid||new Uint8Array}else v.samples=g;return{audioTrack:Object(F.dummyTrack)(),avcTrack:v,id3Track:Object(F.dummyTrack)(),textTrack:Object(F.dummyTrack)()}},M.flush=function(){var R=Object(F.dummyTrack)();return R.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(F.dummyTrack)(),avcTrack:R,id3Track:Object(F.dummyTrack)(),textTrack:Object(F.dummyTrack)()}},M.demuxSampleAes=function(R,g,v){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},M.destroy=function(){},X}();O.minProbeByteLength=1024,G.default=O},"./src/demux/mpegaudio.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"appendFrame",function(){return e}),D.d(G,"parseHeader",function(){return R}),D.d(G,"isHeaderPattern",function(){return g}),D.d(G,"isHeader",function(){return v}),D.d(G,"canParse",function(){return u}),D.d(G,"probe",function(){return s});var V=null,F=[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],O=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],X=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],M=[0,1,1,4];function e(i,A,o,a,r){if(o+24>A.length)return;var t=R(A,o);if(t&&o+t.frameLength<=A.length){var y=t.samplesPerFrame*9e4/t.sampleRate,_=a+r*y,E={unit:A.subarray(o,o+t.frameLength),pts:_,dts:_};return i.config=[],i.channelCount=t.channelCount,i.samplerate=t.sampleRate,i.samples.push(E),{sample:E,length:t.frameLength,missing:0}}}function R(i,A){var o=i[A+1]>>3&3,a=i[A+1]>>1&3,r=i[A+2]>>4&15,t=i[A+2]>>2&3;if(o!==1&&r!==0&&r!==15&&t!==3){var y=i[A+2]>>1&1,_=i[A+3]>>6,E=o===3?3-a:a===3?3:4,B=F[E*14+r-1]*1e3,C=o===3?0:o===2?1:2,h=O[C*3+t],n=_===3?1:2,l=X[o][a],d=M[a],b=l*8*d,m=Math.floor(l*B/h+y)*d;if(V===null){var c=navigator.userAgent||"",L=c.match(/Chrome\/(\d+)/i);V=L?parseInt(L[1]):0}var N=!!V&&V<=87;return N&&a===2&&B>=224e3&&_===0&&(i[A+3]=i[A+3]|128),{sampleRate:h,channelCount:n,frameLength:m,samplesPerFrame:b}}}function g(i,A){return i[A]===255&&(i[A+1]&224)===224&&(i[A+1]&6)!==0}function v(i,A){return A+1<i.length&&g(i,A)}function u(i,A){var o=4;return g(i,A)&&o<=i.length-A}function s(i,A){if(A+1<i.length&&g(i,A)){var o=4,a=R(i,A),r=o;a!=null&&a.frameLength&&(r=a.frameLength);var t=A+r;return t===i.length||v(i,t)}return!1}},"./src/demux/sample-aes.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/crypt/decrypter.ts"),F=D("./src/demux/tsdemuxer.ts"),O=function(){function X(e,R,g){this.keyData=void 0,this.decrypter=void 0,this.keyData=g,this.decrypter=new V.default(e,R,{removePKCS7Padding:!1})}var M=X.prototype;return M.decryptBuffer=function(R,g){this.decrypter.decrypt(R,this.keyData.key.buffer,this.keyData.iv.buffer,g)},M.decryptAacSample=function(R,g,v,u){var s=R[g].unit,i=s.subarray(16,s.length-s.length%16),A=i.buffer.slice(i.byteOffset,i.byteOffset+i.length),o=this;this.decryptBuffer(A,function(a){var r=new Uint8Array(a);s.set(r,16),u||o.decryptAacSamples(R,g+1,v)})},M.decryptAacSamples=function(R,g,v){for(;;g++){if(g>=R.length){v();return}if(R[g].unit.length<32)continue;var u=this.decrypter.isSync();if(this.decryptAacSample(R,g,v,u),!u)return}},M.getAvcEncryptedData=function(R){for(var g=Math.floor((R.length-48)/160)*16+16,v=new Int8Array(g),u=0,s=32;s<=R.length-16;s+=160,u+=16)v.set(R.subarray(s,s+16),u);return v},M.getAvcDecryptedUnit=function(R,g){for(var v=new Uint8Array(g),u=0,s=32;s<=R.length-16;s+=160,u+=16)R.set(v.subarray(u,u+16),s);return R},M.decryptAvcSample=function(R,g,v,u,s,i){var A=Object(F.discardEPB)(s.data),o=this.getAvcEncryptedData(A),a=this;this.decryptBuffer(o.buffer,function(r){s.data=a.getAvcDecryptedUnit(A,r),i||a.decryptAvcSamples(R,g,v+1,u)})},M.decryptAvcSamples=function(R,g,v,u){if(R instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;g++,v=0){if(g>=R.length){u();return}for(var s=R[g].units;!(v>=s.length);v++){var i=s[v];if(i.data.length<=48||i.type!==1&&i.type!==5)continue;var A=this.decrypter.isSync();if(this.decryptAvcSample(R,g,v,u,i,A),!A)return}}},X}();G.default=O},"./src/demux/transmuxer-interface.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return s});var V=D("./node_modules/webworkify-webpack/index.js"),F=D.n(V),O=D("./src/events.ts"),X=D("./src/demux/transmuxer.ts"),M=D("./src/utils/logger.ts"),e=D("./src/errors.ts"),R=D("./src/utils/mediasource-helper.ts"),g=D("./node_modules/eventemitter3/index.js"),v=D.n(g),u=Object(R.getMediaSource)()||{isTypeSupported:function(){return!1}},s=function(){function i(o,a,r,t){var y=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=o,this.id=a,this.onTransmuxComplete=r,this.onFlush=t;var _=o.config,E=function(l,d){d=d||{},d.frag=y.frag,d.id=y.id,o.trigger(l,d)};this.observer=new g.EventEmitter,this.observer.on(O.Events.FRAG_DECRYPTED,E),this.observer.on(O.Events.ERROR,E);var B={mp4:u.isTypeSupported("video/mp4"),mpeg:u.isTypeSupported("audio/mpeg"),mp3:u.isTypeSupported('audio/mp4; codecs="mp3"')},C=navigator.vendor;if(_.enableWorker&&typeof Worker!="undefined"){M.logger.log("demuxing in webworker");var h;try{h=this.worker=V("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),h.addEventListener("message",this.onwmsg),h.onerror=function(n){o.trigger(O.Events.ERROR,{type:e.ErrorTypes.OTHER_ERROR,details:e.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(n.message+" ("+n.filename+":"+n.lineno+")")})},h.postMessage({cmd:"init",typeSupported:B,vendor:C,id:a,config:JSON.stringify(_)})}catch(n){M.logger.warn("Error in worker:",n),M.logger.error("Error while initializing DemuxerWorker, fallback to inline"),h&&self.URL.revokeObjectURL(h.objectURL),this.transmuxer=new X.default(this.observer,B,_,C,a),this.worker=null}}else this.transmuxer=new X.default(this.observer,B,_,C,a)}var A=i.prototype;return A.destroy=function(){var a=this.worker;if(a)a.removeEventListener("message",this.onwmsg),a.terminate(),this.worker=null;else{var r=this.transmuxer;r&&(r.destroy(),this.transmuxer=null)}var t=this.observer;t&&t.removeAllListeners(),this.observer=null},A.push=function(a,r,t,y,_,E,B,C,h,n){var l=this;h.transmuxing.start=self.performance.now();var d=this.transmuxer,b=this.worker,m=E?E.start:_.start,c=_.decryptdata,L=this.frag,N=!(L&&_.cc===L.cc),T=!(L&&h.level===L.level),P=L?h.sn-L.sn:-1,W=this.part?h.part-this.part.index:1,U=!T&&(P===1||P===0&&W===1),Y=self.performance.now();(T||P||_.stats.parsing.start===0)&&(_.stats.parsing.start=Y),E&&(W||!U)&&(E.stats.parsing.start=Y);var re=new X.TransmuxState(N,U,C,T,m);if(!U||N){M.logger.log("[transmuxer-interface, "+_.type+"]: Starting new transmux session for sn: "+h.sn+" p: "+h.part+" level: "+h.level+" id: "+h.id+`
|
|
discontinuity: `+N+`
|
|
trackSwitch: `+T+`
|
|
contiguous: `+U+`
|
|
accurateTimeOffset: `+C+`
|
|
timeOffset: `+m);var me=new X.TransmuxConfig(t,y,r,B,n);this.configureTransmuxer(me)}if(this.frag=_,this.part=E,b)b.postMessage({cmd:"demux",data:a,decryptdata:c,chunkMeta:h,state:re},a instanceof ArrayBuffer?[a]:[]);else if(d){var ge=d.push(a,c,h,re);Object(X.isPromise)(ge)?ge.then(function(Oe){l.handleTransmuxComplete(Oe)}):this.handleTransmuxComplete(ge)}},A.flush=function(a){var r=this;a.transmuxing.start=self.performance.now();var t=this.transmuxer,y=this.worker;if(y)y.postMessage({cmd:"flush",chunkMeta:a});else if(t){var _=t.flush(a);Object(X.isPromise)(_)?_.then(function(E){r.handleFlushResult(E,a)}):this.handleFlushResult(_,a)}},A.handleFlushResult=function(a,r){var t=this;a.forEach(function(y){t.handleTransmuxComplete(y)}),this.onFlush(r)},A.onWorkerMessage=function(a){var r=a.data,t=this.hls;switch(r.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(r.data);break}case"flush":{this.onFlush(r.data);break}default:{r.data=r.data||{},r.data.frag=this.frag,r.data.id=this.id,t.trigger(r.event,r.data);break}}},A.configureTransmuxer=function(a){var r=this.worker,t=this.transmuxer;r?r.postMessage({cmd:"configure",config:a}):t&&t.configure(a)},A.handleTransmuxComplete=function(a){a.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(a)},i}()},"./src/demux/transmuxer-worker.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return e});var V=D("./src/demux/transmuxer.ts"),F=D("./src/events.ts"),O=D("./src/utils/logger.ts"),X=D("./node_modules/eventemitter3/index.js"),M=D.n(X);function e(s){var i=new X.EventEmitter,A=function(a,r){s.postMessage({event:a,data:r})};i.on(F.Events.FRAG_DECRYPTED,A),i.on(F.Events.ERROR,A),s.addEventListener("message",function(o){var a=o.data;switch(a.cmd){case"init":{var r=JSON.parse(a.config);s.transmuxer=new V.default(i,a.typeSupported,r,a.vendor,a.id),Object(O.enableLogs)(r.debug),A("init",null);break}case"configure":{s.transmuxer.configure(a.config);break}case"demux":{var t=s.transmuxer.push(a.data,a.decryptdata,a.chunkMeta,a.state);Object(V.isPromise)(t)?t.then(function(E){R(s,E)}):R(s,t);break}case"flush":{var y=a.chunkMeta,_=s.transmuxer.flush(y);Object(V.isPromise)(_)?_.then(function(E){v(s,E,y)}):v(s,_,y);break}default:break}})}function R(s,i){if(u(i.remuxResult))return;var A=[],o=i.remuxResult,a=o.audio,r=o.video;a&&g(A,a),r&&g(A,r),s.postMessage({event:"transmuxComplete",data:i},A)}function g(s,i){i.data1&&s.push(i.data1.buffer),i.data2&&s.push(i.data2.buffer)}function v(s,i,A){i.forEach(function(o){R(s,o)}),s.postMessage({event:"flush",data:A})}function u(s){return!s.audio&&!s.video&&!s.text&&!s.id3&&!s.initSegment}},"./src/demux/transmuxer.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return r}),D.d(G,"isPromise",function(){return _}),D.d(G,"TransmuxConfig",function(){return E}),D.d(G,"TransmuxState",function(){return B});var V=D("./src/events.ts"),F=D("./src/errors.ts"),O=D("./src/crypt/decrypter.ts"),X=D("./src/demux/aacdemuxer.ts"),M=D("./src/demux/mp4demuxer.ts"),e=D("./src/demux/tsdemuxer.ts"),R=D("./src/demux/mp3demuxer.ts"),g=D("./src/remux/mp4-remuxer.ts"),v=D("./src/remux/passthrough-remuxer.ts"),u=D("./src/demux/chunk-cache.ts"),s=D("./src/utils/mp4-tools.ts"),i=D("./src/utils/logger.ts"),A;try{A=self.performance.now.bind(self.performance)}catch(C){i.logger.debug("Unable to use Performance API on this environment"),A=self.Date.now}var o=[{demux:e.default,remux:g.default},{demux:M.default,remux:v.default},{demux:X.default,remux:g.default},{demux:R.default,remux:g.default}],a=1024;o.forEach(function(C){var h=C.demux;a=Math.max(a,h.minProbeByteLength)});var r=function(){function C(n,l,d,b,m){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=n,this.typeSupported=l,this.config=d,this.vendor=b,this.id=m}var h=C.prototype;return h.configure=function(l){this.transmuxConfig=l,this.decrypter&&this.decrypter.reset()},h.push=function(l,d,b,m){var c=this,L=b.transmuxing;L.executeStart=A();var N=new Uint8Array(l),T=this.cache,P=this.config,W=this.currentTransmuxState,U=this.transmuxConfig;m&&(this.currentTransmuxState=m);var Y=t(N,d);if(Y&&Y.method==="AES-128"){var re=this.getDecrypter();if(P.enableSoftwareAES){var me=re.softwareDecrypt(N,Y.key.buffer,Y.iv.buffer);if(!me)return L.executeEnd=A(),y(b);N=new Uint8Array(me)}else return this.decryptionPromise=re.webCryptoDecrypt(N,Y.key.buffer,Y.iv.buffer).then(function(J){var k=c.push(J,null,b);return c.decryptionPromise=null,k}),this.decryptionPromise}var ge=m||W,Oe=ge.contiguous,Se=ge.discontinuity,Be=ge.trackSwitch,Ne=ge.accurateTimeOffset,ke=ge.timeOffset,Ce=U.audioCodec,ve=U.videoCodec,Ye=U.defaultInitPts,ht=U.duration,at=U.initSegmentData;if((Se||Be)&&this.resetInitSegment(at,Ce,ve,ht),Se&&this.resetInitialTimestamp(Ye),Oe||this.resetContiguity(),this.needsProbing(N,Se,Be)){if(T.dataLength){var We=T.flush();N=Object(s.appendUint8Array)(We,N)}this.configureTransmuxer(N,U)}var it=this.transmux(N,Y,ke,Ne,b),ne=this.currentTransmuxState;return ne.contiguous=!0,ne.discontinuity=!1,ne.trackSwitch=!1,L.executeEnd=A(),it},h.flush=function(l){var d=this,b=l.transmuxing;b.executeStart=A();var m=this.decrypter,c=this.cache,L=this.currentTransmuxState,N=this.decryptionPromise;if(N)return N.then(function(){return d.flush(l)});var T=[],P=L.timeOffset;if(m){var W=m.flush();W&&T.push(this.push(W,null,l))}var U=c.dataLength;c.reset();var Y=this.demuxer,re=this.remuxer;if(!Y||!re)return U>=a&&this.observer.emit(V.Events.ERROR,V.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),b.executeEnd=A(),[y(l)];var me=Y.flush(P);return _(me)?me.then(function(ge){return d.flushRemux(T,ge,l),T}):(this.flushRemux(T,me,l),T)},h.flushRemux=function(l,d,b){var m=d.audioTrack,c=d.avcTrack,L=d.id3Track,N=d.textTrack,T=this.currentTransmuxState,P=T.accurateTimeOffset,W=T.timeOffset;i.logger.log("[transmuxer.ts]: Flushed fragment "+b.sn+(b.part>-1?" p: "+b.part:"")+" of level "+b.level);var U=this.remuxer.remux(m,c,L,N,W,P,!0,this.id);l.push({remuxResult:U,chunkMeta:b}),b.transmuxing.executeEnd=A()},h.resetInitialTimestamp=function(l){var d=this.demuxer,b=this.remuxer;if(!d||!b)return;d.resetTimeStamp(l),b.resetTimeStamp(l)},h.resetContiguity=function(){var l=this.demuxer,d=this.remuxer;if(!l||!d)return;l.resetContiguity(),d.resetNextTimestamp()},h.resetInitSegment=function(l,d,b,m){var c=this.demuxer,L=this.remuxer;if(!c||!L)return;c.resetInitSegment(d,b,m),L.resetInitSegment(l,d,b)},h.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},h.transmux=function(l,d,b,m,c){var L;return d&&d.method==="SAMPLE-AES"?L=this.transmuxSampleAes(l,d,b,m,c):L=this.transmuxUnencrypted(l,b,m,c),L},h.transmuxUnencrypted=function(l,d,b,m){var c=this.demuxer.demux(l,d,!1,!this.config.progressive),L=c.audioTrack,N=c.avcTrack,T=c.id3Track,P=c.textTrack,W=this.remuxer.remux(L,N,T,P,d,b,!1,this.id);return{remuxResult:W,chunkMeta:m}},h.transmuxSampleAes=function(l,d,b,m,c){var L=this;return this.demuxer.demuxSampleAes(l,d,b).then(function(N){var T=L.remuxer.remux(N.audioTrack,N.avcTrack,N.id3Track,N.textTrack,b,m,!1,L.id);return{remuxResult:T,chunkMeta:c}})},h.configureTransmuxer=function(l,d){for(var b=this.config,m=this.observer,c=this.typeSupported,L=this.vendor,N=d.audioCodec,T=d.defaultInitPts,P=d.duration,W=d.initSegmentData,U=d.videoCodec,Y,re=0,me=o.length;re<me;re++)if(o[re].demux.probe(l)){Y=o[re];break}Y||(i.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),Y={demux:M.default,remux:v.default});var ge=this.demuxer,Oe=this.remuxer,Se=Y.remux,Be=Y.demux;(!Oe||!(Oe instanceof Se))&&(this.remuxer=new Se(m,b,c,L)),(!ge||!(ge instanceof Be))&&(this.demuxer=new Be(m,b,c),this.probe=Be.probe),this.resetInitSegment(W,N,U,P),this.resetInitialTimestamp(T)},h.needsProbing=function(l,d,b){return!this.demuxer||!this.remuxer||d||b},h.getDecrypter=function(){var l=this.decrypter;return l||(l=this.decrypter=new O.default(this.observer,this.config)),l},C}();function t(C,h){var n=null;return C.byteLength>0&&h!=null&&h.key!=null&&h.iv!==null&&h.method!=null&&(n=h),n}var y=function(h){return{remuxResult:{},chunkMeta:h}};function _(C){return"then"in C&&C.then instanceof Function}var E=function(h,n,l,d,b){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=h,this.videoCodec=n,this.initSegmentData=l,this.duration=d,this.defaultInitPts=b},B=function(h,n,l,d,b){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=h,this.contiguous=n,this.accurateTimeOffset=l,this.trackSwitch=d,this.timeOffset=b}},"./src/demux/tsdemuxer.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"discardEPB",function(){return y});var V=D("./src/demux/adts.ts"),F=D("./src/demux/mpegaudio.ts"),O=D("./src/demux/exp-golomb.ts"),X=D("./src/demux/id3.ts"),M=D("./src/demux/sample-aes.ts"),e=D("./src/events.ts"),R=D("./src/utils/mp4-tools.ts"),g=D("./src/utils/logger.ts"),v=D("./src/errors.ts"),u={video:1,audio:2,id3:3,text:4},s=function(){function _(B,C,h){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=B,this.config=C,this.typeSupported=h}_.probe=function(C){var h=_.syncOffset(C);return h<0?!1:(h&&g.logger.warn("MPEG2-TS detected but first sync word found @ offset "+h+", junk ahead ?"),!0)},_.syncOffset=function(C){for(var h=Math.min(1e3,C.length-3*188),n=0;n<h;){if(C[n]===71&&C[n+188]===71&&C[n+2*188]===71)return n;n++}return-1},_.createTrack=function(C,h){return{container:C==="video"||C==="audio"?"video/mp2t":void 0,type:C,id:u[C],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:C==="audio"?h:void 0}};var E=_.prototype;return E.resetInitSegment=function(C,h,n){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=_.createTrack("video",n),this._audioTrack=_.createTrack("audio",n),this._id3Track=_.createTrack("id3",n),this._txtTrack=_.createTrack("text",n),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=C,this.videoCodec=h,this._duration=n},E.resetTimeStamp=function(){},E.resetContiguity=function(){var C=this._audioTrack,h=this._avcTrack,n=this._id3Track;C&&(C.pesData=null),h&&(h.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},E.demux=function(C,h,n,l){n===void 0&&(n=!1),l===void 0&&(l=!1),n||(this.sampleAes=null);var d,b=this._avcTrack,m=this._audioTrack,c=this._id3Track,L=b.pid,N=b.pesData,T=m.pid,P=c.pid,W=m.pesData,U=c.pesData,Y=!1,re=this.pmtParsed,me=this._pmtId,ge=C.length;if(this.remainderData&&(C=Object(R.appendUint8Array)(this.remainderData,C),ge=C.length,this.remainderData=null),ge<188&&!l)return this.remainderData=C,{audioTrack:m,avcTrack:b,id3Track:c,textTrack:this._txtTrack};var Oe=Math.max(0,_.syncOffset(C));ge-=(ge+Oe)%188,ge<C.byteLength&&!l&&(this.remainderData=new Uint8Array(C.buffer,ge,C.buffer.byteLength-ge));for(var Se=Oe;Se<ge;Se+=188)if(C[Se]===71){var Be=!!(C[Se+1]&64),Ne=((C[Se+1]&31)<<8)+C[Se+2],ke=(C[Se+3]&48)>>4,Ce=void 0;if(ke>1){if(Ce=Se+5+C[Se+4],Ce===Se+188)continue}else Ce=Se+4;switch(Ne){case L:Be&&(N&&(d=a(N))&&this.parseAVCPES(d,!1),N={data:[],size:0}),N&&(N.data.push(C.subarray(Ce,Se+188)),N.size+=Se+188-Ce);break;case T:Be&&(W&&(d=a(W))&&(m.isAAC?this.parseAACPES(d):this.parseMPEGPES(d)),W={data:[],size:0}),W&&(W.data.push(C.subarray(Ce,Se+188)),W.size+=Se+188-Ce);break;case P:Be&&(U&&(d=a(U))&&this.parseID3PES(d),U={data:[],size:0}),U&&(U.data.push(C.subarray(Ce,Se+188)),U.size+=Se+188-Ce);break;case 0:Be&&(Ce+=C[Ce]+1),me=this._pmtId=A(C,Ce);break;case me:{Be&&(Ce+=C[Ce]+1);var ve=o(C,Ce,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,n);L=ve.avc,L>0&&(b.pid=L),T=ve.audio,T>0&&(m.pid=T,m.isAAC=ve.isAAC),P=ve.id3,P>0&&(c.pid=P),Y&&!re&&(g.logger.log("reparse from beginning"),Y=!1,Se=Oe-188),re=this.pmtParsed=!0;break}case 17:case 8191:break;default:Y=!0;break}}else this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});b.pesData=N,m.pesData=W,c.pesData=U;var Ye={audioTrack:m,avcTrack:b,id3Track:c,textTrack:this._txtTrack};return l&&this.extractRemainingSamples(Ye),Ye},E.flush=function(){var C=this.remainderData;this.remainderData=null;var h;return C?h=this.demux(C,-1,!1,!0):h={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(h),this.sampleAes?this.decrypt(h,this.sampleAes):h},E.extractRemainingSamples=function(C){var h=C.audioTrack,n=C.avcTrack,l=C.id3Track,d=n.pesData,b=h.pesData,m=l.pesData,c;d&&(c=a(d))?(this.parseAVCPES(c,!0),n.pesData=null):n.pesData=d,b&&(c=a(b))?(h.isAAC?this.parseAACPES(c):this.parseMPEGPES(c),h.pesData=null):(b!=null&&b.size&&g.logger.log("last AAC PES packet truncated,might overlap between fragments"),h.pesData=b),m&&(c=a(m))?(this.parseID3PES(c),l.pesData=null):l.pesData=m},E.demuxSampleAes=function(C,h,n){var l=this.demux(C,n,!0,!this.config.progressive),d=this.sampleAes=new M.default(this.observer,this.config,h);return this.decrypt(l,d)},E.decrypt=function(C,h){return new Promise(function(n){var l=C.audioTrack,d=C.avcTrack;l.samples&&l.isAAC?h.decryptAacSamples(l.samples,0,function(){d.samples?h.decryptAvcSamples(d.samples,0,0,function(){n(C)}):n(C)}):d.samples&&h.decryptAvcSamples(d.samples,0,0,function(){n(C)})})},E.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},E.parseAVCPES=function(C,h){var n=this,l=this._avcTrack,d=this.parseAVCNALu(C.data),b=!1,m=this.avcSample,c,L=!1;C.data=null,m&&d.length&&!l.audFound&&(r(m,l),m=this.avcSample=i(!1,C.pts,C.dts,"")),d.forEach(function(N){switch(N.type){case 1:{c=!0,m||(m=n.avcSample=i(!0,C.pts,C.dts,"")),b&&(m.debug+="NDR "),m.frame=!0;var T=N.data;if(L&&T.length>4){var P=new O.default(T).readSliceType();(P===2||P===4||P===7||P===9)&&(m.key=!0)}break}case 5:c=!0,m||(m=n.avcSample=i(!0,C.pts,C.dts,"")),b&&(m.debug+="IDR "),m.key=!0,m.frame=!0;break;case 6:{c=!0,b&&m&&(m.debug+="SEI ");var W=new O.default(y(N.data));W.readUByte();for(var U=0,Y=0,re=!1,me=0;!re&&W.bytesAvailable>1;){U=0;do me=W.readUByte(),U+=me;while(me===255);Y=0;do me=W.readUByte(),Y+=me;while(me===255);if(U===4&&W.bytesAvailable!==0){re=!0;var ge=W.readUByte();if(ge===181){var Oe=W.readUShort();if(Oe===49){var Se=W.readUInt();if(Se===1195456820){var Be=W.readUByte();if(Be===3){for(var Ne=W.readUByte(),ke=W.readUByte(),Ce=31&Ne,ve=[Ne,ke],Ye=0;Ye<Ce;Ye++)ve.push(W.readUByte()),ve.push(W.readUByte()),ve.push(W.readUByte());t(n._txtTrack.samples,{type:3,pts:C.pts,bytes:ve})}}}}}else if(U===5&&W.bytesAvailable!==0){if(re=!0,Y>16){for(var ht=[],at=0;at<16;at++)ht.push(W.readUByte().toString(16)),(at===3||at===5||at===7||at===9)&&ht.push("-");for(var We=Y-16,it=new Uint8Array(We),ne=0;ne<We;ne++)it[ne]=W.readUByte();t(n._txtTrack.samples,{pts:C.pts,payloadType:U,uuid:ht.join(""),userData:Object(X.utf8ArrayToStr)(it),userDataBytes:it})}}else if(Y<W.bytesAvailable)for(var J=0;J<Y;J++)W.readUByte()}break}case 7:if(c=!0,L=!0,b&&m&&(m.debug+="SPS "),!l.sps){var k=new O.default(N.data),$=k.readSPS();l.width=$.width,l.height=$.height,l.pixelRatio=$.pixelRatio,l.sps=[N.data],l.duration=n._duration;for(var q=N.data.subarray(1,4),he="avc1.",pe=0;pe<3;pe++){var Ke=q[pe].toString(16);Ke.length<2&&(Ke="0"+Ke),he+=Ke}l.codec=he}break;case 8:c=!0,b&&m&&(m.debug+="PPS "),l.pps||(l.pps=[N.data]);break;case 9:c=!1,l.audFound=!0,m&&r(m,l),m=n.avcSample=i(!1,C.pts,C.dts,b?"AUD ":"");break;case 12:c=!1;break;default:c=!1,m&&(m.debug+="unknown NAL "+N.type+" ");break}if(m&&c){var Je=m.units;Je.push(N)}}),h&&m&&(r(m,l),this.avcSample=null)},E.getLastNalUnit=function(){var C,h=this.avcSample,n;if(!h||h.units.length===0){var l=this._avcTrack.samples;h=l[l.length-1]}if((C=h)!==null&&C!==void 0&&C.units){var d=h.units;n=d[d.length-1]}return n},E.parseAVCNALu=function(C){var h=C.byteLength,n=this._avcTrack,l=n.naluState||0,d=l,b=[],m=0,c,L,N,T=-1,P=0;for(l===-1&&(T=0,P=C[0]&31,l=0,m=1);m<h;){if(c=C[m++],!l){l=c?0:1;continue}if(l===1){l=c?0:2;continue}if(!c)l=3;else if(c===1){if(T>=0){var W={data:C.subarray(T,m-l-1),type:P};b.push(W)}else{var U=this.getLastNalUnit();if(U&&(d&&m<=4-d&&(U.state&&(U.data=U.data.subarray(0,U.data.byteLength-d))),L=m-l-1,L>0)){var Y=new Uint8Array(U.data.byteLength+L);Y.set(U.data,0),Y.set(C.subarray(0,L),U.data.byteLength),U.data=Y,U.state=0}}m<h?(N=C[m]&31,T=m,P=N,l=0):l=-1}else l=0}if(T>=0&&l>=0){var re={data:C.subarray(T,h),type:P,state:l};b.push(re)}if(b.length===0){var me=this.getLastNalUnit();if(me){var ge=new Uint8Array(me.data.byteLength+C.byteLength);ge.set(me.data,0),ge.set(C,me.data.byteLength),me.data=ge}}return n.naluState=l,b},E.parseAACPES=function(C){var h=0,n=this._audioTrack,l=this.aacOverFlow,d=C.data;if(l){this.aacOverFlow=null;var b=l.sample.unit.byteLength,m=Math.min(l.missing,b),c=b-m;l.sample.unit.set(d.subarray(0,m),c),n.samples.push(l.sample),h=l.missing}var L,N;for(L=h,N=d.length;L<N-1&&!V.isHeader(d,L);L++);if(L!==h){var T,P;if(L<N-1?(T="AAC PES did not start with ADTS header,offset:"+L,P=!1):(T="no ADTS header found in AAC PES",P=!0),g.logger.warn("parsing error:"+T),this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.FRAG_PARSING_ERROR,fatal:P,reason:T}),P)return}V.initTrackConfig(n,this.observer,d,L,this.audioCodec);var W;if(C.pts!==void 0)W=C.pts;else if(l){var U=V.getFrameDuration(n.samplerate);W=l.sample.pts+U}else{g.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var Y=0;L<N;)if(V.isHeader(d,L)){if(L+5<N){var re=V.appendFrame(n,d,L,W,Y);if(re)if(re.missing)this.aacOverFlow=re;else{L+=re.length,Y++;continue}}break}else L++},E.parseMPEGPES=function(C){var h=C.data,n=h.length,l=0,d=0,b=C.pts;if(b===void 0){g.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;d<n;)if(F.isHeader(h,d)){var m=F.appendFrame(this._audioTrack,h,d,b,l);if(m)d+=m.length,l++;else break}else d++},E.parseID3PES=function(C){if(C.pts===void 0){g.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(C)},_}();s.minProbeByteLength=188;function i(_,E,B,C){return{key:_,frame:!1,pts:E,dts:B,units:[],debug:C,length:0}}function A(_,E){return(_[E+10]&31)<<8|_[E+11]}function o(_,E,B,C){var h={audio:-1,avc:-1,id3:-1,isAAC:!0},n=(_[E+1]&15)<<8|_[E+2],l=E+3+n-4,d=(_[E+10]&15)<<8|_[E+11];for(E+=12+d;E<l;){var b=(_[E+1]&31)<<8|_[E+2];switch(_[E]){case 207:if(!C){g.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:h.audio===-1&&(h.audio=b);break;case 21:h.id3===-1&&(h.id3=b);break;case 219:if(!C){g.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:h.avc===-1&&(h.avc=b);break;case 3:case 4:B?h.audio===-1&&(h.audio=b,h.isAAC=!1):g.logger.log("MPEG audio found, not supported in this browser");break;case 36:g.logger.warn("Unsupported HEVC stream type found");break;default:break}E+=((_[E+3]&15)<<8|_[E+4])+5}return h}function a(_){var E=0,B,C,h,n,l,d=_.data;if(!_||_.size===0)return null;for(;d[0].length<19&&d.length>1;){var b=new Uint8Array(d[0].length+d[1].length);b.set(d[0]),b.set(d[1],d[0].length),d[0]=b,d.splice(1,1)}B=d[0];var m=(B[0]<<16)+(B[1]<<8)+B[2];if(m===1){if(C=(B[4]<<8)+B[5],C&&C>_.size-6)return null;var c=B[7];c&192&&(n=(B[9]&14)*536870912+(B[10]&255)*4194304+(B[11]&254)*16384+(B[12]&255)*128+(B[13]&254)/2,c&64?(l=(B[14]&14)*536870912+(B[15]&255)*4194304+(B[16]&254)*16384+(B[17]&255)*128+(B[18]&254)/2,n-l>60*9e4&&(g.logger.warn(Math.round((n-l)/9e4)+"s delta between PTS and DTS, align them"),n=l)):l=n),h=B[8];var L=h+9;if(_.size<=L)return null;_.size-=L;for(var N=new Uint8Array(_.size),T=0,P=d.length;T<P;T++){B=d[T];var W=B.byteLength;if(L)if(L>W){L-=W;continue}else B=B.subarray(L),W-=L,L=0;N.set(B,E),E+=W}return C&&(C-=h+3),{data:N,pts:n,dts:l,len:C}}return null}function r(_,E){if(_.units.length&&_.frame){if(_.pts===void 0){var B=E.samples,C=B.length;if(C){var h=B[C-1];_.pts=h.pts,_.dts=h.dts}else{E.dropped++;return}}E.samples.push(_)}_.debug.length&&g.logger.log(_.pts+"/"+_.dts+":"+_.debug)}function t(_,E){var B=_.length;if(B>0){if(E.pts>=_[B-1].pts)_.push(E);else for(var C=B-1;C>=0;C--)if(E.pts<_[C].pts){_.splice(C,0,E);break}}else _.push(E)}function y(_){for(var E=_.byteLength,B=[],C=1;C<E-2;)_[C]===0&&_[C+1]===0&&_[C+2]===3?(B.push(C+2),C+=2):C++;if(B.length===0)return _;var h=E-B.length,n=new Uint8Array(h),l=0;for(C=0;C<h;l++,C++)l===B[0]&&(l++,B.shift()),n[C]=_[l];return n}G.default=s},"./src/errors.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"ErrorTypes",function(){return V}),D.d(G,"ErrorDetails",function(){return F});var V;(function(O){O.NETWORK_ERROR="networkError",O.MEDIA_ERROR="mediaError",O.KEY_SYSTEM_ERROR="keySystemError",O.MUX_ERROR="muxError",O.OTHER_ERROR="otherError"})(V||(V={}));var F;(function(O){O.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",O.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",O.KEY_SYSTEM_NO_SESSION="keySystemNoSession",O.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",O.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",O.MANIFEST_LOAD_ERROR="manifestLoadError",O.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",O.MANIFEST_PARSING_ERROR="manifestParsingError",O.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",O.LEVEL_EMPTY_ERROR="levelEmptyError",O.LEVEL_LOAD_ERROR="levelLoadError",O.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",O.LEVEL_SWITCH_ERROR="levelSwitchError",O.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",O.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",O.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",O.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",O.FRAG_LOAD_ERROR="fragLoadError",O.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",O.FRAG_DECRYPT_ERROR="fragDecryptError",O.FRAG_PARSING_ERROR="fragParsingError",O.REMUX_ALLOC_ERROR="remuxAllocError",O.KEY_LOAD_ERROR="keyLoadError",O.KEY_LOAD_TIMEOUT="keyLoadTimeOut",O.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",O.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",O.BUFFER_APPEND_ERROR="bufferAppendError",O.BUFFER_APPENDING_ERROR="bufferAppendingError",O.BUFFER_STALLED_ERROR="bufferStalledError",O.BUFFER_FULL_ERROR="bufferFullError",O.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",O.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",O.INTERNAL_EXCEPTION="internalException",O.INTERNAL_ABORTED="aborted",O.UNKNOWN="unknown"})(F||(F={}))},"./src/events.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"Events",function(){return V});var V;(function(F){F.MEDIA_ATTACHING="hlsMediaAttaching",F.MEDIA_ATTACHED="hlsMediaAttached",F.MEDIA_DETACHING="hlsMediaDetaching",F.MEDIA_DETACHED="hlsMediaDetached",F.BUFFER_RESET="hlsBufferReset",F.BUFFER_CODECS="hlsBufferCodecs",F.BUFFER_CREATED="hlsBufferCreated",F.BUFFER_APPENDING="hlsBufferAppending",F.BUFFER_APPENDED="hlsBufferAppended",F.BUFFER_EOS="hlsBufferEos",F.BUFFER_FLUSHING="hlsBufferFlushing",F.BUFFER_FLUSHED="hlsBufferFlushed",F.MANIFEST_LOADING="hlsManifestLoading",F.MANIFEST_LOADED="hlsManifestLoaded",F.MANIFEST_PARSED="hlsManifestParsed",F.LEVEL_SWITCHING="hlsLevelSwitching",F.LEVEL_SWITCHED="hlsLevelSwitched",F.LEVEL_LOADING="hlsLevelLoading",F.LEVEL_LOADED="hlsLevelLoaded",F.LEVEL_UPDATED="hlsLevelUpdated",F.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",F.LEVELS_UPDATED="hlsLevelsUpdated",F.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",F.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",F.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",F.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",F.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",F.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",F.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",F.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",F.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",F.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",F.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",F.CUES_PARSED="hlsCuesParsed",F.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",F.INIT_PTS_FOUND="hlsInitPtsFound",F.FRAG_LOADING="hlsFragLoading",F.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",F.FRAG_LOADED="hlsFragLoaded",F.FRAG_DECRYPTED="hlsFragDecrypted",F.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",F.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",F.FRAG_PARSING_METADATA="hlsFragParsingMetadata",F.FRAG_PARSED="hlsFragParsed",F.FRAG_BUFFERED="hlsFragBuffered",F.FRAG_CHANGED="hlsFragChanged",F.FPS_DROP="hlsFpsDrop",F.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",F.ERROR="hlsError",F.DESTROYING="hlsDestroying",F.KEY_LOADING="hlsKeyLoading",F.KEY_LOADED="hlsKeyLoaded",F.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",F.BACK_BUFFER_REACHED="hlsBackBufferReached"})(V||(V={}))},"./src/hls.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return _});var V=D("./node_modules/url-toolkit/src/url-toolkit.js"),F=D.n(V),O=D("./src/loader/playlist-loader.ts"),X=D("./src/loader/key-loader.ts"),M=D("./src/controller/id3-track-controller.ts"),e=D("./src/controller/latency-controller.ts"),R=D("./src/controller/level-controller.ts"),g=D("./src/controller/fragment-tracker.ts"),v=D("./src/controller/stream-controller.ts"),u=D("./src/is-supported.ts"),s=D("./src/utils/logger.ts"),i=D("./src/config.ts"),A=D("./node_modules/eventemitter3/index.js"),o=D.n(A),a=D("./src/events.ts"),r=D("./src/errors.ts");function t(E,B){for(var C=0;C<B.length;C++){var h=B[C];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(E,h.key,h)}}function y(E,B,C){return B&&t(E.prototype,B),C&&t(E,C),E}var _=function(){E.isSupported=function(){return Object(u.isSupported)()};function E(C){C===void 0&&(C={}),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 h=this.config=Object(i.mergeConfig)(E.DefaultConfig,C);this.userConfig=C,Object(s.enableLogs)(h.debug),this._autoLevelCapping=-1,h.progressive&&Object(i.enableStreamingMode)(h);var n=h.abrController,l=h.bufferController,d=h.capLevelController,b=h.fpsController,m=this.abrController=new n(this),c=this.bufferController=new l(this),L=this.capLevelController=new d(this),N=new b(this),T=new O.default(this),P=new X.default(this),W=new M.default(this),U=this.levelController=new R.default(this),Y=new g.FragmentTracker(this),re=this.streamController=new v.default(this,Y);L.setStreamController(re),N.setStreamController(re);var me=[U,re];this.networkControllers=me;var ge=[T,P,m,c,L,N,W,Y];this.audioTrackController=this.createController(h.audioTrackController,null,me),this.createController(h.audioStreamController,Y,me),this.subtitleTrackController=this.createController(h.subtitleTrackController,null,me),this.createController(h.subtitleStreamController,Y,me),this.createController(h.timelineController,null,ge),this.emeController=this.createController(h.emeController,null,ge),this.cmcdController=this.createController(h.cmcdController,null,ge),this.latencyController=this.createController(e.default,null,ge),this.coreComponents=ge}var B=E.prototype;return B.createController=function(h,n,l){if(h){var d=n?new h(this,n):new h(this);return l&&l.push(d),d}return null},B.on=function(h,n,l){l===void 0&&(l=this),this._emitter.on(h,n,l)},B.once=function(h,n,l){l===void 0&&(l=this),this._emitter.once(h,n,l)},B.removeAllListeners=function(h){this._emitter.removeAllListeners(h)},B.off=function(h,n,l,d){l===void 0&&(l=this),this._emitter.off(h,n,l,d)},B.listeners=function(h){return this._emitter.listeners(h)},B.emit=function(h,n,l){return this._emitter.emit(h,n,l)},B.trigger=function(h,n){if(this.config.debug)return this.emit(h,h,n);try{return this.emit(h,h,n)}catch(l){s.logger.error("An internal error happened while handling event "+h+'. Error message: "'+l.message+'". Here is a stacktrace:',l),this.trigger(a.Events.ERROR,{type:r.ErrorTypes.OTHER_ERROR,details:r.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:h,error:l})}return!1},B.listenerCount=function(h){return this._emitter.listenerCount(h)},B.destroy=function(){s.logger.log("destroy"),this.trigger(a.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(h){return h.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(h){return h.destroy()}),this.coreComponents.length=0},B.attachMedia=function(h){s.logger.log("attachMedia"),this._media=h,this.trigger(a.Events.MEDIA_ATTACHING,{media:h})},B.detachMedia=function(){s.logger.log("detachMedia"),this.trigger(a.Events.MEDIA_DETACHING,void 0),this._media=null},B.loadSource=function(h){this.stopLoad();var n=this.media,l=this.url,d=this.url=V.buildAbsoluteURL(self.location.href,h,{alwaysNormalize:!0});s.logger.log("loadSource:"+d),n&&l&&l!==d&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(n)),this.trigger(a.Events.MANIFEST_LOADING,{url:h})},B.startLoad=function(h){h===void 0&&(h=-1),s.logger.log("startLoad("+h+")"),this.networkControllers.forEach(function(n){n.startLoad(h)})},B.stopLoad=function(){s.logger.log("stopLoad"),this.networkControllers.forEach(function(h){h.stopLoad()})},B.swapAudioCodec=function(){s.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},B.recoverMediaError=function(){s.logger.log("recoverMediaError");var h=this._media;this.detachMedia(),h&&this.attachMedia(h)},B.removeLevel=function(h,n){n===void 0&&(n=0),this.levelController.removeLevel(h,n)},y(E,[{key:"levels",get:function(){var h=this.levelController.levels;return h||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(h){s.logger.log("set currentLevel:"+h),this.loadLevel=h,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(h){s.logger.log("set nextLevel:"+h),this.levelController.manualLevel=h,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(h){s.logger.log("set loadLevel:"+h),this.levelController.manualLevel=h}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(h){this.levelController.nextLoadLevel=h}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(h){s.logger.log("set firstLevel:"+h),this.levelController.firstLevel=h}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(h){s.logger.log("set startLevel:"+h),h!==-1&&(h=Math.max(h,this.minAutoLevel)),this.levelController.startLevel=h}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(h){var n=!!h;n!==this.config.capLevelToPlayerSize&&(n?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=n)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(h){this._autoLevelCapping!==h&&(s.logger.log("set autoLevelCapping:"+h),this._autoLevelCapping=h)}},{key:"bandwidthEstimate",get:function(){var h=this.abrController.bwEstimator;return h?h.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var h=this.levels,n=this.config.minAutoBitrate;if(!h)return 0;for(var l=h.length,d=0;d<l;d++)if(h[d].maxBitrate>n)return d;return 0}},{key:"maxAutoLevel",get:function(){var h=this.levels,n=this.autoLevelCapping,l;return n===-1&&h&&h.length?l=h.length-1:l=n,l}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(h){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,h)}},{key:"audioTracks",get:function(){var h=this.audioTrackController;return h?h.audioTracks:[]}},{key:"audioTrack",get:function(){var h=this.audioTrackController;return h?h.audioTrack:-1},set:function(h){var n=this.audioTrackController;n&&(n.audioTrack=h)}},{key:"subtitleTracks",get:function(){var h=this.subtitleTrackController;return h?h.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var h=this.subtitleTrackController;return h?h.subtitleTrack:-1},set:function(h){var n=this.subtitleTrackController;n&&(n.subtitleTrack=h)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var h=this.subtitleTrackController;return h?h.subtitleDisplay:!1},set:function(h){var n=this.subtitleTrackController;n&&(n.subtitleDisplay=h)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(h){this.config.lowLatencyMode=h}},{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 a.Events}},{key:"ErrorTypes",get:function(){return r.ErrorTypes}},{key:"ErrorDetails",get:function(){return r.ErrorDetails}},{key:"DefaultConfig",get:function(){return E.defaultConfig?E.defaultConfig:i.hlsDefaultConfig},set:function(h){E.defaultConfig=h}}]),E}();_.defaultConfig=void 0},"./src/is-supported.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"isSupported",function(){return O}),D.d(G,"changeTypeSupported",function(){return X});var V=D("./src/utils/mediasource-helper.ts");function F(){return self.SourceBuffer||self.WebKitSourceBuffer}function O(){var M=Object(V.getMediaSource)();if(!M)return!1;var e=F(),R=M&&typeof M.isTypeSupported=="function"&&M.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),g=!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function";return!!R&&!!g}function X(){var M,e=F();return typeof(e==null||((M=e.prototype)===null||M===void 0)?void 0:M.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return s}),D.d(G,"LoadError",function(){return A});var V=D("./src/polyfills/number.ts"),F=D("./src/errors.ts");function O(o,a){o.prototype=Object.create(a.prototype),o.prototype.constructor=o,g(o,a)}function X(o){var a=typeof Map=="function"?new Map:void 0;return X=function(t){if(t===null||!R(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof a!="undefined"){if(a.has(t))return a.get(t);a.set(t,y)}function y(){return M(t,arguments,v(this).constructor)}return y.prototype=Object.create(t.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),g(y,t)},X(o)}function M(o,a,r){return e()?M=Reflect.construct:M=function(y,_,E){var B=[null];B.push.apply(B,_);var C=Function.bind.apply(y,B),h=new C;return E&&g(h,E.prototype),h},M.apply(null,arguments)}function e(){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(o){return!1}}function R(o){return Function.toString.call(o).indexOf("[native code]")!==-1}function g(o,a){return g=Object.setPrototypeOf||function(t,y){return t.__proto__=y,t},g(o,a)}function v(o){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},v(o)}var u=Math.pow(2,17),s=function(){function o(r){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=r}var a=o.prototype;return a.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},a.abort=function(){this.loader&&this.loader.abort()},a.load=function(t,y){var _=this,E=t.url;if(!E)return Promise.reject(new A({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(E?"part list":"url")));this.abort();var B=this.config,C=B.fLoader,h=B.loader;return new Promise(function(n,l){_.loader&&_.loader.destroy();var d=_.loader=t.loader=C?new C(B):new h(B),b=i(t),m={timeout:B.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:B.fragLoadingMaxRetryTimeout,highWaterMark:u};t.stats=d.stats,d.load(b,m,{onSuccess:function(L,N,T,P){_.resetLoader(t,d),n({frag:t,part:null,payload:L.data,networkDetails:P})},onError:function(L,N,T){_.resetLoader(t,d),l(new A({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:L,networkDetails:T}))},onAbort:function(L,N,T){_.resetLoader(t,d),l(new A({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:T}))},onTimeout:function(L,N,T){_.resetLoader(t,d),l(new A({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:T}))},onProgress:function(L,N,T,P){y&&y({frag:t,part:null,payload:T,networkDetails:P})}})})},a.loadPart=function(t,y,_){var E=this;this.abort();var B=this.config,C=B.fLoader,h=B.loader;return new Promise(function(n,l){E.loader&&E.loader.destroy();var d=E.loader=t.loader=C?new C(B):new h(B),b=i(t,y),m={timeout:B.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:B.fragLoadingMaxRetryTimeout,highWaterMark:u};y.stats=d.stats,d.load(b,m,{onSuccess:function(L,N,T,P){E.resetLoader(t,d),E.updateStatsFromPart(t,y);var W={frag:t,part:y,payload:L.data,networkDetails:P};_(W),n(W)},onError:function(L,N,T){E.resetLoader(t,d),l(new A({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:y,response:L,networkDetails:T}))},onAbort:function(L,N,T){t.stats.aborted=y.stats.aborted,E.resetLoader(t,d),l(new A({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:y,networkDetails:T}))},onTimeout:function(L,N,T){E.resetLoader(t,d),l(new A({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:y,networkDetails:T}))}})})},a.updateStatsFromPart=function(t,y){var _=t.stats,E=y.stats,B=E.total;if(_.loaded+=E.loaded,B){var C=Math.round(t.duration/y.duration),h=Math.min(Math.round(_.loaded/B),C),n=C-h,l=n*Math.round(_.loaded/h);_.total=_.loaded+l}else _.total=Math.max(_.loaded,_.total);var d=_.loading,b=E.loading;d.start?d.first+=b.first-b.start:(d.start=b.start,d.first=b.first),d.end=b.end},a.resetLoader=function(t,y){t.loader=null,this.loader===y&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),y.destroy()},o}();function i(o,a){a===void 0&&(a=null);var r=a||o,t={frag:o,part:a,responseType:"arraybuffer",url:r.url,headers:{},rangeStart:0,rangeEnd:0},y=r.byteRangeStartOffset,_=r.byteRangeEndOffset;return Object(V.isFiniteNumber)(y)&&Object(V.isFiniteNumber)(_)&&(t.rangeStart=y,t.rangeEnd=_),t}var A=function(o){O(a,o);function a(r){for(var t,y=arguments.length,_=new Array(y>1?y-1:0),E=1;E<y;E++)_[E-1]=arguments[E];return t=o.call.apply(o,[this].concat(_))||this,t.data=void 0,t.data=r,t}return a}(X(Error))},"./src/loader/fragment.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"ElementaryStreamTypes",function(){return s}),D.d(G,"BaseSegment",function(){return i}),D.d(G,"Fragment",function(){return A}),D.d(G,"Part",function(){return o});var V=D("./src/polyfills/number.ts"),F=D("./node_modules/url-toolkit/src/url-toolkit.js"),O=D.n(F),X=D("./src/utils/logger.ts"),M=D("./src/loader/level-key.ts"),e=D("./src/loader/load-stats.ts");function R(a,r){a.prototype=Object.create(r.prototype),a.prototype.constructor=a,g(a,r)}function g(a,r){return g=Object.setPrototypeOf||function(y,_){return y.__proto__=_,y},g(a,r)}function v(a,r){for(var t=0;t<r.length;t++){var y=r[t];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(a,y.key,y)}}function u(a,r,t){return r&&v(a.prototype,r),t&&v(a,t),a}var s;(function(a){a.AUDIO="audio",a.VIDEO="video",a.AUDIOVIDEO="audiovideo"})(s||(s={}));var i=function(){function a(t){var y;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(y={},y[s.AUDIO]=null,y[s.VIDEO]=null,y[s.AUDIOVIDEO]=null,y),this.baseurl=t}var r=a.prototype;return r.setByteRange=function(y,_){var E=y.split("@",2),B=[];E.length===1?B[0]=_?_.byteRangeEndOffset:0:B[0]=parseInt(E[1]),B[1]=parseInt(E[0])+B[0],this._byteRange=B},u(a,[{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(F.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(y){this._url=y}}]),a}(),A=function(a){R(r,a);function r(y,_){var E;return E=a.call(this,_)||this,E._decryptdata=null,E.rawProgramDateTime=null,E.programDateTime=null,E.tagList=[],E.duration=0,E.sn=0,E.levelkey=void 0,E.type=void 0,E.loader=null,E.level=-1,E.cc=0,E.startPTS=void 0,E.endPTS=void 0,E.appendedPTS=void 0,E.startDTS=void 0,E.endDTS=void 0,E.start=0,E.deltaPTS=void 0,E.maxStartPTS=void 0,E.minEndPTS=void 0,E.stats=new e.LoadStats,E.urlId=0,E.data=void 0,E.bitrateTest=!1,E.title=null,E.initSegment=null,E.type=y,E}var t=r.prototype;return t.createInitializationVector=function(_){for(var E=new Uint8Array(16),B=12;B<16;B++)E[B]=_>>8*(15-B)&255;return E},t.setDecryptDataFromLevelKey=function(_,E){var B=_;return(_==null?void 0:_.method)==="AES-128"&&_.uri&&!_.iv&&(B=M.LevelKey.fromURI(_.uri),B.method=_.method,B.iv=this.createInitializationVector(E),B.keyFormat="identity"),B},t.setElementaryStreamInfo=function(_,E,B,C,h,n){n===void 0&&(n=!1);var l=this.elementaryStreams,d=l[_];if(!d){l[_]={startPTS:E,endPTS:B,startDTS:C,endDTS:h,partial:n};return}d.startPTS=Math.min(d.startPTS,E),d.endPTS=Math.max(d.endPTS,B),d.startDTS=Math.min(d.startDTS,C),d.endDTS=Math.max(d.endDTS,h)},t.clearElementaryStreamInfo=function(){var _=this.elementaryStreams;_[s.AUDIO]=null,_[s.VIDEO]=null,_[s.AUDIOVIDEO]=null},u(r,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var _=this.sn;typeof _!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&X.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),_=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,_)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(V.isFiniteNumber)(this.programDateTime))return null;var _=Object(V.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+_*1e3}},{key:"encrypted",get:function(){var _;return!!((_=this.decryptdata)!==null&&_!==void 0&&_.keyFormat&&this.decryptdata.uri)}}]),r}(i),o=function(a){R(r,a);function r(t,y,_,E,B){var C;C=a.call(this,_)||this,C.fragOffset=0,C.duration=0,C.gap=!1,C.independent=!1,C.relurl=void 0,C.fragment=void 0,C.index=void 0,C.stats=new e.LoadStats,C.duration=t.decimalFloatingPoint("DURATION"),C.gap=t.bool("GAP"),C.independent=t.bool("INDEPENDENT"),C.relurl=t.enumeratedString("URI"),C.fragment=y,C.index=E;var h=t.enumeratedString("BYTERANGE");return h&&C.setByteRange(h,B),B&&(C.fragOffset=B.fragOffset+B.duration),C}return u(r,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var y=this.elementaryStreams;return!!(y.audio||y.video||y.audiovideo)}}]),r}(i)},"./src/loader/key-loader.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return X});var V=D("./src/events.ts"),F=D("./src/errors.ts"),O=D("./src/utils/logger.ts"),X=function(){function M(R){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=R,this._registerListeners()}var e=M.prototype;return e._registerListeners=function(){this.hls.on(V.Events.KEY_LOADING,this.onKeyLoading,this)},e._unregisterListeners=function(){this.hls.off(V.Events.KEY_LOADING,this.onKeyLoading)},e.destroy=function(){this._unregisterListeners();for(var g in this.loaders){var v=this.loaders[g];v&&v.destroy()}this.loaders={}},e.onKeyLoading=function(g,v){var u=v.frag,s=u.type,i=this.loaders[s];if(!u.decryptdata){O.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var A=u.decryptdata.uri;if(A!==this.decrypturl||this.decryptkey===null){var o=this.hls.config;if(i&&(O.logger.warn("abort previous key loader for type:"+s),i.abort()),!A){O.logger.warn("key uri is falsy");return}var a=o.loader,r=u.loader=this.loaders[s]=new a(o);this.decrypturl=A,this.decryptkey=null;var t={url:A,frag:u,responseType:"arraybuffer"},y={timeout:o.fragLoadingTimeOut,maxRetry:0,retryDelay:o.fragLoadingRetryDelay,maxRetryDelay:o.fragLoadingMaxRetryTimeout,highWaterMark:0},_={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};r.load(t,y,_)}else this.decryptkey&&(u.decryptdata.key=this.decryptkey,this.hls.trigger(V.Events.KEY_LOADED,{frag:u}))},e.loadsuccess=function(g,v,u){var s=u.frag;if(!s.decryptdata){O.logger.error("after key load, decryptdata unset");return}this.decryptkey=s.decryptdata.key=new Uint8Array(g.data),s.loader=null,delete this.loaders[s.type],this.hls.trigger(V.Events.KEY_LOADED,{frag:s})},e.loaderror=function(g,v){var u=v.frag,s=u.loader;s&&s.abort(),delete this.loaders[u.type],this.hls.trigger(V.Events.ERROR,{type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:u,response:g})},e.loadtimeout=function(g,v){var u=v.frag,s=u.loader;s&&s.abort(),delete this.loaders[u.type],this.hls.trigger(V.Events.ERROR,{type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:u})},M}()},"./src/loader/level-details.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"LevelDetails",function(){return M});var V=D("./src/polyfills/number.ts");function F(e,R){for(var g=0;g<R.length;g++){var v=R[g];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(e,v.key,v)}}function O(e,R,g){return R&&F(e.prototype,R),g&&F(e,g),e}var X=10,M=function(){function e(g){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=g}var R=e.prototype;return R.reloaded=function(v){if(!v){this.advanced=!0,this.updated=!0;return}var u=this.lastPartSn-v.lastPartSn,s=this.lastPartIndex-v.lastPartIndex;this.updated=this.endSN!==v.endSN||!!s||!!u,this.advanced=this.endSN>v.endSN||u>0||u===0&&s>0,this.updated||this.advanced?this.misses=Math.floor(v.misses*.6):this.misses=v.misses+1,this.availabilityDelay=v.availabilityDelay},O(e,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(V.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||X}},{key:"drift",get:function(){var v=this.driftEndTime-this.driftStartTime;if(v>0){var u=this.driftEnd-this.driftStart;return u*1e3/v}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var v;return(v=this.partList)!==null&&v!==void 0&&v.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var v;return(v=this.fragments)!==null&&v!==void 0&&v.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 v;return(v=this.partList)!==null&&v!==void 0&&v.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var v;return(v=this.partList)!==null&&v!==void 0&&v.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),e}()},"./src/loader/level-key.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"LevelKey",function(){return M});var V=D("./node_modules/url-toolkit/src/url-toolkit.js"),F=D.n(V);function O(e,R){for(var g=0;g<R.length;g++){var v=R[g];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(e,v.key,v)}}function X(e,R,g){return R&&O(e.prototype,R),g&&O(e,g),e}var M=function(){e.fromURL=function(g,v){return new e(g,v)},e.fromURI=function(g){return new e(g)};function e(R,g){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,g?this._uri=Object(V.buildAbsoluteURL)(R,g,{alwaysNormalize:!0}):this._uri=R}return X(e,[{key:"uri",get:function(){return this._uri}}]),e}()},"./src/loader/load-stats.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"LoadStats",function(){return V});var V=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(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return r});var V=D("./src/polyfills/number.ts"),F=D("./node_modules/url-toolkit/src/url-toolkit.js"),O=D.n(F),X=D("./src/loader/fragment.ts"),M=D("./src/loader/level-details.ts"),e=D("./src/loader/level-key.ts"),R=D("./src/utils/attr-list.ts"),g=D("./src/utils/logger.ts"),v=D("./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,s=/#EXT-X-MEDIA:(.*)/g,i=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("|")),o=/\.(mp4|m4s|m4v|m4a)$/i;function a(B){var C,h;return o.test((C=(h=F.parseURL(B))===null||h===void 0?void 0:h.path)!=null?C:"")}var r=function(){function B(){}return B.findGroup=function(h,n){for(var l=0;l<h.length;l++){var d=h[l];if(d.id===n)return d}},B.convertAVC1ToAVCOTI=function(h){var n=h.split(".");if(n.length>2){var l=n.shift()+".";return l+=parseInt(n.shift()).toString(16),l+=("000"+parseInt(n.shift()).toString(16)).substr(-4),l}return h},B.resolve=function(h,n){return F.buildAbsoluteURL(n,h,{alwaysNormalize:!0})},B.parseMasterPlaylist=function(h,n){var l=[],d={},b=!1;u.lastIndex=0;for(var m;(m=u.exec(h))!=null;)if(m[1]){var c=new R.AttrList(m[1]),L={attrs:c,bitrate:c.decimalInteger("AVERAGE-BANDWIDTH")||c.decimalInteger("BANDWIDTH"),name:c.NAME,url:B.resolve(m[2],n)},N=c.decimalResolution("RESOLUTION");N&&(L.width=N.width,L.height=N.height),t((c.CODECS||"").split(/[ ,]+/).filter(function(P){return P}),L),L.videoCodec&&L.videoCodec.indexOf("avc1")!==-1&&(L.videoCodec=B.convertAVC1ToAVCOTI(L.videoCodec)),l.push(L)}else if(m[3]){var T=new R.AttrList(m[3]);T["DATA-ID"]&&(b=!0,d[T["DATA-ID"]]=T)}return{levels:l,sessionData:b?d:null}},B.parseMasterPlaylistMedia=function(h,n,l,d){d===void 0&&(d=[]);var b,m=[],c=0;for(s.lastIndex=0;(b=s.exec(h))!==null;){var L=new R.AttrList(b[1]);if(L.TYPE===l){var N={attrs:L,bitrate:0,id:c++,groupId:L["GROUP-ID"],instreamId:L["INSTREAM-ID"],name:L.NAME||L.LANGUAGE||"",type:l,default:L.bool("DEFAULT"),autoselect:L.bool("AUTOSELECT"),forced:L.bool("FORCED"),lang:L.LANGUAGE,url:L.URI?B.resolve(L.URI,n):""};if(d.length){var T=B.findGroup(d,N.groupId)||d[0];y(N,T,"audioCodec"),y(N,T,"textCodec")}m.push(N)}}return m},B.parseLevelPlaylist=function(h,n,l,d,b){var m=new M.LevelDetails(n),c=m.fragments,L=null,N=0,T=0,P=0,W=0,U=null,Y=new X.Fragment(d,n),re,me,ge,Oe=-1,Se=!1;for(i.lastIndex=0,m.m3u8=h;(re=i.exec(h))!==null;){Se&&(Se=!1,Y=new X.Fragment(d,n),Y.start=P,Y.sn=N,Y.cc=W,Y.level=l,L&&(Y.initSegment=L,Y.rawProgramDateTime=L.rawProgramDateTime));var Be=re[1];if(Be){Y.duration=parseFloat(Be);var Ne=(" "+re[2]).slice(1);Y.title=Ne||null,Y.tagList.push(Ne?["INF",Be,Ne]:["INF",Be])}else if(re[3])Object(V.isFiniteNumber)(Y.duration)&&(Y.start=P,ge&&(Y.levelkey=ge),Y.sn=N,Y.level=l,Y.cc=W,Y.urlId=b,c.push(Y),Y.relurl=(" "+re[3]).slice(1),E(Y,U),U=Y,P+=Y.duration,N++,T=0,Se=!0);else if(re[4]){var ke=(" "+re[4]).slice(1);U?Y.setByteRange(ke,U):Y.setByteRange(ke)}else if(re[5])Y.rawProgramDateTime=(" "+re[5]).slice(1),Y.tagList.push(["PROGRAM-DATE-TIME",Y.rawProgramDateTime]),Oe===-1&&(Oe=c.length);else{if(re=re[0].match(A),!re){g.logger.warn("No matches on slow regex match for level playlist!");continue}for(me=1;me<re.length&&!(typeof re[me]!="undefined");me++);var Ce=(" "+re[me]).slice(1),ve=(" "+re[me+1]).slice(1),Ye=re[me+2]?(" "+re[me+2]).slice(1):"";switch(Ce){case"PLAYLIST-TYPE":m.type=ve.toUpperCase();break;case"MEDIA-SEQUENCE":N=m.startSN=parseInt(ve);break;case"SKIP":{var ht=new R.AttrList(ve),at=ht.decimalInteger("SKIPPED-SEGMENTS");if(Object(V.isFiniteNumber)(at)){m.skippedSegments=at;for(var We=at;We--;)c.unshift(null);N+=at}var it=ht.enumeratedString("RECENTLY-REMOVED-DATERANGES");it&&(m.recentlyRemovedDateranges=it.split(" "));break}case"TARGETDURATION":m.targetduration=parseFloat(ve);break;case"VERSION":m.version=parseInt(ve);break;case"EXTM3U":break;case"ENDLIST":m.live=!1;break;case"#":(ve||Ye)&&Y.tagList.push(Ye?[ve,Ye]:[ve]);break;case"DIS":W++;case"GAP":Y.tagList.push([Ce]);break;case"BITRATE":Y.tagList.push([Ce,ve]);break;case"DISCONTINUITY-SEQ":W=parseInt(ve);break;case"KEY":{var ne,J=new R.AttrList(ve),k=J.enumeratedString("METHOD"),$=J.URI,q=J.hexadecimalInteger("IV"),he=J.enumeratedString("KEYFORMATVERSIONS"),pe=J.enumeratedString("KEYID"),Ke=(ne=J.enumeratedString("KEYFORMAT"))!=null?ne:"identity",Je=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(Je.indexOf(Ke)>-1){g.logger.warn("Keyformat "+Ke+" is not supported from the manifest");continue}else if(Ke!=="identity")continue;k&&(ge=e.LevelKey.fromURL(n,$),$&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(k)>=0&&(ge.method=k,ge.keyFormat=Ke,pe&&(ge.keyID=pe),he&&(ge.keyFormatVersions=he),ge.iv=q));break}case"START":{var ze=new R.AttrList(ve),Ze=ze.decimalFloatingPoint("TIME-OFFSET");Object(V.isFiniteNumber)(Ze)&&(m.startTimeOffset=Ze);break}case"MAP":{var nt=new R.AttrList(ve);Y.relurl=nt.URI,nt.BYTERANGE&&Y.setByteRange(nt.BYTERANGE),Y.level=l,Y.sn="initSegment",ge&&(Y.levelkey=ge),Y.initSegment=null,L=Y,Se=!0;break}case"SERVER-CONTROL":{var pt=new R.AttrList(ve);m.canBlockReload=pt.bool("CAN-BLOCK-RELOAD"),m.canSkipUntil=pt.optionalFloat("CAN-SKIP-UNTIL",0),m.canSkipDateRanges=m.canSkipUntil>0&&pt.bool("CAN-SKIP-DATERANGES"),m.partHoldBack=pt.optionalFloat("PART-HOLD-BACK",0),m.holdBack=pt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var xe=new R.AttrList(ve);m.partTarget=xe.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ue=m.partList;Ue||(Ue=m.partList=[]);var Qe=T>0?Ue[Ue.length-1]:void 0,je=T++,Le=new X.Part(new R.AttrList(ve),Y,n,je,Qe);Ue.push(Le),Y.duration+=Le.duration;break}case"PRELOAD-HINT":{var Fe=new R.AttrList(ve);m.preloadHint=Fe;break}case"RENDITION-REPORT":{var we=new R.AttrList(ve);m.renditionReports=m.renditionReports||[],m.renditionReports.push(we);break}default:g.logger.warn("line parsed but not handled: "+re);break}}}U&&!U.relurl?(c.pop(),P-=U.duration,m.partList&&(m.fragmentHint=U)):m.partList&&(E(Y,U),Y.cc=W,m.fragmentHint=Y);var ue=c.length,ce=c[0],te=c[ue-1];if(P+=m.skippedSegments*m.targetduration,P>0&&ue&&te){m.averagetargetduration=P/ue;var ie=te.sn;m.endSN=ie!=="initSegment"?ie:0,ce&&(m.startCC=ce.cc,ce.initSegment||m.fragments.every(function(le){return le.relurl&&a(le.relurl)})&&(g.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),Y=new X.Fragment(d,n),Y.relurl=te.relurl,Y.level=l,Y.sn="initSegment",ce.initSegment=Y,m.needSidxRanges=!0))}else m.endSN=0,m.startCC=0;return m.fragmentHint&&(P+=m.fragmentHint.duration),m.totalduration=P,m.endCC=W,Oe>0&&_(c,Oe),m},B}();function t(B,C){["video","audio","text"].forEach(function(h){var n=B.filter(function(d){return Object(v.isCodecType)(d,h)});if(n.length){var l=n.filter(function(d){return d.lastIndexOf("avc1",0)===0||d.lastIndexOf("mp4a",0)===0});C[h+"Codec"]=l.length>0?l[0]:n[0],B=B.filter(function(d){return n.indexOf(d)===-1})}}),C.unknownCodecs=B}function y(B,C,h){var n=C[h];n&&(B[h]=n)}function _(B,C){for(var h=B[C],n=C;n--;){var l=B[n];if(!l)return;l.programDateTime=h.programDateTime-l.duration*1e3,h=l}}function E(B,C){B.rawProgramDateTime?B.programDateTime=Date.parse(B.rawProgramDateTime):C!=null&&C.programDateTime&&(B.programDateTime=C.endProgramDateTime),Object(V.isFiniteNumber)(B.programDateTime)||(B.programDateTime=null,B.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/polyfills/number.ts"),F=D("./src/events.ts"),O=D("./src/errors.ts"),X=D("./src/utils/logger.ts"),M=D("./src/utils/mp4-tools.ts"),e=D("./src/loader/m3u8-parser.ts"),R=D("./src/types/loader.ts"),g=D("./src/utils/attr-list.ts");function v(i){var A=i.type;switch(A){case R.PlaylistContextType.AUDIO_TRACK:return R.PlaylistLevelType.AUDIO;case R.PlaylistContextType.SUBTITLE_TRACK:return R.PlaylistLevelType.SUBTITLE;default:return R.PlaylistLevelType.MAIN}}function u(i,A){var o=i.url;return(o===void 0||o.indexOf("data:")===0)&&(o=A.url),o}var s=function(){function i(o){this.hls=void 0,this.loaders=Object.create(null),this.hls=o,this.registerListeners()}var A=i.prototype;return A.registerListeners=function(){var a=this.hls;a.on(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(F.Events.LEVEL_LOADING,this.onLevelLoading,this),a.on(F.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),a.on(F.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},A.unregisterListeners=function(){var a=this.hls;a.off(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(F.Events.LEVEL_LOADING,this.onLevelLoading,this),a.off(F.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),a.off(F.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},A.createInternalLoader=function(a){var r=this.hls.config,t=r.pLoader,y=r.loader,_=t||y,E=new _(r);return a.loader=E,this.loaders[a.type]=E,E},A.getInternalLoader=function(a){return this.loaders[a.type]},A.resetInternalLoader=function(a){this.loaders[a]&&delete this.loaders[a]},A.destroyInternalLoaders=function(){for(var a in this.loaders){var r=this.loaders[a];r&&r.destroy(),this.resetInternalLoader(a)}},A.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},A.onManifestLoading=function(a,r){var t=r.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:R.PlaylistContextType.MANIFEST,url:t,deliveryDirectives:null})},A.onLevelLoading=function(a,r){var t=r.id,y=r.level,_=r.url,E=r.deliveryDirectives;this.load({id:t,groupId:null,level:y,responseType:"text",type:R.PlaylistContextType.LEVEL,url:_,deliveryDirectives:E})},A.onAudioTrackLoading=function(a,r){var t=r.id,y=r.groupId,_=r.url,E=r.deliveryDirectives;this.load({id:t,groupId:y,level:null,responseType:"text",type:R.PlaylistContextType.AUDIO_TRACK,url:_,deliveryDirectives:E})},A.onSubtitleTrackLoading=function(a,r){var t=r.id,y=r.groupId,_=r.url,E=r.deliveryDirectives;this.load({id:t,groupId:y,level:null,responseType:"text",type:R.PlaylistContextType.SUBTITLE_TRACK,url:_,deliveryDirectives:E})},A.load=function(a){var r,t=this.hls.config,y=this.getInternalLoader(a);if(y){var _=y.context;if(_&&_.url===a.url){X.logger.trace("[playlist-loader]: playlist request ongoing");return}X.logger.log("[playlist-loader]: aborting previous loader for type: "+a.type),y.abort()}var E,B,C,h;switch(a.type){case R.PlaylistContextType.MANIFEST:E=t.manifestLoadingMaxRetry,B=t.manifestLoadingTimeOut,C=t.manifestLoadingRetryDelay,h=t.manifestLoadingMaxRetryTimeout;break;case R.PlaylistContextType.LEVEL:case R.PlaylistContextType.AUDIO_TRACK:case R.PlaylistContextType.SUBTITLE_TRACK:E=0,B=t.levelLoadingTimeOut;break;default:E=t.levelLoadingMaxRetry,B=t.levelLoadingTimeOut,C=t.levelLoadingRetryDelay,h=t.levelLoadingMaxRetryTimeout;break}if(y=this.createInternalLoader(a),(r=a.deliveryDirectives)!==null&&r!==void 0&&r.part){var n;if(a.type===R.PlaylistContextType.LEVEL&&a.level!==null?n=this.hls.levels[a.level].details:a.type===R.PlaylistContextType.AUDIO_TRACK&&a.id!==null?n=this.hls.audioTracks[a.id].details:a.type===R.PlaylistContextType.SUBTITLE_TRACK&&a.id!==null&&(n=this.hls.subtitleTracks[a.id].details),n){var l=n.partTarget,d=n.targetduration;l&&d&&(B=Math.min(Math.max(l*3,d*.8)*1e3,B))}}var b={timeout:B,maxRetry:E,retryDelay:C,maxRetryDelay:h,highWaterMark:0},m={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};y.load(a,b,m)},A.loadsuccess=function(a,r,t,y){if(y===void 0&&(y=null),t.isSidxRequest){this.handleSidxRequest(a,t),this.handlePlaylistLoaded(a,r,t,y);return}this.resetInternalLoader(t.type);var _=a.data;if(_.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(a,t,"no EXTM3U delimiter",y);return}r.parsing.start=performance.now(),_.indexOf("#EXTINF:")>0||_.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(a,r,t,y):this.handleMasterPlaylist(a,r,t,y)},A.loaderror=function(a,r,t){t===void 0&&(t=null),this.handleNetworkError(r,t,!1,a)},A.loadtimeout=function(a,r,t){t===void 0&&(t=null),this.handleNetworkError(r,t,!0)},A.handleMasterPlaylist=function(a,r,t,y){var _=this.hls,E=a.data,B=u(a,t),C=e.default.parseMasterPlaylist(E,B),h=C.levels,n=C.sessionData;if(!h.length){this.handleManifestParsingError(a,t,"no level found in manifest",y);return}var l=h.map(function(N){return{id:N.attrs.AUDIO,audioCodec:N.audioCodec}}),d=h.map(function(N){return{id:N.attrs.SUBTITLES,textCodec:N.textCodec}}),b=e.default.parseMasterPlaylistMedia(E,B,"AUDIO",l),m=e.default.parseMasterPlaylistMedia(E,B,"SUBTITLES",d),c=e.default.parseMasterPlaylistMedia(E,B,"CLOSED-CAPTIONS");if(b.length){var L=b.some(function(N){return!N.url});!L&&h[0].audioCodec&&!h[0].attrs.AUDIO&&(X.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),b.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new g.AttrList({}),bitrate:0,url:""}))}_.trigger(F.Events.MANIFEST_LOADED,{levels:h,audioTracks:b,subtitles:m,captions:c,url:B,stats:r,networkDetails:y,sessionData:n})},A.handleTrackOrLevelPlaylist=function(a,r,t,y){var _=this.hls,E=t.id,B=t.level,C=t.type,h=u(a,t),n=Object(V.isFiniteNumber)(E)?E:0,l=Object(V.isFiniteNumber)(B)?B:n,d=v(t),b=e.default.parseLevelPlaylist(a.data,h,l,d,n);if(!b.fragments.length){_.trigger(F.Events.ERROR,{type:O.ErrorTypes.NETWORK_ERROR,details:O.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:h,reason:"no fragments found in level",level:typeof t.level=="number"?t.level:void 0});return}if(C===R.PlaylistContextType.MANIFEST){var m={attrs:new g.AttrList({}),bitrate:0,details:b,name:"",url:h};_.trigger(F.Events.MANIFEST_LOADED,{levels:[m],audioTracks:[],url:h,stats:r,networkDetails:y,sessionData:null})}if(r.parsing.end=performance.now(),b.needSidxRanges){var c,L=(c=b.fragments[0].initSegment)===null||c===void 0?void 0:c.url;this.load({url:L,isSidxRequest:!0,type:C,level:B,levelDetails:b,id:E,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}t.levelDetails=b,this.handlePlaylistLoaded(a,r,t,y)},A.handleSidxRequest=function(a,r){var t=Object(M.parseSegmentIndex)(new Uint8Array(a.data));if(!t)return;var y=t.references,_=r.levelDetails;y.forEach(function(E,B){var C=E.info,h=_.fragments[B];h.byteRange.length===0&&h.setByteRange(String(1+C.end-C.start)+"@"+String(C.start)),h.initSegment&&h.initSegment.setByteRange(String(t.moovEndOffset)+"@0")})},A.handleManifestParsingError=function(a,r,t,y){this.hls.trigger(F.Events.ERROR,{type:O.ErrorTypes.NETWORK_ERROR,details:O.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:r.type===R.PlaylistContextType.MANIFEST,url:a.url,reason:t,response:a,context:r,networkDetails:y})},A.handleNetworkError=function(a,r,t,y){t===void 0&&(t=!1),X.logger.warn("[playlist-loader]: A network "+(t?"timeout":"error")+" occurred while loading "+a.type+" level: "+a.level+" id: "+a.id+' group-id: "'+a.groupId+'"');var _=O.ErrorDetails.UNKNOWN,E=!1,B=this.getInternalLoader(a);switch(a.type){case R.PlaylistContextType.MANIFEST:_=t?O.ErrorDetails.MANIFEST_LOAD_TIMEOUT:O.ErrorDetails.MANIFEST_LOAD_ERROR,E=!0;break;case R.PlaylistContextType.LEVEL:_=t?O.ErrorDetails.LEVEL_LOAD_TIMEOUT:O.ErrorDetails.LEVEL_LOAD_ERROR,E=!1;break;case R.PlaylistContextType.AUDIO_TRACK:_=t?O.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:O.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,E=!1;break;case R.PlaylistContextType.SUBTITLE_TRACK:_=t?O.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:O.ErrorDetails.SUBTITLE_LOAD_ERROR,E=!1;break}B&&this.resetInternalLoader(a.type);var C={type:O.ErrorTypes.NETWORK_ERROR,details:_,fatal:E,url:a.url,loader:B,context:a,networkDetails:r};y&&(C.response=y),this.hls.trigger(F.Events.ERROR,C)},A.handlePlaylistLoaded=function(a,r,t,y){var _=t.type,E=t.level,B=t.id,C=t.groupId,h=t.loader,n=t.levelDetails,l=t.deliveryDirectives;if(!(n!=null&&n.targetduration)){this.handleManifestParsingError(a,t,"invalid target duration",y);return}if(!h)return;n.live&&(h.getCacheAge&&(n.ageHeader=h.getCacheAge()||0),(!h.getCacheAge||isNaN(n.ageHeader))&&(n.ageHeader=0));switch(_){case R.PlaylistContextType.MANIFEST:case R.PlaylistContextType.LEVEL:this.hls.trigger(F.Events.LEVEL_LOADED,{details:n,level:E||0,id:B||0,stats:r,networkDetails:y,deliveryDirectives:l});break;case R.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(F.Events.AUDIO_TRACK_LOADED,{details:n,id:B||0,groupId:C||"",stats:r,networkDetails:y,deliveryDirectives:l});break;case R.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(F.Events.SUBTITLE_TRACK_LOADED,{details:n,id:B||0,groupId:C||"",stats:r,networkDetails:y,deliveryDirectives:l});break}},i}();G.default=s},"./src/polyfills/number.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"isFiniteNumber",function(){return V}),D.d(G,"MAX_SAFE_INTEGER",function(){return F});var V=Number.isFinite||function(O){return typeof O=="number"&&isFinite(O)},F=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(se,G,D){"use strict";D.r(G);var V=function(){function F(){}return F.getSilentFrame=function(X,M){switch(X){case"mp4a.40.2":if(M===1)return new Uint8Array([0,200,0,128,35,128]);if(M===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(M===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(M===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(M===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(M===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(M===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(M===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(M===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},F}();G.default=V},"./src/remux/mp4-generator.ts":function(se,G,D){"use strict";D.r(G);var V=Math.pow(2,32)-1,F=function(){function O(){}return O.init=function(){O.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 M;for(M in O.types)O.types.hasOwnProperty(M)&&(O.types[M]=[M.charCodeAt(0),M.charCodeAt(1),M.charCodeAt(2),M.charCodeAt(3)]);var e=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),R=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);O.HDLR_TYPES={video:e,audio:R};var g=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),v=new Uint8Array([0,0,0,0,0,0,0,0]);O.STTS=O.STSC=O.STCO=v,O.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),O.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),O.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),O.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var u=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),i=new Uint8Array([0,0,0,1]);O.FTYP=O.box(O.types.ftyp,u,i,u,s),O.DINF=O.box(O.types.dinf,O.box(O.types.dref,g))},O.box=function(M){for(var e=8,R=arguments.length,g=new Array(R>1?R-1:0),v=1;v<R;v++)g[v-1]=arguments[v];for(var u=g.length,s=u;u--;)e+=g[u].byteLength;var i=new Uint8Array(e);for(i[0]=e>>24&255,i[1]=e>>16&255,i[2]=e>>8&255,i[3]=e&255,i.set(M,4),u=0,e=8;u<s;u++)i.set(g[u],e),e+=g[u].byteLength;return i},O.hdlr=function(M){return O.box(O.types.hdlr,O.HDLR_TYPES[M])},O.mdat=function(M){return O.box(O.types.mdat,M)},O.mdhd=function(M,e){e*=M;var R=Math.floor(e/(V+1)),g=Math.floor(e%(V+1));return O.box(O.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,M>>24&255,M>>16&255,M>>8&255,M&255,R>>24,R>>16&255,R>>8&255,R&255,g>>24,g>>16&255,g>>8&255,g&255,85,196,0,0]))},O.mdia=function(M){return O.box(O.types.mdia,O.mdhd(M.timescale,M.duration),O.hdlr(M.type),O.minf(M))},O.mfhd=function(M){return O.box(O.types.mfhd,new Uint8Array([0,0,0,0,M>>24,M>>16&255,M>>8&255,M&255]))},O.minf=function(M){return M.type==="audio"?O.box(O.types.minf,O.box(O.types.smhd,O.SMHD),O.DINF,O.stbl(M)):O.box(O.types.minf,O.box(O.types.vmhd,O.VMHD),O.DINF,O.stbl(M))},O.moof=function(M,e,R){return O.box(O.types.moof,O.mfhd(M),O.traf(R,e))},O.moov=function(M){for(var e=M.length,R=[];e--;)R[e]=O.trak(M[e]);return O.box.apply(null,[O.types.moov,O.mvhd(M[0].timescale,M[0].duration)].concat(R).concat(O.mvex(M)))},O.mvex=function(M){for(var e=M.length,R=[];e--;)R[e]=O.trex(M[e]);return O.box.apply(null,[O.types.mvex].concat(R))},O.mvhd=function(M,e){e*=M;var R=Math.floor(e/(V+1)),g=Math.floor(e%(V+1)),v=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,M>>24&255,M>>16&255,M>>8&255,M&255,R>>24,R>>16&255,R>>8&255,R&255,g>>24,g>>16&255,g>>8&255,g&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 O.box(O.types.mvhd,v)},O.sdtp=function(M){var e=M.samples||[],R=new Uint8Array(4+e.length),g,v;for(g=0;g<e.length;g++)v=e[g].flags,R[g+4]=v.dependsOn<<4|v.isDependedOn<<2|v.hasRedundancy;return O.box(O.types.sdtp,R)},O.stbl=function(M){return O.box(O.types.stbl,O.stsd(M),O.box(O.types.stts,O.STTS),O.box(O.types.stsc,O.STSC),O.box(O.types.stsz,O.STSZ),O.box(O.types.stco,O.STCO))},O.avc1=function(M){var e=[],R=[],g,v,u;for(g=0;g<M.sps.length;g++)v=M.sps[g],u=v.byteLength,e.push(u>>>8&255),e.push(u&255),e=e.concat(Array.prototype.slice.call(v));for(g=0;g<M.pps.length;g++)v=M.pps[g],u=v.byteLength,R.push(u>>>8&255),R.push(u&255),R=R.concat(Array.prototype.slice.call(v));var s=O.box(O.types.avcC,new Uint8Array([1,e[3],e[4],e[5],252|3,224|M.sps.length].concat(e).concat([M.pps.length]).concat(R))),i=M.width,A=M.height,o=M.pixelRatio[0],a=M.pixelRatio[1];return O.box(O.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,i>>8&255,i&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]),s,O.box(O.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),O.box(O.types.pasp,new Uint8Array([o>>24,o>>16&255,o>>8&255,o&255,a>>24,a>>16&255,a>>8&255,a&255])))},O.esds=function(M){var e=M.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(M.config).concat([6,1,2]))},O.mp4a=function(M){var e=M.samplerate;return O.box(O.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,M.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]),O.box(O.types.esds,O.esds(M)))},O.mp3=function(M){var e=M.samplerate;return O.box(O.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,M.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]))},O.stsd=function(M){return M.type==="audio"?!M.isAAC&&M.codec==="mp3"?O.box(O.types.stsd,O.STSD,O.mp3(M)):O.box(O.types.stsd,O.STSD,O.mp4a(M)):O.box(O.types.stsd,O.STSD,O.avc1(M))},O.tkhd=function(M){var e=M.id,R=M.duration*M.timescale,g=M.width,v=M.height,u=Math.floor(R/(V+1)),s=Math.floor(R%(V+1));return O.box(O.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,0,0,0,0,u>>24,u>>16&255,u>>8&255,u&255,s>>24,s>>16&255,s>>8&255,s&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,g>>8&255,g&255,0,0,v>>8&255,v&255,0,0]))},O.traf=function(M,e){var R=O.sdtp(M),g=M.id,v=Math.floor(e/(V+1)),u=Math.floor(e%(V+1));return O.box(O.types.traf,O.box(O.types.tfhd,new Uint8Array([0,0,0,0,g>>24,g>>16&255,g>>8&255,g&255])),O.box(O.types.tfdt,new Uint8Array([1,0,0,0,v>>24,v>>16&255,v>>8&255,v&255,u>>24,u>>16&255,u>>8&255,u&255])),O.trun(M,R.length+16+20+8+16+8+8),R)},O.trak=function(M){return M.duration=M.duration||4294967295,O.box(O.types.trak,O.tkhd(M),O.mdia(M))},O.trex=function(M){var e=M.id;return O.box(O.types.trex,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,e&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},O.trun=function(M,e){var R=M.samples||[],g=R.length,v=12+16*g,u=new Uint8Array(v),s,i,A,o,a,r;for(e+=8+v,u.set([0,0,15,1,g>>>24&255,g>>>16&255,g>>>8&255,g&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255],0),s=0;s<g;s++)i=R[s],A=i.duration,o=i.size,a=i.flags,r=i.cts,u.set([A>>>24&255,A>>>16&255,A>>>8&255,A&255,o>>>24&255,o>>>16&255,o>>>8&255,o&255,a.isLeading<<2|a.dependsOn,a.isDependedOn<<6|a.hasRedundancy<<4|a.paddingValue<<1|a.isNonSync,a.degradPrio&240<<8,a.degradPrio&15,r>>>24&255,r>>>16&255,r>>>8&255,r&255],12+16*s);return O.box(O.types.trun,u)},O.initSegment=function(M){O.types||O.init();var e=O.moov(M),R=new Uint8Array(O.FTYP.byteLength+e.byteLength);return R.set(O.FTYP),R.set(e,O.FTYP.byteLength),R},O}();F.types=void 0,F.HDLR_TYPES=void 0,F.STTS=void 0,F.STSC=void 0,F.STCO=void 0,F.STSZ=void 0,F.VMHD=void 0,F.SMHD=void 0,F.STSD=void 0,F.FTYP=void 0,F.DINF=void 0,G.default=F},"./src/remux/mp4-remuxer.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return r}),D.d(G,"normalizePts",function(){return t});var V=D("./src/polyfills/number.ts"),F=D("./src/remux/aac-helper.ts"),O=D("./src/remux/mp4-generator.ts"),X=D("./src/events.ts"),M=D("./src/errors.ts"),e=D("./src/utils/logger.ts"),R=D("./src/types/loader.ts"),g=D("./src/utils/timescale-conversion.ts");function v(){return v=Object.assign||function(B){for(var C=1;C<arguments.length;C++){var h=arguments[C];for(var n in h)Object.prototype.hasOwnProperty.call(h,n)&&(B[n]=h[n])}return B},v.apply(this,arguments)}var u=10*1e3,s=1024,i=1152,A=null,o=null,a=!1,r=function(){function B(h,n,l,d){if(d===void 0&&(d=""),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=h,this.config=n,this.typeSupported=l,this.ISGenerated=!1,A===null){var b=navigator.userAgent||"",m=b.match(/Chrome\/(\d+)/i);A=m?parseInt(m[1]):0}if(o===null){var c=navigator.userAgent.match(/Safari\/(\d+)/i);o=c?parseInt(c[1]):0}a=!!A&&A<75||!!o&&o<600}var C=B.prototype;return C.destroy=function(){},C.resetTimeStamp=function(n){e.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=n},C.resetNextTimestamp=function(){e.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},C.resetInitSegment=function(){e.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},C.getVideoStartPts=function(n){var l=!1,d=n.reduce(function(b,m){var c=m.pts-b;return c<-4294967296?(l=!0,t(b,m.pts)):c>0?b:m.pts},n[0].pts);return l&&e.logger.debug("PTS rollover detected"),d},C.remux=function(n,l,d,b,m,c,L,N){var T,P,W,U,Y,re,me=m,ge=m,Oe=n.pid>-1,Se=l.pid>-1,Be=l.samples.length,Ne=n.samples.length>0,ke=Be>1,Ce=(!Oe||Ne)&&(!Se||ke)||this.ISGenerated||L;if(Ce){this.ISGenerated||(W=this.generateIS(n,l,m));var ve=this.isVideoContiguous,Ye=-1;if(ke&&(Ye=y(l.samples),!ve&&this.config.forceKeyFrameOnDiscontinuity))if(re=!0,Ye>0){e.logger.warn("[mp4-remuxer]: Dropped "+Ye+" out of "+Be+" video samples due to a missing keyframe");var ht=this.getVideoStartPts(l.samples);l.samples=l.samples.slice(Ye),l.dropped+=Ye,ge+=(l.samples[0].pts-ht)/(l.timescale||9e4)}else Ye===-1&&(e.logger.warn("[mp4-remuxer]: No keyframe found out of "+Be+" video samples"),re=!1);if(this.ISGenerated){if(Ne&&ke){var at=this.getVideoStartPts(l.samples),We=t(n.samples[0].pts,at)-at,it=We/l.inputTimeScale;me+=Math.max(0,it),ge+=Math.max(0,-it)}if(Ne){if(n.samplerate||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),W=this.generateIS(n,l,m)),P=this.remuxAudio(n,me,this.isAudioContiguous,c,Se||ke||N===R.PlaylistLevelType.AUDIO?ge:void 0),ke){var ne=P?P.endPTS-P.startPTS:0;l.inputTimeScale||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),W=this.generateIS(n,l,m)),T=this.remuxVideo(l,ge,ve,ne)}}else ke&&(T=this.remuxVideo(l,ge,ve,0));T&&(T.firstKeyFrame=Ye,T.independent=Ye!==-1)}}return this.ISGenerated&&(d.samples.length&&(Y=this.remuxID3(d,m)),b.samples.length&&(U=this.remuxText(b,m))),{audio:P,video:T,initSegment:W,independent:re,text:U,id3:Y}},C.generateIS=function(n,l,d){var b=n.samples,m=l.samples,c=this.typeSupported,L={},N=!Object(V.isFiniteNumber)(this._initPTS),T="audio/mp4",P,W,U;if(N&&(P=W=Infinity),n.config&&b.length&&(n.timescale=n.samplerate,n.isAAC||(c.mpeg?(T="audio/mpeg",n.codec=""):c.mp3&&(n.codec="mp3")),L.audio={id:"audio",container:T,codec:n.codec,initSegment:!n.isAAC&&c.mpeg?new Uint8Array(0):O.default.initSegment([n]),metadata:{channelCount:n.channelCount}},N&&(U=n.inputTimeScale,P=W=b[0].pts-Math.round(U*d))),l.sps&&l.pps&&m.length&&(l.timescale=l.inputTimeScale,L.video={id:"main",container:"video/mp4",codec:l.codec,initSegment:O.default.initSegment([l]),metadata:{width:l.width,height:l.height}},N)){U=l.inputTimeScale;var Y=this.getVideoStartPts(m),re=Math.round(U*d);W=Math.min(W,t(m[0].dts,Y)-re),P=Math.min(P,Y-re)}if(Object.keys(L).length)return this.ISGenerated=!0,N&&(this._initPTS=P,this._initDTS=W),{tracks:L,initPTS:P,timescale:U}},C.remuxVideo=function(n,l,d,b){var m=n.inputTimeScale,c=n.samples,L=[],N=c.length,T=this._initPTS,P=this.nextAvcDts,W=8,U,Y,re,me=Number.POSITIVE_INFINITY,ge=Number.NEGATIVE_INFINITY,Oe=0,Se=!1;if(!d||P===null){var Be=l*m,Ne=c[0].pts-t(c[0].dts,c[0].pts);P=Be-Ne}for(var ke=0;ke<N;ke++){var Ce=c[ke];if(Ce.pts=t(Ce.pts-T,P),Ce.dts=t(Ce.dts-T,P),Ce.dts>Ce.pts){var ve=9e4*.2;Oe=Math.max(Math.min(Oe,Ce.pts-Ce.dts),-1*ve)}Ce.dts<c[ke>0?ke-1:ke].dts&&(Se=!0)}Se&&c.sort(function(Lt,mt){var tt=Lt.dts-mt.dts,er=Lt.pts-mt.pts;return tt||er}),Y=c[0].dts,re=c[c.length-1].dts;var Ye=Math.round((re-Y)/(N-1));if(Oe<0){if(Oe<Ye*-2){e.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(g.toMsFromMpegTsClock)(-Ye,!0)+" ms");for(var ht=Oe,at=0;at<N;at++)c[at].dts=ht=Math.max(ht,c[at].pts-Ye),c[at].pts=Math.max(ht,c[at].pts)}else{e.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(g.toMsFromMpegTsClock)(Oe,!0)+" ms to overcome this issue");for(var We=0;We<N;We++)c[We].dts=c[We].dts+Oe}Y=c[0].dts}if(d){var it=Y-P,ne=it>Ye,J=it<-1;if(ne||J){ne?e.logger.warn("AVC: "+Object(g.toMsFromMpegTsClock)(it,!0)+" ms ("+it+"dts) hole between fragments detected, filling it"):e.logger.warn("AVC: "+Object(g.toMsFromMpegTsClock)(-it,!0)+" ms ("+it+"dts) overlapping between fragments detected"),Y=P;var k=c[0].pts-it;c[0].dts=Y,c[0].pts=k,e.logger.log("Video: First PTS/DTS adjusted: "+Object(g.toMsFromMpegTsClock)(k,!0)+"/"+Object(g.toMsFromMpegTsClock)(Y,!0)+", delta: "+Object(g.toMsFromMpegTsClock)(it,!0)+" ms")}}a&&(Y=Math.max(0,Y));for(var $=0,q=0,he=0;he<N;he++){for(var pe=c[he],Ke=pe.units,Je=Ke.length,ze=0,Ze=0;Ze<Je;Ze++)ze+=Ke[Ze].data.length;q+=ze,$+=Je,pe.length=ze,pe.dts=Math.max(pe.dts,Y),pe.pts=Math.max(pe.pts,pe.dts,0),me=Math.min(pe.pts,me),ge=Math.max(pe.pts,ge)}re=c[N-1].dts;var nt=q+4*$+8,pt;try{pt=new Uint8Array(nt)}catch(Lt){this.observer.emit(X.Events.ERROR,X.Events.ERROR,{type:M.ErrorTypes.MUX_ERROR,details:M.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:nt,reason:"fail allocating video mdat "+nt});return}var xe=new DataView(pt.buffer);xe.setUint32(0,nt),pt.set(O.default.types.mdat,4);for(var Ue=0;Ue<N;Ue++){for(var Qe=c[Ue],je=Qe.units,Le=0,Fe=0,we=je.length;Fe<we;Fe++){var ue=je[Fe],ce=ue.data,te=ue.data.byteLength;xe.setUint32(W,te),W+=4,pt.set(ce,W),W+=te,Le+=4+te}if(Ue<N-1)U=c[Ue+1].dts-Qe.dts;else{var ie=this.config,le=Qe.dts-c[Ue>0?Ue-1:Ue].dts;if(ie.stretchShortVideoTrack&&this.nextAudioPts!==null){var fe=Math.floor(ie.maxBufferHole*m),Ie=(b?me+b*m:this.nextAudioPts)-Qe.pts;Ie>fe?(U=Ie-le,U<0&&(U=le),e.logger.log("[mp4-remuxer]: It is approximately "+Ie/90+" ms to the next segment; using duration "+U/90+" ms for the last video frame.")):U=le}else U=le}var Pe=Math.round(Qe.pts-Qe.dts);L.push(new _(Qe.key,U,Le,Pe))}if(L.length&&A&&A<70){var qe=L[0].flags;qe.dependsOn=2,qe.isNonSync=0}console.assert(U!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=P=re+U,this.isVideoContiguous=!0;var dt=O.default.moof(n.sequenceNumber++,Y,v({},n,{samples:L})),lt="video",st={data1:dt,data2:pt,startPTS:me/m,endPTS:(ge+U)/m,startDTS:Y/m,endDTS:P/m,type:lt,hasAudio:!1,hasVideo:!0,nb:L.length,dropped:n.dropped};return n.samples=[],n.dropped=0,console.assert(pt.length,"MDAT length must not be zero"),st},C.remuxAudio=function(n,l,d,b,m){var c=n.inputTimeScale,L=n.samplerate?n.samplerate:c,N=c/L,T=n.isAAC?s:i,P=T*N,W=this._initPTS,U=!n.isAAC&&this.typeSupported.mpeg,Y=[],re=n.samples,me=U?0:8,ge=this.nextAudioPts||-1,Oe=l*c;if(this.isAudioContiguous=d=d||re.length&&ge>0&&(b&&Math.abs(Oe-ge)<9e3||Math.abs(t(re[0].pts-W,Oe)-ge)<20*P),re.forEach(function(ce){ce.pts=t(ce.pts-W,Oe)}),!d||ge<0){if(re=re.filter(function(ce){return ce.pts>=0}),!re.length)return;m===0?ge=0:b?ge=Math.max(0,Oe):ge=re[0].pts}if(n.isAAC)for(var Se=m!==void 0,Be=this.config.maxAudioFramesDrift,Ne=0,ke=ge;Ne<re.length;Ne++){var Ce=re[Ne],ve=Ce.pts,Ye=ve-ke,ht=Math.abs(1e3*Ye/c);if(Ye<=-Be*P&&Se)Ne===0&&(e.logger.warn("Audio frame @ "+(ve/c).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*Ye/c)+" ms."),this.nextAudioPts=ge=ke=ve);else if(Ye>=Be*P&&ht<u&&Se){var at=Math.round(Ye/P);ke=ve-at*P,ke<0&&(at--,ke+=P),Ne===0&&(this.nextAudioPts=ge=ke),e.logger.warn("[mp4-remuxer]: Injecting "+at+" audio frame @ "+(ke/c).toFixed(3)+"s due to "+Math.round(1e3*Ye/c)+" ms gap.");for(var We=0;We<at;We++){var it=Math.max(ke,0),ne=F.default.getSilentFrame(n.manifestCodec||n.codec,n.channelCount);ne||(e.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ne=Ce.unit.subarray()),re.splice(Ne,0,{unit:ne,pts:it}),ke+=P,Ne++}}Ce.pts=ke,ke+=P}for(var J=null,k=null,$,q=0,he=re.length;he--;)q+=re[he].unit.byteLength;for(var pe=0,Ke=re.length;pe<Ke;pe++){var Je=re[pe],ze=Je.unit,Ze=Je.pts;if(k!==null){var nt=Y[pe-1];nt.duration=Math.round((Ze-k)/N)}else if(d&&n.isAAC&&(Ze=ge),J=Ze,q>0){q+=me;try{$=new Uint8Array(q)}catch(ce){this.observer.emit(X.Events.ERROR,X.Events.ERROR,{type:M.ErrorTypes.MUX_ERROR,details:M.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:q,reason:"fail allocating audio mdat "+q});return}if(!U){var pt=new DataView($.buffer);pt.setUint32(0,q),$.set(O.default.types.mdat,4)}}else return;$.set(ze,me);var xe=ze.byteLength;me+=xe,Y.push(new _(!0,T,xe,0)),k=Ze}var Ue=Y.length;if(!Ue)return;var Qe=Y[Y.length-1];this.nextAudioPts=ge=k+N*Qe.duration;var je=U?new Uint8Array(0):O.default.moof(n.sequenceNumber++,J/N,v({},n,{samples:Y}));n.samples=[];var Le=J/c,Fe=ge/c,we="audio",ue={data1:je,data2:$,startPTS:Le,endPTS:Fe,startDTS:Le,endDTS:Fe,type:we,hasAudio:!0,hasVideo:!1,nb:Ue};return this.isAudioContiguous=!0,console.assert($.length,"MDAT length must not be zero"),ue},C.remuxEmptyAudio=function(n,l,d,b){var m=n.inputTimeScale,c=n.samplerate?n.samplerate:m,L=m/c,N=this.nextAudioPts,T=(N!==null?N:b.startDTS*m)+this._initDTS,P=b.endDTS*m+this._initDTS,W=L*s,U=Math.ceil((P-T)/W),Y=F.default.getSilentFrame(n.manifestCodec||n.codec,n.channelCount);if(e.logger.warn("[mp4-remuxer]: remux empty Audio"),!Y){e.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var re=[],me=0;me<U;me++){var ge=T+me*W;re.push({unit:Y,pts:ge,dts:ge})}return n.samples=re,this.remuxAudio(n,l,d,!1)},C.remuxID3=function(n,l){var d=n.samples.length;if(!d)return;for(var b=n.inputTimeScale,m=this._initPTS,c=this._initDTS,L=0;L<d;L++){var N=n.samples[L];N.pts=t(N.pts-m,l*b)/b,N.dts=t(N.dts-c,l*b)/b}var T=n.samples;return n.samples=[],{samples:T}},C.remuxText=function(n,l){var d=n.samples.length;if(!d)return;for(var b=n.inputTimeScale,m=this._initPTS,c=0;c<d;c++){var L=n.samples[c];L.pts=t(L.pts-m,l*b)/b}n.samples.sort(function(T,P){return T.pts-P.pts});var N=n.samples;return n.samples=[],{samples:N}},B}();function t(B,C){var h;if(C===null)return B;for(C<B?h=-8589934592:h=8589934592;Math.abs(B-C)>4294967296;)B+=h;return B}function y(B){for(var C=0;C<B.length;C++)if(B[C].key)return C;return-1}var _=function(C,h,n,l){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=h,this.size=n,this.cts=l,this.flags=new E(C)},E=function(C){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=C?2:1,this.isNonSync=C?0:1}},"./src/remux/passthrough-remuxer.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/polyfills/number.ts"),F=D("./src/utils/mp4-tools.ts"),O=D("./src/loader/fragment.ts"),X=D("./src/utils/logger.ts"),M=function(){function g(){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 v=g.prototype;return v.destroy=function(){},v.resetTimeStamp=function(s){this.initPTS=s,this.lastEndDTS=null},v.resetNextTimestamp=function(){this.lastEndDTS=null},v.resetInitSegment=function(s,i,A){this.audioCodec=i,this.videoCodec=A,this.generateInitSegment(s),this.emitInitSegment=!0},v.generateInitSegment=function(s){var i=this.audioCodec,A=this.videoCodec;if(!s||!s.byteLength){this.initTracks=void 0,this.initData=void 0;return}var o=this.initData=Object(F.parseInitSegment)(s);i||(i=R(o.audio,O.ElementaryStreamTypes.AUDIO)),A||(A=R(o.video,O.ElementaryStreamTypes.VIDEO));var a={};o.audio&&o.video?a.audiovideo={container:"video/mp4",codec:i+","+A,initSegment:s,id:"main"}:o.audio?a.audio={container:"audio/mp4",codec:i,initSegment:s,id:"audio"}:o.video?a.video={container:"video/mp4",codec:A,initSegment:s,id:"main"}:X.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=a},v.remux=function(s,i,A,o,a){var r=this.initPTS,t=this.lastEndDTS,y={audio:void 0,video:void 0,text:o,id3:A,initSegment:void 0};Object(V.isFiniteNumber)(t)||(t=this.lastEndDTS=a||0);var _=i.samples;if(!_||!_.length)return y;var E={initPTS:void 0,timescale:1},B=this.initData;if((!B||!B.length)&&(this.generateInitSegment(_),B=this.initData),!B||!B.length)return X.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),y;this.emitInitSegment&&(E.tracks=this.initTracks,this.emitInitSegment=!1),Object(V.isFiniteNumber)(r)||(this.initPTS=E.initPTS=r=e(B,_,t));var C=Object(F.getDuration)(_,B),h=t,n=C+h;Object(F.offsetStartDTS)(B,_,r),C>0?this.lastEndDTS=n:(X.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var l=!!B.audio,d=!!B.video,b="";l&&(b+="audio"),d&&(b+="video");var m={data1:_,startPTS:h,startDTS:h,endPTS:n,endDTS:n,type:b,hasAudio:l,hasVideo:d,nb:1,dropped:0};return y.audio=m.type==="audio"?m:void 0,y.video=m.type!=="audio"?m:void 0,y.text=o,y.id3=A,y.initSegment=E,y},g}(),e=function(v,u,s){return Object(F.getStartDTS)(v,u)-s};function R(g,v){var u=g==null?void 0:g.codec;return u&&u.length>4?u:u==="hvc1"?"hvc1.1.c.L120.90":u==="av01"?"av01.0.04M.08":u==="avc1"||v===O.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}G.default=M},"./src/task-loop.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return V});var V=function(){function F(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var O=F.prototype;return O.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},O.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},O.onHandlerDestroyed=function(){},O.hasInterval=function(){return!!this._tickInterval},O.hasNextTick=function(){return!!this._tickTimer},O.setInterval=function(M){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,M),!0)},O.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},O.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},O.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},O.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},O.doTick=function(){},F}()},"./src/types/cmcd.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"CMCDVersion",function(){return V}),D.d(G,"CMCDObjectType",function(){return F}),D.d(G,"CMCDStreamingFormat",function(){return O}),D.d(G,"CMCDStreamType",function(){return X});var V=1,F;(function(M){M.MANIFEST="m",M.AUDIO="a",M.VIDEO="v",M.MUXED="av",M.INIT="i",M.CAPTION="c",M.TIMED_TEXT="tt",M.KEY="k",M.OTHER="o"})(F||(F={}));var O;(function(M){M.DASH="d",M.HLS="h",M.SMOOTH="s",M.OTHER="o"})(O||(O={}));var X;(function(M){M.VOD="v",M.LIVE="l"})(X||(X={}))},"./src/types/level.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"HlsSkip",function(){return O}),D.d(G,"getSkipValue",function(){return X}),D.d(G,"HlsUrlParameters",function(){return M}),D.d(G,"Level",function(){return e});function V(R,g){for(var v=0;v<g.length;v++){var u=g[v];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(R,u.key,u)}}function F(R,g,v){return g&&V(R.prototype,g),v&&V(R,v),R}var O;(function(R){R.No="",R.Yes="YES",R.v2="v2"})(O||(O={}));function X(R,g){var v=R.canSkipUntil,u=R.canSkipDateRanges,s=R.endSN,i=g!==void 0?g-s:0;return v&&i<v?u?O.v2:O.Yes:O.No}var M=function(){function R(v,u,s){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=v,this.part=u,this.skip=s}var g=R.prototype;return g.addDirectives=function(u){var s=new self.URL(u);return this.msn!==void 0&&s.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&s.searchParams.set("_HLS_part",this.part.toString()),this.skip&&s.searchParams.set("_HLS_skip",this.skip),s.toString()},R}(),e=function(){function R(g){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=[g.url],this.attrs=g.attrs,this.bitrate=g.bitrate,g.details&&(this.details=g.details),this.id=g.id||0,this.name=g.name,this.width=g.width||0,this.height=g.height||0,this.audioCodec=g.audioCodec,this.videoCodec=g.videoCodec,this.unknownCodecs=g.unknownCodecs,this.codecSet=[g.videoCodec,g.audioCodec].filter(function(v){return v}).join(",").replace(/\.[^.,]+/g,"")}return F(R,[{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(v){var u=v%this.url.length;this._urlId!==u&&(this.details=void 0,this._urlId=u)}}]),R}()},"./src/types/loader.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"PlaylistContextType",function(){return V}),D.d(G,"PlaylistLevelType",function(){return F});var V;(function(O){O.MANIFEST="manifest",O.LEVEL="level",O.AUDIO_TRACK="audioTrack",O.SUBTITLE_TRACK="subtitleTrack"})(V||(V={}));var F;(function(O){O.MAIN="main",O.AUDIO="audio",O.SUBTITLE="subtitle"})(F||(F={}))},"./src/types/transmuxer.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"ChunkMetadata",function(){return V});var V=function(X,M,e,R,g,v){R===void 0&&(R=0),g===void 0&&(g=-1),v===void 0&&(v=!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=F(),this.buffering={audio:F(),video:F(),audiovideo:F()},this.level=X,this.sn=M,this.id=e,this.size=R,this.part=g,this.partial=v};function F(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"AttrList",function(){return O});var V=/^(\d+)x(\d+)$/,F=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,O=function(){function X(e){typeof e=="string"&&(e=X.parseAttrList(e));for(var R in e)e.hasOwnProperty(R)&&(this[R]=e[R])}var M=X.prototype;return M.decimalInteger=function(R){var g=parseInt(this[R],10);return g>Number.MAX_SAFE_INTEGER?Infinity:g},M.hexadecimalInteger=function(R){if(this[R]){var g=(this[R]||"0x").slice(2);g=(g.length&1?"0":"")+g;for(var v=new Uint8Array(g.length/2),u=0;u<g.length/2;u++)v[u]=parseInt(g.slice(u*2,u*2+2),16);return v}else return null},M.hexadecimalIntegerAsNumber=function(R){var g=parseInt(this[R],16);return g>Number.MAX_SAFE_INTEGER?Infinity:g},M.decimalFloatingPoint=function(R){return parseFloat(this[R])},M.optionalFloat=function(R,g){var v=this[R];return v?parseFloat(v):g},M.enumeratedString=function(R){return this[R]},M.bool=function(R){return this[R]==="YES"},M.decimalResolution=function(R){var g=V.exec(this[R]);return g===null?void 0:{width:parseInt(g[1],10),height:parseInt(g[2],10)}},X.parseAttrList=function(R){var g,v={},u='"';for(F.lastIndex=0;(g=F.exec(R))!==null;){var s=g[2];s.indexOf(u)===0&&s.lastIndexOf(u)===s.length-1&&(s=s.slice(1,-1)),v[g[1]]=s}return v},X}()},"./src/utils/binary-search.ts":function(se,G,D){"use strict";D.r(G);var V={search:function(O,X){for(var M=0,e=O.length-1,R=null,g=null;M<=e;){R=(M+e)/2|0,g=O[R];var v=X(g);if(v>0)M=R+1;else if(v<0)e=R-1;else return g}return null}};G.default=V},"./src/utils/buffer-helper.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"BufferHelper",function(){return O});var V=D("./src/utils/logger.ts"),F={length:0,start:function(){return 0},end:function(){return 0}},O=function(){function X(){}return X.isBuffered=function(e,R){try{if(e){for(var g=X.getBuffered(e),v=0;v<g.length;v++)if(R>=g.start(v)&&R<=g.end(v))return!0}}catch(u){}return!1},X.bufferInfo=function(e,R,g){try{if(e){var v=X.getBuffered(e),u=[],s;for(s=0;s<v.length;s++)u.push({start:v.start(s),end:v.end(s)});return this.bufferedInfo(u,R,g)}}catch(i){}return{len:0,start:R,end:R,nextStart:void 0}},X.bufferedInfo=function(e,R,g){R=Math.max(0,R),e.sort(function(E,B){var C=E.start-B.start;return C||B.end-E.end});var v=[];if(g)for(var u=0;u<e.length;u++){var s=v.length;if(s){var i=v[s-1].end;e[u].start-i<g?e[u].end>i&&(v[s-1].end=e[u].end):v.push(e[u])}else v.push(e[u])}else v=e;for(var A=0,o,a=R,r=R,t=0;t<v.length;t++){var y=v[t].start,_=v[t].end;if(R+g>=y&&R<_)a=y,r=_,A=r-R;else if(R+g<y){o=y;break}}return{len:A,start:a||0,end:r||0,nextStart:o}},X.getBuffered=function(e){try{return e.buffered}catch(R){return V.logger.log("failed to get media.buffered",R),F}},X}()},"./src/utils/cea-608-parser.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"Row",function(){return r}),D.d(G,"CaptionScreen",function(){return t});var V=D("./src/utils/logger.ts"),F={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},O=function(n){var l=n;return F.hasOwnProperty(n)&&(l=F[n]),String.fromCharCode(l)},X=15,M=100,e={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},R={17:2,18:4,21:6,22:8,23:10,19:13,20:15},g={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},v={25:2,26:4,29:6,30:8,31:10,27:13,28:15},u=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],s;(function(h){h[h.ERROR=0]="ERROR",h[h.TEXT=1]="TEXT",h[h.WARNING=2]="WARNING",h[h.INFO=2]="INFO",h[h.DEBUG=3]="DEBUG",h[h.DATA=3]="DATA"})(s||(s={}));var i=function(){function h(){this.time=null,this.verboseLevel=s.ERROR}var n=h.prototype;return n.log=function(d,b){this.verboseLevel>=d&&V.logger.log(this.time+" ["+d+"] "+b)},h}(),A=function(n){for(var l=[],d=0;d<n.length;d++)l.push(n[d].toString(16));return l},o=function(){function h(l,d,b,m,c){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=l||"white",this.underline=d||!1,this.italics=b||!1,this.background=m||"black",this.flash=c||!1}var n=h.prototype;return n.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},n.setStyles=function(d){for(var b=["foreground","underline","italics","background","flash"],m=0;m<b.length;m++){var c=b[m];d.hasOwnProperty(c)&&(this[c]=d[c])}},n.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},n.equals=function(d){return this.foreground===d.foreground&&this.underline===d.underline&&this.italics===d.italics&&this.background===d.background&&this.flash===d.flash},n.copy=function(d){this.foreground=d.foreground,this.underline=d.underline,this.italics=d.italics,this.background=d.background,this.flash=d.flash},n.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},h}(),a=function(){function h(l,d,b,m,c,L){this.uchar=void 0,this.penState=void 0,this.uchar=l||" ",this.penState=new o(d,b,m,c,L)}var n=h.prototype;return n.reset=function(){this.uchar=" ",this.penState.reset()},n.setChar=function(d,b){this.uchar=d,this.penState.copy(b)},n.setPenState=function(d){this.penState.copy(d)},n.equals=function(d){return this.uchar===d.uchar&&this.penState.equals(d.penState)},n.copy=function(d){this.uchar=d.uchar,this.penState.copy(d.penState)},n.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},h}(),r=function(){function h(l){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var d=0;d<M;d++)this.chars.push(new a);this.logger=l,this.pos=0,this.currPenState=new o}var n=h.prototype;return n.equals=function(d){for(var b=!0,m=0;m<M;m++)if(!this.chars[m].equals(d.chars[m])){b=!1;break}return b},n.copy=function(d){for(var b=0;b<M;b++)this.chars[b].copy(d.chars[b])},n.isEmpty=function(){for(var d=!0,b=0;b<M;b++)if(!this.chars[b].isEmpty()){d=!1;break}return d},n.setCursor=function(d){this.pos!==d&&(this.pos=d),this.pos<0?(this.logger.log(s.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>M&&(this.logger.log(s.DEBUG,"Too large cursor position "+this.pos),this.pos=M)},n.moveCursor=function(d){var b=this.pos+d;if(d>1)for(var m=this.pos+1;m<b+1;m++)this.chars[m].setPenState(this.currPenState);this.setCursor(b)},n.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},n.insertChar=function(d){d>=144&&this.backSpace();var b=O(d);if(this.pos>=M){this.logger.log(s.ERROR,"Cannot insert "+d.toString(16)+" ("+b+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(b,this.currPenState),this.moveCursor(1)},n.clearFromPos=function(d){var b;for(b=d;b<M;b++)this.chars[b].reset()},n.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},n.clearToEndOfRow=function(){this.clearFromPos(this.pos)},n.getTextString=function(){for(var d=[],b=!0,m=0;m<M;m++){var c=this.chars[m].uchar;c!==" "&&(b=!1),d.push(c)}return b?"":d.join("")},n.setPenStyles=function(d){this.currPenState.setStyles(d);var b=this.chars[this.pos];b.setPenState(this.currPenState)},h}(),t=function(){function h(l){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var d=0;d<X;d++)this.rows.push(new r(l));this.logger=l,this.currRow=X-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var n=h.prototype;return n.reset=function(){for(var d=0;d<X;d++)this.rows[d].clear();this.currRow=X-1},n.equals=function(d){for(var b=!0,m=0;m<X;m++)if(!this.rows[m].equals(d.rows[m])){b=!1;break}return b},n.copy=function(d){for(var b=0;b<X;b++)this.rows[b].copy(d.rows[b])},n.isEmpty=function(){for(var d=!0,b=0;b<X;b++)if(!this.rows[b].isEmpty()){d=!1;break}return d},n.backSpace=function(){var d=this.rows[this.currRow];d.backSpace()},n.clearToEndOfRow=function(){var d=this.rows[this.currRow];d.clearToEndOfRow()},n.insertChar=function(d){var b=this.rows[this.currRow];b.insertChar(d)},n.setPen=function(d){var b=this.rows[this.currRow];b.setPenStyles(d)},n.moveCursor=function(d){var b=this.rows[this.currRow];b.moveCursor(d)},n.setCursor=function(d){this.logger.log(s.INFO,"setCursor: "+d);var b=this.rows[this.currRow];b.setCursor(d)},n.setPAC=function(d){this.logger.log(s.INFO,"pacData = "+JSON.stringify(d));var b=d.row-1;if(this.nrRollUpRows&&b<this.nrRollUpRows-1&&(b=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==b){for(var m=0;m<X;m++)this.rows[m].clear();var c=this.currRow+1-this.nrRollUpRows,L=this.lastOutputScreen;if(L){var N=L.rows[c].cueStartTime,T=this.logger.time;if(N&&T!==null&&N<T)for(var P=0;P<this.nrRollUpRows;P++)this.rows[b-this.nrRollUpRows+P+1].copy(L.rows[c+P])}}this.currRow=b;var W=this.rows[this.currRow];if(d.indent!==null){var U=d.indent,Y=Math.max(U-1,0);W.setCursor(d.indent),d.color=W.chars[Y].penState.foreground}var re={foreground:d.color,underline:d.underline,italics:d.italics,background:"black",flash:!1};this.setPen(re)},n.setBkgData=function(d){this.logger.log(s.INFO,"bkgData = "+JSON.stringify(d)),this.backSpace(),this.setPen(d),this.insertChar(32)},n.setRollUpRows=function(d){this.nrRollUpRows=d},n.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(s.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(s.TEXT,this.getDisplayText());var d=this.currRow+1-this.nrRollUpRows,b=this.rows.splice(d,1)[0];b.clear(),this.rows.splice(this.currRow,0,b),this.logger.log(s.INFO,"Rolling up")},n.getDisplayText=function(d){d=d||!1;for(var b=[],m="",c=-1,L=0;L<X;L++){var N=this.rows[L].getTextString();N&&(c=L+1,d?b.push("Row "+c+": '"+N+"'"):b.push(N.trim()))}return b.length>0&&(d?m="["+b.join(" | ")+"]":m=b.join(`
|
|
`)),m},n.getTextAndFormat=function(){return this.rows},h}(),y=function(){function h(l,d,b){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=l,this.outputFilter=d,this.mode=null,this.verbose=0,this.displayedMemory=new t(b),this.nonDisplayedMemory=new t(b),this.lastOutputScreen=new t(b),this.currRollUpRow=this.displayedMemory.rows[X-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=b}var n=h.prototype;return n.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[X-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},n.getHandler=function(){return this.outputFilter},n.setHandler=function(d){this.outputFilter=d},n.setPAC=function(d){this.writeScreen.setPAC(d)},n.setBkgData=function(d){this.writeScreen.setBkgData(d)},n.setMode=function(d){if(d===this.mode)return;this.mode=d,this.logger.log(s.INFO,"MODE="+d),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=d},n.insertChars=function(d){for(var b=0;b<d.length;b++)this.writeScreen.insertChar(d[b]);var m=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(s.INFO,m+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(s.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},n.ccRCL=function(){this.logger.log(s.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},n.ccBS=function(){if(this.logger.log(s.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},n.ccAOF=function(){},n.ccAON=function(){},n.ccDER=function(){this.logger.log(s.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},n.ccRU=function(d){this.logger.log(s.INFO,"RU("+d+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(d)},n.ccFON=function(){this.logger.log(s.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},n.ccRDC=function(){this.logger.log(s.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},n.ccTR=function(){this.logger.log(s.INFO,"TR"),this.setMode("MODE_TEXT")},n.ccRTD=function(){this.logger.log(s.INFO,"RTD"),this.setMode("MODE_TEXT")},n.ccEDM=function(){this.logger.log(s.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},n.ccCR=function(){this.logger.log(s.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},n.ccENM=function(){this.logger.log(s.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},n.ccEOC=function(){if(this.logger.log(s.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var d=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=d,this.writeScreen=this.nonDisplayedMemory,this.logger.log(s.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},n.ccTO=function(d){this.logger.log(s.INFO,"TO("+d+") - Tab Offset"),this.writeScreen.moveCursor(d)},n.ccMIDROW=function(d){var b={flash:!1};if(b.underline=d%2===1,b.italics=d>=46,b.italics)b.foreground="white";else{var m=Math.floor(d/2)-16,c=["white","green","blue","cyan","red","yellow","magenta"];b.foreground=c[m]}this.logger.log(s.INFO,"MIDROW: "+JSON.stringify(b)),this.writeScreen.setPen(b)},n.outputDataUpdate=function(d){d===void 0&&(d=!1);var b=this.logger.time;if(b===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=b:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,b,this.lastOutputScreen),d&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:b),this.lastOutputScreen.copy(this.displayedMemory))},n.cueSplitAtTime=function(d){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,d,this.displayedMemory),this.cueStartTime=d))},h}(),_=function(){function h(l,d,b){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var m=new i;this.channels=[null,new y(l,d,m),new y(l+1,b,m)],this.cmdHistory=C(),this.logger=m}var n=h.prototype;return n.getHandler=function(d){return this.channels[d].getHandler()},n.setHandler=function(d,b){this.channels[d].setHandler(b)},n.addData=function(d,b){var m,c,L,N=!1;this.logger.time=d;for(var T=0;T<b.length;T+=2){if(c=b[T]&127,L=b[T+1]&127,c===0&&L===0)continue;if(this.logger.log(s.DATA,"["+A([b[T],b[T+1]])+"] -> ("+A([c,L])+")"),m=this.parseCmd(c,L),m||(m=this.parseMidrow(c,L)),m||(m=this.parsePAC(c,L)),m||(m=this.parseBackgroundAttributes(c,L)),!m&&(N=this.parseChars(c,L),N)){var P=this.currentChannel;if(P&&P>0){var W=this.channels[P];W.insertChars(N)}else this.logger.log(s.WARNING,"No channel found yet. TEXT-MODE?")}!m&&!N&&this.logger.log(s.WARNING,"Couldn't parse cleaned data "+A([c,L])+" orig: "+A([b[T],b[T+1]]))}},n.parseCmd=function(d,b){var m=this.cmdHistory,c=(d===20||d===28||d===21||d===29)&&b>=32&&b<=47,L=(d===23||d===31)&&b>=33&&b<=35;if(!(c||L))return!1;if(B(d,b,m))return E(null,null,m),this.logger.log(s.DEBUG,"Repeated command ("+A([d,b])+") is dropped"),!0;var N=d===20||d===21||d===23?1:2,T=this.channels[N];return d===20||d===21||d===28||d===29?b===32?T.ccRCL():b===33?T.ccBS():b===34?T.ccAOF():b===35?T.ccAON():b===36?T.ccDER():b===37?T.ccRU(2):b===38?T.ccRU(3):b===39?T.ccRU(4):b===40?T.ccFON():b===41?T.ccRDC():b===42?T.ccTR():b===43?T.ccRTD():b===44?T.ccEDM():b===45?T.ccCR():b===46?T.ccENM():b===47&&T.ccEOC():T.ccTO(b-32),E(d,b,m),this.currentChannel=N,!0},n.parseMidrow=function(d,b){var m=0;if((d===17||d===25)&&b>=32&&b<=47){if(d===17?m=1:m=2,m!==this.currentChannel)return this.logger.log(s.ERROR,"Mismatch channel in midrow parsing"),!1;var c=this.channels[m];return c?(c.ccMIDROW(b),this.logger.log(s.DEBUG,"MIDROW ("+A([d,b])+")"),!0):!1}return!1},n.parsePAC=function(d,b){var m,c=this.cmdHistory,L=(d>=17&&d<=23||d>=25&&d<=31)&&b>=64&&b<=127,N=(d===16||d===24)&&b>=64&&b<=95;if(!(L||N))return!1;if(B(d,b,c))return E(null,null,c),!0;var T=d<=23?1:2;b>=64&&b<=95?m=T===1?e[d]:g[d]:m=T===1?R[d]:v[d];var P=this.channels[T];return P?(P.setPAC(this.interpretPAC(m,b)),E(d,b,c),this.currentChannel=T,!0):!1},n.interpretPAC=function(d,b){var m,c={color:null,italics:!1,indent:null,underline:!1,row:d};return b>95?m=b-96:m=b-64,c.underline=(m&1)===1,m<=13?c.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(m/2)]:m<=15?(c.italics=!0,c.color="white"):c.indent=Math.floor((m-16)/2)*4,c},n.parseChars=function(d,b){var m,c=null,L=null;if(d>=25?(m=2,L=d-8):(m=1,L=d),L>=17&&L<=19){var N;L===17?N=b+80:L===18?N=b+112:N=b+144,this.logger.log(s.INFO,"Special char '"+O(N)+"' in channel "+m),c=[N]}else d>=32&&d<=127&&(c=b===0?[d]:[d,b]);if(c){var T=A(c);this.logger.log(s.DEBUG,"Char codes = "+T.join(",")),E(d,b,this.cmdHistory)}return c},n.parseBackgroundAttributes=function(d,b){var m=(d===16||d===24)&&b>=32&&b<=47,c=(d===23||d===31)&&b>=45&&b<=47;if(!(m||c))return!1;var L,N={};d===16||d===24?(L=Math.floor((b-32)/2),N.background=u[L],b%2===1&&(N.background=N.background+"_semi")):b===45?N.background="transparent":(N.foreground="black",b===47&&(N.underline=!0));var T=d<=23?1:2,P=this.channels[T];return P.setBkgData(N),E(d,b,this.cmdHistory),!0},n.reset=function(){for(var d=0;d<Object.keys(this.channels).length;d++){var b=this.channels[d];b&&b.reset()}this.cmdHistory=C()},n.cueSplitAtTime=function(d){for(var b=0;b<this.channels.length;b++){var m=this.channels[b];m&&m.cueSplitAtTime(d)}},h}();function E(h,n,l){l.a=h,l.b=n}function B(h,n,l){return l.a===h&&l.b===n}function C(){return{a:null,b:null}}G.default=_},"./src/utils/codecs.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"isCodecType",function(){return F}),D.d(G,"isCodecSupportedInMp4",function(){return O});var V={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 F(X,M){var e=V[M];return!!e&&e[X.slice(0,4)]===!0}function O(X,M){return MediaSource.isTypeSupported((M||"video")+'/mp4;codecs="'+X+'"')}},"./src/utils/cues.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/utils/vttparser.ts"),F=D("./src/utils/webvtt-parser.ts"),O=D("./src/utils/texttrack-utils.ts"),X=/\s/,M={newCue:function(R,g,v,u){for(var s=[],i,A,o,a,r,t=self.VTTCue||self.TextTrackCue,y=0;y<u.rows.length;y++)if(i=u.rows[y],o=!0,a=0,r="",!i.isEmpty()){for(var _=0;_<i.chars.length;_++)X.test(i.chars[_].uchar)&&o?a++:(r+=i.chars[_].uchar,o=!1);i.cueStartTime=g,g===v&&(v+=1e-4),a>=16?a--:a++;var E=Object(V.fixLineBreaks)(r.trim()),B=Object(F.generateCueId)(g,v,E);(!R||!R.cues||!R.cues.getCueById(B))&&(A=new t(g,v,E),A.id=B,A.line=y+1,A.align="left",A.position=10+Math.min(80,Math.floor(a*8/32)*10),s.push(A))}return R&&s.length&&(s.sort(function(C,h){return C.line==="auto"||h.line==="auto"?0:C.line>8&&h.line>8?h.line-C.line:C.line-h.line}),s.forEach(function(C){return Object(O.addCueToTrack)(R,C)})),s}};G.default=M},"./src/utils/discontinuities.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"findFirstFragWithCC",function(){return X}),D.d(G,"shouldAlignOnDiscontinuities",function(){return M}),D.d(G,"findDiscontinuousReferenceFrag",function(){return e}),D.d(G,"adjustSlidingStart",function(){return g}),D.d(G,"alignStream",function(){return v}),D.d(G,"alignPDT",function(){return s}),D.d(G,"alignFragmentByPDTDelta",function(){return i}),D.d(G,"alignMediaPlaylistByPDT",function(){return A});var V=D("./src/polyfills/number.ts"),F=D("./src/utils/logger.ts"),O=D("./src/controller/level-helper.ts");function X(o,a){for(var r=null,t=0,y=o.length;t<y;t++){var _=o[t];if(_&&_.cc===a){r=_;break}}return r}function M(o,a,r){return!!(a.details&&(r.endCC>r.startCC||o&&o.cc<r.startCC))}function e(o,a){var r=o.fragments,t=a.fragments;if(!t.length||!r.length){F.logger.log("No fragments to align");return}var y=X(r,t[0].cc);if(!y||y&&!y.startPTS){F.logger.log("No frag in previous level to align on");return}return y}function R(o,a){if(o){var r=o.start+a;o.start=o.startPTS=r,o.endPTS=r+o.duration}}function g(o,a){for(var r=a.fragments,t=0,y=r.length;t<y;t++)R(r[t],o);a.fragmentHint&&R(a.fragmentHint,o),a.alignedSliding=!0}function v(o,a,r){if(!a)return;u(o,r,a),!r.alignedSliding&&a.details&&s(r,a.details),!r.alignedSliding&&a.details&&!r.skippedSegments&&Object(O.adjustSliding)(a.details,r)}function u(o,a,r){if(M(o,r,a)){var t=e(r.details,a);t&&Object(V.isFiniteNumber)(t.start)&&(F.logger.log("Adjusting PTS using last level due to CC increase within current level "+a.url),g(t.start,a))}}function s(o,a){if(!a.fragments.length||!o.hasProgramDateTime||!a.hasProgramDateTime)return;var r=a.fragments[0].programDateTime,t=o.fragments[0].programDateTime,y=(t-r)/1e3+a.fragments[0].start;y&&Object(V.isFiniteNumber)(y)&&(F.logger.log("Adjusting PTS using programDateTime delta "+(t-r)+"ms, sliding:"+y.toFixed(3)+" "+o.url+" "),g(y,o))}function i(o,a){var r=o.programDateTime;if(!r)return;var t=(r-a)/1e3;o.start=o.startPTS=t,o.endPTS=t+o.duration}function A(o,a){if(!a.fragments.length||!o.hasProgramDateTime||!a.hasProgramDateTime)return;var r=a.fragments[0].programDateTime,t=a.fragments[0].start,y=r-t*1e3;o.fragments.forEach(function(_){i(_,y)}),o.fragmentHint&&i(o.fragmentHint,y),o.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/utils/ewma.ts"),F=function(){function O(M,e,R){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=R,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new V.default(M),this.fast_=new V.default(e)}var X=O.prototype;return X.update=function(e,R){var g=this.slow_,v=this.fast_;this.slow_.halfLife!==e&&(this.slow_=new V.default(e,g.getEstimate(),g.getTotalWeight())),this.fast_.halfLife!==R&&(this.fast_=new V.default(R,v.getEstimate(),v.getTotalWeight()))},X.sample=function(e,R){e=Math.max(e,this.minDelayMs_);var g=8*R,v=e/1e3,u=g/v;this.fast_.sample(v,u),this.slow_.sample(v,u)},X.canEstimate=function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_},X.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},X.destroy=function(){},O}();G.default=F},"./src/utils/ewma.ts":function(se,G,D){"use strict";D.r(G);var V=function(){function F(X,M,e){M===void 0&&(M=0),e===void 0&&(e=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=X,this.alpha_=X?Math.exp(Math.log(.5)/X):0,this.estimate_=M,this.totalWeight_=e}var O=F.prototype;return O.sample=function(M,e){var R=Math.pow(this.alpha_,M);this.estimate_=e*(1-R)+R*this.estimate_,this.totalWeight_+=M},O.getTotalWeight=function(){return this.totalWeight_},O.getEstimate=function(){if(this.alpha_){var M=1-Math.pow(this.alpha_,this.totalWeight_);if(M)return this.estimate_/M}return this.estimate_},F}();G.default=V},"./src/utils/fetch-loader.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"fetchSupported",function(){return i});var V=D("./src/polyfills/number.ts"),F=D("./src/loader/load-stats.ts"),O=D("./src/demux/chunk-cache.ts");function X(t,y){t.prototype=Object.create(y.prototype),t.prototype.constructor=t,v(t,y)}function M(t){var y=typeof Map=="function"?new Map:void 0;return M=function(E){if(E===null||!g(E))return E;if(typeof E!="function")throw new TypeError("Super expression must either be null or a function");if(typeof y!="undefined"){if(y.has(E))return y.get(E);y.set(E,B)}function B(){return e(E,arguments,u(this).constructor)}return B.prototype=Object.create(E.prototype,{constructor:{value:B,enumerable:!1,writable:!0,configurable:!0}}),v(B,E)},M(t)}function e(t,y,_){return R()?e=Reflect.construct:e=function(B,C,h){var n=[null];n.push.apply(n,C);var l=Function.bind.apply(B,n),d=new l;return h&&v(d,h.prototype),d},e.apply(null,arguments)}function R(){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(t){return!1}}function g(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function v(t,y){return v=Object.setPrototypeOf||function(E,B){return E.__proto__=B,E},v(t,y)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(_){return _.__proto__||Object.getPrototypeOf(_)},u(t)}function s(){return s=Object.assign||function(t){for(var y=1;y<arguments.length;y++){var _=arguments[y];for(var E in _)Object.prototype.hasOwnProperty.call(_,E)&&(t[E]=_[E])}return t},s.apply(this,arguments)}function i(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(t){}return!1}var A=function(){function t(_){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=_.fetchSetup||a,this.controller=new self.AbortController,this.stats=new F.LoadStats}var y=t.prototype;return y.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},y.abortInternal=function(){var E=this.response;(!E||!E.ok)&&(this.stats.aborted=!0,this.controller.abort())},y.abort=function(){var E;this.abortInternal(),(E=this.callbacks)!==null&&E!==void 0&&E.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},y.load=function(E,B,C){var h=this,n=this.stats;if(n.loading.start)throw new Error("Loader can only be used once.");n.loading.start=self.performance.now();var l=o(E,this.controller.signal),d=C.onProgress,b=E.responseType==="arraybuffer",m=b?"byteLength":"length";this.context=E,this.config=B,this.callbacks=C,this.request=this.fetchSetup(E,l),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){h.abortInternal(),C.onTimeout(n,E,h.response)},B.timeout),self.fetch(this.request).then(function(c){if(h.response=h.loader=c,!c.ok){var L=c.status,N=c.statusText;throw new r(N||"fetch, bad network response",L,c)}return n.loading.first=Math.max(self.performance.now(),n.loading.start),n.total=parseInt(c.headers.get("Content-Length")||"0"),d&&Object(V.isFiniteNumber)(B.highWaterMark)?h.loadProgressively(c,n,E,B.highWaterMark,d):b?c.arrayBuffer():c.text()}).then(function(c){var L=h.response;self.clearTimeout(h.requestTimeout),n.loading.end=Math.max(self.performance.now(),n.loading.first),n.loaded=n.total=c[m];var N={url:L.url,data:c};d&&!Object(V.isFiniteNumber)(B.highWaterMark)&&d(n,E,c,L),C.onSuccess(N,n,E,L)}).catch(function(c){if(self.clearTimeout(h.requestTimeout),n.aborted)return;var L=c.code||0;C.onError({code:L,text:c.message},E,c.details)})},y.getCacheAge=function(){var E=null;if(this.response){var B=this.response.headers.get("age");E=B?parseFloat(B):null}return E},y.loadProgressively=function(E,B,C,h,n){h===void 0&&(h=0);var l=new O.default,d=E.body.getReader(),b=function m(){return d.read().then(function(c){if(c.done)return l.dataLength&&n(B,C,l.flush(),E),Promise.resolve(new ArrayBuffer(0));var L=c.value,N=L.length;return B.loaded+=N,N<h||l.dataLength?(l.push(L),l.dataLength>=h&&n(B,C,l.flush(),E)):n(B,C,L,E),m()}).catch(function(){return Promise.reject()})};return b()},t}();function o(t,y){var _={method:"GET",mode:"cors",credentials:"same-origin",signal:y,headers:new self.Headers(s({},t.headers))};return t.rangeEnd&&_.headers.set("Range","bytes="+t.rangeStart+"-"+String(t.rangeEnd-1)),_}function a(t,y){return new self.Request(t.url,y)}var r=function(t){X(y,t);function y(_,E,B){var C;return C=t.call(this,_)||this,C.code=void 0,C.details=void 0,C.code=E,C.details=B,C}return y}(M(Error));G.default=A},"./src/utils/imsc1-ttml-parser.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"IMSC1_CODEC",function(){return g}),D.d(G,"parseIMSC1",function(){return i});var V=D("./src/utils/mp4-tools.ts"),F=D("./src/utils/vttparser.ts"),O=D("./src/utils/vttcue.ts"),X=D("./src/demux/id3.ts"),M=D("./src/utils/timescale-conversion.ts"),e=D("./src/utils/webvtt-parser.ts");function R(){return R=Object.assign||function(h){for(var n=1;n<arguments.length;n++){var l=arguments[n];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(h[d]=l[d])}return h},R.apply(this,arguments)}var g="stpp.ttml.im1t",v=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,u=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,s={left:"start",center:"center",right:"end",start:"start",end:"end"};function i(h,n,l,d,b){var m=Object(V.findBox)(new Uint8Array(h),["mdat"]);if(m.length===0){b(new Error("Could not parse IMSC1 mdat"));return}var c=m[0],L=Object(X.utf8ArrayToStr)(new Uint8Array(h,c.start,c.end-c.start)),N=Object(M.toTimescaleFromScale)(n,1,l);try{d(A(L,N))}catch(T){b(T)}}function A(h,n){var l=new DOMParser,d=l.parseFromString(h,"text/xml"),b=d.getElementsByTagName("tt")[0];if(!b)throw new Error("Invalid ttml");var m={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},c=Object.keys(m).reduce(function(W,U){return W[U]=b.getAttribute("ttp:"+U)||m[U],W},{}),L=b.getAttribute("xml:space")!=="preserve",N=a(o(b,"styling","style")),T=a(o(b,"layout","region")),P=o(b,"body","[begin]");return[].map.call(P,function(W){var U=r(W,L);if(!U||!W.hasAttribute("begin"))return null;var Y=E(W.getAttribute("begin"),c),re=E(W.getAttribute("dur"),c),me=E(W.getAttribute("end"),c);if(Y===null)throw _(W);if(me===null){if(re===null)throw _(W);me=Y+re}var ge=new O.default(Y-n,me-n,U);ge.id=Object(e.generateCueId)(ge.startTime,ge.endTime,ge.text);var Oe=T[W.getAttribute("region")],Se=N[W.getAttribute("style")];ge.position=10,ge.size=80;var Be=t(Oe,Se),Ne=Be.textAlign;if(Ne){var ke=s[Ne];ke&&(ge.lineAlign=ke),ge.align=Ne}return R(ge,Be),ge}).filter(function(W){return W!==null})}function o(h,n,l){var d=h.getElementsByTagName(n)[0];return d?[].slice.call(d.querySelectorAll(l)):[]}function a(h){return h.reduce(function(n,l){var d=l.getAttribute("xml:id");return d&&(n[d]=l),n},{})}function r(h,n){return[].slice.call(h.childNodes).reduce(function(l,d,b){var m;return d.nodeName==="br"&&b?l+`
|
|
`:(m=d.childNodes)!==null&&m!==void 0&&m.length?r(d,n):n?l+d.textContent.trim().replace(/\s+/g," "):l+d.textContent},"")}function t(h,n){var l="http://www.w3.org/ns/ttml#styling",d=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return d.reduce(function(b,m){var c=y(n,l,m)||y(h,l,m);return c&&(b[m]=c),b},{})}function y(h,n,l){return h.hasAttributeNS(n,l)?h.getAttributeNS(n,l):null}function _(h){return new Error("Could not parse ttml timestamp "+h)}function E(h,n){if(!h)return null;var l=Object(F.parseTimeStamp)(h);return l===null&&(v.test(h)?l=B(h,n):u.test(h)&&(l=C(h,n))),l}function B(h,n){var l=v.exec(h),d=(l[4]|0)+(l[5]|0)/n.subFrameRate;return(l[1]|0)*3600+(l[2]|0)*60+(l[3]|0)+d/n.frameRate}function C(h,n){var l=u.exec(h),d=Number(l[1]),b=l[2];switch(b){case"h":return d*3600;case"m":return d*60;case"ms":return d*1e3;case"f":return d/n.frameRate;case"t":return d/n.tickRate}return d}},"./src/utils/logger.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"enableLogs",function(){return e}),D.d(G,"logger",function(){return R});var V=function(){},F={trace:V,debug:V,log:V,warn:V,info:V,error:V},O=F;function X(g){var v=self.console[g];return v?v.bind(self.console,"["+g+"] >"):V}function M(g){for(var v=arguments.length,u=new Array(v>1?v-1:0),s=1;s<v;s++)u[s-1]=arguments[s];u.forEach(function(i){O[i]=g[i]?g[i].bind(g):X(i)})}function e(g){if(self.console&&g===!0||typeof g=="object"){M(g,"debug","log","info","warn","error");try{O.log()}catch(v){O=F}}else O=F}var R=O},"./src/utils/mediakeys-helper.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"KeySystems",function(){return V}),D.d(G,"requestMediaKeySystemAccess",function(){return F});var V;(function(O){O.WIDEVINE="com.widevine.alpha",O.PLAYREADY="com.microsoft.playready"})(V||(V={}));var F=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"getMediaSource",function(){return V});function V(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"bin2str",function(){return M}),D.d(G,"readUint16",function(){return e}),D.d(G,"readUint32",function(){return R}),D.d(G,"writeUint32",function(){return g}),D.d(G,"findBox",function(){return v}),D.d(G,"parseSegmentIndex",function(){return u}),D.d(G,"parseInitSegment",function(){return s}),D.d(G,"getStartDTS",function(){return i}),D.d(G,"getDuration",function(){return A}),D.d(G,"computeRawDurationFromSamples",function(){return o}),D.d(G,"offsetStartDTS",function(){return a}),D.d(G,"segmentValidRange",function(){return r}),D.d(G,"appendUint8Array",function(){return t});var V=D("./src/utils/typed-array.ts"),F=D("./src/loader/fragment.ts"),O=Math.pow(2,32)-1,X=[].push;function M(y){return String.fromCharCode.apply(null,y)}function e(y,_){"data"in y&&(_+=y.start,y=y.data);var E=y[_]<<8|y[_+1];return E<0?65536+E:E}function R(y,_){"data"in y&&(_+=y.start,y=y.data);var E=y[_]<<24|y[_+1]<<16|y[_+2]<<8|y[_+3];return E<0?4294967296+E:E}function g(y,_,E){"data"in y&&(_+=y.start,y=y.data),y[_]=E>>24,y[_+1]=E>>16&255,y[_+2]=E>>8&255,y[_+3]=E&255}function v(y,_){var E=[];if(!_.length)return E;var B,C,h;"data"in y?(B=y.data,C=y.start,h=y.end):(B=y,C=0,h=B.byteLength);for(var n=C;n<h;){var l=R(B,n),d=M(B.subarray(n+4,n+8)),b=l>1?n+l:h;if(d===_[0])if(_.length===1)E.push({data:B,start:n+8,end:b});else{var m=v({data:B,start:n+8,end:b},_.slice(1));m.length&&X.apply(E,m)}n=b}return E}function u(y){var _=v(y,["moov"]),E=_[0],B=E?E.end:null,C=v(y,["sidx"]);if(!C||!C[0])return null;var h=[],n=C[0],l=n.data[0],d=l===0?8:16,b=R(n,d);d+=4;var m=0,c=0;l===0?d+=8:d+=16,d+=2;var L=n.end+c,N=e(n,d);d+=2;for(var T=0;T<N;T++){var P=d,W=R(n,P);P+=4;var U=W&2147483647,Y=(W&2147483648)>>>31;if(Y===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var re=R(n,P);P+=4,h.push({referenceSize:U,subsegmentDuration:re,info:{duration:re/b,start:L,end:L+U-1}}),L+=U,P+=4,d=P}return{earliestPresentationTime:m,timescale:b,version:l,referencesCount:N,references:h,moovEndOffset:B}}function s(y){for(var _=[],E=v(y,["moov","trak"]),B=0;B<E.length;B++){var C=E[B],h=v(C,["tkhd"])[0];if(h){var n=h.data[h.start],l=n===0?12:20,d=R(h,l),b=v(C,["mdia","mdhd"])[0];if(b){n=b.data[b.start],l=n===0?12:20;var m=R(b,l),c=v(C,["mdia","hdlr"])[0];if(c){var L=M(c.data.subarray(c.start+8,c.start+12)),N={soun:F.ElementaryStreamTypes.AUDIO,vide:F.ElementaryStreamTypes.VIDEO}[L];if(N){var T=v(C,["mdia","minf","stbl","stsd"])[0],P=void 0;T&&(P=M(T.data.subarray(T.start+12,T.start+16))),_[d]={timescale:m,type:N},_[N]={timescale:m,id:d,codec:P}}}}}}var W=v(y,["moov","mvex","trex"]);return W.forEach(function(U){var Y=R(U,4),re=_[Y];re&&(re.default={duration:R(U,12),flags:R(U,20)})}),_}function i(y,_){return v(_,["moof","traf"]).reduce(function(E,B){var C=v(B,["tfdt"])[0],h=C.data[C.start],n=v(B,["tfhd"]).reduce(function(l,d){var b=R(d,4),m=y[b];if(m){var c=R(C,4);h===1&&(c*=Math.pow(2,32),c+=R(C,8));var L=m.timescale||9e4,N=c/L;if(isFinite(N)&&(l===null||N<l))return N}return l},null);return n!==null&&isFinite(n)&&(E===null||n<E)?n:E},null)||0}function A(y,_){for(var E=0,B=0,C=0,h=v(y,["moof","traf"]),n=0;n<h.length;n++){var l=h[n],d=v(l,["tfhd"])[0],b=R(d,4),m=_[b];if(!m)continue;var c=m.default,L=R(d,0)|(c==null?void 0:c.flags),N=c==null?void 0:c.duration;L&8&&(L&2?N=R(d,12):N=R(d,8));for(var T=m.timescale||9e4,P=v(l,["trun"]),W=0;W<P.length;W++){if(N){var U=R(P[W],4);E=N*U}else E=o(P[W]);m.type===F.ElementaryStreamTypes.VIDEO?B+=E/T:m.type===F.ElementaryStreamTypes.AUDIO&&(C+=E/T)}}if(B===0&&C===0){var Y=u(y);if(Y!=null&&Y.references)return Y.references.reduce(function(re,me){return re+me.info.duration||0},0)}return B||C}function o(y){var _=R(y,0),E=8;_&1&&(E+=4),_&4&&(E+=4);for(var B=0,C=R(y,4),h=0;h<C;h++){if(_&256){var n=R(y,E);B+=n,E+=4}_&512&&(E+=4),_&1024&&(E+=4),_&2048&&(E+=4)}return B}function a(y,_,E){v(_,["moof","traf"]).forEach(function(B){v(B,["tfhd"]).forEach(function(C){var h=R(C,4),n=y[h];if(!n)return;var l=n.timescale||9e4;v(B,["tfdt"]).forEach(function(d){var b=d.data[d.start],m=R(d,4);if(b===0)g(d,4,m-E*l);else{m*=Math.pow(2,32),m+=R(d,8),m-=E*l,m=Math.max(m,0);var c=Math.floor(m/(O+1)),L=Math.floor(m%(O+1));g(d,4,c),g(d,8,L)}})})})}function r(y){var _={valid:null,remainder:null},E=v(y,["moof"]);if(E){if(E.length<2)return _.remainder=y,_}else return _;var B=E[E.length-1];return _.valid=Object(V.sliceUint8)(y,0,B.start-8),_.remainder=Object(V.sliceUint8)(y,B.start-8),_}function t(y,_){var E=new Uint8Array(y.length+_.length);return E.set(y),E.set(_,y.length),E}},"./src/utils/output-filter.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return V});var V=function(){function F(X,M){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=X,this.trackName=M}var O=F.prototype;return O.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},O.newCue=function(M,e,R){(this.startTime===null||this.startTime>M)&&(this.startTime=M),this.endTime=e,this.screen=R,this.timelineController.createCaptionsTrack(this.trackName)},O.reset=function(){this.cueRanges=[]},F}()},"./src/utils/texttrack-utils.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"sendAddTrackEvent",function(){return F}),D.d(G,"addCueToTrack",function(){return O}),D.d(G,"clearCurrentCues",function(){return X}),D.d(G,"removeCuesInRange",function(){return M}),D.d(G,"getCuesInRange",function(){return R});var V=D("./src/utils/logger.ts");function F(g,v){var u;try{u=new Event("addtrack")}catch(s){u=document.createEvent("Event"),u.initEvent("addtrack",!1,!1)}u.track=g,v.dispatchEvent(u)}function O(g,v){var u=g.mode;if(u==="disabled"&&(g.mode="hidden"),g.cues&&!g.cues.getCueById(v.id))try{if(g.addCue(v),!g.cues.getCueById(v.id))throw new Error("addCue is failed for: "+v)}catch(i){V.logger.debug("[texttrack-utils]: "+i);var s=new self.TextTrackCue(v.startTime,v.endTime,v.text);s.id=v.id,g.addCue(s)}u==="disabled"&&(g.mode=u)}function X(g){var v=g.mode;if(v==="disabled"&&(g.mode="hidden"),g.cues)for(var u=g.cues.length;u--;)g.removeCue(g.cues[u]);v==="disabled"&&(g.mode=v)}function M(g,v,u){var s=g.mode;if(s==="disabled"&&(g.mode="hidden"),g.cues&&g.cues.length>0)for(var i=R(g.cues,v,u),A=0;A<i.length;A++)g.removeCue(i[A]);s==="disabled"&&(g.mode=s)}function e(g,v){if(v<g[0].startTime)return 0;var u=g.length-1;if(v>g[u].endTime)return-1;for(var s=0,i=u;s<=i;){var A=Math.floor((i+s)/2);if(v<g[A].startTime)i=A-1;else if(v>g[A].startTime&&s<u)s=A+1;else return A}return g[s].startTime-v<v-g[i].startTime?s:i}function R(g,v,u){var s=[],i=e(g,v);if(i>-1)for(var A=i,o=g.length;A<o;A++){var a=g[A];if(a.startTime>=v&&a.endTime<=u)s.push(a);else if(a.startTime>u)return s}return s}},"./src/utils/time-ranges.ts":function(se,G,D){"use strict";D.r(G);var V={toString:function(O){for(var X="",M=O.length,e=0;e<M;e++)X+="["+O.start(e).toFixed(3)+","+O.end(e).toFixed(3)+"]";return X}};G.default=V},"./src/utils/timescale-conversion.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"toTimescaleFromBase",function(){return F}),D.d(G,"toTimescaleFromScale",function(){return O}),D.d(G,"toMsFromMpegTsClock",function(){return X}),D.d(G,"toMpegTsClockFromTimescale",function(){return M});var V=9e4;function F(e,R,g,v){g===void 0&&(g=1),v===void 0&&(v=!1);var u=e*R*g;return v?Math.round(u):u}function O(e,R,g,v){return g===void 0&&(g=1),v===void 0&&(v=!1),F(e,R,1/g,v)}function X(e,R){return R===void 0&&(R=!1),F(e,1e3,1/V,R)}function M(e,R){return R===void 0&&(R=1),F(e,V,1/R)}},"./src/utils/typed-array.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"sliceUint8",function(){return V});function V(F,O,X){return Uint8Array.prototype.slice?F.slice(O,X):new Uint8Array(Array.prototype.slice.call(F,O,X))}},"./src/utils/vttcue.ts":function(se,G,D){"use strict";D.r(G),G.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var V=["","lr","rl"],F=["start","middle","end","left","right"];function O(g,v){if(typeof v!="string")return!1;if(!Array.isArray(g))return!1;var u=v.toLowerCase();return~g.indexOf(u)?u:!1}function X(g){return O(V,g)}function M(g){return O(F,g)}function e(g){for(var v=arguments.length,u=new Array(v>1?v-1:0),s=1;s<v;s++)u[s-1]=arguments[s];for(var i=1;i<arguments.length;i++){var A=arguments[i];for(var o in A)g[o]=A[o]}return g}function R(g,v,u){var s=this,i={enumerable:!0};s.hasBeenReset=!1;var A="",o=!1,a=g,r=v,t=u,y=null,_="",E=!0,B="auto",C="start",h=50,n="middle",l=50,d="middle";Object.defineProperty(s,"id",e({},i,{get:function(){return A},set:function(m){A=""+m}})),Object.defineProperty(s,"pauseOnExit",e({},i,{get:function(){return o},set:function(m){o=!!m}})),Object.defineProperty(s,"startTime",e({},i,{get:function(){return a},set:function(m){if(typeof m!="number")throw new TypeError("Start time must be set to a number.");a=m,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",e({},i,{get:function(){return r},set:function(m){if(typeof m!="number")throw new TypeError("End time must be set to a number.");r=m,this.hasBeenReset=!0}})),Object.defineProperty(s,"text",e({},i,{get:function(){return t},set:function(m){t=""+m,this.hasBeenReset=!0}})),Object.defineProperty(s,"region",e({},i,{get:function(){return y},set:function(m){y=m,this.hasBeenReset=!0}})),Object.defineProperty(s,"vertical",e({},i,{get:function(){return _},set:function(m){var c=X(m);if(c===!1)throw new SyntaxError("An invalid or illegal string was specified.");_=c,this.hasBeenReset=!0}})),Object.defineProperty(s,"snapToLines",e({},i,{get:function(){return E},set:function(m){E=!!m,this.hasBeenReset=!0}})),Object.defineProperty(s,"line",e({},i,{get:function(){return B},set:function(m){if(typeof m!="number"&&m!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");B=m,this.hasBeenReset=!0}})),Object.defineProperty(s,"lineAlign",e({},i,{get:function(){return C},set:function(m){var c=M(m);if(!c)throw new SyntaxError("An invalid or illegal string was specified.");C=c,this.hasBeenReset=!0}})),Object.defineProperty(s,"position",e({},i,{get:function(){return h},set:function(m){if(m<0||m>100)throw new Error("Position must be between 0 and 100.");h=m,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",e({},i,{get:function(){return n},set:function(m){var c=M(m);if(!c)throw new SyntaxError("An invalid or illegal string was specified.");n=c,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",e({},i,{get:function(){return l},set:function(m){if(m<0||m>100)throw new Error("Size must be between 0 and 100.");l=m,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",e({},i,{get:function(){return d},set:function(m){var c=M(m);if(!c)throw new SyntaxError("An invalid or illegal string was specified.");d=c,this.hasBeenReset=!0}})),s.displayState=void 0}return R.prototype.getCueAsHTML=function(){var g=self.WebVTT;return g.convertCueToDOMTree(self,this.text)},R}()},"./src/utils/vttparser.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"parseTimeStamp",function(){return O}),D.d(G,"fixLineBreaks",function(){return v}),D.d(G,"VTTParser",function(){return u});var V=D("./src/utils/vttcue.ts"),F=function(){function s(){}var i=s.prototype;return i.decode=function(o,a){if(!o)return"";if(typeof o!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(o))},s}();function O(s){function i(o,a,r,t){return(o|0)*3600+(a|0)*60+(r|0)+parseFloat(t||0)}var A=s.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return A?parseFloat(A[2])>59?i(A[2],A[3],0,A[4]):i(A[1],A[2],A[3],A[4]):null}var X=function(){function s(){this.values=Object.create(null)}var i=s.prototype;return i.set=function(o,a){!this.get(o)&&a!==""&&(this.values[o]=a)},i.get=function(o,a,r){return r?this.has(o)?this.values[o]:a[r]:this.has(o)?this.values[o]:a},i.has=function(o){return o in this.values},i.alt=function(o,a,r){for(var t=0;t<r.length;++t)if(a===r[t]){this.set(o,a);break}},i.integer=function(o,a){/^-?\d+$/.test(a)&&this.set(o,parseInt(a,10))},i.percent=function(o,a){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(a)){var r=parseFloat(a);if(r>=0&&r<=100)return this.set(o,r),!0}return!1},s}();function M(s,i,A,o){var a=o?s.split(o):[s];for(var r in a){if(typeof a[r]!="string")continue;var t=a[r].split(A);if(t.length!==2)continue;var y=t[0],_=t[1];i(y,_)}}var e=new V.default(0,0,""),R=e.align==="middle"?"middle":"center";function g(s,i,A){var o=s;function a(){var y=O(s);if(y===null)throw new Error("Malformed timestamp: "+o);return s=s.replace(/^[^\sa-zA-Z-]+/,""),y}function r(y,_){var E=new X;M(y,function(h,n){var l;switch(h){case"region":for(var d=A.length-1;d>=0;d--)if(A[d].id===n){E.set(h,A[d].region);break}break;case"vertical":E.alt(h,n,["rl","lr"]);break;case"line":l=n.split(","),E.integer(h,l[0]),E.percent(h,l[0])&&E.set("snapToLines",!1),E.alt(h,l[0],["auto"]),l.length===2&&E.alt("lineAlign",l[1],["start",R,"end"]);break;case"position":l=n.split(","),E.percent(h,l[0]),l.length===2&&E.alt("positionAlign",l[1],["start",R,"end","line-left","line-right","auto"]);break;case"size":E.percent(h,n);break;case"align":E.alt(h,n,["start",R,"end","left","right"]);break}},/:/,/\s/),_.region=E.get("region",null),_.vertical=E.get("vertical","");var B=E.get("line","auto");B==="auto"&&e.line===-1&&(B=-1),_.line=B,_.lineAlign=E.get("lineAlign","start"),_.snapToLines=E.get("snapToLines",!0),_.size=E.get("size",100),_.align=E.get("align",R);var C=E.get("position","auto");C==="auto"&&e.position===50&&(C=_.align==="start"||_.align==="left"?0:_.align==="end"||_.align==="right"?100:50),_.position=C}function t(){s=s.replace(/^\s+/,"")}if(t(),i.startTime=a(),t(),s.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+o);s=s.substr(3),t(),i.endTime=a(),t(),r(s,i)}function v(s){return s.replace(/<br(?: \/)?>/gi,`
|
|
`)}var u=function(){function s(){this.state="INITIAL",this.buffer="",this.decoder=new F,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var i=s.prototype;return i.parse=function(o){var a=this;o&&(a.buffer+=a.decoder.decode(o,{stream:!0}));function r(){var C=a.buffer,h=0;for(C=v(C);h<C.length&&C[h]!=="\r"&&C[h]!==`
|
|
`;)++h;var n=C.substr(0,h);return C[h]==="\r"&&++h,C[h]===`
|
|
`&&++h,a.buffer=C.substr(h),n}function t(C){M(C,function(h,n){},/:/)}try{var y="";if(a.state==="INITIAL"){if(!/\r\n|\n/.test(a.buffer))return this;y=r();var _=y.match(/^()?WEBVTT([ \t].*)?$/);if(!_||!_[0])throw new Error("Malformed WebVTT signature.");a.state="HEADER"}for(var E=!1;a.buffer;){if(!/\r\n|\n/.test(a.buffer))return this;E?E=!1:y=r();switch(a.state){case"HEADER":/:/.test(y)?t(y):y||(a.state="ID");continue;case"NOTE":y||(a.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(y)){a.state="NOTE";break}if(!y)continue;if(a.cue=new V.default(0,0,""),a.state="CUE",y.indexOf("-->")===-1){a.cue.id=y;continue}case"CUE":if(!a.cue){a.state="BADCUE";continue}try{g(y,a.cue,a.regionList)}catch(C){a.cue=null,a.state="BADCUE";continue}a.state="CUETEXT";continue;case"CUETEXT":{var B=y.indexOf("-->")!==-1;if(!y||B&&(E=!0)){a.oncue&&a.cue&&a.oncue(a.cue),a.cue=null,a.state="ID";continue}if(a.cue===null)continue;a.cue.text&&(a.cue.text+=`
|
|
`),a.cue.text+=y}continue;case"BADCUE":y||(a.state="ID")}}}catch(C){a.state==="CUETEXT"&&a.cue&&a.oncue&&a.oncue(a.cue),a.cue=null,a.state=a.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},i.flush=function(){var o=this;try{if((o.cue||o.state==="HEADER")&&(o.buffer+=`
|
|
|
|
`,o.parse()),o.state==="INITIAL"||o.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(a){o.onparsingerror&&o.onparsingerror(a)}return o.onflush&&o.onflush(),this},s}()},"./src/utils/webvtt-parser.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"generateCueId",function(){return u}),D.d(G,"parseWebVTT",function(){return i});var V=D("./src/polyfills/number.ts"),F=D("./src/utils/vttparser.ts"),O=D("./src/demux/id3.ts"),X=D("./src/utils/timescale-conversion.ts"),M=D("./src/remux/mp4-remuxer.ts"),e=/\r\n|\n\r|\n|\r/g,R=function(o,a,r){return r===void 0&&(r=0),o.substr(r,a.length)===a},g=function(o){var a=parseInt(o.substr(-3)),r=parseInt(o.substr(-6,2)),t=parseInt(o.substr(-9,2)),y=o.length>9?parseInt(o.substr(0,o.indexOf(":"))):0;if(!Object(V.isFiniteNumber)(a)||!Object(V.isFiniteNumber)(r)||!Object(V.isFiniteNumber)(t)||!Object(V.isFiniteNumber)(y))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+o);return a+=1e3*r,a+=60*1e3*t,a+=60*60*1e3*y,a},v=function(o){for(var a=5381,r=o.length;r;)a=a*33^o.charCodeAt(--r);return(a>>>0).toString()};function u(A,o,a){return v(A.toString())+v(o.toString())+v(a)}var s=function(o,a,r){var t=o[a],y=o[t.prevCC];if(!y||!y.new&&t.new){o.ccOffset=o.presentationOffset=t.start,t.new=!1;return}for(;(_=y)!==null&&_!==void 0&&_.new;){var _;o.ccOffset+=t.start-y.start,t.new=!1,t=y,y=o[t.prevCC]}o.presentationOffset=r};function i(A,o,a,r,t,y,_,E){var B=new F.VTTParser,C=Object(O.utf8ArrayToStr)(new Uint8Array(A)).trim().replace(e,`
|
|
`).split(`
|
|
`),h=[],n=Object(X.toMpegTsClockFromTimescale)(o,a),l="00:00.000",d=0,b=0,m,c=!0,L=!1;B.oncue=function(N){var T=r[t],P=r.ccOffset,W=(d-n)/9e4;if(T!=null&&T.new&&(b!==void 0?P=r.ccOffset=T.start:s(r,t,W)),W&&(P=W-r.presentationOffset),L){var U=N.endTime-N.startTime,Y=Object(M.normalizePts)((N.startTime+P-b)*9e4,y*9e4)/9e4;N.startTime=Y,N.endTime=Y+U}var re=N.text.trim();N.text=decodeURIComponent(encodeURIComponent(re)),N.id||(N.id=u(N.startTime,N.endTime,re)),N.endTime>0&&h.push(N)},B.onparsingerror=function(N){m=N},B.onflush=function(){if(m){E(m);return}_(h)},C.forEach(function(N){if(c)if(R(N,"X-TIMESTAMP-MAP=")){c=!1,L=!0,N.substr(16).split(",").forEach(function(T){R(T,"LOCAL:")?l=T.substr(6):R(T,"MPEGTS:")&&(d=parseInt(T.substr(7)))});try{b=g(l)/1e3}catch(T){L=!1,m=T}return}else N===""&&(c=!1);B.parse(N+`
|
|
`)}),B.flush()}},"./src/utils/xhr-loader.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/utils/logger.ts"),F=D("./src/loader/load-stats.ts"),O=/^age:\s*[\d.]+\s*$/m,X=function(){function M(R){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=R?R.xhrSetup:null,this.stats=new F.LoadStats,this.retryDelay=0}var e=M.prototype;return e.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},e.abortInternal=function(){var g=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),g&&(g.onreadystatechange=null,g.onprogress=null,g.readyState!==4&&(this.stats.aborted=!0,g.abort()))},e.abort=function(){var g;this.abortInternal(),(g=this.callbacks)!==null&&g!==void 0&&g.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},e.load=function(g,v,u){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=g,this.config=v,this.callbacks=u,this.retryDelay=v.retryDelay,this.loadInternal()},e.loadInternal=function(){var g=this.config,v=this.context;if(!g)return;var u=this.loader=new self.XMLHttpRequest,s=this.stats;s.loading.first=0,s.loaded=0;var i=this.xhrSetup;try{if(i)try{i(u,v.url)}catch(a){u.open("GET",v.url,!0),i(u,v.url)}u.readyState||u.open("GET",v.url,!0);var A=this.context.headers;if(A)for(var o in A)u.setRequestHeader(o,A[o])}catch(a){this.callbacks.onError({code:u.status,text:a.message},v,u);return}v.rangeEnd&&u.setRequestHeader("Range","bytes="+v.rangeStart+"-"+(v.rangeEnd-1)),u.onreadystatechange=this.readystatechange.bind(this),u.onprogress=this.loadprogress.bind(this),u.responseType=v.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),g.timeout),u.send()},e.readystatechange=function(){var g=this.context,v=this.loader,u=this.stats;if(!g||!v)return;var s=v.readyState,i=this.config;if(u.aborted)return;if(s>=2)if(self.clearTimeout(this.requestTimeout),u.loading.first===0&&(u.loading.first=Math.max(self.performance.now(),u.loading.start)),s===4){v.onreadystatechange=null,v.onprogress=null;var A=v.status;if(A>=200&&A<300){u.loading.end=Math.max(self.performance.now(),u.loading.first);var o,a;if(g.responseType==="arraybuffer"?(o=v.response,a=o.byteLength):(o=v.responseText,a=o.length),u.loaded=u.total=a,!this.callbacks)return;var r=this.callbacks.onProgress;if(r&&r(u,g,o,v),!this.callbacks)return;var t={url:v.responseURL,data:o};this.callbacks.onSuccess(t,u,g,v)}else u.retry>=i.maxRetry||A>=400&&A<499?(V.logger.error(A+" while loading "+g.url),this.callbacks.onError({code:A,text:v.statusText},g,v)):(V.logger.warn(A+" while loading "+g.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,i.maxRetryDelay),u.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.timeout)},e.loadtimeout=function(){V.logger.warn("timeout while loading "+this.context.url);var g=this.callbacks;g&&(this.abortInternal(),g.onTimeout(this.stats,this.context,this.loader))},e.loadprogress=function(g){var v=this.stats;v.loaded=g.loaded,g.lengthComputable&&(v.total=g.total)},e.getCacheAge=function(){var g=null;if(this.loader&&O.test(this.loader.getAllResponseHeaders())){var v=this.loader.getResponseHeader("age");g=v?parseFloat(v):null}return g},M}();G.default=X}}).default})},vHTk:function(ct,_e,j){ct.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF:function(ct,_e,j){"use strict";j.d(_e,"a",function(){return ze});var se=j("rePB"),G=j("VTBJ"),D=j("KQm4"),V=j("U8pU"),F=j("ODXe"),O=j("q1tI"),X=j("TSYQ"),M=j.n(X),e=j("Gytx"),R=j.n(e),g=j("Kwbf"),v=j("t23M"),u=j("qx4F"),s=j("6eGT"),i=j("IBYe"),A=j("Ff2n"),o=j("c+Xe"),a=j("fyJ8"),r=j("biw7");function t(xe,Ue,Qe,je,Le){var Fe=Qe[xe]||{},we=Qe[Ue]||{},ue,ce;Fe.fixed==="left"?ue=je.left[xe]:we.fixed==="right"&&(ce=je.right[Ue]);var te=!1,ie=!1,le=!1,fe=!1,Ie=Qe[Ue+1],Pe=Qe[xe-1];if(Le==="rtl"){if(ue!==void 0){var qe=Pe&&Pe.fixed==="left";fe=!qe}else if(ce!==void 0){var dt=Ie&&Ie.fixed==="right";le=!dt}}else if(ue!==void 0){var lt=Ie&&Ie.fixed==="left";te=!lt}else if(ce!==void 0){var st=Pe&&Pe.fixed==="right";ie=!st}return{fixLeft:ue,fixRight:ce,lastFixLeft:te,firstFixRight:ie,lastFixRight:le,firstFixLeft:fe,isSticky:je.isSticky}}var y=j("sR1s");function _(xe){var Ue=xe.cells,Qe=xe.stickyOffsets,je=xe.flattenColumns,Le=xe.rowComponent,Fe=xe.cellComponent,we=xe.onHeaderRow,ue=xe.index,ce=O.useContext(r.a),te=ce.prefixCls,ie=ce.direction,le;we&&(le=we(Ue.map(function(Ie){return Ie.column}),ue));var fe=Object(y.a)(Ue.map(function(Ie){return Ie.column}));return O.createElement(Le,Object.assign({},le),Ue.map(function(Ie,Pe){var qe=Ie.column,dt=t(Ie.colStart,Ie.colEnd,je,Qe,ie),lt;return qe&&qe.onHeaderCell&&(lt=Ie.column.onHeaderCell(qe)),O.createElement(a.a,Object.assign({},Ie,{ellipsis:qe.ellipsis,align:qe.align,component:Fe,prefixCls:te,key:fe[Pe]},dt,{additionalProps:lt,rowType:"header"}))}))}_.displayName="HeaderRow";var E=_;function B(xe){var Ue=[];function Qe(we,ue){var ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ue[ce]=Ue[ce]||[];var te=ue,ie=we.filter(Boolean).map(function(le){var fe={key:le.key,className:le.className||"",children:le.title,column:le,colStart:te},Ie=1,Pe=le.children;return Pe&&Pe.length>0&&(Ie=Qe(Pe,te,ce+1).reduce(function(qe,dt){return qe+dt},0),fe.hasSubColumns=!0),"colSpan"in le&&(Ie=le.colSpan),"rowSpan"in le&&(fe.rowSpan=le.rowSpan),fe.colSpan=Ie,fe.colEnd=fe.colStart+Ie-1,Ue[ce].push(fe),te+=Ie,Ie});return ie}Qe(xe,0);for(var je=Ue.length,Le=function(ue){Ue[ue].forEach(function(ce){!("rowSpan"in ce)&&!ce.hasSubColumns&&(ce.rowSpan=je-ue)})},Fe=0;Fe<je;Fe+=1)Le(Fe);return Ue}function C(xe){var Ue=xe.stickyOffsets,Qe=xe.columns,je=xe.flattenColumns,Le=xe.onHeaderRow,Fe=O.useContext(r.a),we=Fe.prefixCls,ue=Fe.getComponent,ce=O.useMemo(function(){return B(Qe)},[Qe]),te=ue(["header","wrapper"],"thead"),ie=ue(["header","row"],"tr"),le=ue(["header","cell"],"th");return O.createElement(te,{className:"".concat(we,"-thead")},ce.map(function(fe,Ie){var Pe=O.createElement(E,{key:Ie,flattenColumns:je,cells:fe,stickyOffsets:Ue,rowComponent:ie,cellComponent:le,onHeaderRow:Le,index:Ie});return Pe}))}var h=C,n=j("hW8S");function l(xe){for(var Ue=xe.colWidths,Qe=xe.columns,je=xe.columCount,Le=[],Fe=je||Qe.length,we=!1,ue=Fe-1;ue>=0;ue-=1){var ce=Ue[ue],te=Qe&&Qe[ue],ie=te&&te[n.a];(ce||ie||we)&&(Le.unshift(O.createElement("col",Object.assign({key:ue,style:{width:ce,minWidth:ce}},ie))),we=!0)}return O.createElement("colgroup",null,Le)}var d=l;function b(xe,Ue){return Object(O.useMemo)(function(){for(var Qe=[],je=0;je<Ue;je+=1){var Le=xe[je];if(Le!==void 0)Qe[je]=Le;else return null}return Qe},[xe.join("_"),Ue])}var m=O.forwardRef(function(xe,Ue){var Qe=xe.noData,je=xe.columns,Le=xe.flattenColumns,Fe=xe.colWidths,we=xe.columCount,ue=xe.stickyOffsets,ce=xe.direction,te=xe.fixHeader,ie=xe.offsetHeader,le=xe.stickyClassName,fe=xe.onScroll,Ie=Object(A.a)(xe,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Pe=O.useContext(r.a),qe=Pe.prefixCls,dt=Pe.scrollbarSize,lt=Pe.isSticky,st=lt&&!te?0:dt,Lt=O.useRef(null),mt=O.useCallback(function(wt){Object(o.b)(Ue,wt),Object(o.b)(Lt,wt)},[]);O.useEffect(function(){var wt;function Mt(ut){var lr=ut.currentTarget,At=ut.deltaX;At&&(fe({currentTarget:lr,scrollLeft:lr.scrollLeft+At}),ut.preventDefault())}return(wt=Lt.current)===null||wt===void 0||wt.addEventListener("wheel",Mt),function(){var ut;(ut=Lt.current)===null||ut===void 0||ut.removeEventListener("wheel",Mt)}},[]);var tt=Le[Le.length-1],er={fixed:tt?tt.fixed:null,onHeaderCell:function(){return{className:"".concat(qe,"-cell-scrollbar")}}},Jt=Object(O.useMemo)(function(){return st?[].concat(Object(D.a)(je),[er]):je},[st,je]),Ot=Object(O.useMemo)(function(){return st?[].concat(Object(D.a)(Le),[er]):Le},[st,Le]),yt=Object(O.useMemo)(function(){var wt=ue.right,Mt=ue.left;return Object(G.a)(Object(G.a)({},ue),{},{left:ce==="rtl"?[].concat(Object(D.a)(Mt.map(function(ut){return ut+st})),[0]):Mt,right:ce==="rtl"?wt:[].concat(Object(D.a)(wt.map(function(ut){return ut+st})),[0]),isSticky:lt})},[st,ue,lt]),Et=b(Fe,we);return O.createElement("div",{style:Object(G.a)({overflow:"hidden"},lt?{top:ie}:{}),ref:mt,className:M()("".concat(qe,"-header"),Object(se.a)({},le,!!le))},O.createElement("table",{style:{tableLayout:"fixed",visibility:Qe||Et?null:"hidden"}},O.createElement(d,{colWidths:Et?[].concat(Object(D.a)(Et),[st]):[],columCount:we+1,columns:Ot}),O.createElement(h,Object.assign({},Ie,{stickyOffsets:yt,columns:Jt,flattenColumns:Ot}))))});m.displayName="FixedHeader";var c=m,L=O.createContext(null),N=L;function T(xe){var Ue=xe.prefixCls,Qe=xe.children,je=xe.component,Le=xe.cellComponent,Fe=xe.fixHeader,we=xe.fixColumn,ue=xe.horizonScroll,ce=xe.className,te=xe.expanded,ie=xe.componentWidth,le=xe.colSpan,fe=O.useContext(r.a),Ie=fe.scrollbarSize;return O.useMemo(function(){var Pe=Qe;return we&&(Pe=O.createElement("div",{style:{width:ie-(Fe?Ie:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ue,"-expanded-row-fixed")},Pe)),O.createElement(je,{className:ce,style:{display:te?null:"none"}},O.createElement(a.a,{component:Le,prefixCls:Ue,colSpan:le},Pe))},[Qe,je,Fe,ue,ce,te,ie,le,Ie])}var P=T;function W(xe){var Ue=xe.className,Qe=xe.style,je=xe.record,Le=xe.index,Fe=xe.rowKey,we=xe.getRowKey,ue=xe.rowExpandable,ce=xe.expandedKeys,te=xe.onRow,ie=xe.indent,le=ie===void 0?0:ie,fe=xe.rowComponent,Ie=xe.cellComponent,Pe=xe.childrenColumnName,qe=O.useContext(r.a),dt=qe.prefixCls,lt=qe.fixedInfoList,st=O.useContext(N),Lt=st.fixHeader,mt=st.fixColumn,tt=st.horizonScroll,er=st.componentWidth,Jt=st.flattenColumns,Ot=st.expandableType,yt=st.expandRowByClick,Et=st.onTriggerExpand,wt=st.rowClassName,Mt=st.expandedRowClassName,ut=st.indentSize,lr=st.expandIcon,At=st.expandedRowRender,gt=st.expandIconColumnIndex,Nt=O.useState(!1),ir=Object(F.a)(Nt,2),yr=ir[0],br=ir[1],Rr=ce&&ce.has(xe.recordKey);O.useEffect(function(){Rr&&br(!0)},[Rr]);var Dr=Ot==="row"&&(!ue||ue(je)),Ht=Ot==="nest",pr=Pe&&je&&je[Pe],Lr=Dr||Ht,Cr;te&&(Cr=te(je,Le));var Qr=function(p){if(yt&&Lr&&Et(je,p),Cr&&Cr.onClick){for(var w,H=arguments.length,Z=new Array(H>1?H-1:0),K=1;K<H;K++)Z[K-1]=arguments[K];(w=Cr).onClick.apply(w,[p].concat(Z))}},Ur;typeof wt=="string"?Ur=wt:typeof wt=="function"&&(Ur=wt(je,Le,le));var ae=Object(y.a)(Jt),oe=O.createElement(fe,Object.assign({},Cr,{"data-row-key":Fe,className:M()(Ue,"".concat(dt,"-row"),"".concat(dt,"-row-level-").concat(le),Ur,Cr&&Cr.className),style:Object(G.a)(Object(G.a)({},Qe),Cr?Cr.style:null),onClick:Qr}),Jt.map(function(Q,p){var w=Q.render,H=Q.dataIndex,Z=Q.className,K=ae[p],ye=lt[p],He;p===(gt||0)&&Ht&&(He=O.createElement(O.Fragment,null,O.createElement("span",{style:{paddingLeft:"".concat(ut*le,"px")},className:"".concat(dt,"-row-indent indent-level-").concat(le)}),lr({prefixCls:dt,expanded:Rr,expandable:pr,record:je,onExpand:Et})));var rt;return Q.onCell&&(rt=Q.onCell(je,Le)),O.createElement(a.a,Object.assign({className:Z,ellipsis:Q.ellipsis,align:Q.align,component:Ie,prefixCls:dt,key:K,record:je,index:Le,dataIndex:H,render:w,shouldCellUpdate:Q.shouldCellUpdate},ye,{appendNode:He,additionalProps:rt}))})),de;if(Dr&&(yr||Rr)){var Te=At(je,Le,le+1,Rr),Ve=Mt&&Mt(je,Le,le);de=O.createElement(P,{expanded:Rr,className:M()("".concat(dt,"-expanded-row"),"".concat(dt,"-expanded-row-level-").concat(le+1),Ve),prefixCls:dt,fixHeader:Lt,fixColumn:mt,horizonScroll:tt,component:fe,componentWidth:er,cellComponent:Ie,colSpan:Jt.length},Te)}var et;return pr&&Rr&&(et=(je[Pe]||[]).map(function(Q,p){var w=we(Q,p);return O.createElement(W,Object.assign({},xe,{key:w,rowKey:w,record:Q,recordKey:w,index:p,indent:le+1}))})),O.createElement(O.Fragment,null,oe,de,et)}W.displayName="BodyRow";var U=W,Y=O.createContext(null),re=Y;function me(xe){var Ue=xe.columnKey,Qe=xe.onColumnResize,je=O.useRef();return O.useEffect(function(){je.current&&Qe(Ue,je.current.offsetWidth)},[]),O.createElement(v.a,{onResize:function(Fe){var we=Fe.offsetWidth;Qe(Ue,we)}},O.createElement("td",{ref:je,style:{padding:0,border:0,height:0}},O.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function ge(xe){var Ue=xe.data,Qe=xe.getRowKey,je=xe.measureColumnWidth,Le=xe.expandedKeys,Fe=xe.onRow,we=xe.rowExpandable,ue=xe.emptyNode,ce=xe.childrenColumnName,te=O.useContext(re),ie=te.onColumnResize,le=O.useContext(r.a),fe=le.prefixCls,Ie=le.getComponent,Pe=O.useContext(N),qe=Pe.fixHeader,dt=Pe.horizonScroll,lt=Pe.flattenColumns,st=Pe.componentWidth;return O.useMemo(function(){var Lt=Ie(["body","wrapper"],"tbody"),mt=Ie(["body","row"],"tr"),tt=Ie(["body","cell"],"td"),er;Ue.length?er=Ue.map(function(Ot,yt){var Et=Qe(Ot,yt);return O.createElement(U,{key:Et,rowKey:Et,record:Ot,recordKey:Et,index:yt,rowComponent:mt,cellComponent:tt,expandedKeys:Le,onRow:Fe,getRowKey:Qe,rowExpandable:we,childrenColumnName:ce})}):er=O.createElement(P,{expanded:!0,className:"".concat(fe,"-placeholder"),prefixCls:fe,fixHeader:qe,fixColumn:dt,horizonScroll:dt,component:mt,componentWidth:st,cellComponent:tt,colSpan:lt.length},ue);var Jt=Object(y.a)(lt);return O.createElement(Lt,{className:"".concat(fe,"-tbody")},je&&O.createElement("tr",{"aria-hidden":"true",className:"".concat(fe,"-measure-row"),style:{height:0}},Jt.map(function(Ot){return O.createElement(me,{key:Ot,columnKey:Ot,onColumnResize:ie})})),er)},[Ue,fe,Fe,je,Le,Qe,Ie,st,ue,lt])}var Oe=O.memo(ge);Oe.displayName="Body";var Se=Oe,Be=j("wRmb"),Ne=j("xEkU"),ke=j.n(Ne);function Ce(xe){var Ue=Object(O.useRef)(xe),Qe=Object(O.useState)({}),je=Object(F.a)(Qe,2),Le=je[1],Fe=Object(O.useRef)(null),we=Object(O.useRef)([]);function ue(ce){Fe.current===null&&(we.current=[],Fe.current=ke()(function(){we.current.forEach(function(te){Ue.current=te(Ue.current)}),Fe.current=null,Le({})})),we.current.push(ce)}return Object(O.useEffect)(function(){return function(){ke.a.cancel(Fe.current)}},[]),[Ue.current,ue]}function ve(xe){var Ue=Object(O.useRef)(xe),Qe=Object(O.useRef)(null);function je(){window.clearTimeout(Qe.current)}function Le(we){Ue.current=we,je(),Qe.current=window.setTimeout(function(){Ue.current=null,Qe.current=null},100)}function Fe(){return Ue.current}return Object(O.useEffect)(function(){return je},[]),[Le,Fe]}function Ye(xe,Ue,Qe){var je=Object(O.useMemo)(function(){for(var Le=[],Fe=[],we=0,ue=0,ce=0;ce<Ue;ce+=1)if(Qe==="rtl"){Fe[ce]=ue,ue+=xe[ce]||0;var te=Ue-ce-1;Le[te]=we,we+=xe[te]||0}else{Le[ce]=we,we+=xe[ce]||0;var ie=Ue-ce-1;Fe[ie]=ue,ue+=xe[ie]||0}return{left:Le,right:Fe}},[xe,Ue,Qe]);return je}var ht=Ye;function at(xe){var Ue=xe.className,Qe=xe.children;return O.createElement("div",{className:Ue},Qe)}var We=at,it=j("n6Qo");function ne(xe){var Ue,Qe=xe.prefixCls,je=xe.record,Le=xe.onExpand,Fe=xe.expanded,we=xe.expandable,ue="".concat(Qe,"-row-expand-icon");if(!we)return O.createElement("span",{className:M()(ue,"".concat(Qe,"-row-spaced"))});var ce=function(ie){Le(je,ie),ie.stopPropagation()};return O.createElement("span",{className:M()(ue,(Ue={},Object(se.a)(Ue,"".concat(Qe,"-row-expanded"),Fe),Object(se.a)(Ue,"".concat(Qe,"-row-collapsed"),!Fe),Ue)),onClick:ce})}function J(xe,Ue,Qe){var je=[];function Le(Fe){(Fe||[]).forEach(function(we,ue){je.push(Ue(we,ue)),Le(we[Qe])})}return Le(xe),je}var k=j("zT1h"),$=j("y0+3"),q=function(Ue,Qe){var je,Le,Fe=Ue.scrollBodyRef,we=Ue.onScroll,ue=Ue.offsetScroll,ce=O.useContext(r.a),te=ce.prefixCls,ie=((je=Fe.current)===null||je===void 0?void 0:je.scrollWidth)||0,le=((Le=Fe.current)===null||Le===void 0?void 0:Le.clientWidth)||0,fe=ie&&le*(le/ie),Ie=O.useRef(),Pe=Ce({scrollLeft:0,isHiddenScrollBar:!1}),qe=Object(F.a)(Pe,2),dt=qe[0],lt=qe[1],st=O.useRef({delta:0,x:0}),Lt=O.useState(!1),mt=Object(F.a)(Lt,2),tt=mt[0],er=mt[1],Jt=function(){er(!1)},Ot=function(ut){ut.persist(),st.current.delta=ut.pageX-dt.scrollLeft,st.current.x=0,er(!0),ut.preventDefault()},yt=function(ut){var lr,At=ut||((lr=window)===null||lr===void 0?void 0:lr.event),gt=At.buttons;if(!tt||gt===0){tt&&er(!1);return}var Nt=st.current.x+ut.pageX-st.current.x-st.current.delta;Nt<=0&&(Nt=0),Nt+fe>=le&&(Nt=le-fe),we({scrollLeft:Nt/le*(ie+2)}),st.current.x=ut.pageX},Et=function(){var ut=Object($.b)(Fe.current).top,lr=ut+Fe.current.offsetHeight,At=document.documentElement.scrollTop+window.innerHeight;lr-Object(u.a)()<=At||ut>=At-ue?lt(function(gt){return Object(G.a)(Object(G.a)({},gt),{},{isHiddenScrollBar:!0})}):lt(function(gt){return Object(G.a)(Object(G.a)({},gt),{},{isHiddenScrollBar:!1})})},wt=function(ut){lt(function(lr){return Object(G.a)(Object(G.a)({},lr),{},{scrollLeft:ut/ie*le||0})})};return O.useImperativeHandle(Qe,function(){return{setScrollLeft:wt}}),O.useEffect(function(){var Mt=Object(k.a)(document.body,"mouseup",Jt,!1),ut=Object(k.a)(document.body,"mousemove",yt,!1);return Et(),function(){Mt.remove(),ut.remove()}},[fe,tt]),O.useEffect(function(){var Mt=Object(k.a)(window,"scroll",Et,!1),ut=Object(k.a)(window,"resize",Et,!1);return function(){Mt.remove(),ut.remove()}},[]),O.useEffect(function(){dt.isHiddenScrollBar||lt(function(Mt){var ut,lr;return Object(G.a)(Object(G.a)({},Mt),{},{scrollLeft:Fe.current.scrollLeft/((ut=Fe.current)===null||ut===void 0?void 0:ut.scrollWidth)*((lr=Fe.current)===null||lr===void 0?void 0:lr.clientWidth)})})},[dt.isHiddenScrollBar]),ie<=le||!fe||dt.isHiddenScrollBar?null:O.createElement("div",{style:{height:Object(u.a)(),width:le,bottom:ue},className:"".concat(te,"-sticky-scroll")},O.createElement("div",{onMouseDown:Ot,ref:Ie,className:M()("".concat(te,"-sticky-scroll-bar"),Object(se.a)({},"".concat(te,"-sticky-scroll-bar-active"),tt)),style:{width:"".concat(fe,"px"),transform:"translate3d(".concat(dt.scrollLeft,"px, 0, 0)")}}))},he=O.forwardRef(q);function pe(xe,Ue){return O.useMemo(function(){var Qe=!!xe;return{isSticky:Qe,stickyClassName:Qe?"".concat(Ue,"-sticky-header"):"",offsetHeader:Object(V.a)(xe)==="object"&&xe.offsetHeader||0,offsetScroll:Object(V.a)(xe)==="object"&&xe.offsetScroll||0}},[xe,Ue])}var Ke=[],Je={},ze="rc-table-internal-hook",Ze=O.memo(function(xe){var Ue=xe.children;return Ue},function(xe,Ue){return R()(xe.props,Ue.props)?xe.pingLeft!==Ue.pingLeft||xe.pingRight!==Ue.pingRight:!1});function nt(xe){var Ue,Qe=xe.prefixCls,je=xe.className,Le=xe.rowClassName,Fe=xe.style,we=xe.data,ue=xe.rowKey,ce=xe.scroll,te=xe.tableLayout,ie=xe.direction,le=xe.title,fe=xe.footer,Ie=xe.summary,Pe=xe.id,qe=xe.showHeader,dt=xe.components,lt=xe.emptyText,st=xe.onRow,Lt=xe.onHeaderRow,mt=xe.internalHooks,tt=xe.transformColumns,er=xe.internalRefs,Jt=xe.sticky,Ot=we||Ke,yt=!!Ot.length,Et=O.useState(0),wt=Object(F.a)(Et,2),Mt=wt[0],ut=wt[1];O.useEffect(function(){ut(Object(u.a)())});var lr=O.useMemo(function(){return Object(y.c)(dt,{})},[dt]),At=O.useCallback(function(hr,cr){return Object(y.b)(lr,hr)||cr},[lr]),gt=O.useMemo(function(){return typeof ue=="function"?ue:function(hr){var cr=hr&&hr[ue];return cr}},[ue]),Nt=Object(n.c)(xe),ir=Nt.expandIcon,yr=Nt.expandedRowKeys,br=Nt.defaultExpandedRowKeys,Rr=Nt.defaultExpandAllRows,Dr=Nt.expandedRowRender,Ht=Nt.onExpand,pr=Nt.onExpandedRowsChange,Lr=Nt.expandRowByClick,Cr=Nt.rowExpandable,Qr=Nt.expandIconColumnIndex,Ur=Nt.expandedRowClassName,ae=Nt.childrenColumnName,oe=Nt.indentSize,de=ir||ne,Te=ae||"children",Ve=O.useMemo(function(){return Dr?"row":xe.expandable&&mt===ze&&xe.expandable.__PARENT_RENDER_ICON__||Ot.some(function(hr){return hr&&Object(V.a)(hr)==="object"&&hr[Te]})?"nest":!1},[!!Dr,Ot]),et=O.useState(function(){return br||(Rr?J(Ot,gt,Te):[])}),Q=Object(F.a)(et,2),p=Q[0],w=Q[1],H=O.useMemo(function(){return new Set(yr||p||[])},[yr,p]),Z=O.useCallback(function(hr){var cr=gt(hr,Ot.indexOf(hr)),jr,en=H.has(cr);en?(H.delete(cr),jr=Object(D.a)(H)):jr=[].concat(Object(D.a)(H),[cr]),w(jr),Ht&&Ht(!en,hr),pr&&pr(jr)},[gt,H,Ot,Ht,pr]),K=O.useState(0),ye=Object(F.a)(K,2),He=ye[0],rt=ye[1],ot=Object(Be.b)(Object(G.a)(Object(G.a)(Object(G.a)({},xe),Nt),{},{expandable:!!Dr,expandedKeys:H,getRowKey:gt,onTriggerExpand:Z,expandIcon:de,expandIconColumnIndex:Qr,direction:ie}),mt===ze?tt:null),Ge=Object(F.a)(ot,2),_t=Ge[0],vt=Ge[1],Tt=O.useMemo(function(){return{columns:_t,flattenColumns:vt}},[_t,vt]),Pt=O.useRef(),ur=O.useRef(),Gt=O.useRef(),ar=O.useState(!1),kt=Object(F.a)(ar,2),Tr=kt[0],mr=kt[1],$t=O.useState(!1),De=Object(F.a)($t,2),Qt=De[0],Vt=De[1],Dt=Ce(new Map),jt=Object(F.a)(Dt,2),Kt=jt[0],Ar=jt[1],zt=Object(y.a)(vt),sr=zt.map(function(hr){return Kt.get(hr)}),rr=O.useMemo(function(){return sr},[sr.join("_")]),Ut=ht(rr,vt.length,ie),Wt=ce&&Object(y.d)(ce.y),Ft=ce&&Object(y.d)(ce.x),tr=Ft&&vt.some(function(hr){var cr=hr.fixed;return cr}),Zt=O.useRef(),xr=pe(Jt,Qe),qt=xr.isSticky,Fr=xr.offsetHeader,gr=xr.offsetScroll,Kr=xr.stickyClassName,Pr,Nr,fr;Wt&&(Nr={overflowY:"scroll",maxHeight:ce.y}),Ft&&(Pr={overflowX:"auto"},Wt||(Nr={overflowY:"hidden"}),fr={width:ce.x===!0?"auto":ce.x,minWidth:"100%"});var qr=O.useCallback(function(hr,cr){Ar(function(jr){var en=new Map(jr);return en.set(hr,cr),en})},[]),Xt=ve(null),Sr=Object(F.a)(Xt,2),kr=Sr[0],$r=Sr[1];function un(hr,cr){if(!cr)return;typeof cr=="function"?cr(hr):cr.scrollLeft!==hr&&(cr.scrollLeft=hr)}var Yr=function(cr){var jr=cr.currentTarget,en=cr.scrollLeft,Un=typeof en=="number"?en:jr.scrollLeft,pi=jr||Je;if(!$r()||$r()===pi){var ei;kr(pi),un(Un,ur.current),un(Un,Gt.current),un(Un,(ei=Zt.current)===null||ei===void 0?void 0:ei.setScrollLeft)}if(jr){var Vi=jr.scrollWidth,zi=jr.clientWidth;mr(Un>0),Vt(Un<Vi-zi)}},rn=function(){Gt.current&&Yr({currentTarget:Gt.current})},mn=function(cr){var jr=cr.width;rn(),rt(Pt.current?Pt.current.offsetWidth:jr)};O.useEffect(function(){return rn},[]),O.useEffect(function(){Ft&&rn()},[Ft]),O.useEffect(function(){mt===ze&&er&&(er.body.current=Gt.current)});var Qn=At(["table"],"table"),Jr=O.useMemo(function(){return te||(tr?ce.x==="max-content"?"auto":"fixed":Wt||vt.some(function(hr){var cr=hr.ellipsis;return cr})?"fixed":"auto")},[Wt,tr,vt,te]),cn,bn={colWidths:rr,columCount:vt.length,stickyOffsets:Ut,onHeaderRow:Lt,fixHeader:Wt},gn=O.useMemo(function(){return yt?null:typeof lt=="function"?lt():lt},[yt,lt]),ci=O.createElement(Se,{data:Ot,measureColumnWidth:Wt||Ft||qt,expandedKeys:H,rowExpandable:Cr,getRowKey:gt,onRow:st,emptyNode:gn,childrenColumnName:Te}),hi=O.createElement(d,{colWidths:vt.map(function(hr){var cr=hr.width;return cr}),columns:vt}),di=Ie&&O.createElement(it.b,null,Ie(Ot)),fi=At(["body"]);if(Wt||qt){var Zn;typeof fi=="function"?(Zn=fi(Ot,{scrollbarSize:Mt,ref:Gt,onScroll:Yr}),bn.colWidths=vt.map(function(hr,cr){var jr=hr.width,en=cr===_t.length-1?jr-Mt:jr;return typeof en=="number"&&!Number.isNaN(en)?en:(Object(g.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):Zn=O.createElement("div",{style:Object(G.a)(Object(G.a)({},Pr),Nr),onScroll:Yr,ref:Gt,className:M()("".concat(Qe,"-body"))},O.createElement(Qn,{style:Object(G.a)(Object(G.a)({},fr),{},{tableLayout:Jr})},hi,ci,di),qt&&O.createElement(he,{ref:Zt,offsetScroll:gr,scrollBodyRef:Gt,onScroll:Yr})),cn=O.createElement(O.Fragment,null,qe!==!1&&O.createElement(c,Object.assign({noData:!Ot.length},bn,Tt,{direction:ie,offsetHeader:Fr,stickyClassName:Kr,ref:ur,onScroll:Yr})),Zn)}else cn=O.createElement("div",{style:Object(G.a)(Object(G.a)({},Pr),Nr),className:M()("".concat(Qe,"-content")),onScroll:Yr,ref:Gt},O.createElement(Qn,{style:Object(G.a)(Object(G.a)({},fr),{},{tableLayout:Jr})},hi,qe!==!1&&O.createElement(h,Object.assign({},bn,Tt)),ci,di));var Ki=Object(n.b)(xe),qn=O.createElement("div",Object.assign({className:M()(Qe,je,(Ue={},Object(se.a)(Ue,"".concat(Qe,"-rtl"),ie==="rtl"),Object(se.a)(Ue,"".concat(Qe,"-ping-left"),Tr),Object(se.a)(Ue,"".concat(Qe,"-ping-right"),Qt),Object(se.a)(Ue,"".concat(Qe,"-layout-fixed"),te==="fixed"),Object(se.a)(Ue,"".concat(Qe,"-fixed-header"),Wt),Object(se.a)(Ue,"".concat(Qe,"-fixed-column"),tr),Object(se.a)(Ue,"".concat(Qe,"-scroll-horizontal"),Ft),Object(se.a)(Ue,"".concat(Qe,"-has-fix-left"),vt[0]&&vt[0].fixed),Object(se.a)(Ue,"".concat(Qe,"-has-fix-right"),vt[vt.length-1]&&vt[vt.length-1].fixed==="right"),Ue)),style:Fe,id:Pe,ref:Pt},Ki),O.createElement(Ze,{pingLeft:Tr,pingRight:Qt,props:Object(G.a)(Object(G.a)({},xe),{},{stickyOffsets:Ut,mergedExpandedKeys:H})},le&&O.createElement(We,{className:"".concat(Qe,"-title")},le(Ot)),O.createElement("div",{className:"".concat(Qe,"-container")},cn),fe&&O.createElement(We,{className:"".concat(Qe,"-footer")},fe(Ot))));Ft&&(qn=O.createElement(v.a,{onResize:mn},qn));var ji=O.useMemo(function(){return{prefixCls:Qe,getComponent:At,scrollbarSize:Mt,direction:ie,fixedInfoList:vt.map(function(hr,cr){return t(cr,cr,vt,Ut,ie)}),isSticky:qt}},[Qe,At,Mt,ie,vt,Ut,ie,qt]),Wi=O.useMemo(function(){return Object(G.a)(Object(G.a)({},Tt),{},{tableLayout:Jr,rowClassName:Le,expandedRowClassName:Ur,componentWidth:He,fixHeader:Wt,fixColumn:tr,horizonScroll:Ft,expandIcon:de,expandableType:Ve,expandRowByClick:Lr,expandedRowRender:Dr,onTriggerExpand:Z,expandIconColumnIndex:Qr,indentSize:oe})},[Tt,Jr,Le,Ur,He,Wt,tr,Ft,de,Ve,Lr,Dr,Z,Qr,oe]),Gi=O.useMemo(function(){return{onColumnResize:qr}},[qr]);return O.createElement(r.a.Provider,{value:ji},O.createElement(N.Provider,{value:Wi},O.createElement(re.Provider,{value:Gi},qn)))}nt.Column=i.a,nt.ColumnGroup=s.a,nt.Summary=it.a,nt.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var pt=_e.b=nt},wOnQ:function(ct,_e,j){/*!
|
|
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
|
|
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
|
* Released under MIT License
|
|
*/(function(se,G){ct.exports=G()})(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 se=function(x,f){return se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(I,S){I.__proto__=S}||function(I,S){for(var z in S)Object.prototype.hasOwnProperty.call(S,z)&&(I[z]=S[z])},se(x,f)};function G(x,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");se(x,f);function I(){this.constructor=x}x.prototype=f===null?Object.create(f):(I.prototype=f.prototype,new I)}var D=function(){return D=Object.assign||function(f){for(var I,S=1,z=arguments.length;S<z;S++){I=arguments[S];for(var ee in I)Object.prototype.hasOwnProperty.call(I,ee)&&(f[ee]=I[ee])}return f},D.apply(this,arguments)};function V(x,f,I,S){function z(ee){return ee instanceof I?ee:new I(function(Ae){Ae(ee)})}return new(I||(I=Promise))(function(ee,Ae){function be(Me){try{Re(S.next(Me))}catch(Xe){Ae(Xe)}}function Ee(Me){try{Re(S.throw(Me))}catch(Xe){Ae(Xe)}}function Re(Me){Me.done?ee(Me.value):z(Me.value).then(be,Ee)}Re((S=S.apply(x,f||[])).next())})}function F(x,f){var I={label:0,sent:function(){if(ee[0]&1)throw ee[1];return ee[1]},trys:[],ops:[]},S,z,ee,Ae;return Ae={next:be(0),throw:be(1),return:be(2)},typeof Symbol=="function"&&(Ae[Symbol.iterator]=function(){return this}),Ae;function be(Re){return function(Me){return Ee([Re,Me])}}function Ee(Re){if(S)throw new TypeError("Generator is already executing.");for(;I;)try{if(S=1,z&&(ee=Re[0]&2?z.return:Re[0]?z.throw||((ee=z.return)&&ee.call(z),0):z.next)&&!(ee=ee.call(z,Re[1])).done)return ee;(z=0,ee)&&(Re=[Re[0]&2,ee.value]);switch(Re[0]){case 0:case 1:ee=Re;break;case 4:return I.label++,{value:Re[1],done:!1};case 5:I.label++,z=Re[1],Re=[0];continue;case 7:Re=I.ops.pop(),I.trys.pop();continue;default:if(!(ee=I.trys,ee=ee.length>0&&ee[ee.length-1])&&(Re[0]===6||Re[0]===2)){I=0;continue}if(Re[0]===3&&(!ee||Re[1]>ee[0]&&Re[1]<ee[3])){I.label=Re[1];break}if(Re[0]===6&&I.label<ee[1]){I.label=ee[1],ee=Re;break}if(ee&&I.label<ee[2]){I.label=ee[2],I.ops.push(Re);break}ee[2]&&I.ops.pop(),I.trys.pop();continue}Re=f.call(x,I)}catch(Me){Re=[6,Me],z=0}finally{S=ee=0}if(Re[0]&5)throw Re[1];return{value:Re[0]?Re[1]:void 0,done:!0}}}function O(x,f,I){if(I||arguments.length===2)for(var S=0,z=f.length,ee;S<z;S++)(ee||!(S in f))&&(ee||(ee=Array.prototype.slice.call(f,0,S)),ee[S]=f[S]);return x.concat(ee||f)}for(var X=function(){function x(f,I,S,z){this.left=f,this.top=I,this.width=S,this.height=z}return x.prototype.add=function(f,I,S,z){return new x(this.left+f,this.top+I,this.width+S,this.height+z)},x.fromClientRect=function(f,I){return new x(I.left+f.windowBounds.left,I.top+f.windowBounds.top,I.width,I.height)},x.fromDOMRectList=function(f,I){var S=Array.from(I).find(function(z){return z.width!==0});return S?new x(S.left+f.windowBounds.left,S.top+f.windowBounds.top,S.width,S.height):x.EMPTY},x.EMPTY=new x(0,0,0,0),x}(),M=function(x,f){return X.fromClientRect(x,f.getBoundingClientRect())},e=function(x){var f=x.body,I=x.documentElement;if(!f||!I)throw new Error("Unable to get document size");var S=Math.max(Math.max(f.scrollWidth,I.scrollWidth),Math.max(f.offsetWidth,I.offsetWidth),Math.max(f.clientWidth,I.clientWidth)),z=Math.max(Math.max(f.scrollHeight,I.scrollHeight),Math.max(f.offsetHeight,I.offsetHeight),Math.max(f.clientHeight,I.clientHeight));return new X(0,0,S,z)},R=function(x){for(var f=[],I=0,S=x.length;I<S;){var z=x.charCodeAt(I++);if(z>=55296&&z<=56319&&I<S){var ee=x.charCodeAt(I++);(ee&64512)===56320?f.push(((z&1023)<<10)+(ee&1023)+65536):(f.push(z),I--)}else f.push(z)}return f},g=function(){for(var x=[],f=0;f<arguments.length;f++)x[f]=arguments[f];if(String.fromCodePoint)return String.fromCodePoint.apply(String,x);var I=x.length;if(!I)return"";for(var S=[],z=-1,ee="";++z<I;){var Ae=x[z];Ae<=65535?S.push(Ae):(Ae-=65536,S.push((Ae>>10)+55296,Ae%1024+56320)),(z+1===I||S.length>16384)&&(ee+=String.fromCharCode.apply(String,S),S.length=0)}return ee},v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),s=0;s<v.length;s++)u[v.charCodeAt(s)]=s;for(var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",A=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),o=0;o<i.length;o++)A[i.charCodeAt(o)]=o;for(var a=function(x){var f=x.length*.75,I=x.length,S,z=0,ee,Ae,be,Ee;x[x.length-1]==="="&&(f--,x[x.length-2]==="="&&f--);var Re=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(f):new Array(f),Me=Array.isArray(Re)?Re:new Uint8Array(Re);for(S=0;S<I;S+=4)ee=A[x.charCodeAt(S)],Ae=A[x.charCodeAt(S+1)],be=A[x.charCodeAt(S+2)],Ee=A[x.charCodeAt(S+3)],Me[z++]=ee<<2|Ae>>4,Me[z++]=(Ae&15)<<4|be>>2,Me[z++]=(be&3)<<6|Ee&63;return Re},r=function(x){for(var f=x.length,I=[],S=0;S<f;S+=2)I.push(x[S+1]<<8|x[S]);return I},t=function(x){for(var f=x.length,I=[],S=0;S<f;S+=4)I.push(x[S+3]<<24|x[S+2]<<16|x[S+1]<<8|x[S]);return I},y=5,_=6+5,E=2,B=_-y,C=65536>>y,h=1<<y,n=h-1,l=1024>>y,d=C+l,b=d,m=2048>>6,c=b+m,L=65536>>_,N=1<<B,T=N-1,P=function(x,f,I){return x.slice?x.slice(f,I):new Uint16Array(Array.prototype.slice.call(x,f,I))},W=function(x,f,I){return x.slice?x.slice(f,I):new Uint32Array(Array.prototype.slice.call(x,f,I))},U=function(x,f){var I=a(x),S=Array.isArray(I)?t(I):new Uint32Array(I),z=Array.isArray(I)?r(I):new Uint16Array(I),ee=24,Ae=P(z,ee/2,S[4]/2),be=S[5]===2?P(z,(ee+S[4])/2):W(S,Math.ceil((ee+S[4])/4));return new Y(S[0],S[1],S[2],S[3],Ae,be)},Y=function(){function x(f,I,S,z,ee,Ae){this.initialValue=f,this.errorValue=I,this.highStart=S,this.highValueIndex=z,this.index=ee,this.data=Ae}return x.prototype.get=function(f){var I;if(f>=0){if(f<55296||f>56319&&f<=65535)return I=this.index[f>>y],I=(I<<E)+(f&n),this.data[I];if(f<=65535)return I=this.index[C+(f-55296>>y)],I=(I<<E)+(f&n),this.data[I];if(f<this.highStart)return I=c-L+(f>>_),I=this.index[I],I+=f>>y&T,I=this.index[I],I=(I<<E)+(f&n),this.data[I];if(f<=1114111)return this.data[this.highValueIndex]}return this.errorValue},x}(),re="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",me=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),ge=0;ge<re.length;ge++)me[re.charCodeAt(ge)]=ge;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==",Se=50,Be=1,Ne=2,ke=3,Ce=4,ve=5,Ye=7,ht=8,at=9,We=10,it=11,ne=12,J=13,k=14,$=15,q=16,he=17,pe=18,Ke=19,Je=20,ze=21,Ze=22,nt=23,pt=24,xe=25,Ue=26,Qe=27,je=28,Le=29,Fe=30,we=31,ue=32,ce=33,te=34,ie=35,le=36,fe=37,Ie=38,Pe=39,qe=40,dt=41,lt=42,st=43,Lt=[9001,65288],mt="!",tt="\xD7",er="\xF7",Jt=U(Oe),Ot=[Fe,le],yt=[Be,Ne,ke,ve],Et=[We,ht],wt=[Qe,Ue],Mt=yt.concat(Et),ut=[Ie,Pe,qe,te,ie],lr=[$,J],At=function(x,f){f===void 0&&(f="strict");var I=[],S=[],z=[];return x.forEach(function(ee,Ae){var be=Jt.get(ee);if(be>Se?(z.push(!0),be-=Se):z.push(!1),["normal","auto","loose"].indexOf(f)!==-1&&[8208,8211,12316,12448].indexOf(ee)!==-1)return S.push(Ae),I.push(q);if(be===Ce||be===it){if(Ae===0)return S.push(Ae),I.push(Fe);var Ee=I[Ae-1];return Mt.indexOf(Ee)===-1?(S.push(S[Ae-1]),I.push(Ee)):(S.push(Ae),I.push(Fe))}if(S.push(Ae),be===we)return I.push(f==="strict"?ze:fe);if(be===lt)return I.push(Fe);if(be===Le)return I.push(Fe);if(be===st)return ee>=131072&&ee<=196605||ee>=196608&&ee<=262141?I.push(fe):I.push(Fe);I.push(be)}),[S,I,z]},gt=function(x,f,I,S){var z=S[I];if(Array.isArray(x)?x.indexOf(z)!==-1:x===z)for(var ee=I;ee<=S.length;){ee++;var Ae=S[ee];if(Ae===f)return!0;if(Ae!==We)break}if(z===We)for(var ee=I;ee>0;){ee--;var be=S[ee];if(Array.isArray(x)?x.indexOf(be)!==-1:x===be)for(var Ee=I;Ee<=S.length;){Ee++;var Ae=S[Ee];if(Ae===f)return!0;if(Ae!==We)break}if(be!==We)break}return!1},Nt=function(x,f){for(var I=x;I>=0;){var S=f[I];if(S===We)I--;else return S}return 0},ir=function(x,f,I,S,z){if(I[S]===0)return tt;var ee=S-1;if(Array.isArray(z)&&z[ee]===!0)return tt;var Ae=ee-1,be=ee+1,Ee=f[ee],Re=Ae>=0?f[Ae]:0,Me=f[be];if(Ee===Ne&&Me===ke)return tt;if(yt.indexOf(Ee)!==-1)return mt;if(yt.indexOf(Me)!==-1)return tt;if(Et.indexOf(Me)!==-1)return tt;if(Nt(ee,f)===ht)return er;if(Jt.get(x[ee])===it)return tt;if((Ee===ue||Ee===ce)&&Jt.get(x[be])===it)return tt;if(Ee===Ye||Me===Ye)return tt;if(Ee===at)return tt;if([We,J,$].indexOf(Ee)===-1&&Me===at)return tt;if([he,pe,Ke,pt,je].indexOf(Me)!==-1)return tt;if(Nt(ee,f)===Ze)return tt;if(gt(nt,Ze,ee,f))return tt;if(gt([he,pe],ze,ee,f))return tt;if(gt(ne,ne,ee,f))return tt;if(Ee===We)return er;if(Ee===nt||Me===nt)return tt;if(Me===q||Ee===q)return er;if([J,$,ze].indexOf(Me)!==-1||Ee===k)return tt;if(Re===le&&lr.indexOf(Ee)!==-1)return tt;if(Ee===je&&Me===le)return tt;if(Me===Je)return tt;if(Ot.indexOf(Me)!==-1&&Ee===xe||Ot.indexOf(Ee)!==-1&&Me===xe)return tt;if(Ee===Qe&&[fe,ue,ce].indexOf(Me)!==-1||[fe,ue,ce].indexOf(Ee)!==-1&&Me===Ue)return tt;if(Ot.indexOf(Ee)!==-1&&wt.indexOf(Me)!==-1||wt.indexOf(Ee)!==-1&&Ot.indexOf(Me)!==-1)return tt;if([Qe,Ue].indexOf(Ee)!==-1&&(Me===xe||[Ze,$].indexOf(Me)!==-1&&f[be+1]===xe)||[Ze,$].indexOf(Ee)!==-1&&Me===xe||Ee===xe&&[xe,je,pt].indexOf(Me)!==-1)return tt;if([xe,je,pt,he,pe].indexOf(Me)!==-1)for(var Xe=ee;Xe>=0;){var $e=f[Xe];if($e===xe)return tt;if([je,pt].indexOf($e)!==-1)Xe--;else break}if([Qe,Ue].indexOf(Me)!==-1)for(var Xe=[he,pe].indexOf(Ee)!==-1?Ae:ee;Xe>=0;){var $e=f[Xe];if($e===xe)return tt;if([je,pt].indexOf($e)!==-1)Xe--;else break}if(Ie===Ee&&[Ie,Pe,te,ie].indexOf(Me)!==-1||[Pe,te].indexOf(Ee)!==-1&&[Pe,qe].indexOf(Me)!==-1||[qe,ie].indexOf(Ee)!==-1&&Me===qe)return tt;if(ut.indexOf(Ee)!==-1&&[Je,Ue].indexOf(Me)!==-1||ut.indexOf(Me)!==-1&&Ee===Qe)return tt;if(Ot.indexOf(Ee)!==-1&&Ot.indexOf(Me)!==-1)return tt;if(Ee===pt&&Ot.indexOf(Me)!==-1)return tt;if(Ot.concat(xe).indexOf(Ee)!==-1&&Me===Ze&&Lt.indexOf(x[be])===-1||Ot.concat(xe).indexOf(Me)!==-1&&Ee===pe)return tt;if(Ee===dt&&Me===dt){for(var Bt=I[ee],ft=1;Bt>0&&(Bt--,f[Bt]===dt);)ft++;if(ft%2!==0)return tt}return Ee===ue&&Me===ce?tt:er},yr=function(x,f){f||(f={lineBreak:"normal",wordBreak:"normal"});var I=At(x,f.lineBreak),S=I[0],z=I[1],ee=I[2];(f.wordBreak==="break-all"||f.wordBreak==="break-word")&&(z=z.map(function(be){return[xe,Fe,lt].indexOf(be)!==-1?fe:be}));var Ae=f.wordBreak==="keep-all"?ee.map(function(be,Ee){return be&&x[Ee]>=19968&&x[Ee]<=40959}):void 0;return[S,z,Ae]},br=function(){function x(f,I,S,z){this.codePoints=f,this.required=I===mt,this.start=S,this.end=z}return x.prototype.slice=function(){return g.apply(void 0,this.codePoints.slice(this.start,this.end))},x}(),Rr=function(x,f){var I=R(x),S=yr(I,f),z=S[0],ee=S[1],Ae=S[2],be=I.length,Ee=0,Re=0;return{next:function(){if(Re>=be)return{done:!0,value:null};for(var Me=tt;Re<be&&(Me=ir(I,ee,z,++Re,Ae))===tt;);if(Me!==tt||Re===be){var Xe=new br(I,Me,Ee,Re);return Ee=Re,{value:Xe,done:!1}}return{done:!0,value:null}}}},Dr=1<<0,Ht=1<<1,pr=1<<2,Lr=1<<3,Cr=10,Qr=47,Ur=92,ae=9,oe=32,de=34,Te=61,Ve=35,et=36,Q=37,p=39,w=40,H=41,Z=95,K=45,ye=33,He=60,rt=62,ot=64,Ge=91,_t=93,vt=61,Tt=123,Pt=63,ur=125,Gt=124,ar=126,kt=128,Tr=65533,mr=42,$t=43,De=44,Qt=58,Vt=59,Dt=46,jt=0,Kt=8,Ar=11,zt=14,sr=31,rr=127,Ut=-1,Wt=48,Ft=97,tr=101,Zt=102,xr=117,qt=122,Fr=65,gr=69,Kr=70,Pr=85,Nr=90,fr=function(x){return x>=Wt&&x<=57},qr=function(x){return x>=55296&&x<=57343},Xt=function(x){return fr(x)||x>=Fr&&x<=Kr||x>=Ft&&x<=Zt},Sr=function(x){return x>=Ft&&x<=qt},kr=function(x){return x>=Fr&&x<=Nr},$r=function(x){return Sr(x)||kr(x)},un=function(x){return x>=kt},Yr=function(x){return x===Cr||x===ae||x===oe},rn=function(x){return $r(x)||un(x)||x===Z},mn=function(x){return rn(x)||fr(x)||x===K},Qn=function(x){return x>=jt&&x<=Kt||x===Ar||x>=zt&&x<=sr||x===rr},Jr=function(x,f){return x!==Ur?!1:f!==Cr},cn=function(x,f,I){return x===K?rn(f)||Jr(f,I):rn(x)?!0:!!(x===Ur&&Jr(x,f))},bn=function(x,f,I){return x===$t||x===K?fr(f)?!0:f===Dt&&fr(I):x===Dt?fr(f):fr(x)},gn=function(x){var f=0,I=1;(x[f]===$t||x[f]===K)&&(x[f]===K&&(I=-1),f++);for(var S=[];fr(x[f]);)S.push(x[f++]);var z=S.length?parseInt(g.apply(void 0,S),10):0;x[f]===Dt&&f++;for(var ee=[];fr(x[f]);)ee.push(x[f++]);var Ae=ee.length,be=Ae?parseInt(g.apply(void 0,ee),10):0;(x[f]===gr||x[f]===tr)&&f++;var Ee=1;(x[f]===$t||x[f]===K)&&(x[f]===K&&(Ee=-1),f++);for(var Re=[];fr(x[f]);)Re.push(x[f++]);var Me=Re.length?parseInt(g.apply(void 0,Re),10):0;return I*(z+be*Math.pow(10,-Ae))*Math.pow(10,Ee*Me)},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},hr={type:14},cr={type:23},jr={type:1},en={type:25},Un={type:24},pi={type:26},ei={type:27},Vi={type:28},zi={type:29},$s={type:31},Xi={type:32},xa=function(){function x(){this._value=[]}return x.prototype.write=function(f){this._value=this._value.concat(R(f))},x.prototype.read=function(){for(var f=[],I=this.consumeToken();I!==Xi;)f.push(I),I=this.consumeToken();return f},x.prototype.consumeToken=function(){var f=this.consumeCodePoint();switch(f){case de:return this.consumeStringToken(de);case Ve:var I=this.peekCodePoint(0),S=this.peekCodePoint(1),z=this.peekCodePoint(2);if(mn(I)||Jr(S,z)){var ee=cn(I,S,z)?Ht:Dr,Ae=this.consumeName();return{type:5,value:Ae,flags:ee}}break;case et:if(this.peekCodePoint(0)===Te)return this.consumeCodePoint(),fi;break;case p:return this.consumeStringToken(p);case w:return ci;case H:return hi;case mr:if(this.peekCodePoint(0)===Te)return this.consumeCodePoint(),hr;break;case $t:if(bn(f,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(f),this.consumeNumericToken();break;case De:return di;case K:var be=f,Ee=this.peekCodePoint(0),Re=this.peekCodePoint(1);if(bn(be,Ee,Re))return this.reconsumeCodePoint(f),this.consumeNumericToken();if(cn(be,Ee,Re))return this.reconsumeCodePoint(f),this.consumeIdentLikeToken();if(Ee===K&&Re===rt)return this.consumeCodePoint(),this.consumeCodePoint(),Un;break;case Dt:if(bn(f,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(f),this.consumeNumericToken();break;case Qr:if(this.peekCodePoint(0)===mr)for(this.consumeCodePoint();;){var Me=this.consumeCodePoint();if(Me===mr&&(Me=this.consumeCodePoint(),Me===Qr))return this.consumeToken();if(Me===Ut)return this.consumeToken()}break;case Qt:return pi;case Vt:return ei;case He:if(this.peekCodePoint(0)===ye&&this.peekCodePoint(1)===K&&this.peekCodePoint(2)===K)return this.consumeCodePoint(),this.consumeCodePoint(),en;break;case ot:var Xe=this.peekCodePoint(0),$e=this.peekCodePoint(1),Bt=this.peekCodePoint(2);if(cn(Xe,$e,Bt)){var Ae=this.consumeName();return{type:7,value:Ae}}break;case Ge:return Vi;case Ur:if(Jr(f,this.peekCodePoint(0)))return this.reconsumeCodePoint(f),this.consumeIdentLikeToken();break;case _t:return zi;case vt:if(this.peekCodePoint(0)===Te)return this.consumeCodePoint(),Zn;break;case Tt:return Wi;case ur:return Gi;case xr:case Pr:var ft=this.peekCodePoint(0),bt=this.peekCodePoint(1);return ft===$t&&(Xt(bt)||bt===Pt)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(f),this.consumeIdentLikeToken();case Gt:if(this.peekCodePoint(0)===Te)return this.consumeCodePoint(),qn;if(this.peekCodePoint(0)===Gt)return this.consumeCodePoint(),Ki;break;case ar:if(this.peekCodePoint(0)===Te)return this.consumeCodePoint(),ji;break;case Ut:return Xi}return Yr(f)?(this.consumeWhiteSpace(),$s):fr(f)?(this.reconsumeCodePoint(f),this.consumeNumericToken()):rn(f)?(this.reconsumeCodePoint(f),this.consumeIdentLikeToken()):{type:6,value:g(f)}},x.prototype.consumeCodePoint=function(){var f=this._value.shift();return typeof f=="undefined"?-1:f},x.prototype.reconsumeCodePoint=function(f){this._value.unshift(f)},x.prototype.peekCodePoint=function(f){return f>=this._value.length?-1:this._value[f]},x.prototype.consumeUnicodeRangeToken=function(){for(var f=[],I=this.consumeCodePoint();Xt(I)&&f.length<6;)f.push(I),I=this.consumeCodePoint();for(var S=!1;I===Pt&&f.length<6;)f.push(I),I=this.consumeCodePoint(),S=!0;if(S){var z=parseInt(g.apply(void 0,f.map(function(Ee){return Ee===Pt?Wt:Ee})),16),ee=parseInt(g.apply(void 0,f.map(function(Ee){return Ee===Pt?Kr:Ee})),16);return{type:30,start:z,end:ee}}var Ae=parseInt(g.apply(void 0,f),16);if(this.peekCodePoint(0)===K&&Xt(this.peekCodePoint(1))){this.consumeCodePoint(),I=this.consumeCodePoint();for(var be=[];Xt(I)&&be.length<6;)be.push(I),I=this.consumeCodePoint();var ee=parseInt(g.apply(void 0,be),16);return{type:30,start:Ae,end:ee}}else return{type:30,start:Ae,end:Ae}},x.prototype.consumeIdentLikeToken=function(){var f=this.consumeName();return f.toLowerCase()==="url"&&this.peekCodePoint(0)===w?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===w?(this.consumeCodePoint(),{type:19,value:f}):{type:20,value:f}},x.prototype.consumeUrlToken=function(){var f=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ut)return{type:22,value:""};var I=this.peekCodePoint(0);if(I===p||I===de){var S=this.consumeStringToken(this.consumeCodePoint());return S.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ut||this.peekCodePoint(0)===H)?(this.consumeCodePoint(),{type:22,value:S.value}):(this.consumeBadUrlRemnants(),cr)}for(;;){var z=this.consumeCodePoint();if(z===Ut||z===H)return{type:22,value:g.apply(void 0,f)};if(Yr(z))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Ut||this.peekCodePoint(0)===H?(this.consumeCodePoint(),{type:22,value:g.apply(void 0,f)}):(this.consumeBadUrlRemnants(),cr);if(z===de||z===p||z===w||Qn(z))return this.consumeBadUrlRemnants(),cr;if(z===Ur)if(Jr(z,this.peekCodePoint(0)))f.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),cr;else f.push(z)}},x.prototype.consumeWhiteSpace=function(){for(;Yr(this.peekCodePoint(0));)this.consumeCodePoint()},x.prototype.consumeBadUrlRemnants=function(){for(;;){var f=this.consumeCodePoint();if(f===H||f===Ut)return;Jr(f,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},x.prototype.consumeStringSlice=function(f){for(var I=5e4,S="";f>0;){var z=Math.min(I,f);S+=g.apply(void 0,this._value.splice(0,z)),f-=z}return this._value.shift(),S},x.prototype.consumeStringToken=function(f){var I="",S=0;do{var z=this._value[S];if(z===Ut||z===void 0||z===f)return I+=this.consumeStringSlice(S),{type:0,value:I};if(z===Cr)return this._value.splice(0,S),jr;if(z===Ur){var ee=this._value[S+1];ee!==Ut&&ee!==void 0&&(ee===Cr?(I+=this.consumeStringSlice(S),S=-1,this._value.shift()):Jr(z,ee)&&(I+=this.consumeStringSlice(S),I+=g(this.consumeEscapedCodePoint()),S=-1))}S++}while(!0)},x.prototype.consumeNumber=function(){var f=[],I=pr,S=this.peekCodePoint(0);for((S===$t||S===K)&&f.push(this.consumeCodePoint());fr(this.peekCodePoint(0));)f.push(this.consumeCodePoint());S=this.peekCodePoint(0);var z=this.peekCodePoint(1);if(S===Dt&&fr(z))for(f.push(this.consumeCodePoint(),this.consumeCodePoint()),I=Lr;fr(this.peekCodePoint(0));)f.push(this.consumeCodePoint());S=this.peekCodePoint(0),z=this.peekCodePoint(1);var ee=this.peekCodePoint(2);if((S===gr||S===tr)&&((z===$t||z===K)&&fr(ee)||fr(z)))for(f.push(this.consumeCodePoint(),this.consumeCodePoint()),I=Lr;fr(this.peekCodePoint(0));)f.push(this.consumeCodePoint());return[gn(f),I]},x.prototype.consumeNumericToken=function(){var f=this.consumeNumber(),I=f[0],S=f[1],z=this.peekCodePoint(0),ee=this.peekCodePoint(1),Ae=this.peekCodePoint(2);if(cn(z,ee,Ae)){var be=this.consumeName();return{type:15,number:I,flags:S,unit:be}}return z===Q?(this.consumeCodePoint(),{type:16,number:I,flags:S}):{type:17,number:I,flags:S}},x.prototype.consumeEscapedCodePoint=function(){var f=this.consumeCodePoint();if(Xt(f)){for(var I=g(f);Xt(this.peekCodePoint(0))&&I.length<6;)I+=g(this.consumeCodePoint());Yr(this.peekCodePoint(0))&&this.consumeCodePoint();var S=parseInt(I,16);return S===0||qr(S)||S>1114111?Tr:S}return f===Ut?Tr:f},x.prototype.consumeName=function(){for(var f="";;){var I=this.consumeCodePoint();if(mn(I))f+=g(I);else if(Jr(I,this.peekCodePoint(0)))f+=g(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(I),f}},x}(),Ta=function(){function x(f){this._tokens=f}return x.create=function(f){var I=new xa;return I.write(f),new x(I.read())},x.parseValue=function(f){return x.create(f).parseComponentValue()},x.parseValues=function(f){return x.create(f).parseComponentValues()},x.prototype.parseComponentValue=function(){for(var f=this.consumeToken();f.type===31;)f=this.consumeToken();if(f.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(f);var I=this.consumeComponentValue();do f=this.consumeToken();while(f.type===31);if(f.type===32)return I;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},x.prototype.parseComponentValues=function(){for(var f=[];;){var I=this.consumeComponentValue();if(I.type===32)return f;f.push(I),f.push()}},x.prototype.consumeComponentValue=function(){var f=this.consumeToken();switch(f.type){case 11:case 28:case 2:return this.consumeSimpleBlock(f.type);case 19:return this.consumeFunction(f)}return f},x.prototype.consumeSimpleBlock=function(f){for(var I={type:f,values:[]},S=this.consumeToken();;){if(S.type===32||qs(S,f))return I;this.reconsumeToken(S),I.values.push(this.consumeComponentValue()),S=this.consumeToken()}},x.prototype.consumeFunction=function(f){for(var I={name:f.value,values:[],type:18};;){var S=this.consumeToken();if(S.type===32||S.type===3)return I;this.reconsumeToken(S),I.values.push(this.consumeComponentValue())}},x.prototype.consumeToken=function(){var f=this._tokens.shift();return typeof f=="undefined"?Xi:f},x.prototype.reconsumeToken=function(f){this._tokens.unshift(f)},x}(),ti=function(x){return x.type===15},Kn=function(x){return x.type===17},Br=function(x){return x.type===20},Zs=function(x){return x.type===0},Yi=function(x,f){return Br(x)&&x.value===f},Ba=function(x){return x.type!==31},jn=function(x){return x.type!==31&&x.type!==4},hn=function(x){var f=[],I=[];return x.forEach(function(S){if(S.type===4){if(I.length===0)throw new Error("Error parsing function args, zero tokens for arg");f.push(I),I=[];return}S.type!==31&&I.push(S)}),I.length&&f.push(I),f},qs=function(x,f){return f===11&&x.type===12||f===28&&x.type===29?!0:f===2&&x.type===3},wn=function(x){return x.type===17||x.type===15},Hr=function(x){return x.type===16||wn(x)},Sa=function(x){return x.length>1?[x[0],x[1]]:[x[0]]},zr={type:17,number:0,flags:pr},Ji={type:16,number:50,flags:pr},Cn={type:16,number:100,flags:pr},ri=function(x,f,I){var S=x[0],z=x[1];return[Ir(S,f),Ir(typeof z!="undefined"?z:S,I)]},Ir=function(x,f){if(x.type===16)return x.number/100*f;if(ti(x))switch(x.unit){case"rem":case"em":return 16*x.number;case"px":default:return x.number}return x.number},Ia="deg",Ra="grad",Oa="rad",La="turn",mi={name:"angle",parse:function(x,f){if(f.type===15)switch(f.unit){case Ia:return Math.PI*f.number/180;case Ra:return Math.PI/200*f.number;case Oa:return f.number;case La:return Math.PI*2*f.number}throw new Error("Unsupported angle type")}},Da=function(x){return x.type===15&&(x.unit===Ia||x.unit===Ra||x.unit===Oa||x.unit===La)},Ua=function(x){var f=x.filter(Br).map(function(I){return I.value}).join(" ");switch(f){case"to bottom right":case"to right bottom":case"left top":case"top left":return[zr,zr];case"to top":case"bottom":return an(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[zr,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,zr];case"to left":case"right":return an(270)}return 0},an=function(x){return Math.PI*x/180},xn={name:"color",parse:function(x,f){if(f.type===18){var I=eo[f.name];if(typeof I=="undefined")throw new Error('Attempting to parse an unsupported color function "'+f.name+'"');return I(x,f.values)}if(f.type===5){if(f.value.length===3){var S=f.value.substring(0,1),z=f.value.substring(1,2),ee=f.value.substring(2,3);return Bn(parseInt(S+S,16),parseInt(z+z,16),parseInt(ee+ee,16),1)}if(f.value.length===4){var S=f.value.substring(0,1),z=f.value.substring(1,2),ee=f.value.substring(2,3),Ae=f.value.substring(3,4);return Bn(parseInt(S+S,16),parseInt(z+z,16),parseInt(ee+ee,16),parseInt(Ae+Ae,16)/255)}if(f.value.length===6){var S=f.value.substring(0,2),z=f.value.substring(2,4),ee=f.value.substring(4,6);return Bn(parseInt(S,16),parseInt(z,16),parseInt(ee,16),1)}if(f.value.length===8){var S=f.value.substring(0,2),z=f.value.substring(2,4),ee=f.value.substring(4,6),Ae=f.value.substring(6,8);return Bn(parseInt(S,16),parseInt(z,16),parseInt(ee,16),parseInt(Ae,16)/255)}}if(f.type===20){var be=vn[f.value.toUpperCase()];if(typeof be!="undefined")return be}return vn.TRANSPARENT}},Tn=function(x){return(255&x)===0},Gr=function(x){var f=255&x,I=255&x>>8,S=255&x>>16,z=255&x>>24;return f<255?"rgba("+z+","+S+","+I+","+f/255+")":"rgb("+z+","+S+","+I+")"},Bn=function(x,f,I,S){return(x<<24|f<<16|I<<8|Math.round(S*255)<<0)>>>0},Fa=function(x,f){if(x.type===17)return x.number;if(x.type===16){var I=f===3?1:255;return f===3?x.number/100*I:Math.round(x.number/100*I)}return 0},Na=function(x,f){var I=f.filter(jn);if(I.length===3){var S=I.map(Fa),z=S[0],ee=S[1],Ae=S[2];return Bn(z,ee,Ae,1)}if(I.length===4){var be=I.map(Fa),z=be[0],ee=be[1],Ae=be[2],Ee=be[3];return Bn(z,ee,Ae,Ee)}return 0};function $i(x,f,I){return I<0&&(I+=1),I>=1&&(I-=1),I<1/6?(f-x)*I*6+x:I<1/2?f:I<2/3?(f-x)*6*(2/3-I)+x:x}var Ma=function(x,f){var I=f.filter(jn),S=I[0],z=I[1],ee=I[2],Ae=I[3],be=(S.type===17?an(S.number):mi.parse(x,S))/(Math.PI*2),Ee=Hr(z)?z.number/100:0,Re=Hr(ee)?ee.number/100:0,Me=typeof Ae!="undefined"&&Hr(Ae)?Ir(Ae,1):1;if(Ee===0)return Bn(Re*255,Re*255,Re*255,1);var Xe=Re<=.5?Re*(Ee+1):Re+Ee-Re*Ee,$e=Re*2-Xe,Bt=$i($e,Xe,be+1/3),ft=$i($e,Xe,be),bt=$i($e,Xe,be-1/3);return Bn(Bt*255,ft*255,bt*255,Me)},eo={hsl:Ma,hsla:Ma,rgb:Na,rgba:Na},ni=function(x,f){return xn.parse(x,Ta.create(f).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(x,f){return f.map(function(I){if(Br(I))switch(I.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"},gi=function(x,f){var I=xn.parse(x,f[0]),S=f[1];return S&&Hr(S)?{color:I,stop:S}:{color:I,stop:null}},Pa=function(x,f){var I=x[0],S=x[x.length-1];I.stop===null&&(I.stop=zr),S.stop===null&&(S.stop=Cn);for(var z=[],ee=0,Ae=0;Ae<x.length;Ae++){var be=x[Ae].stop;if(be!==null){var Ee=Ir(be,f);Ee>ee?z.push(Ee):z.push(ee),ee=Ee}else z.push(null)}for(var Re=null,Ae=0;Ae<z.length;Ae++){var Me=z[Ae];if(Me===null)Re===null&&(Re=Ae);else if(Re!==null){for(var Xe=Ae-Re,$e=z[Re-1],Bt=(Me-$e)/(Xe+1),ft=1;ft<=Xe;ft++)z[Re+ft-1]=Bt*ft;Re=null}}return x.map(function(bt,Yt){var xt=bt.color;return{color:xt,stop:Math.max(Math.min(1,z[Yt]/f),0)}})},no=function(x,f,I){var S=f/2,z=I/2,ee=Ir(x[0],f)-S,Ae=z-Ir(x[1],I);return(Math.atan2(Ae,ee)+Math.PI*2)%(Math.PI*2)},io=function(x,f,I){var S=typeof x=="number"?x:no(x,f,I),z=Math.abs(f*Math.sin(S))+Math.abs(I*Math.cos(S)),ee=f/2,Ae=I/2,be=z/2,Ee=Math.sin(S-Math.PI/2)*be,Re=Math.cos(S-Math.PI/2)*be;return[z,ee-Re,ee+Re,Ae-Ee,Ae+Ee]},ln=function(x,f){return Math.sqrt(x*x+f*f)},ka=function(x,f,I,S,z){var ee=[[0,0],[0,f],[x,0],[x,f]];return ee.reduce(function(Ae,be){var Ee=be[0],Re=be[1],Me=ln(I-Ee,S-Re);return(z?Me<Ae.optimumDistance:Me>Ae.optimumDistance)?{optimumCorner:be,optimumDistance:Me}:Ae},{optimumDistance:z?Infinity:-Infinity,optimumCorner:null}).optimumCorner},ao=function(x,f,I,S,z){var ee=0,Ae=0;switch(x.size){case 0:x.shape===0?ee=Ae=Math.min(Math.abs(f),Math.abs(f-S),Math.abs(I),Math.abs(I-z)):x.shape===1&&(ee=Math.min(Math.abs(f),Math.abs(f-S)),Ae=Math.min(Math.abs(I),Math.abs(I-z)));break;case 2:if(x.shape===0)ee=Ae=Math.min(ln(f,I),ln(f,I-z),ln(f-S,I),ln(f-S,I-z));else if(x.shape===1){var be=Math.min(Math.abs(I),Math.abs(I-z))/Math.min(Math.abs(f),Math.abs(f-S)),Ee=ka(S,z,f,I,!0),Re=Ee[0],Me=Ee[1];ee=ln(Re-f,(Me-I)/be),Ae=be*ee}break;case 1:x.shape===0?ee=Ae=Math.max(Math.abs(f),Math.abs(f-S),Math.abs(I),Math.abs(I-z)):x.shape===1&&(ee=Math.max(Math.abs(f),Math.abs(f-S)),Ae=Math.max(Math.abs(I),Math.abs(I-z)));break;case 3:if(x.shape===0)ee=Ae=Math.max(ln(f,I),ln(f,I-z),ln(f-S,I),ln(f-S,I-z));else if(x.shape===1){var be=Math.max(Math.abs(I),Math.abs(I-z))/Math.max(Math.abs(f),Math.abs(f-S)),Xe=ka(S,z,f,I,!1),Re=Xe[0],Me=Xe[1];ee=ln(Re-f,(Me-I)/be),Ae=be*ee}break}return Array.isArray(x.size)&&(ee=Ir(x.size[0],S),Ae=x.size.length===2?Ir(x.size[1],z):ee),[ee,Ae]},so=function(x,f){var I=an(180),S=[];return hn(f).forEach(function(z,ee){if(ee===0){var Ae=z[0];if(Ae.type===20&&Ae.value==="to"){I=Ua(z);return}else if(Da(Ae)){I=mi.parse(x,Ae);return}}var be=gi(x,z);S.push(be)}),{angle:I,stops:S,type:1}},vi=function(x,f){var I=an(180),S=[];return hn(f).forEach(function(z,ee){if(ee===0){var Ae=z[0];if(Ae.type===20&&["top","left","right","bottom"].indexOf(Ae.value)!==-1){I=Ua(z);return}else if(Da(Ae)){I=(mi.parse(x,Ae)+an(270))%an(360);return}}var be=gi(x,z);S.push(be)}),{angle:I,stops:S,type:1}},oo=function(x,f){var I=an(180),S=[],z=1,ee=0,Ae=3,be=[];return hn(f).forEach(function(Ee,Re){var Me=Ee[0];if(Re===0){if(Br(Me)&&Me.value==="linear"){z=1;return}else if(Br(Me)&&Me.value==="radial"){z=2;return}}if(Me.type===18){if(Me.name==="from"){var Xe=xn.parse(x,Me.values[0]);S.push({stop:zr,color:Xe})}else if(Me.name==="to"){var Xe=xn.parse(x,Me.values[0]);S.push({stop:Cn,color:Xe})}else if(Me.name==="color-stop"){var $e=Me.values.filter(jn);if($e.length===2){var Xe=xn.parse(x,$e[1]),Bt=$e[0];Kn(Bt)&&S.push({stop:{type:16,number:Bt.number*100,flags:Bt.flags},color:Xe})}}}}),z===1?{angle:(I+an(180))%an(360),stops:S,type:z}:{size:Ae,shape:ee,stops:S,position:be,type:z}},Ha="closest-side",Qa="farthest-side",Ka="closest-corner",ja="farthest-corner",Wa="circle",Ga="ellipse",Va="cover",za="contain",Ao=function(x,f){var I=0,S=3,z=[],ee=[];return hn(f).forEach(function(Ae,be){var Ee=!0;if(be===0){var Re=!1;Ee=Ae.reduce(function(Xe,$e){if(Re)if(Br($e))switch($e.value){case"center":return ee.push(Ji),Xe;case"top":case"left":return ee.push(zr),Xe;case"right":case"bottom":return ee.push(Cn),Xe}else(Hr($e)||wn($e))&&ee.push($e);else if(Br($e))switch($e.value){case Wa:return I=0,!1;case Ga:return I=1,!1;case"at":return Re=!0,!1;case Ha:return S=0,!1;case Va:case Qa:return S=1,!1;case za:case Ka:return S=2,!1;case ja:return S=3,!1}else if(wn($e)||Hr($e))return Array.isArray(S)||(S=[]),S.push($e),!1;return Xe},Ee)}if(Ee){var Me=gi(x,Ae);z.push(Me)}}),{size:S,shape:I,stops:z,position:ee,type:2}},yi=function(x,f){var I=0,S=3,z=[],ee=[];return hn(f).forEach(function(Ae,be){var Ee=!0;if(be===0?Ee=Ae.reduce(function(Me,Xe){if(Br(Xe))switch(Xe.value){case"center":return ee.push(Ji),!1;case"top":case"left":return ee.push(zr),!1;case"right":case"bottom":return ee.push(Cn),!1}else if(Hr(Xe)||wn(Xe))return ee.push(Xe),!1;return Me},Ee):be===1&&(Ee=Ae.reduce(function(Me,Xe){if(Br(Xe))switch(Xe.value){case Wa:return I=0,!1;case Ga:return I=1,!1;case za:case Ha:return S=0,!1;case Qa:return S=1,!1;case Ka:return S=2,!1;case Va:case ja:return S=3,!1}else if(wn(Xe)||Hr(Xe))return Array.isArray(S)||(S=[]),S.push(Xe),!1;return Me},Ee)),Ee){var Re=gi(x,Ae);z.push(Re)}}),{size:S,shape:I,stops:z,position:ee,type:2}},lo=function(x){return x.type===1},uo=function(x){return x.type===2},Zi={name:"image",parse:function(x,f){if(f.type===22){var I={url:f.value,type:0};return x.cache.addImage(f.value),I}if(f.type===18){var S=Xa[f.name];if(typeof S=="undefined")throw new Error('Attempting to parse an unsupported image function "'+f.name+'"');return S(x,f.values)}throw new Error("Unsupported image type "+f.type)}};function co(x){return!(x.type===20&&x.value==="none")&&(x.type!==18||!!Xa[x.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(x,f){if(f.length===0)return[];var I=f[0];return I.type===20&&I.value==="none"?[]:f.filter(function(S){return jn(S)&&co(S)}).map(function(S){return Zi.parse(x,S)})}},fo={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(x,f){return f.map(function(I){if(Br(I))switch(I.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(x,f){return hn(f).map(function(I){return I.filter(Hr)}).map(Sa)}},mo={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(x,f){return hn(f).map(function(I){return I.filter(Br).map(function(S){return S.value}).join(" ")}).map(go)}},go=function(x){switch(x){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(x){x.AUTO="auto",x.CONTAIN="contain",x.COVER="cover"})(Wn||(Wn={}));var vo={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(x,f){return hn(f).map(function(I){return I.filter(yo)})}},yo=function(x){return Br(x)||Hr(x)},Ei=function(x){return{name:"border-"+x+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Eo=Ei("top"),_o=Ei("right"),bo=Ei("bottom"),wo=Ei("left"),_i=function(x){return{name:"border-radius-"+x,initialValue:"0 0",prefix:!1,type:1,parse:function(f,I){return Sa(I.filter(Hr))}}},Co=_i("top-left"),xo=_i("top-right"),To=_i("bottom-right"),Bo=_i("bottom-left"),bi=function(x){return{name:"border-"+x+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(f,I){switch(I){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(x){return{name:"border-"+x+"-width",initialValue:"0",type:0,prefix:!1,parse:function(f,I){return ti(I)?I.number:0}}},Lo=wi("top"),Do=wi("right"),Uo=wi("bottom"),Fo=wi("left"),No={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Mo={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(x,f){switch(f){case"rtl":return 1;case"ltr":default:return 0}}},Po={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(x,f){return f.filter(Br).reduce(function(I,S){return I|ko(S.value)},0)}},ko=function(x){switch(x){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(x,f){switch(f){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(x,f){return f.type===20&&f.value==="normal"?0:f.type===17||f.type===15?f.number:0}},Ci;(function(x){x.NORMAL="normal",x.STRICT="strict"})(Ci||(Ci={}));var Ko={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(x,f){switch(f){case"strict":return Ci.STRICT;case"normal":default:return Ci.NORMAL}}},jo={name:"line-height",initialValue:"normal",prefix:!1,type:4},Ya=function(x,f){return Br(x)&&x.value==="normal"?1.2*f:x.type===17?f*x.number:Hr(x)?Ir(x,f):f},Wo={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(x,f){return f.type===20&&f.value==="none"?null:Zi.parse(x,f)}},Go={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(x,f){switch(f){case"inside":return 0;case"outside":default:return 1}}},qi={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(x,f){switch(f){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}}},xi=function(x){return{name:"margin-"+x,initialValue:"0",prefix:!1,type:4}},Vo=xi("top"),zo=xi("right"),Xo=xi("bottom"),Yo=xi("left"),Jo={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(x,f){return f.filter(Br).map(function(I){switch(I.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},$o={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(x,f){switch(f){case"break-word":return"break-word";case"normal":default:return"normal"}}},Ti=function(x){return{name:"padding-"+x,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Zo=Ti("top"),qo=Ti("right"),eA=Ti("bottom"),tA=Ti("left"),rA={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(x,f){switch(f){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(x,f){switch(f){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(x,f){return f.length===1&&Yi(f[0],"none")?[]:hn(f).map(function(I){for(var S={color:vn.TRANSPARENT,offsetX:zr,offsetY:zr,blur:zr},z=0,ee=0;ee<I.length;ee++){var Ae=I[ee];wn(Ae)?(z===0?S.offsetX=Ae:z===1?S.offsetY=Ae:S.blur=Ae,z++):S.color=xn.parse(x,Ae)}return S})}},aA={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(x,f){switch(f){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(x,f){if(f.type===20&&f.value==="none")return null;if(f.type===18){var I=lA[f.name];if(typeof I=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+f.name+'"');return I(f.values)}return null}},oA=function(x){var f=x.filter(function(I){return I.type===17}).map(function(I){return I.number});return f.length===6?f:null},AA=function(x){var f=x.filter(function(Ee){return Ee.type===17}).map(function(Ee){return Ee.number}),I=f[0],S=f[1];f[2],f[3];var z=f[4],ee=f[5];f[6],f[7],f[8],f[9],f[10],f[11];var Ae=f[12],be=f[13];return f[14],f[15],f.length===16?[I,S,z,ee,Ae,be]:null},lA={matrix:oA,matrix3d:AA},Ja={type:16,number:50,flags:pr},uA=[Ja,Ja],cA={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(x,f){var I=f.filter(Hr);return I.length!==2?uA:[I[0],I[1]]}},hA={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(x,f){switch(f){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},ii;(function(x){x.NORMAL="normal",x.BREAK_ALL="break-all",x.KEEP_ALL="keep-all"})(ii||(ii={}));for(var dA={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(x,f){switch(f){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(x,f){if(f.type===20)return{auto:!0,order:0};if(Kn(f))return{auto:!1,order:f.number};throw new Error("Invalid z-index number parsed")}},$a={name:"time",parse:function(x,f){if(f.type===15)switch(f.unit.toLowerCase()){case"s":return 1e3*f.number;case"ms":return f.number}throw new Error("Unsupported time type")}},pA={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(x,f){return Kn(f)?f.number:1}},mA={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},gA={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(x,f){return f.filter(Br).map(function(I){switch(I.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(I){return I!==0})}},vA={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(x,f){var I=[],S=[];return f.forEach(function(z){switch(z.type){case 20:case 0:I.push(z.value);break;case 17:I.push(z.number.toString());break;case 4:S.push(I.join(" ")),I.length=0;break}}),I.length&&S.push(I.join(" ")),S.map(function(z){return z.indexOf(" ")===-1?z:"'"+z+"'"})}},yA={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},EA={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(x,f){if(Kn(f))return f.number;if(Br(f))switch(f.value){case"bold":return 700;case"normal":default:return 400}return 400}},_A={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(x,f){return f.filter(Br).map(function(I){return I.value})}},bA={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(x,f){switch(f){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},Wr=function(x,f){return(x&f)!==0},wA={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(x,f){if(f.length===0)return[];var I=f[0];return I.type===20&&I.value==="none"?[]:f}},CA={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(x,f){if(f.length===0)return null;var I=f[0];if(I.type===20&&I.value==="none")return null;for(var S=[],z=f.filter(Ba),ee=0;ee<z.length;ee++){var Ae=z[ee],be=z[ee+1];if(Ae.type===20){var Ee=be&&Kn(be)?be.number:1;S.push({counter:Ae.value,increment:Ee})}}return S}},xA={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(x,f){if(f.length===0)return[];for(var I=[],S=f.filter(Ba),z=0;z<S.length;z++){var ee=S[z],Ae=S[z+1];if(Br(ee)&&ee.value!=="none"){var be=Ae&&Kn(Ae)?Ae.number:0;I.push({counter:ee.value,reset:be})}}return I}},TA={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(x,f){return f.filter(ti).map(function(I){return $a.parse(x,I)})}},BA={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(x,f){if(f.length===0)return null;var I=f[0];if(I.type===20&&I.value==="none")return null;var S=[],z=f.filter(Zs);if(z.length%2!==0)return null;for(var ee=0;ee<z.length;ee+=2){var Ae=z[ee].value,be=z[ee+1].value;S.push({open:Ae,close:be})}return S}},Za=function(x,f,I){if(!x)return"";var S=x[Math.min(f,x.length-1)];return S?I?S.open:S.close:""},SA={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(x,f){return f.length===1&&Yi(f[0],"none")?[]:hn(f).map(function(I){for(var S={color:255,offsetX:zr,offsetY:zr,blur:zr,spread:zr,inset:!1},z=0,ee=0;ee<I.length;ee++){var Ae=I[ee];Yi(Ae,"inset")?S.inset=!0:wn(Ae)?(z===0?S.offsetX=Ae:z===1?S.offsetY=Ae:z===2?S.blur=Ae:S.spread=Ae,z++):S.color=xn.parse(x,Ae)}return S})}},IA={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(x,f){var I=[0,1,2],S=[];return f.filter(Br).forEach(function(z){switch(z.value){case"stroke":S.push(1);break;case"fill":S.push(0);break;case"markers":S.push(2);break}}),I.forEach(function(z){S.indexOf(z)===-1&&S.push(z)}),S}},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(x,f){return ti(f)?f.number:0}},LA=function(){function x(f,I){var S,z;this.animationDuration=It(f,TA,I.animationDuration),this.backgroundClip=It(f,to,I.backgroundClip),this.backgroundColor=It(f,ro,I.backgroundColor),this.backgroundImage=It(f,ho,I.backgroundImage),this.backgroundOrigin=It(f,fo,I.backgroundOrigin),this.backgroundPosition=It(f,po,I.backgroundPosition),this.backgroundRepeat=It(f,mo,I.backgroundRepeat),this.backgroundSize=It(f,vo,I.backgroundSize),this.borderTopColor=It(f,Eo,I.borderTopColor),this.borderRightColor=It(f,_o,I.borderRightColor),this.borderBottomColor=It(f,bo,I.borderBottomColor),this.borderLeftColor=It(f,wo,I.borderLeftColor),this.borderTopLeftRadius=It(f,Co,I.borderTopLeftRadius),this.borderTopRightRadius=It(f,xo,I.borderTopRightRadius),this.borderBottomRightRadius=It(f,To,I.borderBottomRightRadius),this.borderBottomLeftRadius=It(f,Bo,I.borderBottomLeftRadius),this.borderTopStyle=It(f,So,I.borderTopStyle),this.borderRightStyle=It(f,Io,I.borderRightStyle),this.borderBottomStyle=It(f,Ro,I.borderBottomStyle),this.borderLeftStyle=It(f,Oo,I.borderLeftStyle),this.borderTopWidth=It(f,Lo,I.borderTopWidth),this.borderRightWidth=It(f,Do,I.borderRightWidth),this.borderBottomWidth=It(f,Uo,I.borderBottomWidth),this.borderLeftWidth=It(f,Fo,I.borderLeftWidth),this.boxShadow=It(f,SA,I.boxShadow),this.color=It(f,No,I.color),this.direction=It(f,Mo,I.direction),this.display=It(f,Po,I.display),this.float=It(f,Ho,I.cssFloat),this.fontFamily=It(f,vA,I.fontFamily),this.fontSize=It(f,yA,I.fontSize),this.fontStyle=It(f,bA,I.fontStyle),this.fontVariant=It(f,_A,I.fontVariant),this.fontWeight=It(f,EA,I.fontWeight),this.letterSpacing=It(f,Qo,I.letterSpacing),this.lineBreak=It(f,Ko,I.lineBreak),this.lineHeight=It(f,jo,I.lineHeight),this.listStyleImage=It(f,Wo,I.listStyleImage),this.listStylePosition=It(f,Go,I.listStylePosition),this.listStyleType=It(f,qi,I.listStyleType),this.marginTop=It(f,Vo,I.marginTop),this.marginRight=It(f,zo,I.marginRight),this.marginBottom=It(f,Xo,I.marginBottom),this.marginLeft=It(f,Yo,I.marginLeft),this.opacity=It(f,pA,I.opacity);var ee=It(f,Jo,I.overflow);this.overflowX=ee[0],this.overflowY=ee[ee.length>1?1:0],this.overflowWrap=It(f,$o,I.overflowWrap),this.paddingTop=It(f,Zo,I.paddingTop),this.paddingRight=It(f,qo,I.paddingRight),this.paddingBottom=It(f,eA,I.paddingBottom),this.paddingLeft=It(f,tA,I.paddingLeft),this.paintOrder=It(f,IA,I.paintOrder),this.position=It(f,nA,I.position),this.textAlign=It(f,rA,I.textAlign),this.textDecorationColor=It(f,mA,(S=I.textDecorationColor)!==null&&S!==void 0?S:I.color),this.textDecorationLine=It(f,gA,(z=I.textDecorationLine)!==null&&z!==void 0?z:I.textDecoration),this.textShadow=It(f,iA,I.textShadow),this.textTransform=It(f,aA,I.textTransform),this.transform=It(f,sA,I.transform),this.transformOrigin=It(f,cA,I.transformOrigin),this.visibility=It(f,hA,I.visibility),this.webkitTextStrokeColor=It(f,RA,I.webkitTextStrokeColor),this.webkitTextStrokeWidth=It(f,OA,I.webkitTextStrokeWidth),this.wordBreak=It(f,dA,I.wordBreak),this.zIndex=It(f,fA,I.zIndex)}return x.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},x.prototype.isTransparent=function(){return Tn(this.backgroundColor)},x.prototype.isTransformed=function(){return this.transform!==null},x.prototype.isPositioned=function(){return this.position!==0},x.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},x.prototype.isFloating=function(){return this.float!==0},x.prototype.isInlineLevel=function(){return Wr(this.display,4)||Wr(this.display,33554432)||Wr(this.display,268435456)||Wr(this.display,536870912)||Wr(this.display,67108864)||Wr(this.display,134217728)},x}(),DA=function(){function x(f,I){this.content=It(f,wA,I.content),this.quotes=It(f,BA,I.quotes)}return x}(),qa=function(){function x(f,I){this.counterIncrement=It(f,CA,I.counterIncrement),this.counterReset=It(f,xA,I.counterReset)}return x}(),It=function(x,f,I){var S=new xa,z=I!==null&&typeof I!="undefined"?I.toString():f.initialValue;S.write(z);var ee=new Ta(S.read());switch(f.type){case 2:var Ae=ee.parseComponentValue();return f.parse(x,Br(Ae)?Ae.value:f.initialValue);case 0:return f.parse(x,ee.parseComponentValue());case 1:return f.parse(x,ee.parseComponentValues());case 4:return ee.parseComponentValue();case 3:switch(f.format){case"angle":return mi.parse(x,ee.parseComponentValue());case"color":return xn.parse(x,ee.parseComponentValue());case"image":return Zi.parse(x,ee.parseComponentValue());case"length":var be=ee.parseComponentValue();return wn(be)?be:zr;case"length-percentage":var Ee=ee.parseComponentValue();return Hr(Ee)?Ee:zr;case"time":return $a.parse(x,ee.parseComponentValue())}break}},UA="data-html2canvas-debug",FA=function(x){var f=x.getAttribute(UA);switch(f){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},ea=function(x,f){var I=FA(x);return I===1||f===I},dn=function(){function x(f,I){if(this.context=f,this.textNodes=[],this.elements=[],this.flags=0,ea(I,3))debugger;this.styles=new LA(f,window.getComputedStyle(I,null)),fa(I)&&(this.styles.animationDuration.some(function(S){return S>0})&&(I.style.animationDuration="0s"),this.styles.transform!==null&&(I.style.transform="none")),this.bounds=M(this.context,I),ea(I,4)&&(this.flags|=16)}return x}(),NA="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",es="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ai=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Bi=0;Bi<es.length;Bi++)ai[es.charCodeAt(Bi)]=Bi;for(var MA=function(x){var f=x.length*.75,I=x.length,S,z=0,ee,Ae,be,Ee;x[x.length-1]==="="&&(f--,x[x.length-2]==="="&&f--);var Re=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(f):new Array(f),Me=Array.isArray(Re)?Re:new Uint8Array(Re);for(S=0;S<I;S+=4)ee=ai[x.charCodeAt(S)],Ae=ai[x.charCodeAt(S+1)],be=ai[x.charCodeAt(S+2)],Ee=ai[x.charCodeAt(S+3)],Me[z++]=ee<<2|Ae>>4,Me[z++]=(Ae&15)<<4|be>>2,Me[z++]=(be&3)<<6|Ee&63;return Re},PA=function(x){for(var f=x.length,I=[],S=0;S<f;S+=2)I.push(x[S+1]<<8|x[S]);return I},kA=function(x){for(var f=x.length,I=[],S=0;S<f;S+=4)I.push(x[S+3]<<24|x[S+2]<<16|x[S+1]<<8|x[S]);return I},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(x,f,I){return x.slice?x.slice(f,I):new Uint16Array(Array.prototype.slice.call(x,f,I))},JA=function(x,f,I){return x.slice?x.slice(f,I):new Uint32Array(Array.prototype.slice.call(x,f,I))},$A=function(x,f){var I=MA(x),S=Array.isArray(I)?kA(I):new Uint32Array(I),z=Array.isArray(I)?PA(I):new Uint16Array(I),ee=24,Ae=rs(z,ee/2,S[4]/2),be=S[5]===2?rs(z,(ee+S[4])/2):JA(S,Math.ceil((ee+S[4])/4));return new ZA(S[0],S[1],S[2],S[3],Ae,be)},ZA=function(){function x(f,I,S,z,ee,Ae){this.initialValue=f,this.errorValue=I,this.highStart=S,this.highValueIndex=z,this.index=ee,this.data=Ae}return x.prototype.get=function(f){var I;if(f>=0){if(f<55296||f>56319&&f<=65535)return I=this.index[f>>Fn],I=(I<<ra)+(f&na),this.data[I];if(f<=65535)return I=this.index[ts+(f-55296>>Fn)],I=(I<<ra)+(f&na),this.data[I];if(f<this.highStart)return I=VA-zA+(f>>ta),I=this.index[I],I+=f>>Fn&YA,I=this.index[I],I=(I<<ra)+(f&na),this.data[I];if(f<=1114111)return this.data[this.highValueIndex]}return this.errorValue},x}(),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(x){for(var f=[],I=0,S=x.length;I<S;){var z=x.charCodeAt(I++);if(z>=55296&&z<=56319&&I<S){var ee=x.charCodeAt(I++);(ee&64512)===56320?f.push(((z&1023)<<10)+(ee&1023)+65536):(f.push(z),I--)}else f.push(z)}return f},nl=function(){for(var x=[],f=0;f<arguments.length;f++)x[f]=arguments[f];if(String.fromCodePoint)return String.fromCodePoint.apply(String,x);var I=x.length;if(!I)return"";for(var S=[],z=-1,ee="";++z<I;){var Ae=x[z];Ae<=65535?S.push(Ae):(Ae-=65536,S.push((Ae>>10)+55296,Ae%1024+56320)),(z+1===I||S.length>16384)&&(ee+=String.fromCharCode.apply(String,S),S.length=0)}return ee},il=$A(NA),sn="\xD7",la="\xF7",al=function(x){return il.get(x)},sl=function(x,f,I){var S=I-2,z=f[S],ee=f[I-1],Ae=f[I];if(ee===ia&&Ae===aa)return sn;if(ee===ia||ee===aa||ee===is)return la;if(Ae===ia||Ae===aa||Ae===is)return la;if(ee===ss&&[ss,sa,os,As].indexOf(Ae)!==-1)return sn;if((ee===os||ee===sa)&&(Ae===sa||Ae===oa))return sn;if((ee===As||ee===oa)&&Ae===oa)return sn;if(Ae===ls||Ae===as)return sn;if(Ae===tl)return sn;if(ee===el)return sn;if(ee===ls&&Ae===us){for(;z===as;)z=f[--S];if(z===us)return sn}if(ee===Aa&&Ae===Aa){for(var be=0;z===Aa;)be++,z=f[--S];if(be%2===0)return sn}return la},ol=function(x){var f=rl(x),I=f.length,S=0,z=0,ee=f.map(al);return{next:function(){if(S>=I)return{done:!0,value:null};for(var Ae=sn;S<I&&(Ae=sl(f,ee,++S))===sn;);if(Ae!==sn||S===I){var be=nl.apply(null,f.slice(z,S));return z=S,{value:be,done:!1}}return{done:!0,value:null}}}},Al=function(x){for(var f=ol(x),I=[],S;!(S=f.next()).done;)S.value&&I.push(S.value.slice());return I},ll=function(x){var f=123;if(x.createRange){var I=x.createRange();if(I.getBoundingClientRect){var S=x.createElement("boundtest");S.style.height=f+"px",S.style.display="block",x.body.appendChild(S),I.selectNode(S);var z=I.getBoundingClientRect(),ee=Math.round(z.height);if(x.body.removeChild(S),ee===f)return!0}}return!1},ul=function(x){var f=x.createElement("boundtest");f.style.width="50px",f.style.display="block",f.style.fontSize="12px",f.style.letterSpacing="0px",f.style.wordSpacing="0px",x.body.appendChild(f);var I=x.createRange();f.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var S=f.firstChild,z=R(S.data).map(function(Ee){return g(Ee)}),ee=0,Ae={},be=z.every(function(Ee,Re){I.setStart(S,ee),I.setEnd(S,ee+Ee.length);var Me=I.getBoundingClientRect();ee+=Ee.length;var Xe=Me.x>Ae.x||Me.y>Ae.y;return Ae=Me,Re===0?!0:Xe});return x.body.removeChild(f),be},cl=function(){return typeof new Image().crossOrigin!="undefined"},hl=function(){return typeof new XMLHttpRequest().responseType=="string"},dl=function(x){var f=new Image,I=x.createElement("canvas"),S=I.getContext("2d");if(!S)return!1;f.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{S.drawImage(f,0,0),I.toDataURL()}catch(z){return!1}return!0},cs=function(x){return x[0]===0&&x[1]===255&&x[2]===0&&x[3]===255},fl=function(x){var f=x.createElement("canvas"),I=100;f.width=I,f.height=I;var S=f.getContext("2d");if(!S)return Promise.reject(!1);S.fillStyle="rgb(0, 255, 0)",S.fillRect(0,0,I,I);var z=new Image,ee=f.toDataURL();z.src=ee;var Ae=ua(I,I,0,0,z);return S.fillStyle="red",S.fillRect(0,0,I,I),hs(Ae).then(function(be){S.drawImage(be,0,0);var Ee=S.getImageData(0,0,I,I).data;S.fillStyle="red",S.fillRect(0,0,I,I);var Re=x.createElement("div");return Re.style.backgroundImage="url("+ee+")",Re.style.height=I+"px",cs(Ee)?hs(ua(I,I,0,0,Re)):Promise.reject(!1)}).then(function(be){return S.drawImage(be,0,0),cs(S.getImageData(0,0,I,I).data)}).catch(function(){return!1})},ua=function(x,f,I,S,z){var ee="http://www.w3.org/2000/svg",Ae=document.createElementNS(ee,"svg"),be=document.createElementNS(ee,"foreignObject");return Ae.setAttributeNS(null,"width",x.toString()),Ae.setAttributeNS(null,"height",f.toString()),be.setAttributeNS(null,"width","100%"),be.setAttributeNS(null,"height","100%"),be.setAttributeNS(null,"x",I.toString()),be.setAttributeNS(null,"y",S.toString()),be.setAttributeNS(null,"externalResourcesRequired","true"),Ae.appendChild(be),be.appendChild(z),Ae},hs=function(x){return new Promise(function(f,I){var S=new Image;S.onload=function(){return f(S)},S.onerror=I,S.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(x))})},Xr={get SUPPORT_RANGE_BOUNDS(){var x=ll(document);return Object.defineProperty(Xr,"SUPPORT_RANGE_BOUNDS",{value:x}),x},get SUPPORT_WORD_BREAKING(){var x=Xr.SUPPORT_RANGE_BOUNDS&&ul(document);return Object.defineProperty(Xr,"SUPPORT_WORD_BREAKING",{value:x}),x},get SUPPORT_SVG_DRAWING(){var x=dl(document);return Object.defineProperty(Xr,"SUPPORT_SVG_DRAWING",{value:x}),x},get SUPPORT_FOREIGNOBJECT_DRAWING(){var x=typeof Array.from=="function"&&typeof window.fetch=="function"?fl(document):Promise.resolve(!1);return Object.defineProperty(Xr,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:x}),x},get SUPPORT_CORS_IMAGES(){var x=cl();return Object.defineProperty(Xr,"SUPPORT_CORS_IMAGES",{value:x}),x},get SUPPORT_RESPONSE_TYPE(){var x=hl();return Object.defineProperty(Xr,"SUPPORT_RESPONSE_TYPE",{value:x}),x},get SUPPORT_CORS_XHR(){var x="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Xr,"SUPPORT_CORS_XHR",{value:x}),x},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var x=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(Xr,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:x}),x}},si=function(){function x(f,I){this.text=f,this.bounds=I}return x}(),pl=function(x,f,I,S){var z=vl(f,I),ee=[],Ae=0;return z.forEach(function(be){if(I.textDecorationLine.length||be.trim().length>0)if(Xr.SUPPORT_RANGE_BOUNDS){var Ee=ds(S,Ae,be.length).getClientRects();if(Ee.length>1){var Re=ca(be),Me=0;Re.forEach(function($e){ee.push(new si($e,X.fromDOMRectList(x,ds(S,Me+Ae,$e.length).getClientRects()))),Me+=$e.length})}else ee.push(new si(be,X.fromDOMRectList(x,Ee)))}else{var Xe=S.splitText(be.length);ee.push(new si(be,ml(x,S))),S=Xe}else Xr.SUPPORT_RANGE_BOUNDS||(S=S.splitText(be.length));Ae+=be.length}),ee},ml=function(x,f){var I=f.ownerDocument;if(I){var S=I.createElement("html2canvaswrapper");S.appendChild(f.cloneNode(!0));var z=f.parentNode;if(z){z.replaceChild(S,f);var ee=M(x,S);return S.firstChild&&z.replaceChild(S.firstChild,S),ee}}return X.EMPTY},ds=function(x,f,I){var S=x.ownerDocument;if(!S)throw new Error("Node has no owner document");var z=S.createRange();return z.setStart(x,f),z.setEnd(x,f+I),z},ca=function(x){if(Xr.SUPPORT_NATIVE_TEXT_SEGMENTATION){var f=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(f.segment(x)).map(function(I){return I.segment})}return Al(x)},gl=function(x,f){if(Xr.SUPPORT_NATIVE_TEXT_SEGMENTATION){var I=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(I.segment(x)).map(function(S){return S.segment})}return El(x,f)},vl=function(x,f){return f.letterSpacing!==0?ca(x):gl(x,f)},yl=[32,160,4961,65792,65793,4153,4241],El=function(x,f){for(var I=Rr(x,{lineBreak:f.lineBreak,wordBreak:f.overflowWrap==="break-word"?"break-word":f.wordBreak}),S=[],z,ee=function(){if(z.value){var Ae=z.value.slice(),be=R(Ae),Ee="";be.forEach(function(Re){yl.indexOf(Re)===-1?Ee+=g(Re):(Ee.length&&S.push(Ee),S.push(g(Re)),Ee="")}),Ee.length&&S.push(Ee)}};!(z=I.next()).done;)ee();return S},_l=function(){function x(f,I,S){this.text=bl(I.data,S.textTransform),this.textBounds=pl(f,this.text,S,I)}return x}(),bl=function(x,f){switch(f){case 1:return x.toLowerCase();case 3:return x.replace(wl,Cl);case 2:return x.toUpperCase();default:return x}},wl=/(^|\s|:|-|\(|\))([a-z])/g,Cl=function(x,f,I){return x.length>0?f+I.toUpperCase():x},fs=function(x){G(f,x);function f(I,S){var z=x.call(this,I,S)||this;return z.src=S.currentSrc||S.src,z.intrinsicWidth=S.naturalWidth,z.intrinsicHeight=S.naturalHeight,z.context.cache.addImage(z.src),z}return f}(dn),ps=function(x){G(f,x);function f(I,S){var z=x.call(this,I,S)||this;return z.canvas=S,z.intrinsicWidth=S.width,z.intrinsicHeight=S.height,z}return f}(dn),ms=function(x){G(f,x);function f(I,S){var z=x.call(this,I,S)||this,ee=new XMLSerializer,Ae=M(I,S);return S.setAttribute("width",Ae.width+"px"),S.setAttribute("height",Ae.height+"px"),z.svg="data:image/svg+xml,"+encodeURIComponent(ee.serializeToString(S)),z.intrinsicWidth=S.width.baseVal.value,z.intrinsicHeight=S.height.baseVal.value,z.context.cache.addImage(z.svg),z}return f}(dn),gs=function(x){G(f,x);function f(I,S){var z=x.call(this,I,S)||this;return z.value=S.value,z}return f}(dn),ha=function(x){G(f,x);function f(I,S){var z=x.call(this,I,S)||this;return z.start=S.start,z.reversed=typeof S.reversed=="boolean"&&S.reversed===!0,z}return f}(dn),xl=[{type:15,flags:0,unit:"px",number:3}],Tl=[{type:16,flags:0,number:50}],Bl=function(x){return x.width>x.height?new X(x.left+(x.width-x.height)/2,x.top,x.height,x.height):x.width<x.height?new X(x.left,x.top+(x.height-x.width)/2,x.width,x.width):x},Sl=function(x){var f=x.type===Il?new Array(x.value.length+1).join("\u2022"):x.value;return f.length===0?x.placeholder||"":f},Ii="checkbox",Ri="radio",Il="password",vs=707406591,da=function(x){G(f,x);function f(I,S){var z=x.call(this,I,S)||this;z.type=S.type.toLowerCase(),z.checked=S.checked,z.value=Sl(S),(z.type===Ii||z.type===Ri)&&(z.styles.backgroundColor=3739148031,z.styles.borderTopColor=z.styles.borderRightColor=z.styles.borderBottomColor=z.styles.borderLeftColor=2779096575,z.styles.borderTopWidth=z.styles.borderRightWidth=z.styles.borderBottomWidth=z.styles.borderLeftWidth=1,z.styles.borderTopStyle=z.styles.borderRightStyle=z.styles.borderBottomStyle=z.styles.borderLeftStyle=1,z.styles.backgroundClip=[0],z.styles.backgroundOrigin=[0],z.bounds=Bl(z.bounds));switch(z.type){case Ii:z.styles.borderTopRightRadius=z.styles.borderTopLeftRadius=z.styles.borderBottomRightRadius=z.styles.borderBottomLeftRadius=xl;break;case Ri:z.styles.borderTopRightRadius=z.styles.borderTopLeftRadius=z.styles.borderBottomRightRadius=z.styles.borderBottomLeftRadius=Tl;break}return z}return f}(dn),ys=function(x){G(f,x);function f(I,S){var z=x.call(this,I,S)||this,ee=S.options[S.selectedIndex||0];return z.value=ee&&ee.text||"",z}return f}(dn),Es=function(x){G(f,x);function f(I,S){var z=x.call(this,I,S)||this;return z.value=S.value,z}return f}(dn),_s=function(x){G(f,x);function f(I,S){var z=x.call(this,I,S)||this;z.src=S.src,z.width=parseInt(S.width,10)||0,z.height=parseInt(S.height,10)||0,z.backgroundColor=z.styles.backgroundColor;try{if(S.contentWindow&&S.contentWindow.document&&S.contentWindow.document.documentElement){z.tree=ws(I,S.contentWindow.document.documentElement);var ee=S.contentWindow.document.documentElement?ni(I,getComputedStyle(S.contentWindow.document.documentElement).backgroundColor):vn.TRANSPARENT,Ae=S.contentWindow.document.body?ni(I,getComputedStyle(S.contentWindow.document.body).backgroundColor):vn.TRANSPARENT;z.backgroundColor=Tn(ee)?Tn(Ae)?z.styles.backgroundColor:Ae:ee}}catch(be){}return z}return f}(dn),Rl=["OL","UL","MENU"],Oi=function(x,f,I,S){for(var z=f.firstChild,ee=void 0;z;z=ee)if(ee=z.nextSibling,Cs(z)&&z.data.trim().length>0)I.textNodes.push(new _l(x,z,I.styles));else if(Gn(z))if(Rs(z)&&z.assignedNodes)z.assignedNodes().forEach(function(be){return Oi(x,be,I,S)});else{var Ae=bs(x,z);Ae.styles.isVisible()&&(Ol(z,Ae,S)?Ae.flags|=4:Ll(Ae.styles)&&(Ae.flags|=2),Rl.indexOf(z.tagName)!==-1&&(Ae.flags|=8),I.elements.push(Ae),z.slot,z.shadowRoot?Oi(x,z.shadowRoot,Ae,S):!Di(z)&&!xs(z)&&!Ui(z)&&Oi(x,z,Ae,S))}},bs=function(x,f){return ma(f)?new fs(x,f):Ts(f)?new ps(x,f):xs(f)?new ms(x,f):Dl(f)?new gs(x,f):Ul(f)?new ha(x,f):Fl(f)?new da(x,f):Ui(f)?new ys(x,f):Di(f)?new Es(x,f):Ss(f)?new _s(x,f):new dn(x,f)},ws=function(x,f){var I=bs(x,f);return I.flags|=4,Oi(x,f,I,I),I},Ol=function(x,f,I){return f.styles.isPositionedWithZIndex()||f.styles.opacity<1||f.styles.isTransformed()||pa(x)&&I.styles.isTransparent()},Ll=function(x){return x.isPositioned()||x.isFloating()},Cs=function(x){return x.nodeType===Node.TEXT_NODE},Gn=function(x){return x.nodeType===Node.ELEMENT_NODE},fa=function(x){return Gn(x)&&typeof x.style!="undefined"&&!Li(x)},Li=function(x){return typeof x.className=="object"},Dl=function(x){return x.tagName==="LI"},Ul=function(x){return x.tagName==="OL"},Fl=function(x){return x.tagName==="INPUT"},Nl=function(x){return x.tagName==="HTML"},xs=function(x){return x.tagName==="svg"},pa=function(x){return x.tagName==="BODY"},Ts=function(x){return x.tagName==="CANVAS"},Bs=function(x){return x.tagName==="VIDEO"},ma=function(x){return x.tagName==="IMG"},Ss=function(x){return x.tagName==="IFRAME"},Is=function(x){return x.tagName==="STYLE"},Ml=function(x){return x.tagName==="SCRIPT"},Di=function(x){return x.tagName==="TEXTAREA"},Ui=function(x){return x.tagName==="SELECT"},Rs=function(x){return x.tagName==="SLOT"},Os=function(x){return x.tagName.indexOf("-")>0},Pl=function(){function x(){this.counters={}}return x.prototype.getCounterValue=function(f){var I=this.counters[f];return I&&I.length?I[I.length-1]:1},x.prototype.getCounterValues=function(f){var I=this.counters[f];return I||[]},x.prototype.pop=function(f){var I=this;f.forEach(function(S){return I.counters[S].pop()})},x.prototype.parse=function(f){var I=this,S=f.counterIncrement,z=f.counterReset,ee=!0;S!==null&&S.forEach(function(be){var Ee=I.counters[be.counter];Ee&&be.increment!==0&&(ee=!1,Ee.length||Ee.push(1),Ee[Math.max(0,Ee.length-1)]+=be.increment)});var Ae=[];return ee&&z.forEach(function(be){var Ee=I.counters[be.counter];Ae.push(be.counter),Ee||(Ee=I.counters[be.counter]=[]),Ee.push(be.reset)}),Ae},x}(),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"]},Ds={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(x,f,I,S,z,ee){return x<f||x>I?Ai(x,z,ee.length>0):S.integers.reduce(function(Ae,be,Ee){for(;x>=be;)x-=be,Ae+=S.values[Ee];return Ae},"")+ee},Us=function(x,f,I,S){var z="";do I||x--,z=S(x)+z,x/=f;while(x*f>=f);return z},Mr=function(x,f,I,S,z){var ee=I-f+1;return(x<0?"-":"")+(Us(Math.abs(x),ee,S,function(Ae){return g(Math.floor(Ae%ee)+f)})+z)},Nn=function(x,f,I){I===void 0&&(I=". ");var S=f.length;return Us(Math.abs(x),S,!1,function(z){return f[Math.floor(z%S)]})+I},zn=1<<0,Sn=1<<1,In=1<<2,oi=1<<3,yn=function(x,f,I,S,z,ee){if(x<-9999||x>9999)return Ai(x,4,z.length>0);var Ae=Math.abs(x),be=z;if(Ae===0)return f[0]+be;for(var Ee=0;Ae>0&&Ee<=4;Ee++){var Re=Ae%10;Re===0&&Wr(ee,zn)&&be!==""?be=f[Re]+be:Re>1||Re===1&&Ee===0||Re===1&&Ee===1&&Wr(ee,Sn)||Re===1&&Ee===1&&Wr(ee,In)&&x>100||Re===1&&Ee>1&&Wr(ee,oi)?be=f[Re]+(Ee>0?I[Ee-1]:"")+be:Re===1&&Ee>0&&(be=I[Ee-1]+be),Ae=Math.floor(Ae/10)}return(x<0?S:"")+be},Fs="\u5341\u767E\u5343\u842C",Ns="\u62FE\u4F70\u4EDF\u842C",Ms="\u30DE\u30A4\u30CA\u30B9",ga="\uB9C8\uC774\uB108\uC2A4",Ai=function(x,f,I){var S=I?". ":"",z=I?"\u3001":"",ee=I?", ":"",Ae=I?" ":"";switch(f){case 0:return"\u2022"+Ae;case 1:return"\u25E6"+Ae;case 2:return"\u25FE"+Ae;case 5:var be=Mr(x,48,57,!0,S);return be.length<4?"0"+be:be;case 4:return Nn(x,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",z);case 6:return Vn(x,1,3999,Ls,3,S).toLowerCase();case 7:return Vn(x,1,3999,Ls,3,S);case 8:return Mr(x,945,969,!1,S);case 9:return Mr(x,97,122,!1,S);case 10:return Mr(x,65,90,!1,S);case 11:return Mr(x,1632,1641,!0,S);case 12:case 49:return Vn(x,1,9999,Ds,3,S);case 35:return Vn(x,1,9999,Ds,3,S).toLowerCase();case 13:return Mr(x,2534,2543,!0,S);case 14:case 30:return Mr(x,6112,6121,!0,S);case 15:return Nn(x,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",z);case 16:return Nn(x,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",z);case 17:case 48:return yn(x,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Fs,"\u8CA0",z,Sn|In|oi);case 47:return yn(x,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",Ns,"\u8CA0",z,zn|Sn|In|oi);case 42:return yn(x,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Fs,"\u8D1F",z,Sn|In|oi);case 41:return yn(x,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",Ns,"\u8D1F",z,zn|Sn|In|oi);case 26:return yn(x,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",Ms,z,0);case 25:return yn(x,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",Ms,z,zn|Sn|In);case 31:return yn(x,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",ga,ee,zn|Sn|In);case 33:return yn(x,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",ga,ee,0);case 32:return yn(x,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",ga,ee,zn|Sn|In);case 18:return Mr(x,2406,2415,!0,S);case 20:return Vn(x,1,19999,Hl,3,S);case 21:return Mr(x,2790,2799,!0,S);case 22:return Mr(x,2662,2671,!0,S);case 22:return Vn(x,1,10999,kl,3,S);case 23:return Nn(x,"\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(x,"\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 Mr(x,3302,3311,!0,S);case 28:return Nn(x,"\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",z);case 29:return Nn(x,"\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",z);case 34:return Mr(x,3792,3801,!0,S);case 37:return Mr(x,6160,6169,!0,S);case 38:return Mr(x,4160,4169,!0,S);case 39:return Mr(x,2918,2927,!0,S);case 40:return Mr(x,1776,1785,!0,S);case 43:return Mr(x,3046,3055,!0,S);case 44:return Mr(x,3174,3183,!0,S);case 45:return Mr(x,3664,3673,!0,S);case 46:return Mr(x,3872,3881,!0,S);case 3:default:return Mr(x,48,57,!0,S)}},Ps="data-html2canvas-ignore",ks=function(){function x(f,I,S){if(this.context=f,this.options=S,this.scrolledElements=[],this.referenceElement=I,this.counters=new Pl,this.quoteDepth=0,!I.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(I.ownerDocument.documentElement,!1)}return x.prototype.toIFrame=function(f,I){var S=this,z=Ql(f,I);if(!z.contentWindow)return Promise.reject("Unable to find iframe window");var ee=f.defaultView.pageXOffset,Ae=f.defaultView.pageYOffset,be=z.contentWindow,Ee=be.document,Re=Wl(z).then(function(){return V(S,void 0,void 0,function(){var Me,Xe;return F(this,function($e){switch($e.label){case 0:return this.scrolledElements.forEach(Xl),be&&(be.scrollTo(I.left,I.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(be.scrollY!==I.top||be.scrollX!==I.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(be.scrollX-I.left,be.scrollY-I.top,0,0))),Me=this.options.onclone,Xe=this.clonedReferenceElement,typeof Xe=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:Ee.fonts&&Ee.fonts.ready?[4,Ee.fonts.ready]:[3,2];case 1:$e.sent(),$e.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,jl(Ee)]:[3,4];case 3:$e.sent(),$e.label=4;case 4:return typeof Me=="function"?[2,Promise.resolve().then(function(){return Me(Ee,Xe)}).then(function(){return z})]:[2,z]}})})});return Ee.open(),Ee.write(Vl(document.doctype)+"<html></html>"),zl(this.referenceElement.ownerDocument,ee,Ae),Ee.replaceChild(Ee.adoptNode(this.documentElement),Ee.documentElement),Ee.close(),Re},x.prototype.createElementClone=function(f){if(ea(f,2))debugger;if(Ts(f))return this.createCanvasClone(f);if(Bs(f))return this.createVideoClone(f);if(Is(f))return this.createStyleClone(f);var I=f.cloneNode(!1);return ma(I)&&(ma(f)&&f.currentSrc&&f.currentSrc!==f.src&&(I.src=f.currentSrc,I.srcset=""),I.loading==="lazy"&&(I.loading="eager")),Os(I)?this.createCustomElementClone(I):I},x.prototype.createCustomElementClone=function(f){var I=document.createElement("html2canvascustomelement");return va(f.style,I),I},x.prototype.createStyleClone=function(f){try{var I=f.sheet;if(I&&I.cssRules){var S=[].slice.call(I.cssRules,0).reduce(function(ee,Ae){return Ae&&typeof Ae.cssText=="string"?ee+Ae.cssText:ee},""),z=f.cloneNode(!1);return z.textContent=S,z}}catch(ee){if(this.context.logger.error("Unable to access cssRules property",ee),ee.name!=="SecurityError")throw ee}return f.cloneNode(!1)},x.prototype.createCanvasClone=function(f){var I;if(this.options.inlineImages&&f.ownerDocument){var S=f.ownerDocument.createElement("img");try{return S.src=f.toDataURL(),S}catch(Re){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",f)}}var z=f.cloneNode(!1);try{z.width=f.width,z.height=f.height;var ee=f.getContext("2d"),Ae=z.getContext("2d");if(Ae)if(!this.options.allowTaint&&ee)Ae.putImageData(ee.getImageData(0,0,f.width,f.height),0,0);else{var be=(I=f.getContext("webgl2"))!==null&&I!==void 0?I:f.getContext("webgl");if(be){var Ee=be.getContextAttributes();(Ee==null?void 0:Ee.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",f)}Ae.drawImage(f,0,0)}return z}catch(Re){this.context.logger.info("Unable to clone canvas as it is tainted",f)}return z},x.prototype.createVideoClone=function(f){var I=f.ownerDocument.createElement("canvas");I.width=f.offsetWidth,I.height=f.offsetHeight;var S=I.getContext("2d");try{return S&&(S.drawImage(f,0,0,I.width,I.height),this.options.allowTaint||S.getImageData(0,0,I.width,I.height)),I}catch(ee){this.context.logger.info("Unable to clone video as it is tainted",f)}var z=f.ownerDocument.createElement("canvas");return z.width=f.offsetWidth,z.height=f.offsetHeight,z},x.prototype.appendChildNode=function(f,I,S){(!Gn(I)||!Ml(I)&&!I.hasAttribute(Ps)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(I)))&&((!this.options.copyStyles||!Gn(I)||!Is(I))&&f.appendChild(this.cloneNode(I,S)))},x.prototype.cloneChildNodes=function(f,I,S){for(var z=this,ee=f.shadowRoot?f.shadowRoot.firstChild:f.firstChild;ee;ee=ee.nextSibling)if(Gn(ee)&&Rs(ee)&&typeof ee.assignedNodes=="function"){var Ae=ee.assignedNodes();Ae.length&&Ae.forEach(function(be){return z.appendChildNode(I,be,S)})}else this.appendChildNode(I,ee,S)},x.prototype.cloneNode=function(f,I){if(Cs(f))return document.createTextNode(f.data);if(!f.ownerDocument)return f.cloneNode(!1);var S=f.ownerDocument.defaultView;if(S&&Gn(f)&&(fa(f)||Li(f))){var z=this.createElementClone(f);z.style.transitionProperty="none";var ee=S.getComputedStyle(f),Ae=S.getComputedStyle(f,":before"),be=S.getComputedStyle(f,":after");this.referenceElement===f&&fa(z)&&(this.clonedReferenceElement=z),pa(z)&&$l(z);var Ee=this.counters.parse(new qa(this.context,ee)),Re=this.resolvePseudoContent(f,z,Ae,li.BEFORE);Os(f)&&(I=!0),Bs(f)||this.cloneChildNodes(f,z,I),Re&&z.insertBefore(Re,z.firstChild);var Me=this.resolvePseudoContent(f,z,be,li.AFTER);return Me&&z.appendChild(Me),this.counters.pop(Ee),(ee&&(this.options.copyStyles||Li(f))&&!Ss(f)||I)&&va(ee,z),(f.scrollTop!==0||f.scrollLeft!==0)&&this.scrolledElements.push([z,f.scrollLeft,f.scrollTop]),(Di(f)||Ui(f))&&(Di(z)||Ui(z))&&(z.value=f.value),z}return f.cloneNode(!1)},x.prototype.resolvePseudoContent=function(f,I,S,z){var ee=this;if(!S)return;var Ae=S.content,be=I.ownerDocument;if(!be||!Ae||Ae==="none"||Ae==="-moz-alt-content"||S.display==="none")return;this.counters.parse(new qa(this.context,S));var Ee=new DA(this.context,S),Re=be.createElement("html2canvaspseudoelement");va(S,Re),Ee.content.forEach(function(Xe){if(Xe.type===0)Re.appendChild(be.createTextNode(Xe.value));else if(Xe.type===22){var $e=be.createElement("img");$e.src=Xe.value,$e.style.opacity="1",Re.appendChild($e)}else if(Xe.type===18){if(Xe.name==="attr"){var Bt=Xe.values.filter(Br);Bt.length&&Re.appendChild(be.createTextNode(f.getAttribute(Bt[0].value)||""))}else if(Xe.name==="counter"){var ft=Xe.values.filter(jn),bt=ft[0],Yt=ft[1];if(bt&&Br(bt)){var xt=ee.counters.getCounterValue(bt.value),Rt=Yt&&Br(Yt)?qi.parse(ee.context,Yt.value):3;Re.appendChild(be.createTextNode(Ai(xt,Rt,!1)))}}else if(Xe.name==="counters"){var dr=Xe.values.filter(jn),bt=dr[0],or=dr[1],Yt=dr[2];if(bt&&Br(bt)){var Er=ee.counters.getCounterValues(bt.value),St=Yt&&Br(Yt)?qi.parse(ee.context,Yt.value):3,vr=or&&or.type===0?or.value:"",_r=Er.map(function(Zr){return Ai(Zr,St,!1)}).join(vr);Re.appendChild(be.createTextNode(_r))}}}else if(Xe.type===20)switch(Xe.value){case"open-quote":Re.appendChild(be.createTextNode(Za(Ee.quotes,ee.quoteDepth++,!0)));break;case"close-quote":Re.appendChild(be.createTextNode(Za(Ee.quotes,--ee.quoteDepth,!1)));break;default:Re.appendChild(be.createTextNode(Xe.value))}}),Re.className=ya+" "+Ea;var Me=z===li.BEFORE?" "+ya:" "+Ea;return Li(I)?I.className.baseValue+=Me:I.className+=Me,Re},x.destroy=function(f){return f.parentNode?(f.parentNode.removeChild(f),!0):!1},x}(),li;(function(x){x[x.BEFORE=0]="BEFORE",x[x.AFTER=1]="AFTER"})(li||(li={}));var Ql=function(x,f){var I=x.createElement("iframe");return I.className="html2canvas-container",I.style.visibility="hidden",I.style.position="fixed",I.style.left="-10000px",I.style.top="0px",I.style.border="0",I.width=f.width.toString(),I.height=f.height.toString(),I.scrolling="no",I.setAttribute(Ps,"true"),x.body.appendChild(I),I},Kl=function(x){return new Promise(function(f){if(x.complete){f();return}if(!x.src){f();return}x.onload=f,x.onerror=f})},jl=function(x){return Promise.all([].slice.call(x.images,0).map(Kl))},Wl=function(x){return new Promise(function(f,I){var S=x.contentWindow;if(!S)return I("No window assigned for iframe");var z=S.document;S.onload=x.onload=function(){S.onload=x.onload=null;var ee=setInterval(function(){z.body.childNodes.length>0&&z.readyState==="complete"&&(clearInterval(ee),f(x))},50)}})},Gl=["all","d","content"],va=function(x,f){for(var I=x.length-1;I>=0;I--){var S=x.item(I);Gl.indexOf(S)===-1&&f.style.setProperty(S,x.getPropertyValue(S))}return f},Vl=function(x){var f="";return x&&(f+="<!DOCTYPE ",x.name&&(f+=x.name),x.internalSubset&&(f+=x.internalSubset),x.publicId&&(f+='"'+x.publicId+'"'),x.systemId&&(f+='"'+x.systemId+'"'),f+=">"),f},zl=function(x,f,I){x&&x.defaultView&&(f!==x.defaultView.pageXOffset||I!==x.defaultView.pageYOffset)&&x.defaultView.scrollTo(f,I)},Xl=function(x){var f=x[0],I=x[1],S=x[2];f.scrollLeft=I,f.scrollTop=S},Yl=":before",Jl=":after",ya="___html2canvas___pseudoelement_before",Ea="___html2canvas___pseudoelement_after",Hs=`{
|
|
content: "" !important;
|
|
display: none !important;
|
|
}`,$l=function(x){Zl(x,"."+ya+Yl+Hs+`
|
|
.`+Ea+Jl+Hs)},Zl=function(x,f){var I=x.ownerDocument;if(I){var S=I.createElement("style");S.textContent=f,x.appendChild(S)}},Qs=function(){function x(){}return x.getOrigin=function(f){var I=x._link;return I?(I.href=f,I.href=I.href,I.protocol+I.hostname+I.port):"about:blank"},x.isSameOrigin=function(f){return x.getOrigin(f)===x._origin},x.setContext=function(f){x._link=f.document.createElement("a"),x._origin=x.getOrigin(f.location.href)},x._origin="about:blank",x}(),ql=function(){function x(f,I){this.context=f,this._options=I,this._cache={}}return x.prototype.addImage=function(f){var I=Promise.resolve();return this.has(f)||(ba(f)||nu(f))&&(this._cache[f]=this.loadImage(f)).catch(function(){}),I},x.prototype.match=function(f){return this._cache[f]},x.prototype.loadImage=function(f){return V(this,void 0,void 0,function(){var I,S,z,ee,Ae=this;return F(this,function(be){switch(be.label){case 0:return I=Qs.isSameOrigin(f),S=!_a(f)&&this._options.useCORS===!0&&Xr.SUPPORT_CORS_IMAGES&&!I,z=!_a(f)&&!I&&!ba(f)&&typeof this._options.proxy=="string"&&Xr.SUPPORT_CORS_XHR&&!S,!I&&this._options.allowTaint===!1&&!_a(f)&&!ba(f)&&!z&&!S?[2]:(ee=f,z?[4,this.proxy(ee)]:[3,2]);case 1:ee=be.sent(),be.label=2;case 2:return this.context.logger.debug("Added image "+f.substring(0,256)),[4,new Promise(function(Ee,Re){var Me=new Image;Me.onload=function(){return Ee(Me)},Me.onerror=Re,(iu(ee)||S)&&(Me.crossOrigin="anonymous"),Me.src=ee,Me.complete===!0&&setTimeout(function(){return Ee(Me)},500),Ae._options.imageTimeout>0&&setTimeout(function(){return Re("Timed out ("+Ae._options.imageTimeout+"ms) loading image")},Ae._options.imageTimeout)})];case 3:return[2,be.sent()]}})})},x.prototype.has=function(f){return typeof this._cache[f]!="undefined"},x.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},x.prototype.proxy=function(f){var I=this,S=this._options.proxy;if(!S)throw new Error("No proxy defined");var z=f.substring(0,256);return new Promise(function(ee,Ae){var be=Xr.SUPPORT_RESPONSE_TYPE?"blob":"text",Ee=new XMLHttpRequest;Ee.onload=function(){if(Ee.status===200)if(be==="text")ee(Ee.response);else{var Xe=new FileReader;Xe.addEventListener("load",function(){return ee(Xe.result)},!1),Xe.addEventListener("error",function($e){return Ae($e)},!1),Xe.readAsDataURL(Ee.response)}else Ae("Failed to proxy resource "+z+" with status code "+Ee.status)},Ee.onerror=Ae;var Re=S.indexOf("?")>-1?"&":"?";if(Ee.open("GET",""+S+Re+"url="+encodeURIComponent(f)+"&responseType="+be),be!=="text"&&Ee instanceof XMLHttpRequest&&(Ee.responseType=be),I._options.imageTimeout){var Me=I._options.imageTimeout;Ee.timeout=Me,Ee.ontimeout=function(){return Ae("Timed out ("+Me+"ms) proxying "+z)}}Ee.send()})},x}(),eu=/^data:image\/svg\+xml/i,tu=/^data:image\/.*;base64,/i,ru=/^data:image\/.*/i,nu=function(x){return Xr.SUPPORT_SVG_DRAWING||!au(x)},_a=function(x){return ru.test(x)},iu=function(x){return tu.test(x)},ba=function(x){return x.substr(0,4)==="blob"},au=function(x){return x.substr(-3).toLowerCase()==="svg"||eu.test(x)},Ct=function(){function x(f,I){this.type=0,this.x=f,this.y=I}return x.prototype.add=function(f,I){return new x(this.x+f,this.y+I)},x}(),Xn=function(x,f,I){return new Ct(x.x+(f.x-x.x)*I,x.y+(f.y-x.y)*I)},Fi=function(){function x(f,I,S,z){this.type=1,this.start=f,this.startControl=I,this.endControl=S,this.end=z}return x.prototype.subdivide=function(f,I){var S=Xn(this.start,this.startControl,f),z=Xn(this.startControl,this.endControl,f),ee=Xn(this.endControl,this.end,f),Ae=Xn(S,z,f),be=Xn(z,ee,f),Ee=Xn(Ae,be,f);return I?new x(this.start,S,Ae,Ee):new x(Ee,be,ee,this.end)},x.prototype.add=function(f,I){return new x(this.start.add(f,I),this.startControl.add(f,I),this.endControl.add(f,I),this.end.add(f,I))},x.prototype.reverse=function(){return new x(this.end,this.endControl,this.startControl,this.start)},x}(),on=function(x){return x.type===1},su=function(){function x(f){var I=f.styles,S=f.bounds,z=ri(I.borderTopLeftRadius,S.width,S.height),ee=z[0],Ae=z[1],be=ri(I.borderTopRightRadius,S.width,S.height),Ee=be[0],Re=be[1],Me=ri(I.borderBottomRightRadius,S.width,S.height),Xe=Me[0],$e=Me[1],Bt=ri(I.borderBottomLeftRadius,S.width,S.height),ft=Bt[0],bt=Bt[1],Yt=[];Yt.push((ee+Ee)/S.width),Yt.push((ft+Xe)/S.width),Yt.push((Ae+bt)/S.height),Yt.push((Re+$e)/S.height);var xt=Math.max.apply(Math,Yt);xt>1&&(ee/=xt,Ae/=xt,Ee/=xt,Re/=xt,Xe/=xt,$e/=xt,ft/=xt,bt/=xt);var Rt=S.width-Ee,dr=S.height-$e,or=S.width-Xe,Er=S.height-bt,St=I.borderTopWidth,vr=I.borderRightWidth,_r=I.borderBottomWidth,nr=I.borderLeftWidth,tn=Ir(I.paddingTop,f.bounds.width),Zr=Ir(I.paddingRight,f.bounds.width),nn=Ir(I.paddingBottom,f.bounds.width),Vr=Ir(I.paddingLeft,f.bounds.width);this.topLeftBorderDoubleOuterBox=ee>0||Ae>0?Or(S.left+nr/3,S.top+St/3,ee-nr/3,Ae-St/3,wr.TOP_LEFT):new Ct(S.left+nr/3,S.top+St/3),this.topRightBorderDoubleOuterBox=ee>0||Ae>0?Or(S.left+Rt,S.top+St/3,Ee-vr/3,Re-St/3,wr.TOP_RIGHT):new Ct(S.left+S.width-vr/3,S.top+St/3),this.bottomRightBorderDoubleOuterBox=Xe>0||$e>0?Or(S.left+or,S.top+dr,Xe-vr/3,$e-_r/3,wr.BOTTOM_RIGHT):new Ct(S.left+S.width-vr/3,S.top+S.height-_r/3),this.bottomLeftBorderDoubleOuterBox=ft>0||bt>0?Or(S.left+nr/3,S.top+Er,ft-nr/3,bt-_r/3,wr.BOTTOM_LEFT):new Ct(S.left+nr/3,S.top+S.height-_r/3),this.topLeftBorderDoubleInnerBox=ee>0||Ae>0?Or(S.left+nr*2/3,S.top+St*2/3,ee-nr*2/3,Ae-St*2/3,wr.TOP_LEFT):new Ct(S.left+nr*2/3,S.top+St*2/3),this.topRightBorderDoubleInnerBox=ee>0||Ae>0?Or(S.left+Rt,S.top+St*2/3,Ee-vr*2/3,Re-St*2/3,wr.TOP_RIGHT):new Ct(S.left+S.width-vr*2/3,S.top+St*2/3),this.bottomRightBorderDoubleInnerBox=Xe>0||$e>0?Or(S.left+or,S.top+dr,Xe-vr*2/3,$e-_r*2/3,wr.BOTTOM_RIGHT):new Ct(S.left+S.width-vr*2/3,S.top+S.height-_r*2/3),this.bottomLeftBorderDoubleInnerBox=ft>0||bt>0?Or(S.left+nr*2/3,S.top+Er,ft-nr*2/3,bt-_r*2/3,wr.BOTTOM_LEFT):new Ct(S.left+nr*2/3,S.top+S.height-_r*2/3),this.topLeftBorderStroke=ee>0||Ae>0?Or(S.left+nr/2,S.top+St/2,ee-nr/2,Ae-St/2,wr.TOP_LEFT):new Ct(S.left+nr/2,S.top+St/2),this.topRightBorderStroke=ee>0||Ae>0?Or(S.left+Rt,S.top+St/2,Ee-vr/2,Re-St/2,wr.TOP_RIGHT):new Ct(S.left+S.width-vr/2,S.top+St/2),this.bottomRightBorderStroke=Xe>0||$e>0?Or(S.left+or,S.top+dr,Xe-vr/2,$e-_r/2,wr.BOTTOM_RIGHT):new Ct(S.left+S.width-vr/2,S.top+S.height-_r/2),this.bottomLeftBorderStroke=ft>0||bt>0?Or(S.left+nr/2,S.top+Er,ft-nr/2,bt-_r/2,wr.BOTTOM_LEFT):new Ct(S.left+nr/2,S.top+S.height-_r/2),this.topLeftBorderBox=ee>0||Ae>0?Or(S.left,S.top,ee,Ae,wr.TOP_LEFT):new Ct(S.left,S.top),this.topRightBorderBox=Ee>0||Re>0?Or(S.left+Rt,S.top,Ee,Re,wr.TOP_RIGHT):new Ct(S.left+S.width,S.top),this.bottomRightBorderBox=Xe>0||$e>0?Or(S.left+or,S.top+dr,Xe,$e,wr.BOTTOM_RIGHT):new Ct(S.left+S.width,S.top+S.height),this.bottomLeftBorderBox=ft>0||bt>0?Or(S.left,S.top+Er,ft,bt,wr.BOTTOM_LEFT):new Ct(S.left,S.top+S.height),this.topLeftPaddingBox=ee>0||Ae>0?Or(S.left+nr,S.top+St,Math.max(0,ee-nr),Math.max(0,Ae-St),wr.TOP_LEFT):new Ct(S.left+nr,S.top+St),this.topRightPaddingBox=Ee>0||Re>0?Or(S.left+Math.min(Rt,S.width-vr),S.top+St,Rt>S.width+vr?0:Math.max(0,Ee-vr),Math.max(0,Re-St),wr.TOP_RIGHT):new Ct(S.left+S.width-vr,S.top+St),this.bottomRightPaddingBox=Xe>0||$e>0?Or(S.left+Math.min(or,S.width-nr),S.top+Math.min(dr,S.height-_r),Math.max(0,Xe-vr),Math.max(0,$e-_r),wr.BOTTOM_RIGHT):new Ct(S.left+S.width-vr,S.top+S.height-_r),this.bottomLeftPaddingBox=ft>0||bt>0?Or(S.left+nr,S.top+Math.min(Er,S.height-_r),Math.max(0,ft-nr),Math.max(0,bt-_r),wr.BOTTOM_LEFT):new Ct(S.left+nr,S.top+S.height-_r),this.topLeftContentBox=ee>0||Ae>0?Or(S.left+nr+Vr,S.top+St+tn,Math.max(0,ee-(nr+Vr)),Math.max(0,Ae-(St+tn)),wr.TOP_LEFT):new Ct(S.left+nr+Vr,S.top+St+tn),this.topRightContentBox=Ee>0||Re>0?Or(S.left+Math.min(Rt,S.width+nr+Vr),S.top+St+tn,Rt>S.width+nr+Vr?0:Ee-nr+Vr,Re-(St+tn),wr.TOP_RIGHT):new Ct(S.left+S.width-(vr+Zr),S.top+St+tn),this.bottomRightContentBox=Xe>0||$e>0?Or(S.left+Math.min(or,S.width-(nr+Vr)),S.top+Math.min(dr,S.height+St+tn),Math.max(0,Xe-(vr+Zr)),$e-(_r+nn),wr.BOTTOM_RIGHT):new Ct(S.left+S.width-(vr+Zr),S.top+S.height-(_r+nn)),this.bottomLeftContentBox=ft>0||bt>0?Or(S.left+nr+Vr,S.top+Er,Math.max(0,ft-(nr+Vr)),bt-(_r+nn),wr.BOTTOM_LEFT):new Ct(S.left+nr+Vr,S.top+S.height-(_r+nn))}return x}(),wr;(function(x){x[x.TOP_LEFT=0]="TOP_LEFT",x[x.TOP_RIGHT=1]="TOP_RIGHT",x[x.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",x[x.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(wr||(wr={}));var Or=function(x,f,I,S,z){var ee=4*((Math.sqrt(2)-1)/3),Ae=I*ee,be=S*ee,Ee=x+I,Re=f+S;switch(z){case wr.TOP_LEFT:return new Fi(new Ct(x,Re),new Ct(x,Re-be),new Ct(Ee-Ae,f),new Ct(Ee,f));case wr.TOP_RIGHT:return new Fi(new Ct(x,f),new Ct(x+Ae,f),new Ct(Ee,Re-be),new Ct(Ee,Re));case wr.BOTTOM_RIGHT:return new Fi(new Ct(Ee,f),new Ct(Ee,f+be),new Ct(x+Ae,Re),new Ct(x,Re));case wr.BOTTOM_LEFT:default:return new Fi(new Ct(Ee,Re),new Ct(Ee-Ae,Re),new Ct(x,f+be),new Ct(x,f))}},Ni=function(x){return[x.topLeftBorderBox,x.topRightBorderBox,x.bottomRightBorderBox,x.bottomLeftBorderBox]},ou=function(x){return[x.topLeftContentBox,x.topRightContentBox,x.bottomRightContentBox,x.bottomLeftContentBox]},Mi=function(x){return[x.topLeftPaddingBox,x.topRightPaddingBox,x.bottomRightPaddingBox,x.bottomLeftPaddingBox]},Au=function(){function x(f,I,S){this.offsetX=f,this.offsetY=I,this.matrix=S,this.type=0,this.target=2|4}return x}(),Pi=function(){function x(f,I){this.path=f,this.target=I,this.type=1}return x}(),lu=function(){function x(f){this.opacity=f,this.type=2,this.target=2|4}return x}(),uu=function(x){return x.type===0},Ks=function(x){return x.type===1},cu=function(x){return x.type===2},js=function(x,f){return x.length===f.length?x.some(function(I,S){return I===f[S]}):!1},hu=function(x,f,I,S,z){return x.map(function(ee,Ae){switch(Ae){case 0:return ee.add(f,I);case 1:return ee.add(f+S,I);case 2:return ee.add(f+S,I+z);case 3:return ee.add(f,I+z)}return ee})},Ws=function(){function x(f){this.element=f,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return x}(),Gs=function(){function x(f,I){if(this.container=f,this.parent=I,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 S=this.container.bounds.left+this.container.styles.transformOrigin[0].number,z=this.container.bounds.top+this.container.styles.transformOrigin[1].number,ee=this.container.styles.transform;this.effects.push(new Au(S,z,ee))}if(this.container.styles.overflowX!==0){var Ae=Ni(this.curves),be=Mi(this.curves);js(Ae,be)?this.effects.push(new Pi(Ae,2|4)):(this.effects.push(new Pi(Ae,2)),this.effects.push(new Pi(be,4)))}}return x.prototype.getEffects=function(f){for(var I=[2,3].indexOf(this.container.styles.position)===-1,S=this.parent,z=this.effects.slice(0);S;){var ee=S.effects.filter(function(Ee){return!Ks(Ee)});if(I||S.container.styles.position!==0||!S.parent){if(z.unshift.apply(z,ee),I=[2,3].indexOf(S.container.styles.position)===-1,S.container.styles.overflowX!==0){var Ae=Ni(S.curves),be=Mi(S.curves);js(Ae,be)||z.unshift(new Pi(be,2|4))}}else z.unshift.apply(z,ee);S=S.parent}return z.filter(function(Ee){return Wr(Ee.target,f)})},x}(),wa=function(x,f,I,S){x.container.elements.forEach(function(z){var ee=Wr(z.flags,4),Ae=Wr(z.flags,2),be=new Gs(z,x);Wr(z.styles.display,2048)&&S.push(be);var Ee=Wr(z.flags,8)?[]:S;if(ee||Ae){var Re=ee||z.styles.isPositioned()?I:f,Me=new Ws(be);if(z.styles.isPositioned()||z.styles.opacity<1||z.styles.isTransformed()){var Xe=z.styles.zIndex.order;if(Xe<0){var $e=0;Re.negativeZIndex.some(function(ft,bt){return Xe>ft.element.container.styles.zIndex.order?($e=bt,!1):$e>0}),Re.negativeZIndex.splice($e,0,Me)}else if(Xe>0){var Bt=0;Re.positiveZIndex.some(function(ft,bt){return Xe>=ft.element.container.styles.zIndex.order?(Bt=bt+1,!1):Bt>0}),Re.positiveZIndex.splice(Bt,0,Me)}else Re.zeroOrAutoZIndexOrTransformedOrOpacity.push(Me)}else z.styles.isFloating()?Re.nonPositionedFloats.push(Me):Re.nonPositionedInlineLevel.push(Me);wa(be,Me,ee?Me:I,Ee)}else z.styles.isInlineLevel()?f.inlineLevel.push(be):f.nonInlineLevel.push(be),wa(be,f,I,Ee);Wr(z.flags,8)&&Vs(z,Ee)})},Vs=function(x,f){for(var I=x instanceof ha?x.start:1,S=x instanceof ha?x.reversed:!1,z=0;z<f.length;z++){var ee=f[z];ee.container instanceof gs&&typeof ee.container.value=="number"&&ee.container.value!==0&&(I=ee.container.value),ee.listValue=Ai(I,ee.container.styles.listStyleType,!0),I+=S?-1:1}},du=function(x){var f=new Gs(x,null),I=new Ws(f),S=[];return wa(f,I,I,S),Vs(f.container,S),I},zs=function(x,f){switch(f){case 0:return An(x.topLeftBorderBox,x.topLeftPaddingBox,x.topRightBorderBox,x.topRightPaddingBox);case 1:return An(x.topRightBorderBox,x.topRightPaddingBox,x.bottomRightBorderBox,x.bottomRightPaddingBox);case 2:return An(x.bottomRightBorderBox,x.bottomRightPaddingBox,x.bottomLeftBorderBox,x.bottomLeftPaddingBox);case 3:default:return An(x.bottomLeftBorderBox,x.bottomLeftPaddingBox,x.topLeftBorderBox,x.topLeftPaddingBox)}},fu=function(x,f){switch(f){case 0:return An(x.topLeftBorderBox,x.topLeftBorderDoubleOuterBox,x.topRightBorderBox,x.topRightBorderDoubleOuterBox);case 1:return An(x.topRightBorderBox,x.topRightBorderDoubleOuterBox,x.bottomRightBorderBox,x.bottomRightBorderDoubleOuterBox);case 2:return An(x.bottomRightBorderBox,x.bottomRightBorderDoubleOuterBox,x.bottomLeftBorderBox,x.bottomLeftBorderDoubleOuterBox);case 3:default:return An(x.bottomLeftBorderBox,x.bottomLeftBorderDoubleOuterBox,x.topLeftBorderBox,x.topLeftBorderDoubleOuterBox)}},pu=function(x,f){switch(f){case 0:return An(x.topLeftBorderDoubleInnerBox,x.topLeftPaddingBox,x.topRightBorderDoubleInnerBox,x.topRightPaddingBox);case 1:return An(x.topRightBorderDoubleInnerBox,x.topRightPaddingBox,x.bottomRightBorderDoubleInnerBox,x.bottomRightPaddingBox);case 2:return An(x.bottomRightBorderDoubleInnerBox,x.bottomRightPaddingBox,x.bottomLeftBorderDoubleInnerBox,x.bottomLeftPaddingBox);case 3:default:return An(x.bottomLeftBorderDoubleInnerBox,x.bottomLeftPaddingBox,x.topLeftBorderDoubleInnerBox,x.topLeftPaddingBox)}},mu=function(x,f){switch(f){case 0:return ki(x.topLeftBorderStroke,x.topRightBorderStroke);case 1:return ki(x.topRightBorderStroke,x.bottomRightBorderStroke);case 2:return ki(x.bottomRightBorderStroke,x.bottomLeftBorderStroke);case 3:default:return ki(x.bottomLeftBorderStroke,x.topLeftBorderStroke)}},ki=function(x,f){var I=[];return on(x)?I.push(x.subdivide(.5,!1)):I.push(x),on(f)?I.push(f.subdivide(.5,!0)):I.push(f),I},An=function(x,f,I,S){var z=[];return on(x)?z.push(x.subdivide(.5,!1)):z.push(x),on(I)?z.push(I.subdivide(.5,!0)):z.push(I),on(S)?z.push(S.subdivide(.5,!0).reverse()):z.push(S),on(f)?z.push(f.subdivide(.5,!1).reverse()):z.push(f),z},Xs=function(x){var f=x.bounds,I=x.styles;return f.add(I.borderLeftWidth,I.borderTopWidth,-(I.borderRightWidth+I.borderLeftWidth),-(I.borderTopWidth+I.borderBottomWidth))},Hi=function(x){var f=x.styles,I=x.bounds,S=Ir(f.paddingLeft,I.width),z=Ir(f.paddingRight,I.width),ee=Ir(f.paddingTop,I.width),Ae=Ir(f.paddingBottom,I.width);return I.add(S+f.borderLeftWidth,ee+f.borderTopWidth,-(f.borderRightWidth+f.borderLeftWidth+S+z),-(f.borderTopWidth+f.borderBottomWidth+ee+Ae))},gu=function(x,f){return x===0?f.bounds:x===2?Hi(f):Xs(f)},vu=function(x,f){return x===0?f.bounds:x===2?Hi(f):Xs(f)},Ca=function(x,f,I){var S=gu(Jn(x.styles.backgroundOrigin,f),x),z=vu(Jn(x.styles.backgroundClip,f),x),ee=yu(Jn(x.styles.backgroundSize,f),I,S),Ae=ee[0],be=ee[1],Ee=ri(Jn(x.styles.backgroundPosition,f),S.width-Ae,S.height-be),Re=Eu(Jn(x.styles.backgroundRepeat,f),Ee,ee,S,z),Me=Math.round(S.left+Ee[0]),Xe=Math.round(S.top+Ee[1]);return[Re,Me,Xe,Ae,be]},Yn=function(x){return Br(x)&&x.value===Wn.AUTO},Qi=function(x){return typeof x=="number"},yu=function(x,f,I){var S=f[0],z=f[1],ee=f[2],Ae=x[0],be=x[1];if(!Ae)return[0,0];if(Hr(Ae)&&be&&Hr(be))return[Ir(Ae,I.width),Ir(be,I.height)];var Ee=Qi(ee);if(Br(Ae)&&(Ae.value===Wn.CONTAIN||Ae.value===Wn.COVER)){if(Qi(ee)){var Re=I.width/I.height;return Re<ee!==(Ae.value===Wn.COVER)?[I.width,I.width/ee]:[I.height*ee,I.height]}return[I.width,I.height]}var Me=Qi(S),Xe=Qi(z),$e=Me||Xe;if(Yn(Ae)&&(!be||Yn(be))){if(Me&&Xe)return[S,z];if(!Ee&&!$e)return[I.width,I.height];if($e&&Ee){var Bt=Me?S:z*ee,ft=Xe?z:S/ee;return[Bt,ft]}var bt=Me?S:I.width,Yt=Xe?z:I.height;return[bt,Yt]}if(Ee){var xt=0,Rt=0;return Hr(Ae)?xt=Ir(Ae,I.width):Hr(be)&&(Rt=Ir(be,I.height)),Yn(Ae)?xt=Rt*ee:(!be||Yn(be))&&(Rt=xt/ee),[xt,Rt]}var dr=null,or=null;if(Hr(Ae)?dr=Ir(Ae,I.width):be&&Hr(be)&&(or=Ir(be,I.height)),dr!==null&&(!be||Yn(be))&&(or=Me&&Xe?dr/S*z:I.height),or!==null&&Yn(Ae)&&(dr=Me&&Xe?or/z*S:I.width),dr!==null&&or!==null)return[dr,or];throw new Error("Unable to calculate background-size for element")},Jn=function(x,f){var I=x[f];return typeof I=="undefined"?x[0]:I},Eu=function(x,f,I,S,z){var ee=f[0],Ae=f[1],be=I[0],Ee=I[1];switch(x){case 2:return[new Ct(Math.round(S.left),Math.round(S.top+Ae)),new Ct(Math.round(S.left+S.width),Math.round(S.top+Ae)),new Ct(Math.round(S.left+S.width),Math.round(Ee+S.top+Ae)),new Ct(Math.round(S.left),Math.round(Ee+S.top+Ae))];case 3:return[new Ct(Math.round(S.left+ee),Math.round(S.top)),new Ct(Math.round(S.left+ee+be),Math.round(S.top)),new Ct(Math.round(S.left+ee+be),Math.round(S.height+S.top)),new Ct(Math.round(S.left+ee),Math.round(S.height+S.top))];case 1:return[new Ct(Math.round(S.left+ee),Math.round(S.top+Ae)),new Ct(Math.round(S.left+ee+be),Math.round(S.top+Ae)),new Ct(Math.round(S.left+ee+be),Math.round(S.top+Ae+Ee)),new Ct(Math.round(S.left+ee),Math.round(S.top+Ae+Ee))];default:return[new Ct(Math.round(z.left),Math.round(z.top)),new Ct(Math.round(z.left+z.width),Math.round(z.top)),new Ct(Math.round(z.left+z.width),Math.round(z.height+z.top)),new Ct(Math.round(z.left),Math.round(z.height+z.top))]}},_u="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Ys="Hidden Text",bu=function(){function x(f){this._data={},this._document=f}return x.prototype.parseMetrics=function(f,I){var S=this._document.createElement("div"),z=this._document.createElement("img"),ee=this._document.createElement("span"),Ae=this._document.body;S.style.visibility="hidden",S.style.fontFamily=f,S.style.fontSize=I,S.style.margin="0",S.style.padding="0",S.style.whiteSpace="nowrap",Ae.appendChild(S),z.src=_u,z.width=1,z.height=1,z.style.margin="0",z.style.padding="0",z.style.verticalAlign="baseline",ee.style.fontFamily=f,ee.style.fontSize=I,ee.style.margin="0",ee.style.padding="0",ee.appendChild(this._document.createTextNode(Ys)),S.appendChild(ee),S.appendChild(z);var be=z.offsetTop-ee.offsetTop+2;S.removeChild(ee),S.appendChild(this._document.createTextNode(Ys)),S.style.lineHeight="normal",z.style.verticalAlign="super";var Ee=z.offsetTop-S.offsetTop+2;return Ae.removeChild(S),{baseline:be,middle:Ee}},x.prototype.getMetrics=function(f,I){var S=f+" "+I;return typeof this._data[S]=="undefined"&&(this._data[S]=this.parseMetrics(f,I)),this._data[S]},x}(),Js=function(){function x(f,I){this.context=f,this.options=I}return x}(),wu=1e4,Cu=function(x){G(f,x);function f(I,S){var z=x.call(this,I,S)||this;return z._activeEffects=[],z.canvas=S.canvas?S.canvas:document.createElement("canvas"),z.ctx=z.canvas.getContext("2d"),S.canvas||(z.canvas.width=Math.floor(S.width*S.scale),z.canvas.height=Math.floor(S.height*S.scale),z.canvas.style.width=S.width+"px",z.canvas.style.height=S.height+"px"),z.fontMetrics=new bu(document),z.ctx.scale(z.options.scale,z.options.scale),z.ctx.translate(-S.x,-S.y),z.ctx.textBaseline="bottom",z._activeEffects=[],z.context.logger.debug("Canvas renderer initialized ("+S.width+"x"+S.height+") with scale "+S.scale),z}return f.prototype.applyEffects=function(I){for(var S=this;this._activeEffects.length;)this.popEffect();I.forEach(function(z){return S.applyEffect(z)})},f.prototype.applyEffect=function(I){this.ctx.save(),cu(I)&&(this.ctx.globalAlpha=I.opacity),uu(I)&&(this.ctx.translate(I.offsetX,I.offsetY),this.ctx.transform(I.matrix[0],I.matrix[1],I.matrix[2],I.matrix[3],I.matrix[4],I.matrix[5]),this.ctx.translate(-I.offsetX,-I.offsetY)),Ks(I)&&(this.path(I.path),this.ctx.clip()),this._activeEffects.push(I)},f.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},f.prototype.renderStack=function(I){return V(this,void 0,void 0,function(){var S;return F(this,function(z){switch(z.label){case 0:return S=I.element.container.styles,S.isVisible()?[4,this.renderStackContent(I)]:[3,2];case 1:z.sent(),z.label=2;case 2:return[2]}})})},f.prototype.renderNode=function(I){return V(this,void 0,void 0,function(){return F(this,function(S){switch(S.label){case 0:if(Wr(I.container.flags,16))debugger;return I.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(I)]:[3,3];case 1:return S.sent(),[4,this.renderNodeContent(I)];case 2:S.sent(),S.label=3;case 3:return[2]}})})},f.prototype.renderTextWithLetterSpacing=function(I,S,z){var ee=this;if(S===0)this.ctx.fillText(I.text,I.bounds.left,I.bounds.top+z);else{var Ae=ca(I.text);Ae.reduce(function(be,Ee){return ee.ctx.fillText(Ee,be,I.bounds.top+z),be+ee.ctx.measureText(Ee).width},I.bounds.left)}},f.prototype.createFontStyle=function(I){var S=I.fontVariant.filter(function(Ae){return Ae==="normal"||Ae==="small-caps"}).join(""),z=Iu(I.fontFamily).join(", "),ee=ti(I.fontSize)?""+I.fontSize.number+I.fontSize.unit:I.fontSize.number+"px";return[[I.fontStyle,S,I.fontWeight,ee,z].join(" "),z,ee]},f.prototype.renderTextNode=function(I,S){return V(this,void 0,void 0,function(){var z,ee,Ae,be,Ee,Re,Me,Xe,$e=this;return F(this,function(Bt){return z=this.createFontStyle(S),ee=z[0],Ae=z[1],be=z[2],this.ctx.font=ee,this.ctx.direction=S.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",Ee=this.fontMetrics.getMetrics(Ae,be),Re=Ee.baseline,Me=Ee.middle,Xe=S.paintOrder,I.textBounds.forEach(function(ft){Xe.forEach(function(bt){switch(bt){case 0:$e.ctx.fillStyle=Gr(S.color),$e.renderTextWithLetterSpacing(ft,S.letterSpacing,Re);var Yt=S.textShadow;Yt.length&&ft.text.trim().length&&(Yt.slice(0).reverse().forEach(function(xt){$e.ctx.shadowColor=Gr(xt.color),$e.ctx.shadowOffsetX=xt.offsetX.number*$e.options.scale,$e.ctx.shadowOffsetY=xt.offsetY.number*$e.options.scale,$e.ctx.shadowBlur=xt.blur.number,$e.renderTextWithLetterSpacing(ft,S.letterSpacing,Re)}),$e.ctx.shadowColor="",$e.ctx.shadowOffsetX=0,$e.ctx.shadowOffsetY=0,$e.ctx.shadowBlur=0),S.textDecorationLine.length&&($e.ctx.fillStyle=Gr(S.textDecorationColor||S.color),S.textDecorationLine.forEach(function(xt){switch(xt){case 1:$e.ctx.fillRect(ft.bounds.left,Math.round(ft.bounds.top+Re),ft.bounds.width,1);break;case 2:$e.ctx.fillRect(ft.bounds.left,Math.round(ft.bounds.top),ft.bounds.width,1);break;case 3:$e.ctx.fillRect(ft.bounds.left,Math.ceil(ft.bounds.top+Me),ft.bounds.width,1);break}}));break;case 1:S.webkitTextStrokeWidth&&ft.text.trim().length&&($e.ctx.strokeStyle=Gr(S.webkitTextStrokeColor),$e.ctx.lineWidth=S.webkitTextStrokeWidth,$e.ctx.lineJoin=window.chrome?"miter":"round",$e.ctx.strokeText(ft.text,ft.bounds.left,ft.bounds.top+Re)),$e.ctx.strokeStyle="",$e.ctx.lineWidth=0,$e.ctx.lineJoin="miter";break}})}),[2]})})},f.prototype.renderReplacedElement=function(I,S,z){if(z&&I.intrinsicWidth>0&&I.intrinsicHeight>0){var ee=Hi(I),Ae=Mi(S);this.path(Ae),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(z,0,0,I.intrinsicWidth,I.intrinsicHeight,ee.left,ee.top,ee.width,ee.height),this.ctx.restore()}},f.prototype.renderNodeContent=function(I){return V(this,void 0,void 0,function(){var S,z,ee,Ae,be,Ee,Re,Re,Me,Xe,$e,Bt,ft,bt,Yt,xt,Rt,dr,or,Re,Er,ft,xt;return F(this,function(St){switch(St.label){case 0:this.applyEffects(I.getEffects(4)),S=I.container,z=I.curves,ee=S.styles,Ae=0,be=S.textNodes,St.label=1;case 1:return Ae<be.length?(Ee=be[Ae],[4,this.renderTextNode(Ee,ee)]):[3,4];case 2:St.sent(),St.label=3;case 3:return Ae++,[3,1];case 4:if(!(S instanceof fs))return[3,8];St.label=5;case 5:return St.trys.push([5,7,,8]),[4,this.context.cache.match(S.src)];case 6:return Re=St.sent(),this.renderReplacedElement(S,z,Re),[3,8];case 7:return St.sent(),this.context.logger.error("Error loading image "+S.src),[3,8];case 8:if(S instanceof ps&&this.renderReplacedElement(S,z,S.canvas),!(S instanceof ms))return[3,12];St.label=9;case 9:return St.trys.push([9,11,,12]),[4,this.context.cache.match(S.svg)];case 10:return Re=St.sent(),this.renderReplacedElement(S,z,Re),[3,12];case 11:return St.sent(),this.context.logger.error("Error loading svg "+S.svg.substring(0,255)),[3,12];case 12:return S instanceof _s&&S.tree?(Me=new f(this.context,{scale:this.options.scale,backgroundColor:S.backgroundColor,x:0,y:0,width:S.width,height:S.height}),[4,Me.render(S.tree)]):[3,14];case 13:Xe=St.sent(),S.width&&S.height&&this.ctx.drawImage(Xe,0,0,S.width,S.height,S.bounds.left,S.bounds.top,S.bounds.width,S.bounds.height),St.label=14;case 14:if(S instanceof da&&($e=Math.min(S.bounds.width,S.bounds.height),S.type===Ii?S.checked&&(this.ctx.save(),this.path([new Ct(S.bounds.left+$e*.39363,S.bounds.top+$e*.79),new Ct(S.bounds.left+$e*.16,S.bounds.top+$e*.5549),new Ct(S.bounds.left+$e*.27347,S.bounds.top+$e*.44071),new Ct(S.bounds.left+$e*.39694,S.bounds.top+$e*.5649),new Ct(S.bounds.left+$e*.72983,S.bounds.top+$e*.23),new Ct(S.bounds.left+$e*.84,S.bounds.top+$e*.34085),new Ct(S.bounds.left+$e*.39363,S.bounds.top+$e*.79)]),this.ctx.fillStyle=Gr(vs),this.ctx.fill(),this.ctx.restore()):S.type===Ri&&(S.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(S.bounds.left+$e/2,S.bounds.top+$e/2,$e/4,0,Math.PI*2,!0),this.ctx.fillStyle=Gr(vs),this.ctx.fill(),this.ctx.restore()))),xu(S)&&S.value.length){Bt=this.createFontStyle(ee),ft=Bt[0],bt=Bt[1],Yt=this.fontMetrics.getMetrics(ft,bt).baseline,this.ctx.font=ft,this.ctx.fillStyle=Gr(ee.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Bu(S.styles.textAlign),xt=Hi(S),Rt=0;switch(S.styles.textAlign){case 1:Rt+=xt.width/2;break;case 2:Rt+=xt.width;break}dr=xt.add(Rt,0,0,-xt.height/2+1),this.ctx.save(),this.path([new Ct(xt.left,xt.top),new Ct(xt.left+xt.width,xt.top),new Ct(xt.left+xt.width,xt.top+xt.height),new Ct(xt.left,xt.top+xt.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new si(S.value,dr),ee.letterSpacing,Yt),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Wr(S.styles.display,2048))return[3,20];if(!(S.styles.listStyleImage!==null))return[3,19];if(or=S.styles.listStyleImage,!(or.type===0))return[3,18];Re=void 0,Er=or.url,St.label=15;case 15:return St.trys.push([15,17,,18]),[4,this.context.cache.match(Er)];case 16:return Re=St.sent(),this.ctx.drawImage(Re,S.bounds.left-(Re.width+10),S.bounds.top),[3,18];case 17:return St.sent(),this.context.logger.error("Error loading list-style-image "+Er),[3,18];case 18:return[3,20];case 19:I.listValue&&S.styles.listStyleType!==-1&&(ft=this.createFontStyle(ee)[0],this.ctx.font=ft,this.ctx.fillStyle=Gr(ee.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",xt=new X(S.bounds.left,S.bounds.top+Ir(S.styles.paddingTop,S.bounds.width),S.bounds.width,Ya(ee.lineHeight,ee.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new si(I.listValue,xt),ee.letterSpacing,Ya(ee.lineHeight,ee.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),St.label=20;case 20:return[2]}})})},f.prototype.renderStackContent=function(I){return V(this,void 0,void 0,function(){var S,z,ee,Ae,be,ee,Ee,Re,ee,Me,Xe,ee,$e,Bt,ee,ft,bt,ee,Yt,xt,ee;return F(this,function(Rt){switch(Rt.label){case 0:if(Wr(I.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(I.element)];case 1:Rt.sent(),S=0,z=I.negativeZIndex,Rt.label=2;case 2:return S<z.length?(ee=z[S],[4,this.renderStack(ee)]):[3,5];case 3:Rt.sent(),Rt.label=4;case 4:return S++,[3,2];case 5:return[4,this.renderNodeContent(I.element)];case 6:Rt.sent(),Ae=0,be=I.nonInlineLevel,Rt.label=7;case 7:return Ae<be.length?(ee=be[Ae],[4,this.renderNode(ee)]):[3,10];case 8:Rt.sent(),Rt.label=9;case 9:return Ae++,[3,7];case 10:Ee=0,Re=I.nonPositionedFloats,Rt.label=11;case 11:return Ee<Re.length?(ee=Re[Ee],[4,this.renderStack(ee)]):[3,14];case 12:Rt.sent(),Rt.label=13;case 13:return Ee++,[3,11];case 14:Me=0,Xe=I.nonPositionedInlineLevel,Rt.label=15;case 15:return Me<Xe.length?(ee=Xe[Me],[4,this.renderStack(ee)]):[3,18];case 16:Rt.sent(),Rt.label=17;case 17:return Me++,[3,15];case 18:$e=0,Bt=I.inlineLevel,Rt.label=19;case 19:return $e<Bt.length?(ee=Bt[$e],[4,this.renderNode(ee)]):[3,22];case 20:Rt.sent(),Rt.label=21;case 21:return $e++,[3,19];case 22:ft=0,bt=I.zeroOrAutoZIndexOrTransformedOrOpacity,Rt.label=23;case 23:return ft<bt.length?(ee=bt[ft],[4,this.renderStack(ee)]):[3,26];case 24:Rt.sent(),Rt.label=25;case 25:return ft++,[3,23];case 26:Yt=0,xt=I.positiveZIndex,Rt.label=27;case 27:return Yt<xt.length?(ee=xt[Yt],[4,this.renderStack(ee)]):[3,30];case 28:Rt.sent(),Rt.label=29;case 29:return Yt++,[3,27];case 30:return[2]}})})},f.prototype.mask=function(I){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(I.slice(0).reverse()),this.ctx.closePath()},f.prototype.path=function(I){this.ctx.beginPath(),this.formatPath(I),this.ctx.closePath()},f.prototype.formatPath=function(I){var S=this;I.forEach(function(z,ee){var Ae=on(z)?z.start:z;ee===0?S.ctx.moveTo(Ae.x,Ae.y):S.ctx.lineTo(Ae.x,Ae.y),on(z)&&S.ctx.bezierCurveTo(z.startControl.x,z.startControl.y,z.endControl.x,z.endControl.y,z.end.x,z.end.y)})},f.prototype.renderRepeat=function(I,S,z,ee){this.path(I),this.ctx.fillStyle=S,this.ctx.translate(z,ee),this.ctx.fill(),this.ctx.translate(-z,-ee)},f.prototype.resizeImage=function(I,S,z){var ee;if(I.width===S&&I.height===z)return I;var Ae=(ee=this.canvas.ownerDocument)!==null&&ee!==void 0?ee:document,be=Ae.createElement("canvas");be.width=Math.max(1,S),be.height=Math.max(1,z);var Ee=be.getContext("2d");return Ee.drawImage(I,0,0,I.width,I.height,0,0,S,z),be},f.prototype.renderBackgroundImage=function(I){return V(this,void 0,void 0,function(){var S,z,ee,Ae,be,Ee;return F(this,function(Re){switch(Re.label){case 0:S=I.styles.backgroundImage.length-1,z=function(Me){var Xe,$e,Bt,ft,bt,Yt,xt,Rt,dr,or,ft,bt,Yt,xt,Rt,Er,St,vr,_r,nr,tn,Zr,nn,Vr,dr,fn,ft,Rn,On,xt,Rt,Ln,bt,Yt,Mn,pn,Dn,Pn,kn,En,Hn,_n;return F(this,function($n){switch($n.label){case 0:if(!(Me.type===0))return[3,5];Xe=void 0,$e=Me.url,$n.label=1;case 1:return $n.trys.push([1,3,,4]),[4,ee.context.cache.match($e)];case 2:return Xe=$n.sent(),[3,4];case 3:return $n.sent(),ee.context.logger.error("Error loading background-image "+$e),[3,4];case 4:return Xe&&(Bt=Ca(I,S,[Xe.width,Xe.height,Xe.width/Xe.height]),ft=Bt[0],bt=Bt[1],Yt=Bt[2],xt=Bt[3],Rt=Bt[4],dr=ee.ctx.createPattern(ee.resizeImage(Xe,xt,Rt),"repeat"),ee.renderRepeat(ft,dr,bt,Yt)),[3,6];case 5:lo(Me)?(or=Ca(I,S,[null,null,null]),ft=or[0],bt=or[1],Yt=or[2],xt=or[3],Rt=or[4],Er=io(Me.angle,xt,Rt),St=Er[0],vr=Er[1],_r=Er[2],nr=Er[3],tn=Er[4],Zr=document.createElement("canvas"),Zr.width=xt,Zr.height=Rt,nn=Zr.getContext("2d"),Vr=nn.createLinearGradient(vr,nr,_r,tn),Pa(Me.stops,St).forEach(function(ui){return Vr.addColorStop(ui.stop,Gr(ui.color))}),nn.fillStyle=Vr,nn.fillRect(0,0,xt,Rt),xt>0&&Rt>0&&(dr=ee.ctx.createPattern(Zr,"repeat"),ee.renderRepeat(ft,dr,bt,Yt))):uo(Me)&&(fn=Ca(I,S,[null,null,null]),ft=fn[0],Rn=fn[1],On=fn[2],xt=fn[3],Rt=fn[4],Ln=Me.position.length===0?[Ji]:Me.position,bt=Ir(Ln[0],xt),Yt=Ir(Ln[Ln.length-1],Rt),Mn=ao(Me,bt,Yt,xt,Rt),pn=Mn[0],Dn=Mn[1],pn>0&&Dn>0&&(Pn=ee.ctx.createRadialGradient(Rn+bt,On+Yt,0,Rn+bt,On+Yt,pn),Pa(Me.stops,pn*2).forEach(function(ui){return Pn.addColorStop(ui.stop,Gr(ui.color))}),ee.path(ft),ee.ctx.fillStyle=Pn,pn!==Dn?(kn=I.bounds.left+.5*I.bounds.width,En=I.bounds.top+.5*I.bounds.height,Hn=Dn/pn,_n=1/Hn,ee.ctx.save(),ee.ctx.translate(kn,En),ee.ctx.transform(1,0,0,Hn,0,0),ee.ctx.translate(-kn,-En),ee.ctx.fillRect(Rn,_n*(On-En)+En,xt,Rt*_n),ee.ctx.restore()):ee.ctx.fill())),$n.label=6;case 6:return S--,[2]}})},ee=this,Ae=0,be=I.styles.backgroundImage.slice(0).reverse(),Re.label=1;case 1:return Ae<be.length?(Ee=be[Ae],[5,z(Ee)]):[3,4];case 2:Re.sent(),Re.label=3;case 3:return Ae++,[3,1];case 4:return[2]}})})},f.prototype.renderSolidBorder=function(I,S,z){return V(this,void 0,void 0,function(){return F(this,function(ee){return this.path(zs(z,S)),this.ctx.fillStyle=Gr(I),this.ctx.fill(),[2]})})},f.prototype.renderDoubleBorder=function(I,S,z,ee){return V(this,void 0,void 0,function(){var Ae,be;return F(this,function(Ee){switch(Ee.label){case 0:return S<3?[4,this.renderSolidBorder(I,z,ee)]:[3,2];case 1:return Ee.sent(),[2];case 2:return Ae=fu(ee,z),this.path(Ae),this.ctx.fillStyle=Gr(I),this.ctx.fill(),be=pu(ee,z),this.path(be),this.ctx.fill(),[2]}})})},f.prototype.renderNodeBackgroundAndBorders=function(I){return V(this,void 0,void 0,function(){var S,z,ee,Ae,be,Ee,Re,Me,Xe=this;return F(this,function($e){switch($e.label){case 0:return this.applyEffects(I.getEffects(2)),S=I.container.styles,z=!Tn(S.backgroundColor)||S.backgroundImage.length,ee=[{style:S.borderTopStyle,color:S.borderTopColor,width:S.borderTopWidth},{style:S.borderRightStyle,color:S.borderRightColor,width:S.borderRightWidth},{style:S.borderBottomStyle,color:S.borderBottomColor,width:S.borderBottomWidth},{style:S.borderLeftStyle,color:S.borderLeftColor,width:S.borderLeftWidth}],Ae=Tu(Jn(S.backgroundClip,0),I.curves),z||S.boxShadow.length?(this.ctx.save(),this.path(Ae),this.ctx.clip(),Tn(S.backgroundColor)||(this.ctx.fillStyle=Gr(S.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(I.container)]):[3,2];case 1:$e.sent(),this.ctx.restore(),S.boxShadow.slice(0).reverse().forEach(function(Bt){Xe.ctx.save();var ft=Ni(I.curves),bt=Bt.inset?0:wu,Yt=hu(ft,-bt+(Bt.inset?1:-1)*Bt.spread.number,(Bt.inset?1:-1)*Bt.spread.number,Bt.spread.number*(Bt.inset?-2:2),Bt.spread.number*(Bt.inset?-2:2));Bt.inset?(Xe.path(ft),Xe.ctx.clip(),Xe.mask(Yt)):(Xe.mask(ft),Xe.ctx.clip(),Xe.path(Yt)),Xe.ctx.shadowOffsetX=Bt.offsetX.number+bt,Xe.ctx.shadowOffsetY=Bt.offsetY.number,Xe.ctx.shadowColor=Gr(Bt.color),Xe.ctx.shadowBlur=Bt.blur.number,Xe.ctx.fillStyle=Bt.inset?Gr(Bt.color):"rgba(0,0,0,1)",Xe.ctx.fill(),Xe.ctx.restore()}),$e.label=2;case 2:be=0,Ee=0,Re=ee,$e.label=3;case 3:return Ee<Re.length?(Me=Re[Ee],Me.style!==0&&!Tn(Me.color)&&Me.width>0?Me.style===2?[4,this.renderDashedDottedBorder(Me.color,Me.width,be,I.curves,2)]:[3,5]:[3,11]):[3,13];case 4:return $e.sent(),[3,11];case 5:return Me.style===3?[4,this.renderDashedDottedBorder(Me.color,Me.width,be,I.curves,3)]:[3,7];case 6:return $e.sent(),[3,11];case 7:return Me.style===4?[4,this.renderDoubleBorder(Me.color,Me.width,be,I.curves)]:[3,9];case 8:return $e.sent(),[3,11];case 9:return[4,this.renderSolidBorder(Me.color,be,I.curves)];case 10:$e.sent(),$e.label=11;case 11:be++,$e.label=12;case 12:return Ee++,[3,3];case 13:return[2]}})})},f.prototype.renderDashedDottedBorder=function(I,S,z,ee,Ae){return V(this,void 0,void 0,function(){var be,Ee,Re,Me,Xe,$e,Bt,ft,bt,Yt,xt,Rt,dr,or,Er,St,Er,St;return F(this,function(vr){return this.ctx.save(),be=mu(ee,z),Ee=zs(ee,z),Ae===2&&(this.path(Ee),this.ctx.clip()),on(Ee[0])?(Re=Ee[0].start.x,Me=Ee[0].start.y):(Re=Ee[0].x,Me=Ee[0].y),on(Ee[1])?(Xe=Ee[1].end.x,$e=Ee[1].end.y):(Xe=Ee[1].x,$e=Ee[1].y),z===0||z===2?Bt=Math.abs(Re-Xe):Bt=Math.abs(Me-$e),this.ctx.beginPath(),Ae===3?this.formatPath(be):this.formatPath(Ee.slice(0,2)),ft=S<3?S*3:S*2,bt=S<3?S*2:S,Ae===3&&(ft=S,bt=S),Yt=!0,Bt<=ft*2?Yt=!1:Bt<=ft*2+bt?(xt=Bt/(2*ft+bt),ft*=xt,bt*=xt):(Rt=Math.floor((Bt+bt)/(ft+bt)),dr=(Bt-Rt*ft)/(Rt-1),or=(Bt-(Rt+1)*ft)/Rt,bt=or<=0||Math.abs(bt-dr)<Math.abs(bt-or)?dr:or),Yt&&(Ae===3?this.ctx.setLineDash([0,ft+bt]):this.ctx.setLineDash([ft,bt])),Ae===3?(this.ctx.lineCap="round",this.ctx.lineWidth=S):this.ctx.lineWidth=S*2+1.1,this.ctx.strokeStyle=Gr(I),this.ctx.stroke(),this.ctx.setLineDash([]),Ae===2&&(on(Ee[0])&&(Er=Ee[3],St=Ee[0],this.ctx.beginPath(),this.formatPath([new Ct(Er.end.x,Er.end.y),new Ct(St.start.x,St.start.y)]),this.ctx.stroke()),on(Ee[1])&&(Er=Ee[1],St=Ee[2],this.ctx.beginPath(),this.formatPath([new Ct(Er.end.x,Er.end.y),new Ct(St.start.x,St.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},f.prototype.render=function(I){return V(this,void 0,void 0,function(){var S;return F(this,function(z){switch(z.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Gr(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),S=du(I),[4,this.renderStack(S)];case 1:return z.sent(),this.applyEffects([]),[2,this.canvas]}})})},f}(Js),xu=function(x){return x instanceof Es||x instanceof ys?!0:x instanceof da&&x.type!==Ri&&x.type!==Ii},Tu=function(x,f){switch(x){case 0:return Ni(f);case 2:return ou(f);case 1:default:return Mi(f)}},Bu=function(x){switch(x){case 1:return"center";case 2:return"right";case 0:default:return"left"}},Su=["-apple-system","system-ui"],Iu=function(x){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?x.filter(function(f){return Su.indexOf(f)===-1}):x},Ru=function(x){G(f,x);function f(I,S){var z=x.call(this,I,S)||this;return z.canvas=S.canvas?S.canvas:document.createElement("canvas"),z.ctx=z.canvas.getContext("2d"),z.options=S,z.canvas.width=Math.floor(S.width*S.scale),z.canvas.height=Math.floor(S.height*S.scale),z.canvas.style.width=S.width+"px",z.canvas.style.height=S.height+"px",z.ctx.scale(z.options.scale,z.options.scale),z.ctx.translate(-S.x,-S.y),z.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+S.width+"x"+S.height+" at "+S.x+","+S.y+") with scale "+S.scale),z}return f.prototype.render=function(I){return V(this,void 0,void 0,function(){var S,z;return F(this,function(ee){switch(ee.label){case 0:return S=ua(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,I),[4,Ou(S)];case 1:return z=ee.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Gr(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(z,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},f}(Js),Ou=function(x){return new Promise(function(f,I){var S=new Image;S.onload=function(){f(S)},S.onerror=I,S.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(x))})},Lu=function(){function x(f){var I=f.id,S=f.enabled;this.id=I,this.enabled=S,this.start=Date.now()}return x.prototype.debug=function(){for(var f=[],I=0;I<arguments.length;I++)f[I]=arguments[I];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,O([this.id,this.getTime()+"ms"],f)):this.info.apply(this,f))},x.prototype.getTime=function(){return Date.now()-this.start},x.prototype.info=function(){for(var f=[],I=0;I<arguments.length;I++)f[I]=arguments[I];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,O([this.id,this.getTime()+"ms"],f)))},x.prototype.warn=function(){for(var f=[],I=0;I<arguments.length;I++)f[I]=arguments[I];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,O([this.id,this.getTime()+"ms"],f)):this.info.apply(this,f))},x.prototype.error=function(){for(var f=[],I=0;I<arguments.length;I++)f[I]=arguments[I];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,O([this.id,this.getTime()+"ms"],f)):this.info.apply(this,f))},x.instances={},x}(),Du=function(){function x(f,I){var S;this.windowBounds=I,this.instanceName="#"+x.instanceCount++,this.logger=new Lu({id:this.instanceName,enabled:f.logging}),this.cache=(S=f.cache)!==null&&S!==void 0?S:new ql(this,f)}return x.instanceCount=1,x}(),Uu=function(x,f){return f===void 0&&(f={}),Fu(x,f)};typeof window!="undefined"&&Qs.setContext(window);var Fu=function(x,f){return V(void 0,void 0,void 0,function(){var I,S,z,ee,Ae,be,Ee,Re,Me,Xe,$e,Bt,ft,bt,Yt,xt,Rt,dr,or,Er,St,vr,St,_r,nr,tn,Zr,nn,Vr,fn,Rn,On,Ln,Mn,pn,Dn,Pn,kn,En,Hn;return F(this,function(_n){switch(_n.label){case 0:if(!x||typeof x!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(I=x.ownerDocument,!I)throw new Error("Element is not attached to a Document");if(S=I.defaultView,!S)throw new Error("Document is not attached to a Window");return z={allowTaint:(_r=f.allowTaint)!==null&&_r!==void 0?_r:!1,imageTimeout:(nr=f.imageTimeout)!==null&&nr!==void 0?nr:15e3,proxy:f.proxy,useCORS:(tn=f.useCORS)!==null&&tn!==void 0?tn:!1},ee=D({logging:(Zr=f.logging)!==null&&Zr!==void 0?Zr:!0,cache:f.cache},z),Ae={windowWidth:(nn=f.windowWidth)!==null&&nn!==void 0?nn:S.innerWidth,windowHeight:(Vr=f.windowHeight)!==null&&Vr!==void 0?Vr:S.innerHeight,scrollX:(fn=f.scrollX)!==null&&fn!==void 0?fn:S.pageXOffset,scrollY:(Rn=f.scrollY)!==null&&Rn!==void 0?Rn:S.pageYOffset},be=new X(Ae.scrollX,Ae.scrollY,Ae.windowWidth,Ae.windowHeight),Ee=new Du(ee,be),Re=(On=f.foreignObjectRendering)!==null&&On!==void 0?On:!1,Me={allowTaint:(Ln=f.allowTaint)!==null&&Ln!==void 0?Ln:!1,onclone:f.onclone,ignoreElements:f.ignoreElements,inlineImages:Re,copyStyles:Re},Ee.logger.debug("Starting document clone with size "+be.width+"x"+be.height+" scrolled to "+-be.left+","+-be.top),Xe=new ks(Ee,x,Me),$e=Xe.clonedReferenceElement,$e?[4,Xe.toIFrame(I,be)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return Bt=_n.sent(),ft=pa($e)||Nl($e)?e($e.ownerDocument):M(Ee,$e),bt=ft.width,Yt=ft.height,xt=ft.left,Rt=ft.top,dr=Nu(Ee,$e,f.backgroundColor),or={canvas:f.canvas,backgroundColor:dr,scale:(pn=(Mn=f.scale)!==null&&Mn!==void 0?Mn:S.devicePixelRatio)!==null&&pn!==void 0?pn:1,x:((Dn=f.x)!==null&&Dn!==void 0?Dn:0)+xt,y:((Pn=f.y)!==null&&Pn!==void 0?Pn:0)+Rt,width:(kn=f.width)!==null&&kn!==void 0?kn:Math.ceil(bt),height:(En=f.height)!==null&&En!==void 0?En:Math.ceil(Yt)},Re?(Ee.logger.debug("Document cloned, using foreign object rendering"),St=new Ru(Ee,or),[4,St.render($e)]):[3,3];case 2:return Er=_n.sent(),[3,5];case 3:return Ee.logger.debug("Document cloned, element located at "+xt+","+Rt+" with size "+bt+"x"+Yt+" using computed rendering"),Ee.logger.debug("Starting DOM parsing"),vr=ws(Ee,$e),dr===vr.styles.backgroundColor&&(vr.styles.backgroundColor=vn.TRANSPARENT),Ee.logger.debug("Starting renderer for element at "+or.x+","+or.y+" with size "+or.width+"x"+or.height),St=new Cu(Ee,or),[4,St.render(vr)];case 4:Er=_n.sent(),_n.label=5;case 5:return((Hn=f.removeContainer)!==null&&Hn!==void 0?Hn:!0)&&(ks.destroy(Bt)||Ee.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),Ee.logger.debug("Finished rendering"),[2,Er]}})})},Nu=function(x,f,I){var S=f.ownerDocument,z=S.documentElement?ni(x,getComputedStyle(S.documentElement).backgroundColor):vn.TRANSPARENT,ee=S.body?ni(x,getComputedStyle(S.body).backgroundColor):vn.TRANSPARENT,Ae=typeof I=="string"?ni(x,I):I===null?vn.TRANSPARENT:4294967295;return f===S.documentElement?Tn(z)?Tn(ee)?Ae:ee:z:Ae};return Uu})},wRmb:function(ct,_e,j){"use strict";j.d(_e,"a",function(){return R});var se=j("rePB"),G=j("KQm4"),D=j("VTBJ"),V=j("Ff2n"),F=j("q1tI"),O=j.n(F),X=j("Kwbf"),M=j("Zm9Q"),e=j("hW8S");function R(i){return Object(M.a)(i).filter(function(A){return F.isValidElement(A)}).map(function(A){var o=A.key,a=A.props,r=a.children,t=Object(V.a)(a,["children"]),y=Object(D.a)({key:o},t);return r&&(y.children=R(r)),y})}function g(i){return i.reduce(function(A,o){var a=o.fixed,r=a===!0?"left":a,t=o.children;return t&&t.length>0?[].concat(Object(G.a)(A),Object(G.a)(g(t).map(function(y){return Object(D.a)({fixed:r},y)}))):[].concat(Object(G.a)(A),[Object(D.a)(Object(D.a)({},o),{},{fixed:r})])},[])}function v(i){for(var A=!0,o=0;o<i.length;o+=1){var a=i[o];if(A&&a.fixed!=="left")A=!1;else if(!A&&a.fixed==="left"){Object(X.a)(!1,"Index ".concat(o-1," of `columns` missing `fixed='left'` prop."));break}}for(var r=!0,t=i.length-1;t>=0;t-=1){var y=i[t];if(r&&y.fixed!=="right")r=!1;else if(!r&&y.fixed==="right"){Object(X.a)(!1,"Index ".concat(t+1," of `columns` missing `fixed='right'` prop."));break}}}function u(i){return i.map(function(A){var o=A.fixed,a=Object(V.a)(A,["fixed"]),r=o;return o==="left"?r="right":o==="right"&&(r="left"),Object(D.a)({fixed:r},a)})}function s(i,A){var o=i.prefixCls,a=i.columns,r=i.children,t=i.expandable,y=i.expandedKeys,_=i.getRowKey,E=i.onTriggerExpand,B=i.expandIcon,C=i.rowExpandable,h=i.expandIconColumnIndex,n=i.direction,l=i.expandRowByClick,d=F.useMemo(function(){return a||R(r)},[a,r]),b=F.useMemo(function(){if(t){var L,N=h||0,T=d[N],P=(L={},Object(se.a)(L,e.a,{className:"".concat(o,"-expand-icon-col")}),Object(se.a)(L,"title",""),Object(se.a)(L,"fixed",T?T.fixed:null),Object(se.a)(L,"className","".concat(o,"-row-expand-icon-cell")),Object(se.a)(L,"render",function(Y,re,me){var ge=_(re,me),Oe=y.has(ge),Se=C?C(re):!0,Be=B({prefixCls:o,expanded:Oe,expandable:Se,record:re,onExpand:E});return l?F.createElement("span",{onClick:function(ke){return ke.stopPropagation()}},Be):Be}),L),W=d.slice();return N>=0&&W.splice(N,0,P),W}return d},[t,d,_,y,B,n]),m=F.useMemo(function(){var L=b;return A&&(L=A(L)),L.length||(L=[{render:function(){return null}}]),L},[A,b,n]),c=F.useMemo(function(){return n==="rtl"?u(g(m)):g(m)},[m,n]);return[m,c]}_e.b=s},"y0+3":function(ct,_e,j){"use strict";j.d(_e,"a",function(){return g}),j.d(_e,"b",function(){return u});var se=/margin|padding|width|height|max|min|offset/,G={left:!0,top:!0},D={cssFloat:1,styleFloat:1,float:1};function V(s){return s.nodeType===1?s.ownerDocument.defaultView.getComputedStyle(s,null):{}}function F(s,i,A){if(i=i.toLowerCase(),A==="auto"){if(i==="height")return s.offsetHeight;if(i==="width")return s.offsetWidth}return i in G||(G[i]=se.test(i)),G[i]?parseFloat(A)||0:A}function O(s,i){var A=arguments.length,o=V(s);return i=D[i]?"cssFloat"in s.style?"cssFloat":"styleFloat":i,A===1?o:F(s,i,o[i]||s.style[i])}function X(s,i,A){var o=arguments.length;if(i=D[i]?"cssFloat"in s.style?"cssFloat":"styleFloat":i,o===3)return typeof A=="number"&&se.test(i)&&(A="".concat(A,"px")),s.style[i]=A,A;for(var a in i)i.hasOwnProperty(a)&&X(s,a,i[a]);return V(s)}function M(s){return s===document.body?document.documentElement.clientWidth:s.offsetWidth}function e(s){return s===document.body?window.innerHeight||document.documentElement.clientHeight:s.offsetHeight}function R(){var s=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),i=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:s,height:i}}function g(){var s=document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight;return{width:s,height:i}}function v(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function u(s){var i=s.getBoundingClientRect(),A=document.documentElement;return{left:i.left+(window.pageXOffset||A.scrollLeft)-(A.clientLeft||document.body.clientLeft||0),top:i.top+(window.pageYOffset||A.scrollTop)-(A.clientTop||document.body.clientTop||0)}}}}]);
|