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.
467 lines
1.3 MiB
467 lines
1.3 MiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[97,4,5,6,7,8],{"+E2i":function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return ue}),Q.d(_e,"b",function(){return $});var he=Q("6ASS"),be=Q("fNpE"),ve=Q("B/uU"),Ee=["expandable"],ue="RC_TABLE_INTERNAL_COL_DEFINE";function $(O){var H=O.expandable,e=Object(be.a)(O,Ee),M;return"expandable"in O?M=Object(he.a)(Object(he.a)({},e),H):M=e,M.showExpandColumn===!1&&(M.expandIconColumnIndex=-1),M}},"+ua5":function(dt,_e,Q){},"/cxE":function(dt,_e,Q){"use strict";Q.d(_e,"f",function(){return ve}),Q.d(_e,"g",function(){return Ee}),Q.d(_e,"h",function(){return ue}),Q.d(_e,"e",function(){return O}),Q.d(_e,"b",function(){return H}),Q.d(_e,"c",function(){return e}),Q.d(_e,"d",function(){return M}),Q.d(_e,"a",function(){return D});class he{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(N){setTimeout(()=>{throw N.stack?new Error(N.message+`
|
|
|
|
`+N.stack):N},0)}}emit(N){this.listeners.forEach(c=>{c(N)})}onUnexpectedError(N){this.unexpectedErrorHandler(N),this.emit(N)}onUnexpectedExternalError(N){this.unexpectedErrorHandler(N)}}const be=new he;function ve(N){O(N)||be.onUnexpectedError(N);return}function Ee(N){O(N)||be.onUnexpectedExternalError(N);return}function ue(N){if(N instanceof Error){let{name:c,message:l}=N;const s=N.stacktrace||N.stack;return{$isError:!0,name:c,message:l,stack:s}}return N}const $="Canceled";function O(N){return N instanceof Error&&N.name===$&&N.message===$}function H(){const N=new Error($);return N.name=N.message,N}function e(N){return N?new Error(`Illegal argument: ${N}`):new Error("Illegal argument")}function M(N){return N?new Error(`Illegal state: ${N}`):new Error("Illegal state")}class D extends Error{constructor(N){super("NotSupported");N&&(this.message=N)}}},"0lMV":function(dt,_e,Q){"use strict";var he=Q("T/Jt"),be=Q.n(he),ve=he.createContext({});_e.a=ve},"0nBa":function(dt,_e){var Q={}.toString;dt.exports=Array.isArray||function(he){return Q.call(he)=="[object Array]"}},"0pdE":function(dt,_e,Q){"use strict";var he=Q("yuO0"),be=Q("XjgL"),ve=Q("fNpE"),Ee=Q("6ASS"),ue=Q("eA01"),$=Q("fXDJ"),O=Q("fhFH"),H=Q("BPTR"),e=Q("udol"),M=Q("27eb"),D=Q.n(M),N=Q("E0BR"),c=Q("T/Jt"),l=Q("c27x"),s=function(i){for(var T=i.prefixCls,w=i.level,y=i.isStart,o=i.isEnd,r="".concat(T,"-indent-unit"),a=[],n=0;n<w;n+=1){var t;a.push(c.createElement("span",{key:n,className:D()(r,(t={},Object(be.a)(t,"".concat(r,"-start"),y[n]),Object(be.a)(t,"".concat(r,"-end"),o[n]),t))}))}return c.createElement("span",{"aria-hidden":"true",className:"".concat(T,"-indent")},a)},h=c.memo(s),x=Q("El5i"),E=Q("rgEC"),v=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],d="open",m="close",g="---",S=function(R){Object(H.a)(T,R);var i=Object(e.a)(T);function T(){var w;Object(ue.a)(this,T);for(var y=arguments.length,o=new Array(y),r=0;r<y;r++)o[r]=arguments[r];return w=i.call.apply(i,[this].concat(o)),w.state={dragNodeHighlight:!1},w.selectHandle=void 0,w.cacheIndent=void 0,w.onSelectorClick=function(a){var n=w.props.context.onNodeClick;n(a,Object(E.b)(w.props)),w.isSelectable()?w.onSelect(a):w.onCheck(a)},w.onSelectorDoubleClick=function(a){var n=w.props.context.onNodeDoubleClick;n(a,Object(E.b)(w.props))},w.onSelect=function(a){if(w.isDisabled())return;var n=w.props.context.onNodeSelect;n(a,Object(E.b)(w.props))},w.onCheck=function(a){if(w.isDisabled())return;var n=w.props,t=n.disableCheckbox,p=n.checked,_=w.props.context.onNodeCheck;if(!w.isCheckable()||t)return;var f=!p;_(a,Object(E.b)(w.props),f)},w.onMouseEnter=function(a){var n=w.props.context.onNodeMouseEnter;n(a,Object(E.b)(w.props))},w.onMouseLeave=function(a){var n=w.props.context.onNodeMouseLeave;n(a,Object(E.b)(w.props))},w.onContextMenu=function(a){var n=w.props.context.onNodeContextMenu;n(a,Object(E.b)(w.props))},w.onDragStart=function(a){var n=w.props.context.onNodeDragStart;a.stopPropagation(),w.setState({dragNodeHighlight:!0}),n(a,Object(O.a)(w));try{a.dataTransfer.setData("text/plain","")}catch(t){}},w.onDragEnter=function(a){var n=w.props.context.onNodeDragEnter;a.preventDefault(),a.stopPropagation(),n(a,Object(O.a)(w))},w.onDragOver=function(a){var n=w.props.context.onNodeDragOver;a.preventDefault(),a.stopPropagation(),n(a,Object(O.a)(w))},w.onDragLeave=function(a){var n=w.props.context.onNodeDragLeave;a.stopPropagation(),n(a,Object(O.a)(w))},w.onDragEnd=function(a){var n=w.props.context.onNodeDragEnd;a.stopPropagation(),w.setState({dragNodeHighlight:!1}),n(a,Object(O.a)(w))},w.onDrop=function(a){var n=w.props.context.onNodeDrop;a.preventDefault(),a.stopPropagation(),w.setState({dragNodeHighlight:!1}),n(a,Object(O.a)(w))},w.onExpand=function(a){var n=w.props,t=n.loading,p=n.context.onNodeExpand;if(t)return;p(a,Object(E.b)(w.props))},w.setSelectHandle=function(a){w.selectHandle=a},w.getNodeState=function(){var a=w.props.expanded;return w.isLeaf()?null:a?d:m},w.hasChildren=function(){var a=w.props.eventKey,n=w.props.context.keyEntities,t=Object(x.a)(n,a)||{},p=t.children;return!!(p||[]).length},w.isLeaf=function(){var a=w.props,n=a.isLeaf,t=a.loaded,p=w.props.context.loadData,_=w.hasChildren();return n===!1?!1:n||!p&&!_||p&&t&&!_},w.isDisabled=function(){var a=w.props.disabled,n=w.props.context.disabled;return!!(n||a)},w.isCheckable=function(){var a=w.props.checkable,n=w.props.context.checkable;return!n||a===!1?!1:n},w.syncLoadData=function(a){var n=a.expanded,t=a.loading,p=a.loaded,_=w.props.context,f=_.loadData,F=_.onNodeLoad;if(t)return;f&&n&&!w.isLeaf()&&(!w.hasChildren()&&!p&&F(Object(E.b)(w.props)))},w.isDraggable=function(){var a=w.props,n=a.data,t=a.context.draggable;return!!(t&&(!t.nodeDraggable||t.nodeDraggable(n)))},w.renderDragHandler=function(){var a=w.props.context,n=a.draggable,t=a.prefixCls;return(n==null?void 0:n.icon)?c.createElement("span",{className:"".concat(t,"-draggable-icon")},n.icon):null},w.renderSwitcherIconDom=function(a){var n=w.props.switcherIcon,t=w.props.context.switcherIcon,p=n||t;return typeof p=="function"?p(Object(Ee.a)(Object(Ee.a)({},w.props),{},{isLeaf:a})):p},w.renderSwitcher=function(){var a=w.props.expanded,n=w.props.context.prefixCls;if(w.isLeaf()){var t=w.renderSwitcherIconDom(!0);return t!==!1?c.createElement("span",{className:D()("".concat(n,"-switcher"),"".concat(n,"-switcher-noop"))},t):null}var p=D()("".concat(n,"-switcher"),"".concat(n,"-switcher_").concat(a?d:m)),_=w.renderSwitcherIconDom(!1);return _!==!1?c.createElement("span",{onClick:w.onExpand,className:p},_):null},w.renderCheckbox=function(){var a=w.props,n=a.checked,t=a.halfChecked,p=a.disableCheckbox,_=w.props.context.prefixCls,f=w.isDisabled(),F=w.isCheckable();if(!F)return null;var P=typeof F!="boolean"?F:null;return c.createElement("span",{className:D()("".concat(_,"-checkbox"),n&&"".concat(_,"-checkbox-checked"),!n&&t&&"".concat(_,"-checkbox-indeterminate"),(f||p)&&"".concat(_,"-checkbox-disabled")),onClick:w.onCheck},P)},w.renderIcon=function(){var a=w.props.loading,n=w.props.context.prefixCls;return c.createElement("span",{className:D()("".concat(n,"-iconEle"),"".concat(n,"-icon__").concat(w.getNodeState()||"docu"),a&&"".concat(n,"-icon_loading"))})},w.renderSelector=function(){var a=w.state.dragNodeHighlight,n=w.props,t=n.title,p=t===void 0?g:t,_=n.selected,f=n.icon,F=n.loading,P=n.data,W=w.props.context,V=W.prefixCls,J=W.showIcon,ne=W.icon,ce=W.loadData,ie=W.titleRender,xe=w.isDisabled(),ge="".concat(V,"-node-content-wrapper"),de;if(J){var Fe=f||ne;de=Fe?c.createElement("span",{className:D()("".concat(V,"-iconEle"),"".concat(V,"-icon__customize"))},typeof Fe=="function"?Fe(w.props):Fe):w.renderIcon()}else ce&&F&&(de=w.renderIcon());var Qe;typeof p=="function"?Qe=p(P):ie?Qe=ie(P):Qe=p;var Ve=c.createElement("span",{className:"".concat(V,"-title")},Qe);return c.createElement("span",{ref:w.setSelectHandle,title:typeof p=="string"?p:"",className:D()("".concat(ge),"".concat(ge,"-").concat(w.getNodeState()||"normal"),!xe&&(_||a)&&"".concat(V,"-node-selected")),onMouseEnter:w.onMouseEnter,onMouseLeave:w.onMouseLeave,onContextMenu:w.onContextMenu,onClick:w.onSelectorClick,onDoubleClick:w.onSelectorDoubleClick},de,Ve,w.renderDropIndicator())},w.renderDropIndicator=function(){var a=w.props,n=a.disabled,t=a.eventKey,p=w.props.context,_=p.draggable,f=p.dropLevelOffset,F=p.dropPosition,P=p.prefixCls,W=p.indent,V=p.dropIndicatorRender,J=p.dragOverNodeKey,ne=p.direction,ce=!!_,ie=!n&&ce&&J===t,xe=W!=null?W:w.cacheIndent;return w.cacheIndent=W,ie?V({dropPosition:F,dropLevelOffset:f,indent:xe,prefixCls:P,direction:ne}):null},w}return Object($.a)(T,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var y=this.props.selectable,o=this.props.context.selectable;return typeof y=="boolean"?y:o}},{key:"render",value:function(){var y,o=this.props,r=o.eventKey,a=o.className,n=o.style,t=o.dragOver,p=o.dragOverGapTop,_=o.dragOverGapBottom,f=o.isLeaf,F=o.isStart,P=o.isEnd,W=o.expanded,V=o.selected,J=o.checked,ne=o.halfChecked,ce=o.loading,ie=o.domRef,xe=o.active,ge=o.data,de=o.onMouseMove,Fe=o.selectable,Qe=Object(ve.a)(o,v),Ve=this.props.context,Ne=Ve.prefixCls,Ue=Ve.filterTreeNode,q=Ve.keyEntities,k=Ve.dropContainerKey,z=Ve.dropTargetKey,X=Ve.draggingNodeKey,re=this.isDisabled(),te=Object(N.a)(Qe,{aria:!0,data:!0}),ae=Object(x.a)(q,r)||{},ye=ae.level,Le=P[P.length-1],Pe=this.isDraggable(),ke=!re&&Pe,Je=X===r,qe=Fe!==void 0?{"aria-selected":!!Fe}:void 0;return c.createElement("div",Object(he.a)({ref:ie,className:D()(a,"".concat(Ne,"-treenode"),(y={},Object(be.a)(y,"".concat(Ne,"-treenode-disabled"),re),Object(be.a)(y,"".concat(Ne,"-treenode-switcher-").concat(W?"open":"close"),!f),Object(be.a)(y,"".concat(Ne,"-treenode-checkbox-checked"),J),Object(be.a)(y,"".concat(Ne,"-treenode-checkbox-indeterminate"),ne),Object(be.a)(y,"".concat(Ne,"-treenode-selected"),V),Object(be.a)(y,"".concat(Ne,"-treenode-loading"),ce),Object(be.a)(y,"".concat(Ne,"-treenode-active"),xe),Object(be.a)(y,"".concat(Ne,"-treenode-leaf-last"),Le),Object(be.a)(y,"".concat(Ne,"-treenode-draggable"),Pe),Object(be.a)(y,"dragging",Je),Object(be.a)(y,"drop-target",z===r),Object(be.a)(y,"drop-container",k===r),Object(be.a)(y,"drag-over",!re&&t),Object(be.a)(y,"drag-over-gap-top",!re&&p),Object(be.a)(y,"drag-over-gap-bottom",!re&&_),Object(be.a)(y,"filter-node",Ue&&Ue(Object(E.b)(this.props))),y)),style:n,draggable:ke,"aria-grabbed":Je,onDragStart:ke?this.onDragStart:void 0,onDragEnter:Pe?this.onDragEnter:void 0,onDragOver:Pe?this.onDragOver:void 0,onDragLeave:Pe?this.onDragLeave:void 0,onDrop:Pe?this.onDrop:void 0,onDragEnd:Pe?this.onDragEnd:void 0,onMouseMove:de},qe,te),c.createElement(h,{prefixCls:Ne,level:ye,isStart:F,isEnd:P}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),T}(c.Component),A=function(i){return c.createElement(l.a.Consumer,null,function(T){return c.createElement(S,Object(he.a)({},i,{context:T}))})};A.displayName="TreeNode",A.isTreeNode=1;var u=_e.a=A},"1HCi":function(dt,_e){dt.exports=function(he,be,ve,Ee){var ue=ve?ve.call(Ee,he,be):void 0;if(ue!==void 0)return!!ue;if(he===be)return!0;if(typeof he!="object"||!he||typeof be!="object"||!be)return!1;var $=Object.keys(he),O=Object.keys(be);if($.length!==O.length)return!1;for(var H=Object.prototype.hasOwnProperty.bind(be),e=0;e<$.length;e++){var M=$[e];if(!H(M))return!1;var D=he[M],N=be[M];if(ue=ve?ve.call(Ee,D,N,M):void 0,ue===!1||ue===void 0&&D!==N)return!1}return!0}},"24hK":function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return be});class he{constructor(ve){this.element=ve,this.next=he.Undefined,this.prev=he.Undefined}}he.Undefined=new he(void 0);class be{constructor(){this._first=he.Undefined,this._last=he.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===he.Undefined}clear(){let ve=this._first;for(;ve!==he.Undefined;){const Ee=ve.next;ve.prev=he.Undefined,ve.next=he.Undefined,ve=Ee}this._first=he.Undefined,this._last=he.Undefined,this._size=0}unshift(ve){return this._insert(ve,!1)}push(ve){return this._insert(ve,!0)}_insert(ve,Ee){const ue=new he(ve);if(this._first===he.Undefined)this._first=ue,this._last=ue;else if(Ee){const O=this._last;this._last=ue,ue.prev=O,O.next=ue}else{const O=this._first;this._first=ue,ue.next=O,O.prev=ue}this._size+=1;let $=!1;return()=>{$||($=!0,this._remove(ue))}}shift(){if(this._first===he.Undefined)return;{const ve=this._first.element;return this._remove(this._first),ve}}pop(){if(this._last===he.Undefined)return;{const ve=this._last.element;return this._remove(this._last),ve}}_remove(ve){if(ve.prev!==he.Undefined&&ve.next!==he.Undefined){const Ee=ve.prev;Ee.next=ve.next,ve.next.prev=Ee}else ve.prev===he.Undefined&&ve.next===he.Undefined?(this._first=he.Undefined,this._last=he.Undefined):ve.next===he.Undefined?(this._last=this._last.prev,this._last.next=he.Undefined):ve.prev===he.Undefined&&(this._first=this._first.next,this._first.prev=he.Undefined);this._size-=1}*[Symbol.iterator](){let ve=this._first;for(;ve!==he.Undefined;)yield ve.element,ve=ve.next}}},"3/fG":function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return be});function he(ve,Ee){let ue;return Ee.length===0?ue=ve:ue=ve.replace(/\{(\d+)\}/g,function($,O){const H=O[0];return typeof Ee[H]!="undefined"?Ee[H]:$}),ue}function be(ve,Ee,...ue){return he(Ee,ue)}},"3GYr":function(dt,_e,Q){"use strict";var he=Q("yuO0"),be=Q("T/Jt"),ve=Q("0lMV"),Ee=Q("x/L2"),ue=Q("Dpym"),$=Q("TqI3");function O(c){var l=c.className,s=c.index,h=c.children,x=c.colSpan,E=x===void 0?1:x,v=c.rowSpan,d=c.align,m=be.useContext(ue.a),g=m.prefixCls,S=m.direction,A=be.useContext(ve.a),u=A.scrollColumnIndex,R=A.stickyOffsets,i=A.flattenColumns,T=s+E-1,w=T+1===u?E+1:E,y=Object($.a)(s,s+w-1,i,R,S);return be.createElement(Ee.a,Object(he.a)({className:l,index:s,component:"td",prefixCls:g,record:null,dataIndex:null,align:d,colSpan:w,rowSpan:v,render:function(){return h}},y))}var H=Q("fNpE"),e=["children"];function M(c){var l=c.children,s=Object(H.a)(c,e);return be.createElement("tr",s,l)}function D(c){var l=c.children;return l}D.Row=M,D.Cell=O;var N=_e.a=D},"5Und":function(dt,_e,Q){"use strict";Q.d(_e,"b",function(){return ve}),Q.d(_e,"a",function(){return Ee}),Q.d(_e,"c",function(){return ue});var he="RC_TABLE_KEY";function be($){return $==null?[]:Array.isArray($)?$:[$]}function ve($,O){if(!O&&typeof O!="number")return $;for(var H=be(O),e=$,M=0;M<H.length;M+=1){if(!e)return null;var D=H[M];e=e[D]}return e}function Ee($){var O=[],H={};return $.forEach(function(e){for(var M=e||{},D=M.key,N=M.dataIndex,c=D||be(N).join("-")||he;H[c];)c="".concat(c,"_next");H[c]=!0,O.push(c)}),O}function ue($){return $!=null}},"5VLF":function(dt,_e,Q){"use strict";var he,be;function ve(Ee,ue,$){var O=function(H,e){return Ee.js_beautify(H,e)};return O.js=Ee.js_beautify,O.css=ue.css_beautify,O.html=$.html_beautify,O.js_beautify=Ee.js_beautify,O.css_beautify=ue.css_beautify,O.html_beautify=$.html_beautify,O}!(he=[Q("6UM0"),Q("TXwP"),Q("psGv")],be=function(Ee,ue,$){return ve(Ee,ue,$)}.apply(_e,he),be!==void 0&&(dt.exports=be))},"5Y4S":function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return ve});var he=Q("MNsG");const be=he.b.performance&&typeof he.b.performance.now=="function";class ve{constructor(Ee){this._highResolution=be&&Ee,this._startTime=this._now(),this._stopTime=-1}static create(Ee=!0){return new ve(Ee)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?he.b.performance.now():Date.now()}}},"6UM0":function(dt,_e,Q){var he,be;(function(){var ve;(function(){"use strict";var ue=[function(e,M,D){var N=D(1).Beautifier,c=D(5).Options;function l(s,h){var x=new N(s,h);return x.beautify()}e.exports=l,e.exports.defaultOptions=function(){return new c}},function(e,M,D){var N=D(2).Output,c=D(3).Token,l=D(4),s=D(5).Options,h=D(7).Tokenizer,x=D(7).line_starters,E=D(7).positionable_operators,v=D(7).TOKEN;function d(f,F){return F.indexOf(f)!==-1}function m(f){return f.replace(/^\s+/g,"")}function g(f){for(var F={},P=0;P<f.length;P++)F[f[P].replace(/-/g,"_")]=f[P];return F}function S(f,F){return f&&f.type===v.RESERVED&&f.text===F}function A(f,F){return f&&f.type===v.RESERVED&&d(f.text,F)}var u=["case","return","do","if","throw","else","await","break","continue","async"],R=["before-newline","after-newline","preserve-newline"],i=g(R),T=[i.before_newline,i.preserve_newline],w={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function y(f,F){if(F.multiline_frame||F.mode===w.ForInitializer||F.mode===w.Conditional)return;f.remove_indent(F.start_line_index)}function o(f){f=f.replace(l.allLineBreaks,`
|
|
`);for(var F=[],P=f.indexOf(`
|
|
`);P!==-1;)F.push(f.substring(0,P)),f=f.substring(P+1),P=f.indexOf(`
|
|
`);return f.length&&F.push(f),F}function r(f){return f===w.ArrayLiteral}function a(f){return d(f,[w.Expression,w.ForInitializer,w.Conditional])}function n(f,F){for(var P=0;P<f.length;P++){var W=f[P].trim();if(W.charAt(0)!==F)return!1}return!0}function t(f,F){for(var P=0,W=f.length,V;P<W;P++)if(V=f[P],V&&V.indexOf(F)!==0)return!1;return!0}function p(f,F){F=F||{},this._source_text=f||"",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 s(F)}p.prototype.create_flags=function(f,F){var P=0;f&&(P=f.indentation_level,!this._output.just_added_newline()&&f.line_indent_level>P&&(P=f.line_indent_level));var W={mode:F,parent:f,last_token:f?f.last_token:new c(v.START_BLOCK,""),last_word:f?f.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:P,alignment:0,line_indent_level:f?f.line_indent_level:P,start_line_index:this._output.get_line_number(),ternary_depth:0};return W},p.prototype._reset=function(f){var F=f.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new N(this._options,F),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(w.BlockStatement);var P=new h(f,this._options);return this._tokens=P.tokenize(),f},p.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var f,F=this._reset(this._source_text),P=this._options.eol;this._options.eol==="auto"&&(P=`
|
|
`,F&&l.lineBreak.test(F||"")&&(P=F.match(l.lineBreak)[0]));for(var W=this._tokens.next();W;)this.handle_token(W),this._last_last_text=this._flags.last_token.text,this._flags.last_token=W,W=this._tokens.next();return f=this._output.get_code(P),f},p.prototype.handle_token=function(f,F){f.type===v.START_EXPR?this.handle_start_expr(f):f.type===v.END_EXPR?this.handle_end_expr(f):f.type===v.START_BLOCK?this.handle_start_block(f):f.type===v.END_BLOCK?this.handle_end_block(f):f.type===v.WORD?this.handle_word(f):f.type===v.RESERVED?this.handle_word(f):f.type===v.SEMICOLON?this.handle_semicolon(f):f.type===v.STRING?this.handle_string(f):f.type===v.EQUALS?this.handle_equals(f):f.type===v.OPERATOR?this.handle_operator(f):f.type===v.COMMA?this.handle_comma(f):f.type===v.BLOCK_COMMENT?this.handle_block_comment(f,F):f.type===v.COMMENT?this.handle_comment(f,F):f.type===v.DOT?this.handle_dot(f):f.type===v.EOF?this.handle_eof(f):f.type===v.UNKNOWN?this.handle_unknown(f,F):this.handle_unknown(f,F)},p.prototype.handle_whitespace_and_comments=function(f,F){var P=f.newlines,W=this._options.keep_array_indentation&&r(this._flags.mode);if(f.comments_before)for(var V=f.comments_before.next();V;)this.handle_whitespace_and_comments(V,F),this.handle_token(V,F),V=f.comments_before.next();if(W)for(var J=0;J<P;J+=1)this.print_newline(J>0,F);else if(this._options.max_preserve_newlines&&P>this._options.max_preserve_newlines&&(P=this._options.max_preserve_newlines),this._options.preserve_newlines&&P>1){this.print_newline(!1,F);for(var ne=1;ne<P;ne+=1)this.print_newline(!0,F)}};var _=["async","break","continue","return","throw","yield"];p.prototype.allow_wrap_or_preserved_newline=function(f,F){if(F=F===void 0?!1:F,this._output.just_added_newline())return;var P=this._options.preserve_newlines&&f.newlines||F,W=d(this._flags.last_token.text,E)||d(f.text,E);if(W){var V=d(this._flags.last_token.text,E)&&d(this._options.operator_position,T)||d(f.text,E);P=P&&V}if(P)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(A(this._flags.last_token,_))return;this._output.set_wrap_point()}},p.prototype.print_newline=function(f,F){if(!F&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==v.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var P=this._tokens.peek();this._flags.mode===w.Statement&&!(this._flags.if_block&&S(P,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(f)&&(this._flags.multiline_frame=!0)},p.prototype.print_token_line_indentation=function(f){this._output.just_added_newline()&&(this._options.keep_array_indentation&&f.newlines&&(f.text==="["||r(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(f.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(f){if(this._output.raw){this._output.add_raw_token(f);return}if(this._options.comma_first&&f.previous&&f.previous.type===v.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var F=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(F),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(f),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(f),this._output.non_breaking_space=!0,this._output.add_token(f.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(f){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,f),this._flags=this.create_flags(this._previous_flags,f),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===w.Statement&&y(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===w.ObjectLiteral&&this._flags.mode===w.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||A(this._flags.last_token,["get","set"]))},p.prototype.start_of_statement=function(f){var F=!1;return F=F||A(this._flags.last_token,["var","let","const"])&&f.type===v.WORD,F=F||S(this._flags.last_token,"do"),F=F||!(this._flags.parent.mode===w.ObjectLiteral&&this._flags.mode===w.Statement)&&A(this._flags.last_token,_)&&!f.newlines,F=F||S(this._flags.last_token,"else")&&!(S(f,"if")&&!f.comments_before),F=F||this._flags.last_token.type===v.END_EXPR&&(this._previous_flags.mode===w.ForInitializer||this._previous_flags.mode===w.Conditional),F=F||this._flags.last_token.type===v.WORD&&this._flags.mode===w.BlockStatement&&!this._flags.in_case&&!(f.text==="--"||f.text==="++")&&this._last_last_text!=="function"&&f.type!==v.WORD&&f.type!==v.RESERVED,F=F||this._flags.mode===w.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||A(this._flags.last_token,["get","set"])),F?(this.set_mode(w.Statement),this.indent(),this.handle_whitespace_and_comments(f,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(f,A(f,["do","for","if","while"])),!0):!1},p.prototype.handle_start_expr=function(f){this.start_of_statement(f)||this.handle_whitespace_and_comments(f);var F=w.Expression;if(f.text==="["){if(this._flags.last_token.type===v.WORD||this._flags.last_token.text===")"){A(this._flags.last_token,x)&&(this._output.space_before_token=!0),this.print_token(f),this.set_mode(F),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}F=w.ArrayLiteral,r(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())),d(this._flags.last_token.type,[v.START_EXPR,v.END_EXPR,v.WORD,v.OPERATOR,v.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===v.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,F=w.ForInitializer):d(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,F=w.Conditional):d(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&f.whitespace_before===""?this._output.space_before_token=!1:(d(this._flags.last_token.text,x)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===v.EQUALS||this._flags.last_token.type===v.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(f);else if(this._flags.last_token.type===v.WORD){this._output.space_before_token=!1;var P=this._tokens.peek(-3);if(this._options.space_after_named_function&&P){var W=this._tokens.peek(-4);A(P,["async","function"])||P.text==="*"&&A(W,["async","function"])?this._output.space_before_token=!0:this._flags.mode===w.ObjectLiteral?(P.text==="{"||P.text===","||P.text==="*"&&(W.text==="{"||W.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(f);(this._flags.last_token.type===v.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(d(this._last_last_text,["function","yield"])||this._flags.mode===w.ObjectLiteral&&d(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===v.START_BLOCK?this.print_newline():(this._flags.last_token.type===v.END_EXPR||this._flags.last_token.type===v.START_EXPR||this._flags.last_token.type===v.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===v.COMMA)&&this.allow_wrap_or_preserved_newline(f,f.newlines),this.print_token(f),this.set_mode(F),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},p.prototype.handle_end_expr=function(f){for(;this._flags.mode===w.Statement;)this.restore_mode();this.handle_whitespace_and_comments(f),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(f,f.text==="]"&&r(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===v.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(f),this.restore_mode(),y(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===w.Conditional&&(this._previous_flags.mode=w.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},p.prototype.handle_start_block=function(f){this.handle_whitespace_and_comments(f);var F=this._tokens.peek(),P=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===v.END_EXPR?(this.set_mode(w.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(w.BlockStatement):P&&(d(P.text,[":",","])&&d(F.type,[v.STRING,v.WORD,v.RESERVED])||d(F.text,["get","set","..."])&&d(P.type,[v.WORD,v.RESERVED]))?d(this._last_last_text,["class","interface"])&&!d(P.text,[":",","])?this.set_mode(w.BlockStatement):this.set_mode(w.ObjectLiteral):this._flags.last_token.type===v.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(w.BlockStatement):d(this._flags.last_token.type,[v.EQUALS,v.START_EXPR,v.COMMA,v.OPERATOR])||A(this._flags.last_token,["return","throw","import","default"])?this.set_mode(w.ObjectLiteral):this.set_mode(w.BlockStatement),this._flags.last_token&&(A(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var W=!F.comments_before&&F.text==="}",V=W&&this._flags.last_word==="function"&&this._flags.last_token.type===v.END_EXPR;if(this._options.brace_preserve_inline){var J=0,ne=null;this._flags.inline_frame=!0;do if(J+=1,ne=this._tokens.peek(J-1),ne.newlines){this._flags.inline_frame=!1;break}while(ne.type!==v.EOF&&!(ne.type===v.END_BLOCK&&ne.opened===f))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&f.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==v.OPERATOR&&(V||this._flags.last_token.type===v.EQUALS||A(this._flags.last_token,u)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(r(this._previous_flags.mode)&&(this._flags.last_token.type===v.START_EXPR||this._flags.last_token.type===v.COMMA)&&((this._flags.last_token.type===v.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===v.COMMA||this._flags.last_token.type===v.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(f),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==v.OPERATOR&&this._flags.last_token.type!==v.START_EXPR&&(this._flags.last_token.type===v.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(f),this.indent(),!W&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},p.prototype.handle_end_block=function(f){for(this.handle_whitespace_and_comments(f);this._flags.mode===w.Statement;)this.restore_mode();var F=this._flags.last_token.type===v.START_BLOCK;this._flags.inline_frame&&!F?this._output.space_before_token=!0:this._options.brace_style==="expand"?F||this.print_newline():F||(r(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(f)},p.prototype.handle_word=function(f){if(f.type===v.RESERVED){if(d(f.text,["set","get"])&&this._flags.mode!==w.ObjectLiteral)f.type=v.WORD;else if(f.text==="import"&&d(this._tokens.peek().text,["(","."]))f.type=v.WORD;else if(d(f.text,["as","from"])&&!this._flags.import_block)f.type=v.WORD;else if(this._flags.mode===w.ObjectLiteral){var F=this._tokens.peek();F.text===":"&&(f.type=v.WORD)}}if(this.start_of_statement(f)?A(this._flags.last_token,["var","let","const"])&&f.type===v.WORD&&(this._flags.declaration_statement=!0):f.newlines&&!a(this._flags.mode)&&(this._flags.last_token.type!==v.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==v.EQUALS&&(this._options.preserve_newlines||!A(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(f),this.print_newline()):this.handle_whitespace_and_comments(f),this._flags.do_block&&!this._flags.do_while)if(S(f,"while")){this._output.space_before_token=!0,this.print_token(f),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&S(f,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===w.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&A(f,["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(f),this._flags.in_case=!0;return}if((this._flags.last_token.type===v.COMMA||this._flags.last_token.type===v.START_EXPR||this._flags.last_token.type===v.EQUALS||this._flags.last_token.type===v.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(f)),S(f,"function")){(d(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(d(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===v.OPERATOR))&&(!this._output.just_added_blankline()&&!f.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===v.RESERVED||this._flags.last_token.type===v.WORD?A(this._flags.last_token,["get","set","new","export"])||A(this._flags.last_token,_)?this._output.space_before_token=!0:S(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===v.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(a(this._flags.mode)||r(this._flags.mode))||this.print_newline(),this.print_token(f),this._flags.last_word=f.text;return}var P="NONE";if(this._flags.last_token.type===v.END_BLOCK?this._previous_flags.inline_frame?P="SPACE":A(f,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&f.newlines?P="NEWLINE":(P="SPACE",this._output.space_before_token=!0):P="NEWLINE":this._flags.last_token.type===v.SEMICOLON&&this._flags.mode===w.BlockStatement?P="NEWLINE":this._flags.last_token.type===v.SEMICOLON&&a(this._flags.mode)?P="SPACE":this._flags.last_token.type===v.STRING?P="NEWLINE":this._flags.last_token.type===v.RESERVED||this._flags.last_token.type===v.WORD||this._flags.last_token.text==="*"&&(d(this._last_last_text,["function","yield"])||this._flags.mode===w.ObjectLiteral&&d(this._last_last_text,["{",","]))?P="SPACE":this._flags.last_token.type===v.START_BLOCK?this._flags.inline_frame?P="SPACE":P="NEWLINE":this._flags.last_token.type===v.END_EXPR&&(this._output.space_before_token=!0,P="NEWLINE"),A(f,x)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?P="SPACE":P="NEWLINE"),A(f,["else","catch","finally"]))if((!(this._flags.last_token.type===v.END_BLOCK&&this._previous_flags.mode===w.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&f.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var W=this._output.current_line;W.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else P==="NEWLINE"?A(this._flags.last_token,u)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&A(f,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==v.END_EXPR?(this._flags.last_token.type!==v.START_EXPR||!A(f,["var","let","const"]))&&this._flags.last_token.text!==":"&&(S(f,"if")&&S(f.previous,"else")?this._output.space_before_token=!0:this.print_newline()):A(f,x)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&r(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():P==="SPACE"&&(this._output.space_before_token=!0);f.previous&&(f.previous.type===v.WORD||f.previous.type===v.RESERVED)&&(this._output.space_before_token=!0),this.print_token(f),this._flags.last_word=f.text,f.type===v.RESERVED&&(f.text==="do"?this._flags.do_block=!0:f.text==="if"?this._flags.if_block=!0:f.text==="import"?this._flags.import_block=!0:this._flags.import_block&&S(f,"from")&&(this._flags.import_block=!1))},p.prototype.handle_semicolon=function(f){this.start_of_statement(f)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(f);for(var F=this._tokens.peek();this._flags.mode===w.Statement&&!(this._flags.if_block&&S(F,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(f)},p.prototype.handle_string=function(f){f.text.startsWith("`")&&f.newlines===0&&f.whitespace_before===""&&(f.previous.text===")"||this._flags.last_token.type===v.WORD)||(this.start_of_statement(f)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(f),this._flags.last_token.type===v.RESERVED||this._flags.last_token.type===v.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===v.COMMA||this._flags.last_token.type===v.START_EXPR||this._flags.last_token.type===v.EQUALS||this._flags.last_token.type===v.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(f):f.text.startsWith("`")&&this._flags.last_token.type===v.END_EXPR&&(f.previous.text==="]"||f.previous.text===")")&&f.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(f)},p.prototype.handle_equals=function(f){this.start_of_statement(f)||this.handle_whitespace_and_comments(f),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(f),this._output.space_before_token=!0},p.prototype.handle_comma=function(f){this.handle_whitespace_and_comments(f,!0),this.print_token(f),this._output.space_before_token=!0,this._flags.declaration_statement?(a(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(f)):this._flags.mode===w.ObjectLiteral||this._flags.mode===w.Statement&&this._flags.parent.mode===w.ObjectLiteral?(this._flags.mode===w.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(f)},p.prototype.handle_operator=function(f){var F=f.text==="*"&&(A(this._flags.last_token,["function","yield"])||d(this._flags.last_token.type,[v.START_BLOCK,v.COMMA,v.END_BLOCK,v.SEMICOLON])),P=d(f.text,["-","+"])&&(d(this._flags.last_token.type,[v.START_BLOCK,v.START_EXPR,v.EQUALS,v.OPERATOR])||d(this._flags.last_token.text,x)||this._flags.last_token.text===",");if(!this.start_of_statement(f)){var W=!F;this.handle_whitespace_and_comments(f,W)}if(f.text==="*"&&this._flags.last_token.type===v.DOT){this.print_token(f);return}if(f.text==="::"){this.print_token(f);return}if(this._flags.last_token.type===v.OPERATOR&&d(this._options.operator_position,T)&&this.allow_wrap_or_preserved_newline(f),f.text===":"&&this._flags.in_case){this.print_token(f),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==v.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 V=!0,J=!0,ne=!1;if(f.text===":"?this._flags.ternary_depth===0?V=!1:(this._flags.ternary_depth-=1,ne=!0):f.text==="?"&&(this._flags.ternary_depth+=1),!P&&!F&&this._options.preserve_newlines&&d(f.text,E)){var ce=f.text===":",ie=ce&&ne,xe=ce&&!ne;switch(this._options.operator_position){case i.before_newline:this._output.space_before_token=!xe,this.print_token(f),(!ce||ie)&&this.allow_wrap_or_preserved_newline(f),this._output.space_before_token=!0;return;case i.after_newline:this._output.space_before_token=!0,!ce||ie?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(f):this._output.space_before_token=!1,this.print_token(f),this._output.space_before_token=!0;return;case i.preserve_newline:xe||this.allow_wrap_or_preserved_newline(f),V=!(this._output.just_added_newline()||xe),this._output.space_before_token=V,this.print_token(f),this._output.space_before_token=!0;return}}if(F){this.allow_wrap_or_preserved_newline(f),V=!1;var ge=this._tokens.peek();J=ge&&d(ge.type,[v.WORD,v.RESERVED])}else if(f.text==="...")this.allow_wrap_or_preserved_newline(f),V=this._flags.last_token.type===v.START_BLOCK,J=!1;else if(d(f.text,["--","++","!","~"])||P){if((this._flags.last_token.type===v.COMMA||this._flags.last_token.type===v.START_EXPR)&&this.allow_wrap_or_preserved_newline(f),V=!1,J=!1,f.newlines&&(f.text==="--"||f.text==="++"||f.text==="~")){var de=A(this._flags.last_token,u)&&f.newlines;de&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(de,!0)}this._flags.last_token.text===";"&&a(this._flags.mode)&&(V=!0),this._flags.last_token.type===v.RESERVED?V=!0:this._flags.last_token.type===v.END_EXPR?V=!(this._flags.last_token.text==="]"&&(f.text==="--"||f.text==="++")):this._flags.last_token.type===v.OPERATOR&&(V=d(f.text,["--","-","++","+"])&&d(this._flags.last_token.text,["--","-","++","+"]),d(f.text,["+","-"])&&d(this._flags.last_token.text,["--","++"])&&(J=!0)),(this._flags.mode===w.BlockStatement&&!this._flags.inline_frame||this._flags.mode===w.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||V,this.print_token(f),this._output.space_before_token=J},p.prototype.handle_block_comment=function(f,F){if(this._output.raw){this._output.add_raw_token(f),f.directives&&f.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(f.directives){this.print_newline(!1,F),this.print_token(f),f.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!l.newline.test(f.text)&&!f.newlines){this._output.space_before_token=!0,this.print_token(f),this._output.space_before_token=!0;return}else this.print_block_commment(f,F)},p.prototype.print_block_commment=function(f,F){var P=o(f.text),W,V=!1,J=!1,ne=f.whitespace_before,ce=ne.length;if(this.print_newline(!1,F),this.print_token_line_indentation(f),this._output.add_token(P[0]),this.print_newline(!1,F),P.length>1){for(P=P.slice(1),V=n(P,"*"),J=t(P,ne),V&&(this._flags.alignment=1),W=0;W<P.length;W++)V?(this.print_token_line_indentation(f),this._output.add_token(m(P[W]))):J&&P[W]?(this.print_token_line_indentation(f),this._output.add_token(P[W].substring(ce))):(this._output.current_line.set_indent(-1),this._output.add_token(P[W])),this.print_newline(!1,F);this._flags.alignment=0}},p.prototype.handle_comment=function(f,F){f.newlines?this.print_newline(!1,F):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(f),this.print_newline(!1,F)},p.prototype.handle_dot=function(f){this.start_of_statement(f)||this.handle_whitespace_and_comments(f,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),A(this._flags.last_token,u)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(f,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(f)},p.prototype.handle_unknown=function(f,F){this.print_token(f),f.text[f.text.length-1]===`
|
|
`&&this.print_newline(!1,F)},p.prototype.handle_eof=function(f){for(;this._flags.mode===w.Statement;)this.restore_mode();this.handle_whitespace_and_comments(f)},e.exports.Beautifier=p},function(e){function M(c){this.__parent=c,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=[]}M.prototype.clone_empty=function(){var c=new M(this.__parent);return c.set_indent(this.__indent_count,this.__alignment_count),c},M.prototype.item=function(c){return c<0?this.__items[this.__items.length+c]:this.__items[c]},M.prototype.has_match=function(c){for(var l=this.__items.length-1;l>=0;l--)if(this.__items[l].match(c))return!0;return!1},M.prototype.set_indent=function(c,l){this.is_empty()&&(this.__indent_count=c||0,this.__alignment_count=l||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},M.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)},M.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},M.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var c=this.__parent.current_line;return c.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),c.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),c.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,c.__items[0]===" "&&(c.__items.splice(0,1),c.__character_count-=1),!0}return!1},M.prototype.is_empty=function(){return this.__items.length===0},M.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},M.prototype.push=function(c){this.__items.push(c);var l=c.lastIndexOf(`
|
|
`);l!==-1?this.__character_count=c.length-l:this.__character_count+=c.length},M.prototype.pop=function(){var c=null;return this.is_empty()||(c=this.__items.pop(),this.__character_count-=c.length),c},M.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},M.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},M.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},M.prototype.toString=function(){var c="";return this.is_empty()?this.__parent.indent_empty_lines&&(c=this.__parent.get_indent_string(this.__indent_count)):(c=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),c+=this.__items.join("")),c};function D(c,l){this.__cache=[""],this.__indent_size=c.indent_size,this.__indent_string=c.indent_char,c.indent_with_tabs||(this.__indent_string=new Array(c.indent_size+1).join(c.indent_char)),l=l||"",c.indent_level>0&&(l=new Array(c.indent_level+1).join(this.__indent_string)),this.__base_string=l,this.__base_string_length=l.length}D.prototype.get_indent_size=function(c,l){var s=this.__base_string_length;return l=l||0,c<0&&(s=0),s+=c*this.__indent_size,s+=l,s},D.prototype.get_indent_string=function(c,l){var s=this.__base_string;return l=l||0,c<0&&(c=0,s=""),l+=c*this.__indent_size,this.__ensure_cache(l),s+=this.__cache[l],s},D.prototype.__ensure_cache=function(c){for(;c>=this.__cache.length;)this.__add_column()},D.prototype.__add_column=function(){var c=this.__cache.length,l=0,s="";this.__indent_size&&c>=this.__indent_size&&(l=Math.floor(c/this.__indent_size),c-=l*this.__indent_size,s=new Array(l+1).join(this.__indent_string)),c&&(s+=new Array(c+1).join(" ")),this.__cache.push(s)};function N(c,l){this.__indent_cache=new D(c,l),this.raw=!1,this._end_with_newline=c.end_with_newline,this.indent_size=c.indent_size,this.wrap_line_length=c.wrap_line_length,this.indent_empty_lines=c.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new M(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}N.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},N.prototype.get_line_number=function(){return this.__lines.length},N.prototype.get_indent_string=function(c,l){return this.__indent_cache.get_indent_string(c,l)},N.prototype.get_indent_size=function(c,l){return this.__indent_cache.get_indent_size(c,l)},N.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},N.prototype.add_new_line=function(c){return this.is_empty()||!c&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},N.prototype.get_code=function(c){this.trim(!0);var l=this.current_line.pop();l&&(l[l.length-1]===`
|
|
`&&(l=l.replace(/\n+$/g,"")),this.current_line.push(l)),this._end_with_newline&&this.__add_outputline();var s=this.__lines.join(`
|
|
`);return c!==`
|
|
`&&(s=s.replace(/[\n]/g,c)),s},N.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},N.prototype.set_indent=function(c,l){return c=c||0,l=l||0,this.next_line.set_indent(c,l),this.__lines.length>1?(this.current_line.set_indent(c,l),!0):(this.current_line.set_indent(),!1)},N.prototype.add_raw_token=function(c){for(var l=0;l<c.newlines;l++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(c.whitespace_before),this.current_line.push(c.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},N.prototype.add_token=function(c){this.__add_space_before_token(),this.current_line.push(c),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},N.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(" "))},N.prototype.remove_indent=function(c){for(var l=this.__lines.length;c<l;)this.__lines[c]._remove_indent(),c++;this.current_line._remove_wrap_indent()},N.prototype.trim=function(c){for(c=c===void 0?!1:c,this.current_line.trim();c&&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},N.prototype.just_added_newline=function(){return this.current_line.is_empty()},N.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},N.prototype.ensure_empty_line_above=function(c,l){for(var s=this.__lines.length-2;s>=0;){var h=this.__lines[s];if(h.is_empty())break;if(h.item(0).indexOf(c)!==0&&h.item(-1)!==l){this.__lines.splice(s+1,0,new M(this)),this.previous_line=this.__lines[this.__lines.length-2];break}s--}},e.exports.Output=N},function(e){function M(D,N,c,l){this.type=D,this.text=N,this.comments_before=null,this.newlines=c||0,this.whitespace_before=l||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}e.exports.Token=M},function(e,M){var D="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",N="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",c="\\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",l="\\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",s="(?:\\\\u[0-9a-fA-F]{4}|["+D+c+"])",h="(?:\\\\u[0-9a-fA-F]{4}|["+N+c+l+"])*";M.identifier=new RegExp(s+h,"g"),M.identifierStart=new RegExp(s),M.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+N+c+l+"])+");var x=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;M.newline=/[\n\r\u2028\u2029]/,M.lineBreak=new RegExp(`\r
|
|
|`+M.newline.source),M.allLineBreaks=new RegExp(M.lineBreak.source,"g")},function(e,M,D){var N=D(6).Options,c=["before-newline","after-newline","preserve-newline"];function l(s){N.call(this,s,"js");var h=this.raw_options.brace_style||null;h==="expand-strict"?this.raw_options.brace_style="expand":h==="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 x=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var E=0;E<x.length;E++)x[E]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=x[E];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",c),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}l.prototype=new N,e.exports.Options=l},function(e){function M(c,l){this.raw_options=D(c,l),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"])}M.prototype._get_array=function(c,l){var s=this.raw_options[c],h=l||[];return typeof s=="object"?s!==null&&typeof s.concat=="function"&&(h=s.concat()):typeof s=="string"&&(h=s.split(/[^a-zA-Z0-9_\/\-]+/)),h},M.prototype._get_boolean=function(c,l){var s=this.raw_options[c],h=s===void 0?!!l:!!s;return h},M.prototype._get_characters=function(c,l){var s=this.raw_options[c],h=l||"";return typeof s=="string"&&(h=s.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),h},M.prototype._get_number=function(c,l){var s=this.raw_options[c];l=parseInt(l,10),isNaN(l)&&(l=0);var h=parseInt(s,10);return isNaN(h)&&(h=l),h},M.prototype._get_selection=function(c,l,s){var h=this._get_selection_list(c,l,s);if(h.length!==1)throw new Error("Invalid Option Value: The option '"+c+`' can only be one of the following values:
|
|
`+l+`
|
|
You passed in: '`+this.raw_options[c]+"'");return h[0]},M.prototype._get_selection_list=function(c,l,s){if(!l||l.length===0)throw new Error("Selection list cannot be empty.");if(s=s||[l[0]],!this._is_valid_selection(s,l))throw new Error("Invalid Default Value!");var h=this._get_array(c,s);if(!this._is_valid_selection(h,l))throw new Error("Invalid Option Value: The option '"+c+`' can contain only the following values:
|
|
`+l+`
|
|
You passed in: '`+this.raw_options[c]+"'");return h},M.prototype._is_valid_selection=function(c,l){return c.length&&l.length&&!c.some(function(s){return l.indexOf(s)===-1})};function D(c,l){var s={};c=N(c);var h;for(h in c)h!==l&&(s[h]=c[h]);if(l&&c[l])for(h in c[l])s[h]=c[l][h];return s}function N(c){var l={},s;for(s in c){var h=s.replace(/-/g,"_");l[h]=c[s]}return l}e.exports.Options=M,e.exports.normalizeOpts=N,e.exports.mergeOpts=D},function(e,M,D){var N=D(8).InputScanner,c=D(9).Tokenizer,l=D(9).TOKEN,s=D(13).Directives,h=D(4),x=D(12).Pattern,E=D(14).TemplatablePattern;function v(n,t){return t.indexOf(n)!==-1}var d={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:l.START,RAW:l.RAW,EOF:l.EOF},m=new s(/\/\*/,/\*\//),g=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,S=/[0-9]/,A=/[^\d\.]/,u=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),R=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";R=R.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),R="\\?\\.(?!\\d) "+R,R=R.replace(/ /g,"|");var i=new RegExp(R),T="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),w=T.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),y=new RegExp("^(?:"+w.join("|")+")$"),o,r=function(n,t){c.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 x(this._input),_=new E(this._input).read_options(this._options);this.__patterns={template:_,identifier:_.starting_with(h.identifier).matching(h.identifierMatch),number:p.matching(g),punct:p.matching(i),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(h.lineBreak),shebang:p.starting_with(/#!/).until_after(h.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:_.until(/['\\\n\r\u2028\u2029]/),double_quote:_.until(/["\\\n\r\u2028\u2029]/),template_text:_.until(/[`\\$]/),template_expression:_.until(/[`}\\]/)}};r.prototype=new c,r.prototype._is_comment=function(n){return n.type===d.COMMENT||n.type===d.BLOCK_COMMENT||n.type===d.UNKNOWN},r.prototype._is_opening=function(n){return n.type===d.START_BLOCK||n.type===d.START_EXPR},r.prototype._is_closing=function(n,t){return(n.type===d.END_BLOCK||n.type===d.END_EXPR)&&t&&(n.text==="]"&&t.text==="["||n.text===")"&&t.text==="("||n.text==="}"&&t.text==="{")},r.prototype._reset=function(){o=!1},r.prototype._get_next_token=function(n,t){var p=null;this._readWhitespace();var _=this._input.peek();return _===null?this._create_token(d.EOF,""):(p=p||this._read_non_javascript(_),p=p||this._read_string(_),p=p||this._read_word(n),p=p||this._read_singles(_),p=p||this._read_comment(_),p=p||this._read_regexp(_,n),p=p||this._read_xml(_,n),p=p||this._read_punctuation(),p=p||this._create_token(d.UNKNOWN,this._input.next()),p)},r.prototype._read_word=function(n){var t;if(t=this.__patterns.identifier.read(),t!=="")return t=t.replace(h.allLineBreaks,`
|
|
`),!(n.type===d.DOT||n.type===d.RESERVED&&(n.text==="set"||n.text==="get"))&&y.test(t)?(t==="in"||t==="of")&&(n.type===d.WORD||n.type===d.STRING)?this._create_token(d.OPERATOR,t):this._create_token(d.RESERVED,t):this._create_token(d.WORD,t);if(t=this.__patterns.number.read(),t!=="")return this._create_token(d.WORD,t)},r.prototype._read_singles=function(n){var t=null;return n==="("||n==="["?t=this._create_token(d.START_EXPR,n):n===")"||n==="]"?t=this._create_token(d.END_EXPR,n):n==="{"?t=this._create_token(d.START_BLOCK,n):n==="}"?t=this._create_token(d.END_BLOCK,n):n===";"?t=this._create_token(d.SEMICOLON,n):n==="."&&A.test(this._input.peek(1))?t=this._create_token(d.DOT,n):n===","&&(t=this._create_token(d.COMMA,n)),t&&this._input.next(),t},r.prototype._read_punctuation=function(){var n=this.__patterns.punct.read();if(n!=="")return n==="="?this._create_token(d.EQUALS,n):n==="?."?this._create_token(d.DOT,n):this._create_token(d.OPERATOR,n)},r.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(d.UNKNOWN,t.trim()+`
|
|
`);if(t=this.__patterns.include.read(),t)return this._create_token(d.UNKNOWN,t.trim()+`
|
|
`);n=this._input.next();var p="#";if(this._input.hasNext()&&this._input.testChar(S)){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(d.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(h.newline);)t+=this._input.next();return o=!0,this._create_token(d.COMMENT,t)}}else if(o&&n==="-"&&(t=this.__patterns.html_comment_end.read(),t))return o=!1,this._create_token(d.COMMENT,t);return null},r.prototype._read_comment=function(n){var t=null;if(n==="/"){var p="";if(this._input.peek(1)==="*"){p=this.__patterns.block_comment.read();var _=m.get_directives(p);_&&_.ignore==="start"&&(p+=m.readIgnored(this._input)),p=p.replace(h.allLineBreaks,`
|
|
`),t=this._create_token(d.BLOCK_COMMENT,p),t.directives=_}else this._input.peek(1)==="/"&&(p=this.__patterns.comment.read(),t=this._create_token(d.COMMENT,p))}return t},r.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=a(t)),this._input.peek()===n&&(t+=this._input.next()),t=t.replace(h.allLineBreaks,`
|
|
`),this._create_token(d.STRING,t)}return null},r.prototype._allow_regexp_or_xml=function(n){return n.type===d.RESERVED&&v(n.text,["return","case","throw","else","do","typeof","yield"])||n.type===d.END_EXPR&&n.text===")"&&n.opened.previous.type===d.RESERVED&&v(n.opened.previous.text,["if","while","for"])||v(n.type,[d.COMMENT,d.START_EXPR,d.START_BLOCK,d.START,d.END_BLOCK,d.OPERATOR,d.EQUALS,d.EOF,d.SEMICOLON,d.COMMA])},r.prototype._read_regexp=function(n,t){if(n==="/"&&this._allow_regexp_or_xml(t)){for(var p=this._input.next(),_=!1,f=!1;this._input.hasNext()&&(_||f||this._input.peek()!==n)&&!this._input.testChar(h.newline);)p+=this._input.peek(),_?_=!1:(_=this._input.peek()==="\\",this._input.peek()==="["?f=!0:this._input.peek()==="]"&&(f=!1)),this._input.next();return this._input.peek()===n&&(p+=this._input.next(),p+=this._input.read(h.identifier)),this._create_token(d.STRING,p)}return null},r.prototype._read_xml=function(n,t){if(this._options.e4x&&n==="<"&&this._allow_regexp_or_xml(t)){var p="",_=this.__patterns.xml.read_match();if(_){for(var f=_[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),F=f.indexOf("{")===0,P=0;_;){var W=!!_[1],V=_[2],J=!!_[_.length-1]||V.slice(0,8)==="![CDATA[";if(!J&&(V===f||F&&V.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(W?--P:++P),p+=_[0],P<=0)break;_=this.__patterns.xml.read_match()}return _||(p+=this._input.match(/[\s\S]*/g)[0]),p=p.replace(h.allLineBreaks,`
|
|
`),this._create_token(d.STRING,p)}}return null};function a(n){for(var t="",p=0,_=new N(n),f=null;_.hasNext();)if(f=_.match(/([\s]|[^\\]|\\\\)+/g),f&&(t+=f[0]),_.peek()==="\\"){if(_.next(),_.peek()==="x")f=_.match(/x([0-9A-Fa-f]{2})/g);else if(_.peek()==="u")f=_.match(/u([0-9A-Fa-f]{4})/g);else{t+="\\",_.hasNext()&&(t+=_.next());continue}if(!f)return n;if(p=parseInt(f[1],16),p>126&&p<=255&&f[0].indexOf("x")===0)return n;if(p>=0&&p<32){t+="\\"+f[0];continue}else p===34||p===39||p===92?t+="\\"+String.fromCharCode(p):t+=String.fromCharCode(p)}return t}r.prototype._read_string_recursive=function(n,t,p){var _,f;n==="'"?f=this.__patterns.single_quote:n==='"'?f=this.__patterns.double_quote:n==="`"?f=this.__patterns.template_text:n==="}"&&(f=this.__patterns.template_expression);for(var F=f.read(),P="";this._input.hasNext();){if(P=this._input.next(),P===n||!t&&h.newline.test(P)){this._input.back();break}else P==="\\"&&this._input.hasNext()?(_=this._input.peek(),_==="x"||_==="u"?this.has_char_escapes=!0:_==="\r"&&this._input.peek(1)===`
|
|
`&&this._input.next(),P+=this._input.next()):p&&(p==="${"&&P==="$"&&this._input.peek()==="{"&&(P+=this._input.next()),p===P&&(n==="`"?P+=this._read_string_recursive("}",t,"`"):P+=this._read_string_recursive("`",t,"${"),this._input.hasNext()&&(P+=this._input.next())));P+=f.read(),F+=P}return F},e.exports.Tokenizer=r,e.exports.TOKEN=d,e.exports.positionable_operators=u.slice(),e.exports.line_starters=T.slice()},function(e){var M=RegExp.prototype.hasOwnProperty("sticky");function D(N){this.__input=N||"",this.__input_length=this.__input.length,this.__position=0}D.prototype.restart=function(){this.__position=0},D.prototype.back=function(){this.__position>0&&(this.__position-=1)},D.prototype.hasNext=function(){return this.__position<this.__input_length},D.prototype.next=function(){var N=null;return this.hasNext()&&(N=this.__input.charAt(this.__position),this.__position+=1),N},D.prototype.peek=function(N){var c=null;return N=N||0,N+=this.__position,N>=0&&N<this.__input_length&&(c=this.__input.charAt(N)),c},D.prototype.__match=function(N,c){N.lastIndex=c;var l=N.exec(this.__input);return l&&!(M&&N.sticky)&&(l.index!==c&&(l=null)),l},D.prototype.test=function(N,c){return c=c||0,c+=this.__position,c>=0&&c<this.__input_length?!!this.__match(N,c):!1},D.prototype.testChar=function(N,c){var l=this.peek(c);return N.lastIndex=0,l!==null&&N.test(l)},D.prototype.match=function(N){var c=this.__match(N,this.__position);return c?this.__position+=c[0].length:c=null,c},D.prototype.read=function(N,c,l){var s="",h;return N&&(h=this.match(N),h&&(s+=h[0])),c&&(h||!N)&&(s+=this.readUntil(c,l)),s},D.prototype.readUntil=function(N,c){var l="",s=this.__position;N.lastIndex=this.__position;var h=N.exec(this.__input);return h?(s=h.index,c&&(s+=h[0].length)):s=this.__input_length,l=this.__input.substring(this.__position,s),this.__position=s,l},D.prototype.readUntilAfter=function(N){return this.readUntil(N,!0)},D.prototype.get_regexp=function(N,c){var l=null,s="g";return c&&M&&(s="y"),typeof N=="string"&&N!==""?l=new RegExp(N,s):N&&(l=new RegExp(N.source,s)),l},D.prototype.get_literal_regexp=function(N){return RegExp(N.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},D.prototype.peekUntilAfter=function(N){var c=this.__position,l=this.readUntilAfter(N);return this.__position=c,l},D.prototype.lookBack=function(N){var c=this.__position-1;return c>=N.length&&this.__input.substring(c-N.length,c).toLowerCase()===N},e.exports.InputScanner=D},function(e,M,D){var N=D(8).InputScanner,c=D(3).Token,l=D(10).TokenStream,s=D(11).WhitespacePattern,h={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},x=function(E,v){this._input=new N(E),this._options=v||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new s(this._input)};x.prototype.tokenize=function(){this._input.restart(),this.__tokens=new l,this._reset();for(var E,v=new c(h.START,""),d=null,m=[],g=new l;v.type!==h.EOF;){for(E=this._get_next_token(v,d);this._is_comment(E);)g.add(E),E=this._get_next_token(v,d);g.isEmpty()||(E.comments_before=g,g=new l),E.parent=d,this._is_opening(E)?(m.push(d),d=E):d&&this._is_closing(E,d)&&(E.opened=d,d.closed=E,d=m.pop(),E.parent=d),E.previous=v,v.next=E,this.__tokens.add(E),v=E}return this.__tokens},x.prototype._is_first_token=function(){return this.__tokens.isEmpty()},x.prototype._reset=function(){},x.prototype._get_next_token=function(E,v){this._readWhitespace();var d=this._input.read(/.+/g);return d?this._create_token(h.RAW,d):this._create_token(h.EOF,"")},x.prototype._is_comment=function(E){return!1},x.prototype._is_opening=function(E){return!1},x.prototype._is_closing=function(E,v){return!1},x.prototype._create_token=function(E,v){var d=new c(E,v,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return d},x.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},e.exports.Tokenizer=x,e.exports.TOKEN=h},function(e){function M(D){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=D}M.prototype.restart=function(){this.__position=0},M.prototype.isEmpty=function(){return this.__tokens_length===0},M.prototype.hasNext=function(){return this.__position<this.__tokens_length},M.prototype.next=function(){var D=null;return this.hasNext()&&(D=this.__tokens[this.__position],this.__position+=1),D},M.prototype.peek=function(D){var N=null;return D=D||0,D+=this.__position,D>=0&&D<this.__tokens_length&&(N=this.__tokens[D]),N},M.prototype.add=function(D){this.__parent_token&&(D.parent=this.__parent_token),this.__tokens.push(D),this.__tokens_length+=1},e.exports.TokenStream=M},function(e,M,D){var N=D(12).Pattern;function c(l,s){N.call(this,l,s),s?this._line_regexp=this._input.get_regexp(s._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}c.prototype=new N,c.prototype.__set_whitespace_patterns=function(l,s){l+="\\t ",s+="\\n\\r",this._match_pattern=this._input.get_regexp("["+l+s+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+s+"]")},c.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var l=this._input.read(this._match_pattern);if(l===" ")this.whitespace_before_token=" ";else if(l){var s=this.__split(this._newline_regexp,l);this.newline_count=s.length-1,this.whitespace_before_token=s[this.newline_count]}return l},c.prototype.matching=function(l,s){var h=this._create();return h.__set_whitespace_patterns(l,s),h._update(),h},c.prototype._create=function(){return new c(this._input,this)},c.prototype.__split=function(l,s){l.lastIndex=0;for(var h=0,x=[],E=l.exec(s);E;)x.push(s.substring(h,E.index)),h=E.index+E[0].length,E=l.exec(s);return h<s.length?x.push(s.substring(h,s.length)):x.push(""),x},e.exports.WhitespacePattern=c},function(e){function M(D,N){this._input=D,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,N&&(this._starting_pattern=this._input.get_regexp(N._starting_pattern,!0),this._match_pattern=this._input.get_regexp(N._match_pattern,!0),this._until_pattern=this._input.get_regexp(N._until_pattern),this._until_after=N._until_after)}M.prototype.read=function(){var D=this._input.read(this._starting_pattern);return(!this._starting_pattern||D)&&(D+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),D},M.prototype.read_match=function(){return this._input.match(this._match_pattern)},M.prototype.until_after=function(D){var N=this._create();return N._until_after=!0,N._until_pattern=this._input.get_regexp(D),N._update(),N},M.prototype.until=function(D){var N=this._create();return N._until_after=!1,N._until_pattern=this._input.get_regexp(D),N._update(),N},M.prototype.starting_with=function(D){var N=this._create();return N._starting_pattern=this._input.get_regexp(D,!0),N._update(),N},M.prototype.matching=function(D){var N=this._create();return N._match_pattern=this._input.get_regexp(D,!0),N._update(),N},M.prototype._create=function(){return new M(this._input,this)},M.prototype._update=function(){},e.exports.Pattern=M},function(e){function M(D,N){D=typeof D=="string"?D:D.source,N=typeof N=="string"?N:N.source,this.__directives_block_pattern=new RegExp(D+/ beautify( \w+[:]\w+)+ /.source+N,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(D+/\sbeautify\signore:end\s/.source+N,"g")}M.prototype.get_directives=function(D){if(!D.match(this.__directives_block_pattern))return null;var N={};this.__directive_pattern.lastIndex=0;for(var c=this.__directive_pattern.exec(D);c;)N[c[1]]=c[2],c=this.__directive_pattern.exec(D);return N},M.prototype.readIgnored=function(D){return D.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=M},function(e,M,D){var N=D(12).Pattern,c={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function l(s,h){N.call(this,s,h),this.__template_pattern=null,this._disabled=Object.assign({},c),this._excluded=Object.assign({},c),h&&(this.__template_pattern=this._input.get_regexp(h.__template_pattern),this._excluded=Object.assign(this._excluded,h._excluded),this._disabled=Object.assign(this._disabled,h._disabled));var x=new N(s);this.__patterns={handlebars_comment:x.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:x.starting_with(/{{{/).until_after(/}}}/),handlebars:x.starting_with(/{{/).until_after(/}}/),php:x.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:x.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:x.starting_with(/{%/).until_after(/%}/),django_value:x.starting_with(/{{/).until_after(/}}/),django_comment:x.starting_with(/{#/).until_after(/#}/),smarty:x.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:x.starting_with(/{\*/).until_after(/\*}/),smarty_literal:x.starting_with(/{literal}/).until_after(/{\/literal}/)}}l.prototype=new N,l.prototype._create=function(){return new l(this._input,this)},l.prototype._update=function(){this.__set_templated_pattern()},l.prototype.disable=function(s){var h=this._create();return h._disabled[s]=!0,h._update(),h},l.prototype.read_options=function(s){var h=this._create();for(var x in c)h._disabled[x]=s.templating.indexOf(x)===-1;return h._update(),h},l.prototype.exclude=function(s){var h=this._create();return h._excluded[s]=!0,h._update(),h},l.prototype.read=function(){var s="";this._match_pattern?s=this._input.read(this._starting_pattern):s=this._input.read(this._starting_pattern,this.__template_pattern);for(var h=this._read_template();h;)this._match_pattern?h+=this._input.read(this._match_pattern):h+=this._input.readUntil(this.__template_pattern),s+=h,h=this._read_template();return this._until_after&&(s+=this._input.readUntilAfter(this._until_pattern)),s},l.prototype.__set_templated_pattern=function(){var s=[];this._disabled.php||s.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||s.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||s.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(s.push(this.__patterns.django._starting_pattern.source),s.push(this.__patterns.django_value._starting_pattern.source),s.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||s.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&s.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+s.join("|")+")")},l.prototype._read_template=function(){var s="",h=this._input.peek();if(h==="<"){var x=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&x==="?"&&(s=s||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&x==="%"&&(s=s||this.__patterns.erb.read())}else h==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(s=s||this.__patterns.handlebars_comment.read(),s=s||this.__patterns.handlebars_unescaped.read(),s=s||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(s=s||this.__patterns.django_value.read()),this._excluded.django||(s=s||this.__patterns.django_comment.read(),s=s||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(s=s||this.__patterns.smarty_comment.read(),s=s||this.__patterns.smarty_literal.read(),s=s||this.__patterns.smarty.read()));return s},e.exports.TemplatablePattern=l}],$={};function O(e){var M=$[e];if(M!==void 0)return M.exports;var D=$[e]={exports:{}};return ue[e](D,D.exports,O),D.exports}var H=O(0);ve=H})();var Ee=ve;!(he=[],be=function(){return{js_beautify:Ee}}.apply(_e,he),be!==void 0&&(dt.exports=be))})()},"746U":function(dt,_e,Q){"use strict";Q.d(_e,"f",function(){return he}),Q.d(_e,"l",function(){return be}),Q.d(_e,"k",function(){return ve}),Q.d(_e,"j",function(){return Ee}),Q.d(_e,"g",function(){return ue}),Q.d(_e,"m",function(){return $}),Q.d(_e,"h",function(){return O}),Q.d(_e,"n",function(){return H}),Q.d(_e,"c",function(){return e}),Q.d(_e,"a",function(){return M}),Q.d(_e,"i",function(){return D}),Q.d(_e,"o",function(){return N}),Q.d(_e,"e",function(){return s}),Q.d(_e,"d",function(){return h}),Q.d(_e,"p",function(){return x}),Q.d(_e,"b",function(){return E});function he(v){return Array.isArray(v)}function be(v){return typeof v=="string"}function ve(v){return typeof v=="object"&&v!==null&&!Array.isArray(v)&&!(v instanceof RegExp)&&!(v instanceof Date)}function Ee(v){return typeof v=="number"&&!isNaN(v)}function ue(v){return v===!0||v===!1}function $(v){return typeof v=="undefined"}function O(v){return!H(v)}function H(v){return $(v)||v===null}function e(v,d){if(!v)throw new Error(d?`Unexpected type, expected '${d}'`:"Unexpected type")}function M(v){if(H(v))throw new Error("Assertion Failed: argument is undefined or null");return v}function D(v){return typeof v=="function"}function N(v,d){const m=Math.min(v.length,d.length);for(let g=0;g<m;g++)c(v[g],d[g])}function c(v,d){if(be(d)){if(typeof v!==d)throw new Error(`argument does not match constraint: typeof ${d}`)}else if(D(d)){try{if(v instanceof d)return}catch(m){}if(!H(v)&&v.constructor===d)return;if(d.length===1&&d.call(void 0,v)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function l(v){let d=[],m=Object.getPrototypeOf(v);for(;Object.prototype!==m;)d=d.concat(Object.getOwnPropertyNames(m)),m=Object.getPrototypeOf(m);return d}function s(v){const d=[];for(const m of l(v))typeof v[m]=="function"&&d.push(m);return d}function h(v,d){const m=S=>function(){const A=Array.prototype.slice.call(arguments,0);return d(S,A)};let g={};for(const S of v)g[S]=m(S);return g}function x(v){return v===null?void 0:v}function E(v,d="Unreachable"){throw new Error(d)}},"7J2G":function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return S});var he=Q("yuO0"),be=Q("XjgL"),ve=Q("6ASS"),Ee=Q("eA01"),ue=Q("fXDJ"),$=Q("BPTR"),O=Q("udol"),H=Q("T/Jt"),e=Q.n(H),M=Q("27eb"),D=Q.n(M),N=function(u){var R,i="".concat(u.rootPrefixCls,"-item"),T=D()(i,"".concat(i,"-").concat(u.page),(R={},Object(be.a)(R,"".concat(i,"-active"),u.active),Object(be.a)(R,"".concat(i,"-disabled"),!u.page),Object(be.a)(R,u.className,!!u.className),R)),w=function(){u.onClick(u.page)},y=function(r){u.onKeyPress(r,u.onClick,u.page)};return e.a.createElement("li",{title:u.showTitle?u.page:null,className:T,onClick:w,onKeyPress:y,tabIndex:"0"},u.itemRender(u.page,"page",e.a.createElement("a",{rel:"nofollow"},u.page)))},c=N,l={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},s=function(A){Object($.a)(R,A);var u=Object(O.a)(R);function R(){var i;Object(Ee.a)(this,R);for(var T=arguments.length,w=new Array(T),y=0;y<T;y++)w[y]=arguments[y];return i=u.call.apply(u,[this].concat(w)),i.state={goInputText:""},i.buildOptionText=function(o){return"".concat(o," ").concat(i.props.locale.items_per_page)},i.changeSize=function(o){i.props.changeSize(Number(o))},i.handleChange=function(o){i.setState({goInputText:o.target.value})},i.handleBlur=function(o){var r=i.props,a=r.goButton,n=r.quickGo,t=r.rootPrefixCls,p=i.state.goInputText;if(a||p==="")return;if(i.setState({goInputText:""}),o.relatedTarget&&(o.relatedTarget.className.indexOf("".concat(t,"-item-link"))>=0||o.relatedTarget.className.indexOf("".concat(t,"-item"))>=0))return;n(i.getValidValue())},i.go=function(o){var r=i.state.goInputText;if(r==="")return;(o.keyCode===l.ENTER||o.type==="click")&&(i.setState({goInputText:""}),i.props.quickGo(i.getValidValue()))},i}return Object(ue.a)(R,[{key:"getValidValue",value:function(){var T=this.state.goInputText;return!T||isNaN(T)?void 0:Number(T)}},{key:"getPageSizeOptions",value:function(){var T=this.props,w=T.pageSize,y=T.pageSizeOptions;return y.some(function(o){return o.toString()===w.toString()})?y:y.concat([w.toString()]).sort(function(o,r){var a=isNaN(Number(o))?0:Number(o),n=isNaN(Number(r))?0:Number(r);return a-n})}},{key:"render",value:function(){var T=this,w=this.props,y=w.pageSize,o=w.locale,r=w.rootPrefixCls,a=w.changeSize,n=w.quickGo,t=w.goButton,p=w.selectComponentClass,_=w.buildOptionText,f=w.selectPrefixCls,F=w.disabled,P=this.state.goInputText,W="".concat(r,"-options"),V=p,J=null,ne=null,ce=null;if(!a&&!n)return null;var ie=this.getPageSizeOptions();if(a&&V){var xe=ie.map(function(ge,de){return e.a.createElement(V.Option,{key:de,value:ge.toString()},(_||T.buildOptionText)(ge))});J=e.a.createElement(V,{disabled:F,prefixCls:f,showSearch:!1,className:"".concat(W,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(y||ie[0]).toString(),onChange:this.changeSize,getPopupContainer:function(de){return de.parentNode},"aria-label":o.page_size,defaultOpen:!1},xe)}return n&&(t&&(ce=typeof t=="boolean"?e.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:F,className:"".concat(W,"-quick-jumper-button")},o.jump_to_confirm):e.a.createElement("span",{onClick:this.go,onKeyUp:this.go},t)),ne=e.a.createElement("div",{className:"".concat(W,"-quick-jumper")},o.jump_to,e.a.createElement("input",{disabled:F,type:"text",value:P,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":o.page}),o.page,ce)),e.a.createElement("li",{className:"".concat(W)},J,ne)}}]),R}(e.a.Component);s.defaultProps={pageSizeOptions:["10","20","50","100"]};var h=s,x=Q("MbTZ");function E(){}function v(A){var u=Number(A);return typeof u=="number"&&!isNaN(u)&&isFinite(u)&&Math.floor(u)===u}function d(A,u,R){return R}function m(A,u,R){var i=typeof A=="undefined"?u.pageSize:A;return Math.floor((R.total-1)/i)+1}var g=function(A){Object($.a)(R,A);var u=Object(O.a)(R);function R(i){var T;Object(Ee.a)(this,R),T=u.call(this,i),T.getJumpPrevPage=function(){return Math.max(1,T.state.current-(T.props.showLessItems?3:5))},T.getJumpNextPage=function(){return Math.min(m(void 0,T.state,T.props),T.state.current+(T.props.showLessItems?3:5))},T.getItemIcon=function(a,n){var t=T.props.prefixCls,p=a||e.a.createElement("button",{type:"button","aria-label":n,className:"".concat(t,"-item-link")});return typeof a=="function"&&(p=e.a.createElement(a,Object(ve.a)({},T.props))),p},T.savePaginationNode=function(a){T.paginationNode=a},T.isValid=function(a){var n=T.props.total;return v(a)&&a!==T.state.current&&v(n)&&n>0},T.shouldDisplayQuickJumper=function(){var a=T.props,n=a.showQuickJumper,t=a.total,p=T.state.pageSize;return t<=p?!1:n},T.handleKeyDown=function(a){(a.keyCode===l.ARROW_UP||a.keyCode===l.ARROW_DOWN)&&a.preventDefault()},T.handleKeyUp=function(a){var n=T.getValidValue(a),t=T.state.currentInputValue;n!==t&&T.setState({currentInputValue:n}),a.keyCode===l.ENTER?T.handleChange(n):a.keyCode===l.ARROW_UP?T.handleChange(n-1):a.keyCode===l.ARROW_DOWN&&T.handleChange(n+1)},T.handleBlur=function(a){var n=T.getValidValue(a);T.handleChange(n)},T.changePageSize=function(a){var n=T.state.current,t=m(a,T.state,T.props);n=n>t?t:n,t===0&&(n=T.state.current),typeof a=="number"&&("pageSize"in T.props||T.setState({pageSize:a}),"current"in T.props||T.setState({current:n,currentInputValue:n})),T.props.onShowSizeChange(n,a),"onChange"in T.props&&T.props.onChange&&T.props.onChange(n,a)},T.handleChange=function(a){var n=T.props,t=n.disabled,p=n.onChange,_=T.state,f=_.pageSize,F=_.current,P=_.currentInputValue;if(T.isValid(a)&&!t){var W=m(void 0,T.state,T.props),V=a;return a>W?V=W:a<1&&(V=1),"current"in T.props||T.setState({current:V}),V!==P&&T.setState({currentInputValue:V}),p(V,f),V}return F},T.prev=function(){T.hasPrev()&&T.handleChange(T.state.current-1)},T.next=function(){T.hasNext()&&T.handleChange(T.state.current+1)},T.jumpPrev=function(){T.handleChange(T.getJumpPrevPage())},T.jumpNext=function(){T.handleChange(T.getJumpNextPage())},T.hasPrev=function(){return T.state.current>1},T.hasNext=function(){return T.state.current<m(void 0,T.state,T.props)},T.runIfEnter=function(a,n){if(a.key==="Enter"||a.charCode===13){for(var t=arguments.length,p=new Array(t>2?t-2:0),_=2;_<t;_++)p[_-2]=arguments[_];n.apply(void 0,p)}},T.runIfEnterPrev=function(a){T.runIfEnter(a,T.prev)},T.runIfEnterNext=function(a){T.runIfEnter(a,T.next)},T.runIfEnterJumpPrev=function(a){T.runIfEnter(a,T.jumpPrev)},T.runIfEnterJumpNext=function(a){T.runIfEnter(a,T.jumpNext)},T.handleGoTO=function(a){(a.keyCode===l.ENTER||a.type==="click")&&T.handleChange(T.state.currentInputValue)};var w=i.onChange!==E,y="current"in i;y&&!w&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var o=i.defaultCurrent;"current"in i&&(o=i.current);var r=i.defaultPageSize;return"pageSize"in i&&(r=i.pageSize),o=Math.min(o,m(r,void 0,i)),T.state={current:o,currentInputValue:o,pageSize:r},T}return Object(ue.a)(R,[{key:"componentDidUpdate",value:function(T,w){var y=this.props.prefixCls;if(w.current!==this.state.current&&this.paginationNode){var o=this.paginationNode.querySelector(".".concat(y,"-item-").concat(w.current));o&&document.activeElement===o&&o.blur()}}},{key:"getValidValue",value:function(T){var w=T.target.value,y=m(void 0,this.state,this.props),o=this.state.currentInputValue,r;return w===""?r=w:isNaN(Number(w))?r=o:w>=y?r=y:r=Number(w),r}},{key:"getShowSizeChanger",value:function(){var T=this.props,w=T.showSizeChanger,y=T.total,o=T.totalBoundaryShowSizeChanger;return typeof w!="undefined"?w:y>o}},{key:"renderPrev",value:function(T){var w=this.props,y=w.prevIcon,o=w.itemRender,r=o(T,"prev",this.getItemIcon(y,"prev page")),a=!this.hasPrev();return Object(H.isValidElement)(r)?Object(H.cloneElement)(r,{disabled:a}):r}},{key:"renderNext",value:function(T){var w=this.props,y=w.nextIcon,o=w.itemRender,r=o(T,"next",this.getItemIcon(y,"next page")),a=!this.hasNext();return Object(H.isValidElement)(r)?Object(H.cloneElement)(r,{disabled:a}):r}},{key:"render",value:function(){var T=this,w=this.props,y=w.prefixCls,o=w.className,r=w.style,a=w.disabled,n=w.hideOnSinglePage,t=w.total,p=w.locale,_=w.showQuickJumper,f=w.showLessItems,F=w.showTitle,P=w.showTotal,W=w.simple,V=w.itemRender,J=w.showPrevNextJumpers,ne=w.jumpPrevIcon,ce=w.jumpNextIcon,ie=w.selectComponentClass,xe=w.selectPrefixCls,ge=w.pageSizeOptions,de=this.state,Fe=de.current,Qe=de.pageSize,Ve=de.currentInputValue;if(n===!0&&t<=Qe)return null;var Ne=m(void 0,this.state,this.props),Ue=[],q=null,k=null,z=null,X=null,re=null,te=_&&_.goButton,ae=f?1:2,ye=Fe-1>0?Fe-1:0,Le=Fe+1<Ne?Fe+1:Ne,Pe=Object.keys(this.props).reduce(function(le,fe){return(fe.substr(0,5)==="data-"||fe.substr(0,5)==="aria-"||fe==="role")&&(le[fe]=T.props[fe]),le},{}),ke=P&&e.a.createElement("li",{className:"".concat(y,"-total-text")},P(t,[t===0?0:(Fe-1)*Qe+1,Fe*Qe>t?t:Fe*Qe]));if(W)return te&&(typeof te=="boolean"?re=e.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},p.jump_to_confirm):re=e.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},te),re=e.a.createElement("li",{title:F?"".concat(p.jump_to).concat(Fe,"/").concat(Ne):null,className:"".concat(y,"-simple-pager")},re)),e.a.createElement("ul",Object(he.a)({className:D()(y,"".concat(y,"-simple"),Object(be.a)({},"".concat(y,"-disabled"),a),o),style:r,ref:this.savePaginationNode},Pe),ke,e.a.createElement("li",{title:F?p.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:D()("".concat(y,"-prev"),Object(be.a)({},"".concat(y,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(ye)),e.a.createElement("li",{title:F?"".concat(Fe,"/").concat(Ne):null,className:"".concat(y,"-simple-pager")},e.a.createElement("input",{type:"text",value:Ve,disabled:a,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:"3"}),e.a.createElement("span",{className:"".concat(y,"-slash")},"/"),Ne),e.a.createElement("li",{title:F?p.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:D()("".concat(y,"-next"),Object(be.a)({},"".concat(y,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Le)),re);if(Ne<=3+ae*2){var Je={locale:p,rootPrefixCls:y,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:F,itemRender:V};Ne||Ue.push(e.a.createElement(c,Object(he.a)({},Je,{key:"noPager",page:1,className:"".concat(y,"-item-disabled")})));for(var qe=1;qe<=Ne;qe+=1){var it=Fe===qe;Ue.push(e.a.createElement(c,Object(he.a)({},Je,{key:qe,page:qe,active:it})))}}else{var rt=f?p.prev_3:p.prev_5,et=f?p.next_3:p.next_5;J&&(q=e.a.createElement("li",{title:F?rt:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:D()("".concat(y,"-jump-prev"),Object(be.a)({},"".concat(y,"-jump-prev-custom-icon"),!!ne))},V(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(ne,"prev page"))),k=e.a.createElement("li",{title:F?et:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:D()("".concat(y,"-jump-next"),Object(be.a)({},"".concat(y,"-jump-next-custom-icon"),!!ce))},V(this.getJumpNextPage(),"jump-next",this.getItemIcon(ce,"next page")))),X=e.a.createElement(c,{locale:p,last:!0,rootPrefixCls:y,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ne,page:Ne,active:!1,showTitle:F,itemRender:V}),z=e.a.createElement(c,{locale:p,rootPrefixCls:y,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:F,itemRender:V});var At=Math.max(1,Fe-ae),We=Math.min(Fe+ae,Ne);Fe-1<=ae&&(We=1+ae*2),Ne-Fe<=ae&&(At=Ne-ae*2);for(var Ge=At;Ge<=We;Ge+=1){var De=Fe===Ge;Ue.push(e.a.createElement(c,{locale:p,rootPrefixCls:y,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ge,page:Ge,active:De,showTitle:F,itemRender:V}))}Fe-1>=ae*2&&Fe!==1+2&&(Ue[0]=Object(H.cloneElement)(Ue[0],{className:"".concat(y,"-item-after-jump-prev")}),Ue.unshift(q)),Ne-Fe>=ae*2&&Fe!==Ne-2&&(Ue[Ue.length-1]=Object(H.cloneElement)(Ue[Ue.length-1],{className:"".concat(y,"-item-before-jump-next")}),Ue.push(k)),At!==1&&Ue.unshift(z),We!==Ne&&Ue.push(X)}var Te=!this.hasPrev()||!Ne,Oe=!this.hasNext()||!Ne;return e.a.createElement("ul",Object(he.a)({className:D()(y,o,Object(be.a)({},"".concat(y,"-disabled"),a)),style:r,ref:this.savePaginationNode},Pe),ke,e.a.createElement("li",{title:F?p.prev_page:null,onClick:this.prev,tabIndex:Te?null:0,onKeyPress:this.runIfEnterPrev,className:D()("".concat(y,"-prev"),Object(be.a)({},"".concat(y,"-disabled"),Te)),"aria-disabled":Te},this.renderPrev(ye)),Ue,e.a.createElement("li",{title:F?p.next_page:null,onClick:this.next,tabIndex:Oe?null:0,onKeyPress:this.runIfEnterNext,className:D()("".concat(y,"-next"),Object(be.a)({},"".concat(y,"-disabled"),Oe)),"aria-disabled":Oe},this.renderNext(Le)),e.a.createElement(h,{disabled:a,locale:p,rootPrefixCls:y,selectComponentClass:ie,selectPrefixCls:xe,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Fe,pageSize:Qe,pageSizeOptions:ge,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:te}))}}],[{key:"getDerivedStateFromProps",value:function(T,w){var y={};if("current"in T&&(y.current=T.current,T.current!==w.current&&(y.currentInputValue=y.current)),"pageSize"in T&&T.pageSize!==w.pageSize){var o=w.current,r=m(T.pageSize,w,T);o=o>r?r:o,"current"in T||(y.current=o,y.currentInputValue=o),y.pageSize=T.pageSize}return y}}]),R}(e.a.Component);g.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:E,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:E,locale:x.a,style:{},itemRender:d,totalBoundaryShowSizeChanger:50};var S=g},"7O0G":function(dt,_e,Q){(function(he,be){dt.exports=be()})(this,function(){"use strict";function he(De,Te){for(var Oe=0;Oe<Te.length;Oe++){var le=Te[Oe];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(De,le.key,le)}}function be(De,Te,Oe){return Te&&he(De.prototype,Te),Oe&&he(De,Oe),De}function ve(De,Te){if(!De)return;if(typeof De=="string")return Ee(De,Te);var Oe=Object.prototype.toString.call(De).slice(8,-1);if(Oe==="Object"&&De.constructor&&(Oe=De.constructor.name),Oe==="Map"||Oe==="Set")return Array.from(De);if(Oe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Oe))return Ee(De,Te)}function Ee(De,Te){(Te==null||Te>De.length)&&(Te=De.length);for(var Oe=0,le=new Array(Te);Oe<Te;Oe++)le[Oe]=De[Oe];return le}function ue(De,Te){var Oe;if(typeof Symbol=="undefined"||De[Symbol.iterator]==null){if(Array.isArray(De)||(Oe=ve(De))||Te&&De&&typeof De.length=="number"){Oe&&(De=Oe);var le=0;return function(){return le>=De.length?{done:!0}:{done:!1,value:De[le++]}}}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 Oe=De[Symbol.iterator](),Oe.next.bind(Oe)}function $(De,Te){return Te={exports:{}},De(Te,Te.exports),Te.exports}var O=$(function(De){function Te(){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 Oe(le){De.exports.defaults=le}De.exports={defaults:Te(),getDefaults:Te,changeDefaults:Oe}}),H=O.defaults,e=O.getDefaults,M=O.changeDefaults,D=/[&<>"']/,N=/[&<>"']/g,c=/[<>"']|&(?!#?\w+;)/,l=/[<>"']|&(?!#?\w+;)/g,s={"&":"&","<":"<",">":">",'"':""","'":"'"},h=function(Te){return s[Te]};function x(De,Te){if(Te){if(D.test(De))return De.replace(N,h)}else if(c.test(De))return De.replace(l,h);return De}var E=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function v(De){return De.replace(E,function(Te,Oe){return Oe=Oe.toLowerCase(),Oe==="colon"?":":Oe.charAt(0)==="#"?Oe.charAt(1)==="x"?String.fromCharCode(parseInt(Oe.substring(2),16)):String.fromCharCode(+Oe.substring(1)):""})}var d=/(^|[^\[])\^/g;function m(De,Te){De=De.source||De,Te=Te||"";var Oe={replace:function(fe,Ce){return Ce=Ce.source||Ce,Ce=Ce.replace(d,"$1"),De=De.replace(fe,Ce),Oe},getRegex:function(){return new RegExp(De,Te)}};return Oe}var g=/[^\w:]/g,S=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function A(De,Te,Oe){if(De){var le;try{le=decodeURIComponent(v(Oe)).replace(g,"").toLowerCase()}catch(fe){return null}if(le.indexOf("javascript:")===0||le.indexOf("vbscript:")===0||le.indexOf("data:")===0)return null}Te&&!S.test(Oe)&&(Oe=w(Te,Oe));try{Oe=encodeURI(Oe).replace(/%25/g,"%")}catch(fe){return null}return Oe}var u={},R=/^[^:]+:\/*[^/]*$/,i=/^([^:]+:)[\s\S]*$/,T=/^([^:]+:\/*[^/]*)[\s\S]*$/;function w(De,Te){u[" "+De]||(R.test(De)?u[" "+De]=De+"/":u[" "+De]=a(De,"/",!0)),De=u[" "+De];var Oe=De.indexOf(":")===-1;return Te.substring(0,2)==="//"?Oe?Te:De.replace(i,"$1")+Te:Te.charAt(0)==="/"?Oe?Te:De.replace(T,"$1")+Te:De+Te}var y={exec:function(){}};function o(De){for(var Te=1,Oe,le;Te<arguments.length;Te++){Oe=arguments[Te];for(le in Oe)Object.prototype.hasOwnProperty.call(Oe,le)&&(De[le]=Oe[le])}return De}function r(De,Te){var Oe=De.replace(/\|/g,function(Ce,we,Me){for(var $e=!1,Ie=we;--Ie>=0&&Me[Ie]==="\\";)$e=!$e;return $e?"|":" |"}),le=Oe.split(/ \|/),fe=0;if(le.length>Te)le.splice(Te);else for(;le.length<Te;)le.push("");for(;fe<le.length;fe++)le[fe]=le[fe].trim().replace(/\\\|/g,"|");return le}function a(De,Te,Oe){var le=De.length;if(le===0)return"";for(var fe=0;fe<le;){var Ce=De.charAt(le-fe-1);if(Ce===Te&&!Oe)fe++;else if(Ce!==Te&&Oe)fe++;else break}return De.substr(0,le-fe)}function n(De,Te){if(De.indexOf(Te[1])===-1)return-1;for(var Oe=De.length,le=0,fe=0;fe<Oe;fe++)if(De[fe]==="\\")fe++;else if(De[fe]===Te[0])le++;else if(De[fe]===Te[1]&&(le--,le<0))return fe;return-1}function t(De){De&&De.sanitize&&!De.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var p={escape:x,unescape:v,edit:m,cleanUrl:A,resolveUrl:w,noopTest:y,merge:o,splitCells:r,rtrim:a,findClosingBracket:n,checkSanitizeDeprecation:t},_=O.defaults,f=p.rtrim,F=p.splitCells,P=p.escape,W=p.findClosingBracket;function V(De,Te,Oe){var le=Te.href,fe=Te.title?P(Te.title):null,Ce=De[1].replace(/\\([\[\]])/g,"$1");return De[0].charAt(0)!=="!"?{type:"link",raw:Oe,href:le,title:fe,text:Ce}:{type:"image",raw:Oe,href:le,title:fe,text:P(Ce)}}function J(De,Te){var Oe=De.match(/^(\s+)(?:```)/);if(Oe===null)return Te;var le=Oe[1];return Te.split(`
|
|
`).map(function(fe){var Ce=fe.match(/^\s+/);if(Ce===null)return fe;var we=Ce[0];return we.length>=le.length?fe.slice(le.length):fe}).join(`
|
|
`)}var ne=function(){function De(Oe){this.options=Oe||_}var Te=De.prototype;return Te.space=function(le){var fe=this.rules.block.newline.exec(le);if(fe)return fe[0].length>1?{type:"space",raw:fe[0]}:{raw:`
|
|
`}},Te.code=function(le,fe){var Ce=this.rules.block.code.exec(le);if(Ce){var we=fe[fe.length-1];if(we&&we.type==="paragraph")return{raw:Ce[0],text:Ce[0].trimRight()};var Me=Ce[0].replace(/^ {4}/gm,"");return{type:"code",raw:Ce[0],codeBlockStyle:"indented",text:this.options.pedantic?Me:f(Me,`
|
|
`)}}},Te.fences=function(le){var fe=this.rules.block.fences.exec(le);if(fe){var Ce=fe[0],we=J(Ce,fe[3]||"");return{type:"code",raw:Ce,lang:fe[2]?fe[2].trim():fe[2],text:we}}},Te.heading=function(le){var fe=this.rules.block.heading.exec(le);if(fe)return{type:"heading",raw:fe[0],depth:fe[1].length,text:fe[2]}},Te.nptable=function(le){var fe=this.rules.block.nptable.exec(le);if(fe){var Ce={type:"table",header:F(fe[1].replace(/^ *| *\| *$/g,"")),align:fe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:fe[3]?fe[3].replace(/\n$/,"").split(`
|
|
`):[],raw:fe[0]};if(Ce.header.length===Ce.align.length){var we=Ce.align.length,Me;for(Me=0;Me<we;Me++)/^ *-+: *$/.test(Ce.align[Me])?Ce.align[Me]="right":/^ *:-+: *$/.test(Ce.align[Me])?Ce.align[Me]="center":/^ *:-+ *$/.test(Ce.align[Me])?Ce.align[Me]="left":Ce.align[Me]=null;for(we=Ce.cells.length,Me=0;Me<we;Me++)Ce.cells[Me]=F(Ce.cells[Me],Ce.header.length);return Ce}}},Te.hr=function(le){var fe=this.rules.block.hr.exec(le);if(fe)return{type:"hr",raw:fe[0]}},Te.blockquote=function(le){var fe=this.rules.block.blockquote.exec(le);if(fe){var Ce=fe[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:fe[0],text:Ce}}},Te.list=function(le){var fe=this.rules.block.list.exec(le);if(fe){for(var Ce=fe[0],we=fe[2],Me=we.length>1,$e=we[we.length-1]===")",Ie={type:"list",raw:Ce,ordered:Me,start:Me?+we.slice(0,-1):"",loose:!1,items:[]},Ye=fe[0].match(this.rules.block.item),tt=!1,at,mt,ft,Ze,yt,lt,gt,xt=Ye.length,bt=0;bt<xt;bt++)at=Ye[bt],Ce=at,mt=at.length,at=at.replace(/^ *([*+-]|\d+[.)]) */,""),~at.indexOf(`
|
|
`)&&(mt-=at.length,at=this.options.pedantic?at.replace(/^ {1,4}/gm,""):at.replace(new RegExp("^ {1,"+mt+"}","gm"),"")),bt!==xt-1&&(ft=this.rules.block.bullet.exec(Ye[bt+1])[0],(Me?ft.length===1||!$e&&ft[ft.length-1]===")":ft.length>1||this.options.smartLists&&ft!==we)&&(Ze=Ye.slice(bt+1).join(`
|
|
`),Ie.raw=Ie.raw.substring(0,Ie.raw.length-Ze.length),bt=xt-1)),yt=tt||/\n\n(?!\s*$)/.test(at),bt!==xt-1&&(tt=at.charAt(at.length-1)===`
|
|
`,yt||(yt=tt)),yt&&(Ie.loose=!0),lt=/^\[[ xX]\] /.test(at),gt=void 0,lt&&(gt=at[1]!==" ",at=at.replace(/^\[[ xX]\] +/,"")),Ie.items.push({type:"list_item",raw:Ce,task:lt,checked:gt,loose:yt,text:at});return Ie}},Te.html=function(le){var fe=this.rules.block.html.exec(le);if(fe)return{type:this.options.sanitize?"paragraph":"html",raw:fe[0],pre:!this.options.sanitizer&&(fe[1]==="pre"||fe[1]==="script"||fe[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(fe[0]):P(fe[0]):fe[0]}},Te.def=function(le){var fe=this.rules.block.def.exec(le);if(fe){fe[3]&&(fe[3]=fe[3].substring(1,fe[3].length-1));var Ce=fe[1].toLowerCase().replace(/\s+/g," ");return{tag:Ce,raw:fe[0],href:fe[2],title:fe[3]}}},Te.table=function(le){var fe=this.rules.block.table.exec(le);if(fe){var Ce={type:"table",header:F(fe[1].replace(/^ *| *\| *$/g,"")),align:fe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:fe[3]?fe[3].replace(/\n$/,"").split(`
|
|
`):[]};if(Ce.header.length===Ce.align.length){Ce.raw=fe[0];var we=Ce.align.length,Me;for(Me=0;Me<we;Me++)/^ *-+: *$/.test(Ce.align[Me])?Ce.align[Me]="right":/^ *:-+: *$/.test(Ce.align[Me])?Ce.align[Me]="center":/^ *:-+ *$/.test(Ce.align[Me])?Ce.align[Me]="left":Ce.align[Me]=null;for(we=Ce.cells.length,Me=0;Me<we;Me++)Ce.cells[Me]=F(Ce.cells[Me].replace(/^ *\| *| *\| *$/g,""),Ce.header.length);return Ce}}},Te.lheading=function(le){var fe=this.rules.block.lheading.exec(le);if(fe)return{type:"heading",raw:fe[0],depth:fe[2].charAt(0)==="="?1:2,text:fe[1]}},Te.paragraph=function(le){var fe=this.rules.block.paragraph.exec(le);if(fe)return{type:"paragraph",raw:fe[0],text:fe[1].charAt(fe[1].length-1)===`
|
|
`?fe[1].slice(0,-1):fe[1]}},Te.text=function(le,fe){var Ce=this.rules.block.text.exec(le);if(Ce){var we=fe[fe.length-1];return we&&we.type==="text"?{raw:Ce[0],text:Ce[0]}:{type:"text",raw:Ce[0],text:Ce[0]}}},Te.escape=function(le){var fe=this.rules.inline.escape.exec(le);if(fe)return{type:"escape",raw:fe[0],text:P(fe[1])}},Te.tag=function(le,fe,Ce){var we=this.rules.inline.tag.exec(le);if(we)return!fe&&/^<a /i.test(we[0])?fe=!0:fe&&/^<\/a>/i.test(we[0])&&(fe=!1),!Ce&&/^<(pre|code|kbd|script)(\s|>)/i.test(we[0])?Ce=!0:Ce&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(we[0])&&(Ce=!1),{type:this.options.sanitize?"text":"html",raw:we[0],inLink:fe,inRawBlock:Ce,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(we[0]):P(we[0]):we[0]}},Te.link=function(le){var fe=this.rules.inline.link.exec(le);if(fe){var Ce=W(fe[2],"()");if(Ce>-1){var we=fe[0].indexOf("!")===0?5:4,Me=we+fe[1].length+Ce;fe[2]=fe[2].substring(0,Ce),fe[0]=fe[0].substring(0,Me).trim(),fe[3]=""}var $e=fe[2],Ie="";if(this.options.pedantic){var Ye=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec($e);Ye?($e=Ye[1],Ie=Ye[3]):Ie=""}else Ie=fe[3]?fe[3].slice(1,-1):"";$e=$e.trim().replace(/^<([\s\S]*)>$/,"$1");var tt=V(fe,{href:$e&&$e.replace(this.rules.inline._escapes,"$1"),title:Ie&&Ie.replace(this.rules.inline._escapes,"$1")},fe[0]);return tt}},Te.reflink=function(le,fe){var Ce;if((Ce=this.rules.inline.reflink.exec(le))||(Ce=this.rules.inline.nolink.exec(le))){var we=(Ce[2]||Ce[1]).replace(/\s+/g," ");if(we=fe[we.toLowerCase()],!we||!we.href){var Me=Ce[0].charAt(0);return{type:"text",raw:Me,text:Me}}var $e=V(Ce,we,Ce[0]);return $e}},Te.strong=function(le,fe,Ce){Ce===void 0&&(Ce="");var we=this.rules.inline.strong.start.exec(le);if(we&&(!we[1]||we[1]&&(Ce===""||this.rules.inline.punctuation.exec(Ce)))){fe=fe.slice(-1*le.length);var Me=we[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Me.lastIndex=0;for(var $e;(we=Me.exec(fe))!=null;)if($e=this.rules.inline.strong.middle.exec(fe.slice(0,we.index+3)),$e)return{type:"strong",raw:le.slice(0,$e[0].length),text:le.slice(2,$e[0].length-2)}}},Te.em=function(le,fe,Ce){Ce===void 0&&(Ce="");var we=this.rules.inline.em.start.exec(le);if(we&&(!we[1]||we[1]&&(Ce===""||this.rules.inline.punctuation.exec(Ce)))){fe=fe.slice(-1*le.length);var Me=we[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Me.lastIndex=0;for(var $e;(we=Me.exec(fe))!=null;)if($e=this.rules.inline.em.middle.exec(fe.slice(0,we.index+2)),$e)return{type:"em",raw:le.slice(0,$e[0].length),text:le.slice(1,$e[0].length-1)}}},Te.codespan=function(le){var fe=this.rules.inline.code.exec(le);if(fe){var Ce=fe[2].replace(/\n/g," "),we=/[^ ]/.test(Ce),Me=Ce.startsWith(" ")&&Ce.endsWith(" ");return we&&Me&&(Ce=Ce.substring(1,Ce.length-1)),Ce=P(Ce,!0),{type:"codespan",raw:fe[0],text:Ce}}},Te.br=function(le){var fe=this.rules.inline.br.exec(le);if(fe)return{type:"br",raw:fe[0]}},Te.del=function(le){var fe=this.rules.inline.del.exec(le);if(fe)return{type:"del",raw:fe[0],text:fe[1]}},Te.autolink=function(le,fe){var Ce=this.rules.inline.autolink.exec(le);if(Ce){var we,Me;return Ce[2]==="@"?(we=P(this.options.mangle?fe(Ce[1]):Ce[1]),Me="mailto:"+we):(we=P(Ce[1]),Me=we),{type:"link",raw:Ce[0],text:we,href:Me,tokens:[{type:"text",raw:we,text:we}]}}},Te.url=function(le,fe){var Ce;if(Ce=this.rules.inline.url.exec(le)){var we,Me;if(Ce[2]==="@")we=P(this.options.mangle?fe(Ce[0]):Ce[0]),Me="mailto:"+we;else{var $e;do $e=Ce[0],Ce[0]=this.rules.inline._backpedal.exec(Ce[0])[0];while($e!==Ce[0]);we=P(Ce[0]),Ce[1]==="www."?Me="http://"+we:Me=we}return{type:"link",raw:Ce[0],text:we,href:Me,tokens:[{type:"text",raw:we,text:we}]}}},Te.inlineText=function(le,fe,Ce){var we=this.rules.inline.text.exec(le);if(we){var Me;return fe?Me=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(we[0]):P(we[0]):we[0]:Me=P(this.options.smartypants?Ce(we[0]):we[0]),{type:"text",raw:we[0],text:Me}}},De}(),ce=p.noopTest,ie=p.edit,xe=p.merge,ge={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:ce,table:ce,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ge._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ge._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ge.def=ie(ge.def).replace("label",ge._label).replace("title",ge._title).getRegex(),ge.bullet=/(?:[*+-]|\d{1,9}[.)])/,ge.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ge.item=ie(ge.item,"gm").replace(/bull/g,ge.bullet).getRegex(),ge.list=ie(ge.list).replace(/bull/g,ge.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ge.def.source+")").getRegex(),ge._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",ge._comment=/<!--(?!-?>)[\s\S]*?-->/,ge.html=ie(ge.html,"i").replace("comment",ge._comment).replace("tag",ge._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ge.paragraph=ie(ge._paragraph).replace("hr",ge.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",ge._tag).getRegex(),ge.blockquote=ie(ge.blockquote).replace("paragraph",ge.paragraph).getRegex(),ge.normal=xe({},ge),ge.gfm=xe({},ge.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*|$)"}),ge.gfm.nptable=ie(ge.gfm.nptable).replace("hr",ge.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",ge._tag).getRegex(),ge.gfm.table=ie(ge.gfm.table).replace("hr",ge.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",ge._tag).getRegex(),ge.pedantic=xe({},ge.normal,{html:ie(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ge._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:ce,paragraph:ie(ge.normal._paragraph).replace("hr",ge.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",ge.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var de={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ce,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:ce,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};de._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",de.punctuation=ie(de.punctuation).replace(/punctuation/g,de._punctuation).getRegex(),de._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",de._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",de.em.start=ie(de.em.start).replace(/punctuation/g,de._punctuation).getRegex(),de.em.middle=ie(de.em.middle).replace(/punctuation/g,de._punctuation).replace(/overlapSkip/g,de._overlapSkip).getRegex(),de.em.endAst=ie(de.em.endAst,"g").replace(/punctuation/g,de._punctuation).getRegex(),de.em.endUnd=ie(de.em.endUnd,"g").replace(/punctuation/g,de._punctuation).getRegex(),de.strong.start=ie(de.strong.start).replace(/punctuation/g,de._punctuation).getRegex(),de.strong.middle=ie(de.strong.middle).replace(/punctuation/g,de._punctuation).replace(/blockSkip/g,de._blockSkip).getRegex(),de.strong.endAst=ie(de.strong.endAst,"g").replace(/punctuation/g,de._punctuation).getRegex(),de.strong.endUnd=ie(de.strong.endUnd,"g").replace(/punctuation/g,de._punctuation).getRegex(),de.blockSkip=ie(de._blockSkip,"g").getRegex(),de.overlapSkip=ie(de._overlapSkip,"g").getRegex(),de._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,de._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,de._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])?)+(?![-_])/,de.autolink=ie(de.autolink).replace("scheme",de._scheme).replace("email",de._email).getRegex(),de._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,de.tag=ie(de.tag).replace("comment",ge._comment).replace("attribute",de._attribute).getRegex(),de._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,de._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,de._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,de.link=ie(de.link).replace("label",de._label).replace("href",de._href).replace("title",de._title).getRegex(),de.reflink=ie(de.reflink).replace("label",de._label).getRegex(),de.reflinkSearch=ie(de.reflinkSearch,"g").replace("reflink",de.reflink).replace("nolink",de.nolink).getRegex(),de.normal=xe({},de),de.pedantic=xe({},de.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:ie(/^!?\[(label)\]\((.*?)\)/).replace("label",de._label).getRegex(),reflink:ie(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",de._label).getRegex()}),de.gfm=xe({},de.normal,{escape:ie(de.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),de.gfm.url=ie(de.gfm.url,"i").replace("email",de.gfm._extended_email).getRegex(),de.breaks=xe({},de.gfm,{br:ie(de.br).replace("{2,}","*").getRegex(),text:ie(de.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Fe={block:ge,inline:de},Qe=O.defaults,Ve=Fe.block,Ne=Fe.inline;function Ue(De){return De.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 q(De){var Te="",Oe,le,fe=De.length;for(Oe=0;Oe<fe;Oe++)le=De.charCodeAt(Oe),Math.random()>.5&&(le="x"+le.toString(16)),Te+="&#"+le+";";return Te}var k=function(){function De(Oe){this.tokens=[],this.tokens.links=Object.create(null),this.options=Oe||Qe,this.options.tokenizer=this.options.tokenizer||new ne,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var le={block:Ve.normal,inline:Ne.normal};this.options.pedantic?(le.block=Ve.pedantic,le.inline=Ne.pedantic):this.options.gfm&&(le.block=Ve.gfm,this.options.breaks?le.inline=Ne.breaks:le.inline=Ne.gfm),this.tokenizer.rules=le}De.lex=function(le,fe){var Ce=new De(fe);return Ce.lex(le)};var Te=De.prototype;return Te.lex=function(le){return le=le.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(le,this.tokens,!0),this.inline(this.tokens),this.tokens},Te.blockTokens=function(le,fe,Ce){fe===void 0&&(fe=[]),Ce===void 0&&(Ce=!0),le=le.replace(/^ +$/gm,"");for(var we,Me,$e,Ie;le;){if(we=this.tokenizer.space(le)){le=le.substring(we.raw.length),we.type&&fe.push(we);continue}if(we=this.tokenizer.code(le,fe)){le=le.substring(we.raw.length),we.type?fe.push(we):(Ie=fe[fe.length-1],Ie.raw+=`
|
|
`+we.raw,Ie.text+=`
|
|
`+we.text);continue}if(we=this.tokenizer.fences(le)){le=le.substring(we.raw.length),fe.push(we);continue}if(we=this.tokenizer.heading(le)){le=le.substring(we.raw.length),fe.push(we);continue}if(we=this.tokenizer.nptable(le)){le=le.substring(we.raw.length),fe.push(we);continue}if(we=this.tokenizer.hr(le)){le=le.substring(we.raw.length),fe.push(we);continue}if(we=this.tokenizer.blockquote(le)){le=le.substring(we.raw.length),we.tokens=this.blockTokens(we.text,[],Ce),fe.push(we);continue}if(we=this.tokenizer.list(le)){for(le=le.substring(we.raw.length),$e=we.items.length,Me=0;Me<$e;Me++)we.items[Me].tokens=this.blockTokens(we.items[Me].text,[],!1);fe.push(we);continue}if(we=this.tokenizer.html(le)){le=le.substring(we.raw.length),fe.push(we);continue}if(Ce&&(we=this.tokenizer.def(le))){le=le.substring(we.raw.length),this.tokens.links[we.tag]||(this.tokens.links[we.tag]={href:we.href,title:we.title});continue}if(we=this.tokenizer.table(le)){le=le.substring(we.raw.length),fe.push(we);continue}if(we=this.tokenizer.lheading(le)){le=le.substring(we.raw.length),fe.push(we);continue}if(Ce&&(we=this.tokenizer.paragraph(le))){le=le.substring(we.raw.length),fe.push(we);continue}if(we=this.tokenizer.text(le,fe)){le=le.substring(we.raw.length),we.type?fe.push(we):(Ie=fe[fe.length-1],Ie.raw+=`
|
|
`+we.raw,Ie.text+=`
|
|
`+we.text);continue}if(le){var Ye="Infinite loop on byte: "+le.charCodeAt(0);if(this.options.silent){console.error(Ye);break}else throw new Error(Ye)}}return fe},Te.inline=function(le){var fe,Ce,we,Me,$e,Ie,Ye=le.length;for(fe=0;fe<Ye;fe++){Ie=le[fe];switch(Ie.type){case"paragraph":case"text":case"heading":{Ie.tokens=[],this.inlineTokens(Ie.text,Ie.tokens);break}case"table":{for(Ie.tokens={header:[],cells:[]},Me=Ie.header.length,Ce=0;Ce<Me;Ce++)Ie.tokens.header[Ce]=[],this.inlineTokens(Ie.header[Ce],Ie.tokens.header[Ce]);for(Me=Ie.cells.length,Ce=0;Ce<Me;Ce++)for($e=Ie.cells[Ce],Ie.tokens.cells[Ce]=[],we=0;we<$e.length;we++)Ie.tokens.cells[Ce][we]=[],this.inlineTokens($e[we],Ie.tokens.cells[Ce][we]);break}case"blockquote":{this.inline(Ie.tokens);break}case"list":{for(Me=Ie.items.length,Ce=0;Ce<Me;Ce++)this.inline(Ie.items[Ce].tokens);break}}}return le},Te.inlineTokens=function(le,fe,Ce,we,Me){fe===void 0&&(fe=[]),Ce===void 0&&(Ce=!1),we===void 0&&(we=!1),Me===void 0&&(Me="");var $e,Ie=le,Ye;if(this.tokens.links){var tt=Object.keys(this.tokens.links);if(tt.length>0)for(;(Ye=this.tokenizer.rules.inline.reflinkSearch.exec(Ie))!=null;)tt.includes(Ye[0].slice(Ye[0].lastIndexOf("[")+1,-1))&&(Ie=Ie.slice(0,Ye.index)+"["+"a".repeat(Ye[0].length-2)+"]"+Ie.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ye=this.tokenizer.rules.inline.blockSkip.exec(Ie))!=null;)Ie=Ie.slice(0,Ye.index)+"["+"a".repeat(Ye[0].length-2)+"]"+Ie.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;le;){if($e=this.tokenizer.escape(le)){le=le.substring($e.raw.length),fe.push($e);continue}if($e=this.tokenizer.tag(le,Ce,we)){le=le.substring($e.raw.length),Ce=$e.inLink,we=$e.inRawBlock,fe.push($e);continue}if($e=this.tokenizer.link(le)){le=le.substring($e.raw.length),$e.type==="link"&&($e.tokens=this.inlineTokens($e.text,[],!0,we)),fe.push($e);continue}if($e=this.tokenizer.reflink(le,this.tokens.links)){le=le.substring($e.raw.length),$e.type==="link"&&($e.tokens=this.inlineTokens($e.text,[],!0,we)),fe.push($e);continue}if($e=this.tokenizer.strong(le,Ie,Me)){le=le.substring($e.raw.length),$e.tokens=this.inlineTokens($e.text,[],Ce,we),fe.push($e);continue}if($e=this.tokenizer.em(le,Ie,Me)){le=le.substring($e.raw.length),$e.tokens=this.inlineTokens($e.text,[],Ce,we),fe.push($e);continue}if($e=this.tokenizer.codespan(le)){le=le.substring($e.raw.length),fe.push($e);continue}if($e=this.tokenizer.br(le)){le=le.substring($e.raw.length),fe.push($e);continue}if($e=this.tokenizer.del(le)){le=le.substring($e.raw.length),$e.tokens=this.inlineTokens($e.text,[],Ce,we),fe.push($e);continue}if($e=this.tokenizer.autolink(le,q)){le=le.substring($e.raw.length),fe.push($e);continue}if(!Ce&&($e=this.tokenizer.url(le,q))){le=le.substring($e.raw.length),fe.push($e);continue}if($e=this.tokenizer.inlineText(le,we,Ue)){le=le.substring($e.raw.length),Me=$e.raw.slice(-1),fe.push($e);continue}if(le){var at="Infinite loop on byte: "+le.charCodeAt(0);if(this.options.silent){console.error(at);break}else throw new Error(at)}}return fe},be(De,null,[{key:"rules",get:function(){return{block:Ve,inline:Ne}}}]),De}(),z=O.defaults,X=p.cleanUrl,re=p.escape,te=function(){function De(Oe){this.options=Oe||z}var Te=De.prototype;return Te.code=function(le,fe,Ce){var we=(fe||"").match(/\S*/)[0];if(this.options.highlight){var Me=this.options.highlight(le,we);Me!=null&&Me!==le&&(Ce=!0,le=Me)}return we?'<pre><code class="'+this.options.langPrefix+re(we,!0)+'">'+(Ce?le:re(le,!0))+`</code></pre>
|
|
`:"<pre><code>"+(Ce?le:re(le,!0))+`</code></pre>
|
|
`},Te.blockquote=function(le){return`<blockquote>
|
|
`+le+`</blockquote>
|
|
`},Te.html=function(le){return le},Te.heading=function(le,fe,Ce,we){return this.options.headerIds?"<h"+fe+' id="'+this.options.headerPrefix+we.slug(Ce)+'">'+le+"</h"+fe+`>
|
|
`:"<h"+fe+">"+le+"</h"+fe+`>
|
|
`},Te.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},Te.list=function(le,fe,Ce){var we=fe?"ol":"ul",Me=fe&&Ce!==1?' start="'+Ce+'"':"";return"<"+we+Me+`>
|
|
`+le+"</"+we+`>
|
|
`},Te.listitem=function(le){return"<li>"+le+`</li>
|
|
`},Te.checkbox=function(le){return"<input "+(le?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Te.paragraph=function(le){return"<p>"+le+`</p>
|
|
`},Te.table=function(le,fe){return fe&&(fe="<tbody>"+fe+"</tbody>"),`<table>
|
|
<thead>
|
|
`+le+`</thead>
|
|
`+fe+`</table>
|
|
`},Te.tablerow=function(le){return`<tr>
|
|
`+le+`</tr>
|
|
`},Te.tablecell=function(le,fe){var Ce=fe.header?"th":"td",we=fe.align?"<"+Ce+' align="'+fe.align+'">':"<"+Ce+">";return we+le+"</"+Ce+`>
|
|
`},Te.strong=function(le){return"<strong>"+le+"</strong>"},Te.em=function(le){return"<em>"+le+"</em>"},Te.codespan=function(le){return"<code>"+le+"</code>"},Te.br=function(){return this.options.xhtml?"<br/>":"<br>"},Te.del=function(le){return"<del>"+le+"</del>"},Te.link=function(le,fe,Ce){if(le=X(this.options.sanitize,this.options.baseUrl,le),le===null)return Ce;var we='<a href="'+re(le)+'"';return fe&&(we+=' title="'+fe+'"'),we+=">"+Ce+"</a>",we},Te.image=function(le,fe,Ce){if(le=X(this.options.sanitize,this.options.baseUrl,le),le===null)return Ce;var we='<img src="'+le+'" alt="'+Ce+'"';return fe&&(we+=' title="'+fe+'"'),we+=this.options.xhtml?"/>":">",we},Te.text=function(le){return le},De}(),ae=function(){function De(){}var Te=De.prototype;return Te.strong=function(le){return le},Te.em=function(le){return le},Te.codespan=function(le){return le},Te.del=function(le){return le},Te.html=function(le){return le},Te.text=function(le){return le},Te.link=function(le,fe,Ce){return""+Ce},Te.image=function(le,fe,Ce){return""+Ce},Te.br=function(){return""},De}(),ye=function(){function De(){this.seen={}}var Te=De.prototype;return Te.slug=function(le){var fe=le.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(fe)){var Ce=fe;do this.seen[Ce]++,fe=Ce+"-"+this.seen[Ce];while(this.seen.hasOwnProperty(fe))}return this.seen[fe]=0,fe},De}(),Le=O.defaults,Pe=p.unescape,ke=function(){function De(Oe){this.options=Oe||Le,this.options.renderer=this.options.renderer||new te,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ae,this.slugger=new ye}De.parse=function(le,fe){var Ce=new De(fe);return Ce.parse(le)};var Te=De.prototype;return Te.parse=function(le,fe){fe===void 0&&(fe=!0);var Ce="",we,Me,$e,Ie,Ye,tt,at,mt,ft,Ze,yt,lt,gt,xt,bt,Ot,Tt,Vt,Zt=le.length;for(we=0;we<Zt;we++){Ze=le[we];switch(Ze.type){case"space":continue;case"hr":{Ce+=this.renderer.hr();continue}case"heading":{Ce+=this.renderer.heading(this.parseInline(Ze.tokens),Ze.depth,Pe(this.parseInline(Ze.tokens,this.textRenderer)),this.slugger);continue}case"code":{Ce+=this.renderer.code(Ze.text,Ze.lang,Ze.escaped);continue}case"table":{for(mt="",at="",Ie=Ze.header.length,Me=0;Me<Ie;Me++)at+=this.renderer.tablecell(this.parseInline(Ze.tokens.header[Me]),{header:!0,align:Ze.align[Me]});for(mt+=this.renderer.tablerow(at),ft="",Ie=Ze.cells.length,Me=0;Me<Ie;Me++){for(tt=Ze.tokens.cells[Me],at="",Ye=tt.length,$e=0;$e<Ye;$e++)at+=this.renderer.tablecell(this.parseInline(tt[$e]),{header:!1,align:Ze.align[$e]});ft+=this.renderer.tablerow(at)}Ce+=this.renderer.table(mt,ft);continue}case"blockquote":{ft=this.parse(Ze.tokens),Ce+=this.renderer.blockquote(ft);continue}case"list":{for(yt=Ze.ordered,lt=Ze.start,gt=Ze.loose,Ie=Ze.items.length,ft="",Me=0;Me<Ie;Me++)bt=Ze.items[Me],Ot=bt.checked,Tt=bt.task,xt="",bt.task&&(Vt=this.renderer.checkbox(Ot),gt?bt.tokens.length>0&&bt.tokens[0].type==="text"?(bt.tokens[0].text=Vt+" "+bt.tokens[0].text,bt.tokens[0].tokens&&bt.tokens[0].tokens.length>0&&bt.tokens[0].tokens[0].type==="text"&&(bt.tokens[0].tokens[0].text=Vt+" "+bt.tokens[0].tokens[0].text)):bt.tokens.unshift({type:"text",text:Vt}):xt+=Vt),xt+=this.parse(bt.tokens,gt),ft+=this.renderer.listitem(xt,Tt,Ot);Ce+=this.renderer.list(ft,yt,lt);continue}case"html":{Ce+=this.renderer.html(Ze.text);continue}case"paragraph":{Ce+=this.renderer.paragraph(this.parseInline(Ze.tokens));continue}case"text":{for(ft=Ze.tokens?this.parseInline(Ze.tokens):Ze.text;we+1<Zt&&le[we+1].type==="text";)Ze=le[++we],ft+=`
|
|
`+(Ze.tokens?this.parseInline(Ze.tokens):Ze.text);Ce+=fe?this.renderer.paragraph(ft):ft;continue}default:{var ut='Token with "'+Ze.type+'" type was not found.';if(this.options.silent){console.error(ut);return}else throw new Error(ut)}}}return Ce},Te.parseInline=function(le,fe){fe=fe||this.renderer;var Ce="",we,Me,$e=le.length;for(we=0;we<$e;we++){Me=le[we];switch(Me.type){case"escape":{Ce+=fe.text(Me.text);break}case"html":{Ce+=fe.html(Me.text);break}case"link":{Ce+=fe.link(Me.href,Me.title,this.parseInline(Me.tokens,fe));break}case"image":{Ce+=fe.image(Me.href,Me.title,Me.text);break}case"strong":{Ce+=fe.strong(this.parseInline(Me.tokens,fe));break}case"em":{Ce+=fe.em(this.parseInline(Me.tokens,fe));break}case"codespan":{Ce+=fe.codespan(Me.text);break}case"br":{Ce+=fe.br();break}case"del":{Ce+=fe.del(this.parseInline(Me.tokens,fe));break}case"text":{Ce+=fe.text(Me.text);break}default:{var Ie='Token with "'+Me.type+'" type was not found.';if(this.options.silent){console.error(Ie);return}else throw new Error(Ie)}}}return Ce},De}(),Je=p.merge,qe=p.checkSanitizeDeprecation,it=p.escape,rt=O.getDefaults,et=O.changeDefaults,At=O.defaults;function We(De,Te,Oe){if(typeof De=="undefined"||De===null)throw new Error("marked(): input parameter is undefined or null");if(typeof De!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(De)+", string expected");if(typeof Te=="function"&&(Oe=Te,Te=null),Te=Je({},We.defaults,Te||{}),qe(Te),Oe){var le=Te.highlight,fe;try{fe=k.lex(De,Te)}catch($e){return Oe($e)}var Ce=function(Ie){var Ye;if(!Ie)try{Ye=ke.parse(fe,Te)}catch(tt){Ie=tt}return Te.highlight=le,Ie?Oe(Ie):Oe(null,Ye)};if(!le||le.length<3)return Ce();if(delete Te.highlight,!fe.length)return Ce();var we=0;We.walkTokens(fe,function($e){$e.type==="code"&&(we++,setTimeout(function(){le($e.text,$e.lang,function(Ie,Ye){if(Ie)return Ce(Ie);Ye!=null&&Ye!==$e.text&&($e.text=Ye,$e.escaped=!0),we--,we===0&&Ce()})},0))}),we===0&&Ce();return}try{var Me=k.lex(De,Te);return Te.walkTokens&&We.walkTokens(Me,Te.walkTokens),ke.parse(Me,Te)}catch($e){if($e.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,Te.silent)return"<p>An error occurred:</p><pre>"+it($e.message+"",!0)+"</pre>";throw $e}}We.options=We.setOptions=function(De){return Je(We.defaults,De),et(We.defaults),We},We.getDefaults=rt,We.defaults=At,We.use=function(De){var Te=Je({},De);if(De.renderer&&function(){var le=We.defaults.renderer||new te,fe=function(Me){var $e=le[Me];le[Me]=function(){for(var Ie=arguments.length,Ye=new Array(Ie),tt=0;tt<Ie;tt++)Ye[tt]=arguments[tt];var at=De.renderer[Me].apply(le,Ye);return at===!1&&(at=$e.apply(le,Ye)),at}};for(var Ce in De.renderer)fe(Ce);Te.renderer=le}(),De.tokenizer&&function(){var le=We.defaults.tokenizer||new ne,fe=function(Me){var $e=le[Me];le[Me]=function(){for(var Ie=arguments.length,Ye=new Array(Ie),tt=0;tt<Ie;tt++)Ye[tt]=arguments[tt];var at=De.tokenizer[Me].apply(le,Ye);return at===!1&&(at=$e.apply(le,Ye)),at}};for(var Ce in De.tokenizer)fe(Ce);Te.tokenizer=le}(),De.walkTokens){var Oe=We.defaults.walkTokens;Te.walkTokens=function(le){De.walkTokens(le),Oe&&Oe(le)}}We.setOptions(Te)},We.walkTokens=function(De,Te){for(var Oe=ue(De),le;!(le=Oe()).done;){var fe=le.value;Te(fe);switch(fe.type){case"table":{for(var Ce=ue(fe.tokens.header),we;!(we=Ce()).done;){var Me=we.value;We.walkTokens(Me,Te)}for(var $e=ue(fe.tokens.cells),Ie;!(Ie=$e()).done;)for(var Ye=Ie.value,tt=ue(Ye),at;!(at=tt()).done;){var mt=at.value;We.walkTokens(mt,Te)}break}case"list":{We.walkTokens(fe.items,Te);break}default:fe.tokens&&We.walkTokens(fe.tokens,Te)}}},We.Parser=ke,We.parser=ke.parse,We.Renderer=te,We.TextRenderer=ae,We.Lexer=k,We.lexer=k.lex,We.Tokenizer=ne,We.Slugger=ye,We.parse=We;var Ge=We;return Ge})},"8HAY":function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return ue}),Q.d(_e,"b",function(){return $}),Q.d(_e,"d",function(){return O}),Q.d(_e,"e",function(){return H}),Q.d(_e,"c",function(){return e});var he=Q("MI8n"),be=Q("pmY6"),ve=Q("3/fG"),Ee=function(M,D,N,c){function l(s){return s instanceof N?s:new N(function(h){h(s)})}return new(N||(N=Promise))(function(s,h){function x(d){try{v(c.next(d))}catch(m){h(m)}}function E(d){try{v(c.throw(d))}catch(m){h(m)}}function v(d){d.done?s(d.value):l(d.value).then(x,E)}v((c=c.apply(M,D||[])).next())})};class ue extends be.a{constructor(M,D="",N="",c=!0,l){super();this._onDidChange=this._register(new he.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=M,this._label=D,this._cssClass=N,this._enabled=c,this._actionCallback=l}get id(){return this._id}get label(){return this._label}set label(M){this._setLabel(M)}_setLabel(M){this._label!==M&&(this._label=M,this._onDidChange.fire({label:M}))}get tooltip(){return this._tooltip||""}set tooltip(M){this._setTooltip(M)}_setTooltip(M){this._tooltip!==M&&(this._tooltip=M,this._onDidChange.fire({tooltip:M}))}get class(){return this._cssClass}set class(M){this._setClass(M)}_setClass(M){this._cssClass!==M&&(this._cssClass=M,this._onDidChange.fire({class:M}))}get enabled(){return this._enabled}set enabled(M){this._setEnabled(M)}_setEnabled(M){this._enabled!==M&&(this._enabled=M,this._onDidChange.fire({enabled:M}))}get checked(){return this._checked}set checked(M){this._setChecked(M)}_setChecked(M){this._checked!==M&&(this._checked=M,this._onDidChange.fire({checked:M}))}run(M,D){return Ee(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(M))})}}class $ extends be.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new he.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new he.b),this.onDidRun=this._onDidRun.event}run(M,D){return Ee(this,void 0,void 0,function*(){if(!M.enabled)return;this._onBeforeRun.fire({action:M});let N;try{yield this.runAction(M,D)}catch(c){N=c}this._onDidRun.fire({action:M,error:N})})}runAction(M,D){return Ee(this,void 0,void 0,function*(){yield M.run(D)})}}class O extends ue{constructor(M){super(O.ID,M,M?"separator text":"separator");this.checked=!1,this.enabled=!1}}O.ID="vs.actions.separator";class H{constructor(M,D,N,c){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=M,this.label=D,this.class=c,this._actions=N}get actions(){return this._actions}dispose(){}run(){return Ee(this,void 0,void 0,function*(){})}}class e extends ue{constructor(){super(e.ID,ve.a("submenu.empty","(empty)"),void 0,!1)}}e.ID="vs.actions.empty"},"8hTe":function(dt,_e,Q){dt.exports={button:"button___1wy9m"}},"9Bee":function(dt,_e,Q){"use strict";var he=Q("CDKA"),be=Q("d7ih"),ve=Q("dLI4"),Ee=Q("4d5L"),ue=Q("YaWb"),$=Q("IYef"),O=Q("Hqw+"),H=Q("XXmO"),e=Q.n(H),M=Q("T/Jt"),D=Q.n(M),N=Q("vg9a"),c=Q("7O0G"),l=Q.n(c),s=Q("GcTH");function h(K,b){var B=K.match(/^(\s+)(?:```)/);if(B===null)return b;var j=B[1];return b.split(`
|
|
`).map(function(Z){var G=Z.match(/^\s+/);if(G===null)return Z;var oe=Object(O.a)(G,1),He=oe[0];return He.length>=j.length?Z.slice(j.length):Z}).join(`
|
|
`)}var x=[],E=["<ul>"],v=new l.a.Renderer,d=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function m(){x.length=0,E=["<ul>"]}var g={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function S(K,b,B,j){if(b>=K.length||K[b].level<=B)return b;var Z=K[b];j.push("<li><a href='#"+Z.anchor+"'>"+Z.text+"</a>"),b++;var G=[];return b=S(K,b,Z.level,G),G.length>0&&(j.push("<ul>"),G.forEach(function(oe){j.push(oe)}),j.push("</ul>")),j.push("</li>"),b=S(K,b,B,j),b}function A(){return S(x,0,0,E),E.push("</ul>"),E.join("")}var u={heading:function(b){var B=d.exec(b);if(B)return{type:"heading",raw:B[0],depth:B[1].length,text:B[2]}},fences:function(b){var B=this.rules.block.fences.exec(b);if(B){var j=B[0],Z=h(j,B[3]||""),G=B[2]?B[2].trim():B[2];if(["latex","katex","math"].indexOf(G)>=0){var oe=T(),He=Z;Z=oe,w[oe]={type:"block",expression:He}}return{type:"code",raw:j,lang:G,text:Z}}}},R=/(?:\${2})([^\n`]+?)(?:\${2})/gi,i=0,T=function(){return"__special_katext_id_".concat(i++,"__")},w={};function y(){return w}function o(){i=0,w={}}function r(K){return K=K.replace(R,function(b,B){var j=T();return w[j]={type:"inline",expression:B},j}),K}var a=v.listitem;v.listitem=function(K){return a(r(K))};var n=v.paragraph;v.paragraph=function(K){return n(r(K))};var t=v.tablecell;v.tablecell=function(K,b){return t(r(K),b)},v.code=function(K,b,B){var j=(b||"").match(/\S*/)[0];return j?["latex","katex","math"].indexOf(j)>=0?"<p class='editormd-tex'>".concat(K,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(b,'">').concat(B?K:Object(s.escape)(K,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(B?K:Object(s.escape)(K,!0))+"</code></pre>"},v.heading=function(K,b,B){var j=this.options.headerPrefix+B.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return x.push({anchor:j,level:b,text:K}),"<h"+b+' id="'+j+'">'+K+"</h"+b+">"},l.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),l.a.use({tokenizer:u,renderer:v});var p=l.a,_=Q("SJMd"),f=Q("ulZh"),F=Q.n(f),P=Q("m3rI"),W=Q("Oy/b"),V=Q("p5ED"),J=Q("ErOA");/*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** */var ne=function(K,b){return(ne=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(B,j){B.__proto__=j}||function(B,j){for(var Z in j)Object.prototype.hasOwnProperty.call(j,Z)&&(B[Z]=j[Z])})(K,b)};function ce(K,b){function B(){this.constructor=K}ne(K,b),K.prototype=b===null?Object.create(b):(B.prototype=b.prototype,new B)}function ie(K,b,B,j){return new(B||(B=Promise))(function(Z,G){function oe(_t){try{ct(j.next(_t))}catch(Xe){G(Xe)}}function He(_t){try{ct(j.throw(_t))}catch(Xe){G(Xe)}}function ct(_t){var Xe;_t.done?Z(_t.value):(Xe=_t.value,Xe instanceof B?Xe:new B(function(pt){pt(Xe)})).then(oe,He)}ct((j=j.apply(K,b||[])).next())})}function xe(K,b){var B,j,Z,G,oe={label:0,sent:function(){if(1&Z[0])throw Z[1];return Z[1]},trys:[],ops:[]};return G={next:He(0),throw:He(1),return:He(2)},typeof Symbol=="function"&&(G[Symbol.iterator]=function(){return this}),G;function He(ct){return function(_t){return function(Xe){if(B)throw new TypeError("Generator is already executing.");for(;oe;)try{if(B=1,j&&(Z=2&Xe[0]?j.return:Xe[0]?j.throw||((Z=j.return)&&Z.call(j),0):j.next)&&!(Z=Z.call(j,Xe[1])).done)return Z;switch(j=0,Z&&(Xe=[2&Xe[0],Z.value]),Xe[0]){case 0:case 1:Z=Xe;break;case 4:return oe.label++,{value:Xe[1],done:!1};case 5:oe.label++,j=Xe[1],Xe=[0];continue;case 7:Xe=oe.ops.pop(),oe.trys.pop();continue;default:if(!(Z=oe.trys,(Z=Z.length>0&&Z[Z.length-1])||Xe[0]!==6&&Xe[0]!==2)){oe=0;continue}if(Xe[0]===3&&(!Z||Xe[1]>Z[0]&&Xe[1]<Z[3])){oe.label=Xe[1];break}if(Xe[0]===6&&oe.label<Z[1]){oe.label=Z[1],Z=Xe;break}if(Z&&oe.label<Z[2]){oe.label=Z[2],oe.ops.push(Xe);break}Z[2]&&oe.ops.pop(),oe.trys.pop();continue}Xe=b.call(K,oe)}catch(pt){Xe=[6,pt],j=0}finally{B=Z=0}if(5&Xe[0])throw Xe[1];return{value:Xe[0]?Xe[1]:void 0,done:!0}}([ct,_t])}}}function ge(){for(var K=0,b=0,B=arguments.length;b<B;b++)K+=arguments[b].length;var j=Array(K),Z=0;for(b=0;b<B;b++)for(var G=arguments[b],oe=0,He=G.length;oe<He;oe++,Z++)j[Z]=G[oe];return j}var de=function(){function K(){}return K.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},K.setAttributes=function(b,B){for(var j=0,Z=B;j<Z.length;j++){var G=Z[j],oe=G[0],He=G[1];b.setAttribute(oe,He)}},K.createRect=function(b,B,j){var Z=document.createElementNS("http://www.w3.org/2000/svg","rect");return Z.setAttribute("width",b.toString()),Z.setAttribute("height",B.toString()),j&&K.setAttributes(Z,j),Z},K.createLine=function(b,B,j,Z,G){var oe=document.createElementNS("http://www.w3.org/2000/svg","line");return oe.setAttribute("x1",b.toString()),oe.setAttribute("y1",B.toString()),oe.setAttribute("x2",j.toString()),oe.setAttribute("y2",Z.toString()),G&&K.setAttributes(oe,G),oe},K.createPolygon=function(b,B){var j=document.createElementNS("http://www.w3.org/2000/svg","polygon");return j.setAttribute("points",b),B&&K.setAttributes(j,B),j},K.createCircle=function(b,B){var j=document.createElementNS("http://www.w3.org/2000/svg","circle");return j.setAttribute("cx",(b/2).toString()),j.setAttribute("cy",(b/2).toString()),j.setAttribute("r",b.toString()),B&&K.setAttributes(j,B),j},K.createEllipse=function(b,B,j){var Z=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Z.setAttribute("cx",(b/2).toString()),Z.setAttribute("cy",(B/2).toString()),Z.setAttribute("rx",(b/2).toString()),Z.setAttribute("ry",(B/2).toString()),j&&K.setAttributes(Z,j),Z},K.createGroup=function(b){var B=document.createElementNS("http://www.w3.org/2000/svg","g");return b&&K.setAttributes(B,b),B},K.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},K.createMarker=function(b,B,j,Z,G,oe,He){var ct=document.createElementNS("http://www.w3.org/2000/svg","marker");return K.setAttributes(ct,[["id",b],["orient",B],["markerWidth",j.toString()],["markerHeight",Z.toString()],["refX",G.toString()],["refY",oe.toString()]]),ct.appendChild(He),ct},K.createText=function(b){var B=document.createElementNS("http://www.w3.org/2000/svg","text");return B.setAttribute("x","0"),B.setAttribute("y","0"),b&&K.setAttributes(B,b),B},K.createTSpan=function(b,B){var j=document.createElementNS("http://www.w3.org/2000/svg","tspan");return j.textContent=b,B&&K.setAttributes(j,B),j},K.createImage=function(b){var B=document.createElementNS("http://www.w3.org/2000/svg","image");return b&&K.setAttributes(B,b),B},K.createPoint=function(b,B){var j=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return j.x=b,j.y=B,j},K.createPath=function(b,B){var j=document.createElementNS("http://www.w3.org/2000/svg","path");return j.setAttribute("d",b),B&&K.setAttributes(j,B),j},K}(),Fe=function(){function K(){}return K.addKey=function(b){K.key=b},Object.defineProperty(K,"isLicensed",{get:function(){return!!K.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(K.key)},enumerable:!1,configurable:!0}),K}(),Qe=function(){function K(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return K.prototype.rasterize=function(b,B,j){var Z=this;return new Promise(function(G){var oe=j!==void 0?j:document.createElement("canvas");b===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",B.width.baseVal.valueAsString),He.setAttribute("height",B.height.baseVal.valueAsString),He.setAttribute("viewBox","0 0 "+B.viewBox.baseVal.width.toString()+" "+B.viewBox.baseVal.height.toString()),He.innerHTML=B.innerHTML,Z.naturalSize===!0?(He.width.baseVal.value=b.naturalWidth,He.height.baseVal.value=b.naturalHeight):Z.width!==void 0&&Z.height!==void 0&&(He.width.baseVal.value=Z.width,He.height.baseVal.value=Z.height),oe.width=He.width.baseVal.value,oe.height=He.height.baseVal.value;var ct=He.outerHTML,_t=oe.getContext("2d");Z.markersOnly!==!0&&_t.drawImage(b,0,0,oe.width,oe.height);var Xe=window.URL,pt=new Image(oe.width,oe.height);pt.setAttribute("crossOrigin","anonymous");var wt=new Blob([ct],{type:"image/svg+xml"}),Kt=Xe.createObjectURL(wt);pt.onload=function(){_t.drawImage(pt,0,0),Xe.revokeObjectURL(Kt);var rr=oe.toDataURL(Z.imageType,Z.imageQuality);G(rr)},pt.src=Kt})},K}(),Ve=function(){},Ne=function(){function K(b){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+b+"_"}return Object.defineProperty(K.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(K.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(K.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),K.prototype.addClass=function(b){return this.styleSheet===void 0&&this.addStyleSheet(),b.name=""+this.classNamePrefix+b.localName,this.classes.push(b),this.styleSheet.sheet.insertRule("."+b.name+" {"+b.style+"}",this.styleSheet.sheet.cssRules.length),b},K.prototype.addRule=function(b){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(b),this.styleSheet.sheet.insertRule(b.selector+" {"+b.style+"}",this.styleSheet.sheet.cssRules.length)},K.prototype.addStyleSheet=function(){var b;this.styleSheet=document.createElement("style"),((b=this.styleSheetRoot)!==null&&b!==void 0?b:document.head).appendChild(this.styleSheet),this.addRule(new Ue("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ue("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new Ue("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new q("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new q("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},K.prototype.removeStyleSheet=function(){var b;this.styleSheet&&(((b=this.styleSheetRoot)!==null&&b!==void 0?b:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},K}(),Ue=function(K,b){this.selector=K,this.style=b},q=function(K,b){this.localName=K,this.style=b},k=function(){function K(b,B,j,Z,G){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=b,this.displayMode=B,this.markerItems=j,this.uiStyleSettings=Z,this.styles=G,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return K.prototype.show=function(b){var B=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=b,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var j=document.createElement("div");j.className=this.toolbarBlockStyleClass.name,j.style.whiteSpace="nowrap",this.uiContainer.appendChild(j),this.addActionButton(j,'<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","Select mode"),this.addActionButton(j,'<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","Delete marker"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(j,'<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","Delete all markers"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(j,'<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","Undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(j,'<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","Redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(j,'<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","Zoom in"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(j,'<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","Zoom out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(j,'<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","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(G){var oe=document.createElement("div");oe.className=""+B.toolbarButtonStyleClass.name,oe.setAttribute("data-type-name",G.typeName),oe.setAttribute("aria-label",G.title),oe.setAttribute("title",G.title),oe.innerHTML=G.icon,oe.addEventListener("click",function(){B.markerToolbarButtonClicked(oe,G)}),B.buttons.push(oe),B.markerButtons.push(oe)}),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","Save and close"),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","Close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},K.prototype.addButtonClickListener=function(b){this.buttonClickListeners.push(b)},K.prototype.removeButtonClickListener=function(b){this.buttonClickListeners.indexOf(b)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(b),1)},K.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},K.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var b=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var B=0;B<this.markerButtons.length;B++)B<b||B===b&&this.markerButtons.length-1===b?this.markerButtonBlock.appendChild(this.markerButtons[B]):(B===b&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[B]))}},K.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")},K.prototype.resetButtonStyles=function(){var b=this;this.buttons.forEach(function(B){B.className=B.className.replace(b.uiStyleSettings.toolbarButtonStyleColorsClassName?b.uiStyleSettings.toolbarButtonStyleColorsClassName:b.toolbarButtonStyleColorsClass.name,"").trim(),B.className=B.className.replace(b.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?b.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:b.toolbarActiveButtonStyleColorsClass.name,"").trim(),B.className+=" "+(b.uiStyleSettings.toolbarButtonStyleColorsClassName?b.uiStyleSettings.toolbarButtonStyleColorsClassName:b.toolbarButtonStyleColorsClass.name)})},K.prototype.addActionButton=function(b,B,j,Z){var G=this,oe=document.createElement("div");switch(oe.className=""+this.toolbarButtonStyleClass.name,oe.innerHTML=B,oe.setAttribute("role","button"),oe.setAttribute("data-action",j),oe.title=Z,oe.setAttribute("aria-label",Z),oe.addEventListener("click",function(){G.actionToolbarButtonClicked(oe,j)}),j){case"select":oe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":oe.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":oe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":oe.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":oe.style.fill=this.uiStyleSettings.closeButtonColor}b.appendChild(oe),this.buttons.push(oe)},K.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new q("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 q("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new q("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new q("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 q("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var b=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new q("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*b)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*b)+`px;
|
|
padding: `+b+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new q("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new q("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new Ue("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new Ue("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},K.prototype.markerToolbarButtonClicked=function(b,B){this.setActiveButton(b),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(j){return j("marker",B)}),this.markerButtonOverflowBlock.style.display="none"},K.prototype.actionToolbarButtonClicked=function(b,B){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(j){return j("action",B)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},K.prototype.setActiveButton=function(b){this.resetButtonStyles(),b.className=b.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),b.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},K.prototype.setActiveMarkerButton=function(b){var B=this.markerButtons.find(function(j){return j.getAttribute("data-type-name")===b});B&&this.setActiveButton(B)},K.prototype.setCurrentMarker=function(b){var B=this;this.currentMarker=b,this.buttons.filter(function(j){return/delete|notes/.test(j.getAttribute("data-action"))}).forEach(function(j){B.currentMarker===void 0?(j.style.fillOpacity="0.4",j.style.pointerEvents="none"):(j.style.fillOpacity="1",j.style.pointerEvents="all")})},K}(),z=function(){function K(b,B,j,Z){this.panels=[],this.panelButtons=[],this.markerjsContainer=b,this.displayMode=B,this.uiStyleSettings=j,this.styles=Z,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return K.prototype.addStyles=function(){var b;this.toolboxStyleClass=this.styles.addClass(new q("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 q("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var B=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new q("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new q("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new q("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 q("toolbox-panel-row_colors",`
|
|
background-color: `+((b=this.uiStyleSettings.toolboxBackgroundColor)!==null&&b!==void 0?b:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new q("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*B)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*B)+`px;
|
|
padding: `+B+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new q("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new q("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new Ue("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new Ue("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new Ue("."+this.toolboxPanelRowStyleClass.name+" > div",`
|
|
scrollbar-width: thin;
|
|
`)),this.styles.addRule(new Ue("."+this.toolboxPanelRowStyleClass.name+" > div::-webkit-scrollbar",`
|
|
height: 10px;
|
|
width: 10px;
|
|
`)),this.styles.addRule(new Ue("."+this.toolboxPanelRowStyleClass.name+" > div::-webkit-scrollbar-track",`
|
|
background-color: transparent;
|
|
`)),this.styles.addRule(new Ue("."+this.toolboxPanelRowStyleClass.name+" > div::-webkit-scrollbar-thumb",`
|
|
background-color: #444;
|
|
border-radius: 20px;
|
|
border: 2px solid #aaa;
|
|
`))},K.prototype.show=function(b){var B;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=b,this.uiContainer.className=this.toolboxStyleClass.name+" "+((B=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&B!==void 0?B:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},K.prototype.setPanelButtons=function(b){var B,j,Z=this;this.panels=b,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((B=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&B!==void 0?B:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((j=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&j!==void 0?j:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(G){var oe;G.uiStyleSettings=Z.uiStyleSettings;var He=document.createElement("div");He.className=Z.toolboxButtonStyleClass.name+" "+((oe=Z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&oe!==void 0?oe:Z.toolboxButtonStyleColorsClass.name),He.innerHTML=G.icon,He.title=G.title,He.setAttribute("role","button"),He.setAttribute("aria-label",G.title),G.id&&He.setAttribute("data-action",G.id),He.addEventListener("click",function(){Z.panelButtonClick(G)}),Z.panelButtons.push(He),Z.buttonRow.appendChild(He)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},K.prototype.panelButtonClick=function(b){var B=this,j=-1;if(b!==this.activePanel){j=this.panels.indexOf(b),this.panelRow.innerHTML="";var Z=b.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=b}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){B.displayMode==="inline"?B.panelRow.style.display="none":B.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(G,oe){var He,ct;G.className=B.toolboxButtonStyleClass.name+" "+(oe===j?""+((He=B.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&He!==void 0?He:B.toolboxActiveButtonStyleColorsClass.name):""+((ct=B.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ct!==void 0?ct:B.toolboxButtonStyleColorsClass.name))})},K}(),X=function(){function K(b,B,j){this.title=b,this.icon=B,this._id=j}return Object.defineProperty(K.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),K}(),re=function(K){function b(B,j,Z,G,oe){var He=K.call(this,B,G||'<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>',oe||"color-picker-panel")||this;return He.colors=[],He.addTransparent=!1,He.colorBoxes=[],He.colors=j,He.currentColor=Z,He.setCurrentColor=He.setCurrentColor.bind(He),He.getColorBox=He.getColorBox.bind(He),He}return ce(b,K),b.prototype.getUi=function(){var B=this,j=document.createElement("div");return j.style.overflow="hidden",j.style.overflowX="auto",j.style.whiteSpace="nowrap",this.colors.forEach(function(Z){var G=B.getColorBox(Z);j.appendChild(G),B.colorBoxes.push(G)}),j},b.prototype.getColorBox=function(B){var j=this,Z=this.uiStyleSettings.toolbarHeight/4,G=this.uiStyleSettings.toolbarHeight-Z,oe=document.createElement("div");oe.style.display="inline-block",oe.style.boxSizing="content-box",oe.style.width=G-2+"px",oe.style.height=G-2+"px",oe.style.padding="1px",oe.style.marginRight="2px",oe.style.marginBottom="2px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderRadius=(G+2)/2+"px",oe.style.borderColor=B===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){j.setCurrentColor(B,oe)});var He=document.createElement("div");return He.style.display="inline-block",He.style.width=G-2+"px",He.style.height=G-2+"px",He.style.backgroundColor=B,He.style.borderRadius=G/2+"px",B==="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>`),oe.appendChild(He),oe},b.prototype.setCurrentColor=function(B,j){var Z=this;this.currentColor=B,this.colorBoxes.forEach(function(G){G.style.borderColor=G===j?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(B)},b}(X),te=function(){function K(b,B,j){this._state="new",this._isSelected=!1,this._container=b,this._overlayContainer=B,this.globalSettings=j,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(K.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),K.prototype.ownsTarget=function(b){return!1},Object.defineProperty(K.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),K.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},K.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},K.prototype.pointerDown=function(b,B){},K.prototype.dblClick=function(b,B){},K.prototype.manipulate=function(b){},K.prototype.pointerUp=function(b){this.stateChanged()},K.prototype.dispose=function(){},K.prototype.addMarkerVisualToContainer=function(b){this.container.childNodes.length>0?this.container.insertBefore(b,this.container.childNodes[0]):this.container.appendChild(b)},K.prototype.getState=function(){return{typeName:K.typeName,state:this.state,notes:this.notes}},K.prototype.restoreState=function(b){this._state=b.state,this.notes=b.notes},K.prototype.scale=function(b,B){},K.prototype.colorChanged=function(b){this.onColorChanged&&this.onColorChanged(b),this.stateChanged()},K.prototype.fillColorChanged=function(b){this.onFillColorChanged&&this.onFillColorChanged(b),this.stateChanged()},K.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var b=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),b.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(b)&&this.onStateChanged(this)}},K.typeName="MarkerBase",K}(),ae=function(){function K(){this.findGripByVisual=this.findGripByVisual.bind(this)}return K.prototype.findGripByVisual=function(b){return this.topLeft.ownsTarget(b)?this.topLeft:this.topCenter.ownsTarget(b)?this.topCenter:this.topRight.ownsTarget(b)?this.topRight:this.centerLeft.ownsTarget(b)?this.centerLeft:this.centerRight.ownsTarget(b)?this.centerRight:this.bottomLeft.ownsTarget(b)?this.bottomLeft:this.bottomCenter.ownsTarget(b)?this.bottomCenter:this.bottomRight.ownsTarget(b)?this.bottomRight:void 0},K}(),ye=function(){function K(){this.GRIP_SIZE=10,this.visual=de.createGroup(),this.visual.appendChild(de.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(de.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return K.prototype.ownsTarget=function(b){return b===this.visual||b===this.visual.childNodes[0]||b===this.visual.childNodes[1]},K}(),Le=function(){function K(){}return K.toITransformMatrix=function(b){return{a:b.a,b:b.b,c:b.c,d:b.d,e:b.e,f:b.f}},K.toSVGMatrix=function(b,B){return b.a=B.a,b.b=B.b,b.c=B.c,b.d=B.d,b.e=B.e,b.f=B.f,b},K}(),Pe=function(K){function b(B,j,Z){var G=K.call(this,B,j,Z)||this;return G.left=0,G.top=0,G.width=0,G.height=0,G.defaultSize={x:50,y:20},G.offsetX=0,G.offsetY=0,G.rotationAngle=0,G.CB_DISTANCE=10,G._suppressMarkerCreateEvent=!1,G.container.transform.baseVal.appendItem(de.createTransform()),G.setupControlBox(),G}return ce(b,K),Object.defineProperty(b.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"visual",{get:function(){return this._visual},set:function(B){this._visual=B;var j=de.createTransform();this._visual.transform.baseVal.appendItem(j)},enumerable:!1,configurable:!0}),b.prototype.ownsTarget=function(B){return!!K.prototype.ownsTarget.call(this,B)||!!(this.controlGrips.findGripByVisual(B)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(B))},b.prototype.pointerDown=function(B,j){K.prototype.pointerDown.call(this,B,j),this.state==="new"&&(this.left=B.x,this.top=B.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Z=this.unrotatePoint(B);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(j),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(j)){this.activeGrip=this.rotatorGrip;var G=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=G.x-this.width/2,this.top=G.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var oe=this.container.transform.baseVal.getItem(0);oe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(oe,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},b.prototype.pointerUp=function(B){var j=this.state;K.prototype.pointerUp.call(this,B),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(B),this._state="select",j==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},b.prototype.moveVisual=function(B){this.visual.style.transform="translate("+B.x+"px, "+B.y+"px)"},b.prototype.manipulate=function(B){var j=this.unrotatePoint(B);this.state==="creating"?this.resize(B):this.state==="move"?(this.left=this.manipulationStartLeft+(j.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(j.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(j):this.state==="rotate"&&this.rotate(B)},b.prototype.resize=function(B){var j=this.manipulationStartLeft,Z=this.manipulationStartWidth,G=this.manipulationStartTop,oe=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:j=this.manipulationStartLeft+B.x-this.manipulationStartX,Z=this.manipulationStartWidth+this.manipulationStartLeft-j;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Z=this.manipulationStartWidth+B.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:G=this.manipulationStartTop+B.y-this.manipulationStartY,oe=this.manipulationStartHeight+this.manipulationStartTop-G;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:oe=this.manipulationStartHeight+B.y-this.manipulationStartY}Z>=0?(this.left=j,this.width=Z):(this.left=j+Z,this.width=-Z),oe>=0?(this.top=G,this.height=oe):(this.top=G+oe,this.height=-oe),this.setSize()},b.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},b.prototype.rotate=function(B){if(Math.abs(B.x-this.centerX)>.1){var j=Math.sign(B.x-this.centerX);this.rotationAngle=180*Math.atan((B.y-this.centerY)/(B.x-this.centerX))/Math.PI+90*j,this.applyRotation()}},b.prototype.applyRotation=function(){var B=this.container.transform.baseVal.getItem(0);B.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(B,0)},b.prototype.rotatePoint=function(B){if(this.rotationAngle===0)return B;var j=this.container.getCTM(),Z=de.createPoint(B.x,B.y);return{x:(Z=Z.matrixTransform(j)).x,y:Z.y}},b.prototype.unrotatePoint=function(B){if(this.rotationAngle===0)return B;var j=this.container.getCTM();j=j.inverse();var Z=de.createPoint(B.x,B.y);return{x:(Z=Z.matrixTransform(j)).x,y:Z.y}},b.prototype.select=function(){K.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},b.prototype.deselect=function(){K.prototype.deselect.call(this),this.controlBox.style.display="none"},b.prototype.setupControlBox=function(){this.controlBox=de.createGroup();var B=de.createTransform();B.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(B),this.container.appendChild(this.controlBox),this.controlRect=de.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=de.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 ae,this.addControlGrips(),this.controlBox.style.display="none"},b.prototype.adjustControlBox=function(){var B=this.controlBox.transform.baseVal.getItem(0);B.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(B,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()},b.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()},b.prototype.createGrip=function(){var B=new ye;return B.visual.transform.baseVal.appendItem(de.createTransform()),this.controlBox.appendChild(B.visual),B},b.prototype.positionGrips=function(){var B=this.controlGrips.topLeft.GRIP_SIZE,j=-B/2,Z=j,G=(this.width+this.CB_DISTANCE)/2-B/2,oe=(this.height+this.CB_DISTANCE)/2-B/2,He=this.height+this.CB_DISTANCE-B/2,ct=this.width+this.CB_DISTANCE-B/2;this.positionGrip(this.controlGrips.topLeft.visual,j,Z),this.positionGrip(this.controlGrips.topCenter.visual,G,Z),this.positionGrip(this.controlGrips.topRight.visual,ct,Z),this.positionGrip(this.controlGrips.centerLeft.visual,j,oe),this.positionGrip(this.controlGrips.centerRight.visual,ct,oe),this.positionGrip(this.controlGrips.bottomLeft.visual,j,He),this.positionGrip(this.controlGrips.bottomCenter.visual,G,He),this.positionGrip(this.controlGrips.bottomRight.visual,ct,He),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,G,Z-3*this.CB_DISTANCE)},b.prototype.positionGrip=function(B,j,Z){var G=B.transform.baseVal.getItem(0);G.setTranslate(j,Z),B.transform.baseVal.replaceItem(G,0)},b.prototype.hideControlBox=function(){this.controlBox.style.display="none"},b.prototype.showControlBox=function(){this.controlBox.style.display=""},b.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Le.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Le.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},K.prototype.getState.call(this))},b.prototype.restoreState=function(B){K.prototype.restoreState.call(this,B);var j=B;this.left=j.left,this.top=j.top,this.width=j.width,this.height=j.height,this.rotationAngle=j.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Le.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,j.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Le.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,j.containerTransformMatrix))},b.prototype.scale=function(B,j){K.prototype.scale.call(this,B,j);var Z=this.rotatePoint({x:this.left,y:this.top}),G=this.unrotatePoint({x:Z.x*B,y:Z.y*j});this.left=G.x,this.top=G.y,this.width=this.width*B,this.height=this.height*j,this.adjustControlBox()},b}(te),ke=function(K){function b(B,j,Z){var G=K.call(this,B,j,Z)||this;return G.fillColor="transparent",G.strokeColor="transparent",G.strokeWidth=0,G.strokeDasharray="",G.opacity=1,G.setStrokeColor=G.setStrokeColor.bind(G),G.setFillColor=G.setFillColor.bind(G),G.setStrokeWidth=G.setStrokeWidth.bind(G),G.setStrokeDasharray=G.setStrokeDasharray.bind(G),G.createVisual=G.createVisual.bind(G),G}return ce(b,K),b.prototype.ownsTarget=function(B){return!(!K.prototype.ownsTarget.call(this,B)&&B!==this.visual)},b.prototype.createVisual=function(){this.visual=de.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)},b.prototype.pointerDown=function(B,j){K.prototype.pointerDown.call(this,B,j),this.state==="new"&&(this.createVisual(),this.moveVisual(B),this._state="creating")},b.prototype.manipulate=function(B){K.prototype.manipulate.call(this,B)},b.prototype.resize=function(B){K.prototype.resize.call(this,B),this.setSize()},b.prototype.setSize=function(){K.prototype.setSize.call(this),de.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},b.prototype.pointerUp=function(B){K.prototype.pointerUp.call(this,B),this.setSize()},b.prototype.setStrokeColor=function(B){this.strokeColor=B,this.visual&&de.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(B),this.stateChanged()},b.prototype.setFillColor=function(B){this.fillColor=B,this.visual&&de.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},b.prototype.setStrokeWidth=function(B){this.strokeWidth=B,this.visual&&de.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},b.prototype.setStrokeDasharray=function(B){this.strokeDasharray=B,this.visual&&de.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},b.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},K.prototype.getState.call(this))},b.prototype.restoreState=function(B){var j=B;this.fillColor=j.fillColor,this.strokeColor=j.strokeColor,this.strokeWidth=j.strokeWidth,this.strokeDasharray=j.strokeDasharray,this.opacity=j.opacity,this.createVisual(),K.prototype.restoreState.call(this,B),this.setSize()},b.prototype.scale=function(B,j){K.prototype.scale.call(this,B,j),this.setSize()},b.title="Rectangle marker",b}(Pe),Je=function(K){function b(B,j,Z,G,oe){var He=K.call(this,B,G||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>',oe||"line-width-panel")||this;return He.widths=[],He.widthBoxes=[],He.widths=j,He.currentWidth=Z,He.setCurrentWidth=He.setCurrentWidth.bind(He),He}return ce(b,K),b.prototype.getUi=function(){var B=this,j=document.createElement("div");return j.style.display="flex",j.style.overflow="hidden",j.style.flexGrow="2",this.widths.forEach(function(Z){var G=document.createElement("div");G.style.display="flex",G.style.flexGrow="2",G.style.alignItems="center",G.style.justifyContent="space-between",G.style.padding="5px",G.style.borderWidth="2px",G.style.borderStyle="solid",G.style.borderColor=Z===B.currentWidth?B.uiStyleSettings.toolboxAccentColor:"transparent",G.addEventListener("click",function(){B.setCurrentWidth(Z,G)}),j.appendChild(G);var oe=document.createElement("div");oe.innerText=Z.toString(),oe.style.marginRight="5px",G.appendChild(oe);var He=document.createElement("div");He.style.minHeight="20px",He.style.flexGrow="2",He.style.display="flex",He.style.alignItems="center";var ct=document.createElement("hr");ct.style.minWidth="20px",ct.style.border="0px",ct.style.borderTop=Z+"px solid "+B.uiStyleSettings.toolboxColor,ct.style.flexGrow="2",He.appendChild(ct),G.appendChild(He),B.widthBoxes.push(G)}),j},b.prototype.setCurrentWidth=function(B,j){var Z=this;this.currentWidth=B,this.widthBoxes.forEach(function(G){G.style.borderColor=G===j?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},b}(X),qe=function(K){function b(B,j,Z,G,oe){var He=K.call(this,B,G||'<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>',oe||"line-style-panel")||this;return He.styles=[],He.styleBoxes=[],He.styles=j,He.currentStyle=Z,He.setCurrentStyle=He.setCurrentStyle.bind(He),He}return ce(b,K),b.prototype.getUi=function(){var B=this,j=document.createElement("div");return j.style.display="flex",j.style.overflow="hidden",j.style.flexGrow="2",this.styles.forEach(function(Z){var G=document.createElement("div");G.style.display="flex",G.style.alignItems="center",G.style.justifyContent="space-between",G.style.padding="5px",G.style.borderWidth="2px",G.style.borderStyle="solid",G.style.overflow="hidden",G.style.maxWidth=100/B.styles.length-5+"%",G.style.borderColor=Z===B.currentStyle?B.uiStyleSettings.toolboxAccentColor:"transparent",G.addEventListener("click",function(){B.setCurrentStyle(Z,G)}),j.appendChild(G);var oe=document.createElement("div");oe.style.minHeight="20px",oe.style.flexGrow="2",oe.style.overflow="hidden";var He=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+B.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Z!==""?'stroke-dasharray="'+Z+'"':"")+` />
|
|
</svg>`;oe.innerHTML=He,G.appendChild(oe),B.styleBoxes.push(G)}),j},b.prototype.setCurrentStyle=function(B,j){var Z=this;this.currentStyle=B,this.styleBoxes.forEach(function(G){G.style.borderColor=G===j?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},b}(X),it=function(K){function b(B,j,Z){var G=K.call(this,B,j,Z)||this;return G.strokeColor=Z.defaultColor,G.strokeWidth=Z.defaultStrokeWidth,G.strokeDasharray=Z.defaultStrokeDasharray,G.strokePanel=new re("Line color",Z.defaultColorSet,Z.defaultColor),G.strokePanel.onColorChanged=G.setStrokeColor,G.strokeWidthPanel=new Je("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),G.strokeWidthPanel.onWidthChanged=G.setStrokeWidth,G.strokeStylePanel=new qe("Line style",Z.defaultStrokeDasharrays,Z.defaultStrokeDasharray),G.strokeStylePanel.onStyleChanged=G.setStrokeDasharray,G}return ce(b,K),Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var B=K.prototype.getState.call(this);return B.typeName=b.typeName,B},b.typeName="FrameMarker",b.title="Frame marker",b.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',b}(ke),rt=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,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text",this.wrapText=!1,this.defaultText="Your text here"},et=function(K){function b(B,j,Z){var G=K.call(this,B,j,Z)||this;return G.x1=0,G.y1=0,G.x2=0,G.y2=0,G.defaultLength=50,G.manipulationStartX=0,G.manipulationStartY=0,G.manipulationStartX1=0,G.manipulationStartY1=0,G.manipulationStartX2=0,G.manipulationStartY2=0,G.setupControlBox(),G}return ce(b,K),b.prototype.ownsTarget=function(B){return!!K.prototype.ownsTarget.call(this,B)||!(!this.grip1.ownsTarget(B)&&!this.grip2.ownsTarget(B))},b.prototype.pointerDown=function(B,j){K.prototype.pointerDown.call(this,B,j),this.manipulationStartX=B.x,this.manipulationStartY=B.y,this.state==="new"&&(this.x1=B.x,this.y1=B.y,this.x2=B.x,this.y2=B.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(j)?this.activeGrip=this.grip1:this.grip2.ownsTarget(j)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},b.prototype.pointerUp=function(B){var j=this.state;K.prototype.pointerUp.call(this,B),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(B),this._state="select",j==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},b.prototype.adjustVisual=function(){},b.prototype.manipulate=function(B){this.state==="creating"?this.resize(B):this.state==="move"?(this.x1=this.manipulationStartX1+B.x-this.manipulationStartX,this.y1=this.manipulationStartY1+B.y-this.manipulationStartY,this.x2=this.manipulationStartX2+B.x-this.manipulationStartX,this.y2=this.manipulationStartY2+B.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(B)},b.prototype.resize=function(B){switch(this.activeGrip){case this.grip1:this.x1=B.x,this.y1=B.y;break;case this.grip2:case void 0:this.x2=B.x,this.y2=B.y}this.adjustVisual(),this.adjustControlBox()},b.prototype.select=function(){K.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},b.prototype.deselect=function(){K.prototype.deselect.call(this),this.controlBox.style.display="none"},b.prototype.setupControlBox=function(){this.controlBox=de.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},b.prototype.adjustControlBox=function(){this.positionGrips()},b.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},b.prototype.createGrip=function(){var B=new ye;return B.visual.transform.baseVal.appendItem(de.createTransform()),this.controlBox.appendChild(B.visual),B},b.prototype.positionGrips=function(){var B=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-B/2,this.y1-B/2),this.positionGrip(this.grip2.visual,this.x2-B/2,this.y2-B/2)},b.prototype.positionGrip=function(B,j,Z){var G=B.transform.baseVal.getItem(0);G.setTranslate(j,Z),B.transform.baseVal.replaceItem(G,0)},b.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},K.prototype.getState.call(this))},b.prototype.restoreState=function(B){K.prototype.restoreState.call(this,B);var j=B;this.x1=j.x1,this.y1=j.y1,this.x2=j.x2,this.y2=j.y2},b.prototype.scale=function(B,j){K.prototype.scale.call(this,B,j),this.x1=this.x1*B,this.y1=this.y1*j,this.x2=this.x2*B,this.y2=this.y2*j,this.adjustVisual(),this.adjustControlBox()},b}(te),At=function(K){function b(B,j,Z){var G=K.call(this,B,j,Z)||this;return G.strokeColor="transparent",G.strokeWidth=0,G.strokeDasharray="",G.setStrokeColor=G.setStrokeColor.bind(G),G.setStrokeWidth=G.setStrokeWidth.bind(G),G.setStrokeDasharray=G.setStrokeDasharray.bind(G),G.strokeColor=Z.defaultColor,G.strokeWidth=Z.defaultStrokeWidth,G.strokeDasharray=Z.defaultStrokeDasharray,G.strokePanel=new re("Line color",Z.defaultColorSet,Z.defaultColor),G.strokePanel.onColorChanged=G.setStrokeColor,G.strokeWidthPanel=new Je("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),G.strokeWidthPanel.onWidthChanged=G.setStrokeWidth,G.strokeStylePanel=new qe("Line style",Z.defaultStrokeDasharrays,Z.defaultStrokeDasharray),G.strokeStylePanel.onStyleChanged=G.setStrokeDasharray,G}return ce(b,K),b.prototype.ownsTarget=function(B){return!(!K.prototype.ownsTarget.call(this,B)&&B!==this.visual&&B!==this.selectorLine&&B!==this.visibleLine)},b.prototype.createVisual=function(){this.visual=de.createGroup(),this.selectorLine=de.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=de.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)},b.prototype.pointerDown=function(B,j){K.prototype.pointerDown.call(this,B,j),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},b.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()),de.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),de.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),de.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},b.prototype.setStrokeColor=function(B){this.strokeColor=B,this.adjustVisual(),this.colorChanged(B)},b.prototype.setStrokeWidth=function(B){this.strokeWidth=B,this.adjustVisual()},b.prototype.setStrokeDasharray=function(B){this.strokeDasharray=B,this.adjustVisual(),this.stateChanged()},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var B=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},K.prototype.getState.call(this));return B.typeName=b.typeName,B},b.prototype.restoreState=function(B){K.prototype.restoreState.call(this,B);var j=B;this.strokeColor=j.strokeColor,this.strokeWidth=j.strokeWidth,this.strokeDasharray=j.strokeDasharray,this.createVisual(),this.adjustVisual()},b.typeName="LineMarker",b.title="Line marker",b.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',b}(et),We=function(K){function b(B,j,Z,G,oe){var He=K.call(this,B,G||'<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>',oe||"font-family-panel")||this;return He.fonts=[],He.fontBoxes=[],He.fonts=j,He.currentFont=Z,He.setCurrentFont=He.setCurrentFont.bind(He),He}return ce(b,K),b.prototype.getUi=function(){var B=this,j=document.createElement("div");return j.style.overflow="hidden",j.style.flexGrow="2",this.fonts.forEach(function(Z){var G=document.createElement("div");G.style.display="inline-block",G.style.alignItems="center",G.style.justifyContent="space-between",G.style.padding="5px",G.style.borderWidth="2px",G.style.borderStyle="solid",G.style.overflow="hidden",G.style.maxWidth=100/B.fonts.length-5+"%",G.style.borderColor=Z===B.currentFont?B.uiStyleSettings.toolboxAccentColor:"transparent",G.addEventListener("click",function(){B.setCurrentFont(Z,G)}),j.appendChild(G);var oe=document.createElement("div");oe.style.display="flex",oe.style.minHeight="20px",oe.style.flexGrow="2",oe.style.fontFamily=Z,oe.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",oe.appendChild(He),G.appendChild(oe),B.fontBoxes.push(G)}),j},b.prototype.setCurrentFont=function(B,j){var Z=this;this.currentFont=B,this.fontBoxes.forEach(function(G){G.style.borderColor=G===j?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},b}(X),Ge=function(K){function b(B,j,Z){var G,oe=K.call(this,B,j,Z)||this;return oe.color="transparent",oe.padding=5,oe.DEFAULT_TEXT="your text here",oe.isMoved=!1,oe.color=Z.defaultColor,oe.fontFamily=Z.defaultFontFamily,oe.text=(G=Z.defaultText)!==null&&G!==void 0?G:oe.DEFAULT_TEXT,oe.defaultSize={x:100,y:30},oe.setColor=oe.setColor.bind(oe),oe.setFont=oe.setFont.bind(oe),oe.renderText=oe.renderText.bind(oe),oe.sizeText=oe.sizeText.bind(oe),oe.textEditDivClicked=oe.textEditDivClicked.bind(oe),oe.showTextEditor=oe.showTextEditor.bind(oe),oe.setSize=oe.setSize.bind(oe),oe.positionTextEditor=oe.positionTextEditor.bind(oe),oe.wrapText=oe.wrapText.bind(oe),oe.colorPanel=new re("Color",Z.defaultColorSet,Z.defaultColor),oe.colorPanel.onColorChanged=oe.setColor,oe.fontFamilyPanel=new We("Font",Z.defaultFontFamilies,Z.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe}return ce(b,K),b.prototype.ownsTarget=function(B){if(K.prototype.ownsTarget.call(this,B)||B===this.visual||B===this.textElement||B===this.bgRectangle)return!0;var j=!1;return this.textElement.childNodes.forEach(function(Z){Z===B&&(j=!0)}),j},b.prototype.createVisual=function(){this.visual=de.createGroup(),this.bgRectangle=de.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=de.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(de.createTransform()),this.textElement.transform.baseVal.appendItem(de.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},b.prototype.pointerDown=function(B,j){K.prototype.pointerDown.call(this,B,j),this.isMoved=!1,this.pointerDownPoint=B,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(B),this._state="creating")},b.prototype.wrapText=function(){function B(_t){var Xe=_t[0].length;return _t.forEach(function(pt){pt.length>Xe&&(Xe=pt.length)}),.35*Xe/_t.length}if(this.text!==""){for(var j=this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/),Z=1*this.width/this.height,G=new(Array.bind.apply(Array,ge([void 0],j))),oe=B(G),He=Number.MAX_VALUE,ct=function(){var _t=G[0];G.forEach(function(Xe){Xe.length>_t.length&&(_t=Xe)}),(He=_t.lastIndexOf(" ",He-1))>0?(G=[],j.forEach(function(Xe){for(var pt=Xe;pt.length>He;){var wt=pt.lastIndexOf(" ",He);wt<0&&(wt=pt.indexOf(" ")),wt>0?(G.push(pt.substring(0,wt)),pt=pt.substring(wt).trim()):(G.push(pt),pt="")}G.push(pt)}),oe=B(G)):oe=-1};oe>Z;)ct();return G.join(`\r
|
|
`)}return this.text},b.prototype.renderText=function(){var B=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);(this.globalSettings.wrapText?this.wrapText():this.text).split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(j){B.textElement.appendChild(de.createTSpan(j.trim()===""?" ":j.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},b.prototype.getTextScale=function(){var B=this.textElement.getBBox(),j=1;if(B.width>0&&B.height>0){var Z=(1*this.width-this.width*this.padding*2/100)/B.width,G=(1*this.height-this.height*this.padding*2/100)/B.height;j=Math.min(Z,G)}return j},b.prototype.getTextPosition=function(B){var j=window.getComputedStyle(this.textElement).direction==="rtl"?1:-1,Z=this.textElement.getBBox(),G=0,oe=0;return Z.width>0&&Z.height>0&&(G=(this.width+j*Z.width*B)/2,oe=this.height/2-Z.height*B/2),{x:G,y:oe}},b.prototype.sizeText=function(){var B=this.textElement.getBBox(),j=this.getTextScale(),Z=this.getTextPosition(j);Z.y-=B.y*j,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Z.x+"px, "+Z.y+"px) scale("+j+", "+j+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Z.x,Z.y),this.textElement.transform.baseVal.getItem(1).setScale(j,j))},b.prototype.manipulate=function(B){K.prototype.manipulate.call(this,B),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(B.x-this.pointerDownPoint.x)>5||Math.abs(B.y-this.pointerDownPoint.y)>5)},b.prototype.resize=function(B){K.prototype.resize.call(this,B),this.isMoved=!0,this.setSize(),this.globalSettings.wrapText?this.renderText():this.sizeText()},b.prototype.setSize=function(){K.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(de.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),de.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},b.prototype.pointerUp=function(B){var j=this.state;j==="creating"&&(this._suppressMarkerCreateEvent=!0),K.prototype.pointerUp.call(this,B),this.setSize(),(j==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},b.prototype.showTextEditor=function(){var B=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(j){j.stopPropagation()}),this.globalSettings.wrapText||this.textEditor.addEventListener("input",function(){for(var j=Number.parseFloat(B.textEditor.style.fontSize);B.textEditor.clientWidth>=Number.parseInt(B.textEditor.style.maxWidth)&&j>.9;)j-=.1,B.textEditor.style.fontSize=Math.max(j,.9)+"em"}),this.textEditor.addEventListener("keyup",function(j){j.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(j){if(j.clipboardData){var Z=j.clipboardData.getData("text"),G=window.getSelection();if(!G.rangeCount)return!1;G.deleteFromDocument(),G.getRangeAt(0).insertNode(document.createTextNode(Z)),j.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){B.textEditDivClicked(B.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},b.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else if(this.globalSettings.wrapText)this.textEditor.style.left=this.left+this.padding+"px",this.textEditor.style.top=this.top+this.padding+"px",this.textEditor.style.width=this.width-2*this.padding+"px",this.textEditor.style.height=this.height-2*this.padding+"px",this.textEditor.style.maxHeight=this.textEditor.style.height,this.textEditor.style.whiteSpace="wrap";else{this.textElement.style.display="";var B=this.getTextScale(),j=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Z=this.textElement.getBBox(),G={x:Z.width*B,y:Z.height*B};j.x-=G.x/2,j.y-=G.y/2,this.textEditor.style.top=j.y+"px",this.textEditor.style.left=j.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-j.x+"px",this.textEditor.style.fontSize=Math.max(16*B,12)+"px",this.textElement.style.display="none"}},b.prototype.textEditDivClicked=function(B){this.text=B.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},b.prototype.select=function(){K.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},b.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),K.prototype.deselect.call(this)},b.prototype.dblClick=function(B,j){K.prototype.dblClick.call(this,B,j),this.showTextEditor()},b.prototype.setColor=function(B){this.textElement&&de.setAttributes(this.textElement,[["fill",B]]),this.color=B,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(B)},b.prototype.setFont=function(B){this.textElement&&de.setAttributes(this.textElement,[["font-family",B]]),this.fontFamily=B,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},b.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},b.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var B=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text,wrapText:this.globalSettings.wrapText},K.prototype.getState.call(this));return B.typeName=b.typeName,B},b.prototype.restoreState=function(B){var j=B;this.color=j.color,this.fontFamily=j.fontFamily,this.padding=j.padding,this.text=j.text,this.createVisual(),K.prototype.restoreState.call(this,B),this.setSize(),this.globalSettings.wrapText&&this.renderText()},b.prototype.scale=function(B,j){K.prototype.scale.call(this,B,j),this.setSize(),this.sizeText(),this.positionTextEditor()},b.typeName="TextMarker",b.title="Text marker",b.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>',b}(Pe),De=function(K){function b(B,j,Z){var G=K.call(this,B,j,Z)||this;return G.color="transparent",G.lineWidth=3,G.drawing=!1,G.pixelRatio=1,G.color=Z.defaultColor,G.lineWidth=Z.defaultStrokeWidth,G.pixelRatio=Z.freehandPixelRatio,G.setColor=G.setColor.bind(G),G.addCanvas=G.addCanvas.bind(G),G.finishCreation=G.finishCreation.bind(G),G.setLineWidth=G.setLineWidth.bind(G),G.colorPanel=new re("Color",Z.defaultColorSet,Z.defaultColor),G.colorPanel.onColorChanged=G.setColor,G.lineWidthPanel=new Je("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),G.lineWidthPanel.onWidthChanged=G.setLineWidth,G}return ce(b,K),b.prototype.ownsTarget=function(B){return!(!K.prototype.ownsTarget.call(this,B)&&B!==this.visual&&B!==this.drawingImage)},b.prototype.createVisual=function(){this.visual=de.createGroup(),this.drawingImage=de.createImage(),this.visual.appendChild(this.drawingImage);var B=de.createTransform();this.visual.transform.baseVal.appendItem(B),this.addMarkerVisualToContainer(this.visual)},b.prototype.pointerDown=function(B,j){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(B.x,B.y),this.drawing=!0):K.prototype.pointerDown.call(this,B,j)},b.prototype.manipulate=function(B){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(B.x,B.y),this.canvasContext.stroke()):K.prototype.manipulate.call(this,B)},b.prototype.resize=function(B){K.prototype.resize.call(this,B),de.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),de.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},b.prototype.pointerUp=function(B){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):K.prototype.pointerUp.call(this,B)},b.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)},b.prototype.select=function(){this.state==="creating"&&this.finishCreation(),K.prototype.select.call(this)},b.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),K.prototype.deselect.call(this)},b.prototype.finishCreation=function(){for(var B=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),j=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Z=j[0],G=j[1],oe=j[2],He=j[3],ct=!1,_t=0;_t<this.canvasElement.height;_t++)for(var Xe=0;Xe<this.canvasElement.width;Xe++)B.data[_t*this.canvasElement.width*4+4*Xe+3]>0&&(ct=!0,_t<G&&(G=_t),Xe<Z&&(Z=Xe),_t>He&&(He=_t),Xe>oe&&(oe=Xe));if(ct){this.left=Z/this.pixelRatio,this.top=G/this.pixelRatio,this.width=(oe-Z)/this.pixelRatio,this.height=(He-G)/this.pixelRatio;var pt=document.createElement("canvas");pt.width=oe-Z,pt.height=He-G,pt.getContext("2d").putImageData(this.canvasContext.getImageData(Z,G,oe-Z,He-G),0,0),this.drawingImgUrl=pt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},b.prototype.setDrawingImage=function(){de.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),de.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},b.prototype.setColor=function(B){this.color=B,this.colorChanged(B)},b.prototype.setLineWidth=function(B){this.lineWidth=B},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var B=Object.assign({drawingImgUrl:this.drawingImgUrl},K.prototype.getState.call(this));return B.typeName=b.typeName,B},b.prototype.restoreState=function(B){this.createVisual(),K.prototype.restoreState.call(this,B),this.drawingImgUrl=B.drawingImgUrl,this.setDrawingImage()},b.prototype.scale=function(B,j){K.prototype.scale.call(this,B,j),this.setDrawingImage()},b.typeName="FreehandMarker",b.title="Freehand marker",b.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>',b}(Pe),Te=function(K){function b(B,j,Z,G){var oe=K.call(this,B,Z||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>',G||"arrow-type-panel")||this;return oe.typeBoxes=[],oe.currentType=j,oe.setCurrentType=oe.setCurrentType.bind(oe),oe}return ce(b,K),b.prototype.getUi=function(){var B=this,j=document.createElement("div");j.style.display="flex",j.style.overflow="hidden",j.style.flexGrow="2";for(var Z=function(He){var ct="both";switch(He){case 0:ct="both";break;case 1:ct="start";break;case 2:ct="end";break;case 3:ct="none"}var _t=document.createElement("div");if(_t.style.display="flex",_t.style.flexGrow="2",_t.style.alignItems="center",_t.style.justifyContent="space-between",_t.style.padding="5px",_t.style.borderWidth="2px",_t.style.borderStyle="solid",_t.style.borderColor=ct===G.currentType?G.uiStyleSettings.toolboxAccentColor:"transparent",_t.addEventListener("click",function(){B.setCurrentType(ct,_t)}),j.appendChild(_t),ct==="both"||ct==="start"){var Xe=document.createElement("div");Xe.style.display="flex",Xe.style.alignItems="center",Xe.style.minHeight="20px",Xe.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="`+(G.uiStyleSettings!==void 0?G.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Xe.style.marginLeft="5px",_t.appendChild(Xe)}var pt=document.createElement("div");pt.style.display="flex",pt.style.alignItems="center",pt.style.minHeight="20px",pt.style.flexGrow="2";var wt=document.createElement("hr");if(wt.style.minWidth="20px",wt.style.border="0px",wt.style.borderTop="3px solid "+(G.uiStyleSettings!==void 0?G.uiStyleSettings.toolboxColor:"#eeeeee"),wt.style.flexGrow="2",pt.appendChild(wt),_t.appendChild(pt),ct==="both"||ct==="end"){var Kt=document.createElement("div");Kt.style.display="flex",Kt.style.alignItems="center",Kt.style.minHeight="20px",Kt.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="`+(G.uiStyleSettings!==void 0?G.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Kt.style.marginRight="5px",_t.appendChild(Kt)}G.typeBoxes.push(_t)},G=this,oe=0;oe<4;oe++)Z(oe);return j},b.prototype.setCurrentType=function(B,j){var Z=this;this.currentType=B,this.typeBoxes.forEach(function(G){G.style.borderColor=G===j?Z.uiStyleSettings!==void 0?Z.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},b}(X),Oe=function(K){function b(B,j,Z){var G=K.call(this,B,j,Z)||this;return G.arrowType="end",G.arrowBaseHeight=10,G.arrowBaseWidth=10,G.getArrowPoints=G.getArrowPoints.bind(G),G.setArrowType=G.setArrowType.bind(G),G.arrowTypePanel=new Te("Arrow type","end"),G.arrowTypePanel.onArrowTypeChanged=G.setArrowType,G}return ce(b,K),b.prototype.ownsTarget=function(B){return!(!K.prototype.ownsTarget.call(this,B)&&B!==this.arrow1&&B!==this.arrow2)},b.prototype.getArrowPoints=function(B,j){var Z=this.arrowBaseWidth+2*this.strokeWidth,G=this.arrowBaseHeight+2*this.strokeWidth;return B-Z/2+","+(j+G/2)+" "+B+","+(j-G/2)+" "+(B+Z/2)+","+(j+G/2)},b.prototype.createTips=function(){this.arrow1=de.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(de.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=de.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(de.createTransform()),this.visual.appendChild(this.arrow2)},b.prototype.pointerDown=function(B,j){K.prototype.pointerDown.call(this,B,j),this.state==="creating"&&this.createTips()},b.prototype.adjustVisual=function(){if(K.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",de.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),de.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var B=0;Math.abs(this.x1-this.x2)>.1&&(B=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var j=this.arrow1.transform.baseVal.getItem(0);j.setRotate(B,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(j,0);var Z=this.arrow2.transform.baseVal.getItem(0);Z.setRotate(B+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Z,0)}},b.prototype.setArrowType=function(B){this.arrowType=B,this.adjustVisual(),this.stateChanged()},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var B=Object.assign({arrowType:this.arrowType},K.prototype.getState.call(this));return B.typeName=b.typeName,B},b.prototype.restoreState=function(B){K.prototype.restoreState.call(this,B);var j=B;this.arrowType=j.arrowType,this.createTips(),this.adjustVisual()},b.typeName="ArrowMarker",b.title="Arrow marker",b.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',b}(At),le=function(K){function b(B,j,Z){var G=K.call(this,B,j,Z)||this;return G.fillColor=Z.defaultFillColor,G.strokeWidth=0,G.fillPanel=new re("Color",Z.defaultColorSet,Z.defaultFillColor),G.fillPanel.onColorChanged=G.setFillColor,G}return ce(b,K),Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var B=K.prototype.getState.call(this);return B.typeName=b.typeName,B},b.typeName="CoverMarker",b.title="Cover marker",b.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',b}(ke),fe=function(K){function b(B,j,Z,G,oe){var He=K.call(this,B,G||'<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>',oe||"opacity-panel")||this;return He.opacities=[],He.opacityBoxes=[],He.opacities=j,He.currentOpacity=Z,He.setCurrentOpacity=He.setCurrentOpacity.bind(He),He}return ce(b,K),b.prototype.getUi=function(){var B=this,j=document.createElement("div");return j.style.display="flex",j.style.overflow="hidden",j.style.flexGrow="2",j.style.justifyContent="space-between",this.opacities.forEach(function(Z){var G=document.createElement("div");G.style.display="flex",G.style.alignItems="center",G.style.justifyContent="center",G.style.padding="5px",G.style.borderWidth="2px",G.style.borderStyle="solid",G.style.borderColor=Z===B.currentOpacity?B.uiStyleSettings.toolboxAccentColor:"transparent",G.addEventListener("click",function(){B.setCurrentOpacity(Z,G)}),j.appendChild(G);var oe=document.createElement("div");oe.innerText=100*Z+"%",G.appendChild(oe),B.opacityBoxes.push(G)}),j},b.prototype.setCurrentOpacity=function(B,j){var Z=this;this.currentOpacity=B,this.opacityBoxes.forEach(function(G){G.style.borderColor=G===j?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},b}(X),Ce=function(K){function b(B,j,Z){var G=K.call(this,B,j,Z)||this;return G.setOpacity=G.setOpacity.bind(G),G.fillColor=Z.defaultHighlightColor,G.strokeWidth=0,G.opacity=Z.defaultHighlightOpacity,G.fillPanel=new re("Color",Z.defaultColorSet,G.fillColor),G.fillPanel.onColorChanged=G.setFillColor,G.opacityPanel=new fe("Opacity",Z.defaultOpacitySteps,G.opacity),G.opacityPanel.onOpacityChanged=G.setOpacity,G}return ce(b,K),b.prototype.setOpacity=function(B){this.opacity=B,this.visual&&de.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var B=K.prototype.getState.call(this);return B.typeName=b.typeName,B},b.typeName="HighlightMarker",b.title="Highlight marker",b.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>',b}(le),we='<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>',Me='<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>',$e=function(K){function b(B,j,Z){var G=K.call(this,B,j,Z)||this;return G.bgColor="transparent",G.tipPosition={x:0,y:0},G.tipBase1Position={x:0,y:0},G.tipBase2Position={x:0,y:0},G.tipMoving=!1,G.color=Z.defaultStrokeColor,G.bgColor=Z.defaultFillColor,G.fontFamily=Z.defaultFontFamily,G.defaultSize={x:100,y:30},G.setBgColor=G.setBgColor.bind(G),G.getTipPoints=G.getTipPoints.bind(G),G.positionTip=G.positionTip.bind(G),G.setTipPoints=G.setTipPoints.bind(G),G.colorPanel=new re("Text color",Z.defaultColorSet,G.color,we,"text-color-panel"),G.colorPanel.onColorChanged=G.setColor,G.bgColorPanel=new re("Fill color",Z.defaultColorSet,G.bgColor,Me,"fill-color-panel"),G.bgColorPanel.onColorChanged=G.setBgColor,G.fontFamilyPanel=new We("Font",Z.defaultFontFamilies,Z.defaultFontFamily),G.fontFamilyPanel.onFontChanged=G.setFont,G.tipGrip=new ye,G.tipGrip.visual.transform.baseVal.appendItem(de.createTransform()),G.controlBox.appendChild(G.tipGrip.visual),G}return ce(b,K),b.prototype.ownsTarget=function(B){return K.prototype.ownsTarget.call(this,B)||this.tipGrip.ownsTarget(B)||this.tip===B},b.prototype.createTip=function(){de.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=de.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},b.prototype.pointerDown=function(B,j){this.state==="new"&&K.prototype.pointerDown.call(this,B,j),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(j)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):K.prototype.pointerDown.call(this,B,j)},b.prototype.pointerUp=function(B){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,K.prototype.pointerUp.call(this,B);else{var j=this.state==="creating";K.prototype.pointerUp.call(this,B),this.setTipPoints(j),this.positionTip()}},b.prototype.manipulate=function(B){if(this.tipMoving){var j=this.unrotatePoint(B);this.tipPosition={x:j.x-this.manipulationStartLeft,y:j.y-this.manipulationStartTop},this.positionTip()}else K.prototype.manipulate.call(this,B)},b.prototype.setBgColor=function(B){this.bgRectangle&&this.tip&&(de.setAttributes(this.bgRectangle,[["fill",B]]),de.setAttributes(this.tip,[["fill",B]])),this.bgColor=B,this.fillColorChanged(B)},b.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},b.prototype.setTipPoints=function(B){B===void 0&&(B=!1);var j=Math.min(this.height/2,15),Z=this.height/5;B&&(this.tipPosition={x:j+Z/2,y:this.height+20});var G=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?G<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Z=this.width/5,j=Math.min(this.width/2,15),this.tipBase1Position={x:j,y:0},this.tipBase2Position={x:j+Z,y:0}):(this.tipBase1Position={x:0,y:j},this.tipBase2Position={x:0,y:j+Z}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?G<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Z=this.width/5,j=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-j-Z,y:0},this.tipBase2Position={x:this.width-j,y:0}):(this.tipBase1Position={x:this.width,y:j},this.tipBase2Position={x:this.width,y:j+Z}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?G<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Z=this.width/5,j=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-j-Z,y:this.height},this.tipBase2Position={x:this.width-j,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-j-Z},this.tipBase2Position={x:this.width,y:this.height-j}):G<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Z=this.width/5,j=Math.min(this.width/2,15),this.tipBase1Position={x:j,y:this.height},this.tipBase2Position={x:j+Z,y:this.height}):(this.tipBase1Position={x:0,y:this.height-j},this.tipBase2Position={x:0,y:this.height-j-Z})},b.prototype.resize=function(B){K.prototype.resize.call(this,B),this.positionTip()},b.prototype.positionTip=function(){de.setAttributes(this.tip,[["points",this.getTipPoints()]]);var B=this.tipGrip.visual.transform.baseVal.getItem(0);B.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(B,0)},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),b.prototype.select=function(){this.positionTip(),K.prototype.select.call(this)},b.prototype.getState=function(){var B=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},K.prototype.getState.call(this));return B.typeName=b.typeName,B},b.prototype.restoreState=function(B){var j=B;this.bgColor=j.bgColor,this.tipPosition=j.tipPosition,K.prototype.restoreState.call(this,B),this.createTip(),this.setTipPoints()},b.prototype.scale=function(B,j){K.prototype.scale.call(this,B,j),this.tipPosition={x:this.tipPosition.x*B,y:this.tipPosition.y*j},this.positionTip()},b.typeName="CalloutMarker",b.title="Callout marker",b.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>',b}(Ge),Ie=function(K){function b(B,j,Z){var G=K.call(this,B,j,Z)||this;return G.fillColor="transparent",G.strokeColor="transparent",G.strokeWidth=0,G.strokeDasharray="",G.opacity=1,G.strokeColor=Z.defaultColor,G.strokeWidth=Z.defaultStrokeWidth,G.strokeDasharray=Z.defaultStrokeDasharray,G.fillColor=Z.defaultFillColor,G.setStrokeColor=G.setStrokeColor.bind(G),G.setFillColor=G.setFillColor.bind(G),G.setStrokeWidth=G.setStrokeWidth.bind(G),G.setStrokeDasharray=G.setStrokeDasharray.bind(G),G.setOpacity=G.setOpacity.bind(G),G.createVisual=G.createVisual.bind(G),G.strokePanel=new re("Line color",ge(Z.defaultColorSet,["transparent"]),Z.defaultColor,void 0,"stroke-color-panel"),G.strokePanel.onColorChanged=G.setStrokeColor,G.fillPanel=new re("Fill color",ge(Z.defaultColorSet,["transparent"]),G.fillColor,Me,"fill-color-panel"),G.fillPanel.onColorChanged=G.setFillColor,G.strokeWidthPanel=new Je("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),G.strokeWidthPanel.onWidthChanged=G.setStrokeWidth,G.strokeStylePanel=new qe("Line style",Z.defaultStrokeDasharrays,Z.defaultStrokeDasharray),G.strokeStylePanel.onStyleChanged=G.setStrokeDasharray,G.opacityPanel=new fe("Opacity",Z.defaultOpacitySteps,G.opacity),G.opacityPanel.onOpacityChanged=G.setOpacity,G}return ce(b,K),b.prototype.ownsTarget=function(B){return!(!K.prototype.ownsTarget.call(this,B)&&B!==this.visual)},b.prototype.createVisual=function(){this.visual=de.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)},b.prototype.pointerDown=function(B,j){K.prototype.pointerDown.call(this,B,j),this.state==="new"&&(this.createVisual(),this.moveVisual(B),this._state="creating")},b.prototype.manipulate=function(B){K.prototype.manipulate.call(this,B)},b.prototype.resize=function(B){K.prototype.resize.call(this,B),this.setSize()},b.prototype.setSize=function(){K.prototype.setSize.call(this),de.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},b.prototype.pointerUp=function(B){K.prototype.pointerUp.call(this,B),this.setSize()},b.prototype.setStrokeColor=function(B){this.strokeColor=B,this.visual&&de.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(B),this.stateChanged()},b.prototype.setFillColor=function(B){this.fillColor=B,this.visual&&de.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(B),this.stateChanged()},b.prototype.setStrokeWidth=function(B){this.strokeWidth=B,this.visual&&de.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},b.prototype.setStrokeDasharray=function(B){this.strokeDasharray=B,this.visual&&de.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},b.prototype.setOpacity=function(B){this.opacity=B,this.visual&&de.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var B=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},K.prototype.getState.call(this));return B.typeName=b.typeName,B},b.prototype.restoreState=function(B){var j=B;this.fillColor=j.fillColor,this.strokeColor=j.strokeColor,this.strokeWidth=j.strokeWidth,this.strokeDasharray=j.strokeDasharray,this.opacity=j.opacity,this.createVisual(),K.prototype.restoreState.call(this,B),this.setSize()},b.prototype.scale=function(B,j){K.prototype.scale.call(this,B,j),this.setSize()},b.typeName="EllipseMarker",b.title="Ellipse marker",b.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>',b}(Pe),Ye=function(K){function b(B,j,Z){return K.call(this,B,j,Z)||this}return ce(b,K),Object.defineProperty(b.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),b.prototype.ownsTarget=function(B){return!(!K.prototype.ownsTarget.call(this,B)&&B!==this.tip1&&B!==this.tip2)},b.prototype.createTips=function(){this.tip1=de.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(de.createTransform()),this.visual.appendChild(this.tip1),this.tip2=de.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(de.createTransform()),this.visual.appendChild(this.tip2)},b.prototype.pointerDown=function(B,j){K.prototype.pointerDown.call(this,B,j),this.state==="creating"&&this.createTips()},b.prototype.adjustVisual=function(){if(K.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(de.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()]]),de.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 B=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),j=this.tip1.transform.baseVal.getItem(0);j.setRotate(B,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(j,0);var Z=this.tip2.transform.baseVal.getItem(0);Z.setRotate(B+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Z,0)}},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var B=K.prototype.getState.call(this);return B.typeName=b.typeName,B},b.prototype.restoreState=function(B){K.prototype.restoreState.call(this,B),this.createTips(),this.adjustVisual()},b.typeName="MeasurementMarker",b.title="Measurement marker",b.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>',b}(At),tt=function(K){function b(B,j,Z){var G=K.call(this,B,j,Z)||this;return G.strokePanel.colors=Z.defaultColorSet,G.fillColor="transparent",G}return ce(b,K),Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var B=K.prototype.getState.call(this);return B.typeName=b.typeName,B},b.typeName="EllipseFrameMarker",b.title="Ellipse frame marker",b.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>',b}(Ie),at=function(){function K(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(K.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),K.prototype.addUndoStep=function(b){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(b)||(this.undoStack.push(b),JSON.stringify(this.lastRedoStep)!==JSON.stringify(b)&&this.redoStack.splice(0,this.redoStack.length))},K.prototype.replaceLastUndoStep=function(b){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=b)},K.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},K.prototype.undo=function(){if(this.undoStack.length>1){var b=this.undoStack.pop();return b!==void 0&&this.redoStack.push(b),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},K.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},K}(),mt=function(K){function b(B,j,Z){var G=K.call(this,B,j,Z)||this;return G.strokeColor="transparent",G.strokeWidth=0,G.strokeDasharray="",G.curveX=0,G.curveY=0,G.manipulationStartCurveX=0,G.manipulationStartCurveY=0,G.setStrokeColor=G.setStrokeColor.bind(G),G.setStrokeWidth=G.setStrokeWidth.bind(G),G.setStrokeDasharray=G.setStrokeDasharray.bind(G),G.positionGrips=G.positionGrips.bind(G),G.addControlGrips=G.addControlGrips.bind(G),G.adjustVisual=G.adjustVisual.bind(G),G.setupControlBox=G.setupControlBox.bind(G),G.resize=G.resize.bind(G),G.strokeColor=Z.defaultColor,G.strokeWidth=Z.defaultStrokeWidth,G.strokeDasharray=Z.defaultStrokeDasharray,G.strokePanel=new re("Line color",Z.defaultColorSet,Z.defaultColor),G.strokePanel.onColorChanged=G.setStrokeColor,G.strokeWidthPanel=new Je("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),G.strokeWidthPanel.onWidthChanged=G.setStrokeWidth,G.strokeStylePanel=new qe("Line style",Z.defaultStrokeDasharrays,Z.defaultStrokeDasharray),G.strokeStylePanel.onStyleChanged=G.setStrokeDasharray,G}return ce(b,K),b.prototype.ownsTarget=function(B){return!(!K.prototype.ownsTarget.call(this,B)&&B!==this.visual&&B!==this.selectorCurve&&B!==this.visibleCurve&&!this.curveGrip.ownsTarget(B))},b.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},b.prototype.createVisual=function(){this.visual=de.createGroup(),this.selectorCurve=de.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=de.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)},b.prototype.pointerDown=function(B,j){K.prototype.pointerDown.call(this,B,j),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=B.x,this.curveY=B.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(j)&&(this.activeGrip=this.curveGrip,this._state="resize")},b.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),de.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),de.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),de.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},b.prototype.setupControlBox=function(){K.prototype.setupControlBox.call(this),this.curveControlLine1=de.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=de.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)},b.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,K.prototype.addControlGrips.call(this)},b.prototype.positionGrips=function(){K.prototype.positionGrips.call(this);var B=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-B/2,this.curveY-B/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()))},b.prototype.manipulate=function(B){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+B.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+B.y-this.manipulationStartY),K.prototype.manipulate.call(this,B)},b.prototype.resize=function(B){this.activeGrip===this.curveGrip&&(this.curveX=B.x,this.curveY=B.y),K.prototype.resize.call(this,B),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},b.prototype.setStrokeColor=function(B){this.strokeColor=B,this.adjustVisual(),this.colorChanged(B)},b.prototype.setStrokeWidth=function(B){this.strokeWidth=B,this.adjustVisual()},b.prototype.setStrokeDasharray=function(B){this.strokeDasharray=B,this.adjustVisual()},b.prototype.scale=function(B,j){this.curveX=this.curveX*B,this.curveY=this.curveY*j,K.prototype.scale.call(this,B,j)},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var B=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},K.prototype.getState.call(this));return B.typeName=b.typeName,B},b.prototype.restoreState=function(B){K.prototype.restoreState.call(this,B);var j=B;this.strokeColor=j.strokeColor,this.strokeWidth=j.strokeWidth,this.strokeDasharray=j.strokeDasharray,this.curveX=j.curveX,this.curveY=j.curveY,this.createVisual(),this.adjustVisual()},b.typeName="CurveMarker",b.title="Curve marker",b.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>',b}(et),ft=function(K){function b(B,j,Z){var G=K.call(this,B,j,Z)||this;return G.fillColor="transparent",G.strokeColor="transparent",G.strokeWidth=0,G.strokeDasharray="",G.textColor="transparent",G.fontSize="1rem",G.isMoved=!1,G.captionText="Caption",G.PADDING=5,G.captionBoxWidth=0,G.captionBoxHeight=0,G.strokeColor=Z.defaultColor,G.strokeWidth=Z.defaultStrokeWidth,G.strokeDasharray=Z.defaultStrokeDasharray,G.fillColor=Z.defaultFillColor,G.textColor=Z.defaultStrokeColor,G.fontFamily=Z.defaultFontFamily,G.fontSize=Z.defaultCaptionFontSize,G.captionText=Z.defaultCaptionText,G.setStrokeColor=G.setStrokeColor.bind(G),G.setFillColor=G.setFillColor.bind(G),G.setStrokeWidth=G.setStrokeWidth.bind(G),G.setStrokeDasharray=G.setStrokeDasharray.bind(G),G.createVisual=G.createVisual.bind(G),G.sizeCaption=G.sizeCaption.bind(G),G.setCaptionText=G.setCaptionText.bind(G),G.showTextEditor=G.showTextEditor.bind(G),G.positionTextEditor=G.positionTextEditor.bind(G),G.finishTextEditing=G.finishTextEditing.bind(G),G.setFont=G.setFont.bind(G),G.setTextColor=G.setTextColor.bind(G),G.strokePanel=new re("Line color",ge(Z.defaultColorSet,["transparent"]),G.strokeColor,void 0,"stroke-color-panel"),G.strokePanel.onColorChanged=G.setStrokeColor,G.fillPanel=new re("Fill color",ge(Z.defaultColorSet,["transparent"]),G.fillColor,Me,"fill-color-panel"),G.fillPanel.onColorChanged=G.setFillColor,G.strokeWidthPanel=new Je("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),G.strokeWidthPanel.onWidthChanged=G.setStrokeWidth,G.strokeStylePanel=new qe("Line style",Z.defaultStrokeDasharrays,Z.defaultStrokeDasharray),G.strokeStylePanel.onStyleChanged=G.setStrokeDasharray,G.fontFamilyPanel=new We("Font",Z.defaultFontFamilies,Z.defaultFontFamily),G.fontFamilyPanel.onFontChanged=G.setFont,G.textColorPanel=new re("Text color",Z.defaultColorSet,G.textColor,we,"text-color-panel"),G.textColorPanel.onColorChanged=G.setTextColor,G}return ce(b,K),b.prototype.ownsTarget=function(B){return!(!K.prototype.ownsTarget.call(this,B)&&B!==this.visual&&B!==this.frame&&B!==this.captionBg&&B!==this.captionElement)},b.prototype.createVisual=function(){this.visual=de.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=de.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=de.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=de.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},b.prototype.setCaptionText=function(B){this.captionText=B,this.captionElement.textContent=this.captionText,this.sizeCaption()},b.prototype.pointerDown=function(B,j){K.prototype.pointerDown.call(this,B,j),this.isMoved=!1,this.pointerDownPoint=B,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(B),this._state="creating")},b.prototype.manipulate=function(B){K.prototype.manipulate.call(this,B),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(B.x-this.pointerDownPoint.x)>5||Math.abs(B.y-this.pointerDownPoint.y)>5)},b.prototype.resize=function(B){K.prototype.resize.call(this,B),this.setSize()},b.prototype.sizeCaption=function(){var B=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=B.width+2*this.PADDING,this.captionBoxHeight=B.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),de.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),de.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},b.prototype.showTextEditor=function(){var B=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.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(j){j.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(j){j.key==="Enter"&&B.finishTextEditing(B.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(j){j.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){B.finishTextEditing(B.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){B.finishTextEditing(B.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},b.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},b.prototype.finishTextEditing=function(B){this.setCaptionText(B.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},b.prototype.setFont=function(B){this.captionElement&&de.setAttributes(this.captionElement,[["font-family",B]]),this.fontFamily=B,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},b.prototype.setTextColor=function(B){this.captionElement&&de.setAttributes(this.captionElement,[["fill",B]]),this.textColor=B,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},b.prototype.setSize=function(){K.prototype.setSize.call(this),de.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},b.prototype.pointerUp=function(B){K.prototype.pointerUp.call(this,B),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},b.prototype.dblClick=function(B,j){K.prototype.dblClick.call(this,B,j),this.showTextEditor()},b.prototype.setStrokeColor=function(B){this.strokeColor=B,this.frame&&de.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(B),this.stateChanged()},b.prototype.setFillColor=function(B){this.fillColor=B,this.captionBg&&de.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(B),this.stateChanged()},b.prototype.setStrokeWidth=function(B){this.strokeWidth=B,this.frame&&de.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},b.prototype.setStrokeDasharray=function(B){this.strokeDasharray=B,this.frame&&de.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var B=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},K.prototype.getState.call(this));return B.typeName=this.typeName,B},b.prototype.restoreState=function(B){var j=B;this.fillColor=j.fillColor,this.strokeColor=j.strokeColor,this.strokeWidth=j.strokeWidth,this.strokeDasharray=j.strokeDasharray,this.textColor=j.textColor,this.fontFamily=j.fontFamily,this.captionText=j.captionText,this.fontSize=j.fontSize,this.createVisual(),K.prototype.restoreState.call(this,B),this.setSize()},b.prototype.scale=function(B,j){K.prototype.scale.call(this,B,j),this.setSize()},b.typeName="CaptionFrameMarker",b.title="Caption frame marker",b.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',b}(Pe),Ze=function(){function K(b,B){B===void 0&&(B=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=b,this.cancelable=B}return Object.defineProperty(K.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),K.prototype.preventDefault=function(){this._defaultPrevented=!0},K}(),yt=function(K){function b(B,j,Z){var G=K.call(this,B,!1)||this;return G.dataUrl=j,G.state=Z,G}return ce(b,K),b}(Ze),lt=function(K){function b(B,j,Z){Z===void 0&&(Z=!1);var G=K.call(this,B,Z)||this;return G.marker=j,G}return ce(b,K),b}(Ze),gt=function(){function K(){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 K.prototype.addEventListener=function(b,B){this[b].push(B)},K.prototype.removeEventListener=function(b,B){var j=this[b].indexOf(B);j>-1&&this[b].splice(j,1)},K}(),xt=function(){function K(b){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new rt,this._isOpen=!1,this.undoRedoManager=new at,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 gt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=K.instanceCounter++,this.styles=new Ne(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=b,this.targetRoot=document.body,this.width=b.clientWidth,this.height=b.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),this.addMarkerEvents=this.addMarkerEvents.bind(this)}return Object.defineProperty(K.prototype,"ALL_MARKER_TYPES",{get:function(){return[it,De,Oe,Ge,tt,Ie,Ce,$e,Ye,le,At,mt,ft]},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[it,De,Oe,Ge,Ie,Ce,$e]},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"BASIC_MARKER_TYPES",{get:function(){return[it,De,Oe,Ge,Ce]},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(b){var B=this;this._availableMarkerTypes.splice(0),b.forEach(function(j){if(typeof j=="string"){var Z=B.ALL_MARKER_TYPES.find(function(G){return G.typeName===j});Z!==void 0&&B._availableMarkerTypes.push(Z)}else B._availableMarkerTypes.push(j)})},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(b){this._zoomLevel=b,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(K.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),K.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Fe.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},K.prototype.show=function(){var b=this;this.styles.styleSheetRoot===void 0&&Ve.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ve.styleSheetRoot),this.markers.splice(0),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(B){return B(new Ze(b))})},K.prototype.render=function(){return ie(this,void 0,void 0,function(){var b;return xe(this,function(B){switch(B.label){case 0:return this.setCurrentMarker(),(b=new Qe).naturalSize=this.renderAtNaturalSize,b.imageType=this.renderImageType,b.imageQuality=this.renderImageQuality,b.markersOnly=this.renderMarkersOnly,b.width=this.renderWidth,b.height=this.renderHeight,[4,b.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return B.sent(),[4,b.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,B.sent()]}})})},K.prototype.close=function(b){var B=this;if(b===void 0&&(b=!1),this.isOpen){var j=!1;b||this.eventListeners.beforeclose.forEach(function(Z){var G=new Ze(B,!0);Z(G),G.defaultPrevented&&(j=!0)}),j||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(Z){return Z(new Ze(B))}),this.detachEvents(),this._isOpen=!1)}},K.prototype.addMarkersToToolbar=function(){for(var b,B=[],j=0;j<arguments.length;j++)B[j]=arguments[j];(b=this._availableMarkerTypes).push.apply(b,B)},K.prototype.addRenderEventListener=function(b){this.addEventListener("render",function(B){b(B.dataUrl,B.state)})},K.prototype.removeRenderEventListener=function(b){},K.prototype.addCloseEventListener=function(b){this.addEventListener("close",function(){b()})},K.prototype.removeCloseEventListener=function(b){},K.prototype.setupResizeObserver=function(){var b=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){b.resize(b.target.clientWidth,b.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return b.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},K.prototype.onPopupTargetResize=function(){var b=1*this.target.clientWidth/this.target.clientHeight,B=this.editorCanvas.clientWidth/b>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*b:this.editorCanvas.clientWidth,j=B<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/b;this.resize(B,j)},K.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},K.prototype.resize=function(b,B){this._isResizing=!0;var j=b/this.imageWidth,Z=B/this.imageHeight;this.imageWidth=Math.round(b),this.imageHeight=Math.round(B),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(j,Z),this._isResizing=!1},K.prototype.scaleMarkers=function(b,B){var j,Z=this;this._currentMarker&&this._currentMarker instanceof Ge?this._currentMarker.scale(b,B):(j=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(G){G!==Z._currentMarker&&G.scale(b,B)}),j!==void 0&&this.setCurrentMarker(j)},K.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"},K.prototype.setTopLeft=function(){var b=this.editingTarget.getBoundingClientRect(),B=this.editorCanvas.getBoundingClientRect();this.left=b.left-B.left,this.top=b.top-B.top},K.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)},K.prototype.addDefs=function(){for(var b,B=[],j=0;j<arguments.length;j++)B[j]=arguments[j];this.defs=de.createDefs(),this.addDefsToImage(),(b=this.defs).append.apply(b,B)},K.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},K.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)},K.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},K.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("touchmove",function(b){return b.preventDefault()}),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},K.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)},K.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},K.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)},K.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 b=document.createElement("a");b.href="https://markerjs.com/",b.target="_blank",b.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>',b.title="Powered by marker.js",b.style.display="grid",b.style.alignItems="center",b.style.justifyItems="center",b.style.padding="3px",b.style.width="20px",b.style.height="20px",this.logoUI.appendChild(b),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},K.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")},K.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"},K.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},K.prototype.showUI=function(){var b;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 B=this.settings.uiOffsetTop!==void 0?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0,j=this.target.offsetLeft+((b=this.settings.uiOffsetLeft)!==null&&b!==void 0?b:0);this.coverDiv.style.top=B+"px",this.coverDiv.style.left=j+"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="fixed",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.settings.displayMode==="popup"&&(this.uiDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px"),this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new k(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.settings.displayMode==="inline"&&this.settings.uiOffsetTop===void 0&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new z(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},K.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv),this.coverDiv.remove(),this.coverDiv=null},K.prototype.removeMarker=function(b){this.markerImage.removeChild(b.container),this.markers.indexOf(b)>-1&&this.markers.splice(this.markers.indexOf(b),1),b.dispose()},K.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())},K.prototype.toolbarButtonClicked=function(b,B){if(b==="marker"&&B!==void 0)this.createNewMarker(B);else if(b==="action")switch(B){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()}},K.prototype.deleteSelectedMarker=function(){var b=this;if(this._currentMarker!==void 0&&this._currentMarker.state==="select"){var B=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Z){var G=new lt(b,b._currentMarker,!0);Z(G),G.defaultPrevented&&(B=!0)}),!B){var j=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 lt(b,j))})}}},K.prototype.clear=function(){var b=this,B=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(oe){var He=new lt(b,void 0,!0);oe(He),He.defaultPrevented&&(B=!0)}),!B)){this.setCurrentMarker();for(var j=function(oe){var He=Z.markers[oe];Z.setCurrentMarker(Z.markers[oe]),Z._currentMarker.dispose(),Z.markerImage.removeChild(Z._currentMarker.container),Z.markers.splice(Z.markers.indexOf(Z._currentMarker),1),Z.eventListeners.markerdelete.forEach(function(ct){return ct(new lt(b,He))})},Z=this,G=this.markers.length-1;G>=0;G--)j(G);this.addUndoStep()}},Object.defineProperty(K.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),K.prototype.showNotesEditor=function(){var b;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=(b=this._currentMarker.notes)!==null&&b!==void 0?b:"",this.overlayContainer.appendChild(this.notesArea))},K.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)},K.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},K.prototype.addUndoStep=function(){var b=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var B=this.getState(),j=this.undoRedoManager.getLastUndoStep();if(!j||j.width===B.width&&j.height===B.height){var Z=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(B),Z<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(G){return G(new Ze(b))})}else this.undoRedoManager.replaceLastUndoStep(B)}},K.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},K.prototype.undoStep=function(){var b=this,B=this.undoRedoManager.undo();B!==void 0&&(this.restoreState(B),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(j){return j(new Ze(b))}))},K.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},K.prototype.redoStep=function(){var b=this,B=this.undoRedoManager.redo();B!==void 0&&(this.restoreState(B),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(j){return j(new Ze(b))}))},K.prototype.stepZoom=function(){var b=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=b<this.zoomSteps.length-1?this.zoomSteps[b+1]:this.zoomSteps[0]},K.prototype.panTo=function(b){this.contentDiv.scrollBy({left:this.prevPanPoint.x-b.x,top:this.prevPanPoint.y-b.y}),this.prevPanPoint=b},K.prototype.startRenderAndClose=function(){return ie(this,void 0,void 0,function(){var b,B,j=this;return xe(this,function(Z){switch(Z.label){case 0:return[4,this.render()];case 1:return b=Z.sent(),B=this.getState(),this.eventListeners.render.forEach(function(G){return G(new yt(j,b,B))}),this.close(!0),[2]}})})},K.prototype.getState=function(b){b===!0&&this.setCurrentMarker();var B={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(j){return B.markers.push(j.getState())}),B},K.prototype.restoreState=function(b){var B=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);b.markers.forEach(function(j){var Z=B._availableMarkerTypes.find(function(oe){return oe.typeName===j.typeName});if(Z!==void 0){var G=B.addNewMarker(Z);G.restoreState(j),B.addMarkerEvents(G),B.markers.push(G)}}),b.width&&b.height&&(b.width!==this.imageWidth||b.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/b.width,this.imageHeight/b.height),this.eventListeners.restorestate.forEach(function(j){return j(new Ze(B))})},K.prototype.addNewMarker=function(b){var B=de.createGroup();return this.markerImage.appendChild(B),new b(B,this.overlayContainer,this.settings)},K.prototype.createNewMarker=function(b){var B,j=this;(B=typeof b=="string"?this._availableMarkerTypes.find(function(Z){return Z.typeName===b}):b)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(B),this.addMarkerEvents(this._currentMarker),this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(B.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Z){return Z(new lt(j,j._currentMarker))}))},K.prototype.addMarkerEvents=function(b){b.onMarkerCreated=this.markerCreated,b.onColorChanged=this.colorChanged,b.onFillColorChanged=this.fillColorChanged,b.onStateChanged=this.markerStateChanged},K.prototype.markerCreated=function(b){var B=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(b),this.setCurrentMarker(b),b instanceof De&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(De):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(j){return j(new lt(B,b))})},K.prototype.colorChanged=function(b){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=b,this.settings.defaultStrokeColor=b)},K.prototype.fillColorChanged=function(b){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=b)},K.prototype.markerStateChanged=function(b){var B=this;this.eventListeners.markerchange.forEach(function(j){return j(new lt(B,b))})},K.prototype.setCurrentMarker=function(b){var B=this;this._currentMarker!==b&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(j){return j(new lt(B,B._currentMarker))})),this._currentMarker=b,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(j){return j(new lt(B,B._currentMarker))}))},K.prototype.onPointerDown=function(b){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||b.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var B=this.markers.find(function(j){return j.ownsTarget(b.target)});B!==void 0?(this.setCurrentMarker(B),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(b.clientX,b.clientY),b.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:b.clientX,y:b.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(b.clientX,b.clientY))},K.prototype.onDblClick=function(b){if(this._isFocused||this.focus(),this.mode==="select"){var B=this.markers.find(function(j){return j.ownsTarget(b.target)});B!==void 0&&B!==this._currentMarker&&this.setCurrentMarker(B),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(b.clientX,b.clientY),b.target):this.setCurrentMarker()}},K.prototype.onPointerMove=function(b){this.touchPoints!==1&&b.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||b.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(b.clientX,b.clientY)):this.zoomLevel>1&&this.panTo({x:b.clientX,y:b.clientY}))},K.prototype.onPointerUp=function(b){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(b.clientX,b.clientY)),this.isDragging=!1,this.addUndoStep()},K.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},K.prototype.onKeyUp=function(b){this._currentMarker===void 0||this.notesArea!==void 0||b.key!=="Delete"&&b.key!=="Backspace"||this.deleteSelectedMarker()},K.prototype.clientToLocalCoordinates=function(b,B){var j=this.markerImage.getBoundingClientRect(),Z=j.width/this.imageWidth/this.zoomLevel,G=j.height/this.imageHeight/this.zoomLevel;return{x:(b-j.left)/this.zoomLevel/Z,y:(B-j.top)/this.zoomLevel/G}},K.prototype.onWindowResize=function(){this.positionUI()},K.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var b=this.target.getClientRects(),B=b.length>0&&b.item(0)&&b.item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=B+"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()},K.prototype.addLicenseKey=function(b){Fe.addKey(b)},K.prototype.addEventListener=function(b,B){this.eventListeners.addEventListener(b,B)},K.prototype.removeEventListener=function(b,B){this.eventListeners.removeEventListener(b,B)},K.prototype.renderState=function(b){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(b),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(K.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),K.prototype.focus=function(){var b=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(B){return B(new Ze(b))}))},K.prototype.blur=function(){var b=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(B){return B(new Ze(b))}))},K.instanceCounter=0,K}();/* **********************************
|
|
cropro version 1.6.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 bt=function(K,b){return(bt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(B,j){B.__proto__=j}||function(B,j){for(var Z in j)Object.prototype.hasOwnProperty.call(j,Z)&&(B[Z]=j[Z])})(K,b)};function Ot(K,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function B(){this.constructor=K}bt(K,b),K.prototype=b===null?Object.create(b):(B.prototype=b.prototype,new B)}function Tt(K,b,B,j){return new(B||(B=Promise))(function(Z,G){function oe(_t){try{ct(j.next(_t))}catch(Xe){G(Xe)}}function He(_t){try{ct(j.throw(_t))}catch(Xe){G(Xe)}}function ct(_t){var Xe;_t.done?Z(_t.value):(Xe=_t.value,Xe instanceof B?Xe:new B(function(pt){pt(Xe)})).then(oe,He)}ct((j=j.apply(K,b||[])).next())})}function Vt(K,b){var B,j,Z,G,oe={label:0,sent:function(){if(1&Z[0])throw Z[1];return Z[1]},trys:[],ops:[]};return G={next:He(0),throw:He(1),return:He(2)},typeof Symbol=="function"&&(G[Symbol.iterator]=function(){return this}),G;function He(ct){return function(_t){return function(Xe){if(B)throw new TypeError("Generator is already executing.");for(;oe;)try{if(B=1,j&&(Z=2&Xe[0]?j.return:Xe[0]?j.throw||((Z=j.return)&&Z.call(j),0):j.next)&&!(Z=Z.call(j,Xe[1])).done)return Z;switch(j=0,Z&&(Xe=[2&Xe[0],Z.value]),Xe[0]){case 0:case 1:Z=Xe;break;case 4:return oe.label++,{value:Xe[1],done:!1};case 5:oe.label++,j=Xe[1],Xe=[0];continue;case 7:Xe=oe.ops.pop(),oe.trys.pop();continue;default:if(!(Z=oe.trys,(Z=Z.length>0&&Z[Z.length-1])||Xe[0]!==6&&Xe[0]!==2)){oe=0;continue}if(Xe[0]===3&&(!Z||Xe[1]>Z[0]&&Xe[1]<Z[3])){oe.label=Xe[1];break}if(Xe[0]===6&&oe.label<Z[1]){oe.label=Z[1],Z=Xe;break}if(Z&&oe.label<Z[2]){oe.label=Z[2],oe.ops.push(Xe);break}Z[2]&&oe.ops.pop(),oe.trys.pop();continue}Xe=b.call(K,oe)}catch(pt){Xe=[6,pt],j=0}finally{B=Z=0}if(5&Xe[0])throw Xe[1];return{value:Xe[0]?Xe[1]:void 0,done:!0}}([ct,_t])}}}var Zt=function(){function K(){}return K.addKey=function(b){K.key=b},Object.defineProperty(K,"isLicensed",{get:function(){return!!K.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(K.key)},enumerable:!1,configurable:!0}),K}(),ut=function(){function K(){}return K.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},K.setAttributes=function(b,B){for(var j=0,Z=B;j<Z.length;j++){var G=Z[j],oe=G[0],He=G[1];b.setAttribute(oe,He)}},K.createRect=function(b,B,j){var Z=document.createElementNS("http://www.w3.org/2000/svg","rect");return Z.setAttribute("width",b.toString()),Z.setAttribute("height",B.toString()),j&&K.setAttributes(Z,j),Z},K.createLine=function(b,B,j,Z,G){var oe=document.createElementNS("http://www.w3.org/2000/svg","line");return oe.setAttribute("x1",b.toString()),oe.setAttribute("y1",B.toString()),oe.setAttribute("x2",j.toString()),oe.setAttribute("y2",Z.toString()),G&&K.setAttributes(oe,G),oe},K.createPolygon=function(b,B){var j=document.createElementNS("http://www.w3.org/2000/svg","polygon");return j.setAttribute("points",b),B&&K.setAttributes(j,B),j},K.createCircle=function(b,B){var j=document.createElementNS("http://www.w3.org/2000/svg","circle");return j.setAttribute("cx",(b/2).toString()),j.setAttribute("cy",(b/2).toString()),j.setAttribute("r",b.toString()),B&&K.setAttributes(j,B),j},K.createEllipse=function(b,B,j){var Z=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Z.setAttribute("cx",(b/2).toString()),Z.setAttribute("cy",(B/2).toString()),Z.setAttribute("rx",(b/2).toString()),Z.setAttribute("ry",(B/2).toString()),j&&K.setAttributes(Z,j),Z},K.createGroup=function(b){var B=document.createElementNS("http://www.w3.org/2000/svg","g");return b&&K.setAttributes(B,b),B},K.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},K.createMarker=function(b,B,j,Z,G,oe,He){var ct=document.createElementNS("http://www.w3.org/2000/svg","marker");return K.setAttributes(ct,[["id",b],["orient",B],["markerWidth",j.toString()],["markerHeight",Z.toString()],["refX",G.toString()],["refY",oe.toString()]]),ct.appendChild(He),ct},K.createText=function(b){var B=document.createElementNS("http://www.w3.org/2000/svg","text");return B.setAttribute("x","0"),B.setAttribute("y","0"),b&&K.setAttributes(B,b),B},K.createTSpan=function(b,B){var j=document.createElementNS("http://www.w3.org/2000/svg","tspan");return j.textContent=b,B&&K.setAttributes(j,B),j},K.createImage=function(b){var B=document.createElementNS("http://www.w3.org/2000/svg","image");return b&&K.setAttributes(B,b),B},K.createPoint=function(b,B){var j=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return j.x=b,j.y=B,j},K.createPath=function(b,B){var j=document.createElementNS("http://www.w3.org/2000/svg","path");return j.setAttribute("d",b),B&&K.setAttributes(j,B),j},K.createElement=function(b,B){var j=document.createElementNS("http://www.w3.org/2000/svg",b);return B&&K.setAttributes(j,B),j},K.getHollowRectanglePath=function(b,B,j,Z,G,oe,He,ct){return"M"+b+","+B+"V"+(B+Z)+"H"+(b+j)+"V"+B+"H"+G+"V"+oe+"H"+(G+He)+"V"+(oe+ct)+"H"+G+"V"+B+"Z"},K}(),Et=function(){function K(b){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+b+"_"}return Object.defineProperty(K.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(K.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(K.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),K.prototype.addClass=function(b){return this.styleSheet===void 0&&this.addStyleSheet(),b.name=""+this.classNamePrefix+b.localName,this.classes.push(b),this.styleSheet.sheet.insertRule("."+b.name+" {"+b.style+"}",this.styleSheet.sheet.cssRules.length),b},K.prototype.addRule=function(b){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(b),this.styleSheet.sheet.insertRule(b.selector+" {"+b.style+"}",this.styleSheet.sheet.cssRules.length)},K.prototype.addStyleSheet=function(){var b;this.styleSheet=document.createElement("style"),((b=this.styleSheetRoot)!==null&&b!==void 0?b:document.head).appendChild(this.styleSheet),this.addRule(new Lt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Lt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new Lt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new Ht("_fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new Ht("_fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},K.prototype.removeStyleSheet=function(){var b;this.styleSheet&&(((b=this.styleSheetRoot)!==null&&b!==void 0?b:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},K}(),Lt=function(K,b){this.selector=K,this.style=b},Ht=function(K,b){this.localName=K,this.style=b},mr=function(){function K(){this.blocks=[],this.display=""}return K.prototype.addButtonBlock=function(b){b.className=this.blockClassName,b.buttonClassName=this.buttonClassName,b.buttonColorsClassName=this.buttonColorsClassName,b.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(b)},K.prototype.addElementBlock=function(b){b.className===void 0&&(b.className=this.blockClassName),this.blocks.push(b)},K.prototype.getUI=function(){var b=document.createElement("div");return b.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,b.style.display=this.display,this.blocks.forEach(function(B){return b.appendChild(B.getUI())}),b},K}(),_r=function(){function K(){}return K.prototype.getUI=function(){var b=document.createElement("div");if(b.className=this.className,this.minWidth!==void 0&&(b.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":b.style.justifyContent="flex-start";break;case"center":b.style.justifyContent="center";break;case"end":b.style.justifyContent="flex-end"}return b.style.whiteSpace="nowrap",b},K}(),Ar=function(K){function b(){var B=K!==null&&K.apply(this,arguments)||this;return B.buttons=[],B}return Ot(b,K),b.prototype.addButton=function(B){B.className=this.buttonClassName,B.colorsClassName=this.buttonColorsClassName,B.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(B)},b.prototype.getUI=function(){var B=K.prototype.getUI.call(this);return this.buttons.forEach(function(j){return B.appendChild(j.getUI())}),B},b}(_r),nr=function(){function K(b,B){this._isActive=!1,this._isHidden=!1,this._icon=b,this.title=B,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(K.prototype,"icon",{get:function(){return this._icon},set:function(b){this._icon=b,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"isActive",{get:function(){return this._isActive},set:function(b){this._isActive=b,this.adjustClassName()},enumerable:!1,configurable:!0}),K.prototype.getUI=function(){var b=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.setAttribute("role","button"),this.buttonContainer.setAttribute("aria-label",this.title),this.buttonContainer.setAttribute("data-action",this.title),this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return b.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},K.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,"")))},K.prototype.hide=function(){this._isHidden=!0},K}(),Mt=function(K){function b(){var B=K!==null&&K.apply(this,arguments)||this;return B.elements=[],B}return Ot(b,K),b.prototype.addElement=function(B){this.elements.push(B)},b.prototype.getUI=function(){var B=K.prototype.getUI.call(this);return this.elements.forEach(function(j){return B.appendChild(j)}),B},b}(_r),sr=function(){function K(b,B){this.horizontal=b,this.vertical=B}return Object.defineProperty(K.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),K.prototype.getVerticalLength=function(b){return b/this.ratio},K.prototype.getHorizontalLength=function(b){return b*this.ratio},K}(),Er=function(){function K(){}return K.getIcon=function(b,B){if(b>0&&B>0){var j=new sr(b,B),Z=j.ratio>=1?20:j.getHorizontalLength(20),G=j.ratio<1?20:j.getVerticalLength(20),oe=document.createElementNS("http://www.w3.org/2000/svg","svg");oe.setAttribute("xmlns","http://www.w3.org/2000/svg"),oe.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(oe);var He=ut.createDefs();oe.appendChild(He);var ct=ut.createElement("clipPath",[["id","text-bg-clip"]]);He.appendChild(ct);var _t=ut.createPath(ut.getHollowRectanglePath((24-Z)/2,(24-G)/2,Z,G,(24-Z)/2+2,(24-G)/2+2,Z-4,G-4));oe.appendChild(_t);var Xe=ut.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Xe.appendChild(ut.createTSpan(b+":"+B)),oe.appendChild(Xe);var pt=Xe.getBBox();ut.setAttributes(Xe,[["x",((24-pt.width)/2).toString()],["y",((24-pt.height)/2-pt.y).toString()]]);var wt=ut.createPath(ut.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(pt.width))/2,(24-Math.ceil(pt.height))/2,Math.ceil(pt.width),Math.ceil(pt.height)));return ct.appendChild(wt),ut.setAttributes(_t,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(oe),oe.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>'},K}(),ur=function(K){function b(B,j,Z){var G=K.call(this,B,j)||this;return G.isDropdownOpen=!1,G.onClick=G.dropdownButtonClicked,G.dropdownButtons=Z,G}return Ot(b,K),b.prototype.setupDropdown=function(){var B=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(j){j.className=B.className,j.colorsClassName=B.colorsClassName,B.dropdownBlock.appendChild(j.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},b.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},b.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},b.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},b.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},b.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},b}(nr),kt=function(){function K(b,B){this.GRIP_SIZE=10,this.color=b,this.fillColor=B,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 K.prototype.ownsTarget=function(b){return b===this.visual||b===this.visual.childNodes[0]||b===this.visual.childNodes[1]},K.prototype.setCenter=function(b,B){this.visual.childNodes.forEach(function(j){return ut.setAttributes(j,[["cx",b.toString()],["cy",B.toString()]])})},K}(),zt=function(){function K(b,B,j,Z){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this._zoomToCropEnabled=!1,this.cropRectChanged=!1,this.canvasWidth=b,this.canvasHeight=B,this.margin=j,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(K.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(b){this._aspectRatio=b,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(b){this._isGridVisible=b,this.gridContainer&&ut.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(b){this._zoomFactor=b,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"zoomToCropEnabled",{set:function(b){this._zoomToCropEnabled=b},enumerable:!1,configurable:!0}),K.prototype.open=function(){var b=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 B=0;B<this.numberOfGridLines;B++)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(j){return b.gridContainer.appendChild(j)}),this.verticalGridLines.forEach(function(j){return b.gridContainer.appendChild(j)}),this.cropRectElement=ut.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new kt(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new kt(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new kt(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new kt(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},K.prototype.setCropRectangle=function(b){this.cropRect=b;var B=Object.assign({},this.cropRect);this._zoomToCropEnabled&&(B.width=this.cropRect.width*this.zoomFactor,B.height=this.cropRect.height*this.zoomFactor,B.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-B.width/2,B.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-B.height/2),ut.setAttributes(this.cropRectElement,[["x",B.x.toString()],["y",B.y.toString()],["width",B.width.toString()],["height",B.height.toString()]]);var j=B.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(G,oe){var He=B.y+j*(oe+1);ut.setAttributes(G,[["x1",""+B.x],["y1",""+He],["x2",""+(B.x+B.width)],["y2",""+He]])});var Z=B.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(G,oe){var He=B.x+Z*(oe+1);ut.setAttributes(G,[["x1",""+He],["y1",""+B.y],["x2",""+He],["y2",""+(B.y+B.height)]])}),ut.setAttributes(this.cropShadeElement,[["d",ut.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,B.x,B.y,B.width,B.height)]]),this.topLeftGrip.setCenter(B.x,B.y),this.topRightGrip.setCenter(B.x+B.width,B.y),this.bottomLeftGrip.setCenter(B.x,B.y+B.height),this.bottomRightGrip.setCenter(B.x+B.width,B.y+B.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},K.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)},K.prototype.clientToLocalCoordinates=function(b,B){var j=this.container.getBoundingClientRect();return{x:b-j.left+this.margin,y:B-j.top+this.margin}},K.prototype.onPointerDown=function(b){this.container.setPointerCapture(b.pointerId),this.previousPoint=this.clientToLocalCoordinates(b.clientX,b.clientY),this.cropRectElement===b.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(b.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(b.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(b.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(b.target)&&(this.activeGrip=this.bottomRightGrip)},K.prototype.onPointerMove=function(b){if(this.isMoving)this.move(this.clientToLocalCoordinates(b.clientX,b.clientY));else if(this.activeGrip){var B=this.clientToLocalCoordinates(b.clientX,b.clientY);this.resize(B)}b.preventDefault()},K.prototype.onPointerUp=function(b){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(b.pointerId)},K.prototype.move=function(b){var B=b.x-this.previousPoint.x,j=b.y-this.previousPoint.y;this.zoomFactor!==1&&(B=-B/this.zoomFactor,j=-j/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+B),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+j),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=b},K.prototype.resize=function(b){var B=Object.assign({},this.cropRect),j=b.x-this.previousPoint.x,Z=b.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:B.x+j<this.margin&&(j=this.margin-B.x),B.x+=j,B.width=this.cropRect.x+this.cropRect.width-B.x;break;case this.bottomRightGrip:case this.topRightGrip:B.width+j>this.canvasWidth*this.zoomFactor&&(j=this.canvasWidth*this.zoomFactor-B.width),B.width+=j}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(B.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(j),B.height=this.aspectRatio.getVerticalLength(B.width)):(B.y+=Z,B.height=this.cropRect.y+this.cropRect.height-B.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?B.height=this.aspectRatio.getVerticalLength(B.width):B.height+=Z}B.width<10&&(B.x=this.cropRect.x,B.width=10),B.height<10&&(B.y=this.cropRect.y,B.height=10),this.previousPoint=b,B.x>=this.margin&&B.y>=this.margin&&Math.floor(B.x-this.margin+B.width)<=Math.ceil(this.canvasWidth)&&Math.floor(B.y-this.margin+B.height)<=Math.ceil(this.canvasHeight)&&(this.cropRect=B,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},K.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var b=this.cropRect.x+this.cropRect.width/2,B=this.cropRect.y+this.cropRect.height/2,j=this.aspectRatio.getHorizontalLength(this.cropRect.height),Z=this.aspectRatio.getVerticalLength(this.cropRect.width);j/this.canvasWidth<Z/this.canvasHeight?this.cropRect.width=j: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=b-this.cropRect.width/2,this.cropRect.y=B-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)}},K.prototype.getRescaledRect=function(b,B,j,Z,G,oe){var He=j/b,ct=Z/B;return{x:(G.x-oe)*He+oe,y:(G.y-oe)*ct+oe,width:G.width*He,height:G.height*ct}},K.prototype.scaleCanvas=function(b,B){var j=this.getRescaledRect(this.canvasWidth,this.canvasHeight,b,B,this.cropRect,this.margin);this.canvasWidth=b,this.canvasHeight=B,this.onCropChange&&this.onCropChange(j),this.setCropRectangle(j)},K}(),Ae=function(){function K(b){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=b,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(K.prototype,"angle",{get:function(){return this._angle},set:function(b){this._angle=b,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),K.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.setAttribute("role","button"),this.controlContainer.setAttribute("aria-label",this.title),this.controlContainer.setAttribute("data-action",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},K.prototype.onPointerDown=function(b){this.controlContainer.setPointerCapture(b.pointerId),this.isDragging=!0,this.previousPoint={x:b.clientX,y:b.clientY}},K.prototype.onPointerMove=function(b){this.isDragging&&(this.onAngleChange&&this.onAngleChange((b.clientX-this.previousPoint.x)/5),this.previousPoint.x=b.clientX)},K.prototype.onPointerUp=function(b){this.isDragging&&this.onAngleChange&&this.onAngleChange((b.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(b.pointerId)},K.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var b=this.angleLabelText.getBBox();ut.setAttributes(this.angleLabelElement,[["x",((this.width-b.width)/2).toString()],["y",(this.height/2).toString()]])}},K.prototype.positionScaleShape=function(){if(this.scaleShape){var b=this.scaleShape.transform.baseVal.getItem(0);b.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(b,0)}},K.prototype.getVisual=function(){var b=document.createElementNS("http://www.w3.org/2000/svg","svg");b.setAttribute("xmlns","http://www.w3.org/2000/svg"),b.setAttribute("width",this.width+"px"),b.setAttribute("height",this.height+"px"),b.setAttribute("viewBox","0 0 "+this.width+" "+this.height),b.style.flexShrink="0",document.body.appendChild(b);for(var B="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,j=1;j<=this.width/5+10;j++){var Z=j%5==0?this.height/3:this.height/6;B+="h4v"+-Z+"h1v"+Z}B+="v1H0Z",this.scaleShape=ut.createPath(B);var G=ut.createTransform();this.scaleShape.transform.baseVal.appendItem(G),b.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 oe=ut.createTSpan("");return oe.innerHTML="°",this.angleLabelElement.appendChild(oe),b.appendChild(this.angleLabelElement),document.body.removeChild(b),b},K}(),se=function(){function K(){this.naturalSize=!1,this.imageType="image/png",this.rasterize=this.rasterize.bind(this)}return K.prototype.rasterize=function(b,B,j,Z,G,oe,He){var ct=this;return new Promise(function(_t){var Xe=document.createElement("canvas");Xe.width=b.width.baseVal.value-2*Z,Xe.height=b.height.baseVal.value-2*Z;var pt=1,wt=1;if(ct.naturalSize===!0?(pt=Math.abs(B.naturalWidth/(b.width.baseVal.value-2*Z)/oe),wt=Math.abs(B.naturalHeight/(b.height.baseVal.value-2*Z)/He),Xe.width=Math.abs(B.naturalWidth/oe),Xe.height=Math.abs(B.naturalHeight/He)):ct.width!==void 0&&ct.height!==void 0&&(pt=ct.width/j.width,wt=ct.height/j.height,Xe.width*=pt,Xe.height*=wt),ct.maxSize!==void 0&&Xe.width*Xe.height>=ct.maxSize){var Kt=Xe.width*Xe.height,rr=Math.sqrt(ct.maxSize/Kt);pt*=rr,wt*=rr,Xe.width*=rr,Xe.height*=rr}var Wt=Xe.getContext("2d");Wt.translate(Xe.width/2,Xe.height/2),Wt.rotate(G*Math.PI/180),Wt.scale(oe,He),Wt.translate(-Xe.width/2,-Xe.height/2),Wt.drawImage(B,0,0,Xe.width,Xe.height);var Bt=document.createElement("canvas");Bt.width=j.width*pt,Bt.height=j.height*wt,Bt.getContext("2d").putImageData(Wt.getImageData((j.x-Z)*pt,(j.y-Z)*wt,j.width*pt,j.height*wt),0,0),_t(Bt.toDataURL(ct.imageType,ct.imageQuality))})},K}(),pe=function(){function K(b){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.stateChangeEventListeners=[],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.previousState="",this._instanceNo=K.instanceCounter++,this.styles=new Et(this.instanceNo),this.target=b,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),this.renderState=this.renderState.bind(this),this.addStateChangeEventListener=this.addStateChangeEventListener.bind(this),this.removeStateChangeEventListener=this.removeStateChangeEventListener.bind(this),this.onStateChanged=this.onStateChanged.bind(this)}return Object.defineProperty(K.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(b){this._zoomToCropEnabled=b,this.cropLayer!==void 0&&(this.cropLayer.zoomToCropEnabled=this._zoomToCropEnabled),b?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(b){this._isGridVisible=b,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"gridLines",{get:function(){return this._gridLines},set:function(b){this._gridLines=b,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(b){this._rotationAngle=b,this.straightener&&(this.straightener.angle=this._rotationAngle),this.onStateChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"aspectRatio",{get:function(){var b;return(b=this._aspectRatio)!==null&&b!==void 0?b:this.aspectRatios[0]},set:function(b){this._aspectRatio=b},enumerable:!1,configurable:!0}),K.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},K.prototype.show=function(){this.showUI(),this.open()},K.prototype.close=function(b){b===void 0&&(b=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),b||this.closeEventListeners.forEach(function(B){return B()}),this._isOpen=!1)},K.prototype.addRenderEventListener=function(b){this.renderEventListeners.push(b)},K.prototype.removeRenderEventListener=function(b){this.renderEventListeners.indexOf(b)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(b),1)},K.prototype.addCloseEventListener=function(b){this.closeEventListeners.push(b)},K.prototype.removeCloseEventListener=function(b){this.closeEventListeners.indexOf(b)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(b),1)},K.prototype.addStateChangeEventListener=function(b){this.stateChangeEventListeners.push(b)},K.prototype.removeStateChangeEventListener=function(b){this.stateChangeEventListeners.indexOf(b)>-1&&this.stateChangeEventListeners.splice(this.stateChangeEventListeners.indexOf(b),1)},K.prototype.setupResizeObserver=function(){var b=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){b.resize(b.target.clientWidth,b.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))},K.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var b=1*this.target.clientWidth/this.target.clientHeight,B=this.contentDiv.clientWidth/b>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*b:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,j=B+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/b;this.resize(B,j)}},K.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},K.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"},K.prototype.resize=function(b,B){this.imageWidth=Math.round(b),this.imageHeight=Math.round(B),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(),this.onStateChanged()},K.prototype.setEditingTarget=function(){ut.setAttributes(this.editingTarget,[["href",this.target.src]]),this.setEditingTargetSize()},K.prototype.setTopLeft=function(){var b=this.target.getBoundingClientRect(),B=this.editorCanvas.getBoundingClientRect();this.left=b.left-B.left-this.CANVAS_MARGIN,this.top=b.top-B.top-this.CANVAS_MARGIN},K.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 b=ut.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(b);var B=ut.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(B),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)},K.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},K.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 zt(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.zoomToCropEnabled=this.zoomToCropEnabled,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},K.prototype.zoomToCrop=function(){if(this.cropRect){var b=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,B=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=b+"px "+B+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-b+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-B+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},K.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)},K.prototype.cropRectChanged=function(b){this.cropRect=b,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1,this.onStateChanged()},K.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},K.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"},K.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},K.prototype.showUI=function(){var b,B;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 j=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,Z=this.target.offsetTop>j+this.CANVAS_MARGIN?this.target.offsetTop-(j+this.CANVAS_MARGIN):0;Z+=(b=this.uiOffsetTop)!==null&&b!==void 0?b:0;var G=this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0;G+=(B=this.uiOffsetLeft)!==null&&B!==void 0?B:0,this.coverDiv.style.top=Z+"px",this.coverDiv.style.left=G+"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.processingUi=document.createElement("div"),this.processingUi.innerHTML=`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: none; display: block; shape-rendering: auto;" width="50px" height="50px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
|
|
<rect x="19" y="19" width="20" height="20" fill="#eeeeee">
|
|
<animate attributeName="fill" values="#888888;#eeeeee;#eeeeee" keyTimes="0;0.125;1" dur="1s" repeatCount="indefinite" begin="0s" calcMode="discrete"></animate>
|
|
</rect><rect x="40" y="19" width="20" height="20" fill="#eeeeee">
|
|
<animate attributeName="fill" values="#888888;#eeeeee;#eeeeee" keyTimes="0;0.125;1" dur="1s" repeatCount="indefinite" begin="0.125s" calcMode="discrete"></animate>
|
|
</rect><rect x="61" y="19" width="20" height="20" fill="#eeeeee">
|
|
<animate attributeName="fill" values="#888888;#eeeeee;#eeeeee" keyTimes="0;0.125;1" dur="1s" repeatCount="indefinite" begin="0.25s" calcMode="discrete"></animate>
|
|
</rect><rect x="19" y="40" width="20" height="20" fill="#eeeeee">
|
|
<animate attributeName="fill" values="#888888;#eeeeee;#eeeeee" keyTimes="0;0.125;1" dur="1s" repeatCount="indefinite" begin="0.875s" calcMode="discrete"></animate>
|
|
</rect><rect x="61" y="40" width="20" height="20" fill="#eeeeee">
|
|
<animate attributeName="fill" values="#888888;#eeeeee;#eeeeee" keyTimes="0;0.125;1" dur="1s" repeatCount="indefinite" begin="0.375s" calcMode="discrete"></animate>
|
|
</rect><rect x="19" y="61" width="20" height="20" fill="#eeeeee">
|
|
<animate attributeName="fill" values="#888888;#eeeeee;#eeeeee" keyTimes="0;0.125;1" dur="1s" repeatCount="indefinite" begin="0.75s" calcMode="discrete"></animate>
|
|
</rect><rect x="40" y="61" width="20" height="20" fill="#eeeeee">
|
|
<animate attributeName="fill" values="#888888;#eeeeee;#eeeeee" keyTimes="0;0.125;1" dur="1s" repeatCount="indefinite" begin="0.625s" calcMode="discrete"></animate>
|
|
</rect><rect x="61" y="61" width="20" height="20" fill="#eeeeee">
|
|
<animate attributeName="fill" values="#888888;#eeeeee;#eeeeee" keyTimes="0;0.125;1" dur="1s" repeatCount="indefinite" begin="0.5s" calcMode="discrete"></animate>
|
|
</rect>
|
|
</svg>`,this.processingUi.style.position="absolute",this.processingUi.style.width="100%",this.processingUi.style.height="100%",this.processingUi.style.backgroundColor="rgba(0,0,0,0.3)",this.processingUi.style.alignItems="center",this.processingUi.style.justifyContent="center",this.processingUi.style.display="none",this.editorCanvas.appendChild(this.processingUi),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},K.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},K.prototype.addTopToolbar=function(){var b=this;this.topToolbar=new mr,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 B=new Ar;B.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(B);var j=[];this.aspectRatios.forEach(function(wt){var Kt=new nr(Er.getIcon(wt.horizontal,wt.vertical),wt.horizontal===0&&wt.vertical===0?"FREE":wt.horizontal+":"+wt.vertical);Kt.onClick=function(){return b.ratioButtonClicked(wt)},j.push(Kt)}),this.aspectRatioButton=new ur(Er.getIcon(0,0),"Aspect ratio",j),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,B.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var Z=new nr('<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(){b.isGridVisible=!b.isGridVisible,Z.isActive=b.isGridVisible},B.addButton(Z);var G=new nr('<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(G.isActive=this.zoomToCropEnabled,G.onClick=function(){b.zoomToCropEnabled=!b.zoomToCropEnabled,G.isActive=b.zoomToCropEnabled},B.addButton(G),!Zt.isLicensed){var oe=new Mt;this.topToolbar.addElementBlock(oe);var He=document.createElement("div");He.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var ct=document.createElement("a");ct.style.color="currentColor",ct.href="https://markerjs.com/products/cropro",ct.target="_blank",ct.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(ct),oe.addElement(He)}var _t=new Ar;_t.minWidth=3*this.toolbarHeight+"px",_t.contentAlign="end",this.topToolbar.addButtonBlock(_t);var Xe=new nr('<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");Xe.onClick=function(){b.processingUi.style.display="flex",setTimeout(b.startRenderAndClose,100)},_t.addButton(Xe),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Xe.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var pt=new nr('<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");pt.onClick=this.close,_t.addButton(pt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(pt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},K.prototype.addBottomToolbar=function(){var b=this;this.bottomToolbar=new mr,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 B=new Ar;B.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(B);var j=new nr('<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");j.onClick=this.rotateLeftButtonClicked,B.addButton(j);var Z=new nr('<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,B.addButton(Z);var G=new Mt;G.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(G),this.straightener=new Ae("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(_t){b.rotateBy(_t),b.straightener.angle=b.rotationAngle},G.addElement(this.straightener.getUI());var oe=new Ar;oe.minWidth=2*this.toolbarHeight+"px",oe.contentAlign="end",this.bottomToolbar.addButtonBlock(oe);var He=new nr('<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,oe.addButton(He);var ct=new nr('<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");ct.onClick=this.flipVerticallyButtonClicked,oe.addButton(ct)},K.prototype.ratioButtonClicked=function(b){this.aspectRatio=b,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},K.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Er.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},K.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new sr(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0,this.onStateChanged())},K.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},K.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},K.prototype.restoreState=function(b){if(b){var B=this.cropLayer.getRescaledRect(b.width,b.height,this.imageWidth,this.imageHeight,b.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(B),this.cropRectChanged(B),this.flippedHorizontally=b.flippedHorizontally,this.flippedVertically=b.flippedVertically,this.applyFlip(),this.rotationAngle=b.rotationAngle,this.applyRotation(),this.onStateChanged()}},K.prototype.renderState=function(b){this.displayMode="inline",this.isOpen||this.show(),this.restoreState(b),this.startRenderAndClose()},K.prototype.clientToLocalCoordinates=function(b,B){var j=this.cropImage.getBoundingClientRect();return{x:b-j.left,y:B-j.top}},K.prototype.onWindowResize=function(){this.positionUI()},K.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var b=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=b+"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()},K.prototype.rotateLeftButtonClicked=function(){var b=this.rotationAngle-90;this.rotationAngle%90!=0&&(b+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(b)},K.prototype.rotateRightButtonClicked=function(){var b=this.rotationAngle+90;this.rotationAngle%90!=0&&(b-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(b)},K.prototype.rotateTo=function(b){b=(b=b>180?b-360:b)<=-180?b+360:b,this.rotationAngle=b,this.applyRotation()},K.prototype.rotateBy=function(b){this.rotateTo((this.rotationAngle+b)%360)},K.prototype.applyRotation=function(){var b=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var B=this.editingTargetRotationContainer.transform.baseVal.getItem(0);B.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(B,0);var j=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/j.width,this.imageHeight/j.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=b},K.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},K.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},K.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")",this.onStateChanged()},K.prototype.startRenderAndClose=function(){return Tt(this,void 0,void 0,function(){var b,B;return Vt(this,function(j){switch(j.label){case 0:return[4,this.render()];case 1:return b=j.sent(),B=this.getState(),this.renderEventListeners.forEach(function(Z){return Z(b,B)}),this.close(!0),[2]}})})},K.prototype.render=function(){return Tt(this,void 0,void 0,function(){var b,B;return Vt(this,function(j){switch(j.label){case 0:return(b=new se).naturalSize=this.renderAtNaturalSize,b.imageType=this.renderImageType,b.imageQuality=this.renderImageQuality,b.width=this.renderWidth,b.height=this.renderHeight,b.maxSize=this.renderMaxSize,this.unzoomFromCrop(),ut.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,b.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 j.sent(),[4,b.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 B=j.sent(),this.processingUi.style.display="none",[2,B]}})})},K.prototype.onStateChanged=function(){var b=this.getState(),B=JSON.stringify(b);this.previousState!==B&&(this.stateChangeEventListeners.forEach(function(j){return j(b)}),this.previousState=B)},K.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ht("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 Ht("toolbar_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Ht("toolbar-block",`
|
|
display: flex;
|
|
align-items: center;
|
|
box-sizing: content-box;
|
|
`));var b=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ht("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.toolbarHeight-2*b)+`px;
|
|
height: `+(this.toolbarHeight-2*b)+`px;
|
|
padding: `+b+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ht("toolbar_button_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ht("toolbar_active_button",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
`)),this.styles.addRule(new Lt("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new Lt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Ht("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 Ht("toolbar_dropdown_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Ht("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 Ht("toolbar_straightener",`
|
|
display: flex;
|
|
overflow: hidden;
|
|
justify-content: center;
|
|
height: `+(this.toolbarHeight-2*b)+`px;
|
|
padding: `+b+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Ht("toolbar_straightener_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`))},K.instanceCounter=0,K}(),Re=Q("8hTe"),Ke=Q.n(Re),nt=/<pre[^>]*>/g;function ht(K){var b=document.createElement("div");return b.innerHTML=K,b.childNodes.length===0?"":b.childNodes[0].nodeValue}var vt=_e.a=function(K){var b=K.value,B=b===void 0?"":b,j=K.edit,Z=j===void 0?!1:j,G=K.className,oe=K.showTextOnly,He=K.showLines,ct=K.replaces,_t=K.zoomImg,Xe=K.hasMask,pt=K.style,wt=pt===void 0?{}:pt,Kt=K.stylesPrev,rr=Kt===void 0?{}:Kt,Wt=String(B),Bt=Object(M.useRef)(),fr=Object(M.useRef)(),qt=Object(M.useState)(""),Lr=Object(O.a)(qt,2),gr=Lr[0],er=Lr[1],Sr=Object(M.useState)("office"),xr=Object(O.a)(Sr,2),Rr=xr[0],lr=xr[1],Fr=function(){var cr=new pe(fr.current);cr.displayMode="popup",cr.addRenderEventListener(function(){var Or=Object($.a)(e.a.mark(function ir(jr){var jt;return e.a.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:return Bt.current.style.display="none",Dt.next=3,Object(J.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:jr}});case 3:jt=Dt.sent,jt!=null&&jt.id&&ct(fr.current.getAttribute("src").replace(P.a.API_SERVER,""),"/api/attachments/".concat(jt==null?void 0:jt.id,"?type=").concat(jt.content_type));case 5:case"end":return Dt.stop()}},ir)}));return function(ir){return Or.apply(this,arguments)}}()),cr.show()},Kr=function(){var cr=new xt(fr.current);cr.settings.displayMode="popup",cr.addEventListener("render",function(){var Or=Object($.a)(e.a.mark(function ir(jr){var jt;return e.a.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:if(Bt.current.style.display="none",!fr.current){Dt.next=6;break}return Dt.next=4,Object(J.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:jr.dataUrl}});case 4:jt=Dt.sent,jt!=null&&jt.id&&ct(fr.current.getAttribute("src").replace(P.a.API_SERVER,""),"/api/attachments/".concat(jt==null?void 0:jt.id,"?type=").concat(jt.content_type));case 6:case"end":return Dt.stop()}},ir)}));return function(ir){return Or.apply(this,arguments)}}()),cr.show(),window.markerArea=cr},Pr=Object(M.useMemo)(function(){Bt.current&&(Bt.current.style.zIndex=-1);try{var dr=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,cr=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Or=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Wt=Wt.replace(dr,"("+P.a.API_SERVER+"/api/attachments/").replace(cr,'"'+P.a.API_SERVER+"/api/attachments/").replace(Or,'"'+P.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(Yt){}var ir=p(Wt),jr=y();if(Wt.match(/\[TOC\]/)&&(ir=ir.replace("<p>[TOC]</p>",A()),m()),ir=ir.replace(/(__special_katext_id_\d+__)/g,function(Yt,Dt){var pr=jr[Dt],Qt=pr.type,Jt=pr.expression;return Object(W.renderToString)(ht(Jt)||"",{displayMode:Qt==="block",throwOnError:!1,output:"html"})}),ir=ir.replace(/▁/g,"\u2581\u2581\u2581"),o(),oe){var jt=document.createElement("div");return jt.innerHTML=ir,jt.innerText}return setTimeout(function(){return Ur()},500),ir},[Wt]),Ir=Object(M.useRef)();g.WebkitLineClamp=He,He&&(wt=Object(ue.a)(Object(ue.a)({},wt),g));function yr(dr){var cr=dr.target;if(cr.tagName.toUpperCase()==="IMG"){if(_t){var Or=cr.getAttribute("src");er(Or),lr("image")}}else if(cr.tagName.toUpperCase()==="A"){var ir=cr.getAttribute("href");if(ir.indexOf("office")>-1)dr.preventDefault(),er(ir),lr("office");else if(ir.indexOf("application/pdf")>-1)dr.preventDefault(),er(ir),lr("pdf");else if(ir.indexOf("text/html")>-1)dr.preventDefault(),er(ir),lr("html");else if(ir.startsWith("#")){dr.preventDefault();var jr=document.getElementById(ir.replace("#",""));jr&&jr.scrollIntoView(!0)}}}var Ur=function(){var cr,Or=(cr=Ir.current)===null||cr===void 0?void 0:cr.querySelectorAll("video");Or==null||Or.forEach(function(ir){if(ir.oncontextmenu=function(){return!1},ir.src.indexOf(".m3u8")>-1&&!ir.canPlayType("application/vnd.apple.mpegurl")){if(F.a.isSupported()){var jr=new F.a;jr.loadSource(ir.src),jr.attachMedia(ir)}}})};Object(M.useEffect)(function(){if(Ir.current&&Pr&&(Pr.match(nt)&&window.PR.prettyPrint()),Ir.current)return Ir.current.addEventListener("click",yr),function(){Ir.current.removeEventListener("click",yr),o(),m()}},[Pr,Ir.current,yr]);var Nr=function(cr){if(!Z)return;cr.target.nodeName==="IMG"?(Bt.current.style.zIndex=1,Bt.current.style.display="flex",Bt.current.style.width=cr.target.clientWidth+"px",Bt.current.style.height=cr.target.clientHeight+"px",Bt.current.style.top=cr.target.offsetTop+"px",Bt.current.style.left=cr.target.offsetLeft+"px",fr.current.src=cr.target.getAttribute("src")):Bt.current.style.display="none"};return D.a.createElement("div",{style:{position:"relative"}},D.a.createElement("div",{ref:Ir,style:Object(ue.a)({},wt),className:"".concat(G||""," markdown-body ").concat(Ke.a.mdBody),onMouseOver:Nr,dangerouslySetInnerHTML:{__html:Pr}}),D.a.createElement("div",{ref:Bt,className:Ke.a.button},D.a.createElement(be.b,null,D.a.createElement(Ee.a,{onClick:function(){return Fr()}},"\u88C1\u526A"),D.a.createElement(Ee.a,{onClick:function(){return Kr()}},"\u7F16\u8F91"))),D.a.createElement("img",{ref:fr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),D.a.createElement(V.a,{close:!0,data:gr,type:gr!=null&&gr.length?Rr:"",style:Object(ue.a)({},rr),onClose:function(){return er("")}}))}},BsWD:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return be});var he=Q("a3WO");function be(ve,Ee){if(!ve)return;if(typeof ve=="string")return Object(he.a)(ve,Ee);var ue=Object.prototype.toString.call(ve).slice(8,-1);if(ue==="Object"&&ve.constructor&&(ue=ve.constructor.name),ue==="Map"||ue==="Set")return Array.from(ve);if(ue==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ue))return Object(he.a)(ve,Ee)}},"C/vA":function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return he});function he(be){const ve=this;let Ee=!1,ue;return function(){return Ee||(Ee=!0,ue=be.apply(ve,arguments)),ue}}},"Cg/j":function(dt,_e,Q){"use strict";Q.d(_e,"b",function(){return he}),Q.d(_e,"a",function(){return be}),Q.d(_e,"c",function(){return Ee}),Q.d(_e,"d",function(){return ue});var he;(function($){$.serviceIds=new Map,$.DI_TARGET="$di$target",$.DI_DEPENDENCIES="$di$dependencies";function O(H){return H[$.DI_DEPENDENCIES]||[]}$.getServiceDependencies=O})(he||(he={}));const be=Ee("instantiationService");function ve($,O,H,e){O[he.DI_TARGET]===O?O[he.DI_DEPENDENCIES].push({id:$,index:H,optional:e}):(O[he.DI_DEPENDENCIES]=[{id:$,index:H,optional:e}],O[he.DI_TARGET]=O)}function Ee($){if(he.serviceIds.has($))return he.serviceIds.get($);const O=function(H,e,M){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");ve(O,H,M,!1)};return O.toString=()=>$,he.serviceIds.set($,O),O}function ue($){return function(O,H,e){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");ve($,O,e,!0)}}},Dpym:function(dt,_e,Q){"use strict";var he=Q("T/Jt"),be=Q.n(he),ve=he.createContext(null);_e.a=ve},El5i:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return he});function he(be,ve){return be[ve]}},F0VM:function(dt,_e,Q){dt.exports={flex_box_center:"flex_box_center___2fDN3",flex_space_between:"flex_space_between___BHBBv",flex_box_vertical_center:"flex_box_vertical_center___tpxsE",flex_box_center_end:"flex_box_center_end___rP7bQ",flex_box_column:"flex_box_column___1_rF-",md:"md___3SObb",title:"title___HfZ1b"}},FER5:function(dt,_e,Q){"use strict";Q.d(_e,"g",function(){return be}),Q.d(_e,"b",function(){return ue}),Q.d(_e,"f",function(){return $}),Q.d(_e,"c",function(){return O}),Q.d(_e,"e",function(){return H}),Q.d(_e,"a",function(){return N}),Q.d(_e,"d",function(){return c});var he=Q("b3aT");function be(s,h,x){return{r:Object(he.a)(s,255)*255,g:Object(he.a)(h,255)*255,b:Object(he.a)(x,255)*255}}function ve(s,h,x){s=Object(he.a)(s,255),h=Object(he.a)(h,255),x=Object(he.a)(x,255);var E=Math.max(s,h,x),v=Math.min(s,h,x),d=0,m=0,g=(E+v)/2;if(E===v)m=0,d=0;else{var S=E-v;m=g>.5?S/(2-E-v):S/(E+v);switch(E){case s:d=(h-x)/S+(h<x?6:0);break;case h:d=(x-s)/S+2;break;case x:d=(s-h)/S+4;break;default:break}d/=6}return{h:d,s:m,l:g}}function Ee(s,h,x){return x<0&&(x+=1),x>1&&(x-=1),x<1/6?s+(h-s)*(6*x):x<1/2?h:x<2/3?s+(h-s)*(2/3-x)*6:s}function ue(s,h,x){var E,v,d;if(s=Object(he.a)(s,360),h=Object(he.a)(h,100),x=Object(he.a)(x,100),h===0)v=x,d=x,E=x;else{var m=x<.5?x*(1+h):x+h-x*h,g=2*x-m;E=Ee(g,m,s+1/3),v=Ee(g,m,s),d=Ee(g,m,s-1/3)}return{r:E*255,g:v*255,b:d*255}}function $(s,h,x){s=Object(he.a)(s,255),h=Object(he.a)(h,255),x=Object(he.a)(x,255);var E=Math.max(s,h,x),v=Math.min(s,h,x),d=0,m=E,g=E-v,S=E===0?0:g/E;if(E===v)d=0;else{switch(E){case s:d=(h-x)/g+(h<x?6:0);break;case h:d=(x-s)/g+2;break;case x:d=(s-h)/g+4;break;default:break}d/=6}return{h:d,s:S,v:m}}function O(s,h,x){s=Object(he.a)(s,360)*6,h=Object(he.a)(h,100),x=Object(he.a)(x,100);var E=Math.floor(s),v=s-E,d=x*(1-h),m=x*(1-v*h),g=x*(1-(1-v)*h),S=E%6,A=[x,m,d,d,g,x][S],u=[g,x,x,m,d,d][S],R=[d,d,g,x,x,m][S];return{r:A*255,g:u*255,b:R*255}}function H(s,h,x,E){var v=[Object(he.d)(Math.round(s).toString(16)),Object(he.d)(Math.round(h).toString(16)),Object(he.d)(Math.round(x).toString(16))];return E&&v[0].startsWith(v[0].charAt(1))&&v[1].startsWith(v[1].charAt(1))&&v[2].startsWith(v[2].charAt(1))?v[0].charAt(0)+v[1].charAt(0)+v[2].charAt(0):v.join("")}function e(s,h,x,E,v){var d=[Object(he.d)(Math.round(s).toString(16)),Object(he.d)(Math.round(h).toString(16)),Object(he.d)(Math.round(x).toString(16)),Object(he.d)(D(E))];return v&&d[0].startsWith(d[0].charAt(1))&&d[1].startsWith(d[1].charAt(1))&&d[2].startsWith(d[2].charAt(1))&&d[3].startsWith(d[3].charAt(1))?d[0].charAt(0)+d[1].charAt(0)+d[2].charAt(0)+d[3].charAt(0):d.join("")}function M(s,h,x,E){var v=[Object(he.d)(D(E)),Object(he.d)(Math.round(s).toString(16)),Object(he.d)(Math.round(h).toString(16)),Object(he.d)(Math.round(x).toString(16))];return v.join("")}function D(s){return Math.round(parseFloat(s)*255).toString(16)}function N(s){return c(s)/255}function c(s){return parseInt(s,16)}function l(s){return{r:s>>16,g:(s&65280)>>8,b:s&255}}},FJUb:function(dt,_e,Q){"use strict";Q.r(_e);var he=Q("kmrB"),be=Q("Jv1h"),ve=Q("eFXf"),Ee=Q("v6r8"),ue=Q("8OG5"),$=Q("mgsT"),O=Q("A9kX"),H=Q("gb+I"),e=Q("dLI4"),M=Q("4d5L"),D=Q("6NPb"),N=Q("o3AU"),c=Q("EOh4"),l=Q("V/dS"),s=Q("Kikd"),h=Q("x9/X"),x=Q("c3Iv"),E=Q("rBQ5"),v=Q("IYef"),d=Q("6HMh"),m=Q("YaWb"),g=Q("Hqw+"),S=Q("ftSv"),A=Q("XXmO"),u=Q.n(A),R=Q("T/Jt"),i=Q.n(R),T=Q("xOOu"),w=Q.n(T),y=Q("3ptp"),o=Q("9kvl"),r=Q("GNbK"),a=Q("jhfD"),n=Q("CTES"),t=Q("RCxd"),p=Q("/MfK"),_=Q("m3rI"),f=Q("xKgJ"),F=Q("1vsH"),P=Q("GeSD"),W=Q.n(P),V=Q("deN7"),J=Q("ErOA"),ne=Q("J66h"),ce=function(ae){var ye=ae.shixunHomeworks,Le=ae.autoHeight,Pe=ae.dispatch,ke=ye.shixunWorkReport,Je=ke.stage_list,qe=ke.work_id,it=Object(y.i)(),rt=Object(f.c)(),et=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"query_index",width:120},{title:"\u8BE6\u7EC6\u7ED3\u679C",dataIndex:"result",render:function(De,Te,Oe){return ne.Base64.decode(De)||"- -"}}];function At(Ge,De){return Object(J.c)("student_works/".concat(qe,"/rep_passed_content.json"),{path:De,game_id:Ge})}var We=Object(F.p)(5,ke.hack);return i.a.createElement(i.a.Fragment,null,We==null?void 0:We.map(function(Ge,De){return i.a.createElement("div",{key:De},Ge.map(function(Te,Oe){var le;return i.a.createElement("aside",{className:"pl30 pr30",key:Oe},i.a.createElement("div",{className:"".concat(W.a.shixunTitle," mt10")},i.a.createElement("div",{style:{display:"flex",width:"100%"}},i.a.createElement("span",{className:"fa fa-code "}),i.a.createElement("strong",{style:{flex:1},className:"c-black"},"\u7B2C",De*5+Oe+1,"\u9898 ",Te.name),Te.is_finish&&i.a.createElement(r.a,{style:{marginLeft:20},onClick:function(Ce){Ce.preventDefault(),window.open(Te==null?void 0:Te.url),localStorage.setItem("program_homework",[it.coursesId,it.categoryId])},to:"".concat(Te==null?void 0:Te.url)},"\u67E5\u770B\u7B54\u9898\u8BE6\u60C5>>"))),i.a.createElement("div",{className:"font16 mt10"},Te.is_finish===!1&&"\u672C\u5173\u6682\u672A\u901A\u8FC7\uFF0C\u65E0\u901A\u5173\u4EE3\u7801",Te.is_finish&&i.a.createElement("aside",{className:W.a.shixunWrp},i.a.createElement(V.a,{v:Te,shixunWorkReport:ke,dispatch:Pe,autoHeight:Le,languages:Te.languages,language:Te.language,game_id:Te.id,data:ne.Base64.decode(Te.code),diff_code_count:Te.diff_code_count,onPathChange:At}))),i.a.createElement("aside",{className:"mt10 font16"},(le=Te.history)!==null&&le!==void 0&&le.length?i.a.createElement(Ee.a,{columns:et,pagination:{hideOnSinglePage:!0},dataSource:Te.history}):"\u672C\u5173\u65E0\u8BC4\u6D4B\u8BB0\u5F55"))}))}))},ie=Object(o.a)(function(te){var ae=te.shixunHomeworks,ye=te.loading,Le=te.globalSetting;return{shixunHomeworks:ae,globalSetting:Le,loading:ye.effects}})(ce),xe=Q("47JS"),ge=Q("TOZL"),de=Q("y6Ii"),Fe=Q("Wuip"),Qe=function(ae){var ye,Le,Pe,ke=ae.shixunHomeworks,Je=ae.dispatch,qe=Object(S.a)(ae,["shixunHomeworks","dispatch"]),it=Object(y.i)(),rt=Object(R.useState)(!1),et=Object(g.a)(rt,2),At=et[0],We=et[1],Ge=Fe.a.useForm(),De=Object(g.a)(Ge,1),Te=De[0];Object(R.useEffect)(function(){if(ke.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4")if(ke.actionTabs.selectArrs.type==="1")Te.setFieldsValue({comment:ke.actionTabs.selectArrs.v.comment,hidden_comment:ke.actionTabs.selectArrs.v.hidden_comment});else{var le,fe,Ce,we,Me,$e;Te.setFieldsValue({comment:(le=ke.actionTabs.selectArrs)===null||le===void 0||((fe=le.data)===null||fe===void 0||((Ce=fe.data)===null||Ce===void 0))?void 0:Ce.work_comment,hidden_comment:(we=ke.actionTabs.selectArrs)===null||we===void 0||((Me=we.data)===null||Me===void 0||(($e=Me.data)===null||$e===void 0))?void 0:$e.work_comment_hidden})}},[ke.actionTabs.key]);var Oe=function(){var le=Object(v.a)(u.a.mark(function fe(){var Ce,we,Me,$e,Ie,Ye,tt;return u.a.wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:return Ie=Te.getFieldValue(),Ye=ke.actionTabs.selectArrs.type==="1"?"/api/problems/".concat(ke.actionTabs.selectArrs.v.identifier,"/hack_comment.json"):"/api/student_works/".concat(it.homeworkId,"/shixun_work_comment.json"),mt.next=4,Object(J.a)(Ye,{method:"post",body:{hidden_comment:Ie.hidden_comment,comment:Ie.comment,language:(Ce=ke.actionTabs.selectArrs)===null||Ce===void 0?void 0:Ce.language,user_id:(we=ke.actionTabs.selectArrs)===null||we===void 0||((Me=we.data)===null||Me===void 0||(($e=Me.data)===null||$e===void 0))?void 0:$e.user_id}});case 4:tt=mt.sent,tt.status===0&&($.b.success("\u8BC4\u9605\u6210\u529F"),Te.resetFields(),Je({type:"shixunHomeworks/setActionTabs",payload:{}}),Je({type:"shixunHomeworks/getShixunWorkReports",payload:Object(m.a)({},it)}));case 6:case"end":return mt.stop()}},fe)}));return function(){return le.apply(this,arguments)}}();return i.a.createElement(i.a.Fragment,null,i.a.createElement(E.a,{centered:!0,title:i.a.createElement("span",null,((ye=ke.actionTabs.selectArrs)===null||ye===void 0?void 0:ye.type)==="1"?"\u70B9\u8BC4\u4EE3\u7801":"\u66F4\u6539\u70B9\u8BC4",((Le=ke.actionTabs.selectArrs)===null||Le===void 0?void 0:Le.language)&&i.a.createElement("span",{style:{marginLeft:10,fontSize:14}},"\u4F7F\u7528\u8BED\u8A00\uFF1A",(Pe=ke.actionTabs.selectArrs)===null||Pe===void 0?void 0:Pe.language)),visible:ke.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(v.a)(u.a.mark(function le(){var fe;return u.a.wrap(function(we){for(;;)switch(we.prev=we.next){case 0:fe=Te.getFieldValue(),JSON.stringify(fe)==="{}"||fe.hidden_comment===""&&fe.comment===""?We(!0):Oe();case 2:case"end":return we.stop()}},le)})),onCancel:function(){Je({type:"shixunHomeworks/setActionTabs",payload:{}})}},i.a.createElement(Fe.a,{form:Te,onChange:function(){At&&We(!1)}},i.a.createElement("p",null,"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),i.a.createElement(Fe.a.Item,{name:"comment"},i.a.createElement(ge.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8})),i.a.createElement("p",null,"\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),i.a.createElement(Fe.a.Item,{name:"hidden_comment"},i.a.createElement(ge.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8}))),At&&i.a.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A")))},Ve=Object(o.a)(function(te){var ae=te.shixunHomeworks;return{shixunHomeworks:ae}})(Qe),Ne=Q("T7RX"),Ue=Q("9Bee"),q=Q("XYT7"),k=Q("1n7x"),z=Q.n(k),X=function(ae){var ye,Le,Pe,ke,Je,qe,it,rt,et,At,We,Ge,De,Te,Oe,le,fe,Ce,we,Me,$e,Ie,Ye,tt,at,mt,ft,Ze,yt,lt,gt,xt=ae.shixunHomeworks,bt=ae.globalSetting,Ot=ae.loading,Tt=ae.dispatch,Vt=Object(S.a)(ae,["shixunHomeworks","globalSetting","loading","dispatch"]),Zt=Object(R.useState)(Object(m.a)({},Object(y.i)())),ut=Object(g.a)(Zt,2),Et=ut[0],Lt=ut[1],Ht=Object(y.i)(),mr=Object(R.useState)([]),_r=Object(d.a)(mr),Ar=Object(R.useState)({last:!1}),nr=Object(g.a)(Ar,2),Mt=nr[0],sr=nr[1],Er=Object(R.useState)({last:!1}),ur=Object(g.a)(Er,2),kt=ur[0],zt=ur[1],Ae=Object(R.useRef)(),se=Object(R.useRef)(),pe=Object(R.useState)(!1),Re=Object(g.a)(pe,2),Ke=Re[0],nt=Re[1],ht=Object(R.useState)(!1),vt=Object(g.a)(ht,2),K=vt[0],b=vt[1],B=Object(R.useState)(!1),j=Object(g.a)(B,2),Z=j[0],G=j[1],oe=xt.shixunWorkReport,He=Object(f.c)(),ct=Object(R.useState)(new w.a),_t=Object(g.a)(ct,2),Xe=_t[0],pt=_t[1],wt=Object(R.useState)(0),Kt=Object(g.a)(wt,2),rr=Kt[0],Wt=Kt[1],Bt=Object(R.useState)([]),fr=Object(g.a)(Bt,2),qt=fr[0],Lr=fr[1],gr=Object(R.useState)(!1),er=Object(g.a)(gr,2),Sr=er[0],xr=er[1],Rr=Object(R.useState)(!1),lr=Object(g.a)(Rr,2),Fr=lr[0],Kr=lr[1];Object(R.useEffect)(function(){return Tt({type:"globalSetting/footerToggle",payload:!1}),function(){Tt({type:"globalSetting/footerToggle",payload:!0})}},[]),Object(R.useEffect)(function(){xt.actionTabs.key==="\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"&&qt.length>0&&dr("all")},[qt]),Object(R.useEffect)(function(){Lt(Object(m.a)({},Ht))},[Vt.location.pathname]);var Pr=function(){document.body.scrollIntoView()};function Ir(){return yr.apply(this,arguments)}function yr(){return yr=Object(v.a)(u.a.mark(function jt(){var Yt,Dt,pr,Qt,Jt,Gt,kr;return u.a.wrap(function(Cn){for(;;)switch(Cn.prev=Cn.next){case 0:return pr=JSON.parse(sessionStorage.all_student_works_params||"{}"),Cn.next=3,Tt({type:"shixunHomeworks/getAllStudentWorks",payload:Object(m.a)(Object(m.a)({},Et),pr)});case 3:Qt=Cn.sent,Lr(Qt.all_student_works),Jt=(Yt=Qt.all_student_works)===null||Yt===void 0?void 0:Yt.map(function(Wr){return String(Wr.user_id)}).indexOf(Et.homeworkId),Jt===((Dt=Qt.all_student_works)===null||Dt===void 0?void 0:Dt.length)-1?sr({last:!0}):sr((Gt=Qt.all_student_works)===null||Gt===void 0?void 0:Gt[Jt+1]),Jt===0?zt({last:!0}):zt((kr=Qt.all_student_works)===null||kr===void 0?void 0:kr[Jt-1]);case 8:case"end":return Cn.stop()}},jt)})),yr.apply(this,arguments)}var Ur=function(){document.querySelectorAll("canvas").forEach(function(Yt){(!Yt.clientWidth||!Yt.clientHeight)&&Yt.remove()})},Nr=function(){Ae.current.offsetHeight>62e3?G(!1):G(!0)},dr=function(){var jt=Object(v.a)(u.a.mark(function Yt(Dt){var pr,Qt,Jt,Gt,kr,Xr;return u.a.wrap(function(Wr){for(;;)switch(Wr.prev=Wr.next){case 0:if(kr=function(){return kr=Object(v.a)(u.a.mark(function mn(){var qr;return u.a.wrap(function(Gr){for(;;)switch(Gr.prev=Gr.next){case 0:return Gr.next=2,Tt({type:"shixunHomeworks/getShixunWorkReports",payload:{homeworkId:qt[pr].user_id}});case 2:qr=Gr.sent,Pr(),pr++,setTimeout(Object(v.a)(u.a.mark(function xn(){var Mr,dn,Tn,$r,nn,ln,Bn;return u.a.wrap(function(en){for(;;)switch(en.prev=en.next){case 0:Ur(),dn=Xe.folder("".concat(qr==null?void 0:qr.username)),Tn=document.querySelector("#export-all").children,$r=z()(),nn=u.a.mark(function an(cn){return u.a.wrap(function(tn){for(;;)switch(tn.prev=tn.next){case 0:return tn.next=2,$r.set(Jt).from(Tn[cn]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var hn=Object(v.a)(u.a.mark(function Jn(mi){return u.a.wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:if(!(cn<Tn.length-1)){vn.next=3;break}return vn.next=3,mi.addPage();case 3:case"end":return vn.stop()}},Jn)}));return function(Jn){return hn.apply(this,arguments)}}());case 2:case"end":return tn.stop()}},an)}),ln=0;case 6:if(!(ln<Tn.length)){en.next=11;break}return en.delegateYield(nn(ln),"t0",8);case 8:ln++,en.next=6;break;case 11:dn.file("".concat(qt[pr-1].student_work_user_name).concat(pr,".pdf"),$r.output("blob")),Bn=dn.folder("\u4EE3\u7801\u6587\u4EF6"),qr==null||((Mr=qr.shixun_detail)===null||Mr===void 0)||Mr.map(function(an,cn){var An,tn=Bn.folder("\u7B2C".concat(cn+1,"\u5173-").concat(an.subject,"-").concat(an.id));an==null||((An=an.game_codes)===null||An===void 0)||An.map(function(hn){tn.file("".concat(hn.filename,".txt"),hn==null?void 0:hn.content)})}),Qt.update({content:i.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",i.a.createElement("span",{className:"c-blue"},pr),"/",qt==null?void 0:qt.length,i.a.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3")}),pr==(qt==null?void 0:qt.length)?(Qt.destroy(),cr()):Gt();case 16:case"end":return en.stop()}},xn)})),2200);case 6:case"end":return Gr.stop()}},mn)})),kr.apply(this,arguments)},Gt=function(){return kr.apply(this,arguments)},pr=0,Qt=E.a.info({width:460,title:i.a.createElement("div",null,"\u6B63\u5728\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A,",i.a.createElement("span",{className:"c-red"},"\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3")),content:i.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",i.a.createElement("span",{className:"c-blue"},pr+1),"/",Dt!=="all"?1:qt==null?void 0:qt.length,i.a.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"),maskClosable:!1,className:W.a.modal,onOk:function(){}}),Jt={margin:[0,0],filename:"".concat(oe.username,".pdf"),html2canvas:{useCORS:!0,letterRendering:!0},jsPDF:{unit:"mm",format:"a4",orientation:"landscape"}},!(Dt!=="all"||(qt==null?void 0:qt.length)<2)){Wr.next=12;break}return Wr.delegateYield(u.a.mark(function Yr(){var mn,qr,Hn,Gr,xn,Mr,dn;return u.a.wrap(function($r){for(;;)switch($r.prev=$r.next){case 0:Ur(),Pr(),qr=se.current.children,Hn=z()(),Gr=Xe.folder("".concat(oe==null?void 0:oe.username)),xn=u.a.mark(function nn(ln){return u.a.wrap(function(gn){for(;;)switch(gn.prev=gn.next){case 0:return gn.next=2,Hn.set(Jt).from(qr[ln]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var en=Object(v.a)(u.a.mark(function an(cn){return u.a.wrap(function(tn){for(;;)switch(tn.prev=tn.next){case 0:if(!(ln<qr.length-1)){tn.next=3;break}return tn.next=3,cn.addPage();case 3:case"end":return tn.stop()}},an)}));return function(an){return en.apply(this,arguments)}}());case 2:case"end":return gn.stop()}},nn)}),Mr=0;case 7:if(!(Mr<qr.length)){$r.next=12;break}return $r.delegateYield(xn(Mr),"t0",9);case 9:Mr++,$r.next=7;break;case 12:return nt(!1),Gr.file("".concat(oe.username,".pdf"),Hn.output("blob"),{base64:!1}),dn=Gr.folder("\u4EE3\u7801\u6587\u4EF6"),oe==null||((mn=oe.shixun_detail)===null||mn===void 0)||mn.map(function(nn,ln){var Bn,gn=dn.folder("\u7B2C".concat(ln+1,"\u5173-").concat(nn.subject,"-").concat(nn.id));nn==null||((Bn=nn.game_codes)===null||Bn===void 0)||Bn.map(function(en){gn.file("".concat(en.filename,".txt"),en==null?void 0:en.content)})}),Qt.destroy(),cr(),$r.abrupt("return",{v:void 0});case 19:case"end":return $r.stop()}},Yr)})(),"t0",7);case 7:if(Xr=Wr.t0,!(typeof Xr=="object")){Wr.next=10;break}return Wr.abrupt("return",Xr.v);case 10:Wr.next=13;break;case 12:Gt();case 13:case"end":return Wr.stop()}},Yt)}));return function(Dt){return jt.apply(this,arguments)}}(),cr=function(){Xe.generateAsync({type:"blob"}).then(function(Yt){var Dt=document.createElement("a");Dt.href=window.URL.createObjectURL(Yt),Dt.download=oe.course_name+".zip",document.body.appendChild(Dt);var pr=document.createEvent("MouseEvents");pr.initEvent("click",!1,!1),Dt.dispatchEvent(pr),document.body.removeChild(Dt),pt(new w.a)}),G(!1)};Object(R.useEffect)(function(){Or()},[Et.homeworkId]);var Or=function(){var jt=Object(v.a)(u.a.mark(function Yt(){return u.a.wrap(function(pr){for(;;)switch(pr.prev=pr.next){case 0:return b(!0),pr.next=3,Tt({type:"shixunHomeworks/getShixunWorkReports",payload:Object(m.a)({},Et)});case 3:b(!1),Object(f.c)()&&Ir();case 5:case"end":return pr.stop()}},Yt)}));return function(){return jt.apply(this,arguments)}}(),ir=[{title:"\u9898\u53F7",dataIndex:"name",render:function(Yt,Dt,pr){return pr+1}},{title:"\u9898\u76EE\u540D\u79F0",dataIndex:"name",ellipsis:!0,width:"30%"},{title:"\u5B8C\u6210\u65F6\u95F4",dataIndex:"finish_time",width:"200px",render:function(Yt,Dt,pr){var Qt,Jt;return i.a.createElement("div",null,i.a.createElement("p",null,Yt||"- -"),Dt==null||((Qt=Dt.subitem)===null||Qt===void 0||((Jt=Qt.map(function(Gt){return Gt.finish_time}))===null||Jt===void 0))?void 0:Jt.map(function(Gt){return i.a.createElement("p",null,Gt||"- -")}))}},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"submit_count",render:function(Yt,Dt,pr){var Qt,Jt;return i.a.createElement("div",null,i.a.createElement("p",null,Yt||"- -"),Dt==null||((Qt=Dt.subitem)===null||Qt===void 0||((Jt=Qt.map(function(Gt){return Gt.submit_count}))===null||Jt===void 0))?void 0:Jt.map(function(Gt){return i.a.createElement("p",null,Gt||"- -")}))}},{title:"\u8FD0\u884C\u65F6\u95F4\uFF08ms\uFF09",dataIndex:"run_time",render:function(Yt,Dt,pr){var Qt,Jt;return i.a.createElement("div",null,i.a.createElement("p",null,Yt||"- -"),Dt==null||((Qt=Dt.subitem)===null||Qt===void 0||((Jt=Qt.map(function(Gt){return Gt.run_time}))===null||Jt===void 0))?void 0:Jt.map(function(Gt){return i.a.createElement("p",null,Gt||"- -")}))}},{title:"\u5185\u5B58\uFF08kb\uFF09",dataIndex:"memory",render:function(Yt,Dt,pr){var Qt,Jt;return i.a.createElement("div",null,i.a.createElement("p",null,Yt||"- -"),Dt==null||((Qt=Dt.subitem)===null||Qt===void 0||((Jt=Qt.map(function(Gt){return Gt.memory}))===null||Jt===void 0))?void 0:Jt.map(function(Gt){return i.a.createElement("p",null,Gt||"- -")}))}},{title:"\u4F7F\u7528\u8BED\u8A00",dataIndex:"language",render:function(Yt,Dt,pr){var Qt,Jt;return i.a.createElement("div",null,i.a.createElement("p",null,Yt||"- -"),Dt==null||((Qt=Dt.subitem)===null||Qt===void 0||((Jt=Qt.map(function(Gt){return Gt.language}))===null||Jt===void 0))?void 0:Jt.map(function(Gt){return i.a.createElement("p",null,Gt||"- -")}))}},{title:"\u5F97\u5206",dataIndex:"score",render:function(Yt,Dt,pr){return i.a.createElement("div",null,i.a.createElement("p",null,Yt||"- -"))}},{title:"\u6392\u540D",dataIndex:"rank",render:function(Yt,Dt,pr){var Qt,Jt;return i.a.createElement("div",null,i.a.createElement("p",null,Yt||"- -"),Dt==null||((Qt=Dt.subitem)===null||Qt===void 0||((Jt=Qt.map(function(Gt){return Gt.rank}))===null||Jt===void 0))?void 0:Jt.map(function(Gt){return i.a.createElement("p",null,Gt||"- -")}))}}],jr=function(Yt){Tt({type:"shixunHomeworks/setActionTabs",payload:{key:"",type:2}}),setTimeout(function(){Yt==="next"?o.d.push("/classrooms/".concat(Et.coursesId,"/program_homework/").concat(Et.categoryId,"/").concat(Mt==null?void 0:Mt.student_work_id,"/").concat(Mt==null?void 0:Mt.user_id,"/comment")):o.d.push("/classrooms/".concat(Et.coursesId,"/program_homework/").concat(Et.categoryId,"/").concat(Mt==null?void 0:Mt.student_work_id,"/").concat(kt==null?void 0:kt.user_id,"/comment"))},200)};return i.a.createElement("section",{className:"bg-fafafa",style:{position:"sticky",top:0}},i.a.createElement("div",{className:"edu-container mt10",style:{paddingBottom:100}},i.a.createElement(be.a,{loading:K,active:!0,avatar:{size:40},paragraph:{rows:5}},i.a.createElement("div",{className:"edu-container"},(oe==null||((ye=oe.category)===null||ye===void 0)?void 0:ye.course_id)&&i.a.createElement("section",{className:"animated fadeIn"},i.a.createElement("aside",{className:""},(oe==null?void 0:oe.category)&&i.a.createElement(h.a,{separator:">"},i.a.createElement(h.a.Item,null,i.a.createElement(r.a,{to:"/classrooms/".concat(oe==null||((Le=oe.category)===null||Le===void 0)?void 0:Le.course_id,"/program_homework")},oe==null||((Pe=oe.category)===null||Pe===void 0)?void 0:Pe.course_name)),i.a.createElement(h.a.Item,null,i.a.createElement(r.a,{to:"/classrooms/".concat(oe==null||((ke=oe.category)===null||ke===void 0)?void 0:ke.course_id,"/program_homework")},oe.category.category_name)),i.a.createElement(h.a.Item,null,i.a.createElement(r.a,{to:"/classrooms/".concat(oe==null||((Je=oe.category)===null||Je===void 0)?void 0:Je.course_id,"/program_homework/").concat(Et==null?void 0:Et.categoryId,"/detail")},"\u4F5C\u4E1A\u8BE6\u60C5")),i.a.createElement(h.a.Item,null,oe==null||((qe=oe.data)===null||qe===void 0)?void 0:qe.user_name))),i.a.createElement("aside",{className:[W.a.title1,"mt20"].join(" ")},i.a.createElement(N.a,{align:"middle"},i.a.createElement(l.a,{flex:1},i.a.createElement(r.a,{to:"/classrooms/".concat(Et.coursesId,"/program_homework/").concat(Et==null?void 0:Et.categoryId,"/detail")},i.a.createElement(a.a,{className:"font16 c-black"})),i.a.createElement("strong",{className:"font20 ml5"},oe==null||((it=oe.category)===null||it===void 0)?void 0:it.homework_name),i.a.createElement(F.m,{temporary:!0,status:oe.homework_status}))))),i.a.createElement("aside",{className:"mt30 relative"})),i.a.createElement("aside",{className:"edu-container bg-white",ref:Ae},i.a.createElement("div",{id:"export-all",ref:se},i.a.createElement("div",{id:"export-all-1"},i.a.createElement("div",{className:W.a.title},i.a.createElement("h1",null,"\u603B\u4F53\u8BC4\u4EF7"),i.a.createElement("div",null,Object(f.c)()&&i.a.createElement(M.a,{className:"mr20",type:"primary",onClick:function(){Tt({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:oe.user_id,data:Object(m.a)({},oe)}}})}},i.a.createElement(n.a,null),oe!=null&&(rt=oe.data)!==null&&rt!==void 0&&rt.has_comment?"\u66F4\u6539\u70B9\u8BC4":"\u70B9\u8BC4\u4F5C\u4E1A"))),i.a.createElement(H.a,{style:{marginTop:0}}),i.a.createElement(N.a,{className:"pl30 pr30"},i.a.createElement(l.a,null,i.a.createElement("img",{className:W.a.userPic,src:"".concat(_.a.IMG_SERVER,"/images/").concat(oe==null||((et=oe.data)===null||et===void 0)?void 0:et.image_url),alt:oe==null||((At=oe.data)===null||At===void 0)?void 0:At.username})),i.a.createElement(l.a,null,i.a.createElement("span",{className:"font16 ml40"},oe==null||((We=oe.data)===null||We===void 0)?void 0:We.user_name),i.a.createElement(F.e,{status:oe==null||((Ge=oe.data)===null||Ge===void 0)?void 0:Ge.compelete_status}),i.a.createElement("ul",{className:W.a.userInfo},i.a.createElement("li",null,"\u5B66\u53F7\uFF1A",(oe==null||((De=oe.data)===null||De===void 0)?void 0:De.student_id)||"--"),i.a.createElement("li",null,"\u5206\u73ED\uFF1A",(oe==null||((Te=oe.data)===null||Te===void 0)?void 0:Te.course_group)||"--"),i.a.createElement("br",null),i.a.createElement("li",null,"\u622A\u6B62\u524D\u5B8C\u6210\u5237\u9898\uFF1A",i.a.createElement("span",{className:"c-red"},oe==null||((Oe=oe.data)===null||Oe===void 0)?void 0:Oe.finish_do)),i.a.createElement("li",null,"\u6700\u65B0\u5B8C\u6210\u5237\u9898\uFF1A",i.a.createElement("span",{className:"c-red"},(oe==null||((le=oe.data)===null||le===void 0)?void 0:le.latest_do)||"-")))),i.a.createElement("ul",{className:[W.a.listItem,"mt10"].join(" ")},i.a.createElement("li",null,i.a.createElement("strong",null,"\u5B8C\u6210\u65F6\u95F4"),i.a.createElement("div",{className:"c-light-black mt20"},(oe==null?void 0:oe.data)&&(oe==null||((fe=oe.data)===null||fe===void 0)?void 0:fe.finish_time))),i.a.createElement("li",null,i.a.createElement("strong",null,"\u5B8C\u6210\u65F6\u957F",i.a.createElement("i",{onClick:function(Yt){Yt.stopPropagation(),Yt.preventDefault(),Kr(!0)},style:{marginLeft:4,display:"none",color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),i.a.createElement("div",{className:"c-light-black mt20"},oe==null||((Ce=oe.data)===null||Ce===void 0)?void 0:Ce.finish_time_long)),i.a.createElement("li",null,i.a.createElement("strong",null,"\u8BC4\u6D4B\u6B21\u6570"),i.a.createElement("div",{className:"mt20"},oe==null||((we=oe.data)===null||we===void 0)?void 0:we.submit_count)),i.a.createElement("li",null,i.a.createElement("strong",null,"\u901A\u8FC7\u7387"),i.a.createElement("div",{className:"mt20"},i.a.createElement("span",null,(oe==null||((Me=oe.data)===null||Me===void 0)?void 0:Me.pass_rate)||"- -"))),i.a.createElement("li",null,i.a.createElement("strong",null,"\u5F97\u5206"),i.a.createElement("div",{className:"mt20"},i.a.createElement("span",{className:"c-orange"},oe==null||(($e=oe.data)===null||$e===void 0)?void 0:$e.score))),i.a.createElement("li",null,i.a.createElement("strong",null,"\u7EC3\u4E60\u603B\u6392\u540D"),i.a.createElement("div",{className:"mt20"},i.a.createElement("span",{className:"c-orange"},oe==null||((Ie=oe.data)===null||Ie===void 0)?void 0:Ie.total_rank))),i.a.createElement("li",null,i.a.createElement("strong",null,"\u5206\u73ED\u6392\u540D"),i.a.createElement("div",{className:"mt20"},i.a.createElement("span",{className:"c-orange"},oe==null||((Ye=oe.data)===null||Ye===void 0)?void 0:Ye.class_rank))))),i.a.createElement(H.a,{style:{margin:0}}),((oe==null||((tt=oe.data)===null||tt===void 0)?void 0:tt.work_comment_hidden)||(oe==null||((at=oe.data)===null||at===void 0)?void 0:at.work_comment))&&i.a.createElement("div",null,i.a.createElement(N.a,{align:"middle"},i.a.createElement(l.a,{flex:1},i.a.createElement("h1",{className:W.a.title},"\u70B9\u8BC4\u5185\u5BB9")),i.a.createElement(l.a,{className:"pr30"},Object(f.c)()&&i.a.createElement(M.a,{onClick:Object(v.a)(u.a.mark(function jt(){return u.a.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:E.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:i.a.createElement(t.a,null),content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",onOk:function(){return Object(v.a)(u.a.mark(function Qt(){var Jt,Gt;return u.a.wrap(function(Xr){for(;;)switch(Xr.prev=Xr.next){case 0:return Xr.next=2,Object(q.m)({comment_id:oe==null||((Jt=oe.data)===null||Jt===void 0)?void 0:Jt.comment_id,homeworkId:Et.homeworkId});case 2:Gt=Xr.sent,Gt.status===0&&($.b.success("\u5220\u9664\u6210\u529F"),Tt({type:"shixunHomeworks/getShixunWorkReports",payload:Object(m.a)({},Et)}));case 4:case"end":return Xr.stop()}},Qt)}))()}});case 1:case"end":return Dt.stop()}},jt)}))},i.a.createElement(p.a,null),"\u5220\u9664"))),i.a.createElement(H.a,{style:{margin:0}}),(oe==null||((mt=oe.data)===null||mt===void 0)?void 0:mt.work_comment)&&i.a.createElement("aside",{className:"pl30 pr30 mt20"},i.a.createElement("span",{className:"c-light-black font12"},"# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),i.a.createElement("br",null),i.a.createElement(Ue.a,{value:oe==null||((ft=oe.data)===null||ft===void 0)?void 0:ft.work_comment})),(oe==null||((Ze=oe.data)===null||Ze===void 0)?void 0:Ze.work_comment_hidden)&&i.a.createElement("aside",{className:"pl30 pr30 mt20"},i.a.createElement("span",{className:"c-light-black font12"},"# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),i.a.createElement("br",null),i.a.createElement(Ue.a,{value:oe==null||((yt=oe.data)===null||yt===void 0)?void 0:yt.work_comment_hidden}))),i.a.createElement("h1",{className:W.a.title},"\u9636\u6BB5\u6210\u7EE9"),i.a.createElement("aside",{className:"pl30 pr30"},i.a.createElement(Ee.a,{dataSource:oe==null?void 0:oe.hack,pagination:!1,columns:ir})),(oe==null||((lt=oe.data)===null||lt===void 0)?void 0:lt.work_description)&&i.a.createElement(i.a.Fragment,null,i.a.createElement("h1",{className:W.a.title},"\u4E2A\u4EBA\u603B\u7ED3"),i.a.createElement("aside",{className:"pl30 pr30"},i.a.createElement(Ue.a,{value:oe==null||((gt=oe.data)===null||gt===void 0)?void 0:gt.work_description}))),i.a.createElement("h1",{className:W.a.title},"\u5237\u9898\u8BE6\u60C5")),i.a.createElement(ie,{autoHeight:Z}))),Object(f.c)()&&i.a.createElement("aside",{className:"".concat(W.a.footerBar," ").concat(Ke?W.a.footerBarStatic:"")},i.a.createElement("aside",{className:"edu-container"},i.a.createElement(N.a,{align:"middle"},i.a.createElement(l.a,{flex:"1"},i.a.createElement(r.a,{className:W.a.exitComment,to:"/classrooms/".concat(Et.coursesId,"/program_homework/").concat(Et.categoryId,"/detail")},"\u8FD4\u56DE\u5217\u8868")),i.a.createElement(l.a,{flex:"1",className:"tr"},Object(f.c)()&&i.a.createElement(M.a,{type:"primary",onClick:Object(v.a)(u.a.mark(function jt(){return u.a.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:Tt({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:oe.user_id,data:Object(m.a)({},oe)}}});case 1:case"end":return Dt.stop()}},jt)}))},"\u70B9\u8BC4\u4F5C\u4E1A"))))))),i.a.createElement(Ve,null),i.a.createElement(Ne.a,null),i.a.createElement(E.a,{visible:Sr,width:860,centered:!0,onCancel:function(){xr(!1)},title:"\u8BA1\u65F6\u89C4\u5219\u8BF4\u660E",footer:null},i.a.createElement("div",{style:{color:"#333333",fontWeight:400}},i.a.createElement("span",{style:{fontWeight:500}},"1\u3001\u9875\u9762\u505C\u7559\u65F6\u957F"),i.a.createElement("br",null),i.a.createElement("span",null,"\u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"),i.a.createElement("br",null),i.a.createElement("span",null," ","\u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u82E5\u5B66\u751F\u5173\u95ED/\u9000\u51FA\u7B54\u9898\u9875\u9762\uFF0C\u5219\u8BA1\u65F6\u6682\u505C\uFF0C\u518D\u6B21\u8FDB\u5165\u7B54\u9898\u9875\u9762\u65F6\u5F00\u59CB\u7D2F\u8BA1\u8BA1\u65F6\u76F4\u81F3\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"),i.a.createElement("span",{style:{color:"#FA6400",display:"flex",height:34,alignItems:"center"}}," ","\u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5"," "),i.a.createElement("span",null,"a\u3001\u5B66\u751F\u8FDB\u5165\u5173\u5361\u770B\u5B8C\u9898\u540E\uFF0C\u9000\u51FA\u7B54\u9898\u9875\u9762\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u590D\u5236\u8FDB\u5E73\u53F0\u7B54\u9898\u9875\u9762\u8FDB\u884C\u8BC4\u6D4B\uFF0C\u65E0\u6CD5\u8BC4\u4F30\u5B66\u751F\u7684\u5B66\u4E60\u548C\u601D\u8003\u65F6\u95F4\u3002")),i.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},i.a.createElement("span",{style:{fontWeight:500}},"2\u3001\u5173\u5361\u603B\u8017\u65F6"),i.a.createElement("br",null),i.a.createElement("span",{style:{}},"\u5B66\u751F\u7B2C\u4E00\u6B21\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\u3002"," "),i.a.createElement("br",null),i.a.createElement("span",null," ","\u53E6\uFF0C\u5373\u4F7F\u5173\u5361\u95EF\u5173\u8FC7\u7A0B\u4E2D\uFF0C\u5B66\u751F\u9000\u51FA/\u5173\u95ED\u7B54\u9898\u9875\u9762\uFF0C\u4E5F\u5C06\u6301\u7EED\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u901A\u8FC7\u3002"),i.a.createElement("span",{style:{color:"#FA6400",display:"flex",height:44,paddingTop:10}}," ","\u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5"," "),i.a.createElement("span",null,"a\u3001\u5B66\u751F\u4ECE\u5176\u4ED6\u540C\u5B66\u5904\u770B\u5230\u9898\u76EE\u540E\uFF0C\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\uFF0C\u5C06\u5DF2\u5B8C\u6210\u7684\u4EE3\u7801\u590D\u5236\u81F3\u5E73\u53F0\u8FDB\u884C\u8BC4\u6D4B\uFF1B"),i.a.createElement("br",null),i.a.createElement("span",null,"b\u3001\u5B66\u751F\u7B2C\u4E00\u6B21\u6253\u5F00\u5173\u5361\u540E\uFF0C\u56E0\u4E3A\u67D0\u79CD\u539F\u56E0\u79BB\u5F00\u9875\u9762\uFF0C\u65F6\u9694\u591A\u65E5\u624D\u518D\u6B21\u8FDB\u5165\u5E73\u53F0\u95EF\u5173\uFF0C\u5C31\u4F1A\u5BFC\u81F4\u5B66\u751F\u5173\u5361\u603B\u8017\u65F6\u8FC7\u957F\uFF1B")),i.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},i.a.createElement("span",{style:{fontWeight:500}},"3\u3001\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),i.a.createElement("br",null),i.a.createElement("span",{style:{}},"\u4ECE\u8001\u5E08\u53D1\u5E03\u7684\u5B9E\u8BAD\u4F5C\u4E1A\u5F00\u59CB\u65F6\u95F4\uFF0C\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5B9E\u8BAD\u901A\u5173\uFF08\u5305\u62EC\u8FDF\u4EA4\u901A\u5173\uFF09\uFF0C\u7ED3\u675F\u8BA1\u65F6\u3002\u5982\u679C\u5B66\u751F\u672A\u901A\u5173\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u8001\u5E08\u8BBE\u7F6E\u7684\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\uFF0C\u5982\u679C\u8001\u5E08\u5F00\u542F\u4E86\u8865\u4EA4\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u8865\u4EA4\u622A\u6B62\u65F6\u95F4\u3002")),i.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},i.a.createElement("span",{style:{fontWeight:500}},"\u89C4\u5219\u76EE\u7684"),i.a.createElement("br",null),i.a.createElement("span",{style:{}},"\u9F13\u52B1\u5B66\u751F\u5728\u5B9E\u8BAD\u4F5C\u4E1A\u53D1\u5E03\u7684\u7B2C\u4E00\u65F6\u95F4\uFF0C\u7ACB\u5373\u767B\u5F55\u5E73\u53F0\u5B8C\u6210\u5B9E\u8BAD\u4F5C\u4E1A\u7684\u901A\u5173\u3002"))),i.a.createElement(E.a,{visible:Fr,title:"\u5B9E\u8BAD\u603B\u8017\u65F6\u8BF4\u660E",centered:!0,footer:null,onCancel:function(){Kr(!1)},width:600},i.a.createElement("div",{style:{fontWeight:400,color:"#333333"}},i.a.createElement("div",null,"1\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",i.a.createElement("span",{style:{color:"#145DFF"}},"\u9875\u9762\u505C\u7559\u65F6\u957F"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"),i.a.createElement("div",{style:{margin:"20px 0px"}},"2\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",i.a.createElement("span",{style:{color:"#145DFF"}},"\u5173\u5361\u603B\u8017\u65F6"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"),i.a.createElement("div",null,"3\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",i.a.createElement("span",{style:{color:"#145DFF"}},"\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u901A\u5173\u65F6\u95F4\uFF0C\u5F53\u5B66\u751F\u672A\u901A\u5173\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\u3002"))))},re=_e.default=Object(o.a)(function(te){var ae=te.shixunHomeworks,ye=te.loading,Le=te.globalSetting;return{shixunHomeworks:ae,globalSetting:Le,loading:ye.effects}})(X)},FWmy:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return he});function he(be,ve){if(!be)throw new Error(ve?`Assertion failed (${ve})`:"Assertion Failed")}},Ff2n:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return be});var he=Q("zLVn");function be(ve,Ee){if(ve==null)return{};var ue=Object(he.a)(ve,Ee),$,O;if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(ve);for(O=0;O<H.length;O++){if($=H[O],Ee.indexOf($)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(ve,$))continue;ue[$]=ve[$]}}return ue}},GNbK:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return x});var he=Q("3ptp"),be=Q("M6Bk"),ve=Q("T/Jt"),Ee=Q.n(ve),ue=Q("AFTV"),$=Q("yuO0"),O=Q("ZIz+"),H=Q("r0bv"),e=function(u){Object(be.a)(R,u);function R(){for(var T,w=arguments.length,y=new Array(w),o=0;o<w;o++)y[o]=arguments[o];return T=u.call.apply(u,[this].concat(y))||this,T.history=Object(ue.a)(T.props),T}var i=R.prototype;return i.render=function(){return Ee.a.createElement(he.c,{history:this.history,children:this.props.children})},R}(Ee.a.Component),M=function(u){Object(be.a)(R,u);function R(){for(var T,w=arguments.length,y=new Array(w),o=0;o<w;o++)y[o]=arguments[o];return T=u.call.apply(u,[this].concat(y))||this,T.history=Object(ue.b)(T.props),T}var i=R.prototype;return i.render=function(){return Ee.a.createElement(he.c,{history:this.history,children:this.props.children})},R}(Ee.a.Component),D=function(R,i){return typeof R=="function"?R(i):R},N=function(R,i){return typeof R=="string"?Object(ue.c)(R,null,null,i):R},c=function(R){return R},l=Ee.a.forwardRef;typeof l=="undefined"&&(l=c);function s(u){return!!(u.metaKey||u.altKey||u.ctrlKey||u.shiftKey)}var h=l(function(u,R){var i=u.innerRef,T=u.navigate,w=u.onClick,y=Object(O.a)(u,["innerRef","navigate","onClick"]),o=y.target,r=Object($.a)({},y,{onClick:function(n){try{w&&w(n)}catch(t){throw n.preventDefault(),t}!n.defaultPrevented&&n.button===0&&(!o||o==="_self")&&!s(n)&&(n.preventDefault(),T())}});return c!==l?r.ref=R||i:r.ref=i,Ee.a.createElement("a",r)}),x=l(function(u,R){var i=u.component,T=i===void 0?h:i,w=u.replace,y=u.to,o=u.innerRef,r=Object(O.a)(u,["component","replace","to","innerRef"]);return Ee.a.createElement(he.e.Consumer,null,function(a){a||Object(H.a)(!1);var n=a.history,t=N(D(y,a.location),a.location),p=t?n.createHref(t):"",_=Object($.a)({},r,{href:p,navigate:function(){var F=D(y,a.location),P=w?n.replace:n.push;P(F)}});return c!==l?_.ref=R||o:_.innerRef=o,Ee.a.createElement(T,_)})});if(!1)var E,v;var d=function(R){return R},m=Ee.a.forwardRef;typeof m=="undefined"&&(m=d);function g(){for(var u=arguments.length,R=new Array(u),i=0;i<u;i++)R[i]=arguments[i];return R.filter(function(T){return T}).join(" ")}var S=m(function(u,R){var i=u["aria-current"],T=i===void 0?"page":i,w=u.activeClassName,y=w===void 0?"active":w,o=u.activeStyle,r=u.className,a=u.exact,n=u.isActive,t=u.location,p=u.sensitive,_=u.strict,f=u.style,F=u.to,P=u.innerRef,W=Object(O.a)(u,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return Ee.a.createElement(he.e.Consumer,null,function(V){V||Object(H.a)(!1);var J=t||V.location,ne=N(D(F,J),J),ce=ne.pathname,ie=ce&&ce.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),xe=ie?Object(he.f)(J.pathname,{path:ie,exact:a,sensitive:p,strict:_}):null,ge=!!(n?n(xe,J):xe),de=ge?g(r,y):r,Fe=ge?Object($.a)({},f,{},o):f,Qe=Object($.a)({"aria-current":ge&&T||null,className:de,style:Fe,to:ne},W);return d!==m?Qe.ref=R||P:Qe.innerRef=P,Ee.a.createElement(x,Qe)})});if(!1)var A},GcTH:function(dt,_e){const Q=/[&<>"']/,he=/[&<>"']/g,be=/[<>"']|&(?!#?\w+;)/,ve=/[<>"']|&(?!#?\w+;)/g,Ee={"&":"&","<":"<",">":">",'"':""","'":"'"},ue=u=>Ee[u];function $(u,R){if(R){if(Q.test(u))return u.replace(he,ue)}else if(be.test(u))return u.replace(ve,ue);return u}const O=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function H(u){return u.replace(O,(R,i)=>(i=i.toLowerCase(),i==="colon"?":":i.charAt(0)==="#"?i.charAt(1)==="x"?String.fromCharCode(parseInt(i.substring(2),16)):String.fromCharCode(+i.substring(1)):""))}const e=/(^|[^\[])\^/g;function M(u,R){u=u.source||u,R=R||"";const i={replace:(T,w)=>(w=w.source||w,w=w.replace(e,"$1"),u=u.replace(T,w),i),getRegex:()=>new RegExp(u,R)};return i}const D=/[^\w:]/g,N=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function c(u,R,i){if(u){let T;try{T=decodeURIComponent(H(i)).replace(D,"").toLowerCase()}catch(w){return null}if(T.indexOf("javascript:")===0||T.indexOf("vbscript:")===0||T.indexOf("data:")===0)return null}R&&!N.test(i)&&(i=E(R,i));try{i=encodeURI(i).replace(/%25/g,"%")}catch(T){return null}return i}const l={},s=/^[^:]+:\/*[^/]*$/,h=/^([^:]+:)[\s\S]*$/,x=/^([^:]+:\/*[^/]*)[\s\S]*$/;function E(u,R){l[" "+u]||(s.test(u)?l[" "+u]=u+"/":l[" "+u]=g(u,"/",!0)),u=l[" "+u];const i=u.indexOf(":")===-1;return R.substring(0,2)==="//"?i?R:u.replace(h,"$1")+R:R.charAt(0)==="/"?i?R:u.replace(x,"$1")+R:u+R}const v={exec:function(){}};function d(u){let R=1,i,T;for(;R<arguments.length;R++){i=arguments[R];for(T in i)Object.prototype.hasOwnProperty.call(i,T)&&(u[T]=i[T])}return u}function m(u,R){const i=u.replace(/\|/g,(y,o,r)=>{let a=!1,n=o;for(;--n>=0&&r[n]==="\\";)a=!a;return a?"|":" |"}),T=i.split(/ \|/);let w=0;if(T.length>R)T.splice(R);else for(;T.length<R;)T.push("");for(;w<T.length;w++)T[w]=T[w].trim().replace(/\\\|/g,"|");return T}function g(u,R,i){const T=u.length;if(T===0)return"";let w=0;for(;w<T;){const y=u.charAt(T-w-1);if(y===R&&!i)w++;else if(y!==R&&i)w++;else break}return u.substr(0,T-w)}function S(u,R){if(u.indexOf(R[1])===-1)return-1;const i=u.length;let T=0,w=0;for(;w<i;w++)if(u[w]==="\\")w++;else if(u[w]===R[0])T++;else if(u[w]===R[1]&&(T--,T<0))return w;return-1}function A(u){u&&u.sanitize&&!u.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")}dt.exports={escape:$,unescape:H,edit:M,cleanUrl:c,resolveUrl:E,noopTest:v,merge:d,splitCells:m,rtrim:g,findClosingBracket:S,checkSanitizeDeprecation:A}},GeSD:function(dt,_e,Q){dt.exports={flex_box_center:"flex_box_center___3psDK",flex_space_between:"flex_space_between___3-Gwv",flex_box_vertical_center:"flex_box_vertical_center___KuXCa",flex_box_center_end:"flex_box_center_end___3yf7b",flex_box_column:"flex_box_column___CeV--",title:"title___1pfhN",export:"export___1Foif",title1_right:"title1_right___1b0PH",userPic:"userPic___2fhW8",userInfo:"userInfo___3ELpM",listItem:"listItem___2hXBP",rightInfo:"rightInfo___35dRu",shixunTitle:"shixunTitle___1yeYv",shixunWrp:"shixunWrp___5RaDa",footerBar:"footerBar___1_Vn_",footerBarStatic:"footerBarStatic___KgV2n",exitComment:"exitComment___2Z6mb",nextComment:"nextComment___2qKB7",modal:"modal___2apBa"}},Gq82:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return c});var he=Q("XjgL"),be=Q("aVTQ"),ve=Q("6ASS"),Ee=Q("fNpE"),ue=Q("T/Jt"),$=Q.n(ue),O=Q("B/uU"),H=Q("qoVz"),e=Q("+E2i"),M=Q("VUat"),D=["children"],N=["fixed"];function c(E){return Object(H.a)(E).filter(function(v){return ue.isValidElement(v)}).map(function(v){var d=v.key,m=v.props,g=m.children,S=Object(Ee.a)(m,D),A=Object(ve.a)({key:d},S);return g&&(A.children=c(g)),A})}function l(E){return E.reduce(function(v,d){var m=d.fixed,g=m===!0?"left":m,S=d.children;return S&&S.length>0?[].concat(Object(be.a)(v),Object(be.a)(l(S).map(function(A){return Object(ve.a)({fixed:g},A)}))):[].concat(Object(be.a)(v),[Object(ve.a)(Object(ve.a)({},d),{},{fixed:g})])},[])}function s(E){for(var v=!0,d=0;d<E.length;d+=1){var m=E[d];if(v&&m.fixed!=="left")v=!1;else if(!v&&m.fixed==="left"){Object(O.a)(!1,"Index ".concat(d-1," of `columns` missing `fixed='left'` prop."));break}}for(var g=!0,S=E.length-1;S>=0;S-=1){var A=E[S];if(g&&A.fixed!=="right")g=!1;else if(!g&&A.fixed==="right"){Object(O.a)(!1,"Index ".concat(S+1," of `columns` missing `fixed='right'` prop."));break}}}function h(E){return E.map(function(v){var d=v.fixed,m=Object(Ee.a)(v,N),g=d;return d==="left"?g="right":d==="right"&&(g="left"),Object(ve.a)({fixed:g},m)})}function x(E,v){var d=E.prefixCls,m=E.columns,g=E.children,S=E.expandable,A=E.expandedKeys,u=E.columnTitle,R=E.getRowKey,i=E.onTriggerExpand,T=E.expandIcon,w=E.rowExpandable,y=E.expandIconColumnIndex,o=E.direction,r=E.expandRowByClick,a=E.columnWidth,n=E.fixed,t=ue.useMemo(function(){return m||c(g)},[m,g]),p=ue.useMemo(function(){if(S){var F,P=t.slice();if(!P.includes(M.a)){var W=y||0;W>=0&&P.splice(W,0,M.a)}var V=P.indexOf(M.a);P=P.filter(function(ie,xe){return ie!==M.a||xe===V});var J=t[V],ne;(n==="left"||n)&&!y?ne="left":(n==="right"||n)&&y===t.length?ne="right":ne=J?J.fixed:null;var ce=(F={},Object(he.a)(F,e.a,{className:"".concat(d,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),Object(he.a)(F,"title",u),Object(he.a)(F,"fixed",ne),Object(he.a)(F,"className","".concat(d,"-row-expand-icon-cell")),Object(he.a)(F,"width",a),Object(he.a)(F,"render",function(xe,ge,de){var Fe=R(ge,de),Qe=A.has(Fe),Ve=w?w(ge):!0,Ne=T({prefixCls:d,expanded:Qe,expandable:Ve,record:ge,onExpand:i});return r?ue.createElement("span",{onClick:function(q){return q.stopPropagation()}},Ne):Ne}),F);return P.map(function(ie){return ie===M.a?ce:ie})}return t.filter(function(ie){return ie!==M.a})},[S,t,R,A,T,o]),_=ue.useMemo(function(){var F=p;return v&&(F=v(F)),F.length||(F=[{render:function(){return null}}]),F},[v,p,o]),f=ue.useMemo(function(){return o==="rtl"?h(l(_)):l(_)},[_,o]);return[_,f]}_e.b=x},IEJz:function(dt,_e,Q){"use strict";function he(be){return null}_e.a=he},J66h:function(dt,_e,Q){(function(he){var be,ve;(function(Ee,ue){dt.exports=ue(Ee)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof he!="undefined"?he:this,function(Ee){"use strict";Ee=Ee||{};var ue=Ee.Base64,$="2.6.4",O="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",H=function(r){for(var a={},n=0,t=r.length;n<t;n++)a[r.charAt(n)]=n;return a}(O),e=String.fromCharCode,M=function(r){if(r.length<2){var a=r.charCodeAt(0);return a<128?r:a<2048?e(192|a>>>6)+e(128|a&63):e(224|a>>>12&15)+e(128|a>>>6&63)+e(128|a&63)}else{var a=65536+(r.charCodeAt(0)-55296)*1024+(r.charCodeAt(1)-56320);return e(240|a>>>18&7)+e(128|a>>>12&63)+e(128|a>>>6&63)+e(128|a&63)}},D=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,N=function(r){return r.replace(D,M)},c=function(r){var a=[0,2,1][r.length%3],n=r.charCodeAt(0)<<16|(r.length>1?r.charCodeAt(1):0)<<8|(r.length>2?r.charCodeAt(2):0),t=[O.charAt(n>>>18),O.charAt(n>>>12&63),a>=2?"=":O.charAt(n>>>6&63),a>=1?"=":O.charAt(n&63)];return t.join("")},l=Ee.btoa&&typeof Ee.btoa=="function"?function(r){return Ee.btoa(r)}:function(r){if(r.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return r.replace(/[\s\S]{1,3}/g,c)},s=function(r){return l(N(String(r)))},h=function(r){return r.replace(/[+\/]/g,function(a){return a=="+"?"-":"_"}).replace(/=/g,"")},x=function(r,a){return a?h(s(r)):s(r)},E=function(r){return x(r,!0)},v;Ee.Uint8Array&&(v=function(r,a){for(var n="",t=0,p=r.length;t<p;t+=3){var _=r[t],f=r[t+1],F=r[t+2],P=_<<16|f<<8|F;n+=O.charAt(P>>>18)+O.charAt(P>>>12&63)+(typeof f!="undefined"?O.charAt(P>>>6&63):"=")+(typeof F!="undefined"?O.charAt(P&63):"=")}return a?h(n):n});var d=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,m=function(r){switch(r.length){case 4:var a=(7&r.charCodeAt(0))<<18|(63&r.charCodeAt(1))<<12|(63&r.charCodeAt(2))<<6|63&r.charCodeAt(3),n=a-65536;return e((n>>>10)+55296)+e((n&1023)+56320);case 3:return e((15&r.charCodeAt(0))<<12|(63&r.charCodeAt(1))<<6|63&r.charCodeAt(2));default:return e((31&r.charCodeAt(0))<<6|63&r.charCodeAt(1))}},g=function(r){return r.replace(d,m)},S=function(r){var a=r.length,n=a%4,t=(a>0?H[r.charAt(0)]<<18:0)|(a>1?H[r.charAt(1)]<<12:0)|(a>2?H[r.charAt(2)]<<6:0)|(a>3?H[r.charAt(3)]:0),p=[e(t>>>16),e(t>>>8&255),e(t&255)];return p.length-=[0,0,2,1][n],p.join("")},A=Ee.atob&&typeof Ee.atob=="function"?function(r){return Ee.atob(r)}:function(r){return r.replace(/\S{1,4}/g,S)},u=function(r){return A(String(r).replace(/[^A-Za-z0-9\+\/]/g,""))},R=function(r){return g(A(r))},i=function(r){return String(r).replace(/[-_]/g,function(a){return a=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},T=function(r){return R(i(r))},w;Ee.Uint8Array&&(w=function(r){return Uint8Array.from(u(i(r)),function(a){return a.charCodeAt(0)})});var y=function(){var r=Ee.Base64;return Ee.Base64=ue,r};if(Ee.Base64={VERSION:$,atob:u,btoa:l,fromBase64:T,toBase64:x,utob:N,encode:x,encodeURI:E,btou:g,decode:T,noConflict:y,fromUint8Array:v,toUint8Array:w},typeof Object.defineProperty=="function"){var o=function(r){return{value:r,enumerable:!1,writable:!0,configurable:!0}};Ee.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",o(function(){return T(this)})),Object.defineProperty(String.prototype,"toBase64",o(function(r){return x(this,r)})),Object.defineProperty(String.prototype,"toBase64URI",o(function(){return x(this,!0)}))}}return Ee.Meteor&&(Base64=Ee.Base64),dt.exports?dt.exports.Base64=Ee.Base64:!(be=[],ve=function(){return Ee.Base64}.apply(_e,be),ve!==void 0&&(dt.exports=ve)),{Base64:Ee.Base64}})}).call(this,Q("IGO8"))},JYp7:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return he});var he;(function(be){function ve(d){return d&&typeof d=="object"&&typeof d[Symbol.iterator]=="function"}be.is=ve;const Ee=Object.freeze([]);function ue(){return Ee}be.empty=ue;function*$(d){yield d}be.single=$;function O(d){return d||Ee}be.from=O;function H(d){return!d||d[Symbol.iterator]().next().done===!0}be.isEmpty=H;function e(d){return d[Symbol.iterator]().next().value}be.first=e;function M(d,m){for(const g of d)if(m(g))return!0;return!1}be.some=M;function D(d,m){for(const g of d)if(m(g))return g;return}be.find=D;function*N(d,m){for(const g of d)m(g)&&(yield g)}be.filter=N;function*c(d,m){let g=0;for(const S of d)yield m(S,g++)}be.map=c;function*l(...d){for(const m of d)for(const g of m)yield g}be.concat=l;function*s(d){for(const m of d)for(const g of m)yield g}be.concatNested=s;function h(d,m,g){let S=g;for(const A of d)S=m(S,A);return S}be.reduce=h;function*x(d,m,g=d.length){for(m<0&&(m+=d.length),g<0?g+=d.length:g>d.length&&(g=d.length);m<g;m++)yield d[m]}be.slice=x;function E(d,m=Number.POSITIVE_INFINITY){const g=[];if(m===0)return[g,d];const S=d[Symbol.iterator]();for(let A=0;A<m;A++){const u=S.next();if(u.done)return[g,be.empty()];g.push(u.value)}return[g,{[Symbol.iterator](){return S}}]}be.consume=E;function v(d,m,g=(S,A)=>S===A){const S=d[Symbol.iterator](),A=m[Symbol.iterator]();for(;;){const u=S.next(),R=A.next();if(u.done!==R.done)return!1;if(u.done)return!0;if(!g(u.value,R.value))return!1}}be.equals=v})(he||(he={}))},LuSS:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return Ee});var he=Q("FER5"),be={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},ve=Q("b3aT");function Ee(c){var l={r:0,g:0,b:0},s=1,h=null,x=null,E=null,v=!1,d=!1;return typeof c=="string"&&(c=D(c)),typeof c=="object"&&(N(c.r)&&N(c.g)&&N(c.b)?(l=Object(he.g)(c.r,c.g,c.b),v=!0,d=String(c.r).substr(-1)==="%"?"prgb":"rgb"):N(c.h)&&N(c.s)&&N(c.v)?(h=Object(ve.c)(c.s),x=Object(ve.c)(c.v),l=Object(he.c)(c.h,h,x),v=!0,d="hsv"):N(c.h)&&N(c.s)&&N(c.l)&&(h=Object(ve.c)(c.s),E=Object(ve.c)(c.l),l=Object(he.b)(c.h,h,E),v=!0,d="hsl"),Object.prototype.hasOwnProperty.call(c,"a")&&(s=c.a)),s=Object(ve.b)(s),{ok:v,format:c.format||d,r:Math.min(255,Math.max(l.r,0)),g:Math.min(255,Math.max(l.g,0)),b:Math.min(255,Math.max(l.b,0)),a:s}}var ue="[-\\+]?\\d+%?",$="[-\\+]?\\d*\\.\\d+%?",O="(?:".concat($,")|(?:").concat(ue,")"),H="[\\s|\\(]+(".concat(O,")[,|\\s]+(").concat(O,")[,|\\s]+(").concat(O,")\\s*\\)?"),e="[\\s|\\(]+(".concat(O,")[,|\\s]+(").concat(O,")[,|\\s]+(").concat(O,")[,|\\s]+(").concat(O,")\\s*\\)?"),M={CSS_UNIT:new RegExp(O),rgb:new RegExp("rgb"+H),rgba:new RegExp("rgba"+e),hsl:new RegExp("hsl"+H),hsla:new RegExp("hsla"+e),hsv:new RegExp("hsv"+H),hsva:new RegExp("hsva"+e),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function D(c){if(c=c.trim().toLowerCase(),c.length===0)return!1;var l=!1;if(be[c])c=be[c],l=!0;else if(c==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var s=M.rgb.exec(c);return s?{r:s[1],g:s[2],b:s[3]}:(s=M.rgba.exec(c),s?{r:s[1],g:s[2],b:s[3],a:s[4]}:(s=M.hsl.exec(c),s?{h:s[1],s:s[2],l:s[3]}:(s=M.hsla.exec(c),s?{h:s[1],s:s[2],l:s[3],a:s[4]}:(s=M.hsv.exec(c),s?{h:s[1],s:s[2],v:s[3]}:(s=M.hsva.exec(c),s?{h:s[1],s:s[2],v:s[3],a:s[4]}:(s=M.hex8.exec(c),s?{r:Object(he.d)(s[1]),g:Object(he.d)(s[2]),b:Object(he.d)(s[3]),a:Object(he.a)(s[4]),format:l?"name":"hex8"}:(s=M.hex6.exec(c),s?{r:Object(he.d)(s[1]),g:Object(he.d)(s[2]),b:Object(he.d)(s[3]),format:l?"name":"hex"}:(s=M.hex4.exec(c),s?{r:Object(he.d)(s[1]+s[1]),g:Object(he.d)(s[2]+s[2]),b:Object(he.d)(s[3]+s[3]),a:Object(he.a)(s[4]+s[4]),format:l?"name":"hex8"}:(s=M.hex3.exec(c),s?{r:Object(he.d)(s[1]+s[1]),g:Object(he.d)(s[2]+s[2]),b:Object(he.d)(s[3]+s[3]),format:l?"name":"hex"}:!1)))))))))}function N(c){return Boolean(M.CSS_UNIT.exec(String(c)))}},MI8n:function(dt,_e,Q){"use strict";Q.d(_e,"c",function(){return ue}),Q.d(_e,"b",function(){return e}),Q.d(_e,"e",function(){return M}),Q.d(_e,"a",function(){return D}),Q.d(_e,"d",function(){return N}),Q.d(_e,"f",function(){return c});var he=Q("/cxE"),be=Q("pmY6"),ve=Q("24hK"),Ee=Q("5Y4S"),ue;(function(l){l.None=()=>be.a.None;function s(r){return(a,n=null,t)=>{let p=!1,_;return _=r(f=>p?void 0:(_?_.dispose():p=!0,a.call(n,f)),null,t),p&&_.dispose(),_}}l.once=s;function h(r,a){return g((n,t=null,p)=>r(_=>n.call(t,a(_)),null,p))}l.map=h;function x(r,a){return g((n,t=null,p)=>r(_=>{a(_),n.call(t,_)},null,p))}l.forEach=x;function E(r,a){return g((n,t=null,p)=>r(_=>a(_)&&n.call(t,_),null,p))}l.filter=E;function v(r){return r}l.signal=v;function d(...r){return(a,n=null,t)=>Object(be.e)(...r.map(p=>p(_=>a.call(n,_),null,t)))}l.any=d;function m(r,a,n){let t=n;return h(r,p=>(t=a(t,p),t))}l.reduce=m;function g(r){let a;const n=new e({onFirstListenerAdd(){a=r(n.fire,n)},onLastListenerRemove(){a.dispose()}});return n.event}function S(r,a,n=100,t=!1,p){let _,f,F,P=0;const W=new e({leakWarningThreshold:p,onFirstListenerAdd(){_=r(V=>{P++,f=a(f,V),t&&!F&&(W.fire(f),f=void 0),clearTimeout(F),F=setTimeout(()=>{const J=f;f=void 0,F=void 0,(!t||P>1)&&W.fire(J),P=0},n)})},onLastListenerRemove(){_.dispose()}});return W.event}l.debounce=S;function A(r,a=(n,t)=>n===t){let n=!0,t;return E(r,p=>{const _=n||!a(p,t);return n=!1,t=p,_})}l.latch=A;function u(r,a){return[l.filter(r,a),l.filter(r,n=>!a(n))]}l.split=u;function R(r,a=!1,n=[]){let t=n.slice(),p=r(F=>{t?t.push(F):f.fire(F)});const _=()=>{t&&t.forEach(F=>f.fire(F)),t=null},f=new e({onFirstListenerAdd(){p||(p=r(F=>f.fire(F)))},onFirstListenerDidAdd(){t&&(a?setTimeout(_):_())},onLastListenerRemove(){p&&p.dispose(),p=null}});return f.event}l.buffer=R;class i{constructor(r){this.event=r}map(r){return new i(h(this.event,r))}forEach(r){return new i(x(this.event,r))}filter(r){return new i(E(this.event,r))}reduce(r,a){return new i(m(this.event,r,a))}latch(){return new i(A(this.event))}debounce(r,a=100,n=!1,t){return new i(S(this.event,r,a,n,t))}on(r,a,n){return this.event(r,a,n)}once(r,a,n){return s(this.event)(r,a,n)}}function T(r){return new i(r)}l.chain=T;function w(r,a,n=t=>t){const t=(...F)=>f.fire(n(...F)),p=()=>r.on(a,t),_=()=>r.removeListener(a,t),f=new e({onFirstListenerAdd:p,onLastListenerRemove:_});return f.event}l.fromNodeEventEmitter=w;function y(r,a,n=t=>t){const t=(...F)=>f.fire(n(...F)),p=()=>r.addEventListener(a,t),_=()=>r.removeEventListener(a,t),f=new e({onFirstListenerAdd:p,onLastListenerRemove:_});return f.event}l.fromDOMEventEmitter=y;function o(r){return new Promise(a=>s(r)(a))}l.toPromise=o})(ue||(ue={}));class ${constructor(l){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${l}_${$._idPool++}`}start(l){this._stopWatch=new Ee.a(!0),this._listenerCount=l}stop(){if(this._stopWatch){const l=this._stopWatch.elapsed();this._elapsedOverall+=l,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${l.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}$._idPool=0;let O=-1;class H{constructor(l,s=Math.random().toString(18).slice(2,5)){this.customThreshold=l,this.name=s,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(l){let s=O;if(typeof this.customThreshold=="number"&&(s=this.customThreshold),s<=0||l<s)return;this._stacks||(this._stacks=new Map);const h=new Error().stack.split(`
|
|
`).slice(3).join(`
|
|
`),x=this._stacks.get(h)||0;if(this._stacks.set(h,x+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=s*.5;let E,v=0;for(const[d,m]of this._stacks)(!E||v<m)&&(E=d,v=m);console.warn(`[${this.name}] potential listener LEAK detected, having ${l} listeners already. MOST frequent listener (${v}):`),console.warn(E)}return()=>{const E=this._stacks.get(h)||0;this._stacks.set(h,E-1)}}}class e{constructor(l){var s;this._disposed=!1,this._options=l,this._leakageMon=O>0?new H(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((s=this._options)===null||s===void 0?void 0:s._profName)?new $(this._options._profName):void 0}get event(){return this._event||(this._event=(l,s,h)=>{var x;this._listeners||(this._listeners=new ve.a);const E=this._listeners.isEmpty();E&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const v=this._listeners.push(s?[l,s]:l);E&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,l,s);const d=(x=this._leakageMon)===null||x===void 0?void 0:x.check(this._listeners.size),m=Object(be.i)(()=>{if(d&&d(),!this._disposed&&(v(),this._options&&this._options.onLastListenerRemove)){const g=this._listeners&&!this._listeners.isEmpty();g||this._options.onLastListenerRemove(this)}});return h instanceof be.b?h.add(m):Array.isArray(h)&&h.push(m),m}),this._event}fire(l){var s,h;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new ve.a);for(let x of this._listeners)this._deliveryQueue.push([x,l]);for((s=this._perfMon)===null||s===void 0||s.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[x,E]=this._deliveryQueue.shift();try{typeof x=="function"?x.call(void 0,E):x[0].call(x[1],E)}catch(v){Object(he.f)(v)}}(h=this._perfMon)===null||h===void 0||h.stop()}}dispose(){var l,s,h,x,E;this._disposed||(this._disposed=!0,(l=this._listeners)===null||l===void 0||l.clear(),(s=this._deliveryQueue)===null||s===void 0||s.clear(),(x=(h=this._options)===null||h===void 0?void 0:h.onLastListenerRemove)===null||x===void 0||x.call(h),(E=this._leakageMon)===null||E===void 0||E.dispose())}}class M extends e{constructor(l){super(l);this._isPaused=0,this._eventQueue=new ve.a,this._mergeFn=l==null?void 0:l.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const l=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(l))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(l){this._listeners&&(this._isPaused!==0?this._eventQueue.push(l):super.fire(l))}}class D extends M{constructor(l){var s;super(l);this._delay=(s=l.delay)!==null&&s!==void 0?s:100}fire(l){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(l)}}class N{constructor(){this.buffers=[]}wrapEvent(l){return(s,h,x)=>l(E=>{const v=this.buffers[this.buffers.length-1];v?v.push(()=>s.call(h,E)):s.call(h,E)},void 0,x)}bufferEvents(l){const s=[];this.buffers.push(s);const h=l();return this.buffers.pop(),s.forEach(x=>x()),h}}class c{constructor(){this.listening=!1,this.inputEvent=ue.None,this.inputEventListener=be.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(l){this.inputEvent=l,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=l(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(dt,_e,Q){"use strict";(function(he,be){Q.d(_e,"b",function(){return h}),Q.d(_e,"i",function(){return d}),Q.d(_e,"f",function(){return m}),Q.d(_e,"d",function(){return g}),Q.d(_e,"g",function(){return S}),Q.d(_e,"h",function(){return A}),Q.d(_e,"c",function(){return u}),Q.d(_e,"k",function(){return R}),Q.d(_e,"j",function(){return i}),Q.d(_e,"a",function(){return T}),Q.d(_e,"e",function(){return o});var ve;const Ee="en";let ue=!1,$=!1,O=!1,H=!1,e=!1,M=!1,D=!1,N,c=Ee,l,s;const h=typeof self=="object"?self:typeof he=="object"?he:{};let x;typeof h.vscode!="undefined"&&typeof h.vscode.process!="undefined"?x=h.vscode.process:typeof be!="undefined"&&(x=be);const E=typeof((ve=x==null?void 0:x.versions)===null||ve===void 0?void 0:ve.electron)=="string"&&x.type==="renderer";if(typeof navigator=="object"&&!E)s=navigator.userAgent,ue=s.indexOf("Windows")>=0,$=s.indexOf("Macintosh")>=0,D=(s.indexOf("Macintosh")>=0||s.indexOf("iPad")>=0||s.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,O=s.indexOf("Linux")>=0,M=!0,N=navigator.language,c=N;else if(typeof x=="object"){ue=x.platform==="win32",$=x.platform==="darwin",O=x.platform==="linux",H=O&&!!x.env.SNAP&&!!x.env.SNAP_REVISION,N=Ee,c=Ee;const r=x.env.VSCODE_NLS_CONFIG;if(r)try{const a=JSON.parse(r),n=a.availableLanguages["*"];N=a.locale,c=n||Ee,l=a._translationsConfigFile}catch(a){}e=!0}else console.error("Unable to resolve platform.");let v=0;$?v=1:ue?v=3:O&&(v=2);const d=ue,m=$,g=O,S=e,A=M,u=D,R=s,i=function(){if(h.setImmediate)return h.setImmediate.bind(h);if(typeof h.postMessage=="function"&&!h.importScripts){let n=[];h.addEventListener("message",p=>{if(p.data&&p.data.vscodeSetImmediateId)for(let _=0,f=n.length;_<f;_++){const F=n[_];if(F.id===p.data.vscodeSetImmediateId){n.splice(_,1),F.callback();return}}});let t=0;return p=>{const _=++t;n.push({id:_,callback:p}),h.postMessage({vscodeSetImmediateId:_},"*")}}if(typeof(x==null?void 0:x.nextTick)=="function")return x.nextTick.bind(x);const a=Promise.resolve();return n=>a.then(n)}(),T=$||D?2:ue?1:3;let w=!0,y=!1;function o(){if(!y){y=!0;const r=new Uint8Array(2);r[0]=1,r[1]=2;const a=new Uint16Array(r.buffer);w=a[0]===(2<<8)+1}return w}}).call(this,Q("IGO8"),Q("B0ME"))},MRIS:function(dt,_e,Q){"use strict";var he=Q("T/Jt"),be=Q.n(he),ve=he.createContext(!1);_e.a=ve},N0LK:function(dt,_e,Q){"use strict";Q.d(_e,"C",function(){return he}),Q.d(_e,"v",function(){return ve}),Q.d(_e,"s",function(){return Ee}),Q.d(_e,"t",function(){return ue}),Q.d(_e,"U",function(){return $}),Q.d(_e,"J",function(){return O}),Q.d(_e,"O",function(){return H}),Q.d(_e,"p",function(){return e}),Q.d(_e,"T",function(){return M}),Q.d(_e,"q",function(){return D}),Q.d(_e,"N",function(){return N}),Q.d(_e,"M",function(){return c}),Q.d(_e,"Q",function(){return l}),Q.d(_e,"u",function(){return s}),Q.d(_e,"x",function(){return h}),Q.d(_e,"I",function(){return x}),Q.d(_e,"f",function(){return E}),Q.d(_e,"h",function(){return v}),Q.d(_e,"g",function(){return d}),Q.d(_e,"i",function(){return m}),Q.d(_e,"G",function(){return g}),Q.d(_e,"H",function(){return S}),Q.d(_e,"r",function(){return A}),Q.d(_e,"R",function(){return u}),Q.d(_e,"d",function(){return R}),Q.d(_e,"e",function(){return i}),Q.d(_e,"E",function(){return T}),Q.d(_e,"F",function(){return w}),Q.d(_e,"j",function(){return y}),Q.d(_e,"z",function(){return o}),Q.d(_e,"K",function(){return a}),Q.d(_e,"L",function(){return n}),Q.d(_e,"m",function(){return p}),Q.d(_e,"k",function(){return f}),Q.d(_e,"A",function(){return P}),Q.d(_e,"a",function(){return W}),Q.d(_e,"n",function(){return V}),Q.d(_e,"l",function(){return J}),Q.d(_e,"D",function(){return ne}),Q.d(_e,"B",function(){return ce}),Q.d(_e,"b",function(){return ie}),Q.d(_e,"S",function(){return xe}),Q.d(_e,"o",function(){return ge}),Q.d(_e,"P",function(){return de}),Q.d(_e,"w",function(){return Fe}),Q.d(_e,"c",function(){return Qe}),Q.d(_e,"y",function(){return Ue});function he(X){return!X||typeof X!="string"?!0:X.trim().length===0}const be=/{(\d+)}/g;function ve(X,...re){return re.length===0?X:X.replace(be,function(te,ae){const ye=parseInt(ae,10);return isNaN(ye)||ye<0||ye>=re.length?te:re[ye]})}function Ee(X){return X.replace(/[<>&]/g,function(re){switch(re){case"<":return"<";case">":return">";case"&":return"&";default:return re}})}function ue(X){return X.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function $(X,re=" "){const te=O(X,re);return H(te,re)}function O(X,re){if(!X||!re)return X;const te=re.length;if(te===0||X.length===0)return X;let ae=0;for(;X.indexOf(re,ae)===ae;)ae=ae+te;return X.substring(ae)}function H(X,re){if(!X||!re)return X;const te=re.length,ae=X.length;if(te===0||ae===0)return X;let ye=ae,Le=-1;for(;!(Le=X.lastIndexOf(re,ye-1),Le===-1||Le+te!==ye);){if(Le===0)return"";ye=Le}return X.substring(0,ye)}function e(X){return X.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function M(X){return X.replace(/\*/g,"")}function D(X,re,te={}){if(!X)throw new Error("Cannot create regex from empty string");re||(X=ue(X)),te.wholeWord&&(/\B/.test(X.charAt(0))||(X="\\b"+X),/\B/.test(X.charAt(X.length-1))||(X=X+"\\b"));let ae="";return te.global&&(ae+="g"),te.matchCase||(ae+="i"),te.multiline&&(ae+="m"),te.unicode&&(ae+="u"),new RegExp(X,ae)}function N(X){if(X.source==="^"||X.source==="^$"||X.source==="$"||X.source==="^\\s*$")return!1;const re=X.exec("");return!!(re&&X.lastIndex===0)}function c(X){return(X.global?"g":"")+(X.ignoreCase?"i":"")+(X.multiline?"m":"")+(X.unicode?"u":"")}function l(X){return X.split(/\r\n|\r|\n/)}function s(X){for(let re=0,te=X.length;re<te;re++){const ae=X.charCodeAt(re);if(ae!==32&&ae!==9)return re}return-1}function h(X,re=0,te=X.length){for(let ae=re;ae<te;ae++){const ye=X.charCodeAt(ae);if(ye!==32&&ye!==9)return X.substring(re,ae)}return X.substring(re,te)}function x(X,re=X.length-1){for(let te=re;te>=0;te--){const ae=X.charCodeAt(te);if(ae!==32&&ae!==9)return te}return-1}function E(X,re){return X<re?-1:X>re?1:0}function v(X,re,te=0,ae=X.length,ye=0,Le=re.length){for(;te<ae&&ye<Le;te++,ye++){let Je=X.charCodeAt(te),qe=re.charCodeAt(ye);if(Je<qe)return-1;if(Je>qe)return 1}const Pe=ae-te,ke=Le-ye;return Pe<ke?-1:Pe>ke?1:0}function d(X,re){return m(X,re,0,X.length,0,re.length)}function m(X,re,te=0,ae=X.length,ye=0,Le=re.length){for(;te<ae&&ye<Le;te++,ye++){let Je=X.charCodeAt(te),qe=re.charCodeAt(ye);if(Je===qe)continue;if(Je>=128||qe>=128)return v(X.toLowerCase(),re.toLowerCase(),te,ae,ye,Le);g(Je)&&(Je-=32),g(qe)&&(qe-=32);const it=Je-qe;if(it===0)continue;return it}const Pe=ae-te,ke=Le-ye;return Pe<ke?-1:Pe>ke?1:0}function g(X){return X>=97&&X<=122}function S(X){return X>=65&&X<=90}function A(X,re){return X.length===re.length&&m(X,re)===0}function u(X,re){const te=re.length;return re.length>X.length?!1:m(X,re,0,te)===0}function R(X,re){let te,ae=Math.min(X.length,re.length);for(te=0;te<ae;te++)if(X.charCodeAt(te)!==re.charCodeAt(te))return te;return ae}function i(X,re){let te,ae=Math.min(X.length,re.length);const ye=X.length-1,Le=re.length-1;for(te=0;te<ae;te++)if(X.charCodeAt(ye-te)!==re.charCodeAt(Le-te))return te;return ae}function T(X){return 55296<=X&&X<=56319}function w(X){return 56320<=X&&X<=57343}function y(X,re){return(X-55296<<10)+(re-56320)+65536}function o(X,re,te){const ae=X.charCodeAt(te);if(T(ae)&&te+1<re){const ye=X.charCodeAt(te+1);if(w(ye))return y(ae,ye)}return ae}function r(X,re){const te=X.charCodeAt(re-1);if(w(te)&&re>1){const ae=X.charCodeAt(re-2);if(T(ae))return y(ae,te)}return te}function a(X,re){const te=Ve.getInstance(),ae=re,ye=X.length,Le=o(X,ye,re);re+=Le>=65536?2:1;let Pe=te.getGraphemeBreakType(Le);for(;re<ye;){const ke=o(X,ye,re),Je=te.getGraphemeBreakType(ke);if(Qe(Pe,Je))break;re+=ke>=65536?2:1,Pe=Je}return re-ae}function n(X,re){const te=Ve.getInstance(),ae=re,ye=r(X,re);re-=ye>=65536?2:1;let Le=te.getGraphemeBreakType(ye);for(;re>0;){const Pe=r(X,re),ke=te.getGraphemeBreakType(Pe);if(Qe(ke,Le))break;re-=Pe>=65536?2:1,Le=ke}return ae-re}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(X){return t.test(X)}const _=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function f(X){return _.test(X)}const F=/^[\t\n\r\x20-\x7E]*$/;function P(X){return F.test(X)}const W=/[\u2028\u2029]/;function V(X){return W.test(X)}function J(X){for(let re=0,te=X.length;re<te;re++)if(ne(X.charCodeAt(re)))return!0;return!1}function ne(X){return X=+X,X>=11904&&X<=55215||X>=63744&&X<=64255||X>=65281&&X<=65374}function ce(X){return X>=127462&&X<=127487||X===8986||X===8987||X===9200||X===9203||X>=9728&&X<=10175||X===11088||X===11093||X>=127744&&X<=128591||X>=128640&&X<=128764||X>=128992&&X<=129003||X>=129280&&X<=129535||X>=129648&&X<=129750}const ie=String.fromCharCode(65279);function xe(X){return!!(X&&X.length>0&&X.charCodeAt(0)===65279)}function ge(X,re=!1){return X?(re&&(X=X.replace(/\\./g,"")),X.toLowerCase()!==X):!1}function de(X){const re=90-65+1;return X=X%(2*re),X<re?String.fromCharCode(97+X):String.fromCharCode(65+X-re)}function Fe(X){const re=Ve.getInstance();return re.getGraphemeBreakType(X)}function Qe(X,re){return X===0?re!==5&&re!==7:X===2&&re===3?!1:X===4||X===2||X===3||(re===4||re===2||re===3)?!0:X===8&&(re===8||re===9||re===11||re===12)||((X===11||X===9)&&(re===9||re===10)||((X===12||X===10)&&re===10||(re===5||re===13||(re===7||(X===1||X===13&&re===14)))))?!1:!(X===6&&re===6)}class Ve{constructor(){this._data=Ne()}static getInstance(){return Ve._INSTANCE||(Ve._INSTANCE=new Ve),Ve._INSTANCE}getGraphemeBreakType(X){if(X<32)return X===10?3:X===13?2:4;if(X<127)return 0;const re=this._data,te=re.length/3;let ae=1;for(;ae<=te;)if(X<re[3*ae])ae=2*ae;else if(X>re[3*ae+1])ae=2*ae+1;else return re[3*ae+2];return 0}}Ve._INSTANCE=null;function Ne(){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 Ue(X,re){if(X===0)return 0;const te=q(X,re);if(te!==void 0)return te;const ae=r(re,X);return X-=k(ae),X}function q(X,re){let te=r(re,X);for(X-=k(te);z(te)||te===65039||te===8419;){if(X===0)return;te=r(re,X),X-=k(te)}if(!ce(te))return;if(X>=0){const ae=r(re,X);ae===8205&&(X-=k(ae))}return X}function k(X){return X>=65536?2:1}function z(X){return 127995<=X&&X<=127999}},O48t:function(dt,_e,Q){"use strict";(function(he){/*!
|
|
* The buffer module from node.js, for the browser.
|
|
*
|
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
* @license MIT
|
|
*/var be=Q("Ov46"),ve=Q("ttT4"),Ee=Q("0nBa");_e.Buffer=H,_e.SlowBuffer=E,_e.INSPECT_MAX_BYTES=50,H.TYPED_ARRAY_SUPPORT=he.TYPED_ARRAY_SUPPORT!==void 0?he.TYPED_ARRAY_SUPPORT:ue(),_e.kMaxLength=$();function ue(){try{var q=new Uint8Array(1);return q.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},q.foo()===42&&typeof q.subarray=="function"&&q.subarray(1,1).byteLength===0}catch(k){return!1}}function $(){return H.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function O(q,k){if($()<k)throw new RangeError("Invalid typed array length");return H.TYPED_ARRAY_SUPPORT?(q=new Uint8Array(k),q.__proto__=H.prototype):(q===null&&(q=new H(k)),q.length=k),q}function H(q,k,z){if(!H.TYPED_ARRAY_SUPPORT&&!(this instanceof H))return new H(q,k,z);if(typeof q=="number"){if(typeof k=="string")throw new Error("If encoding is specified then the first argument must be a string");return N(this,q)}return e(this,q,k,z)}H.poolSize=8192,H._augment=function(q){return q.__proto__=H.prototype,q};function e(q,k,z,X){if(typeof k=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&k instanceof ArrayBuffer?s(q,k,z,X):typeof k=="string"?c(q,k,z):h(q,k)}H.from=function(q,k,z){return e(null,q,k,z)},H.TYPED_ARRAY_SUPPORT&&(H.prototype.__proto__=Uint8Array.prototype,H.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&H[Symbol.species]===H&&Object.defineProperty(H,Symbol.species,{value:null,configurable:!0}));function M(q){if(typeof q!="number")throw new TypeError('"size" argument must be a number');if(q<0)throw new RangeError('"size" argument must not be negative')}function D(q,k,z,X){return M(k),k<=0?O(q,k):z!==void 0?typeof X=="string"?O(q,k).fill(z,X):O(q,k).fill(z):O(q,k)}H.alloc=function(q,k,z){return D(null,q,k,z)};function N(q,k){if(M(k),q=O(q,k<0?0:x(k)|0),!H.TYPED_ARRAY_SUPPORT)for(var z=0;z<k;++z)q[z]=0;return q}H.allocUnsafe=function(q){return N(null,q)},H.allocUnsafeSlow=function(q){return N(null,q)};function c(q,k,z){if((typeof z!="string"||z==="")&&(z="utf8"),!H.isEncoding(z))throw new TypeError('"encoding" must be a valid string encoding');var X=v(k,z)|0;q=O(q,X);var re=q.write(k,z);return re!==X&&(q=q.slice(0,re)),q}function l(q,k){var z=k.length<0?0:x(k.length)|0;q=O(q,z);for(var X=0;X<z;X+=1)q[X]=k[X]&255;return q}function s(q,k,z,X){if(k.byteLength,z<0||k.byteLength<z)throw new RangeError("'offset' is out of bounds");if(k.byteLength<z+(X||0))throw new RangeError("'length' is out of bounds");return z===void 0&&X===void 0?k=new Uint8Array(k):X===void 0?k=new Uint8Array(k,z):k=new Uint8Array(k,z,X),H.TYPED_ARRAY_SUPPORT?(q=k,q.__proto__=H.prototype):q=l(q,k),q}function h(q,k){if(H.isBuffer(k)){var z=x(k.length)|0;return q=O(q,z),q.length===0||k.copy(q,0,0,z),q}if(k){if(typeof ArrayBuffer!="undefined"&&k.buffer instanceof ArrayBuffer||"length"in k)return typeof k.length!="number"||Ue(k.length)?O(q,0):l(q,k);if(k.type==="Buffer"&&Ee(k.data))return l(q,k.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function x(q){if(q>=$())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+$().toString(16)+" bytes");return q|0}function E(q){return+q!=q&&(q=0),H.alloc(+q)}H.isBuffer=function(k){return!!(k!=null&&k._isBuffer)},H.compare=function(k,z){if(!H.isBuffer(k)||!H.isBuffer(z))throw new TypeError("Arguments must be Buffers");if(k===z)return 0;for(var X=k.length,re=z.length,te=0,ae=Math.min(X,re);te<ae;++te)if(k[te]!==z[te]){X=k[te],re=z[te];break}return X<re?-1:re<X?1:0},H.isEncoding=function(k){switch(String(k).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}},H.concat=function(k,z){if(!Ee(k))throw new TypeError('"list" argument must be an Array of Buffers');if(k.length===0)return H.alloc(0);var X;if(z===void 0)for(z=0,X=0;X<k.length;++X)z+=k[X].length;var re=H.allocUnsafe(z),te=0;for(X=0;X<k.length;++X){var ae=k[X];if(!H.isBuffer(ae))throw new TypeError('"list" argument must be an Array of Buffers');ae.copy(re,te),te+=ae.length}return re};function v(q,k){if(H.isBuffer(q))return q.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(q)||q instanceof ArrayBuffer))return q.byteLength;typeof q!="string"&&(q=""+q);var z=q.length;if(z===0)return 0;for(var X=!1;;)switch(k){case"ascii":case"latin1":case"binary":return z;case"utf8":case"utf-8":case void 0:return de(q).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z*2;case"hex":return z>>>1;case"base64":return Ve(q).length;default:if(X)return de(q).length;k=(""+k).toLowerCase(),X=!0}}H.byteLength=v;function d(q,k,z){var X=!1;if((k===void 0||k<0)&&(k=0),k>this.length)return"";if((z===void 0||z>this.length)&&(z=this.length),z<=0)return"";if(z>>>=0,k>>>=0,z<=k)return"";for(q||(q="utf8");;)switch(q){case"hex":return p(this,k,z);case"utf8":case"utf-8":return o(this,k,z);case"ascii":return n(this,k,z);case"latin1":case"binary":return t(this,k,z);case"base64":return y(this,k,z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,k,z);default:if(X)throw new TypeError("Unknown encoding: "+q);q=(q+"").toLowerCase(),X=!0}}H.prototype._isBuffer=!0;function m(q,k,z){var X=q[k];q[k]=q[z],q[z]=X}H.prototype.swap16=function(){var k=this.length;if(k%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var z=0;z<k;z+=2)m(this,z,z+1);return this},H.prototype.swap32=function(){var k=this.length;if(k%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var z=0;z<k;z+=4)m(this,z,z+3),m(this,z+1,z+2);return this},H.prototype.swap64=function(){var k=this.length;if(k%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var z=0;z<k;z+=8)m(this,z,z+7),m(this,z+1,z+6),m(this,z+2,z+5),m(this,z+3,z+4);return this},H.prototype.toString=function(){var k=this.length|0;return k===0?"":arguments.length===0?o(this,0,k):d.apply(this,arguments)},H.prototype.equals=function(k){if(!H.isBuffer(k))throw new TypeError("Argument must be a Buffer");return this===k?!0:H.compare(this,k)===0},H.prototype.inspect=function(){var k="",z=_e.INSPECT_MAX_BYTES;return this.length>0&&(k=this.toString("hex",0,z).match(/.{2}/g).join(" "),this.length>z&&(k+=" ... ")),"<Buffer "+k+">"},H.prototype.compare=function(k,z,X,re,te){if(!H.isBuffer(k))throw new TypeError("Argument must be a Buffer");if(z===void 0&&(z=0),X===void 0&&(X=k?k.length:0),re===void 0&&(re=0),te===void 0&&(te=this.length),z<0||X>k.length||re<0||te>this.length)throw new RangeError("out of range index");if(re>=te&&z>=X)return 0;if(re>=te)return-1;if(z>=X)return 1;if(z>>>=0,X>>>=0,re>>>=0,te>>>=0,this===k)return 0;for(var ae=te-re,ye=X-z,Le=Math.min(ae,ye),Pe=this.slice(re,te),ke=k.slice(z,X),Je=0;Je<Le;++Je)if(Pe[Je]!==ke[Je]){ae=Pe[Je],ye=ke[Je];break}return ae<ye?-1:ye<ae?1:0};function g(q,k,z,X,re){if(q.length===0)return-1;if(typeof z=="string"?(X=z,z=0):z>2147483647?z=2147483647:z<-2147483648&&(z=-2147483648),z=+z,isNaN(z)&&(z=re?0:q.length-1),z<0&&(z=q.length+z),z>=q.length){if(re)return-1;z=q.length-1}else if(z<0)if(re)z=0;else return-1;if(typeof k=="string"&&(k=H.from(k,X)),H.isBuffer(k))return k.length===0?-1:S(q,k,z,X,re);if(typeof k=="number")return k=k&255,H.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?re?Uint8Array.prototype.indexOf.call(q,k,z):Uint8Array.prototype.lastIndexOf.call(q,k,z):S(q,[k],z,X,re);throw new TypeError("val must be string, number or Buffer")}function S(q,k,z,X,re){var te=1,ae=q.length,ye=k.length;if(X!==void 0&&(X=String(X).toLowerCase(),X==="ucs2"||X==="ucs-2"||X==="utf16le"||X==="utf-16le")){if(q.length<2||k.length<2)return-1;te=2,ae/=2,ye/=2,z/=2}function Le(it,rt){return te===1?it[rt]:it.readUInt16BE(rt*te)}var Pe;if(re){var ke=-1;for(Pe=z;Pe<ae;Pe++)if(Le(q,Pe)===Le(k,ke===-1?0:Pe-ke)){if(ke===-1&&(ke=Pe),Pe-ke+1===ye)return ke*te}else ke!==-1&&(Pe-=Pe-ke),ke=-1}else for(z+ye>ae&&(z=ae-ye),Pe=z;Pe>=0;Pe--){for(var Je=!0,qe=0;qe<ye;qe++)if(Le(q,Pe+qe)!==Le(k,qe)){Je=!1;break}if(Je)return Pe}return-1}H.prototype.includes=function(k,z,X){return this.indexOf(k,z,X)!==-1},H.prototype.indexOf=function(k,z,X){return g(this,k,z,X,!0)},H.prototype.lastIndexOf=function(k,z,X){return g(this,k,z,X,!1)};function A(q,k,z,X){z=Number(z)||0;var re=q.length-z;X?(X=Number(X),X>re&&(X=re)):X=re;var te=k.length;if(te%2!==0)throw new TypeError("Invalid hex string");X>te/2&&(X=te/2);for(var ae=0;ae<X;++ae){var ye=parseInt(k.substr(ae*2,2),16);if(isNaN(ye))return ae;q[z+ae]=ye}return ae}function u(q,k,z,X){return Ne(de(k,q.length-z),q,z,X)}function R(q,k,z,X){return Ne(Fe(k),q,z,X)}function i(q,k,z,X){return R(q,k,z,X)}function T(q,k,z,X){return Ne(Ve(k),q,z,X)}function w(q,k,z,X){return Ne(Qe(k,q.length-z),q,z,X)}H.prototype.write=function(k,z,X,re){if(z===void 0)re="utf8",X=this.length,z=0;else if(X===void 0&&typeof z=="string")re=z,X=this.length,z=0;else if(isFinite(z))z=z|0,isFinite(X)?(X=X|0,re===void 0&&(re="utf8")):(re=X,X=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var te=this.length-z;if((X===void 0||X>te)&&(X=te),k.length>0&&(X<0||z<0)||z>this.length)throw new RangeError("Attempt to write outside buffer bounds");re||(re="utf8");for(var ae=!1;;)switch(re){case"hex":return A(this,k,z,X);case"utf8":case"utf-8":return u(this,k,z,X);case"ascii":return R(this,k,z,X);case"latin1":case"binary":return i(this,k,z,X);case"base64":return T(this,k,z,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,k,z,X);default:if(ae)throw new TypeError("Unknown encoding: "+re);re=(""+re).toLowerCase(),ae=!0}},H.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function y(q,k,z){return k===0&&z===q.length?be.fromByteArray(q):be.fromByteArray(q.slice(k,z))}function o(q,k,z){z=Math.min(q.length,z);for(var X=[],re=k;re<z;){var te=q[re],ae=null,ye=te>239?4:te>223?3:te>191?2:1;if(re+ye<=z){var Le,Pe,ke,Je;switch(ye){case 1:te<128&&(ae=te);break;case 2:Le=q[re+1],(Le&192)===128&&(Je=(te&31)<<6|Le&63,Je>127&&(ae=Je));break;case 3:Le=q[re+1],Pe=q[re+2],(Le&192)===128&&(Pe&192)===128&&(Je=(te&15)<<12|(Le&63)<<6|Pe&63,Je>2047&&(Je<55296||Je>57343)&&(ae=Je));break;case 4:Le=q[re+1],Pe=q[re+2],ke=q[re+3],(Le&192)===128&&(Pe&192)===128&&(ke&192)===128&&(Je=(te&15)<<18|(Le&63)<<12|(Pe&63)<<6|ke&63,Je>65535&&Je<1114112&&(ae=Je))}}ae===null?(ae=65533,ye=1):ae>65535&&(ae-=65536,X.push(ae>>>10&1023|55296),ae=56320|ae&1023),X.push(ae),re+=ye}return a(X)}var r=4096;function a(q){var k=q.length;if(k<=r)return String.fromCharCode.apply(String,q);for(var z="",X=0;X<k;)z+=String.fromCharCode.apply(String,q.slice(X,X+=r));return z}function n(q,k,z){var X="";z=Math.min(q.length,z);for(var re=k;re<z;++re)X+=String.fromCharCode(q[re]&127);return X}function t(q,k,z){var X="";z=Math.min(q.length,z);for(var re=k;re<z;++re)X+=String.fromCharCode(q[re]);return X}function p(q,k,z){var X=q.length;(!k||k<0)&&(k=0),(!z||z<0||z>X)&&(z=X);for(var re="",te=k;te<z;++te)re+=ge(q[te]);return re}function _(q,k,z){for(var X=q.slice(k,z),re="",te=0;te<X.length;te+=2)re+=String.fromCharCode(X[te]+X[te+1]*256);return re}H.prototype.slice=function(k,z){var X=this.length;k=~~k,z=z===void 0?X:~~z,k<0?(k+=X,k<0&&(k=0)):k>X&&(k=X),z<0?(z+=X,z<0&&(z=0)):z>X&&(z=X),z<k&&(z=k);var re;if(H.TYPED_ARRAY_SUPPORT)re=this.subarray(k,z),re.__proto__=H.prototype;else{var te=z-k;re=new H(te,void 0);for(var ae=0;ae<te;++ae)re[ae]=this[ae+k]}return re};function f(q,k,z){if(q%1!==0||q<0)throw new RangeError("offset is not uint");if(q+k>z)throw new RangeError("Trying to access beyond buffer length")}H.prototype.readUIntLE=function(k,z,X){k=k|0,z=z|0,X||f(k,z,this.length);for(var re=this[k],te=1,ae=0;++ae<z&&(te*=256);)re+=this[k+ae]*te;return re},H.prototype.readUIntBE=function(k,z,X){k=k|0,z=z|0,X||f(k,z,this.length);for(var re=this[k+--z],te=1;z>0&&(te*=256);)re+=this[k+--z]*te;return re},H.prototype.readUInt8=function(k,z){return z||f(k,1,this.length),this[k]},H.prototype.readUInt16LE=function(k,z){return z||f(k,2,this.length),this[k]|this[k+1]<<8},H.prototype.readUInt16BE=function(k,z){return z||f(k,2,this.length),this[k]<<8|this[k+1]},H.prototype.readUInt32LE=function(k,z){return z||f(k,4,this.length),(this[k]|this[k+1]<<8|this[k+2]<<16)+this[k+3]*16777216},H.prototype.readUInt32BE=function(k,z){return z||f(k,4,this.length),this[k]*16777216+(this[k+1]<<16|this[k+2]<<8|this[k+3])},H.prototype.readIntLE=function(k,z,X){k=k|0,z=z|0,X||f(k,z,this.length);for(var re=this[k],te=1,ae=0;++ae<z&&(te*=256);)re+=this[k+ae]*te;return te*=128,re>=te&&(re-=Math.pow(2,8*z)),re},H.prototype.readIntBE=function(k,z,X){k=k|0,z=z|0,X||f(k,z,this.length);for(var re=z,te=1,ae=this[k+--re];re>0&&(te*=256);)ae+=this[k+--re]*te;return te*=128,ae>=te&&(ae-=Math.pow(2,8*z)),ae},H.prototype.readInt8=function(k,z){return z||f(k,1,this.length),this[k]&128?(255-this[k]+1)*-1:this[k]},H.prototype.readInt16LE=function(k,z){z||f(k,2,this.length);var X=this[k]|this[k+1]<<8;return X&32768?X|4294901760:X},H.prototype.readInt16BE=function(k,z){z||f(k,2,this.length);var X=this[k+1]|this[k]<<8;return X&32768?X|4294901760:X},H.prototype.readInt32LE=function(k,z){return z||f(k,4,this.length),this[k]|this[k+1]<<8|this[k+2]<<16|this[k+3]<<24},H.prototype.readInt32BE=function(k,z){return z||f(k,4,this.length),this[k]<<24|this[k+1]<<16|this[k+2]<<8|this[k+3]},H.prototype.readFloatLE=function(k,z){return z||f(k,4,this.length),ve.read(this,k,!0,23,4)},H.prototype.readFloatBE=function(k,z){return z||f(k,4,this.length),ve.read(this,k,!1,23,4)},H.prototype.readDoubleLE=function(k,z){return z||f(k,8,this.length),ve.read(this,k,!0,52,8)},H.prototype.readDoubleBE=function(k,z){return z||f(k,8,this.length),ve.read(this,k,!1,52,8)};function F(q,k,z,X,re,te){if(!H.isBuffer(q))throw new TypeError('"buffer" argument must be a Buffer instance');if(k>re||k<te)throw new RangeError('"value" argument is out of bounds');if(z+X>q.length)throw new RangeError("Index out of range")}H.prototype.writeUIntLE=function(k,z,X,re){if(k=+k,z=z|0,X=X|0,!re){var te=Math.pow(2,8*X)-1;F(this,k,z,X,te,0)}var ae=1,ye=0;for(this[z]=k&255;++ye<X&&(ae*=256);)this[z+ye]=k/ae&255;return z+X},H.prototype.writeUIntBE=function(k,z,X,re){if(k=+k,z=z|0,X=X|0,!re){var te=Math.pow(2,8*X)-1;F(this,k,z,X,te,0)}var ae=X-1,ye=1;for(this[z+ae]=k&255;--ae>=0&&(ye*=256);)this[z+ae]=k/ye&255;return z+X},H.prototype.writeUInt8=function(k,z,X){return k=+k,z=z|0,X||F(this,k,z,1,255,0),H.TYPED_ARRAY_SUPPORT||(k=Math.floor(k)),this[z]=k&255,z+1};function P(q,k,z,X){k<0&&(k=65535+k+1);for(var re=0,te=Math.min(q.length-z,2);re<te;++re)q[z+re]=(k&255<<8*(X?re:1-re))>>>(X?re:1-re)*8}H.prototype.writeUInt16LE=function(k,z,X){return k=+k,z=z|0,X||F(this,k,z,2,65535,0),H.TYPED_ARRAY_SUPPORT?(this[z]=k&255,this[z+1]=k>>>8):P(this,k,z,!0),z+2},H.prototype.writeUInt16BE=function(k,z,X){return k=+k,z=z|0,X||F(this,k,z,2,65535,0),H.TYPED_ARRAY_SUPPORT?(this[z]=k>>>8,this[z+1]=k&255):P(this,k,z,!1),z+2};function W(q,k,z,X){k<0&&(k=4294967295+k+1);for(var re=0,te=Math.min(q.length-z,4);re<te;++re)q[z+re]=k>>>(X?re:3-re)*8&255}H.prototype.writeUInt32LE=function(k,z,X){return k=+k,z=z|0,X||F(this,k,z,4,4294967295,0),H.TYPED_ARRAY_SUPPORT?(this[z+3]=k>>>24,this[z+2]=k>>>16,this[z+1]=k>>>8,this[z]=k&255):W(this,k,z,!0),z+4},H.prototype.writeUInt32BE=function(k,z,X){return k=+k,z=z|0,X||F(this,k,z,4,4294967295,0),H.TYPED_ARRAY_SUPPORT?(this[z]=k>>>24,this[z+1]=k>>>16,this[z+2]=k>>>8,this[z+3]=k&255):W(this,k,z,!1),z+4},H.prototype.writeIntLE=function(k,z,X,re){if(k=+k,z=z|0,!re){var te=Math.pow(2,8*X-1);F(this,k,z,X,te-1,-te)}var ae=0,ye=1,Le=0;for(this[z]=k&255;++ae<X&&(ye*=256);)k<0&&Le===0&&this[z+ae-1]!==0&&(Le=1),this[z+ae]=(k/ye>>0)-Le&255;return z+X},H.prototype.writeIntBE=function(k,z,X,re){if(k=+k,z=z|0,!re){var te=Math.pow(2,8*X-1);F(this,k,z,X,te-1,-te)}var ae=X-1,ye=1,Le=0;for(this[z+ae]=k&255;--ae>=0&&(ye*=256);)k<0&&Le===0&&this[z+ae+1]!==0&&(Le=1),this[z+ae]=(k/ye>>0)-Le&255;return z+X},H.prototype.writeInt8=function(k,z,X){return k=+k,z=z|0,X||F(this,k,z,1,127,-128),H.TYPED_ARRAY_SUPPORT||(k=Math.floor(k)),k<0&&(k=255+k+1),this[z]=k&255,z+1},H.prototype.writeInt16LE=function(k,z,X){return k=+k,z=z|0,X||F(this,k,z,2,32767,-32768),H.TYPED_ARRAY_SUPPORT?(this[z]=k&255,this[z+1]=k>>>8):P(this,k,z,!0),z+2},H.prototype.writeInt16BE=function(k,z,X){return k=+k,z=z|0,X||F(this,k,z,2,32767,-32768),H.TYPED_ARRAY_SUPPORT?(this[z]=k>>>8,this[z+1]=k&255):P(this,k,z,!1),z+2},H.prototype.writeInt32LE=function(k,z,X){return k=+k,z=z|0,X||F(this,k,z,4,2147483647,-2147483648),H.TYPED_ARRAY_SUPPORT?(this[z]=k&255,this[z+1]=k>>>8,this[z+2]=k>>>16,this[z+3]=k>>>24):W(this,k,z,!0),z+4},H.prototype.writeInt32BE=function(k,z,X){return k=+k,z=z|0,X||F(this,k,z,4,2147483647,-2147483648),k<0&&(k=4294967295+k+1),H.TYPED_ARRAY_SUPPORT?(this[z]=k>>>24,this[z+1]=k>>>16,this[z+2]=k>>>8,this[z+3]=k&255):W(this,k,z,!1),z+4};function V(q,k,z,X,re,te){if(z+X>q.length)throw new RangeError("Index out of range");if(z<0)throw new RangeError("Index out of range")}function J(q,k,z,X,re){return re||V(q,k,z,4,34028234663852886e22,-34028234663852886e22),ve.write(q,k,z,X,23,4),z+4}H.prototype.writeFloatLE=function(k,z,X){return J(this,k,z,!0,X)},H.prototype.writeFloatBE=function(k,z,X){return J(this,k,z,!1,X)};function ne(q,k,z,X,re){return re||V(q,k,z,8,17976931348623157e292,-17976931348623157e292),ve.write(q,k,z,X,52,8),z+8}H.prototype.writeDoubleLE=function(k,z,X){return ne(this,k,z,!0,X)},H.prototype.writeDoubleBE=function(k,z,X){return ne(this,k,z,!1,X)},H.prototype.copy=function(k,z,X,re){if(X||(X=0),!re&&re!==0&&(re=this.length),z>=k.length&&(z=k.length),z||(z=0),re>0&&re<X&&(re=X),re===X)return 0;if(k.length===0||this.length===0)return 0;if(z<0)throw new RangeError("targetStart out of bounds");if(X<0||X>=this.length)throw new RangeError("sourceStart out of bounds");if(re<0)throw new RangeError("sourceEnd out of bounds");re>this.length&&(re=this.length),k.length-z<re-X&&(re=k.length-z+X);var te=re-X,ae;if(this===k&&X<z&&z<re)for(ae=te-1;ae>=0;--ae)k[ae+z]=this[ae+X];else if(te<1e3||!H.TYPED_ARRAY_SUPPORT)for(ae=0;ae<te;++ae)k[ae+z]=this[ae+X];else Uint8Array.prototype.set.call(k,this.subarray(X,X+te),z);return te},H.prototype.fill=function(k,z,X,re){if(typeof k=="string"){if(typeof z=="string"?(re=z,z=0,X=this.length):typeof X=="string"&&(re=X,X=this.length),k.length===1){var te=k.charCodeAt(0);te<256&&(k=te)}if(re!==void 0&&typeof re!="string")throw new TypeError("encoding must be a string");if(typeof re=="string"&&!H.isEncoding(re))throw new TypeError("Unknown encoding: "+re)}else typeof k=="number"&&(k=k&255);if(z<0||this.length<z||this.length<X)throw new RangeError("Out of range index");if(X<=z)return this;z=z>>>0,X=X===void 0?this.length:X>>>0,k||(k=0);var ae;if(typeof k=="number")for(ae=z;ae<X;++ae)this[ae]=k;else{var ye=H.isBuffer(k)?k:de(new H(k,re).toString()),Le=ye.length;for(ae=0;ae<X-z;++ae)this[ae+z]=ye[ae%Le]}return this};var ce=/[^+\/0-9A-Za-z-_]/g;function ie(q){if(q=xe(q).replace(ce,""),q.length<2)return"";for(;q.length%4!==0;)q=q+"=";return q}function xe(q){return q.trim?q.trim():q.replace(/^\s+|\s+$/g,"")}function ge(q){return q<16?"0"+q.toString(16):q.toString(16)}function de(q,k){k=k||Infinity;for(var z,X=q.length,re=null,te=[],ae=0;ae<X;++ae){if(z=q.charCodeAt(ae),z>55295&&z<57344){if(!re){if(z>56319){(k-=3)>-1&&te.push(239,191,189);continue}else if(ae+1===X){(k-=3)>-1&&te.push(239,191,189);continue}re=z;continue}if(z<56320){(k-=3)>-1&&te.push(239,191,189),re=z;continue}z=(re-55296<<10|z-56320)+65536}else re&&((k-=3)>-1&&te.push(239,191,189));if(re=null,z<128){if((k-=1)<0)break;te.push(z)}else if(z<2048){if((k-=2)<0)break;te.push(z>>6|192,z&63|128)}else if(z<65536){if((k-=3)<0)break;te.push(z>>12|224,z>>6&63|128,z&63|128)}else if(z<1114112){if((k-=4)<0)break;te.push(z>>18|240,z>>12&63|128,z>>6&63|128,z&63|128)}else throw new Error("Invalid code point")}return te}function Fe(q){for(var k=[],z=0;z<q.length;++z)k.push(q.charCodeAt(z)&255);return k}function Qe(q,k){for(var z,X,re,te=[],ae=0;ae<q.length&&!((k-=2)<0);++ae)z=q.charCodeAt(ae),X=z>>8,re=z%256,te.push(re),te.push(X);return te}function Ve(q){return be.toByteArray(ie(q))}function Ne(q,k,z,X){for(var re=0;re<X&&!(re+z>=k.length||re>=q.length);++re)k[re+z]=q[re];return re}function Ue(q){return q!==q}}).call(this,Q("IGO8"))},ODXe:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return ue});function he($){if(Array.isArray($))return $}function be($,O){var H=$==null?null:typeof Symbol!="undefined"&&$[Symbol.iterator]||$["@@iterator"];if(H!=null){var e,M,D,N,c=[],l=!0,s=!1;try{if(D=(H=H.call($)).next,O===0){if(Object(H)!==H)return;l=!1}else for(;!(l=(e=D.call(H)).done)&&(c.push(e.value),c.length!==O);l=!0);}catch(h){s=!0,M=h}finally{try{if(!l&&H.return!=null&&(N=H.return(),Object(N)!==N))return}finally{if(s)throw M}}return c}}var ve=Q("BsWD");function Ee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ue($,O){return he($)||be($,O)||Object(ve.a)($,O)||Ee()}},Ov46:function(dt,_e,Q){"use strict";_e.byteLength=H,_e.toByteArray=M,_e.fromByteArray=c;for(var he=[],be=[],ve=typeof Uint8Array!="undefined"?Uint8Array:Array,Ee="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ue=0,$=Ee.length;ue<$;++ue)he[ue]=Ee[ue],be[Ee.charCodeAt(ue)]=ue;be["-".charCodeAt(0)]=62,be["_".charCodeAt(0)]=63;function O(l){var s=l.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var h=l.indexOf("=");h===-1&&(h=s);var x=h===s?0:4-h%4;return[h,x]}function H(l){var s=O(l),h=s[0],x=s[1];return(h+x)*3/4-x}function e(l,s,h){return(s+h)*3/4-h}function M(l){var s,h=O(l),x=h[0],E=h[1],v=new ve(e(l,x,E)),d=0,m=E>0?x-4:x,g;for(g=0;g<m;g+=4)s=be[l.charCodeAt(g)]<<18|be[l.charCodeAt(g+1)]<<12|be[l.charCodeAt(g+2)]<<6|be[l.charCodeAt(g+3)],v[d++]=s>>16&255,v[d++]=s>>8&255,v[d++]=s&255;return E===2&&(s=be[l.charCodeAt(g)]<<2|be[l.charCodeAt(g+1)]>>4,v[d++]=s&255),E===1&&(s=be[l.charCodeAt(g)]<<10|be[l.charCodeAt(g+1)]<<4|be[l.charCodeAt(g+2)]>>2,v[d++]=s>>8&255,v[d++]=s&255),v}function D(l){return he[l>>18&63]+he[l>>12&63]+he[l>>6&63]+he[l&63]}function N(l,s,h){for(var x,E=[],v=s;v<h;v+=3)x=(l[v]<<16&16711680)+(l[v+1]<<8&65280)+(l[v+2]&255),E.push(D(x));return E.join("")}function c(l){for(var s,h=l.length,x=h%3,E=[],v=16383,d=0,m=h-x;d<m;d+=v)E.push(N(l,d,d+v>m?m:d+v));return x===1?(s=l[h-1],E.push(he[s>>2]+he[s<<4&63]+"==")):x===2&&(s=(l[h-2]<<8)+l[h-1],E.push(he[s>>10]+he[s>>4&63]+he[s<<2&63]+"=")),E.join("")}},QOAJ:function(dt,_e,Q){"use strict";var he=Q("U+Vu"),be=Object(he.a)();_e.a=be},SJMd:function(dt,_e){/**
|
|
* @license
|
|
* Copyright (C) 2006 Google Inc.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/var Q,he,be,ve=!1,Ee,ue;window.PR_SHOULD_USE_CONTINUATION=!0;var $,O;(function(){var H=window,e=["break,continue,do,else,for,if,return,while"],M=[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"],D=[M,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],N=[D,"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"],c=[D,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],l=[D,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],s="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",h=[D,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],x="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",E=[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"],v=[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"],d=[e,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],m=[N,l,c,h,x,E,v,d],g=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,S="str",A="kwd",u="com",R="typ",i="lit",T="pun",w="pln",y="tag",o="dec",r="src",a="atn",n="atv",t="nocode",p="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function _(q){for(var k=0,z=!1,X=!1,re=0,te=q.length;re<te;++re){var ae=q[re];if(ae.ignoreCase)X=!0;else if(/[a-z]/i.test(ae.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){z=!0,X=!1;break}}var ye={b:8,t:9,n:10,v:11,f:12,r:13};function Le(it){var rt=it.charCodeAt(0);if(rt!==92)return rt;var et=it.charAt(1);return rt=ye[et],rt||("0"<=et&&et<="7"?parseInt(it.substring(1),8):et==="u"||et==="x"?parseInt(it.substring(2),16):it.charCodeAt(1))}function Pe(it){if(it<32)return(it<16?"\\x0":"\\x")+it.toString(16);var rt=String.fromCharCode(it);return rt==="\\"||rt==="-"||rt==="]"||rt==="^"?"\\"+rt:rt}function ke(it){var rt=it.substring(1,it.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")),et=[],At=rt[0]==="^",We=["["];At&&We.push("^");for(var Ge=At?1:0,De=rt.length;Ge<De;++Ge){var Te=rt[Ge];if(/\\[bdsw]/i.test(Te))We.push(Te);else{var Oe=Le(Te),le;Ge+2<De&&rt[Ge+1]==="-"?(le=Le(rt[Ge+2]),Ge+=2):le=Oe,et.push([Oe,le]),le<65||Oe>122||(le<65||Oe>90||et.push([Math.max(65,Oe)|32,Math.min(le,90)|32]),le<97||Oe>122||et.push([Math.max(97,Oe)&~32,Math.min(le,122)&~32]))}}et.sort(function(Me,$e){return Me[0]-$e[0]||$e[1]-Me[1]});for(var fe=[],Ce=[],Ge=0;Ge<et.length;++Ge){var we=et[Ge];we[0]<=Ce[1]+1?Ce[1]=Math.max(Ce[1],we[1]):fe.push(Ce=we)}for(var Ge=0;Ge<fe.length;++Ge){var we=fe[Ge];We.push(Pe(we[0])),we[1]>we[0]&&(we[1]+1>we[0]&&We.push("-"),We.push(Pe(we[1])))}return We.push("]"),We.join("")}function Je(it){for(var rt=it.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")),et=rt.length,At=[],We=0,Ge=0;We<et;++We){var De=rt[We];if(De==="(")++Ge;else if(De.charAt(0)==="\\"){var Te=+De.substring(1);Te&&(Te<=Ge?At[Te]=-1:rt[We]=Pe(Te))}}for(var We=1;We<At.length;++We)At[We]===-1&&(At[We]=++k);for(var We=0,Ge=0;We<et;++We){var De=rt[We];if(De==="(")++Ge,At[Ge]||(rt[We]="(?:");else if(De.charAt(0)==="\\"){var Te=+De.substring(1);Te&&Te<=Ge&&(rt[We]="\\"+At[Te])}}for(var We=0;We<et;++We)rt[We]==="^"&&rt[We+1]!=="^"&&(rt[We]="");if(it.ignoreCase&&z)for(var We=0;We<et;++We){var De=rt[We],Oe=De.charAt(0);De.length>=2&&Oe==="["?rt[We]=ke(De):Oe!=="\\"&&(rt[We]=De.replace(/[a-zA-Z]/g,function(Ce){var we=Ce.charCodeAt(0);return"["+String.fromCharCode(we&~32,we|32)+"]"}))}return rt.join("")}for(var qe=[],re=0,te=q.length;re<te;++re){var ae=q[re];if(ae.global||ae.multiline)throw new Error(""+ae);qe.push("(?:"+Je(ae)+")")}return new RegExp(qe.join("|"),X?"gi":"g")}function f(q,k){var z=/(?:^|\s)nocode(?:\s|$)/,X=[],re=0,te=[],ae=0;function ye(Le){var Pe=Le.nodeType;if(Pe==1){if(z.test(Le.className))return;for(var ke=Le.firstChild;ke;ke=ke.nextSibling)ye(ke);var Je=Le.nodeName.toLowerCase();(Je==="br"||Je==="li")&&(X[ae]=`
|
|
`,te[ae<<1]=re++,te[ae++<<1|1]=Le)}else if(Pe==3||Pe==4){var qe=Le.nodeValue;qe.length&&(k?qe=qe.replace(/\r\n?/g,`
|
|
`):qe=qe.replace(/[ \t\r\n]+/g," "),X[ae]=qe,te[ae<<1]=re,re+=qe.length,te[ae++<<1|1]=Le)}}return ye(q),{sourceCode:X.join("").replace(/\n$/,""),spans:te}}function F(q,k,z,X,re){if(!z)return;var te={sourceNode:q,pre:1,langExtension:null,numberLines:null,sourceCode:z,spans:null,basePos:k,decorations:null};X(te),re.push.apply(re,te.decorations)}var P=/\S/;function W(q){for(var k=void 0,z=q.firstChild;z;z=z.nextSibling){var X=z.nodeType;k=X===1?k?q:z:X===3&&P.test(z.nodeValue)?q:k}return k===q?void 0:k}function V(q,k){var z={},X;(function(){for(var ae=q.concat(k),ye=[],Le={},Pe=0,ke=ae.length;Pe<ke;++Pe){var Je=ae[Pe],qe=Je[3];if(qe)for(var it=qe.length;--it>=0;)z[qe.charAt(it)]=Je;var rt=Je[1],et=""+rt;Le.hasOwnProperty(et)||(ye.push(rt),Le[et]=null)}ye.push(/[\0-\uffff]/),X=_(ye)})();var re=k.length,te=function(ae){for(var ye=ae.sourceCode,Le=ae.basePos,Pe=ae.sourceNode,ke=[Le,w],Je=0,qe=ye.match(X)||[],it={},rt=0,et=qe.length;rt<et;++rt){var At=qe[rt],We=it[At],Ge=void 0,De;if(typeof We=="string")De=!1;else{var Te=z[At.charAt(0)];if(Te)Ge=At.match(Te[1]),We=Te[0];else{for(var Oe=0;Oe<re;++Oe)if(Te=k[Oe],Ge=At.match(Te[1]),Ge){We=Te[0];break}Ge||(We=w)}De=We.length>=5&&We.substring(0,5)==="lang-",De&&!(Ge&&typeof Ge[1]=="string")&&(De=!1,We=r),De||(it[At]=We)}var le=Je;if(Je+=At.length,!De)ke.push(Le+le,We);else{var fe=Ge[1],Ce=At.indexOf(fe),we=Ce+fe.length;Ge[2]&&(we=At.length-Ge[2].length,Ce=we-fe.length);var Me=We.substring(5);F(Pe,Le+le,At.substring(0,Ce),te,ke),F(Pe,Le+le+Ce,fe,de(Me,fe),ke),F(Pe,Le+le+we,At.substring(we),te,ke)}}ae.decorations=ke};return te}function J(q){var k=[],z=[];q.tripleQuotedStrings?k.push([S,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):q.multiLineStrings?k.push([S,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):k.push([S,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),q.verbatimStrings&&z.push([S,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var X=q.hashComments;X&&(q.cStyleComments?(X>1?k.push([u,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):k.push([u,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),z.push([S,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):k.push([u,/^#[^\r\n]*/,null,"#"])),q.cStyleComments&&(z.push([u,/^\/\/[^\r\n]*/,null]),z.push([u,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var re=q.regexLiterals;if(re){var te=re>1?"":`
|
|
\r`,ae=te?".":"[\\S\\s]",ye="/(?=[^/*"+te+"])(?:[^/\\x5B\\x5C"+te+"]|\\x5C"+ae+"|\\x5B(?:[^\\x5C\\x5D"+te+"]|\\x5C"+ae+")*(?:\\x5D|$))+/";z.push(["lang-regex",RegExp("^"+p+"("+ye+")")])}var Le=q.types;Le&&z.push([R,Le]);var Pe=(""+q.keywords).replace(/^ | $/g,"");Pe.length&&z.push([A,new RegExp("^(?:"+Pe.replace(/[\s,]+/g,"|")+")\\b"),null]),k.push([w,/^\s+/,null,` \r
|
|
\xA0`]);var ke="^.[^\\s\\w.$@'\"`/\\\\]*";return q.regexLiterals&&(ke+="(?!s*/)"),z.push([i,/^@[a-z_$][a-z_$@0-9]*/i,null],[R,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[w,/^[a-z_$][a-z_$@0-9]*/i,null],[i,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[w,/^\\[\s\S]?/,null],[T,new RegExp(ke),null]),V(k,z)}var ne=J({keywords:m,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ce(q,k,z){for(var X=/(?:^|\s)nocode(?:\s|$)/,re=/\r\n?|\n/,te=q.ownerDocument,ae=te.createElement("li");q.firstChild;)ae.appendChild(q.firstChild);var ye=[ae];function Le(rt){var et=rt.nodeType;if(et==1&&!X.test(rt.className))if(rt.nodeName==="br")Pe(rt),rt.parentNode&&rt.parentNode.removeChild(rt);else for(var At=rt.firstChild;At;At=At.nextSibling)Le(At);else if((et==3||et==4)&&z){var We=rt.nodeValue,Ge=We.match(re);if(Ge){var De=We.substring(0,Ge.index);rt.nodeValue=De;var Te=We.substring(Ge.index+Ge[0].length);if(Te){var Oe=rt.parentNode;Oe.insertBefore(te.createTextNode(Te),rt.nextSibling)}Pe(rt),De||rt.parentNode.removeChild(rt)}}}function Pe(rt){for(;!rt.nextSibling;)if(rt=rt.parentNode,!rt)return;function et(Ge,De){var Te=De?Ge.cloneNode(!1):Ge,Oe=Ge.parentNode;if(Oe){var le=et(Oe,1),fe=Ge.nextSibling;le.appendChild(Te);for(var Ce=fe;Ce;Ce=fe)fe=Ce.nextSibling,le.appendChild(Ce)}return Te}for(var At=et(rt.nextSibling,0),We;(We=At.parentNode)&&We.nodeType===1;)At=We;ye.push(At)}for(var ke=0;ke<ye.length;++ke)Le(ye[ke]);k===(k|0)&&ye[0].setAttribute("value",k);var Je=te.createElement("ol");Je.className="linenums";for(var qe=Math.max(0,k-1|0)||0,ke=0,it=ye.length;ke<it;++ke)ae=ye[ke],ae.className="L"+(ke+qe)%10,ae.firstChild||ae.appendChild(te.createTextNode("\xA0")),Je.appendChild(ae);q.appendChild(Je)}function ie(q){var k=/\bMSIE\s(\d+)/.exec(navigator.userAgent);k=k&&+k[1]<=8;var z=/\n/g,X=q.sourceCode,re=X.length,te=0,ae=q.spans,ye=ae.length,Le=0,Pe=q.decorations,ke=Pe.length,Je=0;Pe[ke]=re;var qe,it;for(it=qe=0;it<ke;)Pe[it]!==Pe[it+2]?(Pe[qe++]=Pe[it++],Pe[qe++]=Pe[it++]):it+=2;for(ke=qe,it=qe=0;it<ke;){for(var rt=Pe[it],et=Pe[it+1],At=it+2;At+2<=ke&&Pe[At+1]===et;)At+=2;Pe[qe++]=rt,Pe[qe++]=et,it=At}ke=Pe.length=qe;var We=q.sourceNode,Ge="";We&&(Ge=We.style.display,We.style.display="none");try{for(var De=null;Le<ye;){var Te=ae[Le],Oe=ae[Le+2]||re,le=Pe[Je+2]||re,At=Math.min(Oe,le),fe=ae[Le+1],Ce;if(fe.nodeType!==1&&(Ce=X.substring(te,At))){k&&(Ce=Ce.replace(z,"\r")),fe.nodeValue=Ce;var we=fe.ownerDocument,Me=we.createElement("span");Me.className=Pe[Je+1];var $e=fe.parentNode;$e.replaceChild(Me,fe),Me.appendChild(fe),te<Oe&&(ae[Le+1]=fe=we.createTextNode(X.substring(At,Oe)),$e.insertBefore(fe,Me.nextSibling))}te=At,te>=Oe&&(Le+=2),te>=le&&(Je+=2)}}finally{We&&(We.style.display=Ge)}}var xe={};function ge(q,k){for(var z=k.length;--z>=0;){var X=k[z];xe.hasOwnProperty(X)?H.console&&console.warn("cannot override language handler %s",X):xe[X]=q}}function de(q,k){return q&&xe.hasOwnProperty(q)||(q=/^\s*</.test(k)?"default-markup":"default-code"),xe[q]}ge(ne,["default-code"]),ge(V([],[[w,/^[^<?]+/],[o,/^<!\w[^>]*(?:>|$)/],[u,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[T,/^(?:<[%?]|[%?]>)/],["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"]),ge(V([[w,/^[\s]+/,null,` \r
|
|
`],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[y,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[a,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[T,/^[=<>\/]+/],["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"]),ge(V([],[[n,/^[\s\S]+/]]),["uq.val"]),ge(J({keywords:N,hashComments:!0,cStyleComments:!0,types:g}),["c","cc","cpp","cxx","cyc","m"]),ge(J({keywords:"null,true,false"}),["json"]),ge(J({keywords:l,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:g}),["cs"]),ge(J({keywords:c,cStyleComments:!0}),["java"]),ge(J({keywords:d,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ge(J({keywords:E,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ge(J({keywords:x,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ge(J({keywords:v,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ge(J({keywords:h,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ge(J({keywords:s,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ge(V([],[[S,/^[\s\S]+/]]),["regex"]);function Fe(q){var k=q.langExtension;try{var z=f(q.sourceNode,q.pre),X=z.sourceCode;q.sourceCode=X,q.spans=z.spans,q.basePos=0,de(k,X)(q),ie(q)}catch(re){H.console&&console.log(re&&re.stack||re)}}function Qe(q,k,z){var X=z||!1,re=k||null,te=document.createElement("div");te.innerHTML="<pre>"+q+"</pre>",te=te.firstChild,X&&ce(te,X,!0);var ae={langExtension:re,numberLines:X,sourceNode:te,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Fe(ae),te.innerHTML}function Ve(q,k){var z=k||document.body,X=z.ownerDocument||document;function re(Te){return z.getElementsByTagName(Te)}for(var te=[re("pre"),re("code"),re("xmp")],ae=[],ye=0;ye<te.length;++ye)for(var Le=0,Pe=te[ye].length;Le<Pe;++Le)ae.push(te[ye][Le]);te=null;var ke=Date;ke.now||(ke={now:function(){return+new Date}});var Je=0,qe=/\blang(?:uage)?-([\w.]+)(?!\S)/,it=/\bprettyprint\b/,rt=/\bprettyprinted\b/,et=/pre|xmp/i,At=/^code$/i,We=/^(?:pre|code|xmp)$/i,Ge={};function De(){for(var Te=H.PR_SHOULD_USE_CONTINUATION?ke.now()+250:Infinity;Je<ae.length&&ke.now()<Te;Je++){for(var Oe=ae[Je],le=Ge,fe=Oe;fe=fe.previousSibling;){var Ce=fe.nodeType,we=(Ce===7||Ce===8)&&fe.nodeValue;if(we?!/^\??prettify\b/.test(we):Ce!==3||/\S/.test(fe.nodeValue))break;if(we){le={},we.replace(/\b(\w+)=([\w:.%+-]+)/g,function(xt,bt,Ot){le[bt]=Ot});break}}var Me=Oe.className;if((le!==Ge||it.test(Me))&&!rt.test(Me)){for(var $e=!1,Ie=Oe.parentNode;Ie;Ie=Ie.parentNode){var Ye=Ie.tagName;if(We.test(Ye)&&Ie.className&&it.test(Ie.className)){$e=!0;break}}if(!$e){Oe.className+=" prettyprinted";var tt=le.lang;if(!tt){tt=Me.match(qe);var at;!tt&&(at=W(Oe))&&At.test(at.tagName)&&(tt=at.className.match(qe)),tt&&(tt=tt[1])}var mt;if(et.test(Oe.tagName))mt=1;else{var ft=Oe.currentStyle,Ze=X.defaultView,yt=ft?ft.whiteSpace:Ze&&Ze.getComputedStyle?Ze.getComputedStyle(Oe,null).getPropertyValue("white-space"):0;mt=yt&&yt.substring(0,3)==="pre"}var lt=le.linenums;(lt=lt==="true"||+lt)||(lt=Me.match(/\blinenums\b(?::(\d+))?/),lt=lt?lt[1]&<[1].length?+lt[1]:!0:!1),lt&&ce(Oe,lt,mt);var gt={langExtension:tt,sourceNode:Oe,numberLines:lt,pre:mt,sourceCode:null,basePos:null,spans:null,decorations:null};Fe(gt)}}}Je<ae.length?H.setTimeout(De,250):typeof q=="function"&&q()}De()}var Ne=H.PR={createSimpleLexer:V,registerLangHandler:ge,sourceDecorator:J,PR_ATTRIB_NAME:a,PR_ATTRIB_VALUE:n,PR_COMMENT:u,PR_DECLARATION:o,PR_KEYWORD:A,PR_LITERAL:i,PR_NOCODE:t,PR_PLAIN:w,PR_PUNCTUATION:T,PR_SOURCE:r,PR_STRING:S,PR_TAG:y,PR_TYPE:R,prettyPrintOne:ve?H.prettyPrintOne=Qe:$=Qe,prettyPrint:O=ve?H.prettyPrint=Ve:O=Ve},Ue=H.define;typeof Ue=="function"&&Ue.amd&&Ue("google-code-prettify",[],function(){return Ne})})()},T7RX:function(dt,_e,Q){"use strict";var he=Q("c3Iv"),be=Q("rBQ5"),ve=Q("YaWb"),Ee=Q("8OG5"),ue=Q("mgsT"),$=Q("IYef"),O=Q("ftSv"),H=Q("XXmO"),e=Q.n(H),M=Q("T/Jt"),D=Q.n(M),N=Q("ErOA"),c=Q("3ptp"),l=Q("9kvl"),s=function(x){var E=x.shixunHomeworks,v=x.dispatch,d=Object(O.a)(x,["shixunHomeworks","dispatch"]),m=Object(c.i)();return D.a.createElement(be.a,{centered:!0,title:"\u63D0\u793A",visible:E.actionTabs.key==="\u6253\u56DE\u91CD\u505A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object($.a)(e.a.mark(function g(){var S;return e.a.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,Object(N.a)("/api/myshixuns/".concat(E.actionTabs.selectArrs.myshixun_identifier,"/reset_my_game.json"),{method:"GET",params:{course_id:m.coursesId}});case 2:S=u.sent,S.shixun_identifier&&(ue.b.success("\u64CD\u4F5C\u6210\u529F"),v({type:"shixunHomeworks/setActionTabs",payload:{}}),v({type:"shixunHomeworks/getWorkList",payload:Object(ve.a)({},E.actionTabs.params)}));case 4:case"end":return u.stop()}},g)})),onCancel:function(){v({type:"shixunHomeworks/setActionTabs",payload:{}})}},D.a.createElement("p",null,"\u8BE5\u4F5C\u4E1A\u5C06\u88AB\u6253\u56DE\u91CD\u505A\uFF0C\u5B66\u751F\u5B9E\u8BAD\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A!"),D.a.createElement("p",null,"\u786E\u5B9A\u6253\u56DE?"))};_e.a=Object(l.a)(function(h){var x=h.shixunHomeworks;return{shixunHomeworks:x}})(s)},T8No:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return O}),Q.d(_e,"e",function(){return H}),Q.d(_e,"c",function(){return T}),Q.d(_e,"b",function(){return w}),Q.d(_e,"d",function(){return y}),Q.d(_e,"f",function(){return a});var he=Q("MNsG"),be=Q("N0LK"),ve=Q("Cg/j");let Ee=he.k||"";const ue=new Map;ue.set("false",!1),ue.set("true",!0),ue.set("isMac",he.f),ue.set("isLinux",he.d),ue.set("isWindows",he.i),ue.set("isWeb",he.h),ue.set("isMacNative",he.f&&!he.h),ue.set("isEdge",Ee.indexOf("Edg/")>=0),ue.set("isFirefox",Ee.indexOf("Firefox")>=0),ue.set("isChrome",Ee.indexOf("Chrome")>=0),ue.set("isSafari",Ee.indexOf("Safari")>=0);const $=Object.prototype.hasOwnProperty;class O{static has(t){return N.create(t)}static equals(t,p){return c.create(t,p)}static regex(t,p){return S.create(t,p)}static not(t){return x.create(t)}static and(...t){return R.create(t,null)}static or(...t){return i.create(t,null,!0)}static deserialize(t,p=!1){return t?this._deserializeOrExpression(t,p):void 0}static _deserializeOrExpression(t,p){let _=t.split("||");return i.create(_.map(f=>this._deserializeAndExpression(f,p)),null,!0)}static _deserializeAndExpression(t,p){let _=t.split("&&");return R.create(_.map(f=>this._deserializeOne(f,p)),null)}static _deserializeOne(t,p){if(t=t.trim(),t.indexOf("!=")>=0){let _=t.split("!=");return h.create(_[0].trim(),this._deserializeValue(_[1],p))}if(t.indexOf("==")>=0){let _=t.split("==");return c.create(_[0].trim(),this._deserializeValue(_[1],p))}if(t.indexOf("=~")>=0){let _=t.split("=~");return S.create(_[0].trim(),this._deserializeRegexValue(_[1],p))}if(t.indexOf(" in ")>=0){let _=t.split(" in ");return l.create(_[0].trim(),_[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(t)){const _=t.split(">=");return d.create(_[0].trim(),_[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(t)){const _=t.split(">");return v.create(_[0].trim(),_[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(t)){const _=t.split("<=");return g.create(_[0].trim(),_[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(t)){const _=t.split("<");return m.create(_[0].trim(),_[1].trim())}return/^\!\s*/.test(t)?x.create(t.substr(1).trim()):N.create(t)}static _deserializeValue(t,p){if(t=t.trim(),t==="true")return!0;if(t==="false")return!1;let _=/^'([^']*)'$/.exec(t);return _?_[1].trim():t}static _deserializeRegexValue(t,p){if(Object(be.C)(t)){if(p)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let _=t.indexOf("/"),f=t.lastIndexOf("/");if(_===f||_<0){if(p)throw new Error(`bad regexp-value '${t}', missing /-enclosure`);return console.warn(`bad regexp-value '${t}', missing /-enclosure`),null}let F=t.slice(_+1,f),P=t[f+1]==="i"?"i":"";try{return new RegExp(F,P)}catch(W){if(p)throw new Error(`bad regexp-value '${t}', parse error: ${W}`);return console.warn(`bad regexp-value '${t}', parse error: ${W}`),null}}}function H(t,p){const _=t?t.substituteConstants():void 0,f=p?p.substituteConstants():void 0;return!_&&!f?!0:!_||!f?!1:_.equals(f)}function e(t,p){return t.cmp(p)}class M{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 D.INSTANCE}}M.INSTANCE=new M;class D{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 M.INSTANCE}}D.INSTANCE=new D;class N{constructor(t,p){this.key=t,this.negated=p,this.type=2}static create(t,p=null){const _=ue.get(t);return typeof _=="boolean"?_?D.INSTANCE:M.INSTANCE:new N(t,p)}cmp(t){return t.type!==this.type?this.type-t.type:o(this.key,t.key)}equals(t){return t.type===this.type?this.key===t.key:!1}substituteConstants(){const t=ue.get(this.key);return typeof t=="boolean"?t?D.INSTANCE:M.INSTANCE:this}evaluate(t){return!!t.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=x.create(this.key,this)),this.negated}}class c{constructor(t,p,_){this.key=t,this.value=p,this.negated=_,this.type=4}static create(t,p,_=null){if(typeof p=="boolean")return p?N.create(t,_):x.create(t,_);const f=ue.get(t);if(typeof f=="boolean"){const F=f?"true":"false";return p===F?D.INSTANCE:M.INSTANCE}return new c(t,p,_)}cmp(t){return t.type!==this.type?this.type-t.type:r(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=ue.get(this.key);if(typeof t=="boolean"){const p=t?"true":"false";return this.value===p?D.INSTANCE:M.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=h.create(this.key,this.value,this)),this.negated}}class l{constructor(t,p){this.key=t,this.valueKey=p,this.type=10,this.negated=null}static create(t,p){return new l(t,p)}cmp(t){return t.type!==this.type?this.type-t.type:r(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),_=t.getValue(this.key);return Array.isArray(p)?p.indexOf(_)>=0:typeof _=="string"&&typeof p=="object"&&p!==null?$.call(p,_):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=s.create(this)),this.negated}}class s{constructor(t){this._actual=t,this.type=11}static create(t){return new s(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 h{constructor(t,p,_){this.key=t,this.value=p,this.negated=_,this.type=5}static create(t,p,_=null){if(typeof p=="boolean")return p?x.create(t,_):N.create(t,_);const f=ue.get(t);if(typeof f=="boolean"){const F=f?"true":"false";return p===F?M.INSTANCE:D.INSTANCE}return new h(t,p,_)}cmp(t){return t.type!==this.type?this.type-t.type:r(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=ue.get(this.key);if(typeof t=="boolean"){const p=t?"true":"false";return this.value===p?M.INSTANCE:D.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=c.create(this.key,this.value,this)),this.negated}}class x{constructor(t,p){this.key=t,this.negated=p,this.type=3}static create(t,p=null){const _=ue.get(t);return typeof _=="boolean"?_?M.INSTANCE:D.INSTANCE:new x(t,p)}cmp(t){return t.type!==this.type?this.type-t.type:o(this.key,t.key)}equals(t){return t.type===this.type?this.key===t.key:!1}substituteConstants(){const t=ue.get(this.key);return typeof t=="boolean"?t?M.INSTANCE:D.INSTANCE:this}evaluate(t){return!t.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=N.create(this.key,this)),this.negated}}function E(t,p){if(typeof t=="string"){const _=parseFloat(t);isNaN(_)||(t=_)}return typeof t=="string"||typeof t=="number"?p(t):M.INSTANCE}class v{constructor(t,p,_){this.key=t,this.value=p,this.negated=_,this.type=12}static create(t,p,_=null){return E(p,f=>new v(t,f,_))}cmp(t){return t.type!==this.type?this.type-t.type:r(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=g.create(this.key,this.value,this)),this.negated}}class d{constructor(t,p,_){this.key=t,this.value=p,this.negated=_,this.type=13}static create(t,p,_=null){return E(p,f=>new d(t,f,_))}cmp(t){return t.type!==this.type?this.type-t.type:r(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=m.create(this.key,this.value,this)),this.negated}}class m{constructor(t,p,_){this.key=t,this.value=p,this.negated=_,this.type=14}static create(t,p,_=null){return E(p,f=>new m(t,f,_))}cmp(t){return t.type!==this.type?this.type-t.type:r(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=d.create(this.key,this.value,this)),this.negated}}class g{constructor(t,p,_){this.key=t,this.value=p,this.negated=_,this.type=15}static create(t,p,_=null){return E(p,f=>new g(t,f,_))}cmp(t){return t.type!==this.type?this.type-t.type:r(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=v.create(this.key,this.value,this)),this.negated}}class S{constructor(t,p){this.key=t,this.regexp=p,this.type=7,this.negated=null}static create(t,p){return new S(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:"",_=t.regexp?t.regexp.source:"";return p<_?-1:p>_?1:0}equals(t){if(t.type===this.type){const p=this.regexp?this.regexp.source:"",_=t.regexp?t.regexp.source:"";return this.key===t.key&&p===_}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=A.create(this)),this.negated}}class A{constructor(t){this._actual=t,this.type=8}static create(t){return new A(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 u(t){let p=null;for(let _=0,f=t.length;_<f;_++){const F=t[_].substituteConstants();if(t[_]!==F&&p===null){p=[];for(let P=0;P<_;P++)p[P]=t[P]}p!==null&&(p[_]=F)}return p===null?t:p}class R{constructor(t,p){this.expr=t,this.negated=p,this.type=6}static create(t,p){return R._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,_=this.expr.length;p<_;p++){const f=e(this.expr[p],t.expr[p]);if(f!==0)return f}return 0}equals(t){if(t.type===this.type){if(this.expr.length!==t.expr.length)return!1;for(let p=0,_=this.expr.length;p<_;p++)if(!this.expr[p].equals(t.expr[p]))return!1;return!0}return!1}substituteConstants(){const t=u(this.expr);return t===this.expr?this:R.create(t,this.negated)}evaluate(t){for(let p=0,_=this.expr.length;p<_;p++)if(!this.expr[p].evaluate(t))return!1;return!0}static _normalizeArr(t,p){const _=[];let f=!1;for(const F of t){if(!F)continue;if(F.type===1){f=!0;continue}if(F.type===0)return M.INSTANCE;if(F.type===6){_.push(...F.expr);continue}_.push(F)}if(_.length===0&&f)return D.INSTANCE;if(_.length===0)return;if(_.length===1)return _[0];_.sort(e);for(let F=1;F<_.length;F++)_[F-1].equals(_[F])&&(_.splice(F,1),F--);if(_.length===1)return _[0];for(;_.length>1;){const F=_[_.length-1];if(F.type!==9)break;_.pop();const P=_.pop(),W=_.length===0,V=i.create(F.expr.map(J=>R.create([J,P],null)),null,W);V&&(_.push(V),_.sort(e))}return _.length===1?_[0]:new R(_,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=i.create(t,this,!0)}return this.negated}}class i{constructor(t,p){this.expr=t,this.negated=p,this.type=9}static create(t,p,_){return i._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,_=this.expr.length;p<_;p++){const f=e(this.expr[p],t.expr[p]);if(f!==0)return f}return 0}equals(t){if(t.type===this.type){if(this.expr.length!==t.expr.length)return!1;for(let p=0,_=this.expr.length;p<_;p++)if(!this.expr[p].equals(t.expr[p]))return!1;return!0}return!1}substituteConstants(){const t=u(this.expr);return t===this.expr?this:i.create(t,this.negated,!1)}evaluate(t){for(let p=0,_=this.expr.length;p<_;p++)if(this.expr[p].evaluate(t))return!0;return!1}static _normalizeArr(t,p,_){let f=[],F=!1;if(t){for(let P=0,W=t.length;P<W;P++){const V=t[P];if(!V)continue;if(V.type===0){F=!0;continue}if(V.type===1)return D.INSTANCE;if(V.type===9){f=f.concat(V.expr);continue}f.push(V)}if(f.length===0&&F)return M.INSTANCE;f.sort(e)}if(f.length===0)return;if(f.length===1)return f[0];for(let P=1;P<f.length;P++)f[P-1].equals(f[P])&&(f.splice(P,1),P--);if(f.length===1)return f[0];if(_){for(let P=0;P<f.length;P++)for(let W=P+1;W<f.length;W++)a(f[P],f[W])&&(f.splice(W,1),W--);if(f.length===1)return f[0]}return new i(f,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(),_=t.shift(),f=[];for(const P of n(p))for(const W of n(_))f.push(R.create([P,W],null));const F=t.length===0;t.unshift(i.create(f,null,F))}this.negated=t[0]}return this.negated}}class T extends N{constructor(t,p,_){super(t,null);this._defaultValue=p,typeof _=="object"?T._info.push(Object.assign(Object.assign({},_),{key:t})):_!==!0&&T._info.push({key:t,description:_,type:p!=null?typeof p:void 0})}static all(){return T._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 c.create(this.key,t)}}T._info=[];const w=Object(ve.c)("contextKeyService"),y="setContext";function o(t,p){return t<p?-1:t>p?1:0}function r(t,p,_,f){return t<_?-1:t>_?1:p<f?-1:p>f?1:0}function a(t,p){if(p.type===6&&t.type!==9&&t.type!==6){for(const F of p.expr)if(t.equals(F))return!0}const _=t.negate(),f=n(_).concat(n(p));f.sort(e);for(let F=0;F<f.length;F++){const P=f[F],W=P.negate();for(let V=F+1;V<f.length;V++){const J=f[V];if(W.equals(J))return!0}}return!1}function n(t){return t.type===9?t.expr:[t]}},TSYQ:function(dt,_e,Q){var he,be;/*!
|
|
Copyright (c) 2018 Jed Watson.
|
|
Licensed under the MIT License (MIT), see
|
|
http://jedwatson.github.io/classnames
|
|
*/(function(){"use strict";var ve={}.hasOwnProperty,Ee="[native code]";function ue(){for(var $=[],O=0;O<arguments.length;O++){var H=arguments[O];if(!H)continue;var e=typeof H;if(e==="string"||e==="number")$.push(H);else if(Array.isArray(H)){if(H.length){var M=ue.apply(null,H);M&&$.push(M)}}else if(e==="object"){if(H.toString!==Object.prototype.toString&&!H.toString.toString().includes("[native code]")){$.push(H.toString());continue}for(var D in H)ve.call(H,D)&&H[D]&&$.push(D)}}return $.join(" ")}dt.exports?(ue.default=ue,dt.exports=ue):!(he=[],be=function(){return ue}.apply(_e,he),be!==void 0&&(dt.exports=be))})()},TXwP:function(dt,_e,Q){var he,be;(function(){var ve;(function(){"use strict";var ue=[,,function(e){function M(c){this.__parent=c,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=[]}M.prototype.clone_empty=function(){var c=new M(this.__parent);return c.set_indent(this.__indent_count,this.__alignment_count),c},M.prototype.item=function(c){return c<0?this.__items[this.__items.length+c]:this.__items[c]},M.prototype.has_match=function(c){for(var l=this.__items.length-1;l>=0;l--)if(this.__items[l].match(c))return!0;return!1},M.prototype.set_indent=function(c,l){this.is_empty()&&(this.__indent_count=c||0,this.__alignment_count=l||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},M.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)},M.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},M.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var c=this.__parent.current_line;return c.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),c.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),c.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,c.__items[0]===" "&&(c.__items.splice(0,1),c.__character_count-=1),!0}return!1},M.prototype.is_empty=function(){return this.__items.length===0},M.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},M.prototype.push=function(c){this.__items.push(c);var l=c.lastIndexOf(`
|
|
`);l!==-1?this.__character_count=c.length-l:this.__character_count+=c.length},M.prototype.pop=function(){var c=null;return this.is_empty()||(c=this.__items.pop(),this.__character_count-=c.length),c},M.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},M.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},M.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},M.prototype.toString=function(){var c="";return this.is_empty()?this.__parent.indent_empty_lines&&(c=this.__parent.get_indent_string(this.__indent_count)):(c=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),c+=this.__items.join("")),c};function D(c,l){this.__cache=[""],this.__indent_size=c.indent_size,this.__indent_string=c.indent_char,c.indent_with_tabs||(this.__indent_string=new Array(c.indent_size+1).join(c.indent_char)),l=l||"",c.indent_level>0&&(l=new Array(c.indent_level+1).join(this.__indent_string)),this.__base_string=l,this.__base_string_length=l.length}D.prototype.get_indent_size=function(c,l){var s=this.__base_string_length;return l=l||0,c<0&&(s=0),s+=c*this.__indent_size,s+=l,s},D.prototype.get_indent_string=function(c,l){var s=this.__base_string;return l=l||0,c<0&&(c=0,s=""),l+=c*this.__indent_size,this.__ensure_cache(l),s+=this.__cache[l],s},D.prototype.__ensure_cache=function(c){for(;c>=this.__cache.length;)this.__add_column()},D.prototype.__add_column=function(){var c=this.__cache.length,l=0,s="";this.__indent_size&&c>=this.__indent_size&&(l=Math.floor(c/this.__indent_size),c-=l*this.__indent_size,s=new Array(l+1).join(this.__indent_string)),c&&(s+=new Array(c+1).join(" ")),this.__cache.push(s)};function N(c,l){this.__indent_cache=new D(c,l),this.raw=!1,this._end_with_newline=c.end_with_newline,this.indent_size=c.indent_size,this.wrap_line_length=c.wrap_line_length,this.indent_empty_lines=c.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new M(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}N.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},N.prototype.get_line_number=function(){return this.__lines.length},N.prototype.get_indent_string=function(c,l){return this.__indent_cache.get_indent_string(c,l)},N.prototype.get_indent_size=function(c,l){return this.__indent_cache.get_indent_size(c,l)},N.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},N.prototype.add_new_line=function(c){return this.is_empty()||!c&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},N.prototype.get_code=function(c){this.trim(!0);var l=this.current_line.pop();l&&(l[l.length-1]===`
|
|
`&&(l=l.replace(/\n+$/g,"")),this.current_line.push(l)),this._end_with_newline&&this.__add_outputline();var s=this.__lines.join(`
|
|
`);return c!==`
|
|
`&&(s=s.replace(/[\n]/g,c)),s},N.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},N.prototype.set_indent=function(c,l){return c=c||0,l=l||0,this.next_line.set_indent(c,l),this.__lines.length>1?(this.current_line.set_indent(c,l),!0):(this.current_line.set_indent(),!1)},N.prototype.add_raw_token=function(c){for(var l=0;l<c.newlines;l++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(c.whitespace_before),this.current_line.push(c.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},N.prototype.add_token=function(c){this.__add_space_before_token(),this.current_line.push(c),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},N.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(" "))},N.prototype.remove_indent=function(c){for(var l=this.__lines.length;c<l;)this.__lines[c]._remove_indent(),c++;this.current_line._remove_wrap_indent()},N.prototype.trim=function(c){for(c=c===void 0?!1:c,this.current_line.trim();c&&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},N.prototype.just_added_newline=function(){return this.current_line.is_empty()},N.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},N.prototype.ensure_empty_line_above=function(c,l){for(var s=this.__lines.length-2;s>=0;){var h=this.__lines[s];if(h.is_empty())break;if(h.item(0).indexOf(c)!==0&&h.item(-1)!==l){this.__lines.splice(s+1,0,new M(this)),this.previous_line=this.__lines[this.__lines.length-2];break}s--}},e.exports.Output=N},,,,function(e){function M(c,l){this.raw_options=D(c,l),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"])}M.prototype._get_array=function(c,l){var s=this.raw_options[c],h=l||[];return typeof s=="object"?s!==null&&typeof s.concat=="function"&&(h=s.concat()):typeof s=="string"&&(h=s.split(/[^a-zA-Z0-9_\/\-]+/)),h},M.prototype._get_boolean=function(c,l){var s=this.raw_options[c],h=s===void 0?!!l:!!s;return h},M.prototype._get_characters=function(c,l){var s=this.raw_options[c],h=l||"";return typeof s=="string"&&(h=s.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),h},M.prototype._get_number=function(c,l){var s=this.raw_options[c];l=parseInt(l,10),isNaN(l)&&(l=0);var h=parseInt(s,10);return isNaN(h)&&(h=l),h},M.prototype._get_selection=function(c,l,s){var h=this._get_selection_list(c,l,s);if(h.length!==1)throw new Error("Invalid Option Value: The option '"+c+`' can only be one of the following values:
|
|
`+l+`
|
|
You passed in: '`+this.raw_options[c]+"'");return h[0]},M.prototype._get_selection_list=function(c,l,s){if(!l||l.length===0)throw new Error("Selection list cannot be empty.");if(s=s||[l[0]],!this._is_valid_selection(s,l))throw new Error("Invalid Default Value!");var h=this._get_array(c,s);if(!this._is_valid_selection(h,l))throw new Error("Invalid Option Value: The option '"+c+`' can contain only the following values:
|
|
`+l+`
|
|
You passed in: '`+this.raw_options[c]+"'");return h},M.prototype._is_valid_selection=function(c,l){return c.length&&l.length&&!c.some(function(s){return l.indexOf(s)===-1})};function D(c,l){var s={};c=N(c);var h;for(h in c)h!==l&&(s[h]=c[h]);if(l&&c[l])for(h in c[l])s[h]=c[l][h];return s}function N(c){var l={},s;for(s in c){var h=s.replace(/-/g,"_");l[h]=c[s]}return l}e.exports.Options=M,e.exports.normalizeOpts=N,e.exports.mergeOpts=D},,function(e){var M=RegExp.prototype.hasOwnProperty("sticky");function D(N){this.__input=N||"",this.__input_length=this.__input.length,this.__position=0}D.prototype.restart=function(){this.__position=0},D.prototype.back=function(){this.__position>0&&(this.__position-=1)},D.prototype.hasNext=function(){return this.__position<this.__input_length},D.prototype.next=function(){var N=null;return this.hasNext()&&(N=this.__input.charAt(this.__position),this.__position+=1),N},D.prototype.peek=function(N){var c=null;return N=N||0,N+=this.__position,N>=0&&N<this.__input_length&&(c=this.__input.charAt(N)),c},D.prototype.__match=function(N,c){N.lastIndex=c;var l=N.exec(this.__input);return l&&!(M&&N.sticky)&&(l.index!==c&&(l=null)),l},D.prototype.test=function(N,c){return c=c||0,c+=this.__position,c>=0&&c<this.__input_length?!!this.__match(N,c):!1},D.prototype.testChar=function(N,c){var l=this.peek(c);return N.lastIndex=0,l!==null&&N.test(l)},D.prototype.match=function(N){var c=this.__match(N,this.__position);return c?this.__position+=c[0].length:c=null,c},D.prototype.read=function(N,c,l){var s="",h;return N&&(h=this.match(N),h&&(s+=h[0])),c&&(h||!N)&&(s+=this.readUntil(c,l)),s},D.prototype.readUntil=function(N,c){var l="",s=this.__position;N.lastIndex=this.__position;var h=N.exec(this.__input);return h?(s=h.index,c&&(s+=h[0].length)):s=this.__input_length,l=this.__input.substring(this.__position,s),this.__position=s,l},D.prototype.readUntilAfter=function(N){return this.readUntil(N,!0)},D.prototype.get_regexp=function(N,c){var l=null,s="g";return c&&M&&(s="y"),typeof N=="string"&&N!==""?l=new RegExp(N,s):N&&(l=new RegExp(N.source,s)),l},D.prototype.get_literal_regexp=function(N){return RegExp(N.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},D.prototype.peekUntilAfter=function(N){var c=this.__position,l=this.readUntilAfter(N);return this.__position=c,l},D.prototype.lookBack=function(N){var c=this.__position-1;return c>=N.length&&this.__input.substring(c-N.length,c).toLowerCase()===N},e.exports.InputScanner=D},,,,,function(e){function M(D,N){D=typeof D=="string"?D:D.source,N=typeof N=="string"?N:N.source,this.__directives_block_pattern=new RegExp(D+/ beautify( \w+[:]\w+)+ /.source+N,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(D+/\sbeautify\signore:end\s/.source+N,"g")}M.prototype.get_directives=function(D){if(!D.match(this.__directives_block_pattern))return null;var N={};this.__directive_pattern.lastIndex=0;for(var c=this.__directive_pattern.exec(D);c;)N[c[1]]=c[2],c=this.__directive_pattern.exec(D);return N},M.prototype.readIgnored=function(D){return D.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=M},,function(e,M,D){var N=D(16).Beautifier,c=D(17).Options;function l(s,h){var x=new N(s,h);return x.beautify()}e.exports=l,e.exports.defaultOptions=function(){return new c}},function(e,M,D){var N=D(17).Options,c=D(2).Output,l=D(8).InputScanner,s=D(13).Directives,h=new s(/\/\*/,/\*\//),x=/\r\n|[\r\n]/,E=/\r\n|[\r\n]/g,v=/\s/,d=/(?:\s|\n)+/g,m=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,g=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function S(A,u){this._source_text=A||"",this._options=new N(u),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}S.prototype.eatString=function(A){var u="";for(this._ch=this._input.next();this._ch;){if(u+=this._ch,this._ch==="\\")u+=this._input.next();else if(A.indexOf(this._ch)!==-1||this._ch===`
|
|
`)break;this._ch=this._input.next()}return u},S.prototype.eatWhitespace=function(A){for(var u=v.test(this._input.peek()),R=0;v.test(this._input.peek());)this._ch=this._input.next(),A&&this._ch===`
|
|
`&&((R===0||R<this._options.max_preserve_newlines)&&(R++,this._output.add_new_line(!0)));return u},S.prototype.foundNestedPseudoClass=function(){for(var A=0,u=1,R=this._input.peek(u);R;){if(R==="{")return!0;if(R==="(")A+=1;else if(R===")"){if(A===0)return!1;A-=1}else if(R===";"||R==="}")return!1;u++,R=this._input.peek(u)}return!1},S.prototype.print_string=function(A){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(A)},S.prototype.preserveSingleSpace=function(A){A&&(this._output.space_before_token=!0)},S.prototype.indent=function(){this._indentLevel++},S.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},S.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var A=this._source_text,u=this._options.eol;u==="auto"&&(u=`
|
|
`,A&&x.test(A||"")&&(u=A.match(x)[0])),A=A.replace(E,`
|
|
`);var R=A.match(/^[\t ]*/)[0];this._output=new c(this._options,R),this._input=new l(A),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var i=0,T=!1,w=!1,y=!1,o=!1,r=!1,a=!1,n=this._ch,t=!1,p,_,f;p=this._input.read(d),_=p!=="",f=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 F=this._input.read(m),P=h.get_directives(F);P&&P.ignore==="start"&&(F+=h.readIgnored(this._input)),this.print_string(F),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(g)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(_),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var W=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);W.match(/[ :]$/)&&(W=this.eatString(": ").replace(/\s$/,""),this.print_string(W),this._output.space_before_token=!0),W=W.replace(/\s$/,""),W==="extend"?o=!0:W==="import"&&(r=!0),W in this.NESTED_AT_RULE?(this._nestedLevel+=1,W in this.CONDITIONAL_GROUP_RULE&&(y=!0)):!T&&i===0&&W.indexOf(":")!==-1&&(w=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(_),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")w&&(w=!1,this.outdent()),y?(y=!1,T=this._indentLevel>=this._nestedLevel):T=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&T&&(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)):(f==="("?this._output.space_before_token=!1:f!==","&&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(),f==="{"&&this._output.trim(!0),r=!1,o=!1,w&&(this.outdent(),w=!1),this.print_string(this._ch),T=!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 V=0;V<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;V++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[V])){t=!0;break}(T||y)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!o&&i===0?(this.print_string(":"),w||(w=!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 J=f==='"'||f==="'";this.preserveSingleSpace(J||_),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")t=!1,i===0?(w&&(this.outdent(),w=!1),o=!1,r=!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(),i++,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(")")),i&&(i--,this.outdent()));else{var ne=!1;this._input.lookBack("with")&&(ne=!0),this.preserveSingleSpace(_||ne),this.print_string(this._ch),w&&f==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),a=!0):(this.eatWhitespace(),i++,this.indent())}else if(this._ch===")")i&&(i--,this.outdent()),a&&this._input.peek()===";"&&this._options.selector_separator_newline&&(a=!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&&(!w||a)&&i===0&&!r&&!o?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!w&&i===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&&v.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(_),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),v.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 ce=f==='"'||f==="'";this.preserveSingleSpace(ce||_),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
`&&t&&this._output.add_new_line()}var ie=this._output.get_code(u);return ie},e.exports.Beautifier=S},function(e,M,D){var N=D(6).Options;function c(l){N.call(this,l,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var s=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||s;var h=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var x=0;x<h.length;x++)h[x]!=="expand"?this.brace_style="collapse":this.brace_style=h[x]}c.prototype=new N,e.exports.Options=c}],$={};function O(e){var M=$[e];if(M!==void 0)return M.exports;var D=$[e]={exports:{}};return ue[e](D,D.exports,O),D.exports}var H=O(15);ve=H})();var Ee=ve;!(he=[],be=function(){return{css_beautify:Ee}}.apply(_e,he),be!==void 0&&(dt.exports=be))})()},TqI3:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return he});function he(be,ve,Ee,ue,$){var O=Ee[be]||{},H=Ee[ve]||{},e,M;O.fixed==="left"?e=ue.left[be]:H.fixed==="right"&&(M=ue.right[ve]);var D=!1,N=!1,c=!1,l=!1,s=Ee[ve+1],h=Ee[be-1];if($==="rtl"){if(e!==void 0){var x=h&&h.fixed==="left";l=!x}else if(M!==void 0){var E=s&&s.fixed==="right";c=!E}}else if(e!==void 0){var v=s&&s.fixed==="left";D=!v}else if(M!==void 0){var d=h&&h.fixed==="right";N=!d}return{fixLeft:e,fixRight:M,lastFixLeft:D,firstFixRight:N,lastFixRight:c,firstFixLeft:l,isSticky:ue.isSticky}}},"U+Vu":function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return H}),Q.d(_e,"b",function(){return e});var he=Q("36hc"),be=Q("T/Jt"),ve=Q.n(be),Ee=Q("s7W6"),ue=Q("HnKm"),$=Q("1HCi"),O=Q.n($);function H(){var M=be.createContext(null),D=function(c){var l=c.value,s=c.children,h=be.useRef(l);h.current=l;var x=be.useState(function(){return{getValue:function(){return h.current},listeners:new Set}}),E=Object(he.a)(x,1),v=E[0];return Object(Ee.a)(function(){v.listeners.forEach(function(d){d(l)})},[l]),be.createElement(M.Provider,{value:v},s)};return{Context:M,Provider:D}}function e(M,D){var N=Object(ue.a)(D),c=be.useContext(M==null?void 0:M.Context),l=c||{},s=l.listeners,h=l.getValue,x=be.useState(function(){return N(c?h():null)}),E=Object(he.a)(x,2),v=E[0],d=E[1];return Object(Ee.a)(function(){if(!c)return;function m(g){d(function(S){var A=N(g);return O()(S,A)?S:A})}return s.add(m),function(){s.delete(m)}},[c]),v}},U8pU:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return he});function he(be){return he=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ve){return typeof ve}:function(ve){return ve&&typeof Symbol=="function"&&ve.constructor===Symbol&&ve!==Symbol.prototype?"symbol":typeof ve},he(be)}},VTBJ:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return ve});var he=Q("rePB");function be(Ee,ue){var $=Object.keys(Ee);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(Ee);ue&&(O=O.filter(function(H){return Object.getOwnPropertyDescriptor(Ee,H).enumerable})),$.push.apply($,O)}return $}function ve(Ee){for(var ue=1;ue<arguments.length;ue++){var $=arguments[ue]!=null?arguments[ue]:{};ue%2?be(Object($),!0).forEach(function(O){Object(he.a)(Ee,O,$[O])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ee,Object.getOwnPropertyDescriptors($)):be(Object($)).forEach(function(O){Object.defineProperty(Ee,O,Object.getOwnPropertyDescriptor($,O))})}return Ee}},VUat:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return he});var he={}},VbWF:function(dt,_e,Q){"use strict";var he=Q("T/Jt"),be=Q.n(he),ve=he.createContext({renderWithProps:!1});_e.a=ve},Vhoy:function(dt,_e,Q){"use strict";Q.d(_e,"d",function(){return Ee}),Q.d(_e,"e",function(){return ue}),Q.d(_e,"c",function(){return $}),Q.d(_e,"b",function(){return O}),Q.d(_e,"a",function(){return H});var he=Q("MI8n");class be{constructor(){this._icons=new Map,this._onDidRegister=new he.b}add(e){const M=this._icons.get(e.id);M?e.description?M.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 ve=new be,Ee=ve;function ue(e,M){return new O(e,M)}function $(e){return e?e.replace(/\$\((.*?)\)/g,(M,D)=>` ${D} `).trim():""}class O{constructor(e,M,D){this.id=e,this.definition=M,this.description=D,ve.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var H;(function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9\\-]+",e.iconModifierExpression="~[A-Za-z]+";const M=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function D(l){if(l instanceof O)return["codicon","codicon-"+l.id];const s=M.exec(l.id);if(!s)return D(O.error);let[,h,x]=s;const E=["codicon","codicon-"+h];return x&&E.push("codicon-modifier-"+x.substr(1)),E}e.asClassNameArray=D;function N(l){return D(l).join(" ")}e.asClassName=N;function c(l){return"."+D(l).join(".")}e.asCSSSelector=c})(H||(H={})),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"})}(O||(O={}))},YA0V:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return O});var he=Q("T/Jt"),be=Q.n(he),ve=Q("Dpym"),Ee=Q("3GYr"),ue=Q("0lMV");function $(H){var e=H.children,M=H.stickyOffsets,D=H.flattenColumns,N=he.useContext(ve.a),c=N.prefixCls,l=D.length-1,s=D[l],h=he.useMemo(function(){return{stickyOffsets:M,flattenColumns:D,scrollColumnIndex:(s==null?void 0:s.scrollbar)?l:null}},[s,D,l,M]);return he.createElement(ue.a.Provider,{value:h},he.createElement("tfoot",{className:"".concat(c,"-summary")},e))}_e.b=$;var O=Ee.a},YLkp:function(dt,_e,Q){"use strict";function he(be){return null}_e.a=he},ZW9T:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return _});var he=Q("YaWb"),be=Q("nc60"),ve=Q("8OG5"),Ee=Q("mgsT"),ue=Q("sh+1"),$=Q("Hqw+"),O=Q("ftSv"),H=Q("T/Jt"),e=Q.n(H),M=Q("bdgK"),D=Q("IYef"),N=Q("XXmO"),c=Q.n(N),l={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"]},s={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"]},h={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(`
|
|
`)}]},x={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(`
|
|
`)}]},E=Q("5VLF"),v=Q.n(E),d={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"]}},m=function(F,P){return P.map(function(W){return{label:W,kind:F.languages.CompletionItemKind.Keyword,insertText:W}})},g=function(F){return Object.keys(d.tables).map(function(P){return{label:P,kind:F.languages.CompletionItemKind.Variable,insertText:P}})},S=function(F,P){var W=d.tables[F];return W?W.map(function(V){return{label:V,kind:P.languages.CompletionItemKind.Field,insertText:V}}):[]};function A(f,F,P,W,V){var J=F.getWordUntilPosition(P),ne={startLineNumber:P.lineNumber,endLineNumber:P.lineNumber,startColumn:J.startColumn,endColumn:J.endColumn},ce=W.map(function(ie){return{label:ie,kind:f.languages.CompletionItemKind.Keyword,insertText:ie,insertTextRules:f.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ne}});return V.map(function(ie){ce.push(Object(he.a)(Object(he.a)({},ie),{},{range:ne}))}),ce}var u=function(f){d.languages.map(function(V){return f.languages.registerDocumentFormattingEditProvider(V,{provideDocumentFormattingEdits:function(ne,ce,ie){return Object(D.a)(c.a.mark(function xe(){var ge;return c.a.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return ge=v()(ne.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}),Fe.abrupt("return",[{range:ne.getFullModelRange(),text:ge}]);case 2:case"end":return Fe.stop()}},xe)}))()}}),V});var F=h.quickKey.map(function(V){return{label:V.label,kind:f.languages.CompletionItemKind.Method,insertText:V.content,insertTextRules:f.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),P=x.quickKey.map(function(V){return{label:V.label,kind:f.languages.CompletionItemKind.Method,insertText:V.content,insertTextRules:f.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),W=s.quickKey.map(function(V){return{label:V.label,kind:f.languages.CompletionItemKind.Method,insertText:V.content,insertTextRules:f.languages.CompletionItemInsertTextRule.InsertAsSnippet}});f.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(J,ne){var ce=J.getWordUntilPosition(ne),ie={startLineNumber:ne.lineNumber,endLineNumber:ne.lineNumber,startColumn:ce.startColumn,endColumn:ce.endColumn},xe=J.getLineContent(ne.lineNumber).substring(ce.startColumn-2,ce.endColumn);return{suggestions:[].concat(Object(be.a)(h.keywords.map(function(ge){return{label:ge,kind:f.languages.CompletionItemKind.Function,documentation:ge,insertText:ge,insertTextRules:f.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ie}})),Object(be.a)(h.quickKey.map(function(ge){return{label:ge.label,kind:f.languages.CompletionItemKind.Function,documentation:ge.content,insertText:xe.startsWith("#")?ge.content.replace(/#/,""):ge.content,insertTextRules:f.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ie}})))}}}),f.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(J,ne){var ce=J.getWordUntilPosition(ne),ie={startLineNumber:ne.lineNumber,endLineNumber:ne.lineNumber,startColumn:ce.startColumn,endColumn:ce.endColumn};return{suggestions:Object(be.a)(l.keywords.map(function(xe){return{label:xe,kind:f.languages.CompletionItemKind.Function,documentation:xe,insertText:xe,insertTextRules:f.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ie}}))}}}),f.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(J,ne){var ce=J.getWordUntilPosition(ne),ie={startLineNumber:ne.lineNumber,endLineNumber:ne.lineNumber,startColumn:ce.startColumn,endColumn:ce.endColumn},xe=J.getLineContent(ne.lineNumber).substring(ce.startColumn-2,ce.endColumn);return{suggestions:[].concat(Object(be.a)(s.keywords.map(function(ge){return{label:ge,kind:f.languages.CompletionItemKind.Function,documentation:ge,insertText:ge,insertTextRules:f.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ie}})),Object(be.a)(s.quickKey.map(function(ge){return{label:ge.label,kind:f.languages.CompletionItemKind.Function,documentation:ge.content,insertText:xe.startsWith("#")?ge.content.replace(/#/,""):ge.content,insertTextRules:f.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ie}})))}}}),f.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(J,ne){var ce=J.getWordUntilPosition(ne),ie={startLineNumber:ne.lineNumber,endLineNumber:ne.lineNumber,startColumn:ce.startColumn,endColumn:ce.endColumn},xe=J.getLineContent(ne.lineNumber).substring(ce.startColumn-2,ce.endColumn);return{suggestions:[].concat(Object(be.a)(x.keywords.map(function(ge){return{label:ge,kind:f.languages.CompletionItemKind.Function,documentation:ge,insertText:ge,insertTextRules:f.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ie}})),Object(be.a)(x.quickKey.map(function(ge){return{label:ge.label,kind:f.languages.CompletionItemKind.Function,documentation:ge.content,insertText:xe.startsWith("#")?ge.content.replace(/#/,""):ge.content,insertTextRules:f.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ie}})))}}})},R="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",i=Q("fjLI"),T=Q("LvDl"),w=Q("+ua5");function y(f){return/^\d+$/.test(f)?"".concat(f,"px"):f}function o(){}var r=!1,a={"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 f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],F=f;if(Array.isArray(f)){for(var P=0;P<f.length;P++){var W=a[f[P]];if(W)return W}return F[0]}return a[F]||F}var t=null,p=_e.b=function(f){var F=f.width,P=F===void 0?"100%":F,W=f.height,V=W===void 0?"100%":W,J=f.value,ne=f.language,ce=ne===void 0?"javascript":ne,ie=f.style,xe=ie===void 0?{}:ie,ge=f.options,de=ge===void 0?{}:ge,Fe=f.overrideServices,Qe=Fe===void 0?{}:Fe,Ve=f.theme,Ne=Ve===void 0?"vs-dark":Ve,Ue=f.onEditBlur,q=f.onSave,k=f.autoHeight,z=k===void 0?!1:k,X=f.forbidCopy,re=X===void 0?!1:X,te=f.onChange,ae=te===void 0?o:te,ye=f.editorDidMount,Le=ye===void 0?o:ye,Pe=f.onFocus,ke=Pe===void 0?o:Pe,Je=f.filename,qe=Je===void 0?"educoder.txt":Je,it=f.errorLine,rt=f.errorContent,et=rt===void 0?"":rt,At=Object(O.a)(f,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),We=Object(H.useRef)(),Ge=Object(H.useRef)({}),De=Object(H.useRef)(),Te=Object(H.useRef)(),Oe=Object(H.useRef)(!1),le=Object(H.useRef)(),fe=Object(H.useState)(!1),Ce=Object($.a)(fe,2),we=Ce[0],Me=Ce[1];function $e(){var ut;return We.current&&(ut=new M.a(function(Et){var Lt=Object(ue.a)(Et),Ht;try{for(Lt.s();!(Ht=Lt.n()).done;){var mr=Ht.value;(mr.target.offsetHeight>0||mr.target.offsetWidth>0)&&Ge.current.instance.layout()}}catch(_r){Lt.e(_r)}finally{Lt.f()}}),ut.observe(We.current)),ut}function Ie(){Ee.b.warn(decodeURIComponent(R))}var Ye=function(){var Et=Ge.current.instance;if(J!=null&&Et&&we){var Lt=Et.getModel();Lt&&J!==Lt.getValue()&&(r=!0,Lt.setValue(J),Et.layout(),r=!1)}};Object(H.useEffect)(function(){Te.current&&clearTimeout(Te.current),Te.current=setTimeout(function(){Ye()},500)},[J,we,Ge.current]),Object(H.useEffect)(function(){if(it&&Ge.current&&Ge.current.instance){var ut=Ge.current.instance;ut.changeViewZones(function(Lt){var Ht=document.createElement("div");Ht.style.padding="10px 20px",Ht.style.width="calc(100% - 20px)",Ht.className="my-error-line-wrp",Ht.innerHTML=et,Lt.addZone({afterLineNumber:it||11,heightInLines:3,domNode:Ht})});var Et={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}};ut.addOverlayWidget(Et),ut.revealPositionInCenter({lineNumber:20,column:1})}},[it,Ge.current,we]);function tt(){var ut=Ge.current.instance;if(ut){var Et=ut.getSelection(),Lt=Ge.current.pastePos||{},Ht=new t.Range(Lt.startLineNumber||Et.endLineNumber,Lt.startColumn||Et.endColumn,Lt.endLineNumber||Et.endLineNumber,Lt.endColumn||Et.endColumn);setTimeout(function(){ut.executeEdits("",[{range:Ht,text:""}])},300)}}function at(ut){(window.navigator.platform.match("Mac")?ut.metaKey:ut.ctrlKey)&&ut.keyCode==83&&(ut.preventDefault(),q())}var mt=function(){if(z&&Ge.current.instance){var Et=Ge.current.instance.getContentHeight();Vt(Et<V?V:Et)}else Vt(V)};function ft(ut){var Et=document.createEvent("MouseEvents");Et.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),ut.dispatchEvent(Et)}function Ze(ut,Et){var Lt=window.URL||window.webkitURL||window,Ht=new Blob([Et]),mr=document.createElementNS("http://www.w3.org/1999/xhtml","a");mr.href=Lt.createObjectURL(Ht),mr.download=ut,ft(mr)}Object(H.useEffect)(function(){mt()},[mt]),Object(H.useEffect)(function(){We.current&&!we&&Q.e(26).then(Q.t.bind(null,"M/lh",7)).then(function(ut){try{t=ut,Ge.current.instance=t.editor.create(We.current,{value:J,language:n(ce),theme:Ne,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},Qe);var Et=Ge.current.instance,Lt=i.d._menuItems,Ht=Object(be.a)(Lt).find(function(Mt){return Mt[0]._debugName=="EditorContext"}),mr=Ht[1],_r=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Ar=function(sr,Er){var ur=sr._first;do{var kt,zt,Ae=Er.includes((kt=ur.element)===null||kt===void 0||((zt=kt.command)===null||zt===void 0)?void 0:zt.id);Ae&&sr._remove(ur)}while(ur=ur.next)};if(Le(Et,t),setTimeout(function(){mt(),Ge.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Ze(qe||"educoder.txt",Et.getValue())}}),Et.getDomNode().addEventListener("input",function(){De.current.autoFormat&&Et.getAction("editor.action.formatDocument").run()})},500),Ge.current.subscription=Et.onDidChangeModelContent(function(Mt){Oe.current?clearTimeout(le.current):(mt(),ae(Et.getValue(),Mt)),le.current=setTimeout(function(){Oe.current=!1},500)}),window.Monaco||u(t,n(ce)),re&&(Ar(mr,_r),We.current.classList.add("noCopyPaste"),Et.onKeyDown(function(Mt){var sr=Mt.keyCode,Er=Mt.ctrlKey,ur=Mt.metaKey;(sr===33||sr===52)&&(ur||Er)&&(Ie(),Mt.preventDefault())})),window.Monaco=t,Ue&&Et.onDidBlurEditorWidget(function(){Ue(Et.getValue())}),ke&&Et.onDidFocusEditorText(function(){ke(Et.getValue())}),re){Et.addCommand(t.KeyMod.CtrlCmd|t.KeyCode.KEY_V,function(){return Ie(),null}),Et.onDidPaste(function(Mt){Ge.current.pastePos=Mt});try{window.addEventListener("paste",tt)}catch(Mt){}}var nr=$e();return Me(!0),function(){var Mt=Ge.current.instance;Mt.dispose();var sr=Mt.getModel();sr&&sr.dispose(),Ge.current.subscription&&Ge.current.subscription.dispose(),re&&window.removeEventListener("paste",tt),nr.unobserve(We.current)}}catch(Mt){}})},[]),Object(H.useEffect)(function(){var ut=Ge.current.instance;if(ut&&we)return document.addEventListener("keydown",at,!1),function(){document.removeEventListener("keydown",at)}},[q,we]),Object(H.useEffect)(function(){var ut=Ge.current.instance;if(ut&&we){var Et=n(ce);t.editor.setModelLanguage(ut.getModel(),Et),console.log("language:",ce,ut.getModel(),Et)}},[ce,we]),Object(H.useEffect)(function(){var ut=Ge.current.instance;ut&&we&&t.editor.setTheme(Ne)},[Ne,we]),Object(H.useEffect)(function(){var ut=Ge.current.instance;De.current=de,ut&&we&&(ut.updateOptions(Object(he.a)({},de)),setTimeout(function(){ut.getModel().updateOptions(Object(he.a)({},de))},200))},[JSON.stringify(de),we]),Object(H.useEffect)(function(){var ut=Ge.current.instance;ut&&we&&ut.layout()},[P,V,we]);var yt=Object(H.useState)(y(P)),lt=Object($.a)(yt,2),gt=lt[0],xt=lt[1],bt=Object(H.useState)(y(V)),Ot=Object($.a)(bt,2),Tt=Ot[0],Vt=Ot[1],Zt=Object(he.a)(Object(he.a)({},xe),{},{width:gt,height:Tt});return e.a.createElement("div",{className:"my-monaco-editor",ref:We,style:Zt})};function _(f){var F=f.width,P=F===void 0?"100%":F,W=f.height,V=W===void 0?"100%":W,J=f.original,ne=f.modified,ce=f.language,ie=f.options,xe=ie===void 0?{}:ie,ge=Object(H.useRef)(),de=Object(H.useState)(null),Fe=Object($.a)(de,2),Qe=Fe[0],Ve=Fe[1];function Ne(z){var X;return ge.current&&(X=new M.a(function(re){var te=Object(ue.a)(re),ae;try{for(te.s();!(ae=te.n()).done;){var ye=ae.value;(ye.target.offsetHeight>0||ye.target.offsetWidth>0)&&z.layout()}}catch(Le){te.e(Le)}finally{te.f()}}),X.observe(ge.current)),X}Object(H.useEffect)(function(){ge.current&&Q.e(26).then(Q.t.bind(null,"M/lh",7)).then(function(z){t=z;var X=t.editor.createDiffEditor(ge.current,Object(he.a)(Object(he.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},xe),{},{wordWrap:!0}));Ve(X);var re=Ne(X);return function(){X.dispose();var te=X.getModel();te&&te.dispose(),re.unobserve(ge.current)}})},[]),Object(H.useEffect)(function(){Qe&&Qe.setModel({original:t.editor.createModel(J,ce),modified:t.editor.createModel(ne,ce)})},[J,ne,ce,Qe]);var Ue=y(P),q=y(V),k={width:Ue,height:q};return e.a.createElement("div",{className:"my-diff-editor",ref:ge,style:k})}},Zaiq:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return u.a});var he=Q("yuO0"),be=Q("XjgL"),ve=Q("kxoy"),Ee=Q("6ASS"),ue=Q("aVTQ"),$=Q("eA01"),O=Q("fXDJ"),H=Q("fhFH"),e=Q("BPTR"),M=Q("udol"),D=Q("27eb"),N=Q.n(D),c=Q("sg8A"),l=Q("E0BR"),s=Q("B/uU"),h=Q("T/Jt"),x=Q("c27x");function E(Ne){var Ue=Ne.dropPosition,q=Ne.dropLevelOffset,k=Ne.indent,z={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Ue){case-1:z.top=0,z.left=-q*k;break;case 1:z.bottom=0,z.left=-q*k;break;case 0:z.bottom=0,z.left=k;break}return h.createElement("div",{style:z})}function v(Ne){if(Ne==null)throw new TypeError("Cannot destructure "+Ne)}var d=Q("36hc"),m=Q("fNpE"),g=Q("s7W6"),S=Q("JTpS"),A=Q("J5No"),u=Q("0pdE");function R(Ne,Ue){var q=h.useState(!1),k=Object(d.a)(q,2),z=k[0],X=k[1];h.useLayoutEffect(function(){if(z)return Ne(),function(){Ue()}},[z]),h.useLayoutEffect(function(){return X(!0),function(){X(!1)}},[])}var i=Q("rgEC"),T=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],w=function(Ue,q){var k=Ue.className,z=Ue.style,X=Ue.motion,re=Ue.motionNodes,te=Ue.motionType,ae=Ue.onMotionStart,ye=Ue.onMotionEnd,Le=Ue.active,Pe=Ue.treeNodeRequiredProps,ke=Object(m.a)(Ue,T),Je=h.useState(!0),qe=Object(d.a)(Je,2),it=qe[0],rt=qe[1],et=h.useContext(x.a),At=et.prefixCls,We=re&&te!=="hide";Object(g.a)(function(){re&&(We!==it&&rt(We))},[re]);var Ge=function(){re&&ae()},De=h.useRef(!1),Te=function(){re&&!De.current&&(De.current=!0,ye())};R(Ge,Te);var Oe=function(fe){We===fe&&Te()};return re?h.createElement(A.default,Object(he.a)({ref:q,visible:it},X,{motionAppear:te==="show",onVisibleChanged:Oe}),function(le,fe){var Ce=le.className,we=le.style;return h.createElement("div",{ref:fe,className:N()("".concat(At,"-treenode-motion"),Ce),style:we},re.map(function(Me){var $e=Object(he.a)({},(v(Me.data),Me.data)),Ie=Me.title,Ye=Me.key,tt=Me.isStart,at=Me.isEnd;delete $e.children;var mt=Object(i.g)(Ye,Pe);return h.createElement(u.a,Object(he.a)({},$e,mt,{title:Ie,active:Le,data:Me.data,key:Ye,isStart:tt,isEnd:at}))}))}):h.createElement(u.a,Object(he.a)({domRef:q,className:k,style:z},ke,{active:Le}))};w.displayName="MotionTreeNode";var y=h.forwardRef(w),o=y;function r(){var Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],q=Ne.length,k=Ue.length;if(Math.abs(q-k)!==1)return{add:!1,key:null};function z(X,re){var te=new Map;X.forEach(function(ye){te.set(ye,!0)});var ae=re.filter(function(ye){return!te.has(ye)});return ae.length===1?ae[0]:null}return q<k?{add:!0,key:z(Ne,Ue)}:{add:!1,key:z(Ue,Ne)}}function a(Ne,Ue,q){var k=Ne.findIndex(function(te){return te.key===q}),z=Ne[k+1],X=Ue.findIndex(function(te){return te.key===q});if(z){var re=Ue.findIndex(function(te){return te.key===z.key});return Ue.slice(X+1,re)}return Ue.slice(X+1)}var n=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],t={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},p=function(){},_="RC_TREE_MOTION_".concat(Math.random()),f={key:_},F={key:_,level:0,index:0,pos:"0",node:f,nodes:[f]},P={parent:null,children:[],pos:F.pos,data:f,title:null,key:_,isStart:[],isEnd:[]};function W(Ne,Ue,q,k){return Ue===!1||!q?Ne:Ne.slice(0,Math.ceil(q/k)+1)}function V(Ne){var Ue=Ne.key,q=Ne.pos;return Object(i.f)(Ue,q)}function J(Ne){for(var Ue=String(Ne.data.key),q=Ne;q.parent;)q=q.parent,Ue="".concat(q.data.key," > ").concat(Ue);return Ue}var ne=h.forwardRef(function(Ne,Ue){var q=Ne.prefixCls,k=Ne.data,z=Ne.selectable,X=Ne.checkable,re=Ne.expandedKeys,te=Ne.selectedKeys,ae=Ne.checkedKeys,ye=Ne.loadedKeys,Le=Ne.loadingKeys,Pe=Ne.halfCheckedKeys,ke=Ne.keyEntities,Je=Ne.disabled,qe=Ne.dragging,it=Ne.dragOverNodeKey,rt=Ne.dropPosition,et=Ne.motion,At=Ne.height,We=Ne.itemHeight,Ge=Ne.virtual,De=Ne.focusable,Te=Ne.activeItem,Oe=Ne.focused,le=Ne.tabIndex,fe=Ne.onKeyDown,Ce=Ne.onFocus,we=Ne.onBlur,Me=Ne.onActiveChange,$e=Ne.onListChangeStart,Ie=Ne.onListChangeEnd,Ye=Object(m.a)(Ne,n),tt=h.useRef(null),at=h.useRef(null);h.useImperativeHandle(Ue,function(){return{scrollTo:function(zt){tt.current.scrollTo(zt)},getIndentWidth:function(){return at.current.offsetWidth}}});var mt=h.useState(re),ft=Object(d.a)(mt,2),Ze=ft[0],yt=ft[1],lt=h.useState(k),gt=Object(d.a)(lt,2),xt=gt[0],bt=gt[1],Ot=h.useState(k),Tt=Object(d.a)(Ot,2),Vt=Tt[0],Zt=Tt[1],ut=h.useState([]),Et=Object(d.a)(ut,2),Lt=Et[0],Ht=Et[1],mr=h.useState(null),_r=Object(d.a)(mr,2),Ar=_r[0],nr=_r[1],Mt=h.useRef(k);Mt.current=k;function sr(){var kt=Mt.current;bt(kt),Zt(kt),Ht([]),nr(null),Ie()}Object(g.a)(function(){yt(re);var kt=r(Ze,re);if(kt.key!==null)if(kt.add){var zt=xt.findIndex(function(nt){var ht=nt.key;return ht===kt.key}),Ae=W(a(xt,k,kt.key),Ge,At,We),se=xt.slice();se.splice(zt+1,0,P),Zt(se),Ht(Ae),nr("show")}else{var pe=k.findIndex(function(nt){var ht=nt.key;return ht===kt.key}),Re=W(a(k,xt,kt.key),Ge,At,We),Ke=k.slice();Ke.splice(pe+1,0,P),Zt(Ke),Ht(Re),nr("hide")}else xt!==k&&(bt(k),Zt(k))},[re,k]),h.useEffect(function(){qe||sr()},[qe]);var Er=et?Vt:k,ur={expandedKeys:re,selectedKeys:te,loadedKeys:ye,loadingKeys:Le,checkedKeys:ae,halfCheckedKeys:Pe,dragOverNodeKey:it,dropPosition:rt,keyEntities:ke};return h.createElement(h.Fragment,null,Oe&&Te&&h.createElement("span",{style:t,"aria-live":"assertive"},J(Te)),h.createElement("div",null,h.createElement("input",{style:t,disabled:De===!1||Je,tabIndex:De!==!1?le:null,onKeyDown:fe,onFocus:Ce,onBlur:we,value:"",onChange:p,"aria-label":"for screen reader"})),h.createElement("div",{className:"".concat(q,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},h.createElement("div",{className:"".concat(q,"-indent")},h.createElement("div",{ref:at,className:"".concat(q,"-indent-unit")}))),h.createElement(S.a,Object(he.a)({},Ye,{data:Er,itemKey:V,height:At,fullHeight:!1,virtual:Ge,itemHeight:We,prefixCls:"".concat(q,"-list"),ref:tt,onVisibleChange:function(zt,Ae){var se=new Set(zt),pe=Ae.filter(function(Re){return!se.has(Re)});pe.some(function(Re){return V(Re)===_})&&sr()}}),function(kt){var zt=kt.pos,Ae=Object(he.a)({},(v(kt.data),kt.data)),se=kt.title,pe=kt.key,Re=kt.isStart,Ke=kt.isEnd,nt=Object(i.f)(pe,zt);delete Ae.key,delete Ae.children;var ht=Object(i.g)(nt,ur);return h.createElement(o,Object(he.a)({},Ae,ht,{title:se,active:!!Te&&pe===Te.key,pos:zt,data:kt.data,isStart:Re,isEnd:Ke,motion:et,motionNodes:pe===_?Lt:null,motionType:Ar,onMotionStart:$e,onMotionEnd:sr,treeNodeRequiredProps:ur,onMouseMove:function(){Me(null)}}))}))});ne.displayName="NodeList";var ce=ne,ie=Q("ju+a"),xe=Q("vqdp"),ge=Q("El5i"),de=10,Fe=function(Ne){Object(e.a)(q,Ne);var Ue=Object(M.a)(q);function q(){var k;Object($.a)(this,q);for(var z=arguments.length,X=new Array(z),re=0;re<z;re++)X[re]=arguments[re];return k=Ue.call.apply(Ue,[this].concat(X)),k.destroyed=!1,k.delayedDragEnterLogic=void 0,k.loadingRetryTimes={},k.state={keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:Object(i.d)()},k.dragStartMousePosition=null,k.dragNode=void 0,k.currentMouseOverDroppableNodeKey=null,k.listRef=h.createRef(),k.onNodeDragStart=function(te,ae){var ye=k.state,Le=ye.expandedKeys,Pe=ye.keyEntities,ke=k.props.onDragStart,Je=ae.props.eventKey;k.dragNode=ae,k.dragStartMousePosition={x:te.clientX,y:te.clientY};var qe=Object(ie.b)(Le,Je);k.setState({draggingNodeKey:Je,dragChildrenKeys:Object(ie.f)(Je,Pe),indent:k.listRef.current.getIndentWidth()}),k.setExpandedKeys(qe),window.addEventListener("dragend",k.onWindowDragEnd),ke==null||ke({event:te,node:Object(i.b)(ae.props)})},k.onNodeDragEnter=function(te,ae){var ye=k.state,Le=ye.expandedKeys,Pe=ye.keyEntities,ke=ye.dragChildrenKeys,Je=ye.flattenNodes,qe=ye.indent,it=k.props,rt=it.onDragEnter,et=it.onExpand,At=it.allowDrop,We=it.direction,Ge=ae.props,De=Ge.pos,Te=Ge.eventKey,Oe=Object(H.a)(k),le=Oe.dragNode;if(k.currentMouseOverDroppableNodeKey!==Te&&(k.currentMouseOverDroppableNodeKey=Te),!le){k.resetDragState();return}var fe=Object(ie.c)(te,le,ae,qe,k.dragStartMousePosition,At,Je,Pe,Le,We),Ce=fe.dropPosition,we=fe.dropLevelOffset,Me=fe.dropTargetKey,$e=fe.dropContainerKey,Ie=fe.dropTargetPos,Ye=fe.dropAllowed,tt=fe.dragOverNodeKey;if(ke.indexOf(Me)!==-1||!Ye){k.resetDragState();return}if(k.delayedDragEnterLogic||(k.delayedDragEnterLogic={}),Object.keys(k.delayedDragEnterLogic).forEach(function(at){clearTimeout(k.delayedDragEnterLogic[at])}),le.props.eventKey!==ae.props.eventKey&&(te.persist(),k.delayedDragEnterLogic[De]=window.setTimeout(function(){if(k.state.draggingNodeKey===null)return;var at=Object(ue.a)(Le),mt=Object(ge.a)(Pe,ae.props.eventKey);mt&&(mt.children||[]).length&&(at=Object(ie.a)(Le,ae.props.eventKey)),"expandedKeys"in k.props||k.setExpandedKeys(at),et==null||et(at,{node:Object(i.b)(ae.props),expanded:!0,nativeEvent:te.nativeEvent})},800)),le.props.eventKey===Me&&we===0){k.resetDragState();return}k.setState({dragOverNodeKey:tt,dropPosition:Ce,dropLevelOffset:we,dropTargetKey:Me,dropContainerKey:$e,dropTargetPos:Ie,dropAllowed:Ye}),rt==null||rt({event:te,node:Object(i.b)(ae.props),expandedKeys:Le})},k.onNodeDragOver=function(te,ae){var ye=k.state,Le=ye.dragChildrenKeys,Pe=ye.flattenNodes,ke=ye.keyEntities,Je=ye.expandedKeys,qe=ye.indent,it=k.props,rt=it.onDragOver,et=it.allowDrop,At=it.direction,We=Object(H.a)(k),Ge=We.dragNode;if(!Ge)return;var De=Object(ie.c)(te,Ge,ae,qe,k.dragStartMousePosition,et,Pe,ke,Je,At),Te=De.dropPosition,Oe=De.dropLevelOffset,le=De.dropTargetKey,fe=De.dropContainerKey,Ce=De.dropAllowed,we=De.dropTargetPos,Me=De.dragOverNodeKey;if(Le.indexOf(le)!==-1||!Ce)return;Ge.props.eventKey===le&&Oe===0?k.state.dropPosition===null&&k.state.dropLevelOffset===null&&k.state.dropTargetKey===null&&k.state.dropContainerKey===null&&k.state.dropTargetPos===null&&k.state.dropAllowed===!1&&k.state.dragOverNodeKey===null||k.resetDragState():Te===k.state.dropPosition&&Oe===k.state.dropLevelOffset&&le===k.state.dropTargetKey&&fe===k.state.dropContainerKey&&we===k.state.dropTargetPos&&Ce===k.state.dropAllowed&&Me===k.state.dragOverNodeKey||k.setState({dropPosition:Te,dropLevelOffset:Oe,dropTargetKey:le,dropContainerKey:fe,dropTargetPos:we,dropAllowed:Ce,dragOverNodeKey:Me}),rt==null||rt({event:te,node:Object(i.b)(ae.props)})},k.onNodeDragLeave=function(te,ae){k.currentMouseOverDroppableNodeKey===ae.props.eventKey&&!te.currentTarget.contains(te.relatedTarget)&&(k.resetDragState(),k.currentMouseOverDroppableNodeKey=null);var ye=k.props.onDragLeave;ye==null||ye({event:te,node:Object(i.b)(ae.props)})},k.onWindowDragEnd=function(te){k.onNodeDragEnd(te,null,!0),window.removeEventListener("dragend",k.onWindowDragEnd)},k.onNodeDragEnd=function(te,ae){var ye=k.props.onDragEnd;k.setState({dragOverNodeKey:null}),k.cleanDragState(),ye==null||ye({event:te,node:Object(i.b)(ae.props)}),k.dragNode=null,window.removeEventListener("dragend",k.onWindowDragEnd)},k.onNodeDrop=function(te,ae){var ye,Le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Pe=k.state,ke=Pe.dragChildrenKeys,Je=Pe.dropPosition,qe=Pe.dropTargetKey,it=Pe.dropTargetPos,rt=Pe.dropAllowed;if(!rt)return;var et=k.props.onDrop;if(k.setState({dragOverNodeKey:null}),k.cleanDragState(),qe===null)return;var At=Object(Ee.a)(Object(Ee.a)({},Object(i.g)(qe,k.getTreeNodeRequiredProps())),{},{active:((ye=k.getActiveItem())===null||ye===void 0?void 0:ye.key)===qe,data:Object(ge.a)(k.state.keyEntities,qe).node}),We=ke.indexOf(qe)!==-1;Object(s.a)(!We,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Ge=Object(ie.h)(it),De={event:te,node:Object(i.b)(At),dragNode:k.dragNode?Object(i.b)(k.dragNode.props):null,dragNodesKeys:[k.dragNode.props.eventKey].concat(ke),dropToGap:Je!==0,dropPosition:Je+Number(Ge[Ge.length-1])};Le||(et==null||et(De)),k.dragNode=null},k.cleanDragState=function(){var te=k.state.draggingNodeKey;te!==null&&k.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),k.dragStartMousePosition=null,k.currentMouseOverDroppableNodeKey=null},k.triggerExpandActionExpand=function(te,ae){var ye=k.state,Le=ye.expandedKeys,Pe=ye.flattenNodes,ke=ae.expanded,Je=ae.key,qe=ae.isLeaf;if(qe||te.shiftKey||te.metaKey||te.ctrlKey)return;var it=Pe.filter(function(et){return et.key===Je})[0],rt=Object(i.b)(Object(Ee.a)(Object(Ee.a)({},Object(i.g)(Je,k.getTreeNodeRequiredProps())),{},{data:it.data}));k.setExpandedKeys(ke?Object(ie.b)(Le,Je):Object(ie.a)(Le,Je)),k.onNodeExpand(te,rt)},k.onNodeClick=function(te,ae){var ye=k.props,Le=ye.onClick,Pe=ye.expandAction;Pe==="click"&&k.triggerExpandActionExpand(te,ae),Le==null||Le(te,ae)},k.onNodeDoubleClick=function(te,ae){var ye=k.props,Le=ye.onDoubleClick,Pe=ye.expandAction;Pe==="doubleClick"&&k.triggerExpandActionExpand(te,ae),Le==null||Le(te,ae)},k.onNodeSelect=function(te,ae){var ye=k.state.selectedKeys,Le=k.state,Pe=Le.keyEntities,ke=Le.fieldNames,Je=k.props,qe=Je.onSelect,it=Je.multiple,rt=ae.selected,et=ae[ke.key],At=!rt;At?it?ye=Object(ie.a)(ye,et):ye=[et]:ye=Object(ie.b)(ye,et);var We=ye.map(function(Ge){var De=Object(ge.a)(Pe,Ge);return De?De.node:null}).filter(function(Ge){return Ge});k.setUncontrolledState({selectedKeys:ye}),qe==null||qe(ye,{event:"select",selected:At,node:ae,selectedNodes:We,nativeEvent:te.nativeEvent})},k.onNodeCheck=function(te,ae,ye){var Le=k.state,Pe=Le.keyEntities,ke=Le.checkedKeys,Je=Le.halfCheckedKeys,qe=k.props,it=qe.checkStrictly,rt=qe.onCheck,et=ae.key,At,We={event:"check",node:ae,checked:ye,nativeEvent:te.nativeEvent};if(it){var Ge=ye?Object(ie.a)(ke,et):Object(ie.b)(ke,et),De=Object(ie.b)(Je,et);At={checked:Ge,halfChecked:De},We.checkedNodes=Ge.map(function(we){return Object(ge.a)(Pe,we)}).filter(function(we){return we}).map(function(we){return we.node}),k.setUncontrolledState({checkedKeys:Ge})}else{var Te=Object(xe.a)([].concat(Object(ue.a)(ke),[et]),!0,Pe),Oe=Te.checkedKeys,le=Te.halfCheckedKeys;if(!ye){var fe=new Set(Oe);fe.delete(et);var Ce=Object(xe.a)(Array.from(fe),{checked:!1,halfCheckedKeys:le},Pe);Oe=Ce.checkedKeys,le=Ce.halfCheckedKeys}At=Oe,We.checkedNodes=[],We.checkedNodesPositions=[],We.halfCheckedKeys=le,Oe.forEach(function(we){var Me=Object(ge.a)(Pe,we);if(!Me)return;var $e=Me.node,Ie=Me.pos;We.checkedNodes.push($e),We.checkedNodesPositions.push({node:$e,pos:Ie})}),k.setUncontrolledState({checkedKeys:Oe},!1,{halfCheckedKeys:le})}rt==null||rt(At,We)},k.onNodeLoad=function(te){var ae=te.key,ye=new Promise(function(Le,Pe){k.setState(function(ke){var Je=ke.loadedKeys,qe=Je===void 0?[]:Je,it=ke.loadingKeys,rt=it===void 0?[]:it,et=k.props,At=et.loadData,We=et.onLoad;if(!At||qe.indexOf(ae)!==-1||rt.indexOf(ae)!==-1)return null;var Ge=At(te);return Ge.then(function(){var De=k.state.loadedKeys,Te=Object(ie.a)(De,ae);We==null||We(Te,{event:"load",node:te}),k.setUncontrolledState({loadedKeys:Te}),k.setState(function(Oe){return{loadingKeys:Object(ie.b)(Oe.loadingKeys,ae)}}),Le()}).catch(function(De){if(k.setState(function(Oe){return{loadingKeys:Object(ie.b)(Oe.loadingKeys,ae)}}),k.loadingRetryTimes[ae]=(k.loadingRetryTimes[ae]||0)+1,k.loadingRetryTimes[ae]>=de){var Te=k.state.loadedKeys;Object(s.a)(!1,"Retry for `loadData` many times but still failed. No more retry."),k.setUncontrolledState({loadedKeys:Object(ie.a)(Te,ae)}),Le()}Pe(De)}),{loadingKeys:Object(ie.a)(rt,ae)}})});return ye.catch(function(){}),ye},k.onNodeMouseEnter=function(te,ae){var ye=k.props.onMouseEnter;ye==null||ye({event:te,node:ae})},k.onNodeMouseLeave=function(te,ae){var ye=k.props.onMouseLeave;ye==null||ye({event:te,node:ae})},k.onNodeContextMenu=function(te,ae){var ye=k.props.onRightClick;ye&&(te.preventDefault(),ye({event:te,node:ae}))},k.onFocus=function(){var te=k.props.onFocus;k.setState({focused:!0});for(var ae=arguments.length,ye=new Array(ae),Le=0;Le<ae;Le++)ye[Le]=arguments[Le];te==null||te.apply(void 0,ye)},k.onBlur=function(){var te=k.props.onBlur;k.setState({focused:!1}),k.onActiveChange(null);for(var ae=arguments.length,ye=new Array(ae),Le=0;Le<ae;Le++)ye[Le]=arguments[Le];te==null||te.apply(void 0,ye)},k.getTreeNodeRequiredProps=function(){var te=k.state,ae=te.expandedKeys,ye=te.selectedKeys,Le=te.loadedKeys,Pe=te.loadingKeys,ke=te.checkedKeys,Je=te.halfCheckedKeys,qe=te.dragOverNodeKey,it=te.dropPosition,rt=te.keyEntities;return{expandedKeys:ae||[],selectedKeys:ye||[],loadedKeys:Le||[],loadingKeys:Pe||[],checkedKeys:ke||[],halfCheckedKeys:Je||[],dragOverNodeKey:qe,dropPosition:it,keyEntities:rt}},k.setExpandedKeys=function(te){var ae=k.state,ye=ae.treeData,Le=ae.fieldNames,Pe=Object(i.e)(ye,te,Le);k.setUncontrolledState({expandedKeys:te,flattenNodes:Pe},!0)},k.onNodeExpand=function(te,ae){var ye=k.state.expandedKeys,Le=k.state,Pe=Le.listChanging,ke=Le.fieldNames,Je=k.props,qe=Je.onExpand,it=Je.loadData,rt=ae.expanded,et=ae[ke.key];if(Pe)return;var At=ye.indexOf(et),We=!rt;if(Object(s.a)(rt&&At!==-1||!rt&&At===-1,"Expand state not sync with index check"),We?ye=Object(ie.a)(ye,et):ye=Object(ie.b)(ye,et),k.setExpandedKeys(ye),qe==null||qe(ye,{node:ae,expanded:We,nativeEvent:te.nativeEvent}),We&&it){var Ge=k.onNodeLoad(ae);Ge&&Ge.then(function(){var De=Object(i.e)(k.state.treeData,ye,ke);k.setUncontrolledState({flattenNodes:De})}).catch(function(){var De=k.state.expandedKeys,Te=Object(ie.b)(De,et);k.setExpandedKeys(Te)})}},k.onListChangeStart=function(){k.setUncontrolledState({listChanging:!0})},k.onListChangeEnd=function(){setTimeout(function(){k.setUncontrolledState({listChanging:!1})})},k.onActiveChange=function(te){var ae=k.state.activeKey,ye=k.props.onActiveChange;if(ae===te)return;k.setState({activeKey:te}),te!==null&&k.scrollTo({key:te}),ye==null||ye(te)},k.getActiveItem=function(){var te=k.state,ae=te.activeKey,ye=te.flattenNodes;return ae===null?null:ye.find(function(Le){var Pe=Le.key;return Pe===ae})||null},k.offsetActiveKey=function(te){var ae=k.state,ye=ae.flattenNodes,Le=ae.activeKey,Pe=ye.findIndex(function(qe){var it=qe.key;return it===Le});Pe===-1&&te<0&&(Pe=ye.length),Pe=(Pe+te+ye.length)%ye.length;var ke=ye[Pe];if(ke){var Je=ke.key;k.onActiveChange(Je)}else k.onActiveChange(null)},k.onKeyDown=function(te){var ae=k.state,ye=ae.activeKey,Le=ae.expandedKeys,Pe=ae.checkedKeys,ke=ae.fieldNames,Je=k.props,qe=Je.onKeyDown,it=Je.checkable,rt=Je.selectable;switch(te.which){case c.a.UP:{k.offsetActiveKey(-1),te.preventDefault();break}case c.a.DOWN:{k.offsetActiveKey(1),te.preventDefault();break}}var et=k.getActiveItem();if(et&&et.data){var At=k.getTreeNodeRequiredProps(),We=et.data.isLeaf===!1||!!(et.data[ke.children]||[]).length,Ge=Object(i.b)(Object(Ee.a)(Object(Ee.a)({},Object(i.g)(ye,At)),{},{data:et.data,active:!0}));switch(te.which){case c.a.LEFT:{We&&Le.includes(ye)?k.onNodeExpand({},Ge):et.parent&&k.onActiveChange(et.parent.key),te.preventDefault();break}case c.a.RIGHT:{We&&!Le.includes(ye)?k.onNodeExpand({},Ge):et.children&&et.children.length&&k.onActiveChange(et.children[0].key),te.preventDefault();break}case c.a.ENTER:case c.a.SPACE:{it&&!Ge.disabled&&Ge.checkable!==!1&&!Ge.disableCheckbox?k.onNodeCheck({},Ge,!Pe.includes(ye)):!it&&rt&&!Ge.disabled&&Ge.selectable!==!1&&k.onNodeSelect({},Ge);break}}}qe==null||qe(te)},k.setUncontrolledState=function(te){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!k.destroyed){var Le=!1,Pe=!0,ke={};Object.keys(te).forEach(function(Je){if(Je in k.props){Pe=!1;return}Le=!0,ke[Je]=te[Je]}),Le&&(!ae||Pe)&&k.setState(Object(Ee.a)(Object(Ee.a)({},ke),ye))}},k.scrollTo=function(te){k.listRef.current.scrollTo(te)},k}return Object(O.a)(q,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var z=this.props.activeKey;z!==void 0&&z!==this.state.activeKey&&(this.setState({activeKey:z}),z!==null&&this.scrollTo({key:z}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var z,X=this.state,re=X.focused,te=X.flattenNodes,ae=X.keyEntities,ye=X.draggingNodeKey,Le=X.activeKey,Pe=X.dropLevelOffset,ke=X.dropContainerKey,Je=X.dropTargetKey,qe=X.dropPosition,it=X.dragOverNodeKey,rt=X.indent,et=this.props,At=et.prefixCls,We=et.className,Ge=et.style,De=et.showLine,Te=et.focusable,Oe=et.tabIndex,le=Oe===void 0?0:Oe,fe=et.selectable,Ce=et.showIcon,we=et.icon,Me=et.switcherIcon,$e=et.draggable,Ie=et.checkable,Ye=et.checkStrictly,tt=et.disabled,at=et.motion,mt=et.loadData,ft=et.filterTreeNode,Ze=et.height,yt=et.itemHeight,lt=et.virtual,gt=et.titleRender,xt=et.dropIndicatorRender,bt=et.onContextMenu,Ot=et.onScroll,Tt=et.direction,Vt=et.rootClassName,Zt=et.rootStyle,ut=Object(l.a)(this.props,{aria:!0,data:!0}),Et;return $e&&(Object(ve.a)($e)==="object"?Et=$e:typeof $e=="function"?Et={nodeDraggable:$e}:Et={}),h.createElement(x.a.Provider,{value:{prefixCls:At,selectable:fe,showIcon:Ce,icon:we,switcherIcon:Me,draggable:Et,draggingNodeKey:ye,checkable:Ie,checkStrictly:Ye,disabled:tt,keyEntities:ae,dropLevelOffset:Pe,dropContainerKey:ke,dropTargetKey:Je,dropPosition:qe,dragOverNodeKey:it,indent:rt,direction:Tt,dropIndicatorRender:xt,loadData:mt,filterTreeNode:ft,titleRender:gt,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},h.createElement("div",{role:"tree",className:N()(At,We,Vt,(z={},Object(be.a)(z,"".concat(At,"-show-line"),De),Object(be.a)(z,"".concat(At,"-focused"),re),Object(be.a)(z,"".concat(At,"-active-focused"),Le!==null),z)),style:Zt},h.createElement(ce,Object(he.a)({ref:this.listRef,prefixCls:At,style:Ge,data:te,disabled:tt,selectable:fe,checkable:!!Ie,motion:at,dragging:ye!==null,height:Ze,itemHeight:yt,virtual:lt,focusable:Te,focused:re,tabIndex:le,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:bt,onScroll:Ot},this.getTreeNodeRequiredProps(),ut))))}}],[{key:"getDerivedStateFromProps",value:function(z,X){var re=X.prevProps,te={prevProps:z};function ae(Te){return!re&&Te in z||re&&re[Te]!==z[Te]}var ye,Le=X.fieldNames;if(ae("fieldNames")&&(Le=Object(i.d)(z.fieldNames),te.fieldNames=Le),ae("treeData")?ye=z.treeData:ae("children")&&(Object(s.a)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),ye=Object(i.c)(z.children)),ye){te.treeData=ye;var Pe=Object(i.a)(ye,{fieldNames:Le});te.keyEntities=Object(Ee.a)(Object(be.a)({},_,F),Pe.keyEntities)}var ke=te.keyEntities||X.keyEntities;if(ae("expandedKeys")||re&&ae("autoExpandParent"))te.expandedKeys=z.autoExpandParent||!re&&z.defaultExpandParent?Object(ie.e)(z.expandedKeys,ke):z.expandedKeys;else if(!re&&z.defaultExpandAll){var Je=Object(Ee.a)({},ke);delete Je[_],te.expandedKeys=Object.keys(Je).map(function(Te){return Je[Te].key})}else!re&&z.defaultExpandedKeys&&(te.expandedKeys=z.autoExpandParent||z.defaultExpandParent?Object(ie.e)(z.defaultExpandedKeys,ke):z.defaultExpandedKeys);if(te.expandedKeys||delete te.expandedKeys,ye||te.expandedKeys){var qe=Object(i.e)(ye||X.treeData,te.expandedKeys||X.expandedKeys,Le);te.flattenNodes=qe}if(z.selectable&&(ae("selectedKeys")?te.selectedKeys=Object(ie.d)(z.selectedKeys,z):!re&&z.defaultSelectedKeys&&(te.selectedKeys=Object(ie.d)(z.defaultSelectedKeys,z))),z.checkable){var it;if(ae("checkedKeys")?it=Object(ie.g)(z.checkedKeys)||{}:!re&&z.defaultCheckedKeys?it=Object(ie.g)(z.defaultCheckedKeys)||{}:ye&&(it=Object(ie.g)(z.checkedKeys)||{checkedKeys:X.checkedKeys,halfCheckedKeys:X.halfCheckedKeys}),it){var rt=it,et=rt.checkedKeys,At=et===void 0?[]:et,We=rt.halfCheckedKeys,Ge=We===void 0?[]:We;if(!z.checkStrictly){var De=Object(xe.a)(At,!0,ke);At=De.checkedKeys,Ge=De.halfCheckedKeys}te.checkedKeys=At,te.halfCheckedKeys=Ge}}return ae("loadedKeys")&&(te.loadedKeys=z.loadedKeys),te}}]),q}(h.Component);Fe.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:E,allowDrop:function(){return!0},expandAction:!1},Fe.TreeNode=u.a;var Qe=Fe,Ve=_e.b=Qe},a3WO:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return he});function he(be,ve){(ve==null||ve>be.length)&&(ve=be.length);for(var Ee=0,ue=new Array(ve);Ee<ve;Ee++)ue[Ee]=be[Ee];return ue}},b3aT:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return he}),Q.d(_e,"b",function(){return ue}),Q.d(_e,"c",function(){return $}),Q.d(_e,"d",function(){return O});function he(H,e){ve(H)&&(H="100%");var M=Ee(H);return H=e===360?H:Math.min(e,Math.max(0,parseFloat(H))),M&&(H=parseInt(String(H*e),10)/100),Math.abs(H-e)<1e-6?1:(e===360?H=(H<0?H%e+e:H%e)/parseFloat(String(e)):H=H%e/parseFloat(String(e)),H)}function be(H){return Math.min(1,Math.max(0,H))}function ve(H){return typeof H=="string"&&H.indexOf(".")!==-1&&parseFloat(H)===1}function Ee(H){return typeof H=="string"&&H.indexOf("%")!==-1}function ue(H){return H=parseFloat(H),(isNaN(H)||H<0||H>1)&&(H=1),H}function $(H){return H<=1?"".concat(Number(H)*100,"%"):H}function O(H){return H.length===1?"0"+H:String(H)}},bdgK:function(dt,_e,Q){"use strict";(function(he){var be=function(){if(typeof Map!="undefined")return Map;function o(r,a){var n=-1;return r.some(function(t,p){return t[0]===a?(n=p,!0):!1}),n}return function(){function r(){this.__entries__=[]}return Object.defineProperty(r.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),r.prototype.get=function(a){var n=o(this.__entries__,a),t=this.__entries__[n];return t&&t[1]},r.prototype.set=function(a,n){var t=o(this.__entries__,a);~t?this.__entries__[t][1]=n:this.__entries__.push([a,n])},r.prototype.delete=function(a){var n=this.__entries__,t=o(n,a);~t&&n.splice(t,1)},r.prototype.has=function(a){return!!~o(this.__entries__,a)},r.prototype.clear=function(){this.__entries__.splice(0)},r.prototype.forEach=function(a,n){n===void 0&&(n=null);for(var t=0,p=this.__entries__;t<p.length;t++){var _=p[t];a.call(n,_[1],_[0])}},r}()}(),ve=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,Ee=function(){return typeof he!="undefined"&&he.Math===Math?he:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),ue=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Ee):function(o){return setTimeout(function(){return o(Date.now())},1e3/60)}}(),$=2;function O(o,r){var a=!1,n=!1,t=0;function p(){a&&(a=!1,o()),n&&f()}function _(){ue(p)}function f(){var F=Date.now();if(a){if(F-t<$)return;n=!0}else a=!0,n=!1,setTimeout(_,r);t=F}return f}var H=20,e=["top","right","bottom","left","width","height","size","weight"],M=typeof MutationObserver!="undefined",D=function(){function o(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=O(this.refresh.bind(this),H)}return o.prototype.addObserver=function(r){~this.observers_.indexOf(r)||this.observers_.push(r),this.connected_||this.connect_()},o.prototype.removeObserver=function(r){var a=this.observers_,n=a.indexOf(r);~n&&a.splice(n,1),!a.length&&this.connected_&&this.disconnect_()},o.prototype.refresh=function(){var r=this.updateObservers_();r&&this.refresh()},o.prototype.updateObservers_=function(){var r=this.observers_.filter(function(a){return a.gatherActive(),a.hasActive()});return r.forEach(function(a){return a.broadcastActive()}),r.length>0},o.prototype.connect_=function(){if(!ve||this.connected_)return;document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),M?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0},o.prototype.disconnect_=function(){if(!ve||!this.connected_)return;document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1},o.prototype.onTransitionEnd_=function(r){var a=r.propertyName,n=a===void 0?"":a,t=e.some(function(p){return!!~n.indexOf(p)});t&&this.refresh()},o.getInstance=function(){return this.instance_||(this.instance_=new o),this.instance_},o.instance_=null,o}(),N=function(o,r){for(var a=0,n=Object.keys(r);a<n.length;a++){var t=n[a];Object.defineProperty(o,t,{value:r[t],enumerable:!1,writable:!1,configurable:!0})}return o},c=function(o){var r=o&&o.ownerDocument&&o.ownerDocument.defaultView;return r||Ee},l=A(0,0,0,0);function s(o){return parseFloat(o)||0}function h(o){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];return r.reduce(function(n,t){var p=o["border-"+t+"-width"];return n+s(p)},0)}function x(o){for(var r=["top","right","bottom","left"],a={},n=0,t=r;n<t.length;n++){var p=t[n],_=o["padding-"+p];a[p]=s(_)}return a}function E(o){var r=o.getBBox();return A(0,0,r.width,r.height)}function v(o){var r=o.clientWidth,a=o.clientHeight;if(!r&&!a)return l;var n=c(o).getComputedStyle(o),t=x(n),p=t.left+t.right,_=t.top+t.bottom,f=s(n.width),F=s(n.height);if(n.boxSizing==="border-box"&&(Math.round(f+p)!==r&&(f-=h(n,"left","right")+p),Math.round(F+_)!==a&&(F-=h(n,"top","bottom")+_)),!m(o)){var P=Math.round(f+p)-r,W=Math.round(F+_)-a;Math.abs(P)!==1&&(f-=P),Math.abs(W)!==1&&(F-=W)}return A(t.left,t.top,f,F)}var d=function(){return typeof SVGGraphicsElement!="undefined"?function(o){return o instanceof c(o).SVGGraphicsElement}:function(o){return o instanceof c(o).SVGElement&&typeof o.getBBox=="function"}}();function m(o){return o===c(o).document.documentElement}function g(o){return ve?d(o)?E(o):v(o):l}function S(o){var r=o.x,a=o.y,n=o.width,t=o.height,p=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,_=Object.create(p.prototype);return N(_,{x:r,y:a,width:n,height:t,top:a,right:r+n,bottom:t+a,left:r}),_}function A(o,r,a,n){return{x:o,y:r,width:a,height:n}}var u=function(){function o(r){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=A(0,0,0,0),this.target=r}return o.prototype.isActive=function(){var r=g(this.target);return this.contentRect_=r,r.width!==this.broadcastWidth||r.height!==this.broadcastHeight},o.prototype.broadcastRect=function(){var r=this.contentRect_;return this.broadcastWidth=r.width,this.broadcastHeight=r.height,r},o}(),R=function(){function o(r,a){var n=S(a);N(this,{target:r,contentRect:n})}return o}(),i=function(){function o(r,a,n){if(this.activeObservations_=[],this.observations_=new be,typeof r!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=r,this.controller_=a,this.callbackCtx_=n}return o.prototype.observe=function(r){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element=="undefined"||!(Element instanceof Object))return;if(!(r instanceof c(r).Element))throw new TypeError('parameter 1 is not of type "Element".');var a=this.observations_;if(a.has(r))return;a.set(r,new u(r)),this.controller_.addObserver(this),this.controller_.refresh()},o.prototype.unobserve=function(r){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element=="undefined"||!(Element instanceof Object))return;if(!(r instanceof c(r).Element))throw new TypeError('parameter 1 is not of type "Element".');var a=this.observations_;if(!a.has(r))return;a.delete(r),a.size||this.controller_.removeObserver(this)},o.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},o.prototype.gatherActive=function(){var r=this;this.clearActive(),this.observations_.forEach(function(a){a.isActive()&&r.activeObservations_.push(a)})},o.prototype.broadcastActive=function(){if(!this.hasActive())return;var r=this.callbackCtx_,a=this.activeObservations_.map(function(n){return new R(n.target,n.broadcastRect())});this.callback_.call(r,a,r),this.clearActive()},o.prototype.clearActive=function(){this.activeObservations_.splice(0)},o.prototype.hasActive=function(){return this.activeObservations_.length>0},o}(),T=typeof WeakMap!="undefined"?new WeakMap:new be,w=function(){function o(r){if(!(this instanceof o))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var a=D.getInstance(),n=new i(r,a,this);T.set(this,n)}return o}();["observe","unobserve","disconnect"].forEach(function(o){w.prototype[o]=function(){var r;return(r=T.get(this))[o].apply(r,arguments)}});var y=function(){return typeof Ee.ResizeObserver!="undefined"?Ee.ResizeObserver:w}();_e.a=y}).call(this,Q("IGO8"))},c27x:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return ve});var he=Q("T/Jt"),be=Q.n(he),ve=he.createContext(null)},cDf5:function(dt,_e){function Q(he){return dt.exports=Q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(be){return typeof be}:function(be){return be&&typeof Symbol=="function"&&be.constructor===Symbol&&be!==Symbol.prototype?"symbol":typeof be},dt.exports.__esModule=!0,dt.exports.default=dt.exports,Q(he)}dt.exports=Q,dt.exports.__esModule=!0,dt.exports.default=dt.exports},crp1:function(dt,_e,Q){"use strict";Q.d(_e,"b",function(){return gt}),Q.d(_e,"a",function(){return Tt});var he={},be=function(Ae,se,pe,Re,Ke){var nt=he[se]||(he[se]=URL.createObjectURL(new Blob([Ae],{type:"text/javascript"}))),ht=new Worker(nt);return ht.onerror=function(vt){return Ke(vt.error,null)},ht.onmessage=function(vt){return Ke(null,vt.data)},ht.postMessage(pe,Re),ht},ve=Uint8Array,Ee=Uint16Array,ue=Uint32Array,$=new ve([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),O=new ve([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),H=new ve([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),e=function(Ae,se){for(var pe=new Ee(31),Re=0;Re<31;++Re)pe[Re]=se+=1<<Ae[Re-1];for(var Ke=new ue(pe[30]),Re=1;Re<30;++Re)for(var nt=pe[Re];nt<pe[Re+1];++nt)Ke[nt]=nt-pe[Re]<<5|Re;return[pe,Ke]},M=e($,2),D=M[0],N=M[1];D[28]=258,N[258]=28;for(var c=e(O,0),l=c[0],s=c[1],h=new Ee(32768),x=0;x<32768;++x){var E=(x&43690)>>>1|(x&21845)<<1;E=(E&52428)>>>2|(E&13107)<<2,E=(E&61680)>>>4|(E&3855)<<4,h[x]=((E&65280)>>>8|(E&255)<<8)>>>1}for(var v=function(Ae,se,pe){for(var Re=Ae.length,Ke=0,nt=new Ee(se);Ke<Re;++Ke)++nt[Ae[Ke]-1];var ht=new Ee(se);for(Ke=0;Ke<se;++Ke)ht[Ke]=ht[Ke-1]+nt[Ke-1]<<1;var vt;if(pe){vt=new Ee(1<<se);var K=15-se;for(Ke=0;Ke<Re;++Ke)if(Ae[Ke])for(var b=Ke<<4|Ae[Ke],B=se-Ae[Ke],j=ht[Ae[Ke]-1]++<<B,Z=j|(1<<B)-1;j<=Z;++j)vt[h[j]>>>K]=b}else for(vt=new Ee(Re),Ke=0;Ke<Re;++Ke)vt[Ke]=h[ht[Ae[Ke]-1]++]>>>15-Ae[Ke];return vt},d=new ve(288),x=0;x<144;++x)d[x]=8;for(var x=144;x<256;++x)d[x]=9;for(var x=256;x<280;++x)d[x]=7;for(var x=280;x<288;++x)d[x]=8;for(var m=new ve(32),x=0;x<32;++x)m[x]=5;var g=v(d,9,0),S=v(d,9,1),A=v(m,5,0),u=v(m,5,1),R=function(Ae){for(var se=Ae[0],pe=1;pe<Ae.length;++pe)Ae[pe]>se&&(se=Ae[pe]);return se},i=function(Ae,se,pe){var Re=se/8>>0;return(Ae[Re]|Ae[Re+1]<<8)>>>(se&7)&pe},T=function(Ae,se){var pe=se/8>>0;return(Ae[pe]|Ae[pe+1]<<8|Ae[pe+2]<<16)>>>(se&7)},w=function(Ae){return(Ae/8>>0)+(Ae&7&&1)},y=function(Ae,se,pe){(se==null||se<0)&&(se=0),(pe==null||pe>Ae.length)&&(pe=Ae.length);var Re=new(Ae instanceof Ee?Ee:Ae instanceof ue?ue:ve)(pe-se);return Re.set(Ae.subarray(se,pe)),Re},o=function(Ae,se,pe){var Re=Ae.length,Ke=!se||pe,nt=!pe||pe.i;pe||(pe={}),se||(se=new ve(Re*3));var ht=function(cr){var Or=se.length;if(cr>Or){var ir=new ve(Math.max(Or*2,cr));ir.set(se),se=ir}},vt=pe.f||0,K=pe.p||0,b=pe.b||0,B=pe.l,j=pe.d,Z=pe.m,G=pe.n,oe=Re*8;do{if(!B){pe.f=vt=i(Ae,K,1);var He=i(Ae,K+1,3);if(K+=3,He)if(He==1)B=S,j=u,Z=9,G=5;else if(He==2){var pt=i(Ae,K,31)+257,wt=i(Ae,K+10,15)+4,Kt=pt+i(Ae,K+5,31)+1;K+=14;for(var rr=new ve(Kt),Wt=new ve(19),Bt=0;Bt<wt;++Bt)Wt[H[Bt]]=i(Ae,K+Bt*3,7);K+=wt*3;var fr=R(Wt),qt=(1<<fr)-1;if(!nt&&K+Kt*(fr+7)>oe)break;for(var Lr=v(Wt,fr,1),Bt=0;Bt<Kt;){var gr=Lr[i(Ae,K,qt)];K+=gr&15;var ct=gr>>>4;if(ct<16)rr[Bt++]=ct;else{var er=0,Sr=0;for(ct==16?(Sr=3+i(Ae,K,3),K+=2,er=rr[Bt-1]):ct==17?(Sr=3+i(Ae,K,7),K+=3):ct==18&&(Sr=11+i(Ae,K,127),K+=7);Sr--;)rr[Bt++]=er}}var xr=rr.subarray(0,pt),Rr=rr.subarray(pt);Z=R(xr),G=R(Rr),B=v(xr,Z,1),j=v(Rr,G,1)}else throw"invalid block type";else{var ct=w(K)+4,_t=Ae[ct-4]|Ae[ct-3]<<8,Xe=ct+_t;if(Xe>Re){if(nt)throw"unexpected EOF";break}Ke&&ht(b+_t),se.set(Ae.subarray(ct,Xe),b),pe.b=b+=_t,pe.p=K=Xe*8;continue}if(K>oe)throw"unexpected EOF"}Ke&&ht(b+131072);for(var lr=(1<<Z)-1,Fr=(1<<G)-1,Kr=Z+G+18;nt||K+Kr<oe;){var er=B[T(Ae,K)&lr],Pr=er>>>4;if(K+=er&15,K>oe)throw"unexpected EOF";if(!er)throw"invalid length/literal";if(Pr<256)se[b++]=Pr;else if(Pr==256){B=null;break}else{var Ir=Pr-254;if(Pr>264){var Bt=Pr-257,yr=$[Bt];Ir=i(Ae,K,(1<<yr)-1)+D[Bt],K+=yr}var Ur=j[T(Ae,K)&Fr],Nr=Ur>>>4;if(!Ur)throw"invalid distance";K+=Ur&15;var Rr=l[Nr];if(Nr>3){var yr=O[Nr];Rr+=T(Ae,K)&(1<<yr)-1,K+=yr}if(K>oe)throw"unexpected EOF";Ke&&ht(b+131072);for(var dr=b+Ir;b<dr;b+=4)se[b]=se[b-Rr],se[b+1]=se[b+1-Rr],se[b+2]=se[b+2-Rr],se[b+3]=se[b+3-Rr];b=dr}}pe.l=B,pe.p=K,pe.b=b,B&&(vt=1,pe.m=Z,pe.d=j,pe.n=G)}while(!vt);return b==se.length?se:y(se,0,b)},r=function(Ae,se,pe){pe<<=se&7;var Re=se/8>>0;Ae[Re]|=pe,Ae[Re+1]|=pe>>>8},a=function(Ae,se,pe){pe<<=se&7;var Re=se/8>>0;Ae[Re]|=pe,Ae[Re+1]|=pe>>>8,Ae[Re+2]|=pe>>>16},n=function(Ae,se){for(var pe=[],Re=0;Re<Ae.length;++Re)Ae[Re]&&pe.push({s:Re,f:Ae[Re]});var Ke=pe.length,nt=pe.slice();if(!Ke)return[new ve(0),0];if(Ke==1){var ht=new ve(pe[0].s+1);return ht[pe[0].s]=1,[ht,1]}pe.sort(function(Kt,rr){return Kt.f-rr.f}),pe.push({s:-1,f:25001});var vt=pe[0],K=pe[1],b=0,B=1,j=2;for(pe[0]={s:-1,f:vt.f+K.f,l:vt,r:K};B!=Ke-1;)vt=pe[pe[b].f<pe[j].f?b++:j++],K=pe[b!=B&&pe[b].f<pe[j].f?b++:j++],pe[B++]={s:-1,f:vt.f+K.f,l:vt,r:K};for(var Z=nt[0].s,Re=1;Re<Ke;++Re)nt[Re].s>Z&&(Z=nt[Re].s);var G=new Ee(Z+1),oe=t(pe[B-1],G,0);if(oe>se){var Re=0,He=0,ct=oe-se,_t=1<<ct;for(nt.sort(function(rr,Wt){return G[Wt.s]-G[rr.s]||rr.f-Wt.f});Re<Ke;++Re){var Xe=nt[Re].s;if(G[Xe]>se)He+=_t-(1<<oe-G[Xe]),G[Xe]=se;else break}for(He>>>=ct;He>0;){var pt=nt[Re].s;G[pt]<se?He-=1<<se-G[pt]++-1:++Re}for(;Re>=0&&He;--Re){var wt=nt[Re].s;G[wt]==se&&(--G[wt],++He)}oe=se}return[new ve(G),oe]},t=function(Ae,se,pe){return Ae.s==-1?Math.max(t(Ae.l,se,pe+1),t(Ae.r,se,pe+1)):se[Ae.s]=pe},p=function(Ae){for(var se=Ae.length;se&&!Ae[--se];);for(var pe=new Ee(++se),Re=0,Ke=Ae[0],nt=1,ht=function(K){pe[Re++]=K},vt=1;vt<=se;++vt)if(Ae[vt]==Ke&&vt!=se)++nt;else{if(!Ke&&nt>2){for(;nt>138;nt-=138)ht(32754);nt>2&&(ht(nt>10?nt-11<<5|28690:nt-3<<5|12305),nt=0)}else if(nt>3){for(ht(Ke),--nt;nt>6;nt-=6)ht(8304);nt>2&&(ht(nt-3<<5|8208),nt=0)}for(;nt--;)ht(Ke);nt=1,Ke=Ae[vt]}return[pe.subarray(0,Re),se]},_=function(Ae,se){for(var pe=0,Re=0;Re<se.length;++Re)pe+=Ae[Re]*se[Re];return pe},f=function(Ae,se,pe){var Re=pe.length,Ke=w(se+2);Ae[Ke]=Re&255,Ae[Ke+1]=Re>>>8,Ae[Ke+2]=Ae[Ke]^255,Ae[Ke+3]=Ae[Ke+1]^255;for(var nt=0;nt<Re;++nt)Ae[Ke+nt+4]=pe[nt];return(Ke+4+Re)*8},F=function(Ae,se,pe,Re,Ke,nt,ht,vt,K,b,B){r(se,B++,pe),++Ke[256];for(var j=n(Ke,15),Z=j[0],G=j[1],oe=n(nt,15),He=oe[0],ct=oe[1],_t=p(Z),Xe=_t[0],pt=_t[1],wt=p(He),Kt=wt[0],rr=wt[1],Wt=new Ee(19),Bt=0;Bt<Xe.length;++Bt)Wt[Xe[Bt]&31]++;for(var Bt=0;Bt<Kt.length;++Bt)Wt[Kt[Bt]&31]++;for(var fr=n(Wt,7),qt=fr[0],Lr=fr[1],gr=19;gr>4&&!qt[H[gr-1]];--gr);var er=b+5<<3,Sr=_(Ke,d)+_(nt,m)+ht,xr=_(Ke,Z)+_(nt,He)+ht+14+3*gr+_(Wt,qt)+(2*Wt[16]+3*Wt[17]+7*Wt[18]);if(er<=Sr&&er<=xr)return f(se,B,Ae.subarray(K,K+b));var Rr,lr,Fr,Kr;if(r(se,B,1+(xr<Sr)),B+=2,xr<Sr){Rr=v(Z,G,0),lr=Z,Fr=v(He,ct,0),Kr=He;var Pr=v(qt,Lr,0);r(se,B,pt-257),r(se,B+5,rr-1),r(se,B+10,gr-4),B+=14;for(var Bt=0;Bt<gr;++Bt)r(se,B+3*Bt,qt[H[Bt]]);B+=3*gr;for(var Ir=[Xe,Kt],yr=0;yr<2;++yr)for(var Ur=Ir[yr],Bt=0;Bt<Ur.length;++Bt){var Nr=Ur[Bt]&31;r(se,B,Pr[Nr]),B+=qt[Nr],Nr>15&&(r(se,B,Ur[Bt]>>>5&127),B+=Ur[Bt]>>>12)}}else Rr=g,lr=d,Fr=A,Kr=m;for(var Bt=0;Bt<vt;++Bt)if(Re[Bt]>255){var Nr=Re[Bt]>>>18&31;a(se,B,Rr[Nr+257]),B+=lr[Nr+257],Nr>7&&(r(se,B,Re[Bt]>>>23&31),B+=$[Nr]);var dr=Re[Bt]&31;a(se,B,Fr[dr]),B+=Kr[dr],dr>3&&(a(se,B,Re[Bt]>>>5&8191),B+=O[dr])}else a(se,B,Rr[Re[Bt]]),B+=lr[Re[Bt]];return a(se,B,Rr[256]),B+lr[256]},P=new ue([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),W=new ve(0),V=function(Ae,se,pe,Re,Ke,nt){var ht=Ae.length,vt=new ve(Re+ht+5*(1+Math.floor(ht/7e3))+Ke),K=vt.subarray(Re,vt.length-Ke),b=0;if(!se||ht<8)for(var B=0;B<=ht;B+=65535){var j=B+65535;j<ht?b=f(K,b,Ae.subarray(B,j)):(K[B]=nt,b=f(K,b,Ae.subarray(B,ht)))}else{for(var Z=P[se-1],G=Z>>>13,oe=Z&8191,He=(1<<pe)-1,ct=new Ee(32768),_t=new Ee(He+1),Xe=Math.ceil(pe/3),pt=2*Xe,wt=function(Qt){return(Ae[Qt]^Ae[Qt+1]<<Xe^Ae[Qt+2]<<pt)&He},Kt=new ue(25e3),rr=new Ee(288),Wt=new Ee(32),Bt=0,fr=0,B=0,qt=0,Lr=0,gr=0;B<ht;++B){var er=wt(B),Sr=B&32767,xr=_t[er];if(ct[Sr]=xr,_t[er]=Sr,Lr<=B){var Rr=ht-B;if((Bt>7e3||qt>24576)&&Rr>423){b=F(Ae,K,0,Kt,rr,Wt,fr,qt,gr,B-gr,b),qt=Bt=fr=0,gr=B;for(var lr=0;lr<286;++lr)rr[lr]=0;for(var lr=0;lr<30;++lr)Wt[lr]=0}var Fr=2,Kr=0,Pr=oe,Ir=Sr-xr&32767;if(Rr>2&&er==wt(B-Ir))for(var yr=Math.min(G,Rr)-1,Ur=Math.min(32767,B),Nr=Math.min(258,Rr);Ir<=Ur&&--Pr&&Sr!=xr;){if(Ae[B+Fr]==Ae[B+Fr-Ir]){for(var dr=0;dr<Nr&&Ae[B+dr]==Ae[B+dr-Ir];++dr);if(dr>Fr){if(Fr=dr,Kr=Ir,dr>yr)break;for(var cr=Math.min(Ir,dr-2),Or=0,lr=0;lr<cr;++lr){var ir=B-Ir+lr+32768&32767,jr=ct[ir],jt=ir-jr+32768&32767;jt>Or&&(Or=jt,xr=ir)}}}Sr=xr,xr=ct[Sr],Ir+=Sr-xr+32768&32767}if(Kr){Kt[qt++]=268435456|N[Fr]<<18|s[Kr];var Yt=N[Fr]&31,Dt=s[Kr]&31;fr+=$[Yt]+O[Dt],++rr[257+Yt],++Wt[Dt],Lr=B+Fr,++Bt}else Kt[qt++]=Ae[B],++rr[Ae[B]]}}b=F(Ae,K,nt,Kt,rr,Wt,fr,qt,gr,B-gr,b),nt||(b=f(K,b,W))}return y(vt,0,Re+w(b)+Ke)},J=function(){for(var Ae=new ue(256),se=0;se<256;++se){for(var pe=se,Re=9;--Re;)pe=(pe&1&&3988292384)^pe>>>1;Ae[se]=pe}return Ae}(),ne=function(){var Ae=4294967295;return{p:function(se){for(var pe=Ae,Re=0;Re<se.length;++Re)pe=J[pe&255^se[Re]]^pe>>>8;Ae=pe},d:function(){return Ae^4294967295}}},ce=function(){var Ae=1,se=0;return{p:function(pe){for(var Re=Ae,Ke=se,nt=pe.length,ht=0;ht!=nt;){for(var vt=Math.min(ht+5552,nt);ht<vt;++ht)Re+=pe[ht],Ke+=Re;Re%=65521,Ke%=65521}Ae=Re,se=Ke},d:function(){return(Ae>>>8<<16|(se&255)<<8|se>>>8)+((Ae&255)<<23)*2}}},ie=function(Ae,se,pe,Re,Ke){return V(Ae,se.level==null?6:se.level,se.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(Ae.length)))*1.5):12+se.mem,pe,Re,!Ke)},xe=function(Ae,se){var pe={};for(var Re in Ae)pe[Re]=Ae[Re];for(var Re in se)pe[Re]=se[Re];return pe},ge=function(Ae,se,pe){for(var Re=Ae(),Ke=Ae.toString(),nt=Ke.slice(Ke.indexOf("[")+1,Ke.lastIndexOf("]")).replace(/ /g,"").split(","),ht=0;ht<Re.length;++ht){var vt=Re[ht],K=nt[ht];if(typeof vt=="function"){se+=";"+K+"=";var b=vt.toString();if(vt.prototype)if(b.indexOf("[native code]")!=-1){var B=b.indexOf(" ",8)+1;se+=b.slice(B,b.indexOf("(",B))}else{se+=b;for(var j in vt.prototype)se+=";"+K+".prototype."+j+"="+vt.prototype[j].toString()}else se+=b}else pe[K]=vt}return[se,pe]},de=[],Fe=function(Ae){var se=[];for(var pe in Ae)(Ae[pe]instanceof ve||Ae[pe]instanceof Ee||Ae[pe]instanceof ue)&&se.push((Ae[pe]=new Ae[pe].constructor(Ae[pe])).buffer);return se},Qe=function(Ae,se,pe,Re){var Ke;if(!de[pe]){for(var nt="",ht={},vt=Ae.length-1,K=0;K<vt;++K)Ke=ge(Ae[K],nt,ht),nt=Ke[0],ht=Ke[1];de[pe]=ge(Ae[vt],nt,ht)}var b=xe({},de[pe][1]);return be(de[pe][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+se.toString()+"}",pe,b,Fe(b),Re)},Ve=function(){return[ve,Ee,ue,$,O,H,D,l,S,u,h,v,R,i,T,w,y,o,we,X,re]},Ne=function(){return[ve,Ee,ue,$,O,H,N,s,g,d,A,m,h,P,W,v,r,a,n,t,p,_,f,F,w,y,V,ie,Oe,X]},Ue=function(){return[Je,rt,ke,ne,J]},q=function(){return[qe,it]},k=function(){return[et,ke,ce]},z=function(){return[At]},X=function(Ae){return postMessage(Ae,[Ae.buffer])},re=function(Ae){return Ae&&Ae.size&&new ve(Ae.size)},te=function(Ae,se,pe,Re,Ke,nt){var ht=Qe(pe,Re,Ke,function(vt,K){ht.terminate(),nt(vt,K)});return se.consume||(Ae=new ve(Ae)),ht.postMessage([Ae,se],[Ae.buffer]),function(){ht.terminate()}},ae=function(Ae){return Ae.ondata=function(se,pe){return postMessage([se,pe],[se.buffer])},function(se){return Ae.push(se.data[0],se.data[1])}},ye=function(Ae,se,pe,Re,Ke){var nt,ht=Qe(Ae,Re,Ke,function(vt,K){vt?(ht.terminate(),se.ondata.call(se,vt)):(K[1]&&ht.terminate(),se.ondata.call(se,vt,K[0],K[1]))});ht.postMessage(pe),se.push=function(vt,K){if(nt)throw"stream finished";if(!se.ondata)throw"no stream handler";ht.postMessage([vt,nt=K],[vt.buffer])},se.terminate=function(){ht.terminate()}},Le=function(Ae,se){return Ae[se]|Ae[se+1]<<8},Pe=function(Ae,se){return(Ae[se]|Ae[se+1]<<8|Ae[se+2]<<16)+(Ae[se+3]<<23)*2},ke=function(Ae,se,pe){for(;pe;++se)Ae[se]=pe,pe>>>=8},Je=function(Ae,se){var pe=se.filename;if(Ae[0]=31,Ae[1]=139,Ae[2]=8,Ae[8]=se.level<2?4:se.level==9?2:0,Ae[9]=3,se.mtime!=0&&ke(Ae,4,Math.floor(new Date(se.mtime||Date.now())/1e3)),pe){Ae[3]=8;for(var Re=0;Re<=pe.length;++Re)Ae[Re+10]=pe.charCodeAt(Re)}},qe=function(Ae){if(Ae[0]!=31||Ae[1]!=139||Ae[2]!=8)throw"invalid gzip data";var se=Ae[3],pe=10;se&4&&(pe+=Ae[10]|(Ae[11]<<8)+2);for(var Re=(se>>3&1)+(se>>4&1);Re>0;Re-=!Ae[pe++]);return pe+(se&2)},it=function(Ae){var se=Ae.length;return(Ae[se-4]|Ae[se-3]<<8|Ae[se-2]<<16)+2*(Ae[se-1]<<23)},rt=function(Ae){return 10+(Ae.filename&&Ae.filename.length+1||0)},et=function(Ae,se){var pe=se.level,Re=pe==0?0:pe<6?1:pe==9?3:2;Ae[0]=120,Ae[1]=Re<<6|(Re?32-2*Re:1)},At=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 We(Ae,se){return!se&&typeof Ae=="function"&&(se=Ae,Ae={}),this.ondata=se,Ae}var Ge=function(){function Ae(se,pe){!pe&&typeof se=="function"&&(pe=se,se={}),this.ondata=pe,this.o=se||{}}return Ae.prototype.p=function(se,pe){this.ondata(ie(se,this.o,0,0,!pe),pe)},Ae.prototype.push=function(se,pe){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";this.d=pe,this.p(se,pe||!1)},Ae}(),De=function(){function Ae(se,pe){ye([Ne,function(){return[ae,Ge]}],this,We.call(this,se,pe),function(Re){var Ke=new Ge(Re.data);onmessage=ae(Ke)},6)}return Ae}();function Te(Ae,se,pe){if(pe||(pe=se,se={}),typeof pe!="function")throw"no callback";return te(Ae,se,[Ne],function(Re){return X(Oe(Re.data[0],Re.data[1]))},0,pe)}function Oe(Ae,se){return se===void 0&&(se={}),ie(Ae,se,0,0)}var le=function(){function Ae(se){this.s={},this.p=new ve(0),this.ondata=se}return Ae.prototype.e=function(se){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";var pe=this.p.length,Re=new ve(pe+se.length);Re.set(this.p),Re.set(se,pe),this.p=Re},Ae.prototype.c=function(se){this.d=this.s.i=se||!1;var pe=this.s.b,Re=o(this.p,this.o,this.s);this.ondata(y(Re,pe,this.s.b),this.d),this.o=y(Re,this.s.b-32768),this.s.b=this.o.length,this.p=y(this.p,this.s.p/8>>0),this.s.p&=7},Ae.prototype.push=function(se,pe){this.e(se),this.c(pe)},Ae}(),fe=function(){function Ae(se){this.ondata=se,ye([Ve,function(){return[ae,le]}],this,0,function(){var pe=new le;onmessage=ae(pe)},7)}return Ae}();function Ce(Ae,se,pe){if(pe||(pe=se,se={}),typeof pe!="function")throw"no callback";return te(Ae,se,[Ve],function(Re){return X(we(Re.data[0],re(Re.data[1])))},1,pe)}function we(Ae,se){return o(Ae,se)}var Me=function(){function Ae(se,pe){this.c=ne(),this.l=0,this.v=1,Ge.call(this,se,pe)}return Ae.prototype.push=function(se,pe){Ge.prototype.push.call(this,se,pe)},Ae.prototype.p=function(se,pe){this.c.p(se),this.l+=se.length;var Re=ie(se,this.o,this.v&&rt(this.o),pe&&8,!pe);this.v&&(Je(Re,this.o),this.v=0),pe&&(ke(Re,Re.length-8,this.c.d()),ke(Re,Re.length-4,this.l)),this.ondata(Re,pe)},Ae}(),$e=function(){function Ae(se,pe){ye([Ne,Ue,function(){return[ae,Ge,Me]}],this,We.call(this,se,pe),function(Re){var Ke=new Me(Re.data);onmessage=ae(Ke)},8)}return Ae}();function Ie(Ae,se,pe){if(pe||(pe=se,se={}),typeof pe!="function")throw"no callback";return te(Ae,se,[Ne,Ue,function(){return[Ye]}],function(Re){return X(Ye(Re.data[0],Re.data[1]))},2,pe)}function Ye(Ae,se){se===void 0&&(se={});var pe=ne(),Re=Ae.length;pe.p(Ae);var Ke=ie(Ae,se,rt(se),8),nt=Ke.length;return Je(Ke,se),ke(Ke,nt-8,pe.d()),ke(Ke,nt-4,Re),Ke}var tt=function(){function Ae(se){this.v=1,le.call(this,se)}return Ae.prototype.push=function(se,pe){if(le.prototype.e.call(this,se),this.v){var Re=qe(this.p);if(Re>=this.p.length&&!pe)return;this.p=this.p.subarray(Re),this.v=0}if(pe){if(this.p.length<8)throw"invalid gzip stream";this.p=this.p.subarray(0,-8)}le.prototype.c.call(this,pe)},Ae}(),at=function(){function Ae(se){this.ondata=se,ye([Ve,q,function(){return[ae,le,tt]}],this,0,function(){var pe=new tt;onmessage=ae(pe)},9)}return Ae}();function mt(Ae,se,pe){if(pe||(pe=se,se={}),typeof pe!="function")throw"no callback";return te(Ae,se,[Ve,q,function(){return[ft]}],function(Re){return X(ft(Re.data[0]))},3,pe)}function ft(Ae,se){return o(Ae.subarray(qe(Ae),-8),se||new ve(it(Ae)))}var Ze=function(){function Ae(se,pe){this.c=ce(),this.v=1,Ge.call(this,se,pe)}return Ae.prototype.push=function(se,pe){Ge.prototype.push.call(this,se,pe)},Ae.prototype.p=function(se,pe){this.c.p(se);var Re=ie(se,this.o,this.v&&2,pe&&4,!pe);this.v&&(et(Re,this.o),this.v=0),pe&&ke(Re,Re.length-4,this.c.d()),this.ondata(Re,pe)},Ae}(),yt=function(){function Ae(se,pe){ye([Ne,k,function(){return[ae,Ge,Ze]}],this,We.call(this,se,pe),function(Re){var Ke=new Ze(Re.data);onmessage=ae(Ke)},10)}return Ae}();function lt(Ae,se,pe){if(pe||(pe=se,se={}),typeof pe!="function")throw"no callback";return te(Ae,se,[Ne,k,function(){return[gt]}],function(Re){return X(gt(Re.data[0],Re.data[1]))},4,pe)}function gt(Ae,se){se===void 0&&(se={});var pe=ce();pe.p(Ae);var Re=ie(Ae,se,2,4);return et(Re,se),ke(Re,Re.length-4,pe.d()),Re}var xt=function(){function Ae(se){this.v=1,le.call(this,se)}return Ae.prototype.push=function(se,pe){if(le.prototype.e.call(this,se),this.v){if(this.p.length<2&&!pe)return;this.p=this.p.subarray(2),this.v=0}if(pe){if(this.p.length<4)throw"invalid zlib stream";this.p=this.p.subarray(0,-4)}le.prototype.c.call(this,pe)},Ae}(),bt=function(){function Ae(se){this.ondata=se,ye([Ve,z,function(){return[ae,le,xt]}],this,0,function(){var pe=new xt;onmessage=ae(pe)},11)}return Ae}();function Ot(Ae,se,pe){if(pe||(pe=se,se={}),typeof pe!="function")throw"no callback";return te(Ae,se,[Ve,z,function(){return[Tt]}],function(Re){return X(Tt(Re.data[0],re(Re.data[1])))},5,pe)}function Tt(Ae,se){return o((At(Ae),Ae.subarray(2,-4)),se)}var Vt=function(){function Ae(se){this.G=tt,this.I=le,this.Z=xt,this.ondata=se}return Ae.prototype.push=function(se,pe){if(!this.ondata)throw"no stream handler";if(this.s)this.s.push(se,pe);else{if(this.p&&this.p.length){var Re=new ve(this.p.length+se.length);Re.set(this.p),Re.set(se,this.p.length)}else this.p=se;if(this.p.length>2){var Ke=this,nt=function(){Ke.ondata.apply(Ke,arguments)};this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(nt):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(nt):new this.Z(nt),this.s.push(this.p,pe),this.p=null}}},Ae}(),Zt=function(){function Ae(se){this.G=at,this.I=fe,this.Z=bt,this.ondata=se}return Ae.prototype.push=function(se,pe){Vt.prototype.push.call(this,se,pe)},Ae}();function ut(Ae,se,pe){if(pe||(pe=se,se={}),typeof pe!="function")throw"no callback";return Ae[0]==31&&Ae[1]==139&&Ae[2]==8?mt(Ae,se,pe):(Ae[0]&15)!=8||Ae[0]>>4>7||(Ae[0]<<8|Ae[1])%31?Ce(Ae,se,pe):Ot(Ae,se,pe)}function Et(Ae,se){return Ae[0]==31&&Ae[1]==139&&Ae[2]==8?ft(Ae,se):(Ae[0]&15)!=8||Ae[0]>>4>7||(Ae[0]<<8|Ae[1])%31?we(Ae,se):Tt(Ae,se)}var Lt=function(Ae,se,pe,Re){for(var Ke in Ae){var nt=Ae[Ke],ht=se+Ke;nt instanceof ve?pe[ht]=[nt,Re]:Array.isArray(nt)?pe[ht]=[nt[0],xe(Re,nt[1])]:Lt(nt,ht+"/",pe,Re)}};function Ht(Ae,se){var pe=Ae.length;if(!se&&typeof TextEncoder!="undefined")return new TextEncoder().encode(Ae);for(var Re=new ve(Ae.length+(Ae.length>>>1)),Ke=0,nt=function(b){Re[Ke++]=b},ht=0;ht<pe;++ht){if(Ke+5>Re.length){var vt=new ve(Ke+8+(pe-ht<<1));vt.set(Re),Re=vt}var K=Ae.charCodeAt(ht);K<128||se?nt(K):K<2048?(nt(192|K>>>6),nt(128|K&63)):K>55295&&K<57344?(K=65536+(K&1023<<10)|Ae.charCodeAt(++ht)&1023,nt(240|K>>>18),nt(128|K>>>12&63),nt(128|K>>>6&63),nt(128|K&63)):(nt(224|K>>>12),nt(128|K>>>6&63),nt(128|K&63))}return y(Re,0,Ke)}function mr(Ae,se){var pe="";if(!se&&typeof TextDecoder!="undefined")return new TextDecoder().decode(Ae);for(var Re=0;Re<Ae.length;){var Ke=Ae[Re++];Ke<128||se?pe+=String.fromCharCode(Ke):Ke<224?pe+=String.fromCharCode((Ke&31)<<6|Ae[Re++]&63):Ke<240?pe+=String.fromCharCode((Ke&15)<<12|(Ae[Re++]&63)<<6|Ae[Re++]&63):(Ke=((Ke&15)<<18|(Ae[Re++]&63)<<12|(Ae[Re++]&63)<<6|Ae[Re++]&63)-65536,pe+=String.fromCharCode(55296|Ke>>10,56320|Ke&1023))}return pe}var _r=function(Ae,se){return se+30+Le(Ae,se+26)+Le(Ae,se+28)},Ar=function(Ae,se,pe){var Re=Le(Ae,se+28),Ke=mr(Ae.subarray(se+46,se+46+Re),!(Le(Ae,se+8)&2048)),nt=se+46+Re,ht=pe?nr(Ae,nt):[Pe(Ae,se+20),Pe(Ae,se+24),Pe(Ae,se+42)],vt=ht[0],K=ht[1],b=ht[2];return[Le(Ae,se+10),vt,K,Ke,nt+Le(Ae,se+30)+Le(Ae,se+32),b]},nr=function(Ae,se){for(;Le(Ae,se)!=1;se+=4+Le(Ae,se+2));return[Pe(Ae,se+12),Pe(Ae,se+4),Pe(Ae,se+20)]},Mt=function(Ae,se,pe,Re,Ke,nt,ht,vt,K,b){var B=nt.length,j=Re.length;ke(Ae,se,K!=null?33639248:67324752),se+=4,K!=null&&(Ae[se]=20,se+=2),Ae[se]=20,se+=2,Ae[se++]=b==8&&(vt.level==1?6:vt.level<6?4:vt.level==9?2:0),Ae[se++]=ht&&8,Ae[se]=b,se+=2;var Z=new Date(vt.mtime||Date.now()),G=Z.getFullYear()-1980;if(G<0||G>119)throw"date not in range 1980-2099";ke(Ae,se,(G<<24)*2|Z.getMonth()+1<<21|Z.getDate()<<16|Z.getHours()<<11|Z.getMinutes()<<5|Z.getSeconds()>>>1),se+=4,ke(Ae,se,pe),ke(Ae,se+4,j),ke(Ae,se+8,Ke),ke(Ae,se+12,B),se+=16,K!=null&&(ke(Ae,se+=10,K),se+=4),Ae.set(nt,se),se+=B,K==null&&Ae.set(Re,se)},sr=function(Ae,se,pe,Re,Ke){ke(Ae,se,101010256),ke(Ae,se+8,pe),ke(Ae,se+10,pe),ke(Ae,se+12,Re),ke(Ae,se+16,Ke)};function Er(Ae,se,pe){if(pe||(pe=se,se={}),typeof pe!="function")throw"no callback";var Re={};Lt(Ae,"",Re,se);var Ke=Object.keys(Re),nt=Ke.length,ht=0,vt=0,K=nt,b=new Array(nt),B=[],j=function(){for(var He=0;He<B.length;++He)B[He]()},Z=function(){var He=new ve(vt+22),ct=ht,_t=vt-ht;vt=0;for(var Xe=0;Xe<K;++Xe){var pt=b[Xe];try{Mt(He,vt,pt.c,pt.d,pt.m,pt.n,pt.u,pt.p,null,pt.t),Mt(He,ht,pt.c,pt.d,pt.m,pt.n,pt.u,pt.p,vt,pt.t),ht+=46+pt.n.length,vt+=30+pt.n.length+pt.d.length}catch(wt){return pe(wt,null)}}sr(He,ht,b.length,_t,ct),pe(null,He)};nt||Z();for(var G=function(He){var ct=Ke[He],_t=Re[ct],Xe=_t[0],pt=_t[1],wt=ne(),Kt=Xe.length;wt.p(Xe);var rr=Ht(ct),Wt=rr.length,Bt=pt.level==0?0:8,fr=function(qt,Lr){if(qt)j(),pe(qt,null);else{var gr=Lr.length;b[He]={t:Bt,d:Lr,m:Kt,c:wt.d(),u:ct.length!=gr,n:rr,p:pt},ht+=30+Wt+gr,vt+=76+2*Wt+gr,--nt||Z()}};if(rr.length>65535&&fr("filename too long",null),!Bt)fr(null,Xe);else if(Kt<16e4)try{fr(null,Oe(Xe,pt))}catch(qt){fr(qt,null)}else B.push(Te(Xe,pt,fr))},oe=0;oe<K;++oe)G(oe);return j}function ur(Ae,se){se===void 0&&(se={});var pe={},Re=[];Lt(Ae,"",pe,se);var Ke=0,nt=0;for(var ht in pe){var vt=pe[ht],K=vt[0],b=vt[1],B=b.level==0?0:8,j=Ht(ht),Z=j.length;if(j.length>65535)throw"filename too long";var G=B?Oe(K,b):K,oe=G.length,He=ne();He.p(K),Re.push({t:B,d:G,m:K.length,c:He.d(),u:ht.length!=Z,n:j,o:Ke,p:b}),Ke+=30+Z+oe,nt+=76+2*Z+oe}for(var ct=new ve(nt+22),_t=Ke,Xe=nt-Ke,pt=0;pt<Re.length;++pt){var wt=Re[pt];Mt(ct,wt.o,wt.c,wt.d,wt.m,wt.n,wt.u,wt.p,null,wt.t),Mt(ct,Ke,wt.c,wt.d,wt.m,wt.n,wt.u,wt.p,wt.o,wt.t),Ke+=46+wt.n.length}return sr(ct,Ke,Re.length,Xe,_t),ct}function kt(Ae,se){if(typeof se!="function")throw"no callback";for(var pe=[],Re=function(){for(var Z=0;Z<pe.length;++Z)pe[Z]()},Ke={},nt=Ae.length-22;Pe(Ae,nt)!=101010256;--nt)if(!nt||Ae.length-nt>65558){se("invalid zip file",null);return}var ht=Le(Ae,nt+8);ht||se(null,{});var vt=ht,K=Pe(Ae,nt+16),b=K==4294967295;if(b){if(nt=Pe(Ae,nt-12),Pe(Ae,nt)!=101075792)throw"invalid zip file";vt=ht=Pe(Ae,nt+32),K=Pe(Ae,nt+48)}for(var B=function(Z){var G=Ar(Ae,K,b),oe=G[0],He=G[1],ct=G[2],_t=G[3],Xe=G[4],pt=G[5],wt=_r(Ae,pt);K=Xe;var Kt=function(Wt,Bt){Wt?(Re(),se(Wt,null)):(Ke[_t]=Bt,--ht||se(null,Ke))};if(!oe)Kt(null,y(Ae,wt,wt+He));else if(oe==8){var rr=Ae.subarray(wt,wt+He);if(He<32e4)try{Kt(null,we(rr,new ve(ct)))}catch(Wt){Kt(Wt,null)}else pe.push(Ce(rr,{size:ct},Kt))}else Kt("unknown compression type "+oe,null)},j=0;j<vt;++j)B(j);return Re}function zt(Ae){for(var se={},pe=Ae.length-22;Pe(Ae,pe)!=101010256;--pe)if(!pe||Ae.length-pe>65558)throw"invalid zip file";var Re=Le(Ae,pe+8);if(!Re)return{};var Ke=Pe(Ae,pe+16),nt=Ke==4294967295;if(nt){if(pe=Pe(Ae,pe-12),Pe(Ae,pe)!=101075792)throw"invalid zip file";Re=Pe(Ae,pe+32),Ke=Pe(Ae,pe+48)}for(var ht=0;ht<Re;++ht){var vt=Ar(Ae,Ke,nt),K=vt[0],b=vt[1],B=vt[2],j=vt[3],Z=vt[4],G=vt[5],oe=_r(Ae,G);if(Ke=Z,!K)se[j]=y(Ae,oe,oe+b);else if(K==8)se[j]=we(Ae.subarray(oe,oe+b),new ve(B));else throw"unknown compression type "+K}return se}},deN7:function(dt,_e,Q){"use strict";var he=Q("A9kX"),be=Q("gb+I"),ve=Q("6NPb"),Ee=Q("o3AU"),ue=Q("EOh4"),$=Q("V/dS"),O=Q("dLI4"),H=Q("4d5L"),e=Q("8OG5"),M=Q("mgsT"),D=Q("IYef"),N=Q("XlT3"),c=Q("e7Hv"),l=Q("c3Iv"),s=Q("rBQ5"),h=Q("2yBE"),x=Q("5LYH"),E=Q("Hqw+"),v=Q("YaWb"),d=Q("FrBR"),m=Q("SCzF"),g=Q("XXmO"),S=Q.n(g),A=Q("T/Jt"),u=Q.n(A),R=Q("ZW9T"),i=Q("F0VM"),T=Q.n(i),w=Q("xKgJ"),y=Q("J66h"),o=Q.n(y),r=Q("ErOA"),a=Q("3ptp"),n=Q("9Bee"),t=Q("XYT7"),p=Q("RCxd"),_=Q("/MfK"),f=m.a.Option,F={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,enableSplitViewResizing:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1},P;(function(V){V[V.SET_PATH=0]="SET_PATH",V[V.GET_PASSED_CONTENT=1]="GET_PASSED_CONTENT"})(P||(P={}));function W(V,J){switch(J.type){case P.SET_PATH:return Object(v.a)(Object(v.a)({},V),{},{selectedPath:J.payload});case P.GET_PASSED_CONTENT:return Object(v.a)(Object(v.a)({},V),{},{passedContent:J.payload});default:throw new Error}}_e.a=function(V){var J=V.language,ne=V.dispatch,ce=V.shixunWorkReport,ie=V.v,xe=V.languages,ge=V.onPathChange,de=V.autoHeight,Fe=V.diff_code_count,Qe=V.data,Ve=Object(A.useState)(xe==null?void 0:xe[0]),Ne=Object(E.a)(Ve,2),Ue=Ne[0],q=Ne[1],k=ce!="shixunWorkReport"&&Object(a.i)();return Object(A.useEffect)(function(){q(xe==null?void 0:xe[0])},[]),Object(A.useEffect)(function(){var z;q(xe==null||((z=xe.filter(function(X){return X.language===(Ue==null?void 0:Ue.language)}))===null||z===void 0)?void 0:z[0])},[xe]),u.a.createElement(u.a.Fragment,null,u.a.createElement("h2",null," ",u.a.createElement("span",null,u.a.createElement("span",null,"\u6700\u540E\u901A\u5173\u7684\u4EE3\u7801"),(xe==null?void 0:xe.length)>1&&u.a.createElement(x.a.Group,{defaultValue:J,style:{marginLeft:10},onChange:function(X){var re;q(xe==null||((re=xe.filter(function(te){return te.language===X.target.value}))===null||re===void 0)?void 0:re[0])}},xe==null?void 0:xe.map(function(z){return u.a.createElement(x.a,{value:z==null?void 0:z.language},z==null?void 0:z.language)}))),Object(w.c)()&&ce!="shixunWorkReport"&&u.a.createElement("span",null,u.a.createElement("span",null,"\u5F97\u5206 ",Ue==null?void 0:Ue.score,"/",Ue==null?void 0:Ue.total_score),u.a.createElement(H.a,{style:{margin:"0px 10px"},onClick:function(){var X=Ue==null?void 0:Ue.score;s.a.confirm({title:"\u8C03\u5206",content:u.a.createElement("div",null,u.a.createElement("p",null,"\u5F97\u5206\uFF1A",Ue==null?void 0:Ue.score,"/",Ue==null?void 0:Ue.total_score),u.a.createElement("p",null,"\u8C03\u5206\uFF1A",u.a.createElement(c.a,{min:0,max:Ue==null?void 0:Ue.total_score,defaultValue:Ue==null?void 0:Ue.score,onChange:function(te){X=te}}))),okText:"\u786E\u8BA4",onOk:function(){var re=Object(D.a)(S.a.mark(function ae(){var ye;return S.a.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return Pe.next=2,Object(r.a)("/api/courses/".concat(k==null?void 0:k.coursesId,"/homework_commons/update_hack_score"),{method:"put",body:{course_id:k==null?void 0:k.coursesId,hack_user_code_id:Ue==null?void 0:Ue.hack_user_id,score:X}});case 2:ye=Pe.sent,ye.status===0&&(M.b.success("\u8C03\u5206\u6210\u529F"),ne({type:"shixunHomeworks/setActionTabs",payload:{}}),ne({type:"shixunHomeworks/getShixunWorkReports",payload:Object(v.a)({},k)}));case 4:case"end":return Pe.stop()}},ae)}));function te(){return re.apply(this,arguments)}return te}(),cancelText:"\u53D6\u6D88"})},type:"primary"},"\u8C03\u5206"),Object(w.c)()&&ce!="shixunWorkReport"&&u.a.createElement(H.a,{onClick:function(){ne({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:ce.user_id,type:"1",language:Ue==null?void 0:Ue.language,v:ie,data:Object(v.a)({},ce)}}})}},"\u70B9\u8BC4\u4EE3\u7801"))),u.a.createElement(R.b,{height:300,language:Ue==null?void 0:Ue.language,value:y.Base64.decode(Ue==null?void 0:Ue.code),autoHeight:de,theme:"default",options:F}),((Ue==null?void 0:Ue.comment)||(Ue==null?void 0:Ue.hidden_comment))&&u.a.createElement("div",null,u.a.createElement(Ee.a,{align:"middle",style:{borderTop:"1px solid #eee"}},u.a.createElement($.a,{flex:1},u.a.createElement("h1",{className:T.a.title},"\u70B9\u8BC4\u5185\u5BB9")),u.a.createElement($.a,{className:"pr30"},Object(w.c)()&&u.a.createElement(H.a,{onClick:Object(D.a)(S.a.mark(function z(){return S.a.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:s.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:u.a.createElement(p.a,null),content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",onOk:function(){return Object(D.a)(S.a.mark(function ae(){var ye;return S.a.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return Pe.next=2,Object(t.m)({comment_id:Ue==null?void 0:Ue.comment_id,homeworkId:k.homeworkId,type:"hack"});case 2:ye=Pe.sent,ye.status===0&&(M.b.success("\u5220\u9664\u6210\u529F"),ne({type:"shixunHomeworks/getShixunWorkReports",payload:Object(v.a)({},k)}));case 4:case"end":return Pe.stop()}},ae)}))()}});case 1:case"end":return re.stop()}},z)}))},u.a.createElement(_.a,null),"\u5220\u9664"))),u.a.createElement(be.a,{style:{margin:0}}),(Ue==null?void 0:Ue.comment)&&u.a.createElement("aside",{className:"pl30 pr30 mt20"},u.a.createElement("span",{className:"c-light-black font12"},"# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),u.a.createElement("br",null),u.a.createElement(n.a,{value:Ue==null?void 0:Ue.comment})),(Ue==null?void 0:Ue.hidden_comment)&&u.a.createElement("aside",{className:"pl30 pr30 mt20"},u.a.createElement("span",{className:"c-light-black font12"},"# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),u.a.createElement("br",null),u.a.createElement(n.a,{value:Ue==null?void 0:Ue.hidden_comment}))))}},fjLI:function(dt,_e,Q){"use strict";Q.d(_e,"f",function(){return c}),Q.d(_e,"b",function(){return l}),Q.d(_e,"a",function(){return s}),Q.d(_e,"d",function(){return h}),Q.d(_e,"e",function(){return x}),Q.d(_e,"c",function(){return E});var he=Q("8HAY"),be=Q("Vhoy"),ve=Q("MI8n"),Ee=Q("JYp7"),ue=Q("pmY6"),$=Q("24hK"),O=Q("nnTU"),H=Q("T8No"),e=Q("Cg/j"),M=Q("t9D7"),D=function(v,d,m,g){var S=arguments.length,A=S<3?d:g===null?g=Object.getOwnPropertyDescriptor(d,m):g,u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(v,d,m,g);else for(var R=v.length-1;R>=0;R--)(u=v[R])&&(A=(S<3?u(A):S>3?u(d,m,A):u(d,m))||A);return S>3&&A&&Object.defineProperty(d,m,A),A},N=function(v,d){return function(m,g){d(m,g,v)}};function c(v){return v.command!==void 0}class l{constructor(v){this.id=l._idPool++,this._debugName=v}}l._idPool=0,l.CommandPalette=new l("CommandPalette"),l.EditorContext=new l("EditorContext"),l.SimpleEditorContext=new l("SimpleEditorContext"),l.EditorContextCopy=new l("EditorContextCopy"),l.EditorContextPeek=new l("EditorContextPeek"),l.MenubarEditMenu=new l("MenubarEditMenu"),l.MenubarCopy=new l("MenubarCopy"),l.MenubarGoMenu=new l("MenubarGoMenu"),l.MenubarSelectionMenu=new l("MenubarSelectionMenu"),l.InlineCompletionsActions=new l("InlineCompletionsActions");const s=Object(e.c)("menuService"),h=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new ve.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:v=>v===l.CommandPalette}}addCommand(v){return this.addCommands(Ee.a.single(v))}addCommands(v){for(const d of v)this._commands.set(d.id,d);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(ue.i)(()=>{let d=!1;for(const m of v)d=this._commands.delete(m.id)||d;d&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(v){return this._commands.get(v)}getCommands(){const v=new Map;return this._commands.forEach((d,m)=>v.set(m,d)),v}appendMenuItem(v,d){return this.appendMenuItems(Ee.a.single({id:v,item:d}))}appendMenuItems(v){const d=new Set,m=new $.a;for(const{id:g,item:S}of v){let A=this._menuItems.get(g);A||(A=new $.a,this._menuItems.set(g,A)),m.push(A.push(S)),d.add(g)}return this._onDidChangeMenu.fire(d),Object(ue.i)(()=>{if(m.size>0){for(let g of m)g();this._onDidChangeMenu.fire(d),m.clear()}})}getMenuItems(v){let d;return this._menuItems.has(v)?d=[...this._menuItems.get(v)]:d=[],v===l.CommandPalette&&this._appendImplicitItems(d),d}_appendImplicitItems(v){const d=new Set;for(const m of v)c(m)&&(d.add(m.command.id),m.alt&&d.add(m.alt.id));this._commands.forEach((m,g)=>{d.has(g)||v.push({command:m})})}};class x extends he.e{constructor(v,d,m,g){super(`submenuitem.${v.submenu.id}`,typeof v.title=="string"?v.title:v.title.value,[],"submenu");this.item=v,this._menuService=d,this._contextKeyService=m,this._options=g}get actions(){const v=[],d=this._menuService.createMenu(this.item.submenu,this._contextKeyService),m=d.getActions(this._options);d.dispose();for(const[,g]of m)g.length>0&&(v.push(...g),v.push(new he.d));return v.length&&v.pop(),v}}let E=class v{constructor(d,m,g,S,A){var u,R;if(this._commandService=A,this.id=d.id,this.label=(g==null?void 0:g.renderShortTitle)&&d.shortTitle?typeof d.shortTitle=="string"?d.shortTitle:d.shortTitle.value:typeof d.title=="string"?d.title:d.title.value,this.tooltip=(R=typeof d.tooltip=="string"?d.tooltip:(u=d.tooltip)===null||u===void 0?void 0:u.value)!==null&&R!==void 0?R:"",this.enabled=!d.precondition||S.contextMatchesRules(d.precondition),this.checked=void 0,d.toggled){const i=d.toggled.condition?d.toggled:{condition:d.toggled};this.checked=S.contextMatchesRules(i.condition),this.checked&&i.tooltip&&(this.tooltip=typeof i.tooltip=="string"?i.tooltip:i.tooltip.value),i.title&&(this.label=typeof i.title=="string"?i.title:i.title.value)}this.item=d,this.alt=m?new v(m,void 0,g,S,A):void 0,this._options=g,M.d.isThemeIcon(d.icon)&&(this.class=be.a.asClassName(d.icon))}dispose(){}run(...d){var m,g;let S=[];return((m=this._options)===null||m===void 0?void 0:m.arg)&&(S=[...S,this._options.arg]),((g=this._options)===null||g===void 0?void 0:g.shouldForwardArgs)&&(S=[...S,...d]),this._commandService.executeCommand(this.id,...S)}};E=D([N(3,H.b),N(4,O.b)],E)},hkPH:function(dt,_e,Q){"use strict";var he=Q("yuO0"),be=Q("XjgL"),ve=Q("kxoy"),Ee=Q("36hc"),ue=Q("fNpE"),$=Q("T/Jt"),O=Q("27eb"),H=Q.n(O),e=Q("sg8A"),M=Q("s7W6"),D=Q("Eiay"),N=Q("eA01"),c=Q("fXDJ");function l(){return typeof BigInt=="function"}function s(F){var P=F.trim(),W=P.startsWith("-");W&&(P=P.slice(1)),P=P.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),P.startsWith(".")&&(P="0".concat(P));var V=P||"0",J=V.split("."),ne=J[0]||"0",ce=J[1]||"0";ne==="0"&&ce==="0"&&(W=!1);var ie=W?"-":"";return{negative:W,negativeStr:ie,trimStr:V,integerStr:ne,decimalStr:ce,fullStr:"".concat(ie).concat(V)}}function h(F){var P=String(F);return!Number.isNaN(Number(P))&&P.includes("e")}function x(F){var P=String(F);if(h(F)){var W=Number(P.slice(P.indexOf("e-")+2)),V=P.match(/\.(\d+)/);return(V==null?void 0:V[1])&&(W+=V[1].length),W}return P.includes(".")&&v(P)?P.length-P.indexOf(".")-1:0}function E(F){var P=String(F);if(h(F)){if(F>Number.MAX_SAFE_INTEGER)return String(l()?BigInt(F).toString():Number.MAX_SAFE_INTEGER);if(F<Number.MIN_SAFE_INTEGER)return String(l()?BigInt(F).toString():Number.MIN_SAFE_INTEGER);P=F.toFixed(x(P))}return s(P).fullStr}function v(F){return typeof F=="number"?!Number.isNaN(F):F?/^\s*-?\d+(\.\d+)?\s*$/.test(F)||/^\s*-?\d+\.\s*$/.test(F)||/^\s*-?\.\d+\s*$/.test(F):!1}function d(F){var P=typeof F=="number"?E(F):s(F).fullStr,W=P.includes(".");return W?s(P.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:F+"0"}var m=function(){function F(P){if(Object(N.a)(this,F),this.origin="",this.number=void 0,this.empty=void 0,!P&&P!==0||!String(P).trim()){this.empty=!0;return}this.origin=String(P),this.number=Number(P)}return Object(c.a)(F,[{key:"negate",value:function(){return new F(-this.toNumber())}},{key:"add",value:function(W){if(this.isInvalidate())return new F(W);var V=Number(W);if(Number.isNaN(V))return this;var J=this.number+V;if(J>Number.MAX_SAFE_INTEGER)return new F(Number.MAX_SAFE_INTEGER);if(J<Number.MIN_SAFE_INTEGER)return new F(Number.MIN_SAFE_INTEGER);var ne=Math.max(x(this.number),x(V));return new F(J.toFixed(ne))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(W){return this.toNumber()===(W==null?void 0:W.toNumber())}},{key:"lessEquals",value:function(W){return this.add(W.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return W?this.isInvalidate()?"":E(this.number):this.origin}}]),F}(),g=function(){function F(P){if(Object(N.a)(this,F),this.origin="",this.negative=void 0,this.integer=void 0,this.decimal=void 0,this.decimalLen=void 0,this.empty=void 0,this.nan=void 0,!P&&P!==0||!String(P).trim()){this.empty=!0;return}if(this.origin=String(P),P==="-"){this.nan=!0;return}var W=P;if(h(W)&&(W=Number(W)),W=typeof W=="string"?W:E(W),v(W)){var V=s(W);this.negative=V.negative;var J=V.trimStr.split(".");this.integer=BigInt(J[0]);var ne=J[1]||"0";this.decimal=BigInt(ne),this.decimalLen=ne.length}else this.nan=!0}return Object(c.a)(F,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(W){var V="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(W,"0"));return BigInt(V)}},{key:"negate",value:function(){var W=new F(this.toString());return W.negative=!W.negative,W}},{key:"add",value:function(W){if(this.isInvalidate())return new F(W);var V=new F(W);if(V.isInvalidate())return this;var J=Math.max(this.getDecimalStr().length,V.getDecimalStr().length),ne=this.alignDecimal(J),ce=V.alignDecimal(J),ie=(ne+ce).toString(),xe=s(ie),ge=xe.negativeStr,de=xe.trimStr,Fe="".concat(ge).concat(de.padStart(J+1,"0"));return new F("".concat(Fe.slice(0,-J),".").concat(Fe.slice(-J)))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(W){return this.toString()===(W==null?void 0:W.toString())}},{key:"lessEquals",value:function(W){return this.add(W.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return W?this.isInvalidate()?"":s("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),F}();function S(F){return l()?new g(F):new m(F)}function A(F,P,W){var V=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(F==="")return"";var J=s(F),ne=J.negativeStr,ce=J.integerStr,ie=J.decimalStr,xe="".concat(P).concat(ie),ge="".concat(ne).concat(ce);if(W>=0){var de=Number(ie[W]);if(de>=5&&!V){var Fe=S(F).add("".concat(ne,"0.").concat("0".repeat(W)).concat(10-de));return A(Fe.toString(),P,W,V)}return W===0?ge:"".concat(ge).concat(P).concat(ie.padEnd(W,"0").slice(0,W))}return xe===".0"?ge:"".concat(ge).concat(xe)}var u=Q("EOd9"),R=200,i=600;function T(F){var P=F.prefixCls,W=F.upNode,V=F.downNode,J=F.upDisabled,ne=F.downDisabled,ce=F.onStep,ie=$.useRef(),xe=$.useRef();xe.current=ce;var ge=function(q,k){q.preventDefault(),xe.current(k);function z(){xe.current(k),ie.current=setTimeout(z,R)}ie.current=setTimeout(z,i)},de=function(){clearTimeout(ie.current)};if($.useEffect(function(){return de},[]),Object(u.a)())return null;var Fe="".concat(P,"-handler"),Qe=H()(Fe,"".concat(Fe,"-up"),Object(be.a)({},"".concat(Fe,"-up-disabled"),J)),Ve=H()(Fe,"".concat(Fe,"-down"),Object(be.a)({},"".concat(Fe,"-down-disabled"),ne)),Ne={unselectable:"on",role:"button",onMouseUp:de,onMouseLeave:de};return $.createElement("div",{className:"".concat(Fe,"-wrap")},$.createElement("span",Object(he.a)({},Ne,{onMouseDown:function(q){ge(q,!0)},"aria-label":"Increase Value","aria-disabled":J,className:Qe}),W||$.createElement("span",{unselectable:"on",className:"".concat(P,"-handler-up-inner")})),$.createElement("span",Object(he.a)({},Ne,{onMouseDown:function(q){ge(q,!1)},"aria-label":"Decrease Value","aria-disabled":ne,className:Ve}),V||$.createElement("span",{unselectable:"on",className:"".concat(P,"-handler-down-inner")})))}var w=Q("B/uU");function y(F,P){var W=Object($.useRef)(null);function V(){try{var ne=F.selectionStart,ce=F.selectionEnd,ie=F.value,xe=ie.substring(0,ne),ge=ie.substring(ce);W.current={start:ne,end:ce,value:ie,beforeTxt:xe,afterTxt:ge}}catch(de){}}function J(){if(F&&W.current&&P)try{var ne=F.value,ce=W.current,ie=ce.beforeTxt,xe=ce.afterTxt,ge=ce.start,de=ne.length;if(ne.endsWith(xe))de=ne.length-W.current.afterTxt.length;else if(ne.startsWith(ie))de=ie.length;else{var Fe=ie[ge-1],Qe=ne.indexOf(Fe,ge-1);Qe!==-1&&(de=Qe+1)}F.setSelectionRange(de,de)}catch(Ve){Object(w.a)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(Ve.message))}}return[V,J]}var o=Q("IRwA"),r=function(){var F=Object($.useRef)(0),P=function(){o.a.cancel(F.current)};return Object($.useEffect)(function(){return P},[]),function(W){P(),F.current=Object(o.a)(function(){W()})}},a=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","controls","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep"],n=function(P,W){return P||W.isEmpty()?W.toString():W.toNumber()},t=function(P){var W=S(P);return W.isInvalidate()?null:W},p=$.forwardRef(function(F,P){var W,V=F.prefixCls,J=V===void 0?"rc-input-number":V,ne=F.className,ce=F.style,ie=F.min,xe=F.max,ge=F.step,de=ge===void 0?1:ge,Fe=F.defaultValue,Qe=F.value,Ve=F.disabled,Ne=F.readOnly,Ue=F.upHandler,q=F.downHandler,k=F.keyboard,z=F.controls,X=z===void 0?!0:z,re=F.stringMode,te=F.parser,ae=F.formatter,ye=F.precision,Le=F.decimalSeparator,Pe=F.onChange,ke=F.onInput,Je=F.onPressEnter,qe=F.onStep,it=Object(ue.a)(F,a),rt="".concat(J,"-input"),et=$.useRef(null),At=$.useState(!1),We=Object(Ee.a)(At,2),Ge=We[0],De=We[1],Te=$.useRef(!1),Oe=$.useRef(!1),le=$.useRef(!1),fe=$.useState(function(){return S(Qe!=null?Qe:Fe)}),Ce=Object(Ee.a)(fe,2),we=Ce[0],Me=Ce[1];function $e(se){Qe===void 0&&Me(se)}var Ie=$.useCallback(function(se,pe){return pe?void 0:ye>=0?ye:Math.max(x(se),x(de))},[ye,de]),Ye=$.useCallback(function(se){var pe=String(se);if(te)return te(pe);var Re=pe;return Le&&(Re=Re.replace(Le,".")),Re.replace(/[^\w.-]+/g,"")},[te,Le]),tt=$.useRef(""),at=$.useCallback(function(se,pe){if(ae)return ae(se,{userTyping:pe,input:String(tt.current)});var Re=typeof se=="number"?E(se):se;if(!pe){var Ke=Ie(Re,pe);if(v(Re)&&(Le||Ke>=0)){var nt=Le||".";Re=A(Re,nt,Ke)}}return Re},[ae,Ie,Le]),mt=$.useState(function(){var se=Fe!=null?Fe:Qe;return we.isInvalidate()&&["string","number"].includes(Object(ve.a)(se))?Number.isNaN(se)?"":se:at(we.toString(),!1)}),ft=Object(Ee.a)(mt,2),Ze=ft[0],yt=ft[1];tt.current=Ze;function lt(se,pe){yt(at(se.isInvalidate()?se.toString(!1):se.toString(!pe),pe))}var gt=$.useMemo(function(){return t(xe)},[xe,ye]),xt=$.useMemo(function(){return t(ie)},[ie,ye]),bt=$.useMemo(function(){return!gt||!we||we.isInvalidate()?!1:gt.lessEquals(we)},[gt,we]),Ot=$.useMemo(function(){return!xt||!we||we.isInvalidate()?!1:we.lessEquals(xt)},[xt,we]),Tt=y(et.current,Ge),Vt=Object(Ee.a)(Tt,2),Zt=Vt[0],ut=Vt[1],Et=function(pe){return gt&&!pe.lessEquals(gt)?gt:xt&&!xt.lessEquals(pe)?xt:null},Lt=function(pe){return!Et(pe)},Ht=function(pe,Re){var Ke=pe,nt=Lt(Ke)||Ke.isEmpty();if(!Ke.isEmpty()&&!Re&&(Ke=Et(Ke)||Ke,nt=!0),!Ne&&!Ve&&nt){var ht=Ke.toString(),vt=Ie(ht,Re);return vt>=0&&(Ke=S(A(ht,".",vt)),Lt(Ke)||(Ke=S(A(ht,".",vt,!0)))),Ke.equals(we)||($e(Ke),Pe==null||Pe(Ke.isEmpty()?null:n(re,Ke)),Qe===void 0&<(Ke,Re)),Ke}return we},mr=r(),_r=function se(pe){if(Zt(),yt(pe),!Oe.current){var Re=Ye(pe),Ke=S(Re);Ke.isNaN()||Ht(Ke,!0)}ke==null||ke(pe),mr(function(){var nt=pe;te||(nt=pe.replace(/。/g,".")),nt!==pe&&se(nt)})},Ar=function(){Oe.current=!0},nr=function(){Oe.current=!1,_r(et.current.value)},Mt=function(pe){_r(pe.target.value)},sr=function(pe){var Re;if(pe&&bt||!pe&&Ot)return;Te.current=!1;var Ke=S(le.current?d(de):de);pe||(Ke=Ke.negate());var nt=(we||S(0)).add(Ke.toString()),ht=Ht(nt,!1);qe==null||qe(n(re,ht),{offset:le.current?d(de):de,type:pe?"up":"down"}),(Re=et.current)===null||Re===void 0||Re.focus()},Er=function(pe){var Re=S(Ye(Ze)),Ke=Re;Re.isNaN()?Ke=we:Ke=Ht(Re,pe),Qe!==void 0?lt(we,!1):Ke.isNaN()||lt(Ke,!1)},ur=function(){Te.current=!0},kt=function(pe){var Re=pe.which,Ke=pe.shiftKey;if(Te.current=!0,Ke?le.current=!0:le.current=!1,Re===e.a.ENTER&&(Oe.current||(Te.current=!1),Er(!1),Je==null||Je(pe)),k===!1)return;!Oe.current&&[e.a.UP,e.a.DOWN].includes(Re)&&(sr(e.a.UP===Re),pe.preventDefault())},zt=function(){Te.current=!1,le.current=!1},Ae=function(){Er(!1),De(!1),Te.current=!1};return Object(M.b)(function(){we.isInvalidate()||lt(we,!1)},[ye]),Object(M.b)(function(){var se=S(Qe);Me(se);var pe=S(Ye(Ze));(!se.equals(pe)||!Te.current||ae)&<(se,Te.current)},[Qe]),Object(M.b)(function(){ae&&ut()},[Ze]),$.createElement("div",{className:H()(J,ne,(W={},Object(be.a)(W,"".concat(J,"-focused"),Ge),Object(be.a)(W,"".concat(J,"-disabled"),Ve),Object(be.a)(W,"".concat(J,"-readonly"),Ne),Object(be.a)(W,"".concat(J,"-not-a-number"),we.isNaN()),Object(be.a)(W,"".concat(J,"-out-of-range"),!we.isInvalidate()&&!Lt(we)),W)),style:ce,onFocus:function(){De(!0)},onBlur:Ae,onKeyDown:kt,onKeyUp:zt,onCompositionStart:Ar,onCompositionEnd:nr,onBeforeInput:ur},X&&$.createElement(T,{prefixCls:J,upNode:Ue,downNode:q,upDisabled:bt,downDisabled:Ot,onStep:sr}),$.createElement("div",{className:"".concat(rt,"-wrap")},$.createElement("input",Object(he.a)({autoComplete:"off",role:"spinbutton","aria-valuemin":ie,"aria-valuemax":xe,"aria-valuenow":we.isInvalidate()?null:we.toString(),step:de},it,{ref:Object(D.a)(et,P),className:rt,value:Ze,onChange:Mt,disabled:Ve,readOnly:Ne}))))});p.displayName="InputNumber";var _=p,f=_e.a=_},ic2d:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return Ee});var he=Q("FWmy"),be=Q("746U");class ve{constructor(){this.data=new Map}add(ue,$){he.a(be.l(ue)),he.a(be.k($)),he.a(!this.data.has(ue),"There is already an extension with this id"),this.data.set(ue,$)}as(ue){return this.data.get(ue)||null}}const Ee=new ve},"ju+a":function(dt,_e,Q){"use strict";Q.d(_e,"b",function(){return N}),Q.d(_e,"a",function(){return c}),Q.d(_e,"h",function(){return l}),Q.d(_e,"f",function(){return s}),Q.d(_e,"c",function(){return E}),Q.d(_e,"d",function(){return v}),Q.d(_e,"g",function(){return g}),Q.d(_e,"e",function(){return S});var he=Q("aVTQ"),be=Q("kxoy"),ve=Q("yuO0"),Ee=Q("fNpE"),ue=Q("B/uU"),$=Q("T/Jt"),O=Q.n($),H=Q("0pdE"),e=Q("El5i"),M=Q("rgEC"),D=["children"];function N(A,u){if(!A)return[];var R=A.slice(),i=R.indexOf(u);return i>=0&&R.splice(i,1),R}function c(A,u){var R=(A||[]).slice();return R.indexOf(u)===-1&&R.push(u),R}function l(A){return A.split("-")}function s(A,u){var R=[],i=Object(e.a)(u,A);function T(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];w.forEach(function(y){var o=y.key,r=y.children;R.push(o),T(r)})}return T(i.children),R}function h(A){if(A.parent){var u=l(A.pos);return Number(u[u.length-1])===A.parent.children.length-1}return!1}function x(A){var u=l(A.pos);return Number(u[u.length-1])===0}function E(A,u,R,i,T,w,y,o,r,a){var n,t=A.clientX,p=A.clientY,_=A.target.getBoundingClientRect(),f=_.top,F=_.height,P=(a==="rtl"?-1:1)*(((T==null?void 0:T.x)||0)-t),W=(P-12)/i,V=Object(e.a)(o,R.props.eventKey);if(p<f+F/2){var J=y.findIndex(function(q){return q.key===V.key}),ne=J<=0?0:J-1,ce=y[ne].key;V=Object(e.a)(o,ce)}var ie=V.key,xe=V,ge=V.key,de=0,Fe=0;if(!r.includes(ie))for(var Qe=0;Qe<W&&h(V);Qe+=1)V=V.parent,Fe+=1;var Ve=u.props.data,Ne=V.node,Ue=!0;return x(V)&&V.level===0&&p<f+F/2&&w({dragNode:Ve,dropNode:Ne,dropPosition:-1})&&V.key===R.props.eventKey?de=-1:(xe.children||[]).length&&r.includes(ge)?w({dragNode:Ve,dropNode:Ne,dropPosition:0})?de=0:Ue=!1:Fe===0?W>-1.5?w({dragNode:Ve,dropNode:Ne,dropPosition:1})?de=1:Ue=!1:w({dragNode:Ve,dropNode:Ne,dropPosition:0})?de=0:w({dragNode:Ve,dropNode:Ne,dropPosition:1})?de=1:Ue=!1:w({dragNode:Ve,dropNode:Ne,dropPosition:1})?de=1:Ue=!1,{dropPosition:de,dropLevelOffset:Fe,dropTargetKey:V.key,dropTargetPos:V.pos,dragOverNodeKey:ge,dropContainerKey:de===0?null:((n=V.parent)===null||n===void 0?void 0:n.key)||null,dropAllowed:Ue}}function v(A,u){if(!A)return;var R=u.multiple;return R?A.slice():A.length?[A[0]]:A}var d=function(u){return u};function m(A,u){if(!A)return[];var R=u||{},i=R.processProps,T=i===void 0?d:i,w=Array.isArray(A)?A:[A];return w.map(function(y){var o=y.children,r=Object(Ee.a)(y,D),a=m(o,u);return O.a.createElement(H.a,Object(ve.a)({key:r.key},T(r)),a)})}function g(A){if(!A)return null;var u;if(Array.isArray(A))u={checkedKeys:A,halfCheckedKeys:void 0};else if(Object(be.a)(A)==="object")u={checkedKeys:A.checked||void 0,halfCheckedKeys:A.halfChecked||void 0};else return Object(ue.a)(!1,"`checkedKeys` is not an array or an object"),null;return u}function S(A,u){var R=new Set;function i(T){if(R.has(T))return;var w=Object(e.a)(u,T);if(!w)return;R.add(T);var y=w.parent,o=w.node;if(o.disabled)return;y&&i(y.key)}return(A||[]).forEach(function(T){i(T)}),Object(he.a)(R)}},kQR0:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return Ce});var he=Q("XjgL"),be=Q("yuO0"),ve=Q("6ASS"),Ee=Q("aVTQ"),ue=Q("36hc"),$=Q("kxoy"),O=Q("T/Jt"),H=Q("bBMO"),e=Q("E0BR"),M=Q("cZC0"),D=Q("27eb"),N=Q.n(D),c=Q("1HCi"),l=Q.n(c),s=Q("B/uU"),h=Q("s3yx"),x=Q("tybu"),E=Q("YLkp"),v=Q("IEJz"),d=Q("x/L2"),m=Q("Dpym"),g=Q("TqI3"),S=Q("5Und");function A(Ie){var Ye=Ie.cells,tt=Ie.stickyOffsets,at=Ie.flattenColumns,mt=Ie.rowComponent,ft=Ie.cellComponent,Ze=Ie.onHeaderRow,yt=Ie.index,lt=O.useContext(m.a),gt=lt.prefixCls,xt=lt.direction,bt;Ze&&(bt=Ze(Ye.map(function(Tt){return Tt.column}),yt));var Ot=Object(S.a)(Ye.map(function(Tt){return Tt.column}));return O.createElement(mt,bt,Ye.map(function(Tt,Vt){var Zt=Tt.column,ut=Object(g.a)(Tt.colStart,Tt.colEnd,at,tt,xt),Et;return Zt&&Zt.onHeaderCell&&(Et=Tt.column.onHeaderCell(Zt)),O.createElement(d.a,Object(be.a)({},Tt,{ellipsis:Zt.ellipsis,align:Zt.align,component:ft,prefixCls:gt,key:Ot[Vt]},ut,{additionalProps:Et,rowType:"header"}))}))}A.displayName="HeaderRow";var u=A;function R(Ie){var Ye=[];function tt(Ze,yt){var lt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ye[lt]=Ye[lt]||[];var gt=yt,xt=Ze.filter(Boolean).map(function(bt){var Ot={key:bt.key,className:bt.className||"",children:bt.title,column:bt,colStart:gt},Tt=1,Vt=bt.children;return Vt&&Vt.length>0&&(Tt=tt(Vt,gt,lt+1).reduce(function(Zt,ut){return Zt+ut},0),Ot.hasSubColumns=!0),"colSpan"in bt&&(Tt=bt.colSpan),"rowSpan"in bt&&(Ot.rowSpan=bt.rowSpan),Ot.colSpan=Tt,Ot.colEnd=Ot.colStart+Tt-1,Ye[lt].push(Ot),gt+=Tt,Tt});return xt}tt(Ie,0);for(var at=Ye.length,mt=function(yt){Ye[yt].forEach(function(lt){!("rowSpan"in lt)&&!lt.hasSubColumns&&(lt.rowSpan=at-yt)})},ft=0;ft<at;ft+=1)mt(ft);return Ye}function i(Ie){var Ye=Ie.stickyOffsets,tt=Ie.columns,at=Ie.flattenColumns,mt=Ie.onHeaderRow,ft=O.useContext(m.a),Ze=ft.prefixCls,yt=ft.getComponent,lt=O.useMemo(function(){return R(tt)},[tt]),gt=yt(["header","wrapper"],"thead"),xt=yt(["header","row"],"tr"),bt=yt(["header","cell"],"th");return O.createElement(gt,{className:"".concat(Ze,"-thead")},lt.map(function(Ot,Tt){var Vt=O.createElement(u,{key:Tt,flattenColumns:at,cells:Ot,stickyOffsets:Ye,rowComponent:xt,cellComponent:bt,onHeaderRow:mt,index:Tt});return Vt}))}var T=i,w=Q("ynYK"),y=O.createContext(null),o=y;function r(Ie){var Ye=Ie.prefixCls,tt=Ie.children,at=Ie.component,mt=Ie.cellComponent,ft=Ie.className,Ze=Ie.expanded,yt=Ie.colSpan,lt=Ie.isEmpty,gt=O.useContext(m.a),xt=gt.scrollbarSize,bt=O.useContext(o),Ot=bt.fixHeader,Tt=bt.fixColumn,Vt=bt.componentWidth,Zt=bt.horizonScroll;return O.useMemo(function(){var ut=tt;return(lt?Zt:Tt)&&(ut=O.createElement("div",{style:{width:Vt-(Ot?xt:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ye,"-expanded-row-fixed")},Vt!==0&&ut)),O.createElement(at,{className:ft,style:{display:Ze?null:"none"}},O.createElement(d.a,{component:mt,prefixCls:Ye,colSpan:yt},ut))},[tt,at,ft,Ze,yt,lt,xt,Vt,Tt,Ot,Zt])}var a=r,n=O.createContext(null),t=n;function p(Ie){var Ye=Ie.className,tt=Ie.style,at=Ie.record,mt=Ie.index,ft=Ie.renderIndex,Ze=Ie.rowKey,yt=Ie.rowExpandable,lt=Ie.expandedKeys,gt=Ie.onRow,xt=Ie.indent,bt=xt===void 0?0:xt,Ot=Ie.rowComponent,Tt=Ie.cellComponent,Vt=Ie.childrenColumnName,Zt=O.useContext(m.a),ut=Zt.prefixCls,Et=Zt.fixedInfoList,Lt=O.useContext(w.a),Ht=Lt.flattenColumns,mr=Lt.expandableType,_r=Lt.expandRowByClick,Ar=Lt.onTriggerExpand,nr=Lt.rowClassName,Mt=Lt.expandedRowClassName,sr=Lt.indentSize,Er=Lt.expandIcon,ur=Lt.expandedRowRender,kt=Lt.expandIconColumnIndex,zt=O.useState(!1),Ae=Object(ue.a)(zt,2),se=Ae[0],pe=Ae[1],Re=lt&<.has(Ie.recordKey);O.useEffect(function(){Re&&pe(!0)},[Re]);var Ke=mr==="row"&&(!yt||yt(at)),nt=mr==="nest",ht=Vt&&at&&at[Vt],vt=Ke||nt,K=O.useRef(Ar);K.current=Ar;var b=function(){K.current.apply(K,arguments)},B=gt==null?void 0:gt(at,mt),j=function(pt){var wt;_r&&vt&&b(at,pt);for(var Kt=arguments.length,rr=new Array(Kt>1?Kt-1:0),Wt=1;Wt<Kt;Wt++)rr[Wt-1]=arguments[Wt];B==null||((wt=B.onClick)===null||wt===void 0)||wt.call.apply(wt,[B,pt].concat(rr))},Z;typeof nr=="string"?Z=nr:typeof nr=="function"&&(Z=nr(at,mt,bt));var G=Object(S.a)(Ht),oe=O.createElement(Ot,Object(be.a)({},B,{"data-row-key":Ze,className:N()(Ye,"".concat(ut,"-row"),"".concat(ut,"-row-level-").concat(bt),Z,B&&B.className),style:Object(ve.a)(Object(ve.a)({},tt),B?B.style:null),onClick:j}),Ht.map(function(Xe,pt){var wt=Xe.render,Kt=Xe.dataIndex,rr=Xe.className,Wt=G[pt],Bt=Et[pt],fr;pt===(kt||0)&&nt&&(fr=O.createElement(O.Fragment,null,O.createElement("span",{style:{paddingLeft:"".concat(sr*bt,"px")},className:"".concat(ut,"-row-indent indent-level-").concat(bt)}),Er({prefixCls:ut,expanded:Re,expandable:ht,record:at,onExpand:b})));var qt;return Xe.onCell&&(qt=Xe.onCell(at,mt)),O.createElement(d.a,Object(be.a)({className:rr,ellipsis:Xe.ellipsis,align:Xe.align,component:Tt,prefixCls:ut,key:Wt,record:at,index:mt,renderIndex:ft,dataIndex:Kt,render:wt,shouldCellUpdate:Xe.shouldCellUpdate,expanded:fr&&Re},Bt,{appendNode:fr,additionalProps:qt}))})),He;if(Ke&&(se||Re)){var ct=ur(at,mt,bt+1,Re),_t=Mt&&Mt(at,mt,bt);He=O.createElement(a,{expanded:Re,className:N()("".concat(ut,"-expanded-row"),"".concat(ut,"-expanded-row-level-").concat(bt+1),_t),prefixCls:ut,component:Ot,cellComponent:Tt,colSpan:Ht.length,isEmpty:!1},ct)}return O.createElement(O.Fragment,null,oe,He)}p.displayName="BodyRow";var _=p;function f(Ie,Ye,tt,at,mt,ft){var Ze=[];Ze.push({record:Ie,indent:Ye,index:ft});var yt=mt(Ie),lt=at==null?void 0:at.has(yt);if(Ie&&Array.isArray(Ie[tt])&<)for(var gt=0;gt<Ie[tt].length;gt+=1){var xt=f(Ie[tt][gt],Ye+1,tt,at,mt,gt);Ze.push.apply(Ze,Object(Ee.a)(xt))}return Ze}function F(Ie,Ye,tt,at){var mt=O.useMemo(function(){if(tt==null?void 0:tt.size){for(var ft=[],Ze=0;Ze<(Ie==null?void 0:Ie.length);Ze+=1){var yt=Ie[Ze];ft.push.apply(ft,Object(Ee.a)(f(yt,0,Ye,tt,at,Ze)))}return ft}return Ie==null?void 0:Ie.map(function(lt,gt){return{record:lt,indent:0,index:gt}})},[Ie,Ye,tt,at]);return mt}var P=Q("QOAJ"),W=Q("VbWF");function V(Ie){var Ye=Ie.columnKey,tt=Ie.onColumnResize,at=O.useRef();return O.useEffect(function(){at.current&&tt(Ye,at.current.offsetWidth)},[]),O.createElement(h.a,{data:Ye},O.createElement("td",{ref:at,style:{padding:0,border:0,height:0}},O.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function J(Ie){var Ye=Ie.prefixCls,tt=Ie.columnsKey,at=Ie.onColumnResize;return O.createElement("tr",{"aria-hidden":"true",className:"".concat(Ye,"-measure-row"),style:{height:0,fontSize:0}},O.createElement(h.a.Collection,{onBatchResize:function(ft){ft.forEach(function(Ze){var yt=Ze.data,lt=Ze.size;at(yt,lt.offsetWidth)})}},tt.map(function(mt){return O.createElement(V,{key:mt,columnKey:mt,onColumnResize:at})})))}function ne(Ie){var Ye=Ie.data,tt=Ie.getRowKey,at=Ie.measureColumnWidth,mt=Ie.expandedKeys,ft=Ie.onRow,Ze=Ie.rowExpandable,yt=Ie.emptyNode,lt=Ie.childrenColumnName,gt=O.useContext(t),xt=gt.onColumnResize,bt=O.useContext(m.a),Ot=bt.prefixCls,Tt=bt.getComponent,Vt=O.useContext(w.a),Zt=Vt.flattenColumns,ut=F(Ye,lt,mt,tt),Et=O.useRef({renderWithProps:!1}),Lt=O.useState(-1),Ht=Object(ue.a)(Lt,2),mr=Ht[0],_r=Ht[1],Ar=O.useState(-1),nr=Object(ue.a)(Ar,2),Mt=nr[0],sr=nr[1],Er=O.useCallback(function(kt,zt){_r(kt),sr(zt)},[]),ur=O.useMemo(function(){var kt=Tt(["body","wrapper"],"tbody"),zt=Tt(["body","row"],"tr"),Ae=Tt(["body","cell"],"td"),se;Ye.length?se=ut.map(function(Re,Ke){var nt=Re.record,ht=Re.indent,vt=Re.index,K=tt(nt,Ke);return O.createElement(_,{key:K,rowKey:K,record:nt,recordKey:K,index:Ke,renderIndex:vt,rowComponent:zt,cellComponent:Ae,expandedKeys:mt,onRow:ft,getRowKey:tt,rowExpandable:Ze,childrenColumnName:lt,indent:ht})}):se=O.createElement(a,{expanded:!0,className:"".concat(Ot,"-placeholder"),prefixCls:Ot,component:zt,cellComponent:Ae,colSpan:Zt.length,isEmpty:!0},yt);var pe=Object(S.a)(Zt);return O.createElement(kt,{className:"".concat(Ot,"-tbody")},at&&O.createElement(J,{prefixCls:Ot,columnsKey:pe,onColumnResize:xt}),se)},[Ye,Ot,ft,at,mt,tt,Tt,yt,Zt,lt,xt,Ze,ut]);return O.createElement(W.a.Provider,{value:Et.current},O.createElement(P.a.Provider,{value:{startRow:mr,endRow:Mt,onHover:Er}},ur))}var ce=O.memo(ne);ce.displayName="Body";var ie=ce,xe=Q("Gq82");function ge(Ie){var Ye=Object(O.useRef)(Ie),tt=Object(O.useState)({}),at=Object(ue.a)(tt,2),mt=at[1],ft=Object(O.useRef)(null),Ze=Object(O.useRef)([]);function yt(lt){Ze.current.push(lt);var gt=Promise.resolve();ft.current=gt,gt.then(function(){if(ft.current===gt){var xt=Ze.current,bt=Ye.current;Ze.current=[],xt.forEach(function(Ot){Ye.current=Ot(Ye.current)}),ft.current=null,bt!==Ye.current&&mt({})}})}return Object(O.useEffect)(function(){return function(){ft.current=null}},[]),[Ye.current,yt]}function de(Ie){var Ye=Object(O.useRef)(Ie||null),tt=Object(O.useRef)();function at(){window.clearTimeout(tt.current)}function mt(Ze){Ye.current=Ze,at(),tt.current=window.setTimeout(function(){Ye.current=null,tt.current=void 0},100)}function ft(){return Ye.current}return Object(O.useEffect)(function(){return at},[]),[mt,ft]}function Fe(Ie,Ye,tt){var at=Object(O.useMemo)(function(){for(var mt=[],ft=[],Ze=0,yt=0,lt=0;lt<Ye;lt+=1)if(tt==="rtl"){ft[lt]=yt,yt+=Ie[lt]||0;var gt=Ye-lt-1;mt[gt]=Ze,Ze+=Ie[gt]||0}else{mt[lt]=Ze,Ze+=Ie[lt]||0;var xt=Ye-lt-1;ft[xt]=yt,yt+=Ie[xt]||0}return{left:mt,right:ft}},[Ie,Ye,tt]);return at}var Qe=Fe,Ve=Q("fNpE"),Ne=Q("+E2i"),Ue=["columnType"];function q(Ie){for(var Ye=Ie.colWidths,tt=Ie.columns,at=Ie.columCount,mt=[],ft=at||tt.length,Ze=!1,yt=ft-1;yt>=0;yt-=1){var lt=Ye[yt],gt=tt&&tt[yt],xt=gt&>[Ne.a];if(lt||xt||Ze){var bt=xt||{},Ot=bt.columnType,Tt=Object(Ve.a)(bt,Ue);mt.unshift(O.createElement("col",Object(be.a)({key:yt,style:{width:lt}},Tt))),Ze=!0}}return O.createElement("colgroup",null,mt)}var k=q;function z(Ie){var Ye=Ie.className,tt=Ie.children;return O.createElement("div",{className:Ye},tt)}var X=z,re=Q("YA0V");function te(Ie){var Ye,tt=Ie.prefixCls,at=Ie.record,mt=Ie.onExpand,ft=Ie.expanded,Ze=Ie.expandable,yt="".concat(tt,"-row-expand-icon");if(!Ze)return O.createElement("span",{className:N()(yt,"".concat(tt,"-row-spaced"))});var lt=function(xt){mt(at,xt),xt.stopPropagation()};return O.createElement("span",{className:N()(yt,(Ye={},Object(he.a)(Ye,"".concat(tt,"-row-expanded"),ft),Object(he.a)(Ye,"".concat(tt,"-row-collapsed"),!ft),Ye)),onClick:lt})}function ae(Ie,Ye,tt){var at=[];function mt(ft){(ft||[]).forEach(function(Ze,yt){at.push(Ye(Ze,yt)),mt(Ze[tt])})}return mt(Ie),at}var ye=Q("1bEF"),Le=Q("tty/"),Pe=function(Ye,tt){var at,mt,ft=Ye.scrollBodyRef,Ze=Ye.onScroll,yt=Ye.offsetScroll,lt=Ye.container,gt=O.useContext(m.a),xt=gt.prefixCls,bt=((at=ft.current)===null||at===void 0?void 0:at.scrollWidth)||0,Ot=((mt=ft.current)===null||mt===void 0?void 0:mt.clientWidth)||0,Tt=bt&&Ot*(Ot/bt),Vt=O.useRef(),Zt=ge({scrollLeft:0,isHiddenScrollBar:!1}),ut=Object(ue.a)(Zt,2),Et=ut[0],Lt=ut[1],Ht=O.useRef({delta:0,x:0}),mr=O.useState(!1),_r=Object(ue.a)(mr,2),Ar=_r[0],nr=_r[1],Mt=function(){nr(!1)},sr=function(Ae){Ae.persist(),Ht.current.delta=Ae.pageX-Et.scrollLeft,Ht.current.x=0,nr(!0),Ae.preventDefault()},Er=function(Ae){var se,pe=Ae||((se=window)===null||se===void 0?void 0:se.event),Re=pe.buttons;if(!Ar||Re===0){Ar&&nr(!1);return}var Ke=Ht.current.x+Ae.pageX-Ht.current.x-Ht.current.delta;Ke<=0&&(Ke=0),Ke+Tt>=Ot&&(Ke=Ot-Tt),Ze({scrollLeft:Ke/Ot*(bt+2)}),Ht.current.x=Ae.pageX},ur=function(){if(!ft.current)return;var Ae=Object(Le.b)(ft.current).top,se=Ae+ft.current.offsetHeight,pe=lt===window?document.documentElement.scrollTop+window.innerHeight:Object(Le.b)(lt).top+lt.clientHeight;se-Object(x.a)()<=pe||Ae>=pe-yt?Lt(function(Re){return Object(ve.a)(Object(ve.a)({},Re),{},{isHiddenScrollBar:!0})}):Lt(function(Re){return Object(ve.a)(Object(ve.a)({},Re),{},{isHiddenScrollBar:!1})})},kt=function(Ae){Lt(function(se){return Object(ve.a)(Object(ve.a)({},se),{},{scrollLeft:Ae/bt*Ot||0})})};return O.useImperativeHandle(tt,function(){return{setScrollLeft:kt}}),O.useEffect(function(){var zt=Object(ye.a)(document.body,"mouseup",Mt,!1),Ae=Object(ye.a)(document.body,"mousemove",Er,!1);return ur(),function(){zt.remove(),Ae.remove()}},[Tt,Ar]),O.useEffect(function(){var zt=Object(ye.a)(lt,"scroll",ur,!1),Ae=Object(ye.a)(window,"resize",ur,!1);return function(){zt.remove(),Ae.remove()}},[lt]),O.useEffect(function(){Et.isHiddenScrollBar||Lt(function(zt){var Ae=ft.current;return Ae?Object(ve.a)(Object(ve.a)({},zt),{},{scrollLeft:Ae.scrollLeft/Ae.scrollWidth*Ae.clientWidth}):zt})},[Et.isHiddenScrollBar]),bt<=Ot||!Tt||Et.isHiddenScrollBar?null:O.createElement("div",{style:{height:Object(x.a)(),width:Ot,bottom:yt},className:"".concat(xt,"-sticky-scroll")},O.createElement("div",{onMouseDown:sr,ref:Vt,className:N()("".concat(xt,"-sticky-scroll-bar"),Object(he.a)({},"".concat(xt,"-sticky-scroll-bar-active"),Ar)),style:{width:"".concat(Tt,"px"),transform:"translate3d(".concat(Et.scrollLeft,"px, 0, 0)")}}))},ke=O.forwardRef(Pe),Je=Q("Zfln"),qe=Object(Je.a)()?window:null;function it(Ie,Ye){var tt=Object($.a)(Ie)==="object"?Ie:{},at=tt.offsetHeader,mt=at===void 0?0:at,ft=tt.offsetSummary,Ze=ft===void 0?0:ft,yt=tt.offsetScroll,lt=yt===void 0?0:yt,gt=tt.getContainer,xt=gt===void 0?function(){return qe}:gt,bt=xt()||qe;return O.useMemo(function(){var Ot=!!Ie;return{isSticky:Ot,stickyClassName:Ot?"".concat(Ye,"-sticky-holder"):"",offsetHeader:mt,offsetSummary:Ze,offsetScroll:lt,container:bt}},[lt,mt,Ze,Ye,bt])}var rt=Q("Eiay"),et=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function At(Ie,Ye){return Object(O.useMemo)(function(){for(var tt=[],at=0;at<Ye;at+=1){var mt=Ie[at];if(mt!==void 0)tt[at]=mt;else return null}return tt},[Ie.join("_"),Ye])}var We=O.forwardRef(function(Ie,Ye){var tt=Ie.className,at=Ie.noData,mt=Ie.columns,ft=Ie.flattenColumns,Ze=Ie.colWidths,yt=Ie.columCount,lt=Ie.stickyOffsets,gt=Ie.direction,xt=Ie.fixHeader,bt=Ie.stickyTopOffset,Ot=Ie.stickyBottomOffset,Tt=Ie.stickyClassName,Vt=Ie.onScroll,Zt=Ie.maxContentScroll,ut=Ie.children,Et=Object(Ve.a)(Ie,et),Lt=O.useContext(m.a),Ht=Lt.prefixCls,mr=Lt.scrollbarSize,_r=Lt.isSticky,Ar=_r&&!xt?0:mr,nr=O.useRef(null),Mt=O.useCallback(function(pe){Object(rt.b)(Ye,pe),Object(rt.b)(nr,pe)},[]);O.useEffect(function(){var pe;function Re(Ke){var nt=Ke.currentTarget,ht=Ke.deltaX;ht&&(Vt({currentTarget:nt,scrollLeft:nt.scrollLeft+ht}),Ke.preventDefault())}return(pe=nr.current)===null||pe===void 0||pe.addEventListener("wheel",Re),function(){var Ke;(Ke=nr.current)===null||Ke===void 0||Ke.removeEventListener("wheel",Re)}},[]);var sr=O.useMemo(function(){return ft.every(function(pe){return pe.width>=0})},[ft]),Er=ft[ft.length-1],ur={fixed:Er?Er.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Ht,"-cell-scrollbar")}}},kt=Object(O.useMemo)(function(){return Ar?[].concat(Object(Ee.a)(mt),[ur]):mt},[Ar,mt]),zt=Object(O.useMemo)(function(){return Ar?[].concat(Object(Ee.a)(ft),[ur]):ft},[Ar,ft]),Ae=Object(O.useMemo)(function(){var pe=lt.right,Re=lt.left;return Object(ve.a)(Object(ve.a)({},lt),{},{left:gt==="rtl"?[].concat(Object(Ee.a)(Re.map(function(Ke){return Ke+Ar})),[0]):Re,right:gt==="rtl"?pe:[].concat(Object(Ee.a)(pe.map(function(Ke){return Ke+Ar})),[0]),isSticky:_r})},[Ar,lt,_r]),se=At(Ze,yt);return O.createElement("div",{style:Object(ve.a)({overflow:"hidden"},_r?{top:bt,bottom:Ot}:{}),ref:Mt,className:N()(tt,Object(he.a)({},Tt,!!Tt))},O.createElement("table",{style:{tableLayout:"fixed",visibility:at||se?null:"hidden"}},(!at||!Zt||sr)&&O.createElement(k,{colWidths:se?[].concat(Object(Ee.a)(se),[Ar]):[],columCount:yt+1,columns:zt}),ut(Object(ve.a)(Object(ve.a)({},Et),{},{stickyOffsets:Ae,columns:kt,flattenColumns:zt}))))});We.displayName="FixedHolder";var Ge=We,De=Q("3GYr"),Te=Q("MRIS"),Oe=Q("VUat"),le=[],fe={},Ce="rc-table-internal-hook",we=O.memo(function(Ie){var Ye=Ie.children;return Ye},function(Ie,Ye){return l()(Ie.props,Ye.props)?Ie.pingLeft!==Ye.pingLeft||Ie.pingRight!==Ye.pingRight:!1});function Me(Ie){var Ye,tt=Ie.prefixCls,at=Ie.className,mt=Ie.rowClassName,ft=Ie.style,Ze=Ie.data,yt=Ie.rowKey,lt=Ie.scroll,gt=Ie.tableLayout,xt=Ie.direction,bt=Ie.title,Ot=Ie.footer,Tt=Ie.summary,Vt=Ie.id,Zt=Ie.showHeader,ut=Ie.components,Et=Ie.emptyText,Lt=Ie.onRow,Ht=Ie.onHeaderRow,mr=Ie.internalHooks,_r=Ie.transformColumns,Ar=Ie.internalRefs,nr=Ie.sticky,Mt=Ze||le,sr=!!Mt.length,Er=O.useCallback(function($t,hr){return Object(S.b)(ut||{},$t)||hr},[ut]),ur=O.useMemo(function(){return typeof yt=="function"?yt:function($t){var hr=$t&&$t[yt];return hr}},[yt]),kt=Object(Ne.b)(Ie),zt=kt.expandIcon,Ae=kt.expandedRowKeys,se=kt.defaultExpandedRowKeys,pe=kt.defaultExpandAllRows,Re=kt.expandedRowRender,Ke=kt.columnTitle,nt=kt.onExpand,ht=kt.onExpandedRowsChange,vt=kt.expandRowByClick,K=kt.rowExpandable,b=kt.expandIconColumnIndex,B=kt.expandedRowClassName,j=kt.childrenColumnName,Z=kt.indentSize,G=zt||te,oe=j||"children",He=O.useMemo(function(){return Re?"row":Ie.expandable&&mr===Ce&&Ie.expandable.__PARENT_RENDER_ICON__||Mt.some(function($t){return $t&&Object($.a)($t)==="object"&&$t[oe]})?"nest":!1},[!!Re,Mt]),ct=O.useState(function(){return se||(pe?ae(Mt,ur,oe):[])}),_t=Object(ue.a)(ct,2),Xe=_t[0],pt=_t[1],wt=O.useMemo(function(){return new Set(Ae||Xe||[])},[Ae,Xe]),Kt=O.useCallback(function($t){var hr=ur($t,Mt.indexOf($t)),tr,sn=wt.has(hr);sn?(wt.delete(hr),tr=Object(Ee.a)(wt)):tr=[].concat(Object(Ee.a)(wt),[hr]),pt(tr),nt&&nt(!sn,$t),ht&&ht(tr)},[ur,wt,Mt,nt,ht]),rr=O.useState(0),Wt=Object(ue.a)(rr,2),Bt=Wt[0],fr=Wt[1],qt=Object(xe.b)(Object(ve.a)(Object(ve.a)(Object(ve.a)({},Ie),kt),{},{expandable:!!Re,columnTitle:Ke,expandedKeys:wt,getRowKey:ur,onTriggerExpand:Kt,expandIcon:G,expandIconColumnIndex:b,direction:xt}),mr===Ce?_r:null),Lr=Object(ue.a)(qt,2),gr=Lr[0],er=Lr[1],Sr=O.useMemo(function(){return{columns:gr,flattenColumns:er}},[gr,er]),xr=O.useRef(),Rr=O.useRef(),lr=O.useRef(),Fr=O.useRef(),Kr=O.useRef(),Pr=O.useState(!1),Ir=Object(ue.a)(Pr,2),yr=Ir[0],Ur=Ir[1],Nr=O.useState(!1),dr=Object(ue.a)(Nr,2),cr=dr[0],Or=dr[1],ir=ge(new Map),jr=Object(ue.a)(ir,2),jt=jr[0],Yt=jr[1],Dt=Object(S.a)(er),pr=Dt.map(function($t){return jt.get($t)}),Qt=O.useMemo(function(){return pr},[pr.join("_")]),Jt=Qe(Qt,er.length,xt),Gt=lt&&Object(S.c)(lt.y),kr=lt&&Object(S.c)(lt.x)||Boolean(kt.fixed),Xr=kr&&er.some(function($t){var hr=$t.fixed;return hr}),Cn=O.useRef(),Wr=it(nr,tt),Yr=Wr.isSticky,mn=Wr.offsetHeader,qr=Wr.offsetSummary,Hn=Wr.offsetScroll,Gr=Wr.stickyClassName,xn=Wr.container,Mr=Tt==null?void 0:Tt(Mt),dn=(Gt||Yr)&&O.isValidElement(Mr)&&Mr.type===De.a&&Mr.props.fixed,Tn,$r,nn;Gt&&($r={overflowY:"scroll",maxHeight:lt.y}),kr&&(Tn={overflowX:"auto"},Gt||($r={overflowY:"hidden"}),nn={width:(lt==null?void 0:lt.x)===!0?"auto":lt==null?void 0:lt.x,minWidth:"100%"});var ln=O.useCallback(function($t,hr){Object(H.a)(xr.current)&&Yt(function(tr){if(tr.get($t)!==hr){var sn=new Map(tr);return sn.set($t,hr),sn}return tr})},[]),Bn=de(null),gn=Object(ue.a)(Bn,2),en=gn[0],an=gn[1];function cn($t,hr){if(!hr)return;typeof hr=="function"?hr($t):hr.scrollLeft!==$t&&(hr.scrollLeft=$t)}var An=function(hr){var tr=hr.currentTarget,sn=hr.scrollLeft,Fi=xt==="rtl",Sn=typeof sn=="number"?sn:tr.scrollLeft,bi=tr||fe;if(!an()||an()===bi){var Qn;en(bi),cn(Sn,Rr.current),cn(Sn,lr.current),cn(Sn,Kr.current),cn(Sn,(Qn=Cn.current)===null||Qn===void 0?void 0:Qn.setScrollLeft)}if(tr){var si=tr.scrollWidth,oi=tr.clientWidth;if(si===oi){Ur(!1),Or(!1);return}Fi?(Ur(-Sn<si-oi),Or(-Sn>0)):(Ur(Sn>0),Or(Sn<si-oi))}},tn=function(){kr&&lr.current?An({currentTarget:lr.current}):(Ur(!1),Or(!1))},hn=function(hr){var tr=hr.width;tr!==Bt&&(tn(),fr(xr.current?xr.current.offsetWidth:tr))},Jn=O.useRef(!1);O.useEffect(function(){Jn.current&&tn()},[kr,Ze,gr.length]),O.useEffect(function(){Jn.current=!0},[]);var mi=O.useState(0),gi=Object(ue.a)(mi,2),vn=gi[0],Oi=gi[1],oa=O.useState(!0),Li=Object(ue.a)(oa,2),la=Li[0],vi=Li[1];O.useEffect(function(){lr.current instanceof Element?Oi(Object(x.b)(lr.current).width):Oi(Object(x.b)(Fr.current).width),vi(Object(M.a)("position","sticky"))},[]),O.useEffect(function(){mr===Ce&&Ar&&(Ar.body.current=lr.current)});var yi=Er(["table"],"table"),Zn=O.useMemo(function(){return gt||(Xr?(lt==null?void 0:lt.x)==="max-content"?"auto":"fixed":Gt||Yr||er.some(function($t){var hr=$t.ellipsis;return hr})?"fixed":"auto")},[Gt,Xr,er,gt,Yr]),Fn,In={colWidths:Qt,columCount:er.length,stickyOffsets:Jt,onHeaderRow:Ht,fixHeader:Gt,scroll:lt},Tr=O.useMemo(function(){return sr?null:typeof Et=="function"?Et():Et},[sr,Et]),Di=O.createElement(ie,{data:Mt,measureColumnWidth:Gt||kr||Yr,expandedKeys:wt,rowExpandable:K,getRowKey:ur,onRow:Lt,emptyNode:Tr,childrenColumnName:oe}),ai=O.createElement(k,{colWidths:er.map(function($t){var hr=$t.width;return hr}),columns:er}),_i=Er(["body"]);if(Gt||Yr){var On;typeof _i=="function"?(On=_i(Mt,{scrollbarSize:vn,ref:lr,onScroll:An}),In.colWidths=er.map(function($t,hr){var tr=$t.width,sn=hr===gr.length-1?tr-vn:tr;return typeof sn=="number"&&!Number.isNaN(sn)?sn:(Object(s.a)(!1,"When use `components.body` with render props. Each column should have a fixed `width` value."),0)})):On=O.createElement("div",{style:Object(ve.a)(Object(ve.a)({},Tn),$r),onScroll:An,ref:lr,className:N()("".concat(tt,"-body"))},O.createElement(yi,{style:Object(ve.a)(Object(ve.a)({},nn),{},{tableLayout:Zn})},ai,Di,!dn&&Mr&&O.createElement(re.b,{stickyOffsets:Jt,flattenColumns:er},Mr)));var fn=Object(ve.a)(Object(ve.a)(Object(ve.a)({noData:!Mt.length,maxContentScroll:kr&<.x==="max-content"},In),Sr),{},{direction:xt,stickyClassName:Gr,onScroll:An});Fn=O.createElement(O.Fragment,null,Zt!==!1&&O.createElement(Ge,Object(be.a)({},fn,{stickyTopOffset:mn,className:"".concat(tt,"-header"),ref:Rr}),function($t){return O.createElement(O.Fragment,null,O.createElement(T,$t),dn==="top"&&O.createElement(re.b,$t,Mr))}),On,dn&&dn!=="top"&&O.createElement(Ge,Object(be.a)({},fn,{stickyBottomOffset:qr,className:"".concat(tt,"-summary"),ref:Kr}),function($t){return O.createElement(re.b,$t,Mr)}),Yr&&O.createElement(ke,{ref:Cn,offsetScroll:Hn,scrollBodyRef:lr,onScroll:An,container:xn}))}else Fn=O.createElement("div",{style:Object(ve.a)(Object(ve.a)({},Tn),$r),className:N()("".concat(tt,"-content")),onScroll:An,ref:lr},O.createElement(yi,{style:Object(ve.a)(Object(ve.a)({},nn),{},{tableLayout:Zn})},ai,Zt!==!1&&O.createElement(T,Object(be.a)({},In,Sr)),Di,Mr&&O.createElement(re.b,{stickyOffsets:Jt,flattenColumns:er},Mr)));var Aa=Object(e.a)(Ie,{aria:!0,data:!0}),yn=O.createElement("div",Object(be.a)({className:N()(tt,at,(Ye={},Object(he.a)(Ye,"".concat(tt,"-rtl"),xt==="rtl"),Object(he.a)(Ye,"".concat(tt,"-ping-left"),yr),Object(he.a)(Ye,"".concat(tt,"-ping-right"),cr),Object(he.a)(Ye,"".concat(tt,"-layout-fixed"),gt==="fixed"),Object(he.a)(Ye,"".concat(tt,"-fixed-header"),Gt),Object(he.a)(Ye,"".concat(tt,"-fixed-column"),Xr),Object(he.a)(Ye,"".concat(tt,"-scroll-horizontal"),kr),Object(he.a)(Ye,"".concat(tt,"-has-fix-left"),er[0]&&er[0].fixed),Object(he.a)(Ye,"".concat(tt,"-has-fix-right"),er[er.length-1]&&er[er.length-1].fixed==="right"),Ye)),style:ft,id:Vt,ref:xr},Aa),O.createElement(we,{pingLeft:yr,pingRight:cr,props:Object(ve.a)(Object(ve.a)({},Ie),{},{stickyOffsets:Jt,mergedExpandedKeys:wt})},bt&&O.createElement(X,{className:"".concat(tt,"-title")},bt(Mt)),O.createElement("div",{ref:Fr,className:"".concat(tt,"-container")},Fn),Ot&&O.createElement(X,{className:"".concat(tt,"-footer")},Ot(Mt))));kr&&(yn=O.createElement(h.a,{onResize:hn},yn));var Hr=O.useMemo(function(){return{prefixCls:tt,getComponent:Er,scrollbarSize:vn,direction:xt,fixedInfoList:er.map(function($t,hr){return Object(g.a)(hr,hr,er,Jt,xt)}),isSticky:Yr}},[tt,Er,vn,xt,er,Jt,Yr]),Ui=O.useMemo(function(){return Object(ve.a)(Object(ve.a)({},Sr),{},{tableLayout:Zn,rowClassName:mt,expandedRowClassName:B,expandIcon:G,expandableType:He,expandRowByClick:vt,expandedRowRender:Re,onTriggerExpand:Kt,expandIconColumnIndex:b,indentSize:Z,allColumnsFixedLeft:Sr.flattenColumns.every(function($t){return $t.fixed==="left"})})},[Sr,Zn,mt,B,G,He,vt,Re,Kt,b,Z]),Vr=O.useMemo(function(){return{componentWidth:Bt,fixHeader:Gt,fixColumn:Xr,horizonScroll:kr}},[Bt,Gt,Xr,kr]),Ei=O.useMemo(function(){return{onColumnResize:ln}},[ln]);return O.createElement(Te.a.Provider,{value:la},O.createElement(m.a.Provider,{value:Hr},O.createElement(w.a.Provider,{value:Ui},O.createElement(o.Provider,{value:Vr},O.createElement(t.Provider,{value:Ei},yn)))))}Me.EXPAND_COLUMN=Oe.a,Me.Column=v.a,Me.ColumnGroup=E.a,Me.Summary=re.a,Me.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var $e=_e.b=Me},kYCC:function(dt,_e,Q){"use strict";var he=Q("kQR0"),be=Q("YA0V");Q.d(_e,"b",function(){return be.a});var ve=Q("IEJz"),Ee=Q("YLkp"),ue=Q("+E2i");Q.d(_e,"a",function(){return ue.a}),_e.c=he.b},nEHx:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return he});var he;(function(be){be.DARK="dark",be.LIGHT="light",be.HIGH_CONTRAST="hc"})(he||(he={}))},nnTU:function(dt,_e,Q){"use strict";Q.d(_e,"b",function(){return O}),Q.d(_e,"a",function(){return H});var he=Q("MI8n"),be=Q("JYp7"),ve=Q("pmY6"),Ee=Q("24hK"),ue=Q("746U"),$=Q("Cg/j");const O=Object($.c)("commandService"),H=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new he.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,M){if(!e)throw new Error("invalid command");if(typeof e=="string"){if(!M)throw new Error("invalid command");return this.registerCommand({id:e,handler:M})}if(e.description){const s=[];for(let x of e.description.args)s.push(x.constraint);const h=e.handler;e.handler=function(x,...E){return Object(ue.o)(E,s),h(x,...E)}}const{id:D}=e;let N=this._commands.get(D);N||(N=new Ee.a,this._commands.set(D,N));let c=N.unshift(e),l=Object(ve.i)(()=>{c();const s=this._commands.get(D);(s==null?void 0:s.isEmpty())&&this._commands.delete(D)});return this._onDidRegisterCommand.fire(D),l}registerCommandAlias(e,M){return H.registerCommand(e,(D,...N)=>D.get(O).executeCommand(M,...N))}getCommand(e){const M=this._commands.get(e);return!M||M.isEmpty()?void 0:be.a.first(M)}getCommands(){const e=new Map;for(const M of this._commands.keys()){const D=this.getCommand(M);D&&e.set(M,D)}return e}};H.registerCommand("noop",()=>{})},o46R:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return ve});var he=Q("U8pU");function be(Ee,ue){if(Object(he.a)(Ee)!=="object"||Ee===null)return Ee;var $=Ee[Symbol.toPrimitive];if($!==void 0){var O=$.call(Ee,ue||"default");if(Object(he.a)(O)!=="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return(ue==="string"?String:Number)(Ee)}function ve(Ee){var ue=be(Ee,"string");return Object(he.a)(ue)==="symbol"?ue:String(ue)}},p5ED:function(dt,_e,Q){"use strict";var he=Q("dLI4"),be=Q("4d5L"),ve=Q("YfA7"),Ee=Q("e4Gi"),ue=Q("YaWb"),$=Q("IYef"),O=Q("Hqw+"),H=Q("XXmO"),e=Q.n(H),M=Q("T/Jt"),D=Q.n(M),N=Q("vHTk"),c=Q.n(N),l=Q("yEEn"),s=Q("ZW9T"),h=Q("1vsH"),x=Q("V0Rq"),E=Q("m3rI");_e.a=function(v){var d,m,g,S,A,u,R,i=v.editOffice,T=i===void 0?"view":i,w=v.data,y=v.theme,o=v.type,r=v.filename,a=v.monacoEditor,n=v.className,t=v.style,p=v.close,_=v.onClose,f=v.hasMask,F=v.disabledDownload,P=Object(M.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),W=Object(O.a)(P,2),V=W[0],J=W[1],ne=Object(M.useState)(""),ce=Object(O.a)(ne,2),ie=ce[0],xe=ce[1],ge=Object(M.useState)(),de=Object(O.a)(ge,2),Fe=de[0],Qe=de[1],Ve=window.ENV==="build"?"/react/build":"",Ne=E.a.PROXY_SERVER||location.origin,Ue,q=1024*1024,k=10*q,z=Object(M.useRef)();(d=w)!==null&&d!==void 0&&d.startsWith("/api")&&o!=="txt"&&(w=E.a.API_SERVER+w),o==="office"&&(Ue=Object(h.U)(w).filesize,Ue>k&&(o="other")),r&&a&&(a.filename=r),Object(M.useEffect)(function(){var ae,ye,Le=(ae=document.cookie)===null||ae===void 0||((ye=ae.replace(/\s/g,""))===null||ye===void 0)?void 0:ye.split(";");Le==null||Le.map(function(Pe){var ke=Pe.split("=");ke[0]==="_educoder_session"&&xe(ke[1])})},[]),Object(M.useEffect)(function(){o==="office"&&X()},[o,w]);var X=function(){var ae=Object($.a)(e.a.mark(function ye(){var Le,Pe,ke;return e.a.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return console.log("data:",w),Le=w,w.startsWith("http")||(Le=location.origin+Le),Pe=new URL(Le).pathname.split("/").pop(),qe.next=6,Object(x.V)({attachment_id:Pe});case 6:ke=qe.sent,Qe(ke);case 8:case"end":return qe.stop()}},ye)}));return function(){return ae.apply(this,arguments)}}(),re=function(){if(w.startsWith("http")||w.startsWith("blob:")){te();return}Object(h.z)(r||"educoder",w,r)},te=function(){Object(h.x)(r||"educoder",decodeURIComponent(w))};return D.a.createElement("div",{style:Object(ue.a)({},t||{}),className:"".concat(f&&c.a.bgBlack," ").concat(o?c.a.wrp:"hide")},p&&D.a.createElement("div",{className:c.a.close,ref:z},!F&&D.a.createElement(Ee.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return z.current}},D.a.createElement("span",{onClick:te},D.a.createElement("i",{className:"icon-quxiaozhiding"}))),D.a.createElement(Ee.a,{title:"\u5173\u95ED",getPopupContainer:function(){return z.current}},D.a.createElement("span",{className:"",onClick:_},D.a.createElement("i",{className:"icon-guanbi1"})))),D.a.createElement("div",{className:"".concat(c.a[n]," ").concat(n," ").concat(c.a.monaco," ").concat(o==="txt"?"show":"hide")},o==="txt"&&D.a.createElement(s.b,a)),o==="audio"&&D.a.createElement("audio",{src:"".concat(((m=w)===null||m===void 0?void 0:m.indexOf("http://"))>-1||((g=w)===null||g===void 0?void 0:g.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(w),autoPlay:!0}),o==="video"&&D.a.createElement(D.a.Fragment,null,((S=w)===null||S===void 0?void 0:S.indexOf("http"))>-1?D.a.createElement("video",{controls:!0,src:"".concat(w),autoPlay:!0}):D.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(w),autoPlay:!0})),o==="office"&&Fe&&D.a.createElement("iframe",{src:"".concat(Ve,"/office.html?key=").concat(Fe.key,"&url=").concat(Ne+Fe.url,"&callbackUrl=").concat(Ne+Fe.callbackUrl,"&fileType=").concat(Fe.fileType,"&title=").concat(Fe.title,"&model=").concat(T,"&officeServer=").concat(E.a.OFFICE_SERVER,"&disabledDownload=").concat(!!F)}),o==="html"&&D.a.createElement("iframe",{src:w+"&disposition=inline"}),o==="pdf"&&D.a.createElement("iframe",{src:"".concat(Ve,"/js/pdfview/index.html?url=").concat(w,"&disabledDownload=").concat(!!F)}),o==="image"&&D.a.createElement("img",{src:"".concat(((A=w)===null||A===void 0?void 0:A.indexOf("http://"))>-1||((u=w)===null||u===void 0?void 0:u.indexOf("https://"))>-1||(R=w)!==null&&R!==void 0&&R.startsWith("/api")?"":"data:image/png;base64,").concat(w)}),o==="other"&&D.a.createElement("div",null,D.a.createElement(be.a,{type:"primary",size:"large",onClick:re},D.a.createElement(l.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),o==="download"&&D.a.createElement(be.a,{type:"primary",size:"large",onClick:re},D.a.createElement(l.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},pmY6:function(dt,_e,Q){"use strict";Q.d(_e,"h",function(){return M}),Q.d(_e,"g",function(){return N}),Q.d(_e,"f",function(){return c}),Q.d(_e,"e",function(){return l}),Q.d(_e,"i",function(){return s}),Q.d(_e,"b",function(){return h}),Q.d(_e,"a",function(){return x}),Q.d(_e,"d",function(){return E}),Q.d(_e,"c",function(){return v});var he=Q("C/vA"),be=Q("JYp7");const ve=!1;let Ee=null;function ue(d){Ee=d}if(ve){const d="__is_disposable_tracked__";ue(new class{trackDisposable(m){const g=new Error("Potentially leaked disposable").stack;setTimeout(()=>{m[d]||console.log(g)},3e3)}setParent(m,g){if(m&&m!==x.None)try{m[d]=!0}catch(S){}}markAsDisposed(m){if(m&&m!==x.None)try{m[d]=!0}catch(g){}}markAsSingleton(m){}})}function $(d){return Ee==null||Ee.trackDisposable(d),d}function O(d){Ee==null||Ee.markAsDisposed(d)}function H(d,m){Ee==null||Ee.setParent(d,m)}function e(d,m){if(!Ee)return;for(const g of d)Ee.setParent(g,m)}function M(d){return Ee==null||Ee.markAsSingleton(d),d}class D extends Error{constructor(d){super(`Encountered errors while disposing of store. Errors: [${d.join(", ")}]`);this.errors=d}}function N(d){return typeof d.dispose=="function"&&d.dispose.length===0}function c(d){if(be.a.is(d)){let m=[];for(const g of d)if(g)try{g.dispose()}catch(S){m.push(S)}if(m.length===1)throw m[0];if(m.length>1)throw new D(m);return Array.isArray(d)?[]:d}else if(d)return d.dispose(),d}function l(...d){const m=s(()=>c(d));return e(d,m),m}function s(d){const m=$({dispose:Object(he.a)(()=>{O(m),d()})});return m}class h{constructor(){this._toDispose=new Set,this._isDisposed=!1,$(this)}dispose(){if(this._isDisposed)return;O(this),this._isDisposed=!0,this.clear()}clear(){try{c(this._toDispose.values())}finally{this._toDispose.clear()}}add(d){if(!d)return d;if(d===this)throw new Error("Cannot register a disposable on itself!");return H(d,this),this._isDisposed?h.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(d),d}}h.DISABLE_DISPOSED_WARNING=!1;class x{constructor(){this._store=new h,$(this),H(this._store,this)}dispose(){O(this),this._store.dispose()}_register(d){if(d===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(d)}}x.None=Object.freeze({dispose(){}});class E{constructor(){this._isDisposed=!1,$(this)}get value(){return this._isDisposed?void 0:this._value}set value(d){var m;if(this._isDisposed||d===this._value)return;(m=this._value)===null||m===void 0||m.dispose(),d&&H(d,this),this._value=d}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,O(this),(d=this._value)===null||d===void 0||d.dispose(),this._value=void 0}clearAndLeak(){const d=this._value;return this._value=void 0,d&&H(d,null),d}}class v{constructor(d){this.object=d}dispose(){}}},psGv:function(dt,_e,Q){var he,be;(function(){var ve;(function(){"use strict";var O=[,,function(D){function N(s){this.__parent=s,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}N.prototype.clone_empty=function(){var s=new N(this.__parent);return s.set_indent(this.__indent_count,this.__alignment_count),s},N.prototype.item=function(s){return s<0?this.__items[this.__items.length+s]:this.__items[s]},N.prototype.has_match=function(s){for(var h=this.__items.length-1;h>=0;h--)if(this.__items[h].match(s))return!0;return!1},N.prototype.set_indent=function(s,h){this.is_empty()&&(this.__indent_count=s||0,this.__alignment_count=h||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},N.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)},N.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},N.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var s=this.__parent.current_line;return s.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),s.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),s.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,s.__items[0]===" "&&(s.__items.splice(0,1),s.__character_count-=1),!0}return!1},N.prototype.is_empty=function(){return this.__items.length===0},N.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},N.prototype.push=function(s){this.__items.push(s);var h=s.lastIndexOf(`
|
|
`);h!==-1?this.__character_count=s.length-h:this.__character_count+=s.length},N.prototype.pop=function(){var s=null;return this.is_empty()||(s=this.__items.pop(),this.__character_count-=s.length),s},N.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},N.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},N.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},N.prototype.toString=function(){var s="";return this.is_empty()?this.__parent.indent_empty_lines&&(s=this.__parent.get_indent_string(this.__indent_count)):(s=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),s+=this.__items.join("")),s};function c(s,h){this.__cache=[""],this.__indent_size=s.indent_size,this.__indent_string=s.indent_char,s.indent_with_tabs||(this.__indent_string=new Array(s.indent_size+1).join(s.indent_char)),h=h||"",s.indent_level>0&&(h=new Array(s.indent_level+1).join(this.__indent_string)),this.__base_string=h,this.__base_string_length=h.length}c.prototype.get_indent_size=function(s,h){var x=this.__base_string_length;return h=h||0,s<0&&(x=0),x+=s*this.__indent_size,x+=h,x},c.prototype.get_indent_string=function(s,h){var x=this.__base_string;return h=h||0,s<0&&(s=0,x=""),h+=s*this.__indent_size,this.__ensure_cache(h),x+=this.__cache[h],x},c.prototype.__ensure_cache=function(s){for(;s>=this.__cache.length;)this.__add_column()},c.prototype.__add_column=function(){var s=this.__cache.length,h=0,x="";this.__indent_size&&s>=this.__indent_size&&(h=Math.floor(s/this.__indent_size),s-=h*this.__indent_size,x=new Array(h+1).join(this.__indent_string)),s&&(x+=new Array(s+1).join(" ")),this.__cache.push(x)};function l(s,h){this.__indent_cache=new c(s,h),this.raw=!1,this._end_with_newline=s.end_with_newline,this.indent_size=s.indent_size,this.wrap_line_length=s.wrap_line_length,this.indent_empty_lines=s.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new N(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}l.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},l.prototype.get_line_number=function(){return this.__lines.length},l.prototype.get_indent_string=function(s,h){return this.__indent_cache.get_indent_string(s,h)},l.prototype.get_indent_size=function(s,h){return this.__indent_cache.get_indent_size(s,h)},l.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},l.prototype.add_new_line=function(s){return this.is_empty()||!s&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},l.prototype.get_code=function(s){this.trim(!0);var h=this.current_line.pop();h&&(h[h.length-1]===`
|
|
`&&(h=h.replace(/\n+$/g,"")),this.current_line.push(h)),this._end_with_newline&&this.__add_outputline();var x=this.__lines.join(`
|
|
`);return s!==`
|
|
`&&(x=x.replace(/[\n]/g,s)),x},l.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},l.prototype.set_indent=function(s,h){return s=s||0,h=h||0,this.next_line.set_indent(s,h),this.__lines.length>1?(this.current_line.set_indent(s,h),!0):(this.current_line.set_indent(),!1)},l.prototype.add_raw_token=function(s){for(var h=0;h<s.newlines;h++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(s.whitespace_before),this.current_line.push(s.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},l.prototype.add_token=function(s){this.__add_space_before_token(),this.current_line.push(s),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},l.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},l.prototype.remove_indent=function(s){for(var h=this.__lines.length;s<h;)this.__lines[s]._remove_indent(),s++;this.current_line._remove_wrap_indent()},l.prototype.trim=function(s){for(s=s===void 0?!1:s,this.current_line.trim();s&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},l.prototype.just_added_newline=function(){return this.current_line.is_empty()},l.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},l.prototype.ensure_empty_line_above=function(s,h){for(var x=this.__lines.length-2;x>=0;){var E=this.__lines[x];if(E.is_empty())break;if(E.item(0).indexOf(s)!==0&&E.item(-1)!==h){this.__lines.splice(x+1,0,new N(this)),this.previous_line=this.__lines[this.__lines.length-2];break}x--}},D.exports.Output=l},function(D){function N(c,l,s,h){this.type=c,this.text=l,this.comments_before=null,this.newlines=s||0,this.whitespace_before=h||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}D.exports.Token=N},,,function(D){function N(s,h){this.raw_options=c(s,h),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"])}N.prototype._get_array=function(s,h){var x=this.raw_options[s],E=h||[];return typeof x=="object"?x!==null&&typeof x.concat=="function"&&(E=x.concat()):typeof x=="string"&&(E=x.split(/[^a-zA-Z0-9_\/\-]+/)),E},N.prototype._get_boolean=function(s,h){var x=this.raw_options[s],E=x===void 0?!!h:!!x;return E},N.prototype._get_characters=function(s,h){var x=this.raw_options[s],E=h||"";return typeof x=="string"&&(E=x.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),E},N.prototype._get_number=function(s,h){var x=this.raw_options[s];h=parseInt(h,10),isNaN(h)&&(h=0);var E=parseInt(x,10);return isNaN(E)&&(E=h),E},N.prototype._get_selection=function(s,h,x){var E=this._get_selection_list(s,h,x);if(E.length!==1)throw new Error("Invalid Option Value: The option '"+s+`' can only be one of the following values:
|
|
`+h+`
|
|
You passed in: '`+this.raw_options[s]+"'");return E[0]},N.prototype._get_selection_list=function(s,h,x){if(!h||h.length===0)throw new Error("Selection list cannot be empty.");if(x=x||[h[0]],!this._is_valid_selection(x,h))throw new Error("Invalid Default Value!");var E=this._get_array(s,x);if(!this._is_valid_selection(E,h))throw new Error("Invalid Option Value: The option '"+s+`' can contain only the following values:
|
|
`+h+`
|
|
You passed in: '`+this.raw_options[s]+"'");return E},N.prototype._is_valid_selection=function(s,h){return s.length&&h.length&&!s.some(function(x){return h.indexOf(x)===-1})};function c(s,h){var x={};s=l(s);var E;for(E in s)E!==h&&(x[E]=s[E]);if(h&&s[h])for(E in s[h])x[E]=s[h][E];return x}function l(s){var h={},x;for(x in s){var E=x.replace(/-/g,"_");h[E]=s[x]}return h}D.exports.Options=N,D.exports.normalizeOpts=l,D.exports.mergeOpts=c},,function(D){var N=RegExp.prototype.hasOwnProperty("sticky");function c(l){this.__input=l||"",this.__input_length=this.__input.length,this.__position=0}c.prototype.restart=function(){this.__position=0},c.prototype.back=function(){this.__position>0&&(this.__position-=1)},c.prototype.hasNext=function(){return this.__position<this.__input_length},c.prototype.next=function(){var l=null;return this.hasNext()&&(l=this.__input.charAt(this.__position),this.__position+=1),l},c.prototype.peek=function(l){var s=null;return l=l||0,l+=this.__position,l>=0&&l<this.__input_length&&(s=this.__input.charAt(l)),s},c.prototype.__match=function(l,s){l.lastIndex=s;var h=l.exec(this.__input);return h&&!(N&&l.sticky)&&(h.index!==s&&(h=null)),h},c.prototype.test=function(l,s){return s=s||0,s+=this.__position,s>=0&&s<this.__input_length?!!this.__match(l,s):!1},c.prototype.testChar=function(l,s){var h=this.peek(s);return l.lastIndex=0,h!==null&&l.test(h)},c.prototype.match=function(l){var s=this.__match(l,this.__position);return s?this.__position+=s[0].length:s=null,s},c.prototype.read=function(l,s,h){var x="",E;return l&&(E=this.match(l),E&&(x+=E[0])),s&&(E||!l)&&(x+=this.readUntil(s,h)),x},c.prototype.readUntil=function(l,s){var h="",x=this.__position;l.lastIndex=this.__position;var E=l.exec(this.__input);return E?(x=E.index,s&&(x+=E[0].length)):x=this.__input_length,h=this.__input.substring(this.__position,x),this.__position=x,h},c.prototype.readUntilAfter=function(l){return this.readUntil(l,!0)},c.prototype.get_regexp=function(l,s){var h=null,x="g";return s&&N&&(x="y"),typeof l=="string"&&l!==""?h=new RegExp(l,x):l&&(h=new RegExp(l.source,x)),h},c.prototype.get_literal_regexp=function(l){return RegExp(l.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},c.prototype.peekUntilAfter=function(l){var s=this.__position,h=this.readUntilAfter(l);return this.__position=s,h},c.prototype.lookBack=function(l){var s=this.__position-1;return s>=l.length&&this.__input.substring(s-l.length,s).toLowerCase()===l},D.exports.InputScanner=c},function(D,N,c){var l=c(8).InputScanner,s=c(3).Token,h=c(10).TokenStream,x=c(11).WhitespacePattern,E={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},v=function(d,m){this._input=new l(d),this._options=m||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new x(this._input)};v.prototype.tokenize=function(){this._input.restart(),this.__tokens=new h,this._reset();for(var d,m=new s(E.START,""),g=null,S=[],A=new h;m.type!==E.EOF;){for(d=this._get_next_token(m,g);this._is_comment(d);)A.add(d),d=this._get_next_token(m,g);A.isEmpty()||(d.comments_before=A,A=new h),d.parent=g,this._is_opening(d)?(S.push(g),g=d):g&&this._is_closing(d,g)&&(d.opened=g,g.closed=d,g=S.pop(),d.parent=g),d.previous=m,m.next=d,this.__tokens.add(d),m=d}return this.__tokens},v.prototype._is_first_token=function(){return this.__tokens.isEmpty()},v.prototype._reset=function(){},v.prototype._get_next_token=function(d,m){this._readWhitespace();var g=this._input.read(/.+/g);return g?this._create_token(E.RAW,g):this._create_token(E.EOF,"")},v.prototype._is_comment=function(d){return!1},v.prototype._is_opening=function(d){return!1},v.prototype._is_closing=function(d,m){return!1},v.prototype._create_token=function(d,m){var g=new s(d,m,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return g},v.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},D.exports.Tokenizer=v,D.exports.TOKEN=E},function(D){function N(c){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=c}N.prototype.restart=function(){this.__position=0},N.prototype.isEmpty=function(){return this.__tokens_length===0},N.prototype.hasNext=function(){return this.__position<this.__tokens_length},N.prototype.next=function(){var c=null;return this.hasNext()&&(c=this.__tokens[this.__position],this.__position+=1),c},N.prototype.peek=function(c){var l=null;return c=c||0,c+=this.__position,c>=0&&c<this.__tokens_length&&(l=this.__tokens[c]),l},N.prototype.add=function(c){this.__parent_token&&(c.parent=this.__parent_token),this.__tokens.push(c),this.__tokens_length+=1},D.exports.TokenStream=N},function(D,N,c){var l=c(12).Pattern;function s(h,x){l.call(this,h,x),x?this._line_regexp=this._input.get_regexp(x._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}s.prototype=new l,s.prototype.__set_whitespace_patterns=function(h,x){h+="\\t ",x+="\\n\\r",this._match_pattern=this._input.get_regexp("["+h+x+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+x+"]")},s.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var h=this._input.read(this._match_pattern);if(h===" ")this.whitespace_before_token=" ";else if(h){var x=this.__split(this._newline_regexp,h);this.newline_count=x.length-1,this.whitespace_before_token=x[this.newline_count]}return h},s.prototype.matching=function(h,x){var E=this._create();return E.__set_whitespace_patterns(h,x),E._update(),E},s.prototype._create=function(){return new s(this._input,this)},s.prototype.__split=function(h,x){h.lastIndex=0;for(var E=0,v=[],d=h.exec(x);d;)v.push(x.substring(E,d.index)),E=d.index+d[0].length,d=h.exec(x);return E<x.length?v.push(x.substring(E,x.length)):v.push(""),v},D.exports.WhitespacePattern=s},function(D){function N(c,l){this._input=c,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,l&&(this._starting_pattern=this._input.get_regexp(l._starting_pattern,!0),this._match_pattern=this._input.get_regexp(l._match_pattern,!0),this._until_pattern=this._input.get_regexp(l._until_pattern),this._until_after=l._until_after)}N.prototype.read=function(){var c=this._input.read(this._starting_pattern);return(!this._starting_pattern||c)&&(c+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),c},N.prototype.read_match=function(){return this._input.match(this._match_pattern)},N.prototype.until_after=function(c){var l=this._create();return l._until_after=!0,l._until_pattern=this._input.get_regexp(c),l._update(),l},N.prototype.until=function(c){var l=this._create();return l._until_after=!1,l._until_pattern=this._input.get_regexp(c),l._update(),l},N.prototype.starting_with=function(c){var l=this._create();return l._starting_pattern=this._input.get_regexp(c,!0),l._update(),l},N.prototype.matching=function(c){var l=this._create();return l._match_pattern=this._input.get_regexp(c,!0),l._update(),l},N.prototype._create=function(){return new N(this._input,this)},N.prototype._update=function(){},D.exports.Pattern=N},function(D){function N(c,l){c=typeof c=="string"?c:c.source,l=typeof l=="string"?l:l.source,this.__directives_block_pattern=new RegExp(c+/ beautify( \w+[:]\w+)+ /.source+l,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(c+/\sbeautify\signore:end\s/.source+l,"g")}N.prototype.get_directives=function(c){if(!c.match(this.__directives_block_pattern))return null;var l={};this.__directive_pattern.lastIndex=0;for(var s=this.__directive_pattern.exec(c);s;)l[s[1]]=s[2],s=this.__directive_pattern.exec(c);return l},N.prototype.readIgnored=function(c){return c.readUntilAfter(this.__directives_end_ignore_pattern)},D.exports.Directives=N},function(D,N,c){var l=c(12).Pattern,s={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function h(x,E){l.call(this,x,E),this.__template_pattern=null,this._disabled=Object.assign({},s),this._excluded=Object.assign({},s),E&&(this.__template_pattern=this._input.get_regexp(E.__template_pattern),this._excluded=Object.assign(this._excluded,E._excluded),this._disabled=Object.assign(this._disabled,E._disabled));var v=new l(x);this.__patterns={handlebars_comment:v.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:v.starting_with(/{{{/).until_after(/}}}/),handlebars:v.starting_with(/{{/).until_after(/}}/),php:v.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:v.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:v.starting_with(/{%/).until_after(/%}/),django_value:v.starting_with(/{{/).until_after(/}}/),django_comment:v.starting_with(/{#/).until_after(/#}/),smarty:v.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:v.starting_with(/{\*/).until_after(/\*}/),smarty_literal:v.starting_with(/{literal}/).until_after(/{\/literal}/)}}h.prototype=new l,h.prototype._create=function(){return new h(this._input,this)},h.prototype._update=function(){this.__set_templated_pattern()},h.prototype.disable=function(x){var E=this._create();return E._disabled[x]=!0,E._update(),E},h.prototype.read_options=function(x){var E=this._create();for(var v in s)E._disabled[v]=x.templating.indexOf(v)===-1;return E._update(),E},h.prototype.exclude=function(x){var E=this._create();return E._excluded[x]=!0,E._update(),E},h.prototype.read=function(){var x="";this._match_pattern?x=this._input.read(this._starting_pattern):x=this._input.read(this._starting_pattern,this.__template_pattern);for(var E=this._read_template();E;)this._match_pattern?E+=this._input.read(this._match_pattern):E+=this._input.readUntil(this.__template_pattern),x+=E,E=this._read_template();return this._until_after&&(x+=this._input.readUntilAfter(this._until_pattern)),x},h.prototype.__set_templated_pattern=function(){var x=[];this._disabled.php||x.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||x.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||x.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(x.push(this.__patterns.django._starting_pattern.source),x.push(this.__patterns.django_value._starting_pattern.source),x.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||x.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&x.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+x.join("|")+")")},h.prototype._read_template=function(){var x="",E=this._input.peek();if(E==="<"){var v=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&v==="?"&&(x=x||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&v==="%"&&(x=x||this.__patterns.erb.read())}else E==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(x=x||this.__patterns.handlebars_comment.read(),x=x||this.__patterns.handlebars_unescaped.read(),x=x||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(x=x||this.__patterns.django_value.read()),this._excluded.django||(x=x||this.__patterns.django_comment.read(),x=x||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(x=x||this.__patterns.smarty_comment.read(),x=x||this.__patterns.smarty_literal.read(),x=x||this.__patterns.smarty.read()));return x},D.exports.TemplatablePattern=h},,,,function(D,N,c){var l=c(19).Beautifier,s=c(20).Options;function h(x,E,v,d){var m=new l(x,E,v,d);return m.beautify()}D.exports=h,D.exports.defaultOptions=function(){return new s}},function(D,N,c){var l=c(20).Options,s=c(2).Output,h=c(21).Tokenizer,x=c(21).TOKEN,E=/\r\n|[\r\n]/,v=/\r\n|[\r\n]/g,d=function(y,o){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=y.max_preserve_newlines,this.preserve_newlines=y.preserve_newlines,this._output=new s(y,o)};d.prototype.current_line_has_match=function(y){return this._output.current_line.has_match(y)},d.prototype.set_space_before_token=function(y,o){this._output.space_before_token=y,this._output.non_breaking_space=o},d.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},d.prototype.add_raw_token=function(y){this._output.add_raw_token(y)},d.prototype.print_preserved_newlines=function(y){var o=0;y.type!==x.TEXT&&y.previous.type!==x.TEXT&&(o=y.newlines?1:0),this.preserve_newlines&&(o=y.newlines<this.max_preserve_newlines+1?y.newlines:this.max_preserve_newlines+1);for(var r=0;r<o;r++)this.print_newline(r>0);return o!==0},d.prototype.traverse_whitespace=function(y){return y.whitespace_before||y.newlines?(this.print_preserved_newlines(y)||(this._output.space_before_token=!0),!0):!1},d.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},d.prototype.print_newline=function(y){this._output.add_new_line(y)},d.prototype.print_token=function(y){y.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(y.text))},d.prototype.indent=function(){this.indent_level++},d.prototype.get_full_indent=function(y){return y=this.indent_level+(y||0),y<1?"":this._output.get_indent_string(y)};var m=function(y){for(var o=null,r=y.next;r.type!==x.EOF&&y.closed!==r;){if(r.type===x.ATTRIBUTE&&r.text==="type"){r.next&&r.next.type===x.EQUALS&&r.next.next&&r.next.next.type===x.VALUE&&(o=r.next.next.text);break}r=r.next}return o},g=function(y,o){var r=null,a=null;return o.closed?(y==="script"?r="text/javascript":y==="style"&&(r="text/css"),r=m(o)||r,r.search("text/css")>-1?a="css":r.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?a="javascript":r.search(/(text|application|dojo)\/(x-)?(html)/)>-1?a="html":r.search(/test\/null/)>-1&&(a="null"),a):null};function S(y,o){return o.indexOf(y)!==-1}function A(y,o,r){this.parent=y||null,this.tag=o?o.tag_name:"",this.indent_level=r||0,this.parser_token=o||null}function u(y){this._printer=y,this._current_frame=null}u.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},u.prototype.record_tag=function(y){var o=new A(this._current_frame,y,this._printer.indent_level);this._current_frame=o},u.prototype._try_pop_frame=function(y){var o=null;return y&&(o=y.parser_token,this._printer.indent_level=y.indent_level,this._current_frame=y.parent),o},u.prototype._get_frame=function(y,o){for(var r=this._current_frame;r&&!(y.indexOf(r.tag)!==-1);){if(o&&o.indexOf(r.tag)!==-1){r=null;break}r=r.parent}return r},u.prototype.try_pop=function(y,o){var r=this._get_frame([y],o);return this._try_pop_frame(r)},u.prototype.indent_to_tag=function(y){var o=this._get_frame(y);o&&(this._printer.indent_level=o.indent_level)};function R(y,o,r,a){this._source_text=y||"",o=o||{},this._js_beautify=r,this._css_beautify=a,this._tag_stack=null;var n=new l(o,"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"}R.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var y=this._source_text,o=this._options.eol;this._options.eol==="auto"&&(o=`
|
|
`,y&&E.test(y)&&(o=y.match(E)[0])),y=y.replace(v,`
|
|
`);var r=y.match(/^[\t ]*/)[0],a={text:"",type:""},n=new i,t=new d(this._options,r),p=new h(y,this._options).tokenize();this._tag_stack=new u(t);for(var _=null,f=p.next();f.type!==x.EOF;)f.type===x.TAG_OPEN||f.type===x.COMMENT?(_=this._handle_tag_open(t,f,n,a),n=_):f.type===x.ATTRIBUTE||f.type===x.EQUALS||f.type===x.VALUE||f.type===x.TEXT&&!n.tag_complete?_=this._handle_inside_tag(t,f,n,p):f.type===x.TAG_CLOSE?_=this._handle_tag_close(t,f,n):f.type===x.TEXT?_=this._handle_text(t,f,n):t.add_raw_token(f),a=_,f=p.next();var F=t._output.get_code(o);return F},R.prototype._handle_tag_close=function(y,o,r){var a={text:o.text,type:o.type};return y.alignment_size=0,r.tag_complete=!0,y.set_space_before_token(o.newlines||o.whitespace_before!=="",!0),r.is_unformatted?y.add_raw_token(o):(r.tag_start_char==="<"&&(y.set_space_before_token(o.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&r.has_wrapped_attrs&&y.print_newline(!1)),y.print_token(o)),r.indent_content&&!(r.is_unformatted||r.is_content_unformatted)&&(y.indent(),r.indent_content=!1),!r.is_inline_element&&!(r.is_unformatted||r.is_content_unformatted)&&y.set_wrap_point(),a},R.prototype._handle_inside_tag=function(y,o,r,a){var n=r.has_wrapped_attrs,t={text:o.text,type:o.type};if(y.set_space_before_token(o.newlines||o.whitespace_before!=="",!0),r.is_unformatted)y.add_raw_token(o);else if(r.tag_start_char==="{"&&o.type===x.TEXT)y.print_preserved_newlines(o)?(o.newlines=0,y.add_raw_token(o)):y.print_token(o);else{if(o.type===x.ATTRIBUTE?(y.set_space_before_token(!0),r.attr_count+=1):(o.type===x.EQUALS||o.type===x.VALUE&&o.previous.type===x.EQUALS)&&y.set_space_before_token(!1),o.type===x.ATTRIBUTE&&r.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(y.traverse_whitespace(o),n=n||o.newlines!==0),this._is_wrap_attributes_force)){var p=r.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&r.attr_count===1){var _=!0,f=0,F;do{if(F=a.peek(f),F.type===x.ATTRIBUTE){_=!1;break}f+=1}while(f<4&&F.type!==x.EOF&&F.type!==x.TAG_CLOSE);p=!_}p&&(y.print_newline(!1),n=!0)}y.print_token(o),n=n||y.previous_token_wrapped(),r.has_wrapped_attrs=n}return t},R.prototype._handle_text=function(y,o,r){var a={text:o.text,type:"TK_CONTENT"};return r.custom_beautifier_name?this._print_custom_beatifier_text(y,o,r):r.is_unformatted||r.is_content_unformatted?y.add_raw_token(o):(y.traverse_whitespace(o),y.print_token(o)),a},R.prototype._print_custom_beatifier_text=function(y,o,r){var a=this;if(o.text!==""){var n=o.text,t,p=1,_="",f="";r.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?t=this._js_beautify:r.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?t=this._css_beautify:r.custom_beautifier_name==="html"&&(t=function(ne,ce){var ie=new R(ne,ce,a._js_beautify,a._css_beautify);return ie.beautify()}),this._options.indent_scripts==="keep"?p=0:this._options.indent_scripts==="separate"&&(p=-y.indent_level);var F=y.get_full_indent(p);if(n=n.replace(/\n[ \t]*$/,""),r.custom_beautifier_name!=="html"&&n[0]==="<"&&n.match(/^(<!--|<!\[CDATA\[)/)){var P=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(n);if(!P){y.add_raw_token(o);return}_=F+P[1]+`
|
|
`,n=P[4],P[5]&&(f=F+P[5]),n=n.replace(/\n[ \t]*$/,""),(P[2]||P[3].indexOf(`
|
|
`)!==-1)&&(P=P[3].match(/[ \t]+$/),P&&(o.whitespace_before=P[0]))}if(n)if(t){var W=function(){this.eol=`
|
|
`};W.prototype=this._options.raw_options;var V=new W;n=t(F+n,V)}else{var J=o.whitespace_before;J&&(n=n.replace(new RegExp(`
|
|
(`+J+")?","g"),`
|
|
`)),n=F+n.replace(/\n/g,`
|
|
`+F)}_&&(n?n=_+n+`
|
|
`+f:n=_+f),y.print_newline(!1),n&&(o.text=n,o.whitespace_before="",o.newlines=0,y.add_raw_token(o),y.print_newline(!0))}},R.prototype._handle_tag_open=function(y,o,r,a){var n=this._get_tag_open_token(o);return(r.is_unformatted||r.is_content_unformatted)&&!r.is_empty_element&&o.type===x.TAG_OPEN&&o.text.indexOf("</")===0?(y.add_raw_token(o),n.start_tag_token=this._tag_stack.try_pop(n.tag_name)):(y.traverse_whitespace(o),this._set_tag_position(y,o,n,r,a),n.is_inline_element||y.set_wrap_point(),y.print_token(o)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(n.alignment_size=o.text.length+1),!n.tag_complete&&!n.is_unformatted&&(y.alignment_size=n.alignment_size),n};var i=function(y,o){if(this.parent=y||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="",!o)this.tag_complete=!0;else{var r;this.tag_start_char=o.text[0],this.text=o.text,this.tag_start_char==="<"?(r=o.text.match(/^<([^\s>]*)/),this.tag_check=r?r[1]:""):(r=o.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=r?r[1]:"",(o.text.startsWith("{{#>")||o.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&o.next!==null?this.tag_check=o.next.text.split(" ")[0]:this.tag_check=o.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),o.type===x.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||o.closed&&o.closed.text==="/>";var a=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(a=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(a)))}};R.prototype._get_tag_open_token=function(y){var o=new i(this._tag_stack.get_parser_token(),y);return o.alignment_size=this._options.wrap_attributes_indent_size,o.is_end_tag=o.is_end_tag||S(o.tag_check,this._options.void_elements),o.is_empty_element=o.tag_complete||o.is_start_tag&&o.is_end_tag,o.is_unformatted=!o.tag_complete&&S(o.tag_check,this._options.unformatted),o.is_content_unformatted=!o.is_empty_element&&S(o.tag_check,this._options.content_unformatted),o.is_inline_element=S(o.tag_name,this._options.inline)||o.tag_name.includes("-")||o.tag_start_char==="{",o},R.prototype._set_tag_position=function(y,o,r,a,n){if(r.is_empty_element||(r.is_end_tag?r.start_tag_token=this._tag_stack.try_pop(r.tag_name):(this._do_optional_end_element(r)&&(r.is_inline_element||y.print_newline(!1)),this._tag_stack.record_tag(r),(r.tag_name==="script"||r.tag_name==="style")&&!(r.is_unformatted||r.is_content_unformatted)&&(r.custom_beautifier_name=g(r.tag_check,o)))),S(r.tag_check,this._options.extra_liners)&&(y.print_newline(!1),y._output.just_added_blankline()||y.print_newline(!0)),r.is_empty_element){if(r.tag_start_char==="{"&&r.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),r.indent_content=!0;var t=y.current_line_has_match(/{{#if/);t||y.print_newline(!1)}r.tag_name==="!--"&&n.type===x.TAG_CLOSE&&a.is_end_tag&&r.text.indexOf(`
|
|
`)===-1||(r.is_inline_element||r.is_unformatted||y.print_newline(!1),this._calcluate_parent_multiline(y,r))}else if(r.is_end_tag){var p=!1;p=r.start_tag_token&&r.start_tag_token.multiline_content,p=p||!r.is_inline_element&&!(a.is_inline_element||a.is_unformatted)&&!(n.type===x.TAG_CLOSE&&r.start_tag_token===a)&&n.type!=="TK_CONTENT",(r.is_content_unformatted||r.is_unformatted)&&(p=!1),p&&y.print_newline(!1)}else r.indent_content=!r.custom_beautifier_name,r.tag_start_char==="<"&&(r.tag_name==="html"?r.indent_content=this._options.indent_inner_html:r.tag_name==="head"?r.indent_content=this._options.indent_head_inner_html:r.tag_name==="body"&&(r.indent_content=this._options.indent_body_inner_html)),!(r.is_inline_element||r.is_unformatted)&&(n.type!=="TK_CONTENT"||r.is_content_unformatted)&&y.print_newline(!1),this._calcluate_parent_multiline(y,r)},R.prototype._calcluate_parent_multiline=function(y,o){o.parent&&y._output.just_added_newline()&&!((o.is_inline_element||o.is_unformatted)&&o.parent.is_inline_element)&&(o.parent.multiline_content=!0)};var T=["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"],w=["a","audio","del","ins","map","noscript","video"];R.prototype._do_optional_end_element=function(y){var o=null;if(y.is_empty_element||!y.is_start_tag||!y.parent)return;if(y.tag_name==="body")o=o||this._tag_stack.try_pop("head");else if(y.tag_name==="li")o=o||this._tag_stack.try_pop("li",["ol","ul"]);else if(y.tag_name==="dd"||y.tag_name==="dt")o=o||this._tag_stack.try_pop("dt",["dl"]),o=o||this._tag_stack.try_pop("dd",["dl"]);else if(y.parent.tag_name==="p"&&T.indexOf(y.tag_name)!==-1){var r=y.parent.parent;(!r||w.indexOf(r.tag_name)===-1)&&(o=o||this._tag_stack.try_pop("p"))}else y.tag_name==="rp"||y.tag_name==="rt"?(o=o||this._tag_stack.try_pop("rt",["ruby","rtc"]),o=o||this._tag_stack.try_pop("rp",["ruby","rtc"])):y.tag_name==="optgroup"?o=o||this._tag_stack.try_pop("optgroup",["select"]):y.tag_name==="option"?o=o||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):y.tag_name==="colgroup"?o=o||this._tag_stack.try_pop("caption",["table"]):y.tag_name==="thead"?(o=o||this._tag_stack.try_pop("caption",["table"]),o=o||this._tag_stack.try_pop("colgroup",["table"])):y.tag_name==="tbody"||y.tag_name==="tfoot"?(o=o||this._tag_stack.try_pop("caption",["table"]),o=o||this._tag_stack.try_pop("colgroup",["table"]),o=o||this._tag_stack.try_pop("thead",["table"]),o=o||this._tag_stack.try_pop("tbody",["table"])):y.tag_name==="tr"?(o=o||this._tag_stack.try_pop("caption",["table"]),o=o||this._tag_stack.try_pop("colgroup",["table"]),o=o||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(y.tag_name==="th"||y.tag_name==="td")&&(o=o||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),o=o||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return y.parent=this._tag_stack.get_parser_token(),o},D.exports.Beautifier=R},function(D,N,c){var l=c(6).Options;function s(h){l.call(this,h,"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"])}s.prototype=new l,D.exports.Options=s},function(D,N,c){var l=c(9).Tokenizer,s=c(9).TOKEN,h=c(13).Directives,x=c(14).TemplatablePattern,E=c(12).Pattern,v={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:s.START,RAW:s.RAW,EOF:s.EOF},d=new h(/<\!--/,/-->/),m=function(g,S){l.call(this,g,S),this._current_tag_name="";var A=new x(this._input).read_options(this._options),u=new E(this._input);if(this.__patterns={word:A.until(/[\n\r\t <]/),single_quote:A.until_after(/'/),double_quote:A.until_after(/"/),attribute:A.until(/[\n\r\t =>]|\/>/),element_name:A.until(/[\n\r\t >\/]/),handlebars_comment:u.starting_with(/{{!--/).until_after(/--}}/),handlebars:u.starting_with(/{{/).until_after(/}}/),handlebars_open:u.until(/[\n\r\t }]/),handlebars_raw_close:u.until(/}}/),comment:u.starting_with(/<!--/).until_after(/-->/),cdata:u.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:u.starting_with(/<!\[/).until_after(/]>/),processing:u.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 R=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=u.matching(R).until_after(R)}};m.prototype=new l,m.prototype._is_comment=function(g){return!1},m.prototype._is_opening=function(g){return g.type===v.TAG_OPEN},m.prototype._is_closing=function(g,S){return g.type===v.TAG_CLOSE&&S&&((g.text===">"||g.text==="/>")&&S.text[0]==="<"||g.text==="}}"&&S.text[0]==="{"&&S.text[1]==="{")},m.prototype._reset=function(){this._current_tag_name=""},m.prototype._get_next_token=function(g,S){var A=null;this._readWhitespace();var u=this._input.peek();return u===null?this._create_token(v.EOF,""):(A=A||this._read_open_handlebars(u,S),A=A||this._read_attribute(u,g,S),A=A||this._read_close(u,S),A=A||this._read_raw_content(u,g,S),A=A||this._read_content_word(u),A=A||this._read_comment_or_cdata(u),A=A||this._read_processing(u),A=A||this._read_open(u,S),A=A||this._create_token(v.UNKNOWN,this._input.next()),A)},m.prototype._read_comment_or_cdata=function(g){var S=null,A=null,u=null;if(g==="<"){var R=this._input.peek(1);R==="!"&&(A=this.__patterns.comment.read(),A?(u=d.get_directives(A),u&&u.ignore==="start"&&(A+=d.readIgnored(this._input))):A=this.__patterns.cdata.read()),A&&(S=this._create_token(v.COMMENT,A),S.directives=u)}return S},m.prototype._read_processing=function(g){var S=null,A=null,u=null;if(g==="<"){var R=this._input.peek(1);(R==="!"||R==="?")&&(A=this.__patterns.conditional_comment.read(),A=A||this.__patterns.processing.read()),A&&(S=this._create_token(v.COMMENT,A),S.directives=u)}return S},m.prototype._read_open=function(g,S){var A=null,u=null;return S||g==="<"&&(A=this._input.next(),this._input.peek()==="/"&&(A+=this._input.next()),A+=this.__patterns.element_name.read(),u=this._create_token(v.TAG_OPEN,A)),u},m.prototype._read_open_handlebars=function(g,S){var A=null,u=null;return S||this._options.indent_handlebars&&g==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(A=this.__patterns.handlebars_comment.read(),A=A||this.__patterns.handlebars.read(),u=this._create_token(v.COMMENT,A)):(A=this.__patterns.handlebars_open.read(),u=this._create_token(v.TAG_OPEN,A))),u},m.prototype._read_close=function(g,S){var A=null,u=null;return S&&(S.text[0]==="<"&&(g===">"||g==="/"&&this._input.peek(1)===">")?(A=this._input.next(),g==="/"&&(A+=this._input.next()),u=this._create_token(v.TAG_CLOSE,A)):S.text[0]==="{"&&g==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),u=this._create_token(v.TAG_CLOSE,"}}"))),u},m.prototype._read_attribute=function(g,S,A){var u=null,R="";if(A&&A.text[0]==="<")if(g==="=")u=this._create_token(v.EQUALS,this._input.next());else if(g==='"'||g==="'"){var i=this._input.next();g==='"'?i+=this.__patterns.double_quote.read():i+=this.__patterns.single_quote.read(),u=this._create_token(v.VALUE,i)}else R=this.__patterns.attribute.read(),R&&(S.type===v.EQUALS?u=this._create_token(v.VALUE,R):u=this._create_token(v.ATTRIBUTE,R));return u},m.prototype._is_content_unformatted=function(g){return this._options.void_elements.indexOf(g)===-1&&(this._options.content_unformatted.indexOf(g)!==-1||this._options.unformatted.indexOf(g)!==-1)},m.prototype._read_raw_content=function(g,S,A){var u="";if(A&&A.text[0]==="{")u=this.__patterns.handlebars_raw_close.read();else if(S.type===v.TAG_CLOSE&&S.opened.text[0]==="<"&&S.text[0]!=="/"){var R=S.opened.text.substr(1).toLowerCase();if(R==="script"||R==="style"){var i=this._read_comment_or_cdata(g);if(i)return i.type=v.TEXT,i;u=this._input.readUntil(new RegExp("</"+R+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(R)&&(u=this._input.readUntil(new RegExp("</"+R+"[\\n\\r\\t ]*?>","ig")))}return u?this._create_token(v.TEXT,u):null},m.prototype._read_content_word=function(g){var S="";if(this._options.unformatted_content_delimiter&&(g===this._options.unformatted_content_delimiter[0]&&(S=this.__patterns.unformatted_content_delimiter.read())),S||(S=this.__patterns.word.read()),S)return this._create_token(v.TEXT,S)},D.exports.Tokenizer=m,D.exports.TOKEN=v}],H={};function e(D){var N=H[D];if(N!==void 0)return N.exports;var c=H[D]={exports:{}};return O[D](c,c.exports,e),c.exports}var M=e(18);ve=M})();var Ee=ve;if(!0)!(he=[Q,Q("6UM0"),Q("TXwP")],be=function(O){var H=Q("6UM0"),e=Q("TXwP");return{html_beautify:function(M,D){return Ee(M,D,H.js_beautify,e.css_beautify)}}}.apply(_e,he),be!==void 0&&(dt.exports=be));else var ue,$})()},rSU8:function(dt,_e,Q){"use strict";function he(D){return typeof D=="object"&&D!=null&&D.nodeType===1}function be(D,N){return(!N||D!=="hidden")&&D!=="visible"&&D!=="clip"}function ve(D,N){if(D.clientHeight<D.scrollHeight||D.clientWidth<D.scrollWidth){var c=getComputedStyle(D,null);return be(c.overflowY,N)||be(c.overflowX,N)||function(l){var s=function(h){if(!h.ownerDocument||!h.ownerDocument.defaultView)return null;try{return h.ownerDocument.defaultView.frameElement}catch(x){return null}}(l);return!!s&&(s.clientHeight<l.scrollHeight||s.clientWidth<l.scrollWidth)}(D)}return!1}function Ee(D,N,c,l,s,h,x,E){return h<D&&x>N||h>D&&x<N?0:h<=D&&E<=c||x>=N&&E>=c?h-D-l:x>N&&E<c||h<D&&E>c?x-N+s:0}var ue=function(D,N){var c=window,l=N.scrollMode,s=N.block,h=N.inline,x=N.boundary,E=N.skipOverflowHiddenElements,v=typeof x=="function"?x:function(ae){return ae!==x};if(!he(D))throw new TypeError("Invalid target");for(var d,m,g=document.scrollingElement||document.documentElement,S=[],A=D;he(A)&&v(A);){if((A=(m=(d=A).parentElement)==null?d.getRootNode().host||null:m)===g){S.push(A);break}A!=null&&A===document.body&&ve(A)&&!ve(document.documentElement)||A!=null&&ve(A,E)&&S.push(A)}for(var u=c.visualViewport?c.visualViewport.width:innerWidth,R=c.visualViewport?c.visualViewport.height:innerHeight,i=window.scrollX||pageXOffset,T=window.scrollY||pageYOffset,w=D.getBoundingClientRect(),y=w.height,o=w.width,r=w.top,a=w.right,n=w.bottom,t=w.left,p=s==="start"||s==="nearest"?r:s==="end"?n:r+y/2,_=h==="center"?t+o/2:h==="end"?a:t,f=[],F=0;F<S.length;F++){var P=S[F],W=P.getBoundingClientRect(),V=W.height,J=W.width,ne=W.top,ce=W.right,ie=W.bottom,xe=W.left;if(l==="if-needed"&&r>=0&&t>=0&&n<=R&&a<=u&&r>=ne&&n<=ie&&t>=xe&&a<=ce)return f;var ge=getComputedStyle(P),de=parseInt(ge.borderLeftWidth,10),Fe=parseInt(ge.borderTopWidth,10),Qe=parseInt(ge.borderRightWidth,10),Ve=parseInt(ge.borderBottomWidth,10),Ne=0,Ue=0,q="offsetWidth"in P?P.offsetWidth-P.clientWidth-de-Qe:0,k="offsetHeight"in P?P.offsetHeight-P.clientHeight-Fe-Ve:0,z="offsetWidth"in P?P.offsetWidth===0?0:J/P.offsetWidth:0,X="offsetHeight"in P?P.offsetHeight===0?0:V/P.offsetHeight:0;if(g===P)Ne=s==="start"?p:s==="end"?p-R:s==="nearest"?Ee(T,T+R,R,Fe,Ve,T+p,T+p+y,y):p-R/2,Ue=h==="start"?_:h==="center"?_-u/2:h==="end"?_-u:Ee(i,i+u,u,de,Qe,i+_,i+_+o,o),Ne=Math.max(0,Ne+T),Ue=Math.max(0,Ue+i);else{Ne=s==="start"?p-ne-Fe:s==="end"?p-ie+Ve+k:s==="nearest"?Ee(ne,ie,V,Fe,Ve+k,p,p+y,y):p-(ne+V/2)+k/2,Ue=h==="start"?_-xe-de:h==="center"?_-(xe+J/2)+q/2:h==="end"?_-ce+Qe+q:Ee(xe,ce,J,de,Qe+q,_,_+o,o);var re=P.scrollLeft,te=P.scrollTop;p+=te-(Ne=Math.max(0,Math.min(te+Ne/X,P.scrollHeight-V/X+k))),_+=re-(Ue=Math.max(0,Math.min(re+Ue/z,P.scrollWidth-J/z+q)))}f.push({el:P,top:Ne,left:Ue})}return f};function $(D){return D===Object(D)&&Object.keys(D).length!==0}function O(D,N){N===void 0&&(N="auto");var c="scrollBehavior"in document.body.style;D.forEach(function(l){var s=l.el,h=l.top,x=l.left;s.scroll&&c?s.scroll({top:h,left:x,behavior:N}):(s.scrollTop=h,s.scrollLeft=x)})}function H(D){return D===!1?{block:"end",inline:"nearest"}:$(D)?D:{block:"start",inline:"nearest"}}function e(D,N){var c=D.isConnected||D.ownerDocument.documentElement.contains(D);if($(N)&&typeof N.behavior=="function")return N.behavior(c?ue(D,N):[]);if(!c)return;var l=H(N);return O(ue(D,l),l.behavior)}var M=_e.a=e},rePB:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return be});var he=Q("o46R");function be(ve,Ee,ue){return Ee=Object(he.a)(Ee),Ee in ve?Object.defineProperty(ve,Ee,{value:ue,enumerable:!0,configurable:!0,writable:!0}):ve[Ee]=ue,ve}},rgEC:function(dt,_e,Q){"use strict";Q.d(_e,"f",function(){return N}),Q.d(_e,"d",function(){return c}),Q.d(_e,"c",function(){return s}),Q.d(_e,"e",function(){return h}),Q.d(_e,"a",function(){return E}),Q.d(_e,"g",function(){return v}),Q.d(_e,"b",function(){return d});var he=Q("kxoy"),be=Q("aVTQ"),ve=Q("6ASS"),Ee=Q("fNpE"),ue=Q("qoVz"),$=Q("N7A4"),O=Q("B/uU"),H=Q("El5i"),e=["children"];function M(m,g){return"".concat(m,"-").concat(g)}function D(m){return m&&m.type&&m.type.isTreeNode}function N(m,g){return m!=null?m:g}function c(m){var g=m||{},S=g.title,A=g._title,u=g.key,R=g.children,i=S||"title";return{title:i,_title:A||[i],key:u||"key",children:R||"children"}}function l(m,g){var S=new Map;function A(u){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(u||[]).forEach(function(i){var T=i[g.key],w=i[g.children];Object(O.a)(T!=null,"Tree node must have a certain key: [".concat(R).concat(T,"]"));var y=String(T);Object(O.a)(!S.has(y)||T===null||T===void 0,"Same 'key' exist in the Tree: ".concat(y)),S.set(y,!0),A(w,"".concat(R).concat(y," > "))})}A(m)}function s(m){function g(S){var A=Object(ue.a)(S);return A.map(function(u){if(!D(u))return Object(O.a)(!u,"Tree/TreeNode can only accept TreeNode as children."),null;var R=u.key,i=u.props,T=i.children,w=Object(Ee.a)(i,e),y=Object(ve.a)({key:R},w),o=g(T);return o.length&&(y.children=o),y}).filter(function(u){return u})}return g(m)}function h(m,g,S){var A=c(S),u=A._title,R=A.key,i=A.children,T=new Set(g===!0?[]:g),w=[];function y(o){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return o.map(function(a,n){for(var t=M(r?r.pos:"0",n),p=N(a[R],t),_,f=0;f<u.length;f+=1){var F=u[f];if(a[F]!==void 0){_=a[F];break}}var P=Object(ve.a)(Object(ve.a)({},Object($.a)(a,[].concat(Object(be.a)(u),[R,i]))),{},{title:_,key:p,parent:r,pos:t,children:null,data:a,isStart:[].concat(Object(be.a)(r?r.isStart:[]),[n===0]),isEnd:[].concat(Object(be.a)(r?r.isEnd:[]),[n===o.length-1])});return w.push(P),g===!0||T.has(p)?P.children=y(a[i]||[],P):P.children=[],P})}return y(m),w}function x(m,g,S){var A={};Object(he.a)(S)==="object"?A=S:A={externalGetKey:S},A=A||{};var u=A,R=u.childrenPropName,i=u.externalGetKey,T=u.fieldNames,w=c(T),y=w.key,o=w.children,r=R||o,a;i?typeof i=="string"?a=function(p){return p[i]}:typeof i=="function"&&(a=function(p){return i(p)}):a=function(p,_){return N(p[y],_)};function n(t,p,_,f){var F=t?t[r]:m,P=t?M(_.pos,p):"0",W=t?[].concat(Object(be.a)(f),[t]):[];if(t){var V=a(t,P),J={node:t,index:p,pos:P,key:V,parentPos:_.node?_.pos:null,level:_.level+1,nodes:W};g(J)}F&&F.forEach(function(ne,ce){n(ne,ce,{node:t,pos:P,level:_?_.level+1:-1},W)})}n(null)}function E(m){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=g.initWrapper,A=g.processEntity,u=g.onProcessFinished,R=g.externalGetKey,i=g.childrenPropName,T=g.fieldNames,w=arguments.length>2?arguments[2]:void 0,y=R||w,o={},r={},a={posEntities:o,keyEntities:r};return S&&(a=S(a)||a),x(m,function(n){var t=n.node,p=n.index,_=n.pos,f=n.key,F=n.parentPos,P=n.level,W=n.nodes,V={node:t,nodes:W,index:p,key:f,pos:_,level:P},J=N(f,_);o[_]=V,r[J]=V,V.parent=o[F],V.parent&&(V.parent.children=V.parent.children||[],V.parent.children.push(V)),A&&A(V,a)},{externalGetKey:y,childrenPropName:i,fieldNames:T}),u&&u(a),a}function v(m,g){var S=g.expandedKeys,A=g.selectedKeys,u=g.loadedKeys,R=g.loadingKeys,i=g.checkedKeys,T=g.halfCheckedKeys,w=g.dragOverNodeKey,y=g.dropPosition,o=g.keyEntities,r=Object(H.a)(o,m),a={eventKey:m,expanded:S.indexOf(m)!==-1,selected:A.indexOf(m)!==-1,loaded:u.indexOf(m)!==-1,loading:R.indexOf(m)!==-1,checked:i.indexOf(m)!==-1,halfChecked:T.indexOf(m)!==-1,pos:String(r?r.pos:""),dragOver:w===m&&y===0,dragOverGapTop:w===m&&y===-1,dragOverGapBottom:w===m&&y===1};return a}function d(m){var g=m.data,S=m.expanded,A=m.selected,u=m.checked,R=m.loaded,i=m.loading,T=m.halfChecked,w=m.dragOver,y=m.dragOverGapTop,o=m.dragOverGapBottom,r=m.pos,a=m.active,n=m.eventKey,t=Object(ve.a)(Object(ve.a)({},g),{},{expanded:S,selected:A,checked:u,loaded:R,loading:i,halfChecked:T,dragOver:w,dragOverGapTop:y,dragOverGapBottom:o,pos:r,active:a,key:n});return"props"in t||Object.defineProperty(t,"props",{get:function(){return Object(O.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),m}}),t}},"sh+1":function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return be});var he=Q("a247");function be(ve,Ee){var ue;if(typeof Symbol=="undefined"||ve[Symbol.iterator]==null){if(Array.isArray(ve)||(ue=Object(he.a)(ve))||Ee&&ve&&typeof ve.length=="number"){ue&&(ve=ue);var $=0,O=function(){};return{s:O,n:function(){return $>=ve.length?{done:!0}:{done:!1,value:ve[$++]}},e:function(N){throw N},f:O}}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 H=!0,e=!1,M;return{s:function(){ue=ve[Symbol.iterator]()},n:function(){var N=ue.next();return H=N.done,N},e:function(N){e=!0,M=N},f:function(){try{!H&&ue.return!=null&&ue.return()}finally{if(e)throw M}}}}},t9D7:function(dt,_e,Q){"use strict";Q.d(_e,"b",function(){return O}),Q.d(_e,"g",function(){return e}),Q.d(_e,"d",function(){return M}),Q.d(_e,"e",function(){return D}),Q.d(_e,"a",function(){return N}),Q.d(_e,"f",function(){return s}),Q.d(_e,"c",function(){return h});var he=Q("Vhoy"),be=Q("MI8n"),ve=Q("pmY6"),Ee=Q("Cg/j"),ue=Q("ic2d"),$=Q("nEHx");const O=Object(Ee.c)("themeService");var H;(function(x){function E(v){return v&&typeof v=="object"&&typeof v.id=="string"}x.isThemeColor=E})(H||(H={}));function e(x){return{id:x}}var M;(function(x){function E(A){return A&&typeof A=="object"&&typeof A.id=="string"&&(typeof A.color=="undefined"||H.isThemeColor(A.color))}x.isThemeIcon=E;const v=new RegExp(`^\\$\\((${he.a.iconNameExpression}(?:${he.a.iconModifierExpression})?)\\)$`);function d(A){const u=v.exec(A);if(!u)return;let[,R]=u;return{id:R}}x.fromString=d;function m(A,u){let R=A.id;const i=R.lastIndexOf("~");return i!==-1&&(R=R.substring(0,i)),u&&(R=`${R}~${u}`),{id:R}}x.modify=m;function g(A,u){var R,i;return A.id===u.id&&((R=A.color)===null||R===void 0?void 0:R.id)===((i=u.color)===null||i===void 0?void 0:i.id)}x.isEqual=g;function S(A,u){return{id:A.id,color:u?e(u):void 0}}x.asThemeIcon=S,x.asClassNameArray=he.a.asClassNameArray,x.asClassName=he.a.asClassName,x.asCSSSelector=he.a.asCSSSelector})(M||(M={}));function D(x){switch(x){case $.a.DARK:return"vs-dark";case $.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const N={ThemingContribution:"base.contributions.theming"};class c{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new be.b}onColorThemeChange(x){return this.themingParticipants.push(x),this.onThemingParticipantAddedEmitter.fire(x),Object(ve.i)(()=>{const E=this.themingParticipants.indexOf(x);this.themingParticipants.splice(E,1)})}getThemingParticipants(){return this.themingParticipants}}let l=new c;ue.a.add(N.ThemingContribution,l);function s(x){return l.onColorThemeChange(x)}class h extends ve.a{constructor(x){super();this.themeService=x,this.theme=x.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(E=>this.onThemeChange(E)))}onThemeChange(x){this.theme=x,this.updateStyles()}updateStyles(){}}},ttT4:function(dt,_e){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */_e.read=function(Q,he,be,ve,Ee){var ue,$,O=Ee*8-ve-1,H=(1<<O)-1,e=H>>1,M=-7,D=be?Ee-1:0,N=be?-1:1,c=Q[he+D];for(D+=N,ue=c&(1<<-M)-1,c>>=-M,M+=O;M>0;ue=ue*256+Q[he+D],D+=N,M-=8);for($=ue&(1<<-M)-1,ue>>=-M,M+=ve;M>0;$=$*256+Q[he+D],D+=N,M-=8);if(ue===0)ue=1-e;else{if(ue===H)return $?NaN:(c?-1:1)*Infinity;$=$+Math.pow(2,ve),ue=ue-e}return(c?-1:1)*$*Math.pow(2,ue-ve)},_e.write=function(Q,he,be,ve,Ee,ue){var $,O,H,e=ue*8-Ee-1,M=(1<<e)-1,D=M>>1,N=Ee===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=ve?0:ue-1,l=ve?1:-1,s=he<0||he===0&&1/he<0?1:0;for(he=Math.abs(he),isNaN(he)||he===Infinity?(O=isNaN(he)?1:0,$=M):($=Math.floor(Math.log(he)/Math.LN2),he*(H=Math.pow(2,-$))<1&&($--,H*=2),$+D>=1?he+=N/H:he+=N*Math.pow(2,1-D),he*H>=2&&($++,H/=2),$+D>=M?(O=0,$=M):$+D>=1?(O=(he*H-1)*Math.pow(2,Ee),$=$+D):(O=he*Math.pow(2,D-1)*Math.pow(2,Ee),$=0));Ee>=8;Q[be+c]=O&255,c+=l,O/=256,Ee-=8);for($=$<<Ee|O,e+=Ee;e>0;Q[be+c]=$&255,c+=l,$/=256,e-=8);Q[be+c-l]|=s*128}},"tty/":function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return D}),Q.d(_e,"b",function(){return c});var he=/margin|padding|width|height|max|min|offset/,be={left:!0,top:!0},ve={cssFloat:1,styleFloat:1,float:1};function Ee(l){return l.nodeType===1?l.ownerDocument.defaultView.getComputedStyle(l,null):{}}function ue(l,s,h){if(s=s.toLowerCase(),h==="auto"){if(s==="height")return l.offsetHeight;if(s==="width")return l.offsetWidth}return s in be||(be[s]=he.test(s)),be[s]?parseFloat(h)||0:h}function $(l,s){var h=arguments.length,x=Ee(l);return s=ve[s]?"cssFloat"in l.style?"cssFloat":"styleFloat":s,h===1?x:ue(l,s,x[s]||l.style[s])}function O(l,s,h){var x=arguments.length;if(s=ve[s]?"cssFloat"in l.style?"cssFloat":"styleFloat":s,x===3)return typeof h=="number"&&he.test(s)&&(h="".concat(h,"px")),l.style[s]=h,h;for(var E in s)s.hasOwnProperty(E)&&O(l,E,s[E]);return Ee(l)}function H(l){return l===document.body?document.documentElement.clientWidth:l.offsetWidth}function e(l){return l===document.body?window.innerHeight||document.documentElement.clientHeight:l.offsetHeight}function M(){var l=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),s=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:l,height:s}}function D(){var l=document.documentElement.clientWidth,s=window.innerHeight||document.documentElement.clientHeight;return{width:l,height:s}}function N(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function c(l){var s=l.getBoundingClientRect(),h=document.documentElement;return{left:s.left+(window.pageXOffset||h.scrollLeft)-(h.clientLeft||document.body.clientLeft||0),top:s.top+(window.pageYOffset||h.scrollTop)-(h.clientTop||document.body.clientTop||0)}}},ulZh:function(dt,_e,Q){typeof window!="undefined"&&function(be,ve){dt.exports=ve()}(this,()=>(()=>{var he={"./src/config.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{enableStreamingMode:()=>a,hlsDefaultConfig:()=>y,mergeConfig:()=>r});var H=O("./src/controller/abr-controller.ts"),e=O("./src/controller/audio-stream-controller.ts"),M=O("./src/controller/audio-track-controller.ts"),D=O("./src/controller/subtitle-stream-controller.ts"),N=O("./src/controller/subtitle-track-controller.ts"),c=O("./src/controller/buffer-controller.ts"),l=O("./src/controller/timeline-controller.ts"),s=O("./src/controller/cap-level-controller.ts"),h=O("./src/controller/fps-controller.ts"),x=O("./src/controller/eme-controller.ts"),E=O("./src/controller/cmcd-controller.ts"),v=O("./src/utils/xhr-loader.ts"),d=O("./src/utils/fetch-loader.ts"),m=O("./src/utils/cues.ts"),g=O("./src/utils/mediakeys-helper.ts"),S=O("./src/utils/logger.ts");function A(){return A=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var p=arguments[t];for(var _ in p)Object.prototype.hasOwnProperty.call(p,_)&&(n[_]=p[_])}return n},A.apply(this,arguments)}function u(n,t){var p=Object.keys(n);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(n);t&&(_=_.filter(function(f){return Object.getOwnPropertyDescriptor(n,f).enumerable})),p.push.apply(p,_)}return p}function R(n){for(var t=1;t<arguments.length;t++){var p=arguments[t]!=null?arguments[t]:{};t%2?u(Object(p),!0).forEach(function(_){i(n,_,p[_])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(p)):u(Object(p)).forEach(function(_){Object.defineProperty(n,_,Object.getOwnPropertyDescriptor(p,_))})}return n}function i(n,t,p){return t=T(t),t in n?Object.defineProperty(n,t,{value:p,enumerable:!0,configurable:!0,writable:!0}):n[t]=p,n}function T(n){var t=w(n,"string");return typeof t=="symbol"?t:String(t)}function w(n,t){if(typeof n!="object"||n===null)return n;var p=n[Symbol.toPrimitive];if(p!==void 0){var _=p.call(n,t||"default");if(typeof _!="object")return _;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(n)}var y=R(R({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!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:v.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:H.default,bufferController:c.default,capLevelController:s.default,fpsController:h.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,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:g.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0},o()),{},{subtitleStreamController:D.SubtitleStreamController,subtitleTrackController:N.default,timelineController:l.TimelineController,audioStreamController:e.default,audioTrackController:M.default,emeController:x.default,cmcdController:E.default});function o(){return{cueHandler:m.default,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function r(n,t){if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(t.liveMaxLatencyDurationCount!==void 0&&(t.liveSyncDurationCount===void 0||t.liveMaxLatencyDurationCount<=t.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(t.liveMaxLatencyDuration!==void 0&&(t.liveSyncDuration===void 0||t.liveMaxLatencyDuration<=t.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return A({},n,t)}function a(n){var t=n.loader;if(t!==d.default&&t!==v.default)S.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),n.progressive=!1;else{var p=(0,d.fetchSupported)();p&&(n.loader=d.default,n.progressive=!0,n.enableSoftwareAES=!0,S.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>v});var H=O("./src/polyfills/number.ts"),e=O("./src/utils/ewma-bandwidth-estimator.ts"),M=O("./src/events.ts"),D=O("./src/errors.ts"),N=O("./src/types/loader.ts"),c=O("./src/utils/logger.ts");function l(d,m){for(var g=0;g<m.length;g++){var S=m[g];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(d,h(S.key),S)}}function s(d,m,g){return m&&l(d.prototype,m),g&&l(d,g),Object.defineProperty(d,"prototype",{writable:!1}),d}function h(d){var m=x(d,"string");return typeof m=="symbol"?m:String(m)}function x(d,m){if(typeof d!="object"||d===null)return d;var g=d[Symbol.toPrimitive];if(g!==void 0){var S=g.call(d,m||"default");if(typeof S!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(d)}var E=function(){function d(g){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=g;var S=g.config;this.bwEstimator=new e.default(S.abrEwmaSlowVoD,S.abrEwmaFastVoD,S.abrEwmaDefaultEstimate),this.registerListeners()}var m=d.prototype;return m.registerListeners=function(){var S=this.hls;S.on(M.Events.FRAG_LOADING,this.onFragLoading,this),S.on(M.Events.FRAG_LOADED,this.onFragLoaded,this),S.on(M.Events.FRAG_BUFFERED,this.onFragBuffered,this),S.on(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),S.on(M.Events.ERROR,this.onError,this)},m.unregisterListeners=function(){var S=this.hls;S.off(M.Events.FRAG_LOADING,this.onFragLoading,this),S.off(M.Events.FRAG_LOADED,this.onFragLoaded,this),S.off(M.Events.FRAG_BUFFERED,this.onFragBuffered,this),S.off(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),S.off(M.Events.ERROR,this.onError,this)},m.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},m.onFragLoading=function(S,A){var u=A.frag;if(u.type===N.PlaylistLevelType.MAIN&&!this.timer){var R;this.fragCurrent=u,this.partCurrent=(R=A.part)!=null?R:null,this.timer=self.setInterval(this.onCheck,100)}},m.onLevelLoaded=function(S,A){var u=this.hls.config;A.details.live?this.bwEstimator.update(u.abrEwmaSlowLive,u.abrEwmaFastLive):this.bwEstimator.update(u.abrEwmaSlowVoD,u.abrEwmaFastVoD)},m._abandonRulesCheck=function(){var S=this.fragCurrent,A=this.partCurrent,u=this.hls,R=u.autoLevelEnabled,i=u.media;if(!S||!i)return;var T=A?A.stats:S.stats,w=A?A.duration:S.duration;if(T.aborted||T.loaded&&T.loaded===T.total||S.level===0){this.clearTimer(),this._nextAutoLevel=-1;return}if(!R||i.paused||!i.playbackRate||!i.readyState)return;var y=u.mainForwardBufferInfo;if(y===null)return;var o=performance.now()-T.loading.start,r=Math.abs(i.playbackRate);if(o<=500*w/r)return;var a=T.loaded&&T.loading.first,n=this.bwEstimator.getEstimate(),t=u.levels,p=u.minAutoLevel,_=t[S.level],f=T.total||Math.max(T.loaded,Math.round(w*_.maxBitrate/8)),F=a?T.loaded*1e3/o:0,P=F?(f-T.loaded)/F:f*8/n,W=y.len/r;if(P<=W)return;var V=Number.POSITIVE_INFINITY,J;for(J=S.level-1;J>p;J--){var ne=t[J].maxBitrate;if(V=F?w*ne/(8*.8*F):w*ne/n,V<W)break}if(V>=P)return;c.logger.warn("Fragment "+S.sn+(A?" part "+A.index:"")+" of level "+S.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+J+`
|
|
Current BW estimate: `+((0,H.isFiniteNumber)(n)?(n/1024).toFixed(3):"Unknown")+` Kb/s
|
|
Estimated load time for current fragment: `+P.toFixed(3)+` s
|
|
Estimated load time for the next fragment: `+V.toFixed(3)+` s
|
|
Time to underbuffer: `+W.toFixed(3)+" s"),u.nextLoadLevel=J,a&&this.bwEstimator.sample(o,T.loaded),this.clearTimer(),(S.loader||S.keyLoader)&&(this.fragCurrent=this.partCurrent=null,S.abortRequests()),u.trigger(M.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:S,part:A,stats:T})},m.onFragLoaded=function(S,A){var u=A.frag,R=A.part;if(u.type===N.PlaylistLevelType.MAIN&&(0,H.isFiniteNumber)(u.sn)){var i=R?R.stats:u.stats,T=R?R.duration:u.duration;if(this.clearTimer(),this.lastLoadedFragLevel=u.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var w=this.hls.levels[u.level],y=(w.loaded?w.loaded.bytes:0)+i.loaded,o=(w.loaded?w.loaded.duration:0)+T;w.loaded={bytes:y,duration:o},w.realBitrate=Math.round(8*y/o)}if(u.bitrateTest){var r={stats:i,frag:u,part:R,id:u.type};this.onFragBuffered(M.Events.FRAG_BUFFERED,r)}}},m.onFragBuffered=function(S,A){var u=A.frag,R=A.part,i=R?R.stats:u.stats;if(i.aborted)return;if(u.type!==N.PlaylistLevelType.MAIN||u.sn==="initSegment")return;var T=i.parsing.end-i.loading.start;this.bwEstimator.sample(T,i.loaded),i.bwEstimate=this.bwEstimator.getEstimate(),u.bitrateTest?this.bitrateTestDelay=T/1e3:this.bitrateTestDelay=0},m.onError=function(S,A){var u;if(((u=A.frag)===null||u===void 0?void 0:u.type)===N.PlaylistLevelType.MAIN){if(A.type===D.ErrorTypes.KEY_SYSTEM_ERROR){this.clearTimer();return}switch(A.details){case D.ErrorDetails.FRAG_LOAD_ERROR:case D.ErrorDetails.FRAG_LOAD_TIMEOUT:case D.ErrorDetails.KEY_LOAD_ERROR:case D.ErrorDetails.KEY_LOAD_TIMEOUT:this.clearTimer();break;default:break}}},m.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},m.getNextABRAutoLevel=function(){var S=this.fragCurrent,A=this.partCurrent,u=this.hls,R=u.maxAutoLevel,i=u.config,T=u.minAutoLevel,w=u.media,y=A?A.duration:S?S.duration:0,o=w&&w.playbackRate!==0?Math.abs(w.playbackRate):1,r=this.bwEstimator?this.bwEstimator.getEstimate():i.abrEwmaDefaultEstimate,a=u.mainForwardBufferInfo,n=(a?a.len:0)/o,t=this.findBestLevel(r,T,R,n,i.abrBandWidthFactor,i.abrBandWidthUpFactor);if(t>=0)return t;c.logger.trace((n?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var p=y?Math.min(y,i.maxStarvationDelay):i.maxStarvationDelay,_=i.abrBandWidthFactor,f=i.abrBandWidthUpFactor;if(!n){var F=this.bitrateTestDelay;if(F){var P=y?Math.min(y,i.maxLoadingDelay):i.maxLoadingDelay;p=P-F,c.logger.trace("bitrate test took "+Math.round(1e3*F)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*p)+" ms"),_=f=1}}return t=this.findBestLevel(r,T,R,n+p,_,f),Math.max(t,0)},m.findBestLevel=function(S,A,u,R,i,T){for(var w,y=this.fragCurrent,o=this.partCurrent,r=this.lastLoadedFragLevel,a=this.hls.levels,n=a[r],t=!!(n!=null&&(w=n.details)!==null&&w!==void 0&&w.live),p=n==null?void 0:n.codecSet,_=o?o.duration:y?y.duration:0,f=u;f>=A;f--){var F=a[f];if(!F||p&&F.codecSet!==p)continue;var P=F.details,W=(o?P==null?void 0:P.partTarget:P==null?void 0:P.averagetargetduration)||_,V=void 0;f<=r?V=i*S:V=T*S;var J=a[f].maxBitrate,ne=J*W/V;if(c.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+f+"/"+Math.round(V)+"/"+J+"/"+W+"/"+R+"/"+ne),V>J&&(ne===0||!(0,H.isFiniteNumber)(ne)||t&&!this.bitrateTestDelay||ne<R))return f}return-1},s(d,[{key:"nextAutoLevel",get:function(){var S=this._nextAutoLevel,A=this.bwEstimator;if(S!==-1&&!A.canEstimate())return S;var u=this.getNextABRAutoLevel();return S!==-1&&this.hls.levels[u].loadError?S:(S!==-1&&(u=Math.min(S,u)),u)},set:function(S){this._nextAutoLevel=S}}]),d}();const v=E},"./src/controller/audio-stream-controller.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>i});var H=O("./src/polyfills/number.ts"),e=O("./src/controller/base-stream-controller.ts"),M=O("./src/events.ts"),D=O("./src/utils/buffer-helper.ts"),N=O("./src/controller/fragment-tracker.ts"),c=O("./src/types/level.ts"),l=O("./src/types/loader.ts"),s=O("./src/loader/fragment.ts"),h=O("./src/demux/chunk-cache.ts"),x=O("./src/demux/transmuxer-interface.ts"),E=O("./src/types/transmuxer.ts"),v=O("./src/controller/fragment-finders.ts"),d=O("./src/utils/discontinuities.ts"),m=O("./src/errors.ts");function g(){return g=Object.assign?Object.assign.bind():function(T){for(var w=1;w<arguments.length;w++){var y=arguments[w];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(T[o]=y[o])}return T},g.apply(this,arguments)}function S(T,w){T.prototype=Object.create(w.prototype),T.prototype.constructor=T,A(T,w)}function A(T,w){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},A(T,w)}var u=100,R=function(T){S(w,T);function w(o,r,a){var n;return n=T.call(this,o,r,a,"[audio-stream-controller]")||this,n.videoBuffer=null,n.videoTrackCC=-1,n.waitingVideoCC=-1,n.audioSwitch=!1,n.trackId=-1,n.waitingData=null,n.mainDetails=null,n.bufferFlushed=!1,n.cachedTrackLoadedData=null,n._registerListeners(),n}var y=w.prototype;return y.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},y._registerListeners=function(){var r=this.hls;r.on(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.on(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.on(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.on(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),r.on(M.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),r.on(M.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),r.on(M.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),r.on(M.Events.ERROR,this.onError,this),r.on(M.Events.BUFFER_RESET,this.onBufferReset,this),r.on(M.Events.BUFFER_CREATED,this.onBufferCreated,this),r.on(M.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),r.on(M.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),r.on(M.Events.FRAG_BUFFERED,this.onFragBuffered,this)},y._unregisterListeners=function(){var r=this.hls;r.off(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.off(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.off(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.off(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),r.off(M.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),r.off(M.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),r.off(M.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),r.off(M.Events.ERROR,this.onError,this),r.off(M.Events.BUFFER_RESET,this.onBufferReset,this),r.off(M.Events.BUFFER_CREATED,this.onBufferCreated,this),r.off(M.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),r.off(M.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),r.off(M.Events.FRAG_BUFFERED,this.onFragBuffered,this)},y.onInitPtsFound=function(r,a){var n=a.frag,t=a.id,p=a.initPTS;if(t==="main"){var _=n.cc;this.initPTS[n.cc]=p,this.log("InitPTS for cc: "+_+" found from main: "+p),this.videoTrackCC=_,this.state===e.State.WAITING_INIT_PTS&&this.tick()}},y.startLoad=function(r){if(!this.levels){this.startPosition=r,this.state=e.State.STOPPED;return}var a=this.lastCurrentTime;this.stopLoad(),this.setInterval(u),this.fragLoadError=0,a>0&&r===-1?(this.log("Override startPosition with lastCurrentTime @"+a.toFixed(3)),r=a,this.state=e.State.IDLE):(this.loadedmetadata=!1,this.state=e.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=r,this.tick()},y.doTick=function(){switch(this.state){case e.State.IDLE:this.doTickIdle();break;case e.State.WAITING_TRACK:{var r,a=this.levels,n=this.trackId,t=a==null||((r=a[n])===null||r===void 0)?void 0:r.details;if(t){if(this.waitForCdnTuneIn(t))break;this.state=e.State.WAITING_INIT_PTS}break}case e.State.FRAG_LOADING_WAITING_RETRY:{var p,_=performance.now(),f=this.retryDate;(!f||_>=f||(p=this.media)!==null&&p!==void 0&&p.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded(this.trackId),this.state=e.State.IDLE);break}case e.State.WAITING_INIT_PTS:{var F=this.waitingData;if(F){var P=F.frag,W=F.part,V=F.cache,J=F.complete;if(this.initPTS[P.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=e.State.FRAG_LOADING;var ne=V.flush(),ce={frag:P,part:W,payload:ne,networkDetails:null};this._handleFragmentLoadProgress(ce),J&&T.prototype._handleFragmentLoadComplete.call(this,ce)}else if(this.videoTrackCC!==this.waitingVideoCC)this.log("Waiting fragment cc ("+P.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var ie=this.getLoadPosition(),xe=D.BufferHelper.bufferInfo(this.mediaBuffer,ie,this.config.maxBufferHole),ge=(0,v.fragmentWithinToleranceTest)(xe.end,this.config.maxFragLookUpTolerance,P);ge<0&&(this.log("Waiting fragment cc ("+P.cc+") @ "+P.start+" cancelled because another fragment at "+xe.end+" is needed"),this.clearWaitingFragment())}}else this.state=e.State.IDLE}}this.onTickEnd()},y.clearWaitingFragment=function(){var r=this.waitingData;r&&(this.fragmentTracker.removeFragment(r.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=e.State.IDLE)},y.resetLoadingState=function(){this.clearWaitingFragment(),T.prototype.resetLoadingState.call(this)},y.onTickEnd=function(){var r=this.media;if(!r||!r.readyState)return;this.lastCurrentTime=r.currentTime},y.doTickIdle=function(){var r=this.hls,a=this.levels,n=this.media,t=this.trackId,p=r.config;if(!a||!a[t])return;if(!n&&(this.startFragRequested||!p.startFragPrefetch))return;var _=a[t],f=_.details;if(!f||f.live&&this.levelLastLoaded!==t||this.waitForCdnTuneIn(f)){this.state=e.State.WAITING_TRACK;return}var F=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&F&&(this.bufferFlushed=!1,this.afterBufferFlushed(F,s.ElementaryStreamTypes.AUDIO,l.PlaylistLevelType.AUDIO));var P=this.getFwdBufferInfo(F,l.PlaylistLevelType.AUDIO);if(P===null)return;var W=this.audioSwitch;if(!W&&this._streamEnded(P,f)){r.trigger(M.Events.BUFFER_EOS,{type:"audio"}),this.state=e.State.ENDED;return}var V=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,l.PlaylistLevelType.MAIN),J=P.len,ne=this.getMaxBufferLength(V==null?void 0:V.len);if(J>=ne&&!W)return;var ce=f.fragments,ie=ce[0].start,xe=P.end;if(W&&n){var ge=this.getLoadPosition();xe=ge,f.PTSKnown&&ge<ie&&((P.end>ie||P.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),n.currentTime=ie+.05))}if(V&&xe>V.end+f.targetduration)return;if((!V||!V.len)&&P.len)return;var de=this.getNextFragment(xe,f);if(!de){this.bufferFlushed=!0;return}this.loadFragment(de,f,xe)},y.getMaxBufferLength=function(r){var a=T.prototype.getMaxBufferLength.call(this);return r?Math.max(a,r):a},y.onMediaDetaching=function(){this.videoBuffer=null,T.prototype.onMediaDetaching.call(this)},y.onAudioTracksUpdated=function(r,a){var n=a.audioTracks;this.resetTransmuxer(),this.levels=n.map(function(t){return new c.Level(t)})},y.onAudioTrackSwitching=function(r,a){var n=!!a.url;this.trackId=a.id;var t=this.fragCurrent;t&&t.abortRequests(),this.fragCurrent=null,this.clearWaitingFragment(),n?this.setInterval(u):this.resetTransmuxer(),n?(this.audioSwitch=!0,this.state=e.State.IDLE):this.state=e.State.STOPPED,this.tick()},y.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},y.onLevelLoaded=function(r,a){this.mainDetails=a.details,this.cachedTrackLoadedData!==null&&(this.hls.trigger(M.Events.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)},y.onAudioTrackLoaded=function(r,a){var n;if(this.mainDetails==null){this.cachedTrackLoadedData=a;return}var t=this.levels,p=a.details,_=a.id;if(!t){this.warn("Audio tracks were reset while loading level "+_);return}this.log("Track "+_+" loaded ["+p.startSN+","+p.endSN+"],duration:"+p.totalduration);var f=t[_],F=0;if(p.live||(n=f.details)!==null&&n!==void 0&&n.live){var P=this.mainDetails;if(p.fragments[0]||(p.deltaUpdateFailed=!0),p.deltaUpdateFailed||!P)return;!f.details&&p.hasProgramDateTime&&P.hasProgramDateTime?((0,d.alignMediaPlaylistByPDT)(p,P),F=p.fragments[0].start):F=this.alignPlaylists(p,f.details)}f.details=p,this.levelLastLoaded=_,!this.startFragRequested&&(this.mainDetails||!p.live)&&this.setStartPosition(f.details,F),this.state===e.State.WAITING_TRACK&&!this.waitForCdnTuneIn(p)&&(this.state=e.State.IDLE),this.tick()},y._handleFragmentLoadProgress=function(r){var a,n=r.frag,t=r.part,p=r.payload,_=this.config,f=this.trackId,F=this.levels;if(!F){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered");return}var P=F[f];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 V=_.defaultAudioCodec||P.audioCodec||"mp4a.40.2",J=this.transmuxer;J||(J=this.transmuxer=new x.default(this.hls,l.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var ne=this.initPTS[n.cc],ce=(a=n.initSegment)===null||a===void 0?void 0:a.data;if(ne!==void 0){var ie=!1,xe=t?t.index:-1,ge=xe!==-1,de=new E.ChunkMetadata(n.level,n.sn,n.stats.chunkCount,p.byteLength,xe,ge);J.push(p,ce,V,"",n,t,W.totalduration,ie,de,ne)}else{this.log("Unknown video PTS for cc "+n.cc+", waiting for video PTS before demuxing audio frag "+n.sn+" of ["+W.startSN+" ,"+W.endSN+"],track "+f);var Fe=this.waitingData=this.waitingData||{frag:n,part:t,cache:new h.default,complete:!1},Qe=Fe.cache;Qe.push(new Uint8Array(p)),this.waitingVideoCC=this.videoTrackCC,this.state=e.State.WAITING_INIT_PTS}},y._handleFragmentLoadComplete=function(r){if(this.waitingData){this.waitingData.complete=!0;return}T.prototype._handleFragmentLoadComplete.call(this,r)},y.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},y.onBufferCreated=function(r,a){var n=a.tracks.audio;n&&(this.mediaBuffer=n.buffer||null),a.tracks.video&&(this.videoBuffer=a.tracks.video.buffer||null)},y.onFragBuffered=function(r,a){var n=a.frag,t=a.part;if(n.type!==l.PlaylistLevelType.AUDIO){if(!this.loadedmetadata&&n.type===l.PlaylistLevelType.MAIN){var p;(p=this.videoBuffer||this.media)!==null&&p!==void 0&&p.buffered.length&&(this.loadedmetadata=!0)}return}if(this.fragContextChanged(n)){this.warn("Fragment "+n.sn+(t?" p: "+t.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}n.sn!=="initSegment"&&(this.fragPrevious=n,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(M.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(n,t)},y.onError=function(r,a){if(a.type===m.ErrorTypes.KEY_SYSTEM_ERROR){this.onFragmentOrKeyLoadError(l.PlaylistLevelType.AUDIO,a);return}switch(a.details){case m.ErrorDetails.FRAG_LOAD_ERROR:case m.ErrorDetails.FRAG_LOAD_TIMEOUT:case m.ErrorDetails.FRAG_PARSING_ERROR:case m.ErrorDetails.KEY_LOAD_ERROR:case m.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(l.PlaylistLevelType.AUDIO,a);break;case m.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case m.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==e.State.ERROR&&this.state!==e.State.STOPPED&&(this.state=a.fatal?e.State.ERROR:e.State.IDLE,this.warn(a.details+" while loading frag, switching to "+this.state+" state"));break;case m.ErrorDetails.BUFFER_FULL_ERROR:if(a.parent==="audio"&&(this.state===e.State.PARSING||this.state===e.State.PARSED)){var n=!0,t=this.getFwdBufferInfo(this.mediaBuffer,l.PlaylistLevelType.AUDIO);t&&t.len>.5&&(n=!this.reduceMaxBufferLength(t.len)),n&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,T.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},y.onBufferFlushed=function(r,a){var n=a.type;n===s.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0,this.state===e.State.ENDED&&(this.state=e.State.IDLE))},y._handleTransmuxComplete=function(r){var a,n="audio",t=this.hls,p=r.remuxResult,_=r.chunkMeta,f=this.getCurrentContext(_);if(!f){this.warn("The loading context changed while buffering fragment "+_.sn+" of level "+_.level+". This chunk will not be buffered."),this.resetStartWhenNotLoaded(_.level);return}var F=f.frag,P=f.part,W=f.level.details,V=p.audio,J=p.text,ne=p.id3,ce=p.initSegment;if(this.fragContextChanged(F)||!W)return;if(this.state=e.State.PARSING,this.audioSwitch&&V&&this.completeAudioSwitch(),ce!=null&&ce.tracks&&(this._bufferInitSegment(ce.tracks,F,_),t.trigger(M.Events.FRAG_PARSING_INIT_SEGMENT,{frag:F,id:n,tracks:ce.tracks})),V){var ie=V.startPTS,xe=V.endPTS,ge=V.startDTS,de=V.endDTS;P&&(P.elementaryStreams[s.ElementaryStreamTypes.AUDIO]={startPTS:ie,endPTS:xe,startDTS:ge,endDTS:de}),F.setElementaryStreamInfo(s.ElementaryStreamTypes.AUDIO,ie,xe,ge,de),this.bufferFragmentData(V,F,P,_)}if(ne!=null&&(a=ne.samples)!==null&&a!==void 0&&a.length){var Fe=g({id:n,frag:F,details:W},ne);t.trigger(M.Events.FRAG_PARSING_METADATA,Fe)}if(J){var Qe=g({id:n,frag:F,details:W},J);t.trigger(M.Events.FRAG_PARSING_USERDATA,Qe)}},y._bufferInitSegment=function(r,a,n){if(this.state!==e.State.PARSING)return;r.video&&delete r.video;var t=r.audio;if(!t)return;t.levelCodec=t.codec,t.id="audio",this.log("Init audio buffer, container:"+t.container+", codecs[parsed]=["+t.codec+"]"),this.hls.trigger(M.Events.BUFFER_CODECS,r);var p=t.initSegment;if(p!=null&&p.byteLength){var _={type:"audio",frag:a,part:null,chunkMeta:n,parent:a.type,data:p};this.hls.trigger(M.Events.BUFFER_APPENDING,_)}this.tick()},y.loadFragment=function(r,a,n){var t=this.fragmentTracker.getState(r);this.fragCurrent=r,(this.audioSwitch||t===N.FragmentState.NOT_LOADED||t===N.FragmentState.PARTIAL)&&(r.sn==="initSegment"?this._loadInitSegment(r,a):a.live&&!(0,H.isFiniteNumber)(this.initPTS[r.cc])?(this.log("Waiting for video PTS in continuity counter "+r.cc+" of live stream before loading audio fragment "+r.sn+" of level "+this.trackId),this.state=e.State.WAITING_INIT_PTS):(this.startFragRequested=!0,T.prototype.loadFragment.call(this,r,a,n)))},y.completeAudioSwitch=function(){var r=this.hls,a=this.media,n=this.trackId;a&&(this.log("Switching audio track : flushing all audio"),T.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,r.trigger(M.Events.AUDIO_TRACK_SWITCHED,{id:n})},w}(e.default);const i=R},"./src/controller/audio-track-controller.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>v});var H=O("./src/events.ts"),e=O("./src/errors.ts"),M=O("./src/controller/base-playlist-controller.ts"),D=O("./src/types/loader.ts");function N(d,m){for(var g=0;g<m.length;g++){var S=m[g];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(d,l(S.key),S)}}function c(d,m,g){return m&&N(d.prototype,m),g&&N(d,g),Object.defineProperty(d,"prototype",{writable:!1}),d}function l(d){var m=s(d,"string");return typeof m=="symbol"?m:String(m)}function s(d,m){if(typeof d!="object"||d===null)return d;var g=d[Symbol.toPrimitive];if(g!==void 0){var S=g.call(d,m||"default");if(typeof S!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(d)}function h(d,m){d.prototype=Object.create(m.prototype),d.prototype.constructor=d,x(d,m)}function x(d,m){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(S,A){return S.__proto__=A,S},x(d,m)}var E=function(d){h(m,d);function m(S){var A;return A=d.call(this,S,"[audio-track-controller]")||this,A.tracks=[],A.groupId=null,A.tracksInGroup=[],A.trackId=-1,A.trackName="",A.selectDefaultTrack=!0,A.registerListeners(),A}var g=m.prototype;return g.registerListeners=function(){var A=this.hls;A.on(H.Events.MANIFEST_LOADING,this.onManifestLoading,this),A.on(H.Events.MANIFEST_PARSED,this.onManifestParsed,this),A.on(H.Events.LEVEL_LOADING,this.onLevelLoading,this),A.on(H.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),A.on(H.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),A.on(H.Events.ERROR,this.onError,this)},g.unregisterListeners=function(){var A=this.hls;A.off(H.Events.MANIFEST_LOADING,this.onManifestLoading,this),A.off(H.Events.MANIFEST_PARSED,this.onManifestParsed,this),A.off(H.Events.LEVEL_LOADING,this.onLevelLoading,this),A.off(H.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),A.off(H.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),A.off(H.Events.ERROR,this.onError,this)},g.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,d.prototype.destroy.call(this)},g.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},g.onManifestParsed=function(A,u){this.tracks=u.audioTracks||[]},g.onAudioTrackLoaded=function(A,u){var R=u.id,i=u.details,T=this.tracksInGroup[R];if(!T){this.warn("Invalid audio track id "+R);return}var w=T.details;T.details=u.details,this.log("audioTrack "+R+" loaded ["+i.startSN+"-"+i.endSN+"]"),R===this.trackId&&(this.retryCount=0,this.playlistLoaded(R,u,w))},g.onLevelLoading=function(A,u){this.switchLevel(u.level)},g.onLevelSwitching=function(A,u){this.switchLevel(u.level)},g.switchLevel=function(A){var u=this.hls.levels[A];if(!(u!=null&&u.audioGroupIds))return;var R=u.audioGroupIds[u.urlId];if(this.groupId!==R){this.groupId=R;var i=this.tracks.filter(function(w){return!R||w.groupId===R});this.selectDefaultTrack&&!i.some(function(w){return w.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=i;var T={audioTracks:i};this.log("Updating audio tracks, "+i.length+' track(s) found in "'+R+'" group-id'),this.hls.trigger(H.Events.AUDIO_TRACKS_UPDATED,T),this.selectInitialTrack()}},g.onError=function(A,u){if(d.prototype.onError.call(this,A,u),u.fatal||!u.context)return;u.context.type===D.PlaylistContextType.AUDIO_TRACK&&u.context.id===this.trackId&&u.context.groupId===this.groupId&&this.retryLoadingOrFail(u)},g.setAudioTrack=function(A){var u=this.tracksInGroup;if(A<0||A>=u.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var R=u[this.trackId];this.log("Now switching to audio-track index "+A);var i=u[A],T=i.id,w=i.groupId,y=w===void 0?"":w,o=i.name,r=i.type,a=i.url;if(this.trackId=A,this.trackName=o,this.selectDefaultTrack=!1,this.hls.trigger(H.Events.AUDIO_TRACK_SWITCHING,{id:T,groupId:y,name:o,type:r,url:a}),i.details&&!i.details.live)return;var n=this.switchParams(i.url,R==null?void 0:R.details);this.loadPlaylist(n)},g.selectInitialTrack=function(){var A=this.tracksInGroup;console.assert(A.length,"Initial audio track should be selected when tracks are known");var u=this.trackName,R=this.findTrackId(u)||this.findTrackId();R!==-1?this.setAudioTrack(R):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(H.Events.ERROR,{type:e.ErrorTypes.MEDIA_ERROR,details:e.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},g.findTrackId=function(A){for(var u=this.tracksInGroup,R=0;R<u.length;R++){var i=u[R];if((!this.selectDefaultTrack||i.default)&&(!A||A===i.name))return i.id}return-1},g.loadPlaylist=function(A){d.prototype.loadPlaylist.call(this);var u=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(u)){var R=u.id,i=u.groupId,T=u.url;if(A)try{T=A.addDirectives(T)}catch(w){this.warn("Could not construct new URL with HLS Delivery Directives: "+w)}this.log("loading audio-track playlist for id: "+R),this.clearTimer(),this.hls.trigger(H.Events.AUDIO_TRACK_LOADING,{url:T,id:R,groupId:i,deliveryDirectives:A||null})}},c(m,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(A){this.selectDefaultTrack=!1,this.setAudioTrack(A)}}]),m}(M.default);const v=E},"./src/controller/base-playlist-controller.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>N});var H=O("./src/types/level.ts"),e=O("./src/controller/level-helper.ts"),M=O("./src/utils/logger.ts"),D=O("./src/errors.ts"),N=function(){function c(s,h){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=M.logger.log.bind(M.logger,h+":"),this.warn=M.logger.warn.bind(M.logger,h+":"),this.hls=s}var l=c.prototype;return l.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},l.onError=function(h,x){x.fatal&&(x.type===D.ErrorTypes.NETWORK_ERROR||x.type===D.ErrorTypes.KEY_SYSTEM_ERROR)&&this.stopLoad()},l.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},l.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.requestScheduled=-1,this.loadPlaylist()},l.stopLoad=function(){this.canLoad=!1,this.clearTimer()},l.switchParams=function(h,x){var E=x==null?void 0:x.renditionReports;if(E)for(var v=0;v<E.length;v++){var d=E[v],m=void 0;try{m=new self.URL(d.URI,x.url).href}catch(u){M.logger.warn("Could not construct new URL for Rendition Report: "+u),m=d.URI||""}if(m===h.slice(-m.length)){var g=parseInt(d["LAST-MSN"])||(x==null?void 0:x.lastPartSn),S=parseInt(d["LAST-PART"])||(x==null?void 0:x.lastPartIndex);if(this.hls.config.lowLatencyMode){var A=Math.min(x.age-x.partTarget,x.targetduration);S>=0&&A>x.partTarget&&(S+=1)}return new H.HlsUrlParameters(g,S>=0?S:void 0,H.HlsSkip.No)}}},l.loadPlaylist=function(h){this.requestScheduled===-1&&(this.requestScheduled=self.performance.now())},l.shouldLoadTrack=function(h){return this.canLoad&&h&&!!h.url&&(!h.details||h.details.live)},l.playlistLoaded=function(h,x,E){var v=this,d=x.details,m=x.stats,g=self.performance.now(),S=m.loading.first?Math.max(0,g-m.loading.first):0;if(d.advancedDateTime=Date.now()-S,d.live||E!=null&&E.live){if(d.reloaded(E),E&&this.log("live playlist "+h+" "+(d.advanced?"REFRESHED "+d.lastPartSn+"-"+d.lastPartIndex:"MISSED")),E&&d.fragments.length>0&&(0,e.mergeDetails)(E,d),!this.canLoad||!d.live)return;var A,u=void 0,R=void 0;if(d.canBlockReload&&d.endSN&&d.advanced){var i=this.hls.config.lowLatencyMode,T=d.lastPartSn,w=d.endSN,y=d.lastPartIndex,o=y!==-1,r=T===w,a=i?0:y;o?(u=r?w+1:T,R=r?a:y+1):u=w+1;var n=d.age,t=n+d.ageHeader,p=Math.min(t-d.partTarget,d.targetduration*1.5);if(p>0){if(E&&p>E.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+E.tuneInGoal+" to: "+p+" with playlist age: "+d.age),p=0;else{var _=Math.floor(p/d.targetduration);if(u+=_,R!==void 0){var f=Math.round(p%d.targetduration/d.partTarget);R+=f}this.log("CDN Tune-in age: "+d.ageHeader+"s last advanced "+n.toFixed(2)+"s goal: "+p+" skip sn "+_+" to part "+R)}d.tuneInGoal=p}if(A=this.getDeliveryDirectives(d,x.deliveryDirectives,u,R),i||!r){this.loadPlaylist(A);return}}else A=this.getDeliveryDirectives(d,x.deliveryDirectives,u,R);var F=this.hls.mainForwardBufferInfo,P=F?F.end-F.len:0,W=(d.edge-P)*1e3,V=(0,e.computeReloadInterval)(d,W);d.updated?g>this.requestScheduled+V&&(this.requestScheduled=m.loading.start):this.requestScheduled=-1,u!==void 0&&d.canBlockReload?this.requestScheduled=m.loading.first+V-(d.partTarget*1e3||1e3):this.requestScheduled=(this.requestScheduled===-1?g:this.requestScheduled)+V;var J=this.requestScheduled-g;J=Math.max(0,J),this.log("reload live playlist "+h+" in "+Math.round(J)+" ms"),this.timer=self.setTimeout(function(){return v.loadPlaylist(A)},J)}else this.clearTimer()},l.getDeliveryDirectives=function(h,x,E,v){var d=(0,H.getSkipValue)(h,E);return x!=null&&x.skip&&h.deltaUpdateFailed&&(E=x.msn,v=x.part,d=H.HlsSkip.No),new H.HlsUrlParameters(E,v,d)},l.retryLoadingOrFail=function(h){var x=this,E=this.hls.config,v=this.retryCount<E.levelLoadingMaxRetry;if(v){var d;if(this.requestScheduled=-1,this.retryCount++,h.details.indexOf("LoadTimeOut")>-1&&(d=h.context)!==null&&d!==void 0&&d.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+h.details+'"'),this.loadPlaylist();else{var m=Math.min(Math.pow(2,this.retryCount)*E.levelLoadingRetryDelay,E.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return x.loadPlaylist()},m),this.warn("retry playlist loading #"+this.retryCount+" in "+m+' ms after "'+h.details+'"')}}else this.warn('cannot recover from error "'+h.details+'"'),this.clearTimer(),h.fatal=!0;return v},c}()},"./src/controller/base-stream-controller.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{State:()=>o,default:()=>r});var H=O("./src/polyfills/number.ts"),e=O("./src/task-loop.ts"),M=O("./src/controller/fragment-tracker.ts"),D=O("./src/utils/buffer-helper.ts"),N=O("./src/utils/logger.ts"),c=O("./src/events.ts"),l=O("./src/errors.ts"),s=O("./src/types/transmuxer.ts"),h=O("./src/utils/mp4-tools.ts"),x=O("./src/utils/discontinuities.ts"),E=O("./src/controller/fragment-finders.ts"),v=O("./src/controller/level-helper.ts"),d=O("./src/loader/fragment-loader.ts"),m=O("./src/crypt/decrypter.ts"),g=O("./src/utils/time-ranges.ts"),S=O("./src/types/loader.ts");function A(a,n){for(var t=0;t<n.length;t++){var p=n[t];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,R(p.key),p)}}function u(a,n,t){return n&&A(a.prototype,n),t&&A(a,t),Object.defineProperty(a,"prototype",{writable:!1}),a}function R(a){var n=i(a,"string");return typeof n=="symbol"?n:String(n)}function i(a,n){if(typeof a!="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var p=t.call(a,n||"default");if(typeof p!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(a)}function T(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function w(a,n){a.prototype=Object.create(n.prototype),a.prototype.constructor=a,y(a,n)}function y(a,n){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,_){return p.__proto__=_,p},y(a,n)}var o={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},r=function(a){w(n,a);function n(p,_,f,F){var P;return P=a.call(this)||this,P.hls=void 0,P.fragPrevious=null,P.fragCurrent=null,P.fragmentTracker=void 0,P.transmuxer=null,P._state=o.STOPPED,P.media=null,P.mediaBuffer=null,P.config=void 0,P.bitrateTest=!1,P.lastCurrentTime=0,P.nextLoadPosition=0,P.startPosition=0,P.loadedmetadata=!1,P.fragLoadError=0,P.retryDate=0,P.levels=null,P.fragmentLoader=void 0,P.keyLoader=void 0,P.levelLastLoaded=null,P.startFragRequested=!1,P.decrypter=void 0,P.initPTS=[],P.onvseeking=null,P.onvended=null,P.logPrefix="",P.log=void 0,P.warn=void 0,P.logPrefix=F,P.log=N.logger.log.bind(N.logger,F+":"),P.warn=N.logger.warn.bind(N.logger,F+":"),P.hls=p,P.fragmentLoader=new d.default(p.config),P.keyLoader=f,P.fragmentTracker=_,P.config=p.config,P.decrypter=new m.default(p.config),p.on(c.Events.LEVEL_SWITCHING,P.onLevelSwitching,T(P)),P}var t=n.prototype;return t.doTick=function(){this.onTickEnd()},t.onTickEnd=function(){},t.startLoad=function(_){},t.stopLoad=function(){this.fragmentLoader.abort(),this.keyLoader.abort();var _=this.fragCurrent;_&&(_.abortRequests(),this.fragmentTracker.removeFragment(_)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=o.STOPPED},t._streamEnded=function(_,f){if(f.live||_.nextStart||!_.end||!this.media)return!1;var F=f.partList;if(F!=null&&F.length){var P=F[F.length-1],W=D.BufferHelper.isBuffered(this.media,P.start+P.duration/2);return W}var V=f.fragments[f.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(V)},t.getLevelDetails=function(){if(this.levels&&this.levelLastLoaded!==null){var _;return(_=this.levels[this.levelLastLoaded])===null||_===void 0?void 0:_.details}},t.onMediaAttached=function(_,f){var F=this.media=this.mediaBuffer=f.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),F.addEventListener("seeking",this.onvseeking),F.addEventListener("ended",this.onvended);var P=this.config;this.levels&&P.autoStartLoad&&this.state===o.STOPPED&&this.startLoad(P.startPosition)},t.onMediaDetaching=function(){var _=this.media;_!=null&&_.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),_&&this.onvseeking&&this.onvended&&(_.removeEventListener("seeking",this.onvseeking),_.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.keyLoader&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},t.onMediaSeeking=function(){var _=this.config,f=this.fragCurrent,F=this.media,P=this.mediaBuffer,W=this.state,V=F?F.currentTime:0,J=D.BufferHelper.bufferInfo(P||F,V,_.maxBufferHole);if(this.log("media seeking to "+((0,H.isFiniteNumber)(V)?V.toFixed(3):V)+", state: "+W),this.state===o.ENDED)this.resetLoadingState();else if(f){var ne=_.maxFragLookUpTolerance,ce=f.start-ne,ie=f.start+f.duration+ne;if(!J.len||ie<J.start||ce>J.end){var xe=V>ie;(V<ce||xe)&&(xe&&f.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),f.abortRequests()),this.resetLoadingState())}}F&&(this.lastCurrentTime=V),!this.loadedmetadata&&!J.len&&(this.nextLoadPosition=this.startPosition=V),this.tickImmediate()},t.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},t.onLevelSwitching=function(_,f){this.fragLoadError=0},t.onHandlerDestroying=function(){this.stopLoad(),a.prototype.onHandlerDestroying.call(this)},t.onHandlerDestroyed=function(){this.state=o.STOPPED,this.hls.off(c.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,a.prototype.onHandlerDestroyed.call(this)},t.loadFragment=function(_,f,F){this._loadFragForPlayback(_,f,F)},t._loadFragForPlayback=function(_,f,F){var P=this,W=function(J){if(P.fragContextChanged(_)){P.warn("Fragment "+_.sn+(J.part?" p: "+J.part.index:"")+" of level "+_.level+" was dropped during download."),P.fragmentTracker.removeFragment(_);return}_.stats.chunkCount++,P._handleFragmentLoadProgress(J)};this._doFragLoad(_,f,F,W).then(function(V){if(!V)return;P.fragLoadError=0;var J=P.state;if(P.fragContextChanged(_)){(J===o.FRAG_LOADING||!P.fragCurrent&&J===o.PARSING)&&(P.fragmentTracker.removeFragment(_),P.state=o.IDLE);return}"payload"in V&&(P.log("Loaded fragment "+_.sn+" of level "+_.level),P.hls.trigger(c.Events.FRAG_LOADED,V)),P._handleFragmentLoadComplete(V)}).catch(function(V){if(P.state===o.STOPPED||P.state===o.ERROR)return;P.warn(V),P.resetFragmentLoading(_)})},t.flushMainBuffer=function(_,f,F){if(F===void 0&&(F=null),!(_-f))return;var P={startOffset:_,endOffset:f,type:F};this.fragLoadError=0,this.hls.trigger(c.Events.BUFFER_FLUSHING,P)},t._loadInitSegment=function(_,f){var F=this;this._doFragLoad(_,f).then(function(P){if(!P||F.fragContextChanged(_)||!F.levels)throw new Error("init load aborted");return P}).then(function(P){var W=F.hls,V=P.payload,J=_.decryptdata;if(V&&V.byteLength>0&&J&&J.key&&J.iv&&J.method==="AES-128"){var ne=self.performance.now();return F.decrypter.decrypt(new Uint8Array(V),J.key.buffer,J.iv.buffer).then(function(ce){var ie=self.performance.now();return W.trigger(c.Events.FRAG_DECRYPTED,{frag:_,payload:ce,stats:{tstart:ne,tdecrypt:ie}}),P.payload=ce,P})}return P}).then(function(P){var W=F.fragCurrent,V=F.hls,J=F.levels;if(!J)throw new Error("init load aborted, missing levels");var ne=J[_.level].details;console.assert(ne,"Level details are defined when init segment is loaded");var ce=_.stats;F.state=o.IDLE,F.fragLoadError=0,_.data=new Uint8Array(P.payload),ce.parsing.start=ce.buffering.start=self.performance.now(),ce.parsing.end=ce.buffering.end=self.performance.now(),P.frag===W&&V.trigger(c.Events.FRAG_BUFFERED,{stats:ce,frag:W,part:null,id:_.type}),F.tick()}).catch(function(P){if(F.state===o.STOPPED||F.state===o.ERROR)return;F.warn(P),F.resetFragmentLoading(_)})},t.fragContextChanged=function(_){var f=this.fragCurrent;return!_||!f||_.level!==f.level||_.sn!==f.sn||_.urlId!==f.urlId},t.fragBufferedComplete=function(_,f){var F,P,W,V,J=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log("Buffered "+_.type+" sn: "+_.sn+(f?" part: "+f.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+_.level+" (frag:["+((F=_.startPTS)!=null?F:NaN).toFixed(3)+"-"+((P=_.endPTS)!=null?P:NaN).toFixed(3)+"] > buffer:"+(J?g.default.toString(D.BufferHelper.getBuffered(J)):"(detached)")+")"),this.state=o.IDLE,!J)return;!this.loadedmetadata&&_.type==S.PlaylistLevelType.MAIN&&J.buffered.length&&((W=this.fragCurrent)===null||W===void 0?void 0:W.sn)===((V=this.fragPrevious)===null||V===void 0?void 0:V.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick()},t.seekToStartPos=function(){},t._handleFragmentLoadComplete=function(_){var f=this.transmuxer;if(!f)return;var F=_.frag,P=_.part,W=_.partsLoaded,V=!W||W.length===0||W.some(function(ne){return!ne}),J=new s.ChunkMetadata(F.level,F.sn,F.stats.chunkCount+1,0,P?P.index:-1,!V);f.flush(J)},t._handleFragmentLoadProgress=function(_){},t._doFragLoad=function(_,f,F,P){var W,V=this;if(F===void 0&&(F=null),!this.levels)throw new Error("frag load aborted, missing levels");var J=null;if(_.encrypted&&!((W=_.decryptdata)!==null&&W!==void 0&&W.key)?(this.log("Loading key for "+_.sn+" of ["+f.startSN+"-"+f.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+_.level),this.state=o.KEY_LOADING,this.fragCurrent=_,J=this.keyLoader.load(_).then(function(ge){if(!V.fragContextChanged(ge.frag))return V.hls.trigger(c.Events.KEY_LOADED,ge),V.state===o.KEY_LOADING&&(V.state=o.IDLE),ge}),this.hls.trigger(c.Events.KEY_LOADING,{frag:_}),this.throwIfFragContextChanged("KEY_LOADING")):!_.encrypted&&f.encryptedFragments.length&&this.keyLoader.loadClear(_,f.encryptedFragments),F=Math.max(_.start,F||0),this.config.lowLatencyMode&&f){var ne=f.partList;if(ne&&P){F>_.end&&f.fragmentHint&&(_=f.fragmentHint);var ce=this.getNextPart(ne,_,F);if(ce>-1){var ie=ne[ce];return this.log("Loading part sn: "+_.sn+" p: "+ie.index+" cc: "+_.cc+" of playlist ["+f.startSN+"-"+f.endSN+"] parts [0-"+ce+"-"+(ne.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+_.level+", target: "+parseFloat(F.toFixed(3))),this.nextLoadPosition=ie.start+ie.duration,this.state=o.FRAG_LOADING,this.hls.trigger(c.Events.FRAG_LOADING,{frag:_,part:ne[ce],targetBufferTime:F}),this.throwIfFragContextChanged("FRAG_LOADING parts"),J?J.then(function(ge){return!ge||V.fragContextChanged(ge.frag)?null:V.doFragPartsLoad(_,ne,ce,P)}).catch(function(ge){return V.handleFragLoadError(ge)}):this.doFragPartsLoad(_,ne,ce,P).catch(function(ge){return V.handleFragLoadError(ge)})}else if(!_.url||this.loadedEndOfParts(ne,F))return Promise.resolve(null)}}this.log("Loading fragment "+_.sn+" cc: "+_.cc+" "+(f?"of ["+f.startSN+"-"+f.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+_.level+", target: "+parseFloat(F.toFixed(3))),(0,H.isFiniteNumber)(_.sn)&&!this.bitrateTest&&(this.nextLoadPosition=_.start+_.duration),this.state=o.FRAG_LOADING,this.hls.trigger(c.Events.FRAG_LOADING,{frag:_,targetBufferTime:F}),this.throwIfFragContextChanged("FRAG_LOADING");var xe=this.config.progressive;return xe&&J?J.then(function(ge){return!ge||V.fragContextChanged(ge==null?void 0:ge.frag)?null:V.fragmentLoader.load(_,P)}).catch(function(ge){return V.handleFragLoadError(ge)}):Promise.all([this.fragmentLoader.load(_,xe?P:void 0),J]).then(function(ge){var de=ge[0];return!xe&&de&&P&&P(de),de}).catch(function(ge){return V.handleFragLoadError(ge)})},t.throwIfFragContextChanged=function(_){if(this.fragCurrent===null)throw new Error("frag load aborted, context changed in "+_)},t.doFragPartsLoad=function(_,f,F,P){var W=this;return new Promise(function(V,J){var ne=[],ce=function ie(xe){var ge=f[xe];W.fragmentLoader.loadPart(_,ge,P).then(function(de){ne[ge.index]=de;var Fe=de.part;W.hls.trigger(c.Events.FRAG_LOADED,de);var Qe=f[xe+1];if(Qe&&Qe.fragment===_)ie(xe+1);else return V({frag:_,part:Fe,partsLoaded:ne})}).catch(J)};ce(F)})},t.handleFragLoadError=function(_){if("data"in _){var f=_.data;_.data&&f.details===l.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(f.frag,f.part):this.hls.trigger(c.Events.ERROR,f)}else this.hls.trigger(c.Events.ERROR,{type:l.ErrorTypes.OTHER_ERROR,details:l.ErrorDetails.INTERNAL_EXCEPTION,err:_,fatal:!0});return null},t._handleTransmuxerFlush=function(_){var f=this.getCurrentContext(_);if(!f||this.state!==o.PARSING){!this.fragCurrent&&this.state!==o.STOPPED&&this.state!==o.ERROR&&(this.state=o.IDLE);return}var F=f.frag,P=f.part,W=f.level,V=self.performance.now();F.stats.parsing.end=V,P&&(P.stats.parsing.end=V),this.updateLevelTiming(F,P,W,_.partial)},t.getCurrentContext=function(_){var f=this.levels,F=_.level,P=_.sn,W=_.part;if(!f||!f[F])return this.warn("Levels object was unset while buffering fragment "+P+" of level "+F+". The current chunk will not be buffered."),null;var V=f[F],J=W>-1?(0,v.getPartWith)(V,P,W):null,ne=J?J.fragment:(0,v.getFragmentWithSN)(V,P,this.fragCurrent);return ne?{frag:ne,part:J,level:V}:null},t.bufferFragmentData=function(_,f,F,P){if(!_||this.state!==o.PARSING)return;var W=_.data1,V=_.data2,J=W;if(W&&V&&(J=(0,h.appendUint8Array)(W,V)),!J||!J.length)return;var ne={type:_.type,frag:f,part:F,chunkMeta:P,parent:f.type,data:J};this.hls.trigger(c.Events.BUFFER_APPENDING,ne),_.dropped&&_.independent&&!F&&this.flushBufferGap(f)},t.flushBufferGap=function(_){var f=this.media;if(!f)return;if(!D.BufferHelper.isBuffered(f,f.currentTime)){this.flushMainBuffer(0,_.start);return}var F=f.currentTime,P=D.BufferHelper.bufferInfo(f,F,0),W=_.duration,V=Math.min(this.config.maxFragLookUpTolerance*2,W*.25),J=Math.max(Math.min(_.start-V,P.end-V),F+V);_.start-J>V&&this.flushMainBuffer(J,_.start)},t.getFwdBufferInfo=function(_,f){var F=this.config,P=this.getLoadPosition();if(!(0,H.isFiniteNumber)(P))return null;var W=D.BufferHelper.bufferInfo(_,P,F.maxBufferHole);if(W.len===0&&W.nextStart!==void 0){var V=this.fragmentTracker.getBufferedFrag(P,f);if(V&&W.nextStart<V.end)return D.BufferHelper.bufferInfo(_,P,Math.max(W.nextStart,F.maxBufferHole))}return W},t.getMaxBufferLength=function(_){var f=this.config,F;return _?F=Math.max(8*f.maxBufferSize/_,f.maxBufferLength):F=f.maxBufferLength,Math.min(F,f.maxMaxBufferLength)},t.reduceMaxBufferLength=function(_){var f=this.config,F=_||f.maxBufferLength;return f.maxMaxBufferLength>=F?(f.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+f.maxMaxBufferLength+"s"),!0):!1},t.getNextFragment=function(_,f){var F=f.fragments,P=F.length;if(!P)return null;var W=this.config,V=F[0].start,J;if(f.live){var ne=W.initialLiveManifestSize;if(P<ne)return this.warn("Not enough fragments to start playback (have: "+P+", need: "+ne+")"),null;!f.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(J=this.getInitialLiveFragment(f,F),this.startPosition=J?this.hls.liveSyncPosition||J.start:_)}else _<=V&&(J=F[0]);if(!J){var ce=W.lowLatencyMode?f.partEnd:f.fragmentEnd;J=this.getFragmentAtPosition(_,ce,f)}return this.mapToInitFragWhenRequired(J)},t.mapToInitFragWhenRequired=function(_){return _!=null&&_.initSegment&&!(_!=null&&_.initSegment.data)&&!this.bitrateTest?_.initSegment:_},t.getNextPart=function(_,f,F){for(var P=-1,W=!1,V=!0,J=0,ne=_.length;J<ne;J++){var ce=_[J];if(V=V&&!ce.independent,P>-1&&F<ce.start)break;var ie=ce.loaded;ie?P=-1:(W||ce.independent||V)&&ce.fragment===f&&(P=J),W=ie}return P},t.loadedEndOfParts=function(_,f){var F=_[_.length-1];return F&&f>F.start&&F.loaded},t.getInitialLiveFragment=function(_,f){var F=this.fragPrevious,P=null;if(F){if(_.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+F.programDateTime),P=(0,E.findFragmentByPDT)(f,F.endProgramDateTime,this.config.maxFragLookUpTolerance)),!P){var W=F.sn+1;if(W>=_.startSN&&W<=_.endSN){var V=f[W-_.startSN];F.cc===V.cc&&(P=V,this.log("Live playlist, switching playlist, load frag with next SN: "+P.sn))}P||(P=(0,E.findFragWithCC)(f,F.cc),P&&this.log("Live playlist, switching playlist, load frag with same CC: "+P.sn))}}else{var J=this.hls.liveSyncPosition;J!==null&&(P=this.getFragmentAtPosition(J,this.bitrateTest?_.fragmentEnd:_.edge,_))}return P},t.getFragmentAtPosition=function(_,f,F){var P=this.config,W=this.fragPrevious,V=F.fragments,J=F.endSN,ne=F.fragmentHint,ce=P.maxFragLookUpTolerance,ie=!!(P.lowLatencyMode&&F.partList&&ne);ie&&ne&&!this.bitrateTest&&(V=V.concat(ne),J=ne.sn);var xe;if(_<f){var ge=_>f-ce?0:ce;xe=(0,E.findFragmentByPTS)(W,V,_,ge)}else xe=V[V.length-1];if(xe){var de=xe.sn-F.startSN;if(this.fragmentTracker.getState(xe)===M.FragmentState.OK&&(W=xe),W&&xe.sn===W.sn&&!ie){var Fe=W&&xe.level===W.level;if(Fe){var Qe=V[de+1];xe.sn<J&&this.fragmentTracker.getState(Qe)!==M.FragmentState.OK?(this.log("SN "+xe.sn+" just loaded, load next one: "+Qe.sn),xe=Qe):xe=null}}}return xe},t.synchronizeToLiveEdge=function(_){var f=this.config,F=this.media;if(!F)return;var P=this.hls.liveSyncPosition,W=F.currentTime,V=_.fragments[0].start,J=_.edge,ne=W>=V-f.maxFragLookUpTolerance&&W<=J;if(P!==null&&F.duration>P&&(W<P||!ne)){var ce=f.liveMaxLatencyDuration!==void 0?f.liveMaxLatencyDuration:f.liveMaxLatencyDurationCount*_.targetduration;(!ne&&F.readyState<4||W<J-ce)&&(this.loadedmetadata||(this.nextLoadPosition=P),F.readyState&&(this.warn("Playback: "+W.toFixed(3)+" is located too far from the end of live sliding playlist: "+J+", reset currentTime to : "+P.toFixed(3)),F.currentTime=P))}},t.alignPlaylists=function(_,f){var F=this.levels,P=this.levelLastLoaded,W=this.fragPrevious,V=P!==null?F[P]:null,J=_.fragments.length;if(!J)return this.warn("No fragments in live playlist"),0;var ne=_.fragments[0].start,ce=!f,ie=_.alignedSliding&&(0,H.isFiniteNumber)(ne);if(ce||!ie&&!ne){(0,x.alignStream)(W,V,_);var xe=_.fragments[0].start;return this.log("Live playlist sliding: "+xe.toFixed(2)+" start-sn: "+(f?f.startSN:"na")+"->"+_.startSN+" prev-sn: "+(W?W.sn:"na")+" fragments: "+J),xe}return ne},t.waitForCdnTuneIn=function(_){var f=3;return _.live&&_.canBlockReload&&_.partTarget&&_.tuneInGoal>Math.max(_.partHoldBack,_.partTarget*f)},t.setStartPosition=function(_,f){var F=this.startPosition;if(F<f&&(F=-1),F===-1||this.lastCurrentTime===-1){var P=_.startTimeOffset;(0,H.isFiniteNumber)(P)?(F=f+P,P<0&&(F+=_.totalduration),F=Math.min(Math.max(f,F),f+_.totalduration),this.log("Start time offset "+P+" found in playlist, adjust startPosition to "+F),this.startPosition=F):_.live?F=this.hls.liveSyncPosition||f:this.startPosition=F=0,this.lastCurrentTime=F}this.nextLoadPosition=F},t.getLoadPosition=function(){var _=this.media,f=0;return this.loadedmetadata&&_?f=_.currentTime:this.nextLoadPosition&&(f=this.nextLoadPosition),f},t.handleFragLoadAborted=function(_,f){this.transmuxer&&_.sn!=="initSegment"&&_.stats.aborted&&(this.warn("Fragment "+_.sn+(f?" part"+f.index:"")+" of level "+_.level+" was aborted"),this.resetFragmentLoading(_))},t.resetFragmentLoading=function(_){(!this.fragCurrent||!this.fragContextChanged(_)&&this.state!==o.FRAG_LOADING_WAITING_RETRY)&&(this.state=o.IDLE)},t.onFragmentOrKeyLoadError=function(_,f){if(f.fatal){this.stopLoad(),this.state=o.ERROR;return}var F=this.config;if(f.chunkMeta){var P=this.getCurrentContext(f.chunkMeta);P&&(f.frag=P.frag,f.levelRetry=!0,this.fragLoadError=F.fragLoadingMaxRetry)}var W=f.frag;if(!W||W.type!==_)return;var V=this.fragCurrent;if(console.assert(V&&W.sn===V.sn&&W.level===V.level&&W.urlId===V.urlId,"Frag load error must match current frag to retry"),this.fragLoadError+1<=F.fragLoadingMaxRetry){this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition);var J=Math.min(Math.pow(2,this.fragLoadError)*F.fragLoadingRetryDelay,F.fragLoadingMaxRetryTimeout);this.warn("Fragment "+W.sn+" of "+_+" "+W.level+" failed to load, retrying in "+J+"ms"),this.retryDate=self.performance.now()+J,this.fragLoadError++,this.state=o.FRAG_LOADING_WAITING_RETRY}else f.levelRetry?(_===S.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=o.IDLE):(N.logger.error(f.details+" reaches max retry, redispatch as fatal ..."),f.fatal=!0,this.hls.stopLoad(),this.state=o.ERROR)},t.afterBufferFlushed=function(_,f,F){if(!_)return;var P=D.BufferHelper.getBuffered(_);this.fragmentTracker.detectEvictedFragments(f,P,F),this.state===o.ENDED&&this.resetLoadingState()},t.resetLoadingState=function(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=o.IDLE},t.resetStartWhenNotLoaded=function(_){if(!this.loadedmetadata){this.startFragRequested=!1;var f=this.levels?this.levels[_].details:null;f!=null&&f.live?(this.startPosition=-1,this.setStartPosition(f,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}},t.updateLevelTiming=function(_,f,F,P){var W=this,V=F.details;console.assert(!!V,"level.details must be defined");var J=Object.keys(_.elementaryStreams).reduce(function(ne,ce){var ie=_.elementaryStreams[ce];if(ie){var xe=ie.endPTS-ie.startPTS;if(xe<=0)return W.warn("Could not parse fragment "+_.sn+" "+ce+" duration reliably ("+xe+")"),ne||!1;var ge=P?0:(0,v.updateFragPTSDTS)(V,_,ie.startPTS,ie.endPTS,ie.startDTS,ie.endDTS);return W.hls.trigger(c.Events.LEVEL_PTS_UPDATED,{details:V,level:F,drift:ge,type:ce,frag:_,start:ie.startPTS,end:ie.endPTS}),!0}return ne},!1);J||(this.warn("Found no media in fragment "+_.sn+" of level "+F.id+" resetting transmuxer to fallback to playlist timing"),this.resetTransmuxer()),this.state=o.PARSED,this.hls.trigger(c.Events.FRAG_PARSED,{frag:_,part:f})},t.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},u(n,[{key:"state",get:function(){return this._state},set:function(_){var f=this._state;f!==_&&(this._state=_,this.log(f+"->"+_))}}]),n}(e.default)},"./src/controller/buffer-controller.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>E});var H=O("./src/polyfills/number.ts"),e=O("./src/events.ts"),M=O("./src/utils/logger.ts"),D=O("./src/errors.ts"),N=O("./src/utils/buffer-helper.ts"),c=O("./src/utils/mediasource-helper.ts"),l=O("./src/loader/fragment.ts"),s=O("./src/controller/buffer-operation-queue.ts"),h=(0,c.getMediaSource)(),x=/([ha]vc.)(?:\.[^.,]+)+/,E=function(){function v(m){var g=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.lastMpegAudioChunk=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var S=g.media,A=g.mediaSource;M.logger.log("[buffer-controller]: Media source opened"),S&&(S.removeEventListener("emptied",g._onMediaEmptied),g.updateMediaElementDuration(),g.hls.trigger(e.Events.MEDIA_ATTACHED,{media:S})),A&&A.removeEventListener("sourceopen",g._onMediaSourceOpen),g.checkPendingTracks()},this._onMediaSourceClose=function(){M.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){M.logger.log("[buffer-controller]: Media source ended")},this._onMediaEmptied=function(){var S=g.media,A=g._objectUrl;S&&S.src!==A&&M.logger.error("Media element src was set while attaching MediaSource ("+A+" > "+S.src+")")},this.hls=m,this._initSourceBuffer(),this.registerListeners()}var d=v.prototype;return d.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},d.destroy=function(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null},d.registerListeners=function(){var g=this.hls;g.on(e.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),g.on(e.Events.MEDIA_DETACHING,this.onMediaDetaching,this),g.on(e.Events.MANIFEST_PARSED,this.onManifestParsed,this),g.on(e.Events.BUFFER_RESET,this.onBufferReset,this),g.on(e.Events.BUFFER_APPENDING,this.onBufferAppending,this),g.on(e.Events.BUFFER_CODECS,this.onBufferCodecs,this),g.on(e.Events.BUFFER_EOS,this.onBufferEos,this),g.on(e.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),g.on(e.Events.LEVEL_UPDATED,this.onLevelUpdated,this),g.on(e.Events.FRAG_PARSED,this.onFragParsed,this),g.on(e.Events.FRAG_CHANGED,this.onFragChanged,this)},d.unregisterListeners=function(){var g=this.hls;g.off(e.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),g.off(e.Events.MEDIA_DETACHING,this.onMediaDetaching,this),g.off(e.Events.MANIFEST_PARSED,this.onManifestParsed,this),g.off(e.Events.BUFFER_RESET,this.onBufferReset,this),g.off(e.Events.BUFFER_APPENDING,this.onBufferAppending,this),g.off(e.Events.BUFFER_CODECS,this.onBufferCodecs,this),g.off(e.Events.BUFFER_EOS,this.onBufferEos,this),g.off(e.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),g.off(e.Events.LEVEL_UPDATED,this.onLevelUpdated,this),g.off(e.Events.FRAG_PARSED,this.onFragParsed,this),g.off(e.Events.FRAG_CHANGED,this.onFragChanged,this)},d._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new s.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.lastMpegAudioChunk=null},d.onManifestParsed=function(g,S){var A=2;(S.audio&&!S.video||!S.altAudio)&&(A=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=A,this.details=null,M.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},d.onMediaAttaching=function(g,S){var A=this.media=S.media;if(A&&h){var u=this.mediaSource=new h;u.addEventListener("sourceopen",this._onMediaSourceOpen),u.addEventListener("sourceended",this._onMediaSourceEnded),u.addEventListener("sourceclose",this._onMediaSourceClose),A.src=self.URL.createObjectURL(u),this._objectUrl=A.src,A.addEventListener("emptied",this._onMediaEmptied)}},d.onMediaDetaching=function(){var g=this.media,S=this.mediaSource,A=this._objectUrl;if(S){if(M.logger.log("[buffer-controller]: media source detaching"),S.readyState==="open")try{S.endOfStream()}catch(u){M.logger.warn("[buffer-controller]: onMediaDetaching: "+u.message+" while calling endOfStream")}this.onBufferReset(),S.removeEventListener("sourceopen",this._onMediaSourceOpen),S.removeEventListener("sourceended",this._onMediaSourceEnded),S.removeEventListener("sourceclose",this._onMediaSourceClose),g&&(g.removeEventListener("emptied",this._onMediaEmptied),A&&self.URL.revokeObjectURL(A),g.src===A?(g.removeAttribute("src"),g.load()):M.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(e.Events.MEDIA_DETACHED,void 0)},d.onBufferReset=function(){var g=this;this.getSourceBufferTypes().forEach(function(S){var A=g.sourceBuffer[S];try{A&&(g.removeBufferListeners(S),g.mediaSource&&g.mediaSource.removeSourceBuffer(A),g.sourceBuffer[S]=void 0)}catch(u){M.logger.warn("[buffer-controller]: Failed to reset the "+S+" buffer",u)}}),this._initSourceBuffer()},d.onBufferCodecs=function(g,S){var A=this,u=this.getSourceBufferTypes().length;if(Object.keys(S).forEach(function(R){if(u){var i=A.tracks[R];if(i&&typeof i.buffer.changeType=="function"){var T=S[R],w=T.id,y=T.codec,o=T.levelCodec,r=T.container,a=T.metadata,n=(i.levelCodec||i.codec).replace(x,"$1"),t=(o||y).replace(x,"$1");if(n!==t){var p=r+";codecs="+(o||y);A.appendChangeType(R,p),M.logger.log("[buffer-controller]: switching codec "+n+" to "+t),A.tracks[R]={buffer:i.buffer,codec:y,container:r,levelCodec:o,metadata:a,id:w}}}}else A.pendingTracks[R]=S[R]}),u)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},d.appendChangeType=function(g,S){var A=this,u=this.operationQueue,R={execute:function(){var T=A.sourceBuffer[g];T&&(M.logger.log("[buffer-controller]: changing "+g+" sourceBuffer type to "+S),T.changeType(S)),u.shiftAndExecuteNext(g)},onStart:function(){},onComplete:function(){},onError:function(T){M.logger.warn("[buffer-controller]: Failed to change "+g+" SourceBuffer type",T)}};u.append(R,g)},d.onBufferAppending=function(g,S){var A=this,u=this.hls,R=this.operationQueue,i=this.tracks,T=S.data,w=S.type,y=S.frag,o=S.part,r=S.chunkMeta,a=r.buffering[w],n=self.performance.now();a.start=n;var t=y.stats.buffering,p=o?o.stats.buffering:null;t.start===0&&(t.start=n),p&&p.start===0&&(p.start=n);var _=i.audio,f=!1;w==="audio"&&(_==null?void 0:_.container)==="audio/mpeg"&&(f=!this.lastMpegAudioChunk||r.id===1||this.lastMpegAudioChunk.sn!==r.sn,this.lastMpegAudioChunk=r);var F=y.start,P={execute:function(){if(a.executeStart=self.performance.now(),f){var V=A.sourceBuffer[w];if(V){var J=F-V.timestampOffset;Math.abs(J)>=.1&&(M.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+F+" (delta: "+J+") sn: "+y.sn+")"),V.timestampOffset=F)}}A.appendExecutor(T,w)},onStart:function(){},onComplete:function(){var V=self.performance.now();a.executeEnd=a.end=V,t.first===0&&(t.first=V),p&&p.first===0&&(p.first=V);var J=A.sourceBuffer,ne={};for(var ce in J)ne[ce]=N.BufferHelper.getBuffered(J[ce]);A.appendError=0,A.hls.trigger(e.Events.BUFFER_APPENDED,{type:w,frag:y,part:o,chunkMeta:r,parent:y.type,timeRanges:ne})},onError:function(V){M.logger.error("[buffer-controller]: Error encountered while trying to append to the "+w+" SourceBuffer",V);var J={type:D.ErrorTypes.MEDIA_ERROR,parent:y.type,details:D.ErrorDetails.BUFFER_APPEND_ERROR,err:V,fatal:!1};V.code===DOMException.QUOTA_EXCEEDED_ERR?J.details=D.ErrorDetails.BUFFER_FULL_ERROR:(A.appendError++,J.details=D.ErrorDetails.BUFFER_APPEND_ERROR,A.appendError>u.config.appendErrorMaxRetry&&(M.logger.error("[buffer-controller]: Failed "+u.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),J.fatal=!0,u.stopLoad())),u.trigger(e.Events.ERROR,J)}};R.append(P,w)},d.onBufferFlushing=function(g,S){var A=this,u=this.operationQueue,R=function(T){return{execute:A.removeExecutor.bind(A,T,S.startOffset,S.endOffset),onStart:function(){},onComplete:function(){A.hls.trigger(e.Events.BUFFER_FLUSHED,{type:T})},onError:function(y){M.logger.warn("[buffer-controller]: Failed to remove from "+T+" SourceBuffer",y)}}};S.type?u.append(R(S.type),S.type):this.getSourceBufferTypes().forEach(function(i){u.append(R(i),i)})},d.onFragParsed=function(g,S){var A=this,u=S.frag,R=S.part,i=[],T=R?R.elementaryStreams:u.elementaryStreams;T[l.ElementaryStreamTypes.AUDIOVIDEO]?i.push("audiovideo"):(T[l.ElementaryStreamTypes.AUDIO]&&i.push("audio"),T[l.ElementaryStreamTypes.VIDEO]&&i.push("video"));var w=function(){var o=self.performance.now();u.stats.buffering.end=o,R&&(R.stats.buffering.end=o);var r=R?R.stats:u.stats;A.hls.trigger(e.Events.FRAG_BUFFERED,{frag:u,part:R,stats:r,id:u.type})};i.length===0&&M.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+u.type+" level: "+u.level+" sn: "+u.sn),this.blockBuffers(w,i)},d.onFragChanged=function(g,S){this.flushBackBuffer()},d.onBufferEos=function(g,S){var A=this,u=this.getSourceBufferTypes().reduce(function(R,i){var T=A.sourceBuffer[i];return T&&(!S.type||S.type===i)&&(T.ending=!0,T.ended||(T.ended=!0,M.logger.log("[buffer-controller]: "+i+" sourceBuffer now EOS"))),R&&!!(!T||T.ended)},!0);u&&(M.logger.log("[buffer-controller]: Queueing mediaSource.endOfStream()"),this.blockBuffers(function(){A.getSourceBufferTypes().forEach(function(i){var T=A.sourceBuffer[i];T&&(T.ending=!1)});var R=A.mediaSource;if(!R||R.readyState!=="open"){R&&M.logger.info("[buffer-controller]: Could not call mediaSource.endOfStream(). mediaSource.readyState: "+R.readyState);return}M.logger.log("[buffer-controller]: Calling mediaSource.endOfStream()"),R.endOfStream()}))},d.onLevelUpdated=function(g,S){var A=S.details;if(!A.fragments.length)return;this.details=A,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},d.flushBackBuffer=function(){var g=this.hls,S=this.details,A=this.media,u=this.sourceBuffer;if(!A||S===null)return;var R=this.getSourceBufferTypes();if(!R.length)return;var i=S.live&&g.config.liveBackBufferLength!==null?g.config.liveBackBufferLength:g.config.backBufferLength;if(!(0,H.isFiniteNumber)(i)||i<0)return;var T=A.currentTime,w=S.levelTargetDuration,y=Math.max(i,w),o=Math.floor(T/w)*w-y;R.forEach(function(r){var a=u[r];if(a){var n=N.BufferHelper.getBuffered(a);if(n.length>0&&o>n.start(0)){if(g.trigger(e.Events.BACK_BUFFER_REACHED,{bufferEnd:o}),S.live)g.trigger(e.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:o});else if(a.ended&&n.end(n.length-1)-T<w*2){M.logger.info("[buffer-controller]: Cannot flush "+r+" back buffer while SourceBuffer is in ended state");return}g.trigger(e.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:o,type:r})}}})},d.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var g=this.details,S=this.hls,A=this.media,u=this.mediaSource,R=g.fragments[0].start+g.totalduration,i=A.duration,T=(0,H.isFiniteNumber)(u.duration)?u.duration:0;g.live&&S.config.liveDurationInfinity?(M.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),u.duration=Infinity,this.updateSeekableRange(g)):(R>T&&R>i||!(0,H.isFiniteNumber)(i))&&(M.logger.log("[buffer-controller]: Updating Media Source duration to "+R.toFixed(3)),u.duration=R)},d.updateSeekableRange=function(g){var S=this.mediaSource,A=g.fragments,u=A.length;if(u&&g.live&&S!==null&&S!==void 0&&S.setLiveSeekableRange){var R=Math.max(0,A[0].start),i=Math.max(R,R+g.totalduration);S.setLiveSeekableRange(R,i)}},d.checkPendingTracks=function(){var g=this.bufferCodecEventsExpected,S=this.operationQueue,A=this.pendingTracks,u=Object.keys(A).length;if(u&&!g||u===2){this.createSourceBuffers(A),this.pendingTracks={};var R=this.getSourceBufferTypes();if(R.length===0){this.hls.trigger(e.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}R.forEach(function(i){S.executeNext(i)})}},d.createSourceBuffers=function(g){var S=this.sourceBuffer,A=this.mediaSource;if(!A)throw Error("createSourceBuffers called when mediaSource was null");var u=0;for(var R in g)if(!S[R]){var i=g[R];if(!i)throw Error("source buffer exists for track "+R+", however track does not");var T=i.levelCodec||i.codec,w=i.container+";codecs="+T;M.logger.log("[buffer-controller]: creating sourceBuffer("+w+")");try{var y=S[R]=A.addSourceBuffer(w),o=R;this.addBufferListener(o,"updatestart",this._onSBUpdateStart),this.addBufferListener(o,"updateend",this._onSBUpdateEnd),this.addBufferListener(o,"error",this._onSBUpdateError),this.tracks[R]={buffer:y,codec:T,container:i.container,levelCodec:i.levelCodec,metadata:i.metadata,id:i.id},u++}catch(r){M.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+r.message),this.hls.trigger(e.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:r,mimeType:w})}}u&&this.hls.trigger(e.Events.BUFFER_CREATED,{tracks:this.tracks})},d._onSBUpdateStart=function(g){var S=this.operationQueue,A=S.current(g);A.onStart()},d._onSBUpdateEnd=function(g){var S=this.operationQueue,A=S.current(g);A.onComplete(),S.shiftAndExecuteNext(g)},d._onSBUpdateError=function(g,S){M.logger.error("[buffer-controller]: "+g+" SourceBuffer error",S),this.hls.trigger(e.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var A=this.operationQueue.current(g);A&&A.onError(S)},d.removeExecutor=function(g,S,A){var u=this.media,R=this.mediaSource,i=this.operationQueue,T=this.sourceBuffer,w=T[g];if(!u||!R||!w){M.logger.warn("[buffer-controller]: Attempting to remove from the "+g+" SourceBuffer, but it does not exist"),i.shiftAndExecuteNext(g);return}var y=(0,H.isFiniteNumber)(u.duration)?u.duration:Infinity,o=(0,H.isFiniteNumber)(R.duration)?R.duration:Infinity,r=Math.max(0,S),a=Math.min(A,y,o);a>r&&!w.ending?(w.ended=!1,M.logger.log("[buffer-controller]: Removing ["+r+","+a+"] from the "+g+" SourceBuffer"),console.assert(!w.updating,g+" sourceBuffer must not be updating"),w.remove(r,a)):i.shiftAndExecuteNext(g)},d.appendExecutor=function(g,S){var A=this.operationQueue,u=this.sourceBuffer,R=u[S];if(!R){M.logger.warn("[buffer-controller]: Attempting to append to the "+S+" SourceBuffer, but it does not exist"),A.shiftAndExecuteNext(S);return}R.ended=!1,console.assert(!R.updating,S+" sourceBuffer must not be updating"),R.appendBuffer(g)},d.blockBuffers=function(g,S){var A=this;if(S===void 0&&(S=this.getSourceBufferTypes()),!S.length){M.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(g);return}var u=this.operationQueue,R=S.map(function(i){return u.appendBlocker(i)});Promise.all(R).then(function(){g(),S.forEach(function(i){var T=A.sourceBuffer[i];(!T||!T.updating)&&u.shiftAndExecuteNext(i)})})},d.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},d.addBufferListener=function(g,S,A){var u=this.sourceBuffer[g];if(!u)return;var R=A.bind(this,g);this.listeners[g].push({event:S,listener:R}),u.addEventListener(S,R)},d.removeBufferListeners=function(g){var S=this.sourceBuffer[g];if(!S)return;this.listeners[g].forEach(function(A){S.removeEventListener(A.event,A.listener)})},v}()},"./src/controller/buffer-operation-queue.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>e});var H=O("./src/utils/logger.ts"),e=function(){function M(N){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=N}var D=M.prototype;return D.append=function(c,l){var s=this.queues[l];s.push(c),s.length===1&&this.buffers[l]&&this.executeNext(l)},D.insertAbort=function(c,l){var s=this.queues[l];s.unshift(c),this.executeNext(l)},D.appendBlocker=function(c){var l,s=new Promise(function(x){l=x}),h={execute:l,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(h,c),s},D.executeNext=function(c){var l=this.buffers,s=this.queues,h=l[c],x=s[c];if(x.length){var E=x[0];try{E.execute()}catch(v){H.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),E.onError(v),(!h||!h.updating)&&(x.shift(),this.executeNext(c))}}},D.shiftAndExecuteNext=function(c){this.queues[c].shift(),this.executeNext(c)},D.current=function(c){return this.queues[c][0]},M}()},"./src/controller/cap-level-controller.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>l});var H=O("./src/events.ts");function e(s,h){for(var x=0;x<h.length;x++){var E=h[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(s,D(E.key),E)}}function M(s,h,x){return h&&e(s.prototype,h),x&&e(s,x),Object.defineProperty(s,"prototype",{writable:!1}),s}function D(s){var h=N(s,"string");return typeof h=="symbol"?h:String(h)}function N(s,h){if(typeof s!="object"||s===null)return s;var x=s[Symbol.toPrimitive];if(x!==void 0){var E=x.call(s,h||"default");if(typeof E!="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return(h==="string"?String:Number)(s)}var c=function(){function s(x){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=x,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var h=s.prototype;return h.setStreamController=function(E){this.streamController=E},h.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},h.registerListeners=function(){var E=this.hls;E.on(H.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),E.on(H.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),E.on(H.Events.MANIFEST_PARSED,this.onManifestParsed,this),E.on(H.Events.BUFFER_CODECS,this.onBufferCodecs,this),E.on(H.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},h.unregisterListener=function(){var E=this.hls;E.off(H.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),E.off(H.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),E.off(H.Events.MANIFEST_PARSED,this.onManifestParsed,this),E.off(H.Events.BUFFER_CODECS,this.onBufferCodecs,this),E.off(H.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},h.onFpsDropLevelCapping=function(E,v){s.isLevelAllowed(v.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(v.droppedLevel)},h.onMediaAttaching=function(E,v){this.media=v.media instanceof HTMLVideoElement?v.media:null,this.clientRect=null},h.onManifestParsed=function(E,v){var d=this.hls;this.restrictedLevels=[],this.firstLevel=v.firstLevel,d.config.capLevelToPlayerSize&&v.video&&this.startCapping()},h.onBufferCodecs=function(E,v){var d=this.hls;d.config.capLevelToPlayerSize&&v.video&&this.startCapping()},h.onMediaDetaching=function(){this.stopCapping()},h.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var E=this.hls.levels;if(E.length){var v=this.hls;v.autoLevelCapping=this.getMaxLevel(E.length-1),v.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=v.autoLevelCapping}}},h.getMaxLevel=function(E){var v=this,d=this.hls.levels;if(!d.length)return-1;var m=d.filter(function(g,S){return s.isLevelAllowed(S,v.restrictedLevels)&&S<=E});return this.clientRect=null,s.getMaxLevelByMediaSize(m,this.mediaWidth,this.mediaHeight)},h.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()},h.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},h.getDimensions=function(){if(this.clientRect)return this.clientRect;var E=this.media,v={width:0,height:0};if(E){var d=E.getBoundingClientRect();v.width=d.width,v.height=d.height,!v.width&&!v.height&&(v.width=d.right-d.left||E.width||0,v.height=d.bottom-d.top||E.height||0)}return this.clientRect=v,v},s.isLevelAllowed=function(E,v){return v===void 0&&(v=[]),v.indexOf(E)===-1},s.getMaxLevelByMediaSize=function(E,v,d){if(!E||!E.length)return-1;for(var m=function(R,i){return i?R.width!==i.width||R.height!==i.height:!0},g=E.length-1,S=0;S<E.length;S+=1){var A=E[S];if((A.width>=v||A.height>=d)&&m(A,E[S+1])){g=S;break}}return g},M(s,[{key:"mediaWidth",get:function(){return this.getDimensions().width*this.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*this.contentScaleFactor}},{key:"contentScaleFactor",get:function(){var E=1;if(!this.hls.config.ignoreDevicePixelRatio)try{E=self.devicePixelRatio}catch(v){}return E}}]),s}();const l=c},"./src/controller/cmcd-controller.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>d});var H=O("./src/events.ts"),e=O("./src/types/cmcd.ts"),M=O("./src/utils/buffer-helper.ts"),D=O("./src/utils/logger.ts");function N(m,g){for(var S=0;S<g.length;S++){var A=g[S];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(m,l(A.key),A)}}function c(m,g,S){return g&&N(m.prototype,g),S&&N(m,S),Object.defineProperty(m,"prototype",{writable:!1}),m}function l(m){var g=s(m,"string");return typeof g=="symbol"?g:String(g)}function s(m,g){if(typeof m!="object"||m===null)return m;var S=m[Symbol.toPrimitive];if(S!==void 0){var A=S.call(m,g||"default");if(typeof A!="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(m)}function h(m,g){var S=typeof Symbol!="undefined"&&m[Symbol.iterator]||m["@@iterator"];if(S)return(S=S.call(m)).next.bind(S);if(Array.isArray(m)||(S=x(m))||g&&m&&typeof m.length=="number"){S&&(m=S);var A=0;return function(){return A>=m.length?{done:!0}:{done:!1,value:m[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 x(m,g){if(!m)return;if(typeof m=="string")return E(m,g);var S=Object.prototype.toString.call(m).slice(8,-1);if(S==="Object"&&m.constructor&&(S=m.constructor.name),S==="Map"||S==="Set")return Array.from(m);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return E(m,g)}function E(m,g){(g==null||g>m.length)&&(g=m.length);for(var S=0,A=new Array(g);S<g;S++)A[S]=m[S];return A}function v(){return v=Object.assign?Object.assign.bind():function(m){for(var g=1;g<arguments.length;g++){var S=arguments[g];for(var A in S)Object.prototype.hasOwnProperty.call(S,A)&&(m[A]=S[A])}return m},v.apply(this,arguments)}var d=function(){function m(S){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(i){try{A.apply(i,{ot:e.CMCDObjectType.MANIFEST,su:!A.initialized})}catch(T){D.logger.warn("Could not generate manifest CMCD data.",T)}},this.applyFragmentData=function(i){try{var T=i.frag,w=A.hls.levels[T.level],y=A.getObjectType(T),o={d:T.duration*1e3,ot:y};(y===e.CMCDObjectType.VIDEO||y===e.CMCDObjectType.AUDIO||y==e.CMCDObjectType.MUXED)&&(o.br=w.bitrate/1e3,o.tb=A.getTopBandwidth(y)/1e3,o.bl=A.getBufferLength(y)),A.apply(i,o)}catch(r){D.logger.warn("Could not generate segment CMCD data.",r)}},this.hls=S;var u=this.config=S.config,R=u.cmcd;R!=null&&(u.pLoader=this.createPlaylistLoader(),u.fLoader=this.createFragmentLoader(),this.sid=R.sessionId||m.uuid(),this.cid=R.contentId,this.useHeaders=R.useHeaders===!0,this.registerListeners())}var g=m.prototype;return g.registerListeners=function(){var A=this.hls;A.on(H.Events.MEDIA_ATTACHED,this.onMediaAttached,this),A.on(H.Events.MEDIA_DETACHED,this.onMediaDetached,this),A.on(H.Events.BUFFER_CREATED,this.onBufferCreated,this)},g.unregisterListeners=function(){var A=this.hls;A.off(H.Events.MEDIA_ATTACHED,this.onMediaAttached,this),A.off(H.Events.MEDIA_DETACHED,this.onMediaDetached,this),A.off(H.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},g.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},g.onMediaAttached=function(A,u){this.media=u.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},g.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},g.onBufferCreated=function(A,u){var R,i;this.audioBuffer=(R=u.tracks.audio)===null||R===void 0?void 0:R.buffer,this.videoBuffer=(i=u.tracks.video)===null||i===void 0?void 0:i.buffer},g.createData=function(){var A;return{v:e.CMCDVersion,sf:e.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}},g.apply=function(A,u){u===void 0&&(u={}),v(u,this.createData());var R=u.ot===e.CMCDObjectType.INIT||u.ot===e.CMCDObjectType.VIDEO||u.ot===e.CMCDObjectType.MUXED;if(this.starved&&R&&(u.bs=!0,u.su=!0,this.starved=!1),u.su==null&&(u.su=this.buffering),this.useHeaders){var i=m.toHeaders(u);if(!Object.keys(i).length)return;A.headers||(A.headers={}),v(A.headers,i)}else{var T=m.toQuery(u);if(!T)return;A.url=m.appendQueryToUri(A.url,T)}},g.getObjectType=function(A){var u=A.type;return u==="subtitle"?e.CMCDObjectType.TIMED_TEXT:A.sn==="initSegment"?e.CMCDObjectType.INIT:u==="audio"?e.CMCDObjectType.AUDIO:u==="main"?this.hls.audioTracks.length?e.CMCDObjectType.VIDEO:e.CMCDObjectType.MUXED:void 0},g.getTopBandwidth=function(A){var u=0,R,i=this.hls;if(A===e.CMCDObjectType.AUDIO)R=i.audioTracks;else{var T=i.maxAutoLevel,w=T>-1?T+1:i.levels.length;R=i.levels.slice(0,w)}for(var y=h(R),o;!(o=y()).done;){var r=o.value;r.bitrate>u&&(u=r.bitrate)}return u>0?u:NaN},g.getBufferLength=function(A){var u=this.hls.media,R=A===e.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!R||!u)return NaN;var i=M.BufferHelper.bufferInfo(R,u.currentTime,this.config.maxBufferHole);return i.len*1e3},g.createPlaylistLoader=function(){var A=this.config.pLoader,u=this.applyPlaylistData,R=A||this.config.loader;return function(){function i(w){this.loader=void 0,this.loader=new R(w)}var T=i.prototype;return T.destroy=function(){this.loader.destroy()},T.abort=function(){this.loader.abort()},T.load=function(y,o,r){u(y),this.loader.load(y,o,r)},c(i,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),i}()},g.createFragmentLoader=function(){var A=this.config.fLoader,u=this.applyFragmentData,R=A||this.config.loader;return function(){function i(w){this.loader=void 0,this.loader=new R(w)}var T=i.prototype;return T.destroy=function(){this.loader.destroy()},T.abort=function(){this.loader.abort()},T.load=function(y,o,r){u(y),this.loader.load(y,o,r)},c(i,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),i}()},m.uuid=function(){var A=URL.createObjectURL(new Blob),u=A.toString();return URL.revokeObjectURL(A),u.slice(u.lastIndexOf("/")+1)},m.serialize=function(A){for(var u=[],R=function(P){return!Number.isNaN(P)&&P!=null&&P!==""&&P!==!1},i=function(P){return Math.round(P)},T=function(P){return i(P/100)*100},w=function(P){return encodeURIComponent(P)},y={br:i,d:i,bl:T,dl:T,mtp:T,nor:w,rtp:T,tb:i},o=Object.keys(A||{}).sort(),r=h(o),a;!(a=r()).done;){var n=a.value,t=A[n];if(!R(t))continue;if(n==="v"&&t===1)continue;if(n=="pr"&&t===1)continue;var p=y[n];p&&(t=p(t));var _=typeof t,f=void 0;n==="ot"||n==="sf"||n==="st"?f=n+"="+t:_==="boolean"?f=n:_==="number"?f=n+"="+t:f=n+"="+JSON.stringify(t),u.push(f)}return u.join(",")},m.toHeaders=function(A){for(var u=Object.keys(A),R={},i=["Object","Request","Session","Status"],T=[{},{},{},{}],w={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},y=0,o=u;y<o.length;y++){var r=o[y],a=w[r]!=null?w[r]:1;T[a][r]=A[r]}for(var n=0;n<T.length;n++){var t=m.serialize(T[n]);t&&(R["CMCD-"+i[n]]=t)}return R},m.toQuery=function(A){return"CMCD="+encodeURIComponent(m.serialize(A))},m.appendQueryToUri=function(A,u){if(!u)return A;var R=A.includes("?")?"&":"?";return""+A+R+u},m}()},"./src/controller/eme-controller.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>y});var H=O("./src/events.ts"),e=O("./src/errors.ts"),M=O("./src/utils/logger.ts"),D=O("./src/utils/mediakeys-helper.ts"),N=O("./src/utils/keysystem-util.ts"),c=O("./src/utils/numeric-encoding-utils.ts"),l=O("./src/loader/level-key.ts"),s=O("./src/utils/hex.ts"),h=O("./src/utils/mp4-tools.ts"),x=O("./node_modules/eventemitter3/index.js"),E=O.n(x);function v(o,r){o.prototype=Object.create(r.prototype),o.prototype.constructor=o,A(o,r)}function d(o){var r=typeof Map=="function"?new Map:void 0;return d=function(n){if(n===null||!S(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof r!="undefined"){if(r.has(n))return r.get(n);r.set(n,t)}function t(){return m(n,arguments,u(this).constructor)}return t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),A(t,n)},d(o)}function m(o,r,a){return g()?m=Reflect.construct.bind():m=function(t,p,_){var f=[null];f.push.apply(f,p);var F=Function.bind.apply(t,f),P=new F;return _&&A(P,_.prototype),P},m.apply(null,arguments)}function g(){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 S(o){return Function.toString.call(o).indexOf("[native code]")!==-1}function A(o,r){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,t){return n.__proto__=t,n},A(o,r)}function u(o){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},u(o)}var R=3,i="[eme]",T=function(){function o(a){this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=o.CDMCleanupPromise?[o.CDMCleanupPromise]:[],this.onMediaEncrypted=this._onMediaEncrypted.bind(this),this.onWaitingForKey=this._onWaitingForKey.bind(this),this.debug=M.logger.debug.bind(M.logger,i),this.log=M.logger.log.bind(M.logger,i),this.warn=M.logger.warn.bind(M.logger,i),this.error=M.logger.error.bind(M.logger,i),this.hls=a,this.config=a.config,this.registerListeners()}var r=o.prototype;return r.destroy=function(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.onMediaEncrypted=this.onWaitingForKey=this.keyIdToKeySessionPromise=null},r.registerListeners=function(){this.hls.on(H.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(H.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(H.Events.MANIFEST_LOADED,this.onManifestLoaded,this)},r.unregisterListeners=function(){this.hls.off(H.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(H.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(H.Events.MANIFEST_LOADED,this.onManifestLoaded,this)},r.getLicenseServerUrl=function(n){var t=this.config,p=t.drmSystems,_=t.widevineLicenseUrl,f=p[n];if(f)return f.licenseUrl;if(n===D.KeySystems.WIDEVINE&&_)return _;throw new Error('no license server URL configured for key-system "'+n+'"')},r.getServerCertificateUrl=function(n){var t=this.config.drmSystems,p=t[n];if(p)return p.serverCertificateUrl;this.log('No Server Certificate in config.drmSystems["'+n+'"]')},r.attemptKeySystemAccess=function(n){var t=this,p=this.hls.levels,_=function(W,V,J){return!!W&&J.indexOf(W)===V},f=p.map(function(P){return P.audioCodec}).filter(_),F=p.map(function(P){return P.videoCodec}).filter(_);return f.length+F.length===0&&F.push("avc1.42e01e"),new Promise(function(P,W){var V=function J(ne){var ce=ne.shift();t.getMediaKeysPromise(ce,f,F).then(function(ie){return P({keySystem:ce,mediaKeys:ie})}).catch(function(ie){ne.length?J(ne):ie instanceof w?W(ie):W(new w({type:e.ErrorTypes.KEY_SYSTEM_ERROR,details:e.ErrorDetails.KEY_SYSTEM_NO_ACCESS,error:ie,fatal:!0},ie.message))})};V(n)})},r.requestMediaKeySystemAccess=function(n,t){var p=this.config.requestMediaKeySystemAccessFunc;if(!(typeof p=="function")){var _="Configured requestMediaKeySystemAccess is not a function "+p;return D.requestMediaKeySystemAccess===null&&self.location.protocol==="http:"&&(_="navigator.requestMediaKeySystemAccess is not available over insecure protocol "+location.protocol),Promise.reject(new Error(_))}return p(n,t)},r.getMediaKeysPromise=function(n,t,p){var _=this,f=(0,D.getSupportedMediaKeySystemConfigurations)(n,t,p,this.config.drmSystemOptions),F=this.keySystemAccessPromises[n],P=F==null?void 0:F.keySystemAccess;if(!P){this.log('Requesting encrypted media "'+n+'" key-system access with config: '+JSON.stringify(f)),P=this.requestMediaKeySystemAccess(n,f);var W=this.keySystemAccessPromises[n]={keySystemAccess:P};return P.catch(function(V){_.log('Failed to obtain access to key-system "'+n+'": '+V)}),P.then(function(V){_.log('Access for key-system "'+V.keySystem+'" obtained');var J=_.fetchServerCertificate(n);return _.log('Create media-keys for "'+n+'"'),W.mediaKeys=V.createMediaKeys().then(function(ne){return _.log('Media-keys created for "'+n+'"'),J.then(function(ce){return ce?_.setMediaKeysServerCertificate(ne,n,ce):ne})}),W.mediaKeys.catch(function(ne){_.error('Failed to create media-keys for "'+n+'"}: '+ne)}),W.mediaKeys})}return P.then(function(){return F.mediaKeys})},r.createMediaKeySessionContext=function(n){var t=n.decryptdata,p=n.keySystem,_=n.mediaKeys;console.assert(!!_,"mediaKeys is defined"),this.log('Creating key-system session "'+p+'" keyId: '+s.default.hexDump(t.keyId||[]));var f=_.createSession(),F={decryptdata:t,keySystem:p,mediaKeys:_,mediaKeysSession:f,keyStatus:"status-pending"};return this.mediaKeySessions.push(F),F},r.renewKeySession=function(n){var t=n.decryptdata;if(t.pssh){var p=this.createMediaKeySessionContext(n),_=this.getKeyIdString(t),f="cenc";this.keyIdToKeySessionPromise[_]=this.generateRequestWithPreferredKeySession(p,f,t.pssh,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(n)},r.getKeyIdString=function(n){if(!n)throw new Error("Could not read keyId of undefined decryptdata");if(n.keyId===null)throw new Error("keyId is null");return s.default.hexDump(n.keyId)},r.updateKeySession=function(n,t){var p,_=n.mediaKeysSession;return this.log('Updating key-session "'+_.sessionId+'" for keyID '+s.default.hexDump(((p=n.decryptdata)===null||p===void 0?void 0:p.keyId)||[])+`
|
|
} (data length: `+(t&&t.byteLength)+")"),_.update(t)},r.selectKeySystemFormat=function(n){var t=Object.keys(n.levelkeys||{});return this.keyFormatPromise||(this.log("Selecting key-system from fragment (sn: "+n.sn+" "+n.type+": "+n.level+") key formats "+t.join(", ")),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise},r.getKeyFormatPromise=function(n){var t=this;return new Promise(function(p,_){var f=(0,D.getKeySystemsForConfig)(t.config),F=n.map(D.keySystemFormatToKeySystemDomain).filter(function(P){return!!P&&f.indexOf(P)!==-1});return t.getKeySystemSelectionPromise(F).then(function(P){var W=P.keySystem,V=(0,D.keySystemDomainToKeySystemFormat)(W);V?p(V):_(new Error('Unable to find format for key-system "'+W+'"'))}).catch(_)})},r.loadKey=function(n){var t=this,p=n.keyInfo.decryptdata,_=this.getKeyIdString(p),f="(keyId: "+_+' format: "'+p.keyFormat+'" method: '+p.method+" uri: "+p.uri+")";this.log("Starting session for key "+f);var F=this.keyIdToKeySessionPromise[_];return F||(F=this.keyIdToKeySessionPromise[_]=this.getKeySystemForKeyPromise(p).then(function(P){var W=P.keySystem,V=P.mediaKeys;return t.throwIfDestroyed(),t.log("Handle encrypted media sn: "+n.frag.sn+" "+n.frag.type+": "+n.frag.level+" using key "+f),t.attemptSetMediaKeys(W,V).then(function(){t.throwIfDestroyed();var J=t.createMediaKeySessionContext({keySystem:W,mediaKeys:V,decryptdata:p}),ne="cenc";return t.generateRequestWithPreferredKeySession(J,ne,p.pssh,"playlist-key")})}),F.catch(function(P){return t.handleError(P)})),F},r.throwIfDestroyed=function(n){if(n===void 0&&(n="Invalid state"),!this.hls)throw new Error("invalid state")},r.handleError=function(n){if(!this.hls)return;this.error(n.message),n instanceof w?this.hls.trigger(H.Events.ERROR,n.data):this.hls.trigger(H.Events.ERROR,{type:e.ErrorTypes.KEY_SYSTEM_ERROR,details:e.ErrorDetails.KEY_SYSTEM_NO_KEYS,error:n,fatal:!0})},r.getKeySystemForKeyPromise=function(n){var t=this.getKeyIdString(n),p=this.keyIdToKeySessionPromise[t];if(!p){var _=(0,D.keySystemFormatToKeySystemDomain)(n.keyFormat),f=_?[_]:(0,D.getKeySystemsForConfig)(this.config);return this.attemptKeySystemAccess(f)}return p},r.getKeySystemSelectionPromise=function(n){if(n.length||(n=(0,D.getKeySystemsForConfig)(this.config)),n.length===0)throw new w({type:e.ErrorTypes.KEY_SYSTEM_ERROR,details:e.ErrorDetails.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},"Missing key-system license configuration options "+JSON.stringify({drmSystems:this.config.drmSystems}));return this.attemptKeySystemAccess(n)},r._onMediaEncrypted=function(n){var t=this,p=n.initDataType,_=n.initData;if(this.debug('"'+n.type+'" event: init data type: "'+p+'"'),_===null)return;var f,F;if(p==="sinf"&&this.config.drmSystems[D.KeySystems.FAIRPLAY]){var P=(0,h.bin2str)(new Uint8Array(_));try{var W=(0,c.base64Decode)(JSON.parse(P).sinf),V=(0,h.parseSinf)(new Uint8Array(W));if(!V)return;f=V.subarray(8,24),F=D.KeySystems.FAIRPLAY}catch(Qe){this.warn('Failed to parse sinf "encrypted" event message initData');return}}else{var J=(0,h.parsePssh)(_);if(J===null)return;J.version===0&&J.systemId===D.KeySystemIds.WIDEVINE&&J.data&&(f=J.data.subarray(8,24)),F=(0,D.keySystemIdToKeySystemDomain)(J.systemId)}if(!F||!f)return;for(var ne=s.default.hexDump(f),ce=this.keyIdToKeySessionPromise,ie=this.mediaKeySessions,xe=ce[ne],ge=function(Ve){var Ne=ie[Ve],Ue=Ne.decryptdata;if(Ue.pssh||!Ue.keyId)return"continue";var q=s.default.hexDump(Ue.keyId);if(ne===q||Ue.uri.replace(/-/g,"").indexOf(ne)!==-1)return xe=ce[q],delete ce[q],Ue.pssh=new Uint8Array(_),Ue.keyId=f,xe=ce[ne]=xe.then(function(){return t.generateRequestWithPreferredKeySession(Ne,p,_,"encrypted-event-key-match")}),"break"},de=0;de<ie.length;de++){var Fe=ge(de);if(Fe==="continue")continue;if(Fe==="break")break}xe||(xe=ce[ne]=this.getKeySystemSelectionPromise([F]).then(function(Qe){var Ve,Ne=Qe.keySystem,Ue=Qe.mediaKeys;t.throwIfDestroyed();var q=new l.LevelKey("ISO-23001-7",ne,(Ve=(0,D.keySystemDomainToKeySystemFormat)(Ne))!=null?Ve:"");return q.pssh=new Uint8Array(_),q.keyId=f,t.attemptSetMediaKeys(Ne,Ue).then(function(){t.throwIfDestroyed();var k=t.createMediaKeySessionContext({decryptdata:q,keySystem:Ne,mediaKeys:Ue});return t.generateRequestWithPreferredKeySession(k,p,_,"encrypted-event-no-match")})})),xe.catch(function(Qe){return t.handleError(Qe)})},r._onWaitingForKey=function(n){this.log('"'+n.type+'" event')},r.attemptSetMediaKeys=function(n,t){var p=this,_=this.setMediaKeysQueue.slice();this.log('Setting media-keys for "'+n+'"');var f=Promise.all(_).then(function(){if(!p.media)throw new Error("Attempted to set mediaKeys without media element attached");return p.media.setMediaKeys(t)});return this.setMediaKeysQueue.push(f),f.then(function(){p.log('Media-keys set for "'+n+'"'),_.push(f),p.setMediaKeysQueue=p.setMediaKeysQueue.filter(function(F){return _.indexOf(F)===-1})})},r.generateRequestWithPreferredKeySession=function(n,t,p,_){var f,F,P=this,W=(f=this.config.drmSystems)===null||f===void 0||((F=f[n.keySystem])===null||F===void 0)?void 0:F.generateRequest;if(W)try{var V=W.call(this.hls,t,p,n);if(!V)throw new Error("Invalid response from configured generateRequest filter");t=V.initDataType,p=n.decryptdata.pssh=V.initData?new Uint8Array(V.initData):null}catch(xe){var J;if(this.warn(xe.message),(J=this.hls)!==null&&J!==void 0&&J.config.debug)throw xe}if(p===null)return this.log('Skipping key-session request for "'+_+'" (no initData)'),Promise.resolve(n);var ne=this.getKeyIdString(n.decryptdata);this.log('Generating key-session request for "'+_+'": '+ne+" (init data type: "+t+" length: "+(p?p.byteLength:null)+")");var ce=new(E());n.mediaKeysSession.onmessage=function(xe){var ge=n.mediaKeysSession;if(!ge){ce.emit("error",new Error("invalid state"));return}var de=xe.messageType,Fe=xe.message;P.log('"'+de+'" message event for session "'+ge.sessionId+'" message size: '+Fe.byteLength),de==="license-request"||de==="license-renewal"?P.renewLicense(n,Fe).catch(function(Qe){P.handleError(Qe),ce.emit("error",Qe)}):de==="license-release"?n.keySystem===D.KeySystems.FAIRPLAY&&(P.updateKeySession(n,(0,N.strToUtf8array)("acknowledged")),P.removeSession(n)):P.warn('unhandled media key message type "'+de+'"')},n.mediaKeysSession.onkeystatuseschange=function(xe){var ge=n.mediaKeysSession;if(!ge){ce.emit("error",new Error("invalid state"));return}P.onKeyStatusChange(n);var de=n.keyStatus;ce.emit("keyStatus",de),de==="expired"&&(P.warn(n.keySystem+" expired for key "+ne),P.renewKeySession(n))};var ie=new Promise(function(xe,ge){ce.on("error",ge),ce.on("keyStatus",function(de){de.startsWith("usable")?xe():de==="output-restricted"?ge(new w({type:e.ErrorTypes.KEY_SYSTEM_ERROR,details:e.ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):de==="internal-error"?ge(new w({type:e.ErrorTypes.KEY_SYSTEM_ERROR,details:e.ErrorDetails.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},'key status changed to "'+de+'"')):de==="expired"?ge(new Error("key expired while generating request")):P.warn('unhandled key status change "'+de+'"')})});return n.mediaKeysSession.generateRequest(t,p).then(function(){var xe;P.log('Request generated for key-session "'+((xe=n.mediaKeysSession)===null||xe===void 0?void 0:xe.sessionId)+'" keyId: '+ne)}).catch(function(xe){throw new w({type:e.ErrorTypes.KEY_SYSTEM_ERROR,details:e.ErrorDetails.KEY_SYSTEM_NO_SESSION,error:xe,fatal:!1},"Error generating key-session request: "+xe)}).then(function(){return ie}).catch(function(xe){throw ce.removeAllListeners(),P.removeSession(n),xe}).then(function(){return ce.removeAllListeners(),n})},r.onKeyStatusChange=function(n){var t=this;n.mediaKeysSession.keyStatuses.forEach(function(p,_){t.log('key status change "'+p+'" for keyStatuses keyId: '+s.default.hexDump("buffer"in _?new Uint8Array(_.buffer,_.byteOffset,_.byteLength):new Uint8Array(_))+" session keyId: "+s.default.hexDump(new Uint8Array(n.decryptdata.keyId||[]))+" uri: "+n.decryptdata.uri),n.keyStatus=p})},r.fetchServerCertificate=function(n){var t=this;return new Promise(function(p,_){var f=t.getServerCertificateUrl(n);if(!f)return p();t.log('Fetching serverCertificate for "'+n+'"');var F=new XMLHttpRequest;F.open("GET",f,!0),F.responseType="arraybuffer",F.onreadystatechange=function(){F.readyState===XMLHttpRequest.DONE&&(F.status===200?p(F.response):_(new w({type:e.ErrorTypes.KEY_SYSTEM_ERROR,details:e.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:F},'"'+n+'" certificate request XHR failed ('+f+"). Status: "+F.status+" ("+F.statusText+")")))},F.send()})},r.setMediaKeysServerCertificate=function(n,t,p){var _=this;return new Promise(function(f,F){n.setServerCertificate(p).then(function(P){_.log("setServerCertificate "+(P?"success":"not supported by CDM")+" ("+(p==null?void 0:p.byteLength)+') on "'+t+'"'),f(n)}).catch(function(P){F(new w({type:e.ErrorTypes.KEY_SYSTEM_ERROR,details:e.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:P,fatal:!0},P.message))})})},r.renewLicense=function(n,t){var p=this;return this.requestLicense(n,new Uint8Array(t)).then(function(_){return p.updateKeySession(n,new Uint8Array(_)).catch(function(f){throw new w({type:e.ErrorTypes.KEY_SYSTEM_ERROR,details:e.ErrorDetails.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:f,fatal:!0},f.message)})})},r.setupLicenseXHR=function(n,t,p,_){var f=this,F=this.config.licenseXhrSetup;return F?Promise.resolve().then(function(){if(!p.decryptdata)throw new Error("Key removed");return F.call(f.hls,n,t,p,_)}).catch(function(P){if(!p.decryptdata)throw P;return n.open("POST",t,!0),F.call(f.hls,n,t,p,_)}).then(function(P){n.readyState||n.open("POST",t,!0);var W=P||_;return{xhr:n,licenseChallenge:W}}):(n.open("POST",t,!0),Promise.resolve({xhr:n,licenseChallenge:_}))},r.requestLicense=function(n,t){var p=this;return new Promise(function(_,f){var F=p.getLicenseServerUrl(n.keySystem);p.log("Sending license request to URL: "+F);var P=new XMLHttpRequest;P.responseType="arraybuffer",P.onreadystatechange=function(){if(!p.hls||!n.mediaKeysSession)return f(new Error("invalid state"));if(P.readyState===4)if(P.status===200){p._requestLicenseFailureCount=0;var W=P.response;p.log("License received "+(W instanceof ArrayBuffer?W.byteLength:W));var V=p.config.licenseResponseCallback;if(V)try{W=V.call(p.hls,P,F,n)}catch(ne){p.error(ne)}_(W)}else if(p._requestLicenseFailureCount++,p._requestLicenseFailureCount>R||P.status>=400&&P.status<500)f(new w({type:e.ErrorTypes.KEY_SYSTEM_ERROR,details:e.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:P},"License Request XHR failed ("+F+"). Status: "+P.status+" ("+P.statusText+")"));else{var J=R-p._requestLicenseFailureCount+1;p.warn("Retrying license request, "+J+" attempts left"),p.requestLicense(n,t).then(_,f)}},n.licenseXhr&&n.licenseXhr.readyState!==XMLHttpRequest.DONE&&n.licenseXhr.abort(),n.licenseXhr=P,p.setupLicenseXHR(P,F,n,t).then(function(W){var V=W.xhr,J=W.licenseChallenge;V.send(J)})})},r.onMediaAttached=function(n,t){if(!this.config.emeEnabled)return;var p=t.media;this.media=p,p.addEventListener("encrypted",this.onMediaEncrypted),p.addEventListener("waitingforkey",this.onWaitingForKey)},r.onMediaDetached=function(){var n=this,t=this.media,p=this.mediaKeySessions;t&&(t.removeEventListener("encrypted",this.onMediaEncrypted),t.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},l.LevelKey.clearKeyUriToKeyIdMap();var _=p.length;o.CDMCleanupPromise=Promise.all(p.map(function(f){return n.removeSession(f)}).concat(t==null?void 0:t.setMediaKeys(null).catch(function(f){n.log("Could not clear media keys: "+f+". media.src: "+(t==null?void 0:t.src))}))).then(function(){_&&(n.log("finished closing key sessions and clearing media keys"),p.length=0)}).catch(function(f){n.log("Could not close sessions and clear media keys: "+f+". media.src: "+(t==null?void 0:t.src))})},r.onManifestLoaded=function(n,t){var p=t.sessionKeys;if(!p||!this.config.emeEnabled)return;if(!this.keyFormatPromise){var _=p.reduce(function(f,F){return f.indexOf(F.keyFormat)===-1&&f.push(F.keyFormat),f},[]);this.log("Selecting key-system from session-keys "+_.join(", ")),this.keyFormatPromise=this.getKeyFormatPromise(_)}},r.removeSession=function(n){var t=this,p=n.mediaKeysSession,_=n.licenseXhr;if(p){this.log("Remove licenses and keys and close session "+p.sessionId),p.onmessage=null,p.onkeystatuseschange=null,_&&_.readyState!==XMLHttpRequest.DONE&&_.abort(),n.mediaKeysSession=n.decryptdata=n.licenseXhr=void 0;var f=this.mediaKeySessions.indexOf(n);return f>-1&&this.mediaKeySessions.splice(f,1),p.remove().catch(function(F){t.log("Could not remove session: "+F)}).then(function(){return p.close()}).catch(function(F){t.log("Could not close session: "+F)})}},o}();T.CDMCleanupPromise=void 0;var w=function(o){v(r,o);function r(a,n){var t;return t=o.call(this,n)||this,t.data=void 0,t.data=a,a.err=a.error,t}return r}(d(Error));const y=T},"./src/controller/fps-controller.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>D});var H=O("./src/events.ts"),e=O("./src/utils/logger.ts"),M=function(){function N(l){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=l,this.registerListeners()}var c=N.prototype;return c.setStreamController=function(s){this.streamController=s},c.registerListeners=function(){this.hls.on(H.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},c.unregisterListeners=function(){this.hls.off(H.Events.MEDIA_ATTACHING,this.onMediaAttaching)},c.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},c.onMediaAttaching=function(s,h){var x=this.hls.config;if(x.capLevelOnFPSDrop){var E=h.media instanceof self.HTMLVideoElement?h.media:null;this.media=E,E&&typeof E.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),x.fpsDroppedMonitoringPeriod)}},c.checkFPS=function(s,h,x){var E=performance.now();if(h){if(this.lastTime){var v=E-this.lastTime,d=x-this.lastDroppedFrames,m=h-this.lastDecodedFrames,g=1e3*d/v,S=this.hls;if(S.trigger(H.Events.FPS_DROP,{currentDropped:d,currentDecoded:m,totalDroppedFrames:x}),g>0&&d>S.config.fpsDroppedMonitoringThreshold*m){var A=S.currentLevel;e.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+A),A>0&&(S.autoLevelCapping===-1||S.autoLevelCapping>=A)&&(A=A-1,S.trigger(H.Events.FPS_DROP_LEVEL_CAPPING,{level:A,droppedLevel:S.currentLevel}),S.autoLevelCapping=A,this.streamController.nextLevelSwitch())}}this.lastTime=E,this.lastDroppedFrames=x,this.lastDecodedFrames=h}},c.checkFPSInterval=function(){var s=this.media;if(s)if(this.isVideoPlaybackQualityAvailable){var h=s.getVideoPlaybackQuality();this.checkFPS(s,h.totalVideoFrames,h.droppedVideoFrames)}else this.checkFPS(s,s.webkitDecodedFrameCount,s.webkitDroppedFrameCount)},N}();const D=M},"./src/controller/fragment-finders.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{findFragWithCC:()=>l,findFragmentByPDT:()=>M,findFragmentByPTS:()=>D,fragmentWithinToleranceTest:()=>N,pdtWithinToleranceTest:()=>c});var H=O("./src/polyfills/number.ts"),e=O("./src/utils/binary-search.ts");function M(s,h,x){if(h===null||!Array.isArray(s)||!s.length||!(0,H.isFiniteNumber)(h))return null;var E=s[0].programDateTime;if(h<(E||0))return null;var v=s[s.length-1].endProgramDateTime;if(h>=(v||0))return null;x=x||0;for(var d=0;d<s.length;++d){var m=s[d];if(c(h,x,m))return m}return null}function D(s,h,x,E){x===void 0&&(x=0),E===void 0&&(E=0);var v=null;if(s?v=h[s.sn-h[0].sn+1]||null:x===0&&h[0].start===0&&(v=h[0]),v&&N(x,E,v)===0)return v;var d=e.default.search(h,N.bind(null,x,E));return d&&(d!==s||!v)?d:v}function N(s,h,x){if(s===void 0&&(s=0),h===void 0&&(h=0),x.start<=s&&x.start+x.duration>s)return 0;var E=Math.min(h,x.duration+(x.deltaPTS?x.deltaPTS:0));return x.start+x.duration-E<=s?1:x.start-E>s&&x.start?-1:0}function c(s,h,x){var E=Math.min(h,x.duration+(x.deltaPTS?x.deltaPTS:0))*1e3,v=x.endProgramDateTime||0;return v-E>s}function l(s,h){return e.default.search(s,function(x){return x.cc<h?1:x.cc>h?-1:0})}},"./src/controller/fragment-tracker.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{FragmentState:()=>M,FragmentTracker:()=>D});var H=O("./src/events.ts"),e=O("./src/types/loader.ts"),M;(function(l){l.NOT_LOADED="NOT_LOADED",l.APPENDING="APPENDING",l.PARTIAL="PARTIAL",l.OK="OK"})(M||(M={}));var D=function(){function l(h){this.activeFragment=null,this.activeParts=null,this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=h,this._registerListeners()}var s=l.prototype;return s._registerListeners=function(){var x=this.hls;x.on(H.Events.BUFFER_APPENDED,this.onBufferAppended,this),x.on(H.Events.FRAG_BUFFERED,this.onFragBuffered,this),x.on(H.Events.FRAG_LOADED,this.onFragLoaded,this)},s._unregisterListeners=function(){var x=this.hls;x.off(H.Events.BUFFER_APPENDED,this.onBufferAppended,this),x.off(H.Events.FRAG_BUFFERED,this.onFragBuffered,this),x.off(H.Events.FRAG_LOADED,this.onFragLoaded,this)},s.destroy=function(){this._unregisterListeners(),this.fragments=this.endListFragments=this.timeRanges=this.activeFragment=this.activeParts=null},s.getAppendedFrag=function(x,E){if(E===e.PlaylistLevelType.MAIN){var v=this.activeFragment,d=this.activeParts;if(!v)return null;if(d)for(var m=d.length;m--;){var g=d[m],S=g?g.end:v.appendedPTS;if(g.start<=x&&S!==void 0&&x<=S)return m>9&&(this.activeParts=d.slice(m-9)),g}else if(v.start<=x&&v.appendedPTS!==void 0&&x<=v.appendedPTS)return v}return this.getBufferedFrag(x,E)},s.getBufferedFrag=function(x,E){for(var v=this.fragments,d=Object.keys(v),m=d.length;m--;){var g=v[d[m]];if((g==null?void 0:g.body.type)===E&&g.buffered){var S=g.body;if(S.start<=x&&x<=S.end)return S}}return null},s.detectEvictedFragments=function(x,E,v){var d=this;this.timeRanges&&(this.timeRanges[x]=E),Object.keys(this.fragments).forEach(function(m){var g=d.fragments[m];if(!g)return;if(!g.buffered&&!g.loaded){g.body.type===v&&d.removeFragment(g.body);return}var S=g.range[x];if(!S)return;S.time.some(function(A){var u=!d.isTimeBuffered(A.startPTS,A.endPTS,E);return u&&d.removeFragment(g.body),u})})},s.detectPartialFragments=function(x){var E=this,v=this.timeRanges,d=x.frag,m=x.part;if(!v||d.sn==="initSegment")return;var g=c(d),S=this.fragments[g];if(!S)return;Object.keys(v).forEach(function(A){var u=d.elementaryStreams[A];if(!u)return;var R=v[A],i=m!==null||u.partial===!0;S.range[A]=E.getBufferedTimes(d,m,i,R)}),S.loaded=null,Object.keys(S.range).length?(S.buffered=!0,S.body.endList&&(this.endListFragments[S.body.type]=S)):this.removeFragment(S.body)},s.fragBuffered=function(x){var E=c(x),v=this.fragments[E];v&&(v.loaded=null,v.buffered=!0)},s.getBufferedTimes=function(x,E,v,d){for(var m={time:[],partial:v},g=E?E.start:x.start,S=E?E.end:x.end,A=x.minEndPTS||S,u=x.maxStartPTS||g,R=0;R<d.length;R++){var i=d.start(R)-this.bufferPadding,T=d.end(R)+this.bufferPadding;if(u>=i&&A<=T){m.time.push({startPTS:Math.max(g,d.start(R)),endPTS:Math.min(S,d.end(R))});break}else if(g<T&&S>i)m.partial=!0,m.time.push({startPTS:Math.max(g,d.start(R)),endPTS:Math.min(S,d.end(R))});else if(S<=i)break}return m},s.getPartialFragment=function(x){var E=null,v,d,m,g=0,S=this.bufferPadding,A=this.fragments;return Object.keys(A).forEach(function(u){var R=A[u];if(!R)return;N(R)&&(d=R.body.start-S,m=R.body.end+S,x>=d&&x<=m&&(v=Math.min(x-d,m-x),g<=v&&(E=R.body,g=v)))}),E},s.isEndListAppended=function(x){var E=this.endListFragments[x];return E!==void 0&&(E.buffered||N(E))},s.getState=function(x){var E=c(x),v=this.fragments[E];return v?v.buffered?N(v)?M.PARTIAL:M.OK:M.APPENDING:M.NOT_LOADED},s.isTimeBuffered=function(x,E,v){for(var d,m,g=0;g<v.length;g++){if(d=v.start(g)-this.bufferPadding,m=v.end(g)+this.bufferPadding,x>=d&&E<=m)return!0;if(E<=d)return!1}return!1},s.onFragLoaded=function(x,E){var v=E.frag,d=E.part;if(v.sn==="initSegment"||v.bitrateTest||d)return;var m=c(v);this.fragments[m]={body:v,loaded:E,buffered:!1,range:Object.create(null)}},s.onBufferAppended=function(x,E){var v=this,d=E.frag,m=E.part,g=E.timeRanges;if(d.type===e.PlaylistLevelType.MAIN)if(this.activeFragment!==d&&(this.activeFragment=d,d.appendedPTS=void 0),m){var S=this.activeParts;S||(this.activeParts=S=[]),S.push(m)}else this.activeParts=null;this.timeRanges=g,Object.keys(g).forEach(function(A){var u=g[A];if(v.detectEvictedFragments(A,u),!m&&d.type===e.PlaylistLevelType.MAIN){var R=d.elementaryStreams[A];if(!R)return;for(var i=0;i<u.length;i++){var T=u.end(i);T<=R.endPTS&&T>R.startPTS?d.appendedPTS=Math.max(T,d.appendedPTS||0):d.appendedPTS=R.endPTS}}})},s.onFragBuffered=function(x,E){this.detectPartialFragments(E)},s.hasFragment=function(x){var E=c(x);return!!this.fragments[E]},s.removeFragmentsInRange=function(x,E,v){var d=this;Object.keys(this.fragments).forEach(function(m){var g=d.fragments[m];if(!g)return;if(g.buffered){var S=g.body;S.type===v&&S.start<E&&S.end>x&&d.removeFragment(S)}})},s.removeFragment=function(x){var E=c(x);x.stats.loaded=0,x.clearElementaryStreamInfo(),x.appendedPTS=void 0,delete this.fragments[E],x.endList&&delete this.endListFragments[x.type]},s.removeAllFragments=function(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activeFragment=null,this.activeParts=null},l}();function N(l){var s,h;return l.buffered&&(((s=l.range.video)===null||s===void 0?void 0:s.partial)||((h=l.range.audio)===null||h===void 0?void 0:h.partial))}function c(l){return l.type+"_"+l.level+"_"+l.urlId+"_"+l.sn}},"./src/controller/gap-controller.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{MAX_START_GAP_JUMP:()=>c,SKIP_BUFFER_HOLE_STEP_SECONDS:()=>l,SKIP_BUFFER_RANGE_START:()=>s,STALL_MINIMUM_DURATION_MS:()=>N,default:()=>h});var H=O("./src/utils/buffer-helper.ts"),e=O("./src/errors.ts"),M=O("./src/events.ts"),D=O("./src/utils/logger.ts"),N=250,c=2,l=.1,s=.05,h=function(){function x(v,d,m,g){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=v,this.media=d,this.fragmentTracker=m,this.hls=g}var E=x.prototype;return E.destroy=function(){this.media=null,this.hls=this.fragmentTracker=null},E.poll=function(d,m){var g=this.config,S=this.media,A=this.stalled;if(S===null)return;var u=S.currentTime,R=S.seeking,i=this.seeking&&!R,T=!this.seeking&&R;if(this.seeking=R,u!==d){if(this.moved=!0,A!==null){if(this.stallReported){var w=self.performance.now()-A;D.logger.warn("playback not stuck anymore @"+u+", after "+Math.round(w)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((T||i)&&(this.stalled=null),S.paused&&!R||S.ended||S.playbackRate===0||!H.BufferHelper.getBuffered(S).length)return;var y=H.BufferHelper.bufferInfo(S,u,0),o=y.len>0,r=y.nextStart||0;if(!o&&!r)return;if(R){var a=y.len>c,n=!r||m&&m.start<=u||r-u>c&&!this.fragmentTracker.getPartialFragment(u);if(a||n)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var t,p=Math.max(r,y.start||0)-u,_=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,f=_==null||((t=_.details)===null||t===void 0)?void 0:t.live,F=f?_.details.targetduration*2:c;if(p>0&&p<=F){this._trySkipBufferHole(null);return}}var P=self.performance.now();if(A===null){this.stalled=P;return}var W=P-A;if(!R&&W>=N&&(this._reportStall(y),!this.media))return;var V=H.BufferHelper.bufferInfo(S,u,g.maxBufferHole);this._tryFixBufferStall(V,W)},E._tryFixBufferStall=function(d,m){var g=this.config,S=this.fragmentTracker,A=this.media;if(A===null)return;var u=A.currentTime,R=S.getPartialFragment(u);if(R){var i=this._trySkipBufferHole(R);if(i||!this.media)return}d.len>g.maxBufferHole&&m>g.highBufferWatchdogPeriod*1e3&&(D.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},E._reportStall=function(d){var m=this.hls,g=this.media,S=this.stallReported;!S&&g&&(this.stallReported=!0,D.logger.warn("Playback stalling at @"+g.currentTime+" due to low buffer ("+JSON.stringify(d)+")"),m.trigger(M.Events.ERROR,{type:e.ErrorTypes.MEDIA_ERROR,details:e.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:d.len}))},E._trySkipBufferHole=function(d){var m=this.config,g=this.hls,S=this.media;if(S===null)return 0;for(var A=S.currentTime,u=0,R=H.BufferHelper.getBuffered(S),i=0;i<R.length;i++){var T=R.start(i);if(A+m.maxBufferHole>=u&&A<T){var w=Math.max(T+s,S.currentTime+l);return D.logger.warn("skipping hole, adjusting currentTime from "+A+" to "+w),this.moved=!0,this.stalled=null,S.currentTime=w,d&&g.trigger(M.Events.ERROR,{type:e.ErrorTypes.MEDIA_ERROR,details:e.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+A+" to "+w,frag:d}),w}u=R.end(i)}return 0},E._tryNudgeBuffer=function(){var d=this.config,m=this.hls,g=this.media,S=this.nudgeRetry;if(g===null)return;var A=g.currentTime;if(this.nudgeRetry++,S<d.nudgeMaxRetry){var u=A+(S+1)*d.nudgeOffset;D.logger.warn("Nudging 'currentTime' from "+A+" to "+u),g.currentTime=u,m.trigger(M.Events.ERROR,{type:e.ErrorTypes.MEDIA_ERROR,details:e.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else D.logger.error("Playhead still not moving while enough data buffered @"+A+" after "+d.nudgeMaxRetry+" nudges"),m.trigger(M.Events.ERROR,{type:e.ErrorTypes.MEDIA_ERROR,details:e.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},x}()},"./src/controller/id3-track-controller.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>d});var H=O("./src/polyfills/number.ts"),e=O("./src/events.ts"),M=O("./src/utils/texttrack-utils.ts"),D=O("./src/demux/id3.ts"),N=O("./src/loader/date-range.ts"),c=O("./src/types/demuxer.ts"),l=.25;function s(){return self.WebKitDataCue||self.VTTCue||self.TextTrackCue}var h=function(){var m=s();try{new m(0,Number.POSITIVE_INFINITY,"")}catch(g){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY}();function x(m,g){return m.getTime()/1e3-g}function E(m){return Uint8Array.from(m.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}var v=function(){function m(S){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=S,this._registerListeners()}var g=m.prototype;return g.destroy=function(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null},g._registerListeners=function(){var A=this.hls;A.on(e.Events.MEDIA_ATTACHED,this.onMediaAttached,this),A.on(e.Events.MEDIA_DETACHING,this.onMediaDetaching,this),A.on(e.Events.MANIFEST_LOADING,this.onManifestLoading,this),A.on(e.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),A.on(e.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),A.on(e.Events.LEVEL_UPDATED,this.onLevelUpdated,this)},g._unregisterListeners=function(){var A=this.hls;A.off(e.Events.MEDIA_ATTACHED,this.onMediaAttached,this),A.off(e.Events.MEDIA_DETACHING,this.onMediaDetaching,this),A.off(e.Events.MANIFEST_LOADING,this.onManifestLoading,this),A.off(e.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),A.off(e.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),A.off(e.Events.LEVEL_UPDATED,this.onLevelUpdated,this)},g.onMediaAttached=function(A,u){this.media=u.media},g.onMediaDetaching=function(){if(!this.id3Track)return;(0,M.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={}},g.onManifestLoading=function(){this.dateRangeCuesAppended={}},g.createTrack=function(A){var u=this.getID3Track(A.textTracks);return u.mode="hidden",u},g.getID3Track=function(A){if(!this.media)return;for(var u=0;u<A.length;u++){var R=A[u];if(R.kind==="metadata"&&R.label==="id3")return(0,M.sendAddTrackEvent)(R,this.media),R}return this.media.addTextTrack("metadata","id3")},g.onFragParsingMetadata=function(A,u){if(!this.media)return;var R=this.hls.config,i=R.enableEmsgMetadataCues,T=R.enableID3MetadataCues;if(!i&&!T)return;var w=u.samples;this.id3Track||(this.id3Track=this.createTrack(this.media));for(var y=s(),o=0;o<w.length;o++){var r=w[o].type;if(r===c.MetadataSchema.emsg&&!i||!T)continue;var a=D.getID3Frames(w[o].data);if(a){var n=w[o].pts,t=n+w[o].duration;t>h&&(t=h);var p=t-n;p<=0&&(t=n+l);for(var _=0;_<a.length;_++){var f=a[_];if(!D.isTimeStampFrame(f)){this.updateId3CueEnds(n);var F=new y(n,t,"");F.value=f,r&&(F.type=r),this.id3Track.addCue(F)}}}}},g.updateId3CueEnds=function(A){var u,R=(u=this.id3Track)===null||u===void 0?void 0:u.cues;if(R)for(var i=R.length;i--;){var T=R[i];T.startTime<A&&T.endTime===h&&(T.endTime=A)}},g.onBufferFlushing=function(A,u){var R=u.startOffset,i=u.endOffset,T=u.type,w=this.id3Track,y=this.hls;if(!y)return;var o=y.config,r=o.enableEmsgMetadataCues,a=o.enableID3MetadataCues;if(w&&(r||a)){var n;T==="audio"?n=function(p){return p.type===c.MetadataSchema.audioId3&&a}:T==="video"?n=function(p){return p.type===c.MetadataSchema.emsg&&r}:n=function(p){return p.type===c.MetadataSchema.audioId3&&a||p.type===c.MetadataSchema.emsg&&r},(0,M.removeCuesInRange)(w,R,i,n)}},g.onLevelUpdated=function(A,u){var R=this,i=u.details;if(!this.media||!i.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;var T=this.dateRangeCuesAppended,w=this.id3Track,y=i.dateRanges,o=Object.keys(y);if(w)for(var r=Object.keys(T).filter(function(P){return!o.includes(P)}),a=function(W){var V=r[W];Object.keys(T[V].cues).forEach(function(J){w.removeCue(T[V].cues[J])}),delete T[V]},n=r.length;n--;)a(n);var t=i.fragments[i.fragments.length-1];if(o.length===0||!(0,H.isFiniteNumber)(t==null?void 0:t.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));for(var p=t.programDateTime/1e3-t.start,_=s(),f=function(W){var V=o[W],J=y[V],ne=T[V],ce=(ne==null?void 0:ne.cues)||{},ie=(ne==null?void 0:ne.durationKnown)||!1,xe=x(J.startDate,p),ge=h,de=J.endDate;if(de)ge=x(de,p),ie=!0;else if(J.endOnNext&&!ie){var Fe=o.reduce(function(k,z){var X=y[z];return X.class===J.class&&X.id!==z&&X.startDate>J.startDate&&k.push(X),k},[]).sort(function(k,z){return k.startDate.getTime()-z.startDate.getTime()})[0];Fe&&(ge=x(Fe.startDate,p),ie=!0)}for(var Qe=Object.keys(J.attr),Ve=0;Ve<Qe.length;Ve++){var Ne=Qe[Ve];if(Ne===N.DateRangeAttribute.ID||Ne===N.DateRangeAttribute.CLASS||Ne===N.DateRangeAttribute.START_DATE||Ne===N.DateRangeAttribute.DURATION||Ne===N.DateRangeAttribute.END_DATE||Ne===N.DateRangeAttribute.END_ON_NEXT)continue;var Ue=ce[Ne];if(Ue)ie&&!ne.durationKnown&&(Ue.endTime=ge);else{var q=J.attr[Ne];Ue=new _(xe,ge,""),(Ne===N.DateRangeAttribute.SCTE35_OUT||Ne===N.DateRangeAttribute.SCTE35_IN)&&(q=E(q)),Ue.value={key:Ne,data:q},Ue.type=c.MetadataSchema.dateRange,R.id3Track.addCue(Ue),ce[Ne]=Ue}}T[V]={cues:ce,dateRange:J,durationKnown:ie}},F=0;F<o.length;F++)f(F)},m}();const d=v},"./src/controller/latency-controller.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>s});var H=O("./src/errors.ts"),e=O("./src/events.ts"),M=O("./src/utils/logger.ts");function D(h,x){for(var E=0;E<x.length;E++){var v=x[E];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(h,c(v.key),v)}}function N(h,x,E){return x&&D(h.prototype,x),E&&D(h,E),Object.defineProperty(h,"prototype",{writable:!1}),h}function c(h){var x=l(h,"string");return typeof x=="symbol"?x:String(x)}function l(h,x){if(typeof h!="object"||h===null)return h;var E=h[Symbol.toPrimitive];if(E!==void 0){var v=E.call(h,x||"default");if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return(x==="string"?String:Number)(h)}var s=function(){function h(E){var v=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 v.timeupdate()},this.hls=E,this.config=E.config,this.registerListeners()}var x=h.prototype;return x.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},x.registerListeners=function(){this.hls.on(e.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(e.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(e.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(e.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(e.Events.ERROR,this.onError,this)},x.unregisterListeners=function(){this.hls.off(e.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(e.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(e.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(e.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(e.Events.ERROR,this.onError)},x.onMediaAttached=function(v,d){this.media=d.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},x.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},x.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},x.onLevelUpdated=function(v,d){var m=d.details;this.levelDetails=m,m.advanced&&this.timeupdate(),!m.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},x.onError=function(v,d){if(d.details!==H.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,M.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},x.timeupdate=function(){var v=this.media,d=this.levelDetails;if(!v||!d)return;this.currentTime=v.currentTime;var m=this.computeLatency();if(m===null)return;this._latency=m;var g=this.config,S=g.lowLatencyMode,A=g.maxLiveSyncPlaybackRate;if(!S||A===1)return;var u=this.targetLatency;if(u===null)return;var R=m-u,i=Math.min(this.maxLatency,u+d.targetduration),T=R<i;if(d.live&&T&&R>.05&&this.forwardBufferLength>1){var w=Math.min(2,Math.max(1,A)),y=Math.round(2/(1+Math.exp(-.75*R-this.edgeStalled))*20)/20;v.playbackRate=Math.min(w,Math.max(1,y))}else v.playbackRate!==1&&v.playbackRate!==0&&(v.playbackRate=1)},x.estimateLiveEdge=function(){var v=this.levelDetails;return v===null?null:v.edge+v.age},x.computeLatency=function(){var v=this.estimateLiveEdge();return v===null?null:v-this.currentTime},N(h,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var v=this.config,d=this.levelDetails;return v.liveMaxLatencyDuration!==void 0?v.liveMaxLatencyDuration:d?v.liveMaxLatencyDurationCount*d.targetduration:0}},{key:"targetLatency",get:function(){var v=this.levelDetails;if(v===null)return null;var d=v.holdBack,m=v.partHoldBack,g=v.targetduration,S=this.config,A=S.liveSyncDuration,u=S.liveSyncDurationCount,R=S.lowLatencyMode,i=this.hls.userConfig,T=R&&m||d;(i.liveSyncDuration||i.liveSyncDurationCount||T===0)&&(T=A!==void 0?A:u*g);var w=g,y=1;return T+Math.min(this.stallCount*y,w)}},{key:"liveSyncPosition",get:function(){var v=this.estimateLiveEdge(),d=this.targetLatency,m=this.levelDetails;if(v===null||d===null||m===null)return null;var g=m.edge,S=v-d-this.edgeStalled,A=g-m.totalduration,u=g-(this.config.lowLatencyMode&&m.partTarget||m.targetduration);return Math.min(Math.max(A,S),u)}},{key:"drift",get:function(){var v=this.levelDetails;return v===null?1:v.drift}},{key:"edgeStalled",get:function(){var v=this.levelDetails;if(v===null)return 0;var d=(this.config.lowLatencyMode&&v.partTarget||v.targetduration)*3;return Math.max(v.age-d,0)}},{key:"forwardBufferLength",get:function(){var v=this.media,d=this.levelDetails;if(!v||!d)return 0;var m=v.buffered.length;return(m?v.buffered.end(m-1):d.edge)-this.currentTime}}]),h}()},"./src/controller/level-controller.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>S});var H=O("./src/types/level.ts"),e=O("./src/events.ts"),M=O("./src/errors.ts"),D=O("./src/utils/codecs.ts"),N=O("./src/controller/level-helper.ts"),c=O("./src/controller/base-playlist-controller.ts"),l=O("./src/types/loader.ts");function s(){return s=Object.assign?Object.assign.bind():function(A){for(var u=1;u<arguments.length;u++){var R=arguments[u];for(var i in R)Object.prototype.hasOwnProperty.call(R,i)&&(A[i]=R[i])}return A},s.apply(this,arguments)}function h(A,u){for(var R=0;R<u.length;R++){var i=u[R];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(A,E(i.key),i)}}function x(A,u,R){return u&&h(A.prototype,u),R&&h(A,R),Object.defineProperty(A,"prototype",{writable:!1}),A}function E(A){var u=v(A,"string");return typeof u=="symbol"?u:String(u)}function v(A,u){if(typeof A!="object"||A===null)return A;var R=A[Symbol.toPrimitive];if(R!==void 0){var i=R.call(A,u||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(A)}function d(A,u){A.prototype=Object.create(u.prototype),A.prototype.constructor=A,m(A,u)}function m(A,u){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,T){return i.__proto__=T,i},m(A,u)}var g=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),S=function(A){d(u,A);function u(i){var T;return T=A.call(this,i,"[level-controller]")||this,T._levels=[],T._firstLevel=-1,T._startLevel=void 0,T.currentLevelIndex=-1,T.manualLevelIndex=-1,T.onParsedComplete=void 0,T._registerListeners(),T}var R=u.prototype;return R._registerListeners=function(){var T=this.hls;T.on(e.Events.MANIFEST_LOADED,this.onManifestLoaded,this),T.on(e.Events.LEVEL_LOADED,this.onLevelLoaded,this),T.on(e.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),T.on(e.Events.FRAG_LOADED,this.onFragLoaded,this),T.on(e.Events.ERROR,this.onError,this)},R._unregisterListeners=function(){var T=this.hls;T.off(e.Events.MANIFEST_LOADED,this.onManifestLoaded,this),T.off(e.Events.LEVEL_LOADED,this.onLevelLoaded,this),T.off(e.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),T.off(e.Events.FRAG_LOADED,this.onFragLoaded,this),T.off(e.Events.ERROR,this.onError,this)},R.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,A.prototype.destroy.call(this)},R.startLoad=function(){var T=this._levels;T.forEach(function(w){w.loadError=0}),A.prototype.startLoad.call(this)},R.onManifestLoaded=function(T,w){var y=[],o=[],r=[],a,n={},t,p=!1,_=!1,f=!1;if(w.levels.forEach(function(V){var J=V.attrs;p=p||!!(V.width&&V.height),_=_||!!V.videoCodec,f=f||!!V.audioCodec,g&&V.audioCodec&&V.audioCodec.indexOf("mp4a.40.34")!==-1&&(V.audioCodec=void 0);var ne=V.bitrate+"-"+V.attrs.RESOLUTION+"-"+V.attrs.CODECS;t=n[ne],t?t.url.push(V.url):(t=new H.Level(V),n[ne]=t,y.push(t)),J&&(J.AUDIO&&(0,N.addGroupId)(t,"audio",J.AUDIO),J.SUBTITLES&&(0,N.addGroupId)(t,"text",J.SUBTITLES))}),(p||_)&&f&&(y=y.filter(function(V){var J=V.videoCodec,ne=V.width,ce=V.height;return!!J||!!(ne&&ce)})),y=y.filter(function(V){var J=V.audioCodec,ne=V.videoCodec;return(!J||(0,D.isCodecSupportedInMp4)(J,"audio"))&&(!ne||(0,D.isCodecSupportedInMp4)(ne,"video"))}),w.audioTracks&&(o=w.audioTracks.filter(function(V){return!V.audioCodec||(0,D.isCodecSupportedInMp4)(V.audioCodec,"audio")}),(0,N.assignTrackIdsByGroup)(o)),w.subtitles&&(r=w.subtitles,(0,N.assignTrackIdsByGroup)(r)),y.length>0){a=y[0].bitrate,y.sort(function(V,J){return V.attrs["HDCP-LEVEL"]!==J.attrs["HDCP-LEVEL"]?(V.attrs["HDCP-LEVEL"]||"")>(J.attrs["HDCP-LEVEL"]||"")?1:-1:V.bitrate!==J.bitrate?V.bitrate-J.bitrate:V.attrs.SCORE!==J.attrs.SCORE?V.attrs.decimalFloatingPoint("SCORE")-J.attrs.decimalFloatingPoint("SCORE"):p&&V.height!==J.height?V.height-J.height:0}),this._levels=y;for(var F=0;F<y.length;F++)if(y[F].bitrate===a){this._firstLevel=F,this.log("manifest loaded, "+y.length+" level(s) found, first bitrate: "+a);break}var P=f&&!_,W={levels:y,audioTracks:o,subtitleTracks:r,sessionData:w.sessionData,sessionKeys:w.sessionKeys,firstLevel:this._firstLevel,stats:w.stats,audio:f,video:_,altAudio:!P&&o.some(function(V){return!!V.url})};this.hls.trigger(e.Events.MANIFEST_PARSED,W),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(e.Events.ERROR,{type:M.ErrorTypes.MEDIA_ERROR,details:M.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:w.url,reason:"no level with compatible codecs found in manifest"})},R.onError=function(T,w){var y,o;if(A.prototype.onError.call(this,T,w),w.fatal)return;var r=w.context,a=this._levels[this.currentLevelIndex];if(r&&(r.type===l.PlaylistContextType.AUDIO_TRACK&&a.audioGroupIds&&r.groupId===a.audioGroupIds[a.urlId]||r.type===l.PlaylistContextType.SUBTITLE_TRACK&&a.textGroupIds&&r.groupId===a.textGroupIds[a.urlId])){this.redundantFailover(this.currentLevelIndex);return}var n=!1,t=!0,p;switch(w.details){case M.ErrorDetails.FRAG_LOAD_ERROR:case M.ErrorDetails.FRAG_LOAD_TIMEOUT:case M.ErrorDetails.KEY_LOAD_ERROR:case M.ErrorDetails.KEY_LOAD_TIMEOUT:if(w.frag){var _=w.frag.type===l.PlaylistLevelType.MAIN?w.frag.level:this.currentLevelIndex,f=this._levels[_];f?(f.fragmentError++,f.fragmentError>this.hls.config.fragLoadingMaxRetry&&(p=_)):p=_}break;case M.ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{var F=a.attrs["HDCP-LEVEL"];F&&(this.hls.maxHdcpLevel=H.HdcpLevels[H.HdcpLevels.indexOf(F)-1],this.warn('Restricting playback to HDCP-LEVEL of "'+this.hls.maxHdcpLevel+'" or lower'))}case M.ErrorDetails.FRAG_PARSING_ERROR:case M.ErrorDetails.KEY_SYSTEM_NO_SESSION:p=((y=w.frag)===null||y===void 0?void 0:y.type)===l.PlaylistLevelType.MAIN?w.frag.level:this.currentLevelIndex,w.levelRetry=!1;break;case M.ErrorDetails.LEVEL_LOAD_ERROR:case M.ErrorDetails.LEVEL_LOAD_TIMEOUT:r&&(r.deliveryDirectives&&(t=!1),p=r.level),n=!0;break;case M.ErrorDetails.REMUX_ALLOC_ERROR:p=(o=w.level)!=null?o:this.currentLevelIndex,n=!0;break}p!==void 0&&this.recoverLevel(w,p,n,t)},R.recoverLevel=function(T,w,y,o){var r=T.details,a=this._levels[w];if(a.loadError++,y){var n=this.retryLoadingOrFail(T);if(n)T.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(o){var t=a.url.length;if(t>1&&a.loadError<t)T.levelRetry=!0,this.redundantFailover(w);else if(this.manualLevelIndex===-1){for(var p=-1,_=this._levels,f=_.length;f--;){var F=(f+this.currentLevelIndex)%_.length;if(F!==this.currentLevelIndex&&_[F].loadError===0){p=F;break}}p>-1&&this.currentLevelIndex!==p?(this.warn(r+": switch to "+p),T.levelRetry=!0,this.hls.nextAutoLevel=p):T.levelRetry===!1&&(T.fatal=!0)}}},R.redundantFailover=function(T){var w=this._levels[T],y=w.url.length;if(y>1){var o=(w.urlId+1)%y;this.warn("Switching to redundant URL-id "+o),this._levels.forEach(function(r){r.urlId=o}),this.level=T}},R.onFragLoaded=function(T,w){var y=w.frag;if(y!==void 0&&y.type===l.PlaylistLevelType.MAIN){var o=this._levels[y.level];o!==void 0&&(o.fragmentError=0,o.loadError=0)}},R.onLevelLoaded=function(T,w){var y,o=w.level,r=w.details,a=this._levels[o];if(!a){var n;this.warn("Invalid level index "+o),(n=w.deliveryDirectives)!==null&&n!==void 0&&n.skip&&(r.deltaUpdateFailed=!0);return}o===this.currentLevelIndex?(a.fragmentError===0&&(a.loadError=0,this.retryCount=0),this.playlistLoaded(o,w,a.details)):(y=w.deliveryDirectives)!==null&&y!==void 0&&y.skip&&(r.deltaUpdateFailed=!0)},R.onAudioTrackSwitched=function(T,w){var y=this.hls.levels[this.currentLevelIndex];if(!y)return;if(y.audioGroupIds){for(var o=-1,r=this.hls.audioTracks[w.id].groupId,a=0;a<y.audioGroupIds.length;a++)if(y.audioGroupIds[a]===r){o=a;break}o!==y.urlId&&(y.urlId=o,this.startLoad())}},R.loadPlaylist=function(T){A.prototype.loadPlaylist.call(this);var w=this.currentLevelIndex,y=this._levels[w];if(this.canLoad&&y&&y.url.length>0){var o=y.urlId,r=y.url[o];if(T)try{r=T.addDirectives(r)}catch(a){this.warn("Could not construct new URL with HLS Delivery Directives: "+a)}this.log("Attempt loading level index "+w+((T==null?void 0:T.msn)!==void 0?" at sn "+T.msn+" part "+T.part:"")+" with URL-id "+o+" "+r),this.clearTimer(),this.hls.trigger(e.Events.LEVEL_LOADING,{url:r,level:w,id:o,deliveryDirectives:T||null})}},R.removeLevel=function(T,w){var y=function(a,n){return n!==w},o=this._levels.filter(function(r,a){return a!==T?!0:r.url.length>1&&w!==void 0?(r.url=r.url.filter(y),r.audioGroupIds&&(r.audioGroupIds=r.audioGroupIds.filter(y)),r.textGroupIds&&(r.textGroupIds=r.textGroupIds.filter(y)),r.urlId=0,!0):!1}).map(function(r,a){var n=r.details;return n!=null&&n.fragments&&n.fragments.forEach(function(t){t.level=a}),r});this._levels=o,this.hls.trigger(e.Events.LEVELS_UPDATED,{levels:o})},x(u,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(T){var w,y=this._levels;if(y.length===0)return;if(this.currentLevelIndex===T&&(w=y[T])!==null&&w!==void 0&&w.details)return;if(T<0||T>=y.length){var o=T<0;if(this.hls.trigger(e.Events.ERROR,{type:M.ErrorTypes.OTHER_ERROR,details:M.ErrorDetails.LEVEL_SWITCH_ERROR,level:T,fatal:o,reason:"invalid level idx"}),o)return;T=Math.min(T,y.length-1)}this.clearTimer();var r=this.currentLevelIndex,a=y[r],n=y[T];this.log("switching to level "+T+" from "+r),this.currentLevelIndex=T;var t=s({},n,{level:T,maxBitrate:n.maxBitrate,uri:n.uri,urlId:n.urlId});delete t._urlId,this.hls.trigger(e.Events.LEVEL_SWITCHING,t);var p=n.details;if(!p||p.live){var _=this.switchParams(n.uri,a==null?void 0:a.details);this.loadPlaylist(_)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(T){this.manualLevelIndex=T,this._startLevel===void 0&&(this._startLevel=T),T!==-1&&(this.level=T)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(T){this._firstLevel=T}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var T=this.hls.config.startLevel;return T!==void 0?T:this._firstLevel}else return this._startLevel},set:function(T){this._startLevel=T}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(T){this.level=T,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=T)}}]),u}(c.default)},"./src/controller/level-helper.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{addGroupId:()=>N,addSliding:()=>g,adjustSliding:()=>m,assignTrackIdsByGroup:()=>c,computeReloadInterval:()=>S,getFragmentWithSN:()=>A,getPartWith:()=>u,mapFragmentIntersection:()=>d,mapPartIntersection:()=>v,mergeDetails:()=>x,updateFragPTSDTS:()=>h,updatePTS:()=>l});var H=O("./src/polyfills/number.ts"),e=O("./src/utils/logger.ts"),M=O("./src/loader/date-range.ts");function D(){return D=Object.assign?Object.assign.bind():function(R){for(var i=1;i<arguments.length;i++){var T=arguments[i];for(var w in T)Object.prototype.hasOwnProperty.call(T,w)&&(R[w]=T[w])}return R},D.apply(this,arguments)}function N(R,i,T){switch(i){case"audio":R.audioGroupIds||(R.audioGroupIds=[]),R.audioGroupIds.push(T);break;case"text":R.textGroupIds||(R.textGroupIds=[]),R.textGroupIds.push(T);break}}function c(R){var i={};R.forEach(function(T){var w=T.groupId||"";T.id=i[w]=i[w]||0,i[w]++})}function l(R,i,T){var w=R[i],y=R[T];s(w,y)}function s(R,i){var T=i.startPTS;if((0,H.isFiniteNumber)(T)){var w=0,y;i.sn>R.sn?(w=T-R.start,y=R):(w=R.start-T,y=i),y.duration!==w&&(y.duration=w)}else if(i.sn>R.sn){var o=R.cc===i.cc;o&&R.minEndPTS?i.start=R.start+(R.minEndPTS-R.start):i.start=R.start+R.duration}else i.start=Math.max(R.start-i.duration,0)}function h(R,i,T,w,y,o){var r=w-T;r<=0&&(e.logger.warn("Fragment should have a positive duration",i),w=T+i.duration,o=y+i.duration);var a=T,n=w,t=i.startPTS,p=i.endPTS;if((0,H.isFiniteNumber)(t)){var _=Math.abs(t-T);(0,H.isFiniteNumber)(i.deltaPTS)?i.deltaPTS=Math.max(_,i.deltaPTS):i.deltaPTS=_,a=Math.max(T,t),T=Math.min(T,t),y=Math.min(y,i.startDTS),n=Math.min(w,p),w=Math.max(w,p),o=Math.max(o,i.endDTS)}i.duration=w-T;var f=T-i.start;i.start=i.startPTS=T,i.maxStartPTS=a,i.startDTS=y,i.endPTS=w,i.minEndPTS=n,i.endDTS=o;var F=i.sn;if(!R||F<R.startSN||F>R.endSN)return 0;var P,W=F-R.startSN,V=R.fragments;for(V[W]=i,P=W;P>0;P--)s(V[P],V[P-1]);for(P=W;P<V.length-1;P++)s(V[P],V[P+1]);return R.fragmentHint&&s(V[V.length-1],R.fragmentHint),R.PTSKnown=R.alignedSliding=!0,f}function x(R,i){for(var T=null,w=R.fragments,y=w.length-1;y>=0;y--){var o=w[y].initSegment;if(o){T=o;break}}R.fragmentHint&&delete R.fragmentHint.endPTS;var r=0,a;if(d(R,i,function(P,W){P.relurl&&(r=P.cc-W.cc),(0,H.isFiniteNumber)(P.startPTS)&&(0,H.isFiniteNumber)(P.endPTS)&&(W.start=W.startPTS=P.startPTS,W.startDTS=P.startDTS,W.appendedPTS=P.appendedPTS,W.maxStartPTS=P.maxStartPTS,W.endPTS=P.endPTS,W.endDTS=P.endDTS,W.minEndPTS=P.minEndPTS,W.duration=P.endPTS-P.startPTS,W.duration&&(a=W),i.PTSKnown=i.alignedSliding=!0),W.elementaryStreams=P.elementaryStreams,W.loader=P.loader,W.stats=P.stats,W.urlId=P.urlId,P.initSegment&&(W.initSegment=P.initSegment,T=P.initSegment)}),T){var n=i.fragmentHint?i.fragments.concat(i.fragmentHint):i.fragments;n.forEach(function(P){var W;(!P.initSegment||P.initSegment.relurl===((W=T)===null||W===void 0?void 0:W.relurl))&&(P.initSegment=T)})}if(i.skippedSegments)if(i.deltaUpdateFailed=i.fragments.some(function(P){return!P}),i.deltaUpdateFailed){e.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var t=i.skippedSegments;t--;)i.fragments.shift();i.startSN=i.fragments[0].sn,i.startCC=i.fragments[0].cc}else i.canSkipDateRanges&&(i.dateRanges=E(R.dateRanges,i.dateRanges,i.recentlyRemovedDateranges));var p=i.fragments;if(r){e.logger.warn("discontinuity sliding from playlist, take drift into account");for(var _=0;_<p.length;_++)p[_].cc+=r}i.skippedSegments&&(i.startCC=i.fragments[0].cc),v(R.partList,i.partList,function(P,W){W.elementaryStreams=P.elementaryStreams,W.stats=P.stats}),a?h(i,a,a.startPTS,a.endPTS,a.startDTS,a.endDTS):m(R,i),p.length&&(i.totalduration=i.edge-p[0].start),i.driftStartTime=R.driftStartTime,i.driftStart=R.driftStart;var f=i.advancedDateTime;if(i.advanced&&f){var F=i.edge;i.driftStart||(i.driftStartTime=f,i.driftStart=F),i.driftEndTime=f,i.driftEnd=F}else i.driftEndTime=R.driftEndTime,i.driftEnd=R.driftEnd,i.advancedDateTime=R.advancedDateTime}function E(R,i,T){var w=D({},R);return T&&T.forEach(function(y){delete w[y]}),Object.keys(i).forEach(function(y){var o=new M.DateRange(i[y].attr,w[y]);o.isValid?w[y]=o:e.logger.warn('Ignoring invalid Playlist Delta Update DATERANGE tag: "'+JSON.stringify(i[y].attr)+'"')}),w}function v(R,i,T){if(R&&i)for(var w=0,y=0,o=R.length;y<=o;y++){var r=R[y],a=i[y+w];r&&a&&r.index===a.index&&r.fragment.sn===a.fragment.sn?T(r,a):w--}}function d(R,i,T){for(var w=i.skippedSegments,y=Math.max(R.startSN,i.startSN)-i.startSN,o=(R.fragmentHint?1:0)+(w?i.endSN:Math.min(R.endSN,i.endSN))-i.startSN,r=i.startSN-R.startSN,a=i.fragmentHint?i.fragments.concat(i.fragmentHint):i.fragments,n=R.fragmentHint?R.fragments.concat(R.fragmentHint):R.fragments,t=y;t<=o;t++){var p=n[r+t],_=a[t];w&&!_&&t<w&&(_=i.fragments[t]=p),p&&_&&T(p,_)}}function m(R,i){var T=i.startSN+i.skippedSegments-R.startSN,w=R.fragments;if(T<0||T>=w.length)return;g(i,w[T].start)}function g(R,i){if(i){for(var T=R.fragments,w=R.skippedSegments;w<T.length;w++)T[w].start+=i;R.fragmentHint&&(R.fragmentHint.start+=i)}}function S(R,i){i===void 0&&(i=Infinity);var T=1e3*R.targetduration;if(R.updated){var w=R.fragments,y=4;if(w.length&&T*y>i){var o=w[w.length-1].duration*1e3;o<T&&(T=o)}}else T/=2;return Math.round(T)}function A(R,i,T){if(!R||!R.details)return null;var w=R.details,y=w.fragments[i-w.startSN];return y||(y=w.fragmentHint,y&&y.sn===i?y:i<w.startSN&&T&&T.sn===i?T:null)}function u(R,i,T){if(!R||!R.details)return null;var w=R.details.partList;if(w)for(var y=w.length;y--;){var o=w[y];if(o.index===T&&o.fragment.sn===i)return o}return null}},"./src/controller/stream-controller.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>i});var H=O("./src/polyfills/number.ts"),e=O("./src/controller/base-stream-controller.ts"),M=O("./src/is-supported.ts"),D=O("./src/events.ts"),N=O("./src/utils/buffer-helper.ts"),c=O("./src/controller/fragment-tracker.ts"),l=O("./src/types/loader.ts"),s=O("./src/loader/fragment.ts"),h=O("./src/demux/transmuxer-interface.ts"),x=O("./src/types/transmuxer.ts"),E=O("./src/controller/gap-controller.ts"),v=O("./src/errors.ts");function d(T,w){for(var y=0;y<w.length;y++){var o=w[y];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(T,g(o.key),o)}}function m(T,w,y){return w&&d(T.prototype,w),y&&d(T,y),Object.defineProperty(T,"prototype",{writable:!1}),T}function g(T){var w=S(T,"string");return typeof w=="symbol"?w:String(w)}function S(T,w){if(typeof T!="object"||T===null)return T;var y=T[Symbol.toPrimitive];if(y!==void 0){var o=y.call(T,w||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(T)}function A(T,w){T.prototype=Object.create(w.prototype),T.prototype.constructor=T,u(T,w)}function u(T,w){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},u(T,w)}var R=100,i=function(T){A(w,T);function w(o,r,a){var n;return n=T.call(this,o,r,a,"[stream-controller]")||this,n.audioCodecSwap=!1,n.gapController=null,n.level=-1,n._forceStartLoad=!1,n.altAudio=!1,n.audioOnly=!1,n.fragPlaying=null,n.onvplaying=null,n.onvseeked=null,n.fragLastKbps=0,n.couldBacktrack=!1,n.backtrackFragment=null,n.audioCodecSwitch=!1,n.videoBuffer=null,n._registerListeners(),n}var y=w.prototype;return y._registerListeners=function(){var r=this.hls;r.on(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.on(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.on(D.Events.LEVEL_LOADING,this.onLevelLoading,this),r.on(D.Events.LEVEL_LOADED,this.onLevelLoaded,this),r.on(D.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),r.on(D.Events.ERROR,this.onError,this),r.on(D.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),r.on(D.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),r.on(D.Events.BUFFER_CREATED,this.onBufferCreated,this),r.on(D.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),r.on(D.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),r.on(D.Events.FRAG_BUFFERED,this.onFragBuffered,this)},y._unregisterListeners=function(){var r=this.hls;r.off(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.off(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.off(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.off(D.Events.LEVEL_LOADED,this.onLevelLoaded,this),r.off(D.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),r.off(D.Events.ERROR,this.onError,this),r.off(D.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),r.off(D.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),r.off(D.Events.BUFFER_CREATED,this.onBufferCreated,this),r.off(D.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),r.off(D.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),r.off(D.Events.FRAG_BUFFERED,this.onFragBuffered,this)},y.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},y.startLoad=function(r){if(this.levels){var a=this.lastCurrentTime,n=this.hls;if(this.stopLoad(),this.setInterval(R),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var t=n.startLevel;t===-1&&(n.config.testBandwidth&&this.levels.length>1?(t=0,this.bitrateTest=!0):t=n.nextAutoLevel),this.level=n.nextLoadLevel=t,this.loadedmetadata=!1}a>0&&r===-1&&(this.log("Override startPosition with lastCurrentTime @"+a.toFixed(3)),r=a),this.state=e.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=r,this.tick()}else this._forceStartLoad=!0,this.state=e.State.STOPPED},y.stopLoad=function(){this._forceStartLoad=!1,T.prototype.stopLoad.call(this)},y.doTick=function(){switch(this.state){case e.State.IDLE:this.doTickIdle();break;case e.State.WAITING_LEVEL:{var r,a=this.levels,n=this.level,t=a==null||((r=a[n])===null||r===void 0)?void 0:r.details;if(t&&(!t.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(t))break;this.state=e.State.IDLE;break}break}case e.State.FRAG_LOADING_WAITING_RETRY:{var p,_=self.performance.now(),f=this.retryDate;(!f||_>=f||(p=this.media)!==null&&p!==void 0&&p.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded(this.level),this.state=e.State.IDLE)}break;default:break}this.onTickEnd()},y.onTickEnd=function(){T.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},y.doTickIdle=function(){var r=this.hls,a=this.levelLastLoaded,n=this.levels,t=this.media,p=r.config,_=r.nextLoadLevel;if(a===null||!t&&(this.startFragRequested||!p.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!n||!n[_])return;var f=n[_],F=this.getMainFwdBufferInfo();if(F===null)return;var P=this.getLevelDetails();if(P&&this._streamEnded(F,P)){var W={};this.altAudio&&(W.type="video"),this.hls.trigger(D.Events.BUFFER_EOS,W),this.state=e.State.ENDED;return}this.level=r.nextLoadLevel=_;var V=f.details;if(!V||this.state===e.State.WAITING_LEVEL||V.live&&this.levelLastLoaded!==_){this.level=_,this.state=e.State.WAITING_LEVEL;return}var J=F.len,ne=this.getMaxBufferLength(f.maxBitrate);if(J>=ne)return;this.backtrackFragment&&this.backtrackFragment.start>F.end&&(this.backtrackFragment=null);var ce=this.backtrackFragment?this.backtrackFragment.start:F.end,ie=this.getNextFragment(ce,V);if(this.couldBacktrack&&!this.fragPrevious&&ie&&ie.sn!=="initSegment"&&this.fragmentTracker.getState(ie)!==c.FragmentState.OK){var xe,ge=((xe=this.backtrackFragment)!=null?xe:ie).sn,de=ge-V.startSN,Fe=V.fragments[de-1];Fe&&ie.cc===Fe.cc&&(ie=Fe,this.fragmentTracker.removeFragment(Fe))}else this.backtrackFragment&&F.len&&(this.backtrackFragment=null);if(ie&&this.fragmentTracker.getState(ie)===c.FragmentState.OK&&this.nextLoadPosition>ce){var Qe=this.audioOnly&&!this.altAudio?s.ElementaryStreamTypes.AUDIO:s.ElementaryStreamTypes.VIDEO,Ve=(Qe===s.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;Ve&&this.afterBufferFlushed(Ve,Qe,l.PlaylistLevelType.MAIN),ie=this.getNextFragment(this.nextLoadPosition,V)}if(!ie)return;ie.initSegment&&!ie.initSegment.data&&!this.bitrateTest&&(ie=ie.initSegment),this.loadFragment(ie,V,ce)},y.loadFragment=function(r,a,n){var t,p=this.fragmentTracker.getState(r);this.fragCurrent=r,p===c.FragmentState.NOT_LOADED?r.sn==="initSegment"?this._loadInitSegment(r,a):this.bitrateTest?(this.log("Fragment "+r.sn+" of level "+r.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(r,a)):(this.startFragRequested=!0,T.prototype.loadFragment.call(this,r,a,n)):p===c.FragmentState.APPENDING?this.reduceMaxBufferLength(r.duration)&&this.fragmentTracker.removeFragment(r):((t=this.media)===null||t===void 0?void 0:t.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},y.getAppendedFrag=function(r){var a=this.fragmentTracker.getAppendedFrag(r,l.PlaylistLevelType.MAIN);return a&&"fragment"in a?a.fragment:a},y.getBufferedFrag=function(r){return this.fragmentTracker.getBufferedFrag(r,l.PlaylistLevelType.MAIN)},y.followingBufferedFrag=function(r){return r?this.getBufferedFrag(r.end+.5):null},y.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},y.nextLevelSwitch=function(){var r=this.levels,a=this.media;if(a!=null&&a.readyState){var n,t=this.getAppendedFrag(a.currentTime);if(t&&t.start>1&&this.flushMainBuffer(0,t.start-1),!a.paused&&r){var p=this.hls.nextLoadLevel,_=r[p],f=this.fragLastKbps;f&&this.fragCurrent?n=this.fragCurrent.duration*_.maxBitrate/(1e3*f)+1:n=0}else n=0;var F=this.getBufferedFrag(a.currentTime+n);if(F){var P=this.followingBufferedFrag(F);if(P){this.abortCurrentFrag();var W=P.maxStartPTS?P.maxStartPTS:P.start,V=P.duration,J=Math.max(F.end,W+Math.min(Math.max(V-this.config.maxFragLookUpTolerance,V*.5),V*.75));this.flushMainBuffer(J,Number.POSITIVE_INFINITY)}}}},y.abortCurrentFrag=function(){var r=this.fragCurrent;this.fragCurrent=null,this.backtrackFragment=null,r&&r.abortRequests();switch(this.state){case e.State.KEY_LOADING:case e.State.FRAG_LOADING:case e.State.FRAG_LOADING_WAITING_RETRY:case e.State.PARSING:case e.State.PARSED:this.state=e.State.IDLE;break}this.nextLoadPosition=this.getLoadPosition()},y.flushMainBuffer=function(r,a){T.prototype.flushMainBuffer.call(this,r,a,this.altAudio?"video":null)},y.onMediaAttached=function(r,a){T.prototype.onMediaAttached.call(this,r,a);var n=a.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),n.addEventListener("playing",this.onvplaying),n.addEventListener("seeked",this.onvseeked),this.gapController=new E.default(this.config,n,this.fragmentTracker,this.hls)},y.onMediaDetaching=function(){var r=this.media;r&&this.onvplaying&&this.onvseeked&&(r.removeEventListener("playing",this.onvplaying),r.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),T.prototype.onMediaDetaching.call(this)},y.onMediaPlaying=function(){this.tick()},y.onMediaSeeked=function(){var r=this.media,a=r?r.currentTime:null;(0,H.isFiniteNumber)(a)&&this.log("Media seeked to "+a.toFixed(3)),this.tick()},y.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(D.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null,this.backtrackFragment=null},y.onManifestParsed=function(r,a){var n=!1,t=!1,p;a.levels.forEach(function(_){p=_.audioCodec,p&&(p.indexOf("mp4a.40.2")!==-1&&(n=!0),p.indexOf("mp4a.40.5")!==-1&&(t=!0))}),this.audioCodecSwitch=n&&t&&!(0,M.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=a.levels,this.startFragRequested=!1},y.onLevelLoading=function(r,a){var n=this.levels;if(!n||this.state!==e.State.IDLE)return;var t=n[a.level];(!t.details||t.details.live&&this.levelLastLoaded!==a.level||this.waitForCdnTuneIn(t.details))&&(this.state=e.State.WAITING_LEVEL)},y.onLevelLoaded=function(r,a){var n,t=this.levels,p=a.level,_=a.details,f=_.totalduration;if(!t){this.warn("Levels were reset while loading level "+p);return}this.log("Level "+p+" loaded ["+_.startSN+","+_.endSN+"], cc ["+_.startCC+", "+_.endCC+"] duration:"+f);var F=this.fragCurrent;F&&(this.state===e.State.FRAG_LOADING||this.state===e.State.FRAG_LOADING_WAITING_RETRY)&&(F.level!==a.level&&F.loader&&(this.state=e.State.IDLE,this.backtrackFragment=null,F.abortRequests()));var P=t[p],W=0;if(_.live||(n=P.details)!==null&&n!==void 0&&n.live){if(_.fragments[0]||(_.deltaUpdateFailed=!0),_.deltaUpdateFailed)return;W=this.alignPlaylists(_,P.details)}if(P.details=_,this.levelLastLoaded=p,this.hls.trigger(D.Events.LEVEL_UPDATED,{details:_,level:p}),this.state===e.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(_))return;this.state=e.State.IDLE}this.startFragRequested?_.live&&this.synchronizeToLiveEdge(_):this.setStartPosition(_,W),this.tick()},y._handleFragmentLoadProgress=function(r){var a,n=r.frag,t=r.part,p=r.payload,_=this.levels;if(!_){this.warn("Levels were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered");return}var f=_[n.level],F=f.details;if(!F){this.warn("Dropping fragment "+n.sn+" of level "+n.level+" after level details were reset");return}var P=f.videoCodec,W=F.PTSKnown||!F.live,V=(a=n.initSegment)===null||a===void 0?void 0:a.data,J=this._getAudioCodec(f),ne=this.transmuxer=this.transmuxer||new h.default(this.hls,l.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),ce=t?t.index:-1,ie=ce!==-1,xe=new x.ChunkMetadata(n.level,n.sn,n.stats.chunkCount,p.byteLength,ce,ie),ge=this.initPTS[n.cc];ne.push(p,V,J,P,n,t,F.totalduration,W,xe,ge)},y.onAudioTrackSwitching=function(r,a){var n=this.altAudio,t=!!a.url,p=a.id;if(!t){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var _=this.fragCurrent;_&&(this.log("Switching to main audio track, cancel main fragment load"),_.abortRequests()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var f=this.hls;n&&f.trigger(D.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),f.trigger(D.Events.AUDIO_TRACK_SWITCHED,{id:p})}},y.onAudioTrackSwitched=function(r,a){var n=a.id,t=!!this.hls.audioTracks[n].url;if(t){var p=this.videoBuffer;p&&this.mediaBuffer!==p&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=p)}this.altAudio=t,this.tick()},y.onBufferCreated=function(r,a){var n=a.tracks,t,p,_=!1;for(var f in n){var F=n[f];if(F.id==="main"){if(p=f,t=F,f==="video"){var P=n[f];P&&(this.videoBuffer=P.buffer)}}else _=!0}_&&t?(this.log("Alternate track found, use "+p+".buffered to schedule main fragment loading"),this.mediaBuffer=t.buffer):this.mediaBuffer=this.media},y.onFragBuffered=function(r,a){var n=a.frag,t=a.part;if(n&&n.type!==l.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(n)){this.warn("Fragment "+n.sn+(t?" p: "+t.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state),this.state===e.State.PARSED&&(this.state=e.State.IDLE);return}var p=t?t.stats:n.stats;this.fragLastKbps=Math.round(8*p.total/(p.buffering.end-p.loading.first)),n.sn!=="initSegment"&&(this.fragPrevious=n),this.fragBufferedComplete(n,t)},y.onError=function(r,a){if(a.type===v.ErrorTypes.KEY_SYSTEM_ERROR){this.onFragmentOrKeyLoadError(l.PlaylistLevelType.MAIN,a);return}switch(a.details){case v.ErrorDetails.FRAG_LOAD_ERROR:case v.ErrorDetails.FRAG_LOAD_TIMEOUT:case v.ErrorDetails.FRAG_PARSING_ERROR:case v.ErrorDetails.KEY_LOAD_ERROR:case v.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(l.PlaylistLevelType.MAIN,a);break;case v.ErrorDetails.LEVEL_LOAD_ERROR:case v.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==e.State.ERROR&&(a.fatal?(this.warn(""+a.details),this.state=e.State.ERROR):!a.levelRetry&&this.state===e.State.WAITING_LEVEL&&(this.state=e.State.IDLE));break;case v.ErrorDetails.BUFFER_FULL_ERROR:if(a.parent==="main"&&(this.state===e.State.PARSING||this.state===e.State.PARSED)){var n=!0,t=this.getFwdBufferInfo(this.media,l.PlaylistLevelType.MAIN);t&&t.len>.5&&(n=!this.reduceMaxBufferLength(t.len)),n&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},y.checkBuffer=function(){var r=this.media,a=this.gapController;if(!r||!a||!r.readyState)return;if(this.loadedmetadata||!N.BufferHelper.getBuffered(r).length){var n=this.state!==e.State.IDLE?this.fragCurrent:null;a.poll(this.lastCurrentTime,n)}this.lastCurrentTime=r.currentTime},y.onFragLoadEmergencyAborted=function(){this.state=e.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},y.onBufferFlushed=function(r,a){var n=a.type;if(n!==s.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var t=(n===s.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(t,n,l.PlaylistLevelType.MAIN)}},y.onLevelsUpdated=function(r,a){this.levels=a.levels},y.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},y.seekToStartPos=function(){var r=this.media;if(!r)return;var a=r.currentTime,n=this.startPosition;if(n>=0&&a<n){if(r.seeking){this.log("could not seek to "+n+", already seeking at "+a);return}var t=N.BufferHelper.getBuffered(r),p=t.length?t.start(0):0,_=p-n;_>0&&(_<this.config.maxBufferHole||_<this.config.maxFragLookUpTolerance)&&(this.log("adjusting start position by "+_+" to match buffer start"),n+=_,this.startPosition=n),this.log("seek to target start position "+n+" from current time "+a),r.currentTime=n}},y._getAudioCodec=function(r){var a=this.config.defaultAudioCodec||r.audioCodec;return this.audioCodecSwap&&a&&(this.log("Swapping audio codec"),a.indexOf("mp4a.40.5")!==-1?a="mp4a.40.2":a="mp4a.40.5"),a},y._loadBitrateTestFrag=function(r,a){var n=this;r.bitrateTest=!0,this._doFragLoad(r,a).then(function(t){var p=n.hls;if(!t||n.fragContextChanged(r))return;n.fragLoadError=0,n.state=e.State.IDLE,n.startFragRequested=!1,n.bitrateTest=!1;var _=r.stats;_.parsing.start=_.parsing.end=_.buffering.start=_.buffering.end=self.performance.now(),p.trigger(D.Events.FRAG_LOADED,t),r.bitrateTest=!1})},y._handleTransmuxComplete=function(r){var a,n="main",t=this.hls,p=r.remuxResult,_=r.chunkMeta,f=this.getCurrentContext(_);if(!f){this.warn("The loading context changed while buffering fragment "+_.sn+" of level "+_.level+". This chunk will not be buffered."),this.resetStartWhenNotLoaded(_.level);return}var F=f.frag,P=f.part,W=f.level,V=p.video,J=p.text,ne=p.id3,ce=p.initSegment,ie=W.details,xe=this.altAudio?void 0:p.audio;if(this.fragContextChanged(F))return;if(this.state=e.State.PARSING,ce){ce.tracks&&(this._bufferInitSegment(W,ce.tracks,F,_),t.trigger(D.Events.FRAG_PARSING_INIT_SEGMENT,{frag:F,id:n,tracks:ce.tracks}));var ge=ce.initPTS,de=ce.timescale;(0,H.isFiniteNumber)(ge)&&(this.initPTS[F.cc]=ge,t.trigger(D.Events.INIT_PTS_FOUND,{frag:F,id:n,initPTS:ge,timescale:de}))}if(V&&p.independent!==!1){if(ie){var Fe=V.startPTS,Qe=V.endPTS,Ve=V.startDTS,Ne=V.endDTS;if(P)P.elementaryStreams[V.type]={startPTS:Fe,endPTS:Qe,startDTS:Ve,endDTS:Ne};else if(V.firstKeyFrame&&V.independent&&_.id===1&&(this.couldBacktrack=!0),V.dropped&&V.independent){var Ue=this.getMainFwdBufferInfo(),q=(Ue?Ue.end:this.getLoadPosition())+this.config.maxBufferHole,k=V.firstKeyFramePTS?V.firstKeyFramePTS:Fe;if(q<k-this.config.maxBufferHole){this.backtrack(F);return}F.setElementaryStreamInfo(V.type,F.start,Qe,F.start,Ne,!0)}F.setElementaryStreamInfo(V.type,Fe,Qe,Ve,Ne),this.backtrackFragment&&(this.backtrackFragment=F),this.bufferFragmentData(V,F,P,_)}}else if(p.independent===!1){this.backtrack(F);return}if(xe){var z=xe.startPTS,X=xe.endPTS,re=xe.startDTS,te=xe.endDTS;P&&(P.elementaryStreams[s.ElementaryStreamTypes.AUDIO]={startPTS:z,endPTS:X,startDTS:re,endDTS:te}),F.setElementaryStreamInfo(s.ElementaryStreamTypes.AUDIO,z,X,re,te),this.bufferFragmentData(xe,F,P,_)}if(ie&&ne!==null&&ne!==void 0&&(a=ne.samples)!==null&&a!==void 0&&a.length){var ae={id:n,frag:F,details:ie,samples:ne.samples};t.trigger(D.Events.FRAG_PARSING_METADATA,ae)}if(ie&&J){var ye={id:n,frag:F,details:ie,samples:J.samples};t.trigger(D.Events.FRAG_PARSING_USERDATA,ye)}},y._bufferInitSegment=function(r,a,n,t){var p=this;if(this.state!==e.State.PARSING)return;this.audioOnly=!!a.audio&&!a.video,this.altAudio&&!this.audioOnly&&delete a.audio;var _=a.audio,f=a.video,F=a.audiovideo;if(_){var P=r.audioCodec,W=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(P&&(P.indexOf("mp4a.40.5")!==-1?P="mp4a.40.2":P="mp4a.40.5"),_.metadata.channelCount!==1&&W.indexOf("firefox")===-1&&(P="mp4a.40.5")),W.indexOf("android")!==-1&&_.container!=="audio/mpeg"&&(P="mp4a.40.2",this.log("Android: force audio codec to "+P)),r.audioCodec&&r.audioCodec!==P&&this.log('Swapping manifest audio codec "'+r.audioCodec+'" for "'+P+'"'),_.levelCodec=P,_.id="main",this.log("Init audio buffer, container:"+_.container+", codecs[selected/level/parsed]=["+(P||"")+"/"+(r.audioCodec||"")+"/"+_.codec+"]")}f&&(f.levelCodec=r.videoCodec,f.id="main",this.log("Init video buffer, container:"+f.container+", codecs[level/parsed]=["+(r.videoCodec||"")+"/"+f.codec+"]")),F&&this.log("Init audiovideo buffer, container:"+F.container+", codecs[level/parsed]=["+(r.attrs.CODECS||"")+"/"+F.codec+"]"),this.hls.trigger(D.Events.BUFFER_CODECS,a),Object.keys(a).forEach(function(V){var J=a[V],ne=J.initSegment;ne!=null&&ne.byteLength&&p.hls.trigger(D.Events.BUFFER_APPENDING,{type:V,data:ne,frag:n,part:null,chunkMeta:t,parent:n.type})}),this.tick()},y.getMainFwdBufferInfo=function(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,l.PlaylistLevelType.MAIN)},y.backtrack=function(r){this.couldBacktrack=!0,this.backtrackFragment=r,this.resetTransmuxer(),this.flushBufferGap(r),this.fragmentTracker.removeFragment(r),this.fragPrevious=null,this.nextLoadPosition=r.start,this.state=e.State.IDLE},y.checkFragmentChanged=function(){var r=this.media,a=null;if(r&&r.readyState>1&&r.seeking===!1){var n=r.currentTime;if(N.BufferHelper.isBuffered(r,n)?a=this.getAppendedFrag(n):N.BufferHelper.isBuffered(r,n+.1)&&(a=this.getAppendedFrag(n+.1)),a){this.backtrackFragment=null;var t=this.fragPlaying,p=a.level;(!t||a.sn!==t.sn||t.level!==p||a.urlId!==t.urlId)&&(this.fragPlaying=a,this.hls.trigger(D.Events.FRAG_CHANGED,{frag:a}),(!t||t.level!==p)&&this.hls.trigger(D.Events.LEVEL_SWITCHED,{level:p}))}}},m(w,[{key:"nextLevel",get:function(){var r=this.nextBufferedFrag;return r?r.level:-1}},{key:"currentFrag",get:function(){var r=this.media;return r?this.fragPlaying||this.getAppendedFrag(r.currentTime):null}},{key:"currentProgramDateTime",get:function(){var r=this.media;if(r){var a=r.currentTime,n=this.currentFrag;if(n&&(0,H.isFiniteNumber)(a)&&(0,H.isFiniteNumber)(n.programDateTime)){var t=n.programDateTime+(a-n.start)*1e3;return new Date(t)}}return null}},{key:"currentLevel",get:function(){var r=this.currentFrag;return r?r.level:-1}},{key:"nextBufferedFrag",get:function(){var r=this.currentFrag;return r?this.followingBufferedFrag(r):null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),w}(e.default)},"./src/controller/subtitle-stream-controller.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{SubtitleStreamController:()=>A});var H=O("./src/events.ts"),e=O("./src/utils/buffer-helper.ts"),M=O("./src/controller/fragment-finders.ts"),D=O("./src/utils/discontinuities.ts"),N=O("./src/controller/level-helper.ts"),c=O("./src/controller/fragment-tracker.ts"),l=O("./src/controller/base-stream-controller.ts"),s=O("./src/types/loader.ts"),h=O("./src/types/level.ts");function x(R,i){for(var T=0;T<i.length;T++){var w=i[T];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(R,v(w.key),w)}}function E(R,i,T){return i&&x(R.prototype,i),T&&x(R,T),Object.defineProperty(R,"prototype",{writable:!1}),R}function v(R){var i=d(R,"string");return typeof i=="symbol"?i:String(i)}function d(R,i){if(typeof R!="object"||R===null)return R;var T=R[Symbol.toPrimitive];if(T!==void 0){var w=T.call(R,i||"default");if(typeof w!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(R)}function m(R,i){R.prototype=Object.create(i.prototype),R.prototype.constructor=R,g(R,i)}function g(R,i){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(w,y){return w.__proto__=y,w},g(R,i)}var S=500,A=function(R){m(i,R);function i(w,y,o){var r;return r=R.call(this,w,y,o,"[subtitle-stream-controller]")||this,r.levels=[],r.currentTrackId=-1,r.tracksBuffered=[],r.mainDetails=null,r._registerListeners(),r}var T=i.prototype;return T.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},T._registerListeners=function(){var y=this.hls;y.on(H.Events.MEDIA_ATTACHED,this.onMediaAttached,this),y.on(H.Events.MEDIA_DETACHING,this.onMediaDetaching,this),y.on(H.Events.MANIFEST_LOADING,this.onManifestLoading,this),y.on(H.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.on(H.Events.ERROR,this.onError,this),y.on(H.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),y.on(H.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),y.on(H.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),y.on(H.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),y.on(H.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),y.on(H.Events.FRAG_BUFFERED,this.onFragBuffered,this)},T._unregisterListeners=function(){var y=this.hls;y.off(H.Events.MEDIA_ATTACHED,this.onMediaAttached,this),y.off(H.Events.MEDIA_DETACHING,this.onMediaDetaching,this),y.off(H.Events.MANIFEST_LOADING,this.onManifestLoading,this),y.off(H.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.off(H.Events.ERROR,this.onError,this),y.off(H.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),y.off(H.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),y.off(H.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),y.off(H.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),y.off(H.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),y.off(H.Events.FRAG_BUFFERED,this.onFragBuffered,this)},T.startLoad=function(y){this.stopLoad(),this.state=l.State.IDLE,this.setInterval(S),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=y,this.tick()},T.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},T.onLevelLoaded=function(y,o){this.mainDetails=o.details},T.onSubtitleFragProcessed=function(y,o){var r=o.frag,a=o.success;if(this.fragPrevious=r,this.state=l.State.IDLE,!a)return;var n=this.tracksBuffered[this.currentTrackId];if(!n)return;for(var t,p=r.start,_=0;_<n.length;_++)if(p>=n[_].start&&p<=n[_].end){t=n[_];break}var f=r.start+r.duration;t?t.end=f:(t={start:p,end:f},n.push(t)),this.fragmentTracker.fragBuffered(r)},T.onBufferFlushing=function(y,o){var r=o.startOffset,a=o.endOffset;if(r===0&&a!==Number.POSITIVE_INFINITY){var n=this.currentTrackId,t=this.levels;if(!t.length||!t[n]||!t[n].details)return;var p=t[n].details,_=p.targetduration,f=a-_;if(f<=0)return;o.endOffsetSubtitles=Math.max(0,f),this.tracksBuffered.forEach(function(F){for(var P=0;P<F.length;){if(F[P].end<=f){F.shift();continue}else if(F[P].start<f)F[P].start=f;else break;P++}}),this.fragmentTracker.removeFragmentsInRange(r,f,s.PlaylistLevelType.SUBTITLE)}},T.onFragBuffered=function(y,o){if(!this.loadedmetadata&&o.frag.type===s.PlaylistLevelType.MAIN){var r;(r=this.media)!==null&&r!==void 0&&r.buffered.length&&(this.loadedmetadata=!0)}},T.onError=function(y,o){var r=o.frag;if(!r||r.type!==s.PlaylistLevelType.SUBTITLE)return;this.fragCurrent&&this.fragCurrent.abortRequests(),this.state=l.State.IDLE},T.onSubtitleTracksUpdated=function(y,o){var r=this,a=o.subtitleTracks;this.tracksBuffered=[],this.levels=a.map(function(n){return new h.Level(n)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(n){r.tracksBuffered[n.id]=[]}),this.mediaBuffer=null},T.onSubtitleTrackSwitch=function(y,o){if(this.currentTrackId=o.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var r=this.levels[this.currentTrackId];r!=null&&r.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,r&&this.setInterval(S)},T.onSubtitleTrackLoaded=function(y,o){var r,a=o.details,n=o.id,t=this.currentTrackId,p=this.levels;if(!p.length)return;var _=p[t];if(n>=p.length||n!==t||!_)return;this.mediaBuffer=this.mediaBufferTimeRanges;var f=0;if(a.live||(r=_.details)!==null&&r!==void 0&&r.live){var F=this.mainDetails;if(a.deltaUpdateFailed||!F)return;var P=F.fragments[0];_.details?(f=this.alignPlaylists(a,_.details),f===0&&P&&(f=P.start,(0,N.addSliding)(a,f))):a.hasProgramDateTime&&F.hasProgramDateTime?((0,D.alignMediaPlaylistByPDT)(a,F),f=a.fragments[0].start):P&&(f=P.start,(0,N.addSliding)(a,f))}if(_.details=a,this.levelLastLoaded=n,!this.startFragRequested&&(this.mainDetails||!a.live)&&this.setStartPosition(_.details,f),this.tick(),a.live&&!this.fragCurrent&&this.media&&this.state===l.State.IDLE){var W=(0,M.findFragmentByPTS)(null,a.fragments,this.media.currentTime,0);W||(this.warn("Subtitle playlist not aligned with playback"),_.details=void 0)}},T._handleFragmentLoadComplete=function(y){var o=this,r=y.frag,a=y.payload,n=r.decryptdata,t=this.hls;if(this.fragContextChanged(r))return;if(a&&a.byteLength>0&&n&&n.key&&n.iv&&n.method==="AES-128"){var p=performance.now();this.decrypter.decrypt(new Uint8Array(a),n.key.buffer,n.iv.buffer).then(function(_){var f=performance.now();t.trigger(H.Events.FRAG_DECRYPTED,{frag:r,payload:_,stats:{tstart:p,tdecrypt:f}})}).catch(function(_){o.warn(_.name+": "+_.message),o.state=l.State.IDLE})}},T.doTick=function(){if(!this.media){this.state=l.State.IDLE;return}if(this.state===l.State.IDLE){var y=this.currentTrackId,o=this.levels;if(!o.length||!o[y]||!o[y].details)return;var r=o[y].details,a=r.targetduration,n=this.config,t=this.getLoadPosition(),p=e.BufferHelper.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],t-a,n.maxBufferHole),_=p.end,f=p.len,F=this.getFwdBufferInfo(this.media,s.PlaylistLevelType.MAIN),P=this.getMaxBufferLength(F==null?void 0:F.len)+a;if(f>P)return;console.assert(r,"Subtitle track details are defined on idle subtitle stream controller tick");var W=r.fragments,V=W.length,J=r.edge,ne=null,ce=this.fragPrevious;if(_<J){var ie=n.maxFragLookUpTolerance;ne=(0,M.findFragmentByPTS)(ce,W,Math.max(W[0].start,_),ie),!ne&&ce&&ce.start<W[0].start&&(ne=W[0])}else ne=W[V-1];if(!ne)return;ne=this.mapToInitFragWhenRequired(ne),this.fragmentTracker.getState(ne)===c.FragmentState.NOT_LOADED&&this.loadFragment(ne,r,_)}},T.getMaxBufferLength=function(y){var o=R.prototype.getMaxBufferLength.call(this);return y?Math.max(o,y):o},T.loadFragment=function(y,o,r){this.fragCurrent=y,y.sn==="initSegment"?this._loadInitSegment(y,o):(this.startFragRequested=!0,R.prototype.loadFragment.call(this,y,o,r))},E(i,[{key:"mediaBufferTimeRanges",get:function(){return new u(this.tracksBuffered[this.currentTrackId]||[])}}]),i}(l.default),u=function(i){this.buffered=void 0;var T=function(y,o,r){if(o=o>>>0,o>r-1)throw new DOMException("Failed to execute '"+y+"' on 'TimeRanges': The index provided ("+o+") is greater than the maximum bound ("+r+")");return i[o][y]};this.buffered={get length(){return i.length},end:function(y){return T("end",y,i.length)},start:function(y){return T("start",y,i.length)}}}},"./src/controller/subtitle-track-controller.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>d});var H=O("./src/events.ts"),e=O("./src/utils/texttrack-utils.ts"),M=O("./src/controller/base-playlist-controller.ts"),D=O("./src/types/loader.ts");function N(m,g){for(var S=0;S<g.length;S++){var A=g[S];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(m,l(A.key),A)}}function c(m,g,S){return g&&N(m.prototype,g),S&&N(m,S),Object.defineProperty(m,"prototype",{writable:!1}),m}function l(m){var g=s(m,"string");return typeof g=="symbol"?g:String(g)}function s(m,g){if(typeof m!="object"||m===null)return m;var S=m[Symbol.toPrimitive];if(S!==void 0){var A=S.call(m,g||"default");if(typeof A!="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(m)}function h(m,g){m.prototype=Object.create(g.prototype),m.prototype.constructor=m,x(m,g)}function x(m,g){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(A,u){return A.__proto__=u,A},x(m,g)}var E=function(m){h(g,m);function g(A){var u;return u=m.call(this,A,"[subtitle-track-controller]")||this,u.media=null,u.tracks=[],u.groupId=null,u.tracksInGroup=[],u.trackId=-1,u.selectDefaultTrack=!0,u.queuedDefaultTrack=-1,u.trackChangeListener=function(){return u.onTextTracksChanged()},u.asyncPollTrackChange=function(){return u.pollTrackChange(0)},u.useTextTrackPolling=!1,u.subtitlePollingInterval=-1,u._subtitleDisplay=!0,u.registerListeners(),u}var S=g.prototype;return S.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,m.prototype.destroy.call(this)},S.registerListeners=function(){var u=this.hls;u.on(H.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.on(H.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.on(H.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.on(H.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.on(H.Events.LEVEL_LOADING,this.onLevelLoading,this),u.on(H.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),u.on(H.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),u.on(H.Events.ERROR,this.onError,this)},S.unregisterListeners=function(){var u=this.hls;u.off(H.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.off(H.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(H.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(H.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.off(H.Events.LEVEL_LOADING,this.onLevelLoading,this),u.off(H.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),u.off(H.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),u.off(H.Events.ERROR,this.onError,this)},S.onMediaAttached=function(u,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)},S.pollTrackChange=function(u){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,u)},S.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 u=v(this.media.textTracks);u.forEach(function(R){(0,e.clearCurrentCues)(R)}),this.subtitleTrack=-1,this.media=null},S.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},S.onManifestParsed=function(u,R){this.tracks=R.subtitleTracks},S.onSubtitleTrackLoaded=function(u,R){var i=R.id,T=R.details,w=this.trackId,y=this.tracksInGroup[w];if(!y){this.warn("Invalid subtitle track id "+i);return}var o=y.details;y.details=R.details,this.log("subtitle track "+i+" loaded ["+T.startSN+"-"+T.endSN+"]"),i===this.trackId&&(this.retryCount=0,this.playlistLoaded(i,R,o))},S.onLevelLoading=function(u,R){this.switchLevel(R.level)},S.onLevelSwitching=function(u,R){this.switchLevel(R.level)},S.switchLevel=function(u){var R=this.hls.levels[u];if(!(R!=null&&R.textGroupIds))return;var i=R.textGroupIds[R.urlId];if(this.groupId!==i){var T=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,w=this.tracks.filter(function(r){return!i||r.groupId===i});this.tracksInGroup=w;var y=this.findTrackId(T==null?void 0:T.name)||this.findTrackId();this.groupId=i;var o={subtitleTracks:w};this.log("Updating subtitle tracks, "+w.length+' track(s) found in "'+i+'" group-id'),this.hls.trigger(H.Events.SUBTITLE_TRACKS_UPDATED,o),y!==-1&&this.setSubtitleTrack(y,T)}},S.findTrackId=function(u){for(var R=this.tracksInGroup,i=0;i<R.length;i++){var T=R[i];if((!this.selectDefaultTrack||T.default)&&(!u||u===T.name))return T.id}return-1},S.onError=function(u,R){if(m.prototype.onError.call(this,u,R),R.fatal||!R.context)return;R.context.type===D.PlaylistContextType.SUBTITLE_TRACK&&R.context.id===this.trackId&&R.context.groupId===this.groupId&&this.retryLoadingOrFail(R)},S.loadPlaylist=function(u){m.prototype.loadPlaylist.call(this);var R=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(R)){var i=R.id,T=R.groupId,w=R.url;if(u)try{w=u.addDirectives(w)}catch(y){this.warn("Could not construct new URL with HLS Delivery Directives: "+y)}this.log("Loading subtitle playlist for id "+i),this.hls.trigger(H.Events.SUBTITLE_TRACK_LOADING,{url:w,id:i,groupId:T,deliveryDirectives:u||null})}},S.toggleTrackModes=function(u){var R=this,i=this.media,T=this.trackId;if(!i)return;var w=v(i.textTracks),y=w.filter(function(a){return a.groupId===R.groupId});if(u===-1)[].slice.call(w).forEach(function(a){a.mode="disabled"});else{var o=y[T];o&&(o.mode="disabled")}var r=y[u];r&&(r.mode=this.subtitleDisplay?"showing":"hidden")},S.setSubtitleTrack=function(u,R){var i,T=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=u;return}if(this.trackId!==u&&this.toggleTrackModes(u),this.trackId===u&&(u===-1||(i=T[u])!==null&&i!==void 0&&i.details)||u<-1||u>=T.length)return;this.clearTimer();var w=T[u];if(this.log("Switching to subtitle track "+u),this.trackId=u,w){var y=w.id,o=w.groupId,r=o===void 0?"":o,a=w.name,n=w.type,t=w.url;this.hls.trigger(H.Events.SUBTITLE_TRACK_SWITCH,{id:y,groupId:r,name:a,type:n,url:t});var p=this.switchParams(w.url,R==null?void 0:R.details);this.loadPlaylist(p)}else this.hls.trigger(H.Events.SUBTITLE_TRACK_SWITCH,{id:u})},S.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var u=-1,R=v(this.media.textTracks),i=0;i<R.length;i++)if(R[i].mode==="hidden")u=i;else if(R[i].mode==="showing"){u=i;break}this.subtitleTrack!==u&&(this.subtitleTrack=u)},c(g,[{key:"subtitleDisplay",get:function(){return this._subtitleDisplay},set:function(u){this._subtitleDisplay=u,this.trackId>-1&&this.toggleTrackModes(this.trackId)}},{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(u){this.selectDefaultTrack=!1;var R=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(u,R)}}]),g}(M.default);function v(m){for(var g=[],S=0;S<m.length;S++){var A=m[S];(A.kind==="subtitles"||A.kind==="captions")&&A.label&&g.push(m[S])}return g}const d=E},"./src/controller/timeline-controller.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{TimelineController:()=>E});var H=O("./src/polyfills/number.ts"),e=O("./src/events.ts"),M=O("./src/utils/cea-608-parser.ts"),D=O("./src/utils/output-filter.ts"),N=O("./src/utils/webvtt-parser.ts"),c=O("./src/utils/texttrack-utils.ts"),l=O("./src/utils/imsc1-ttml-parser.ts"),s=O("./src/utils/mp4-tools.ts"),h=O("./src/types/loader.ts"),x=O("./src/utils/logger.ts"),E=function(){function g(A){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=m(),this.captionsProperties=void 0,this.hls=A,this.config=A.config,this.Cues=A.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 u=new D.default(this,"textTrack1"),R=new D.default(this,"textTrack2"),i=new D.default(this,"textTrack3"),T=new D.default(this,"textTrack4");this.cea608Parser1=new M.default(1,u,R),this.cea608Parser2=new M.default(3,i,T)}A.on(e.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),A.on(e.Events.MEDIA_DETACHING,this.onMediaDetaching,this),A.on(e.Events.MANIFEST_LOADING,this.onManifestLoading,this),A.on(e.Events.MANIFEST_LOADED,this.onManifestLoaded,this),A.on(e.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),A.on(e.Events.FRAG_LOADING,this.onFragLoading,this),A.on(e.Events.FRAG_LOADED,this.onFragLoaded,this),A.on(e.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),A.on(e.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),A.on(e.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),A.on(e.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),A.on(e.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var S=g.prototype;return S.destroy=function(){var u=this.hls;u.off(e.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.off(e.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(e.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(e.Events.MANIFEST_LOADED,this.onManifestLoaded,this),u.off(e.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),u.off(e.Events.FRAG_LOADING,this.onFragLoading,this),u.off(e.Events.FRAG_LOADED,this.onFragLoaded,this),u.off(e.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),u.off(e.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),u.off(e.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),u.off(e.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),u.off(e.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},S.addCues=function(u,R,i,T,w){for(var y=!1,o=w.length;o--;){var r=w[o],a=d(r[0],r[1],R,i);if(a>=0&&(r[0]=Math.min(r[0],R),r[1]=Math.max(r[1],i),y=!0,a/(i-R)>.5))return}if(y||w.push([R,i]),this.config.renderTextTracksNatively){var n=this.captionsTracks[u];this.Cues.newCue(n,R,i,T)}else{var t=this.Cues.newCue(null,R,i,T);this.hls.trigger(e.Events.CUES_PARSED,{type:"captions",cues:t,track:u})}},S.onInitPtsFound=function(u,R){var i=this,T=R.frag,w=R.id,y=R.initPTS,o=R.timescale,r=this.unparsedVttFrags;w==="main"&&(this.initPTS[T.cc]=y,this.timescale[T.cc]=o),r.length&&(this.unparsedVttFrags=[],r.forEach(function(a){i.onFragLoaded(e.Events.FRAG_LOADED,a)}))},S.getExistingTrack=function(u){var R=this.media;if(R)for(var i=0;i<R.textTracks.length;i++){var T=R.textTracks[i];if(T[u])return T}return null},S.createCaptionsTrack=function(u){this.config.renderTextTracksNatively?this.createNativeTrack(u):this.createNonNativeTrack(u)},S.createNativeTrack=function(u){if(this.captionsTracks[u])return;var R=this.captionsProperties,i=this.captionsTracks,T=this.media,w=R[u],y=w.label,o=w.languageCode,r=this.getExistingTrack(u);if(r)i[u]=r,(0,c.clearCurrentCues)(i[u]),(0,c.sendAddTrackEvent)(i[u],T);else{var a=this.createTextTrack("captions",y,o);a&&(a[u]=!0,i[u]=a)}},S.createNonNativeTrack=function(u){if(this.nonNativeCaptionsTracks[u])return;var R=this.captionsProperties[u];if(!R)return;var i=R.label,T={_id:u,label:i,kind:"captions",default:R.media?!!R.media.default:!1,closedCaptions:R.media};this.nonNativeCaptionsTracks[u]=T,this.hls.trigger(e.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[T]})},S.createTextTrack=function(u,R,i){var T=this.media;return T?T.addTextTrack(u,R,i):void 0},S.onMediaAttaching=function(u,R){this.media=R.media,this._cleanTracks()},S.onMediaDetaching=function(){var u=this.captionsTracks;Object.keys(u).forEach(function(R){(0,c.clearCurrentCues)(u[R]),delete u[R]}),this.nonNativeCaptionsTracks={}},S.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=m(),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())},S._cleanTracks=function(){var u=this.media;if(!u)return;var R=u.textTracks;if(R)for(var i=0;i<R.length;i++)(0,c.clearCurrentCues)(R[i])},S.onSubtitleTracksUpdated=function(u,R){var i=this;this.textTracks=[];var T=R.subtitleTracks||[],w=T.some(function(a){return a.textCodec===l.IMSC1_CODEC});if(this.config.enableWebVTT||w&&this.config.enableIMSC1){var y=this.tracks&&T&&this.tracks.length===T.length;if(this.tracks=T||[],this.config.renderTextTracksNatively){var o=this.media?this.media.textTracks:[];this.tracks.forEach(function(a,n){var t;if(n<o.length){for(var p=null,_=0;_<o.length;_++)if(v(o[_],a)){p=o[_];break}p&&(t=p)}if(t)(0,c.clearCurrentCues)(t);else{var f=i._captionsOrSubtitlesFromCharacteristics(a);t=i.createTextTrack(f,a.name,a.lang),t&&(t.mode="disabled")}t&&(t.groupId=a.groupId,i.textTracks.push(t))})}else if(!y&&this.tracks&&this.tracks.length){var r=this.tracks.map(function(a){return{label:a.name,kind:a.type.toLowerCase(),default:a.default,subtitleTrack:a}});this.hls.trigger(e.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:r})}}},S._captionsOrSubtitlesFromCharacteristics=function(u){var R;if((R=u.attrs)!==null&&R!==void 0&&R.CHARACTERISTICS){var i=/transcribes-spoken-dialog/gi.test(u.attrs.CHARACTERISTICS),T=/describes-music-and-sound/gi.test(u.attrs.CHARACTERISTICS);if(i&&T)return"captions"}return"subtitles"},S.onManifestLoaded=function(u,R){var i=this;this.config.enableCEA708Captions&&R.captions&&R.captions.forEach(function(T){var w=/(?:CC|SERVICE)([1-4])/.exec(T.instreamId);if(!w)return;var y="textTrack"+w[1],o=i.captionsProperties[y];if(!o)return;o.label=T.name,T.lang&&(o.languageCode=T.lang),o.media=T})},S.closedCaptionsForLevel=function(u){var R=this.hls.levels[u.level];return R==null?void 0:R.attrs["CLOSED-CAPTIONS"]},S.onFragLoading=function(u,R){var i=this.cea608Parser1,T=this.cea608Parser2,w=this.lastSn,y=this.lastPartIndex;if(!this.enabled||!(i&&T))return;if(R.frag.type===h.PlaylistLevelType.MAIN){var o,r,a=R.frag.sn,n=(o=R==null||((r=R.part)===null||r===void 0)?void 0:r.index)!=null?o:-1;a===w+1||a===w&&n===y+1||(i.reset(),T.reset()),this.lastSn=a,this.lastPartIndex=n}},S.onFragLoaded=function(u,R){var i=R.frag,T=R.payload,w=this.initPTS,y=this.unparsedVttFrags;if(i.type===h.PlaylistLevelType.SUBTITLE)if(T.byteLength){if(!(0,H.isFiniteNumber)(w[i.cc])){y.push(R),w.length&&this.hls.trigger(e.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:new Error("Missing initial subtitle PTS")});return}var o=i.decryptdata,r="stats"in R;if(o==null||!o.encrypted||r){var a=this.tracks[i.level],n=this.vttCCs;n[i.cc]||(n[i.cc]={start:i.start,prevCC:this.prevCC,new:!0},this.prevCC=i.cc),a&&a.textCodec===l.IMSC1_CODEC?this._parseIMSC1(i,T):this._parseVTTs(i,T,n)}}else this.hls.trigger(e.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:new Error("Empty subtitle payload")})},S._parseIMSC1=function(u,R){var i=this,T=this.hls;(0,l.parseIMSC1)(R,this.initPTS[u.cc],this.timescale[u.cc],function(w){i._appendCues(w,u.level),T.trigger(e.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:u})},function(w){x.logger.log("Failed to parse IMSC1: "+w),T.trigger(e.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:u,error:w})})},S._parseVTTs=function(u,R,i){var T,w=this,y=this.hls,o=(T=u.initSegment)!==null&&T!==void 0&&T.data?(0,s.appendUint8Array)(u.initSegment.data,new Uint8Array(R)):R;(0,N.parseWebVTT)(o,this.initPTS[u.cc],this.timescale[u.cc],i,u.cc,u.start,function(r){w._appendCues(r,u.level),y.trigger(e.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:u})},function(r){w._fallbackToIMSC1(u,R),x.logger.log("Failed to parse VTT cue: "+r),y.trigger(e.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:u,error:r})})},S._fallbackToIMSC1=function(u,R){var i=this,T=this.tracks[u.level];T.textCodec||(0,l.parseIMSC1)(R,this.initPTS[u.cc],this.timescale[u.cc],function(){T.textCodec=l.IMSC1_CODEC,i._parseIMSC1(u,R)},function(){T.textCodec="wvtt"})},S._appendCues=function(u,R){var i=this.hls;if(this.config.renderTextTracksNatively){var T=this.textTracks[R];if(!T||T.mode==="disabled")return;u.forEach(function(o){return(0,c.addCueToTrack)(T,o)})}else{var w=this.tracks[R];if(!w)return;var y=w.default?"default":"subtitles"+R;i.trigger(e.Events.CUES_PARSED,{type:"subtitles",cues:u,track:y})}},S.onFragDecrypted=function(u,R){var i=R.frag;if(i.type===h.PlaylistLevelType.SUBTITLE){if(!(0,H.isFiniteNumber)(this.initPTS[i.cc])){this.unparsedVttFrags.push(R);return}this.onFragLoaded(e.Events.FRAG_LOADED,R)}},S.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},S.onFragParsingUserdata=function(u,R){var i=this.cea608Parser1,T=this.cea608Parser2;if(!this.enabled||!(i&&T))return;var w=R.frag,y=R.samples;if(w.type===h.PlaylistLevelType.MAIN&&this.closedCaptionsForLevel(w)==="NONE")return;for(var o=0;o<y.length;o++){var r=y[o].bytes;if(r){var a=this.extractCea608Data(r);i.addData(y[o].pts,a[0]),T.addData(y[o].pts,a[1])}}},S.onBufferFlushing=function(u,R){var i=R.startOffset,T=R.endOffset,w=R.endOffsetSubtitles,y=R.type,o=this.media;if(!o||o.currentTime<T)return;if(!y||y==="video"){var r=this.captionsTracks;Object.keys(r).forEach(function(n){return(0,c.removeCuesInRange)(r[n],i,T)})}if(this.config.renderTextTracksNatively&&(i===0&&w!==void 0)){var a=this.textTracks;Object.keys(a).forEach(function(n){return(0,c.removeCuesInRange)(a[n],i,w)})}},S.extractCea608Data=function(u){for(var R=[[],[]],i=u[0]&31,T=2,w=0;w<i;w++){var y=u[T++],o=127&u[T++],r=127&u[T++];if(o===0&&r===0)continue;var a=(4&y)!==0;if(a){var n=3&y;(n===0||n===1)&&(R[n].push(o),R[n].push(r))}}return R},g}();function v(g,S){return g&&g.label===S.name&&!(g.textTrack1||g.textTrack2)}function d(g,S,A,u){return Math.min(S,u)-Math.max(g,A)}function m(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}},"./src/crypt/aes-crypto.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>H});var H=function(){function e(D,N){this.subtle=void 0,this.aesIV=void 0,this.subtle=D,this.aesIV=N}var M=e.prototype;return M.decrypt=function(N,c){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},c,N)},e}()},"./src/crypt/aes-decryptor.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>M,removePadding:()=>e});var H=O("./src/utils/typed-array.ts");function e(D){var N=D.byteLength,c=N&&new DataView(D.buffer).getUint8(N-1);return c?(0,H.sliceUint8)(D,0,N-c):D}var M=function(){function D(){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 N=D.prototype;return N.uint8ArrayToUint32Array_=function(l){for(var s=new DataView(l),h=new Uint32Array(4),x=0;x<4;x++)h[x]=s.getUint32(x*4);return h},N.initTable=function(){var l=this.sBox,s=this.invSBox,h=this.subMix,x=h[0],E=h[1],v=h[2],d=h[3],m=this.invSubMix,g=m[0],S=m[1],A=m[2],u=m[3],R=new Uint32Array(256),i=0,T=0,w=0;for(w=0;w<256;w++)w<128?R[w]=w<<1:R[w]=w<<1^283;for(w=0;w<256;w++){var y=T^T<<1^T<<2^T<<3^T<<4;y=y>>>8^y&255^99,l[i]=y,s[y]=i;var o=R[i],r=R[o],a=R[r],n=R[y]*257^y*16843008;x[i]=n<<24|n>>>8,E[i]=n<<16|n>>>16,v[i]=n<<8|n>>>24,d[i]=n,n=a*16843009^r*65537^o*257^i*16843008,g[y]=n<<24|n>>>8,S[y]=n<<16|n>>>16,A[y]=n<<8|n>>>24,u[y]=n,i?(i=o^R[R[R[a^o]]],T^=R[R[T]]):i=T=1}},N.expandKey=function(l){for(var s=this.uint8ArrayToUint32Array_(l),h=!0,x=0;x<s.length&&h;)h=s[x]===this.key[x],x++;if(h)return;this.key=s;var E=this.keySize=s.length;if(E!==4&&E!==6&&E!==8)throw new Error("Invalid aes key size="+E);var v=this.ksRows=(E+6+1)*4,d,m,g=this.keySchedule=new Uint32Array(v),S=this.invKeySchedule=new Uint32Array(v),A=this.sBox,u=this.rcon,R=this.invSubMix,i=R[0],T=R[1],w=R[2],y=R[3],o,r;for(d=0;d<v;d++){if(d<E){o=g[d]=s[d];continue}r=o,d%E===0?(r=r<<8|r>>>24,r=A[r>>>24]<<24|A[r>>>16&255]<<16|A[r>>>8&255]<<8|A[r&255],r^=u[d/E|0]<<24):E>6&&d%E===4&&(r=A[r>>>24]<<24|A[r>>>16&255]<<16|A[r>>>8&255]<<8|A[r&255]),g[d]=o=(g[d-E]^r)>>>0}for(m=0;m<v;m++)d=v-m,m&3?r=g[d]:r=g[d-4],m<4||d<=4?S[m]=r:S[m]=i[A[r>>>24]]^T[A[r>>>16&255]]^w[A[r>>>8&255]]^y[A[r&255]],S[m]=S[m]>>>0},N.networkToHostOrderSwap=function(l){return l<<24|(l&65280)<<8|(l&16711680)>>8|l>>>24},N.decrypt=function(l,s,h){for(var x=this.keySize+6,E=this.invKeySchedule,v=this.invSBox,d=this.invSubMix,m=d[0],g=d[1],S=d[2],A=d[3],u=this.uint8ArrayToUint32Array_(h),R=u[0],i=u[1],T=u[2],w=u[3],y=new Int32Array(l),o=new Int32Array(y.length),r,a,n,t,p,_,f,F,P,W,V,J,ne,ce,ie=this.networkToHostOrderSwap;s<y.length;){for(P=ie(y[s]),W=ie(y[s+1]),V=ie(y[s+2]),J=ie(y[s+3]),p=P^E[0],_=J^E[1],f=V^E[2],F=W^E[3],ne=4,ce=1;ce<x;ce++)r=m[p>>>24]^g[_>>16&255]^S[f>>8&255]^A[F&255]^E[ne],a=m[_>>>24]^g[f>>16&255]^S[F>>8&255]^A[p&255]^E[ne+1],n=m[f>>>24]^g[F>>16&255]^S[p>>8&255]^A[_&255]^E[ne+2],t=m[F>>>24]^g[p>>16&255]^S[_>>8&255]^A[f&255]^E[ne+3],p=r,_=a,f=n,F=t,ne=ne+4;r=v[p>>>24]<<24^v[_>>16&255]<<16^v[f>>8&255]<<8^v[F&255]^E[ne],a=v[_>>>24]<<24^v[f>>16&255]<<16^v[F>>8&255]<<8^v[p&255]^E[ne+1],n=v[f>>>24]<<24^v[F>>16&255]<<16^v[p>>8&255]<<8^v[_&255]^E[ne+2],t=v[F>>>24]<<24^v[p>>16&255]<<16^v[_>>8&255]<<8^v[f&255]^E[ne+3],o[s]=ie(r^R),o[s+1]=ie(t^i),o[s+2]=ie(n^T),o[s+3]=ie(a^w),R=P,i=W,T=V,w=J,s=s+4}return o.buffer},D}()},"./src/crypt/decrypter.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>s});var H=O("./src/crypt/aes-crypto.ts"),e=O("./src/crypt/fast-aes-key.ts"),M=O("./src/crypt/aes-decryptor.ts"),D=O("./src/utils/logger.ts"),N=O("./src/utils/mp4-tools.ts"),c=O("./src/utils/typed-array.ts"),l=16,s=function(){function h(E,v){var d=v===void 0?{}:v,m=d.removePKCS7Padding,g=m===void 0?!0:m;if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.useSoftware=E.enableSoftwareAES,this.removePKCS7Padding=g,g)try{var S=self.crypto;S&&(this.subtle=S.subtle||S.webkitSubtle)}catch(A){}this.subtle===null&&(this.useSoftware=!0)}var x=h.prototype;return x.destroy=function(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null},x.isSync=function(){return this.useSoftware},x.flush=function(){var v=this.currentResult,d=this.remainderData;if(!v||d)return this.reset(),null;var m=new Uint8Array(v);return this.reset(),this.removePKCS7Padding?(0,M.removePadding)(m):m},x.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},x.decrypt=function(v,d,m){var g=this;return this.useSoftware?new Promise(function(S,A){g.softwareDecrypt(new Uint8Array(v),d,m);var u=g.flush();u?S(u.buffer):A(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(v),d,m)},x.softwareDecrypt=function(v,d,m){var g=this.currentIV,S=this.currentResult,A=this.remainderData;this.logOnce("JS AES decrypt"),A&&(v=(0,N.appendUint8Array)(A,v),this.remainderData=null);var u=this.getValidChunk(v);if(!u.length)return null;g&&(m=g);var R=this.softwareDecrypter;R||(R=this.softwareDecrypter=new M.default),R.expandKey(d);var i=S;return this.currentResult=R.decrypt(u.buffer,0,m),this.currentIV=(0,c.sliceUint8)(u,-16).buffer,i||null},x.webCryptoDecrypt=function(v,d,m){var g=this,S=this.subtle;return(this.key!==d||!this.fastAesKey)&&(this.key=d,this.fastAesKey=new e.default(S,d)),this.fastAesKey.expandKey().then(function(A){if(!S)return Promise.reject(new Error("web crypto not initialized"));g.logOnce("WebCrypto AES decrypt");var u=new H.default(S,new Uint8Array(m));return u.decrypt(v.buffer,A)}).catch(function(A){return D.logger.warn("[decrypter]: WebCrypto Error, disable WebCrypto API, "+A.name+": "+A.message),g.onWebCryptoError(v,d,m)})},x.onWebCryptoError=function(v,d,m){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(v,d,m);var g=this.flush();if(g)return g.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")},x.getValidChunk=function(v){var d=v,m=v.length-v.length%l;return m!==v.length&&(d=(0,c.sliceUint8)(v,0,m),this.remainderData=(0,c.sliceUint8)(v,m)),d},x.logOnce=function(v){if(!this.logEnabled)return;D.logger.log("[decrypter]: "+v),this.logEnabled=!1},h}()},"./src/crypt/fast-aes-key.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>H});var H=function(){function e(D,N){this.subtle=void 0,this.key=void 0,this.subtle=D,this.key=N}var M=e.prototype;return M.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},e}()},"./src/demux/aacdemuxer.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>s});var H=O("./src/demux/base-audio-demuxer.ts"),e=O("./src/demux/adts.ts"),M=O("./src/utils/logger.ts"),D=O("./src/demux/id3.ts");function N(h,x){h.prototype=Object.create(x.prototype),h.prototype.constructor=h,c(h,x)}function c(h,x){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(v,d){return v.__proto__=d,v},c(h,x)}var l=function(h){N(x,h);function x(v,d){var m;return m=h.call(this)||this,m.observer=void 0,m.config=void 0,m.observer=v,m.config=d,m}var E=x.prototype;return E.resetInitSegment=function(d,m,g,S){h.prototype.resetInitSegment.call(this,d,m,g,S),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:m,duration:S,inputTimeScale:9e4,dropped:0}},x.probe=function(d){if(!d)return!1;for(var m=D.getID3Data(d,0)||[],g=m.length,S=d.length;g<S;g++)if(e.probe(d,g))return M.logger.log("ADTS sync word found !"),!0;return!1},E.canParse=function(d,m){return e.canParse(d,m)},E.appendFrame=function(d,m,g){e.initTrackConfig(d,this.observer,m,g,d.manifestCodec);var S=e.appendFrame(d,m,g,this.basePTS,this.frameIndex);if(S&&S.missing===0)return S},x}(H.default);const s=l},"./src/demux/adts.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{appendFrame:()=>g,canGetFrameLength:()=>s,canParse:()=>x,getAudioConfig:()=>D,getFrameDuration:()=>d,getFullFrameLength:()=>l,getHeaderLength:()=>c,initTrackConfig:()=>v,isHeader:()=>h,isHeaderPattern:()=>N,parseFrameHeader:()=>m,probe:()=>E});var H=O("./src/utils/logger.ts"),e=O("./src/errors.ts"),M=O("./src/events.ts");function D(S,A,u,R){var i,T,w,y,o=navigator.userAgent.toLowerCase(),r=R,a=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];i=((A[u+2]&192)>>>6)+1;var n=(A[u+2]&60)>>>2;if(n>a.length-1){S.trigger(M.Events.ERROR,{type:e.ErrorTypes.MEDIA_ERROR,details:e.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+n});return}return w=(A[u+2]&1)<<2,w|=(A[u+3]&192)>>>6,H.logger.log("manifest codec:"+R+", ADTS type:"+i+", samplingIndex:"+n),/firefox/i.test(o)?n>=6?(i=5,y=new Array(4),T=n-3):(i=2,y=new Array(2),T=n):o.indexOf("android")!==-1?(i=2,y=new Array(2),T=n):(i=5,y=new Array(4),R&&(R.indexOf("mp4a.40.29")!==-1||R.indexOf("mp4a.40.5")!==-1)||!R&&n>=6?T=n-3:((R&&R.indexOf("mp4a.40.2")!==-1&&(n>=6&&w===1||/vivaldi/i.test(o))||!R&&w===1)&&(i=2,y=new Array(2)),T=n)),y[0]=i<<3,y[0]|=(n&14)>>1,y[1]|=(n&1)<<7,y[1]|=w<<3,i===5&&(y[1]|=(T&14)>>1,y[2]=(T&1)<<7,y[2]|=2<<2,y[3]=0),{config:y,samplerate:a[n],channelCount:w,codec:"mp4a.40."+i,manifestCodec:r}}function N(S,A){return S[A]===255&&(S[A+1]&246)===240}function c(S,A){return S[A+1]&1?7:9}function l(S,A){return(S[A+3]&3)<<11|S[A+4]<<3|(S[A+5]&224)>>>5}function s(S,A){return A+5<S.length}function h(S,A){return A+1<S.length&&N(S,A)}function x(S,A){return s(S,A)&&N(S,A)&&l(S,A)<=S.length-A}function E(S,A){if(h(S,A)){var u=c(S,A);if(A+u>=S.length)return!1;var R=l(S,A);if(R<=u)return!1;var i=A+R;return i===S.length||h(S,i)}return!1}function v(S,A,u,R,i){if(!S.samplerate){var T=D(A,u,R,i);if(!T)return;S.config=T.config,S.samplerate=T.samplerate,S.channelCount=T.channelCount,S.codec=T.codec,S.manifestCodec=T.manifestCodec,H.logger.log("parsed codec:"+S.codec+", rate:"+T.samplerate+", channels:"+T.channelCount)}}function d(S){return 1024*9e4/S}function m(S,A){var u=c(S,A);if(A+u<=S.length){var R=l(S,A)-u;if(R>0)return{headerLength:u,frameLength:R}}}function g(S,A,u,R,i){var T=d(S.samplerate),w=R+i*T,y=m(A,u),o;if(y){var r=y.frameLength,a=y.headerLength,n=a+r,t=Math.max(0,u+n-A.length);t?(o=new Uint8Array(n-a),o.set(A.subarray(u+a,A.length),0)):o=A.subarray(u+a,u+n);var p={unit:o,pts:w};return t||S.samples.push(p),{sample:p,length:n,missing:t}}var _=A.length-u;o=new Uint8Array(_),o.set(A.subarray(u,A.length),0);var f={unit:o,pts:w};return{sample:f,length:_,missing:-1}}},"./src/demux/base-audio-demuxer.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>h,initPTSFn:()=>s});var H=O("./src/polyfills/number.ts"),e=O("./src/demux/id3.ts"),M=O("./src/types/demuxer.ts"),D=O("./src/demux/dummy-demuxed-track.ts"),N=O("./src/utils/mp4-tools.ts"),c=O("./src/utils/typed-array.ts"),l=function(){function x(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}var E=x.prototype;return E.resetInitSegment=function(d,m,g,S){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},E.resetTimeStamp=function(d){this.initPTS=d,this.resetContiguity()},E.resetContiguity=function(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0},E.canParse=function(d,m){return!1},E.appendFrame=function(d,m,g){},E.demux=function(d,m){this.cachedData&&(d=(0,N.appendUint8Array)(this.cachedData,d),this.cachedData=null);var g=e.getID3Data(d,0),S=g?g.length:0,A,u=this._audioTrack,R=this._id3Track,i=g?e.getTimeStamp(g):void 0,T=d.length;for((this.basePTS===null||this.frameIndex===0&&(0,H.isFiniteNumber)(i))&&(this.basePTS=s(i,m,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),g&&g.length>0&&R.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:g,type:M.MetadataSchema.audioId3,duration:Number.POSITIVE_INFINITY});S<T;){if(this.canParse(d,S)){var w=this.appendFrame(u,d,S);w?(this.frameIndex++,this.lastPTS=w.sample.pts,S+=w.length,A=S):S=T}else e.canParse(d,S)?(g=e.getID3Data(d,S),R.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:g,type:M.MetadataSchema.audioId3,duration:Number.POSITIVE_INFINITY}),S+=g.length,A=S):S++;if(S===T&&A!==T){var y=(0,c.sliceUint8)(d,A);this.cachedData?this.cachedData=(0,N.appendUint8Array)(this.cachedData,y):this.cachedData=y}}return{audioTrack:u,videoTrack:(0,D.dummyTrack)(),id3Track:R,textTrack:(0,D.dummyTrack)()}},E.demuxSampleAes=function(d,m,g){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},E.flush=function(d){var m=this.cachedData;return m&&(this.cachedData=null,this.demux(m,0)),{audioTrack:this._audioTrack,videoTrack:(0,D.dummyTrack)(),id3Track:this._id3Track,textTrack:(0,D.dummyTrack)()}},E.destroy=function(){},x}(),s=function(E,v,d){return(0,H.isFiniteNumber)(E)?E*90:v*9e4+(d||0)};const h=l},"./src/demux/chunk-cache.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>H});var H=function(){function M(){this.chunks=[],this.dataLength=0}var D=M.prototype;return D.push=function(c){this.chunks.push(c),this.dataLength+=c.length},D.flush=function(){var c=this.chunks,l=this.dataLength,s;if(c.length)c.length===1?s=c[0]:s=e(c,l);else return new Uint8Array(0);return this.reset(),s},D.reset=function(){this.chunks.length=0,this.dataLength=0},M}();function e(M,D){for(var N=new Uint8Array(D),c=0,l=0;l<M.length;l++){var s=M[l];N.set(s,c),c+=s.length}return N}},"./src/demux/dummy-demuxed-track.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{dummyTrack:()=>H});function H(e,M){return e===void 0&&(e=""),M===void 0&&(M=9e4),{type:e,id:-1,pid:-1,inputTimeScale:M,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>M});var H=O("./src/utils/logger.ts"),e=function(){function D(c){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=c,this.bytesAvailable=c.byteLength,this.word=0,this.bitsAvailable=0}var N=D.prototype;return N.loadWord=function(){var l=this.data,s=this.bytesAvailable,h=l.byteLength-s,x=new Uint8Array(4),E=Math.min(4,s);if(E===0)throw new Error("no bytes available");x.set(l.subarray(h,h+E)),this.word=new DataView(x.buffer).getUint32(0),this.bitsAvailable=E*8,this.bytesAvailable-=E},N.skipBits=function(l){var s;l=Math.min(l,this.bytesAvailable*8+this.bitsAvailable),this.bitsAvailable>l?(this.word<<=l,this.bitsAvailable-=l):(l-=this.bitsAvailable,s=l>>3,l-=s<<3,this.bytesAvailable-=s,this.loadWord(),this.word<<=l,this.bitsAvailable-=l)},N.readBits=function(l){var s=Math.min(this.bitsAvailable,l),h=this.word>>>32-s;if(l>32&&H.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=s,this.bitsAvailable>0)this.word<<=s;else if(this.bytesAvailable>0)this.loadWord();else throw new Error("no bits available");return s=l-s,s>0&&this.bitsAvailable?h<<s|this.readBits(s):h},N.skipLZ=function(){var l;for(l=0;l<this.bitsAvailable;++l)if((this.word&2147483648>>>l)!==0)return this.word<<=l,this.bitsAvailable-=l,l;return this.loadWord(),l+this.skipLZ()},N.skipUEG=function(){this.skipBits(1+this.skipLZ())},N.skipEG=function(){this.skipBits(1+this.skipLZ())},N.readUEG=function(){var l=this.skipLZ();return this.readBits(l+1)-1},N.readEG=function(){var l=this.readUEG();return 1&l?1+l>>>1:-1*(l>>>1)},N.readBoolean=function(){return this.readBits(1)===1},N.readUByte=function(){return this.readBits(8)},N.readUShort=function(){return this.readBits(16)},N.readUInt=function(){return this.readBits(32)},N.skipScalingList=function(l){for(var s=8,h=8,x,E=0;E<l;E++)h!==0&&(x=this.readEG(),h=(s+x+256)%256),s=h===0?s:h},N.readSPS=function(){var l=0,s=0,h=0,x=0,E,v,d,m=this.readUByte.bind(this),g=this.readBits.bind(this),S=this.readUEG.bind(this),A=this.readBoolean.bind(this),u=this.skipBits.bind(this),R=this.skipEG.bind(this),i=this.skipUEG.bind(this),T=this.skipScalingList.bind(this);m();var w=m();if(g(5),u(3),m(),i(),w===100||w===110||w===122||w===244||w===44||w===83||w===86||w===118||w===128){var y=S();if(y===3&&u(1),i(),i(),u(1),A())for(v=y!==3?8:12,d=0;d<v;d++)A()&&(d<6?T(16):T(64))}i();var o=S();if(o===0)S();else if(o===1)for(u(1),R(),R(),E=S(),d=0;d<E;d++)R();i(),u(1);var r=S(),a=S(),n=g(1);n===0&&u(1),u(1),A()&&(l=S(),s=S(),h=S(),x=S());var t=[1,1];if(A()&&A()){var p=m();switch(p){case 1:t=[1,1];break;case 2:t=[12,11];break;case 3:t=[10,11];break;case 4:t=[16,11];break;case 5:t=[40,33];break;case 6:t=[24,11];break;case 7:t=[20,11];break;case 8:t=[32,11];break;case 9:t=[80,33];break;case 10:t=[18,11];break;case 11:t=[15,11];break;case 12:t=[64,33];break;case 13:t=[160,99];break;case 14:t=[4,3];break;case 15:t=[3,2];break;case 16:t=[2,1];break;case 255:{t=[m()<<8|m(),m()<<8|m()];break}}}return{width:Math.ceil((r+1)*16-l*2-s*2),height:(2-n)*(a+1)*16-(n?2:4)*(h+x),pixelRatio:t}},N.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},D}();const M=e},"./src/demux/id3.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{canParse:()=>N,decodeFrame:()=>x,getID3Data:()=>M,getID3Frames:()=>h,getTimeStamp:()=>c,isFooter:()=>e,isHeader:()=>H,isTimeStampFrame:()=>l,testables:()=>S,utf8ArrayToStr:()=>g});var H=function(i,T){return T+10<=i.length&&(i[T]===73&&i[T+1]===68&&i[T+2]===51&&(i[T+3]<255&&i[T+4]<255&&(i[T+6]<128&&i[T+7]<128&&i[T+8]<128&&i[T+9]<128)))},e=function(i,T){return T+10<=i.length&&(i[T]===51&&i[T+1]===68&&i[T+2]===73&&(i[T+3]<255&&i[T+4]<255&&(i[T+6]<128&&i[T+7]<128&&i[T+8]<128&&i[T+9]<128)))},M=function(i,T){for(var w=T,y=0;H(i,T);){y+=10;var o=D(i,T+6);y+=o,e(i,T+10)&&(y+=10),T+=y}return y>0?i.subarray(w,w+y):void 0},D=function(i,T){var w=0;return w=(i[T]&127)<<21,w|=(i[T+1]&127)<<14,w|=(i[T+2]&127)<<7,w|=i[T+3]&127,w},N=function(i,T){return H(i,T)&&D(i,T+6)+10<=i.length-T},c=function(i){for(var T=h(i),w=0;w<T.length;w++){var y=T[w];if(l(y))return m(y)}return},l=function(i){return i&&i.key==="PRIV"&&i.info==="com.apple.streaming.transportStreamTimestamp"},s=function(i){var T=String.fromCharCode(i[0],i[1],i[2],i[3]),w=D(i,4),y=10;return{type:T,size:w,data:i.subarray(y,y+w)}},h=function(i){for(var T=0,w=[];H(i,T);){var y=D(i,T+6);T+=10;for(var o=T+y;T+8<o;){var r=s(i.subarray(T)),a=x(r);a&&w.push(a),T+=r.size+10}e(i,T)&&(T+=10)}return w},x=function(i){return i.type==="PRIV"?E(i):i.type[0]==="W"?d(i):v(i)},E=function(i){if(i.size<2)return;var T=g(i.data,!0),w=new Uint8Array(i.data.subarray(T.length+1));return{key:i.type,info:T,data:w.buffer}},v=function(i){if(i.size<2)return;if(i.type==="TXXX"){var T=1,w=g(i.data.subarray(T),!0);T+=w.length+1;var y=g(i.data.subarray(T));return{key:i.type,info:w,data:y}}var o=g(i.data.subarray(1));return{key:i.type,data:o}},d=function(i){if(i.type==="WXXX"){if(i.size<2)return;var T=1,w=g(i.data.subarray(T),!0);T+=w.length+1;var y=g(i.data.subarray(T));return{key:i.type,info:w,data:y}}var o=g(i.data);return{key:i.type,data:o}},m=function(i){if(i.data.byteLength===8){var T=new Uint8Array(i.data),w=T[3]&1,y=(T[4]<<23)+(T[5]<<15)+(T[6]<<7)+T[7];return y/=45,w&&(y+=4772185884e-2),Math.round(y)}return},g=function(i,T){T===void 0&&(T=!1);var w=u();if(w){var y=w.decode(i);if(T){var o=y.indexOf("\0");return o!==-1?y.substring(0,o):y}return y.replace(/\0/g,"")}for(var r=i.length,a,n,t,p="",_=0;_<r;){if(a=i[_++],a===0&&T)return p;if(a===0||a===3)continue;switch(a>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:p+=String.fromCharCode(a);break;case 12:case 13:n=i[_++],p+=String.fromCharCode((a&31)<<6|n&63);break;case 14:n=i[_++],t=i[_++],p+=String.fromCharCode((a&15)<<12|(n&63)<<6|(t&63)<<0);break;default:}}return p},S={decodeTextFrame:v},A;function u(){return!A&&typeof self.TextDecoder!="undefined"&&(A=new self.TextDecoder("utf-8")),A}},"./src/demux/mp3demuxer.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>s});var H=O("./src/demux/base-audio-demuxer.ts"),e=O("./src/demux/id3.ts"),M=O("./src/utils/logger.ts"),D=O("./src/demux/mpegaudio.ts");function N(h,x){h.prototype=Object.create(x.prototype),h.prototype.constructor=h,c(h,x)}function c(h,x){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(v,d){return v.__proto__=d,v},c(h,x)}var l=function(h){N(x,h);function x(){return h.apply(this,arguments)||this}var E=x.prototype;return E.resetInitSegment=function(d,m,g,S){h.prototype.resetInitSegment.call(this,d,m,g,S),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:m,duration:S,inputTimeScale:9e4,dropped:0}},x.probe=function(d){if(!d)return!1;for(var m=e.getID3Data(d,0)||[],g=m.length,S=d.length;g<S;g++)if(D.probe(d,g))return M.logger.log("MPEG Audio sync word found !"),!0;return!1},E.canParse=function(d,m){return D.canParse(d,m)},E.appendFrame=function(d,m,g){return this.basePTS===null?void 0:D.appendFrame(d,m,g,this.basePTS,this.frameIndex)},x}(H.default);const s=l},"./src/demux/mp4demuxer.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>l});var H=O("./src/polyfills/number.ts"),e=O("./src/types/demuxer.ts"),M=O("./src/utils/mp4-tools.ts"),D=O("./src/demux/dummy-demuxed-track.ts"),N=/\/emsg[-/]ID3/i,c=function(){function s(x,E){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=E}var h=s.prototype;return h.resetTimeStamp=function(){},h.resetInitSegment=function(E,v,d,m){var g=this.videoTrack=(0,D.dummyTrack)("video",1),S=this.audioTrack=(0,D.dummyTrack)("audio",1),A=this.txtTrack=(0,D.dummyTrack)("text",1);if(this.id3Track=(0,D.dummyTrack)("id3",1),this.timeOffset=0,!E||!E.byteLength)return;var u=(0,M.parseInitSegment)(E);if(u.video){var R=u.video,i=R.id,T=R.timescale,w=R.codec;g.id=i,g.timescale=A.timescale=T,g.codec=w}if(u.audio){var y=u.audio,o=y.id,r=y.timescale,a=y.codec;S.id=o,S.timescale=r,S.codec=a}A.id=M.RemuxerTrackIdConfig.text,g.sampleDuration=0,g.duration=S.duration=m},h.resetContiguity=function(){},s.probe=function(E){return E=E.length>16384?E.subarray(0,16384):E,(0,M.findBox)(E,["moof"]).length>0},h.demux=function(E,v){this.timeOffset=v;var d=E,m=this.videoTrack,g=this.txtTrack;if(this.config.progressive){this.remainderData&&(d=(0,M.appendUint8Array)(this.remainderData,E));var S=(0,M.segmentValidRange)(d);this.remainderData=S.remainder,m.samples=S.valid||new Uint8Array}else m.samples=d;var A=this.extractID3Track(m,v);return g.samples=(0,M.parseSamples)(v,m),{videoTrack:m,audioTrack:this.audioTrack,id3Track:A,textTrack:this.txtTrack}},h.flush=function(){var E=this.timeOffset,v=this.videoTrack,d=this.txtTrack;v.samples=this.remainderData||new Uint8Array,this.remainderData=null;var m=this.extractID3Track(v,this.timeOffset);return d.samples=(0,M.parseSamples)(E,v),{videoTrack:v,audioTrack:(0,D.dummyTrack)(),id3Track:m,textTrack:(0,D.dummyTrack)()}},h.extractID3Track=function(E,v){var d=this.id3Track;if(E.samples.length){var m=(0,M.findBox)(E.samples,["emsg"]);m&&m.forEach(function(g){var S=(0,M.parseEmsg)(g);if(N.test(S.schemeIdUri)){var A=(0,H.isFiniteNumber)(S.presentationTime)?S.presentationTime/S.timeScale:v+S.presentationTimeDelta/S.timeScale,u=S.eventDuration===4294967295?Number.POSITIVE_INFINITY:S.eventDuration/S.timeScale;u<=.001&&(u=Number.POSITIVE_INFINITY);var R=S.payload;d.samples.push({data:R,len:R.byteLength,dts:A,pts:A,type:e.MetadataSchema.emsg,duration:u})}})}return d},h.demuxSampleAes=function(E,v,d){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},h.destroy=function(){},s}();const l=c},"./src/demux/mpegaudio.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{appendFrame:()=>c,canParse:()=>x,isHeader:()=>h,isHeaderPattern:()=>s,parseHeader:()=>l,probe:()=>E});var H=null,e=[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],M=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],D=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],N=[0,1,1,4];function c(v,d,m,g,S){if(m+24>d.length)return;var A=l(d,m);if(A&&m+A.frameLength<=d.length){var u=A.samplesPerFrame*9e4/A.sampleRate,R=g+S*u,i={unit:d.subarray(m,m+A.frameLength),pts:R,dts:R};return v.config=[],v.channelCount=A.channelCount,v.samplerate=A.sampleRate,v.samples.push(i),{sample:i,length:A.frameLength,missing:0}}}function l(v,d){var m=v[d+1]>>3&3,g=v[d+1]>>1&3,S=v[d+2]>>4&15,A=v[d+2]>>2&3;if(m!==1&&S!==0&&S!==15&&A!==3){var u=v[d+2]>>1&1,R=v[d+3]>>6,i=m===3?3-g:g===3?3:4,T=e[i*14+S-1]*1e3,w=m===3?0:m===2?1:2,y=M[w*3+A],o=R===3?1:2,r=D[m][g],a=N[g],n=r*8*a,t=Math.floor(r*T/y+u)*a;if(H===null){var p=navigator.userAgent||"",_=p.match(/Chrome\/(\d+)/i);H=_?parseInt(_[1]):0}var f=!!H&&H<=87;return f&&g===2&&T>=224e3&&R===0&&(v[d+3]=v[d+3]|128),{sampleRate:y,channelCount:o,frameLength:t,samplesPerFrame:n}}}function s(v,d){return v[d]===255&&(v[d+1]&224)===224&&(v[d+1]&6)!==0}function h(v,d){return d+1<v.length&&s(v,d)}function x(v,d){var m=4;return s(v,d)&&m<=v.length-d}function E(v,d){if(d+1<v.length&&s(v,d)){var m=4,g=l(v,d),S=m;g!=null&&g.frameLength&&(S=g.frameLength);var A=d+S;return A===v.length||h(v,A)}return!1}},"./src/demux/sample-aes.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>D});var H=O("./src/crypt/decrypter.ts"),e=O("./src/utils/mp4-tools.ts"),M=function(){function N(l,s,h){this.keyData=void 0,this.decrypter=void 0,this.keyData=h,this.decrypter=new H.default(s,{removePKCS7Padding:!1})}var c=N.prototype;return c.decryptBuffer=function(s){return this.decrypter.decrypt(s,this.keyData.key.buffer,this.keyData.iv.buffer)},c.decryptAacSample=function(s,h,x){var E=this,v=s[h].unit;if(v.length<=16)return;var d=v.subarray(16,v.length-v.length%16),m=d.buffer.slice(d.byteOffset,d.byteOffset+d.length);this.decryptBuffer(m).then(function(g){var S=new Uint8Array(g);v.set(S,16),E.decrypter.isSync()||E.decryptAacSamples(s,h+1,x)})},c.decryptAacSamples=function(s,h,x){for(;;h++){if(h>=s.length){x();return}if(s[h].unit.length<32)continue;if(this.decryptAacSample(s,h,x),!this.decrypter.isSync())return}},c.getAvcEncryptedData=function(s){for(var h=Math.floor((s.length-48)/160)*16+16,x=new Int8Array(h),E=0,v=32;v<s.length-16;v+=160,E+=16)x.set(s.subarray(v,v+16),E);return x},c.getAvcDecryptedUnit=function(s,h){for(var x=new Uint8Array(h),E=0,v=32;v<s.length-16;v+=160,E+=16)s.set(x.subarray(E,E+16),v);return s},c.decryptAvcSample=function(s,h,x,E,v){var d=this,m=(0,e.discardEPB)(v.data),g=this.getAvcEncryptedData(m);this.decryptBuffer(g.buffer).then(function(S){v.data=d.getAvcDecryptedUnit(m,S),d.decrypter.isSync()||d.decryptAvcSamples(s,h,x+1,E)})},c.decryptAvcSamples=function(s,h,x,E){if(s instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;h++,x=0){if(h>=s.length){E();return}for(var v=s[h].units;!(x>=v.length);x++){var d=v[x];if(d.data.length<=48||d.type!==1&&d.type!==5)continue;if(this.decryptAvcSample(s,h,x,E,d),!this.decrypter.isSync())return}}},N}();const D=M},"./src/demux/transmuxer-interface.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>x});var H=O("./src/demux/webworkify-webpack.js"),e=O("./src/events.ts"),M=O("./src/demux/transmuxer.ts"),D=O("./src/utils/logger.ts"),N=O("./src/errors.ts"),c=O("./src/utils/mediasource-helper.ts"),l=O("./node_modules/eventemitter3/index.js"),s=O.n(l),h=(0,c.getMediaSource)()||{isTypeSupported:function(){return!1}},x=function(){function E(d,m,g,S){var A=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0;var u=d.config;this.hls=d,this.id=m,this.useWorker=!!u.enableWorker,this.onTransmuxComplete=g,this.onFlush=S;var R=function(o,r){r=r||{},r.frag=A.frag,r.id=A.id,A.hls.trigger(o,r)};this.observer=new l.EventEmitter,this.observer.on(e.Events.FRAG_DECRYPTED,R),this.observer.on(e.Events.ERROR,R);var i={mp4:h.isTypeSupported("video/mp4"),mpeg:h.isTypeSupported("audio/mpeg"),mp3:h.isTypeSupported('audio/mp4; codecs="mp3"')},T=navigator.vendor;if(this.useWorker&&typeof Worker!="undefined"){D.logger.log("demuxing in webworker");var w;try{w=this.worker=(0,H.default)("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),w.addEventListener("message",this.onwmsg),w.onerror=function(y){A.useWorker=!1,D.logger.warn("Exception in webworker, fallback to inline"),A.hls.trigger(e.Events.ERROR,{type:N.ErrorTypes.OTHER_ERROR,details:N.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:new Error(y.message+" ("+y.filename+":"+y.lineno+")")})},w.postMessage({cmd:"init",typeSupported:i,vendor:T,id:m,config:JSON.stringify(u)})}catch(y){D.logger.warn("Error in worker:",y),D.logger.error("Error while initializing DemuxerWorker, fallback to inline"),w&&self.URL.revokeObjectURL(w.objectURL),this.transmuxer=new M.default(this.observer,i,u,T,m),this.worker=null}}else this.transmuxer=new M.default(this.observer,i,u,T,m)}var v=E.prototype;return v.destroy=function(){var m=this.worker;if(m)m.removeEventListener("message",this.onwmsg),m.terminate(),this.worker=null,this.onwmsg=void 0;else{var g=this.transmuxer;g&&(g.destroy(),this.transmuxer=null)}var S=this.observer;S&&S.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null},v.push=function(m,g,S,A,u,R,i,T,w,y){var o,r,a=this;w.transmuxing.start=self.performance.now();var n=this.transmuxer,t=this.worker,p=R?R.start:u.start,_=u.decryptdata,f=this.frag,F=!(f&&u.cc===f.cc),P=!(f&&w.level===f.level),W=f?w.sn-f.sn:-1,V=this.part?w.part-this.part.index:-1,J=W===0&&w.id>1&&w.id===(f==null?void 0:f.stats.chunkCount),ne=!P&&(W===1||W===0&&(V===1||J&&V<=0)),ce=self.performance.now();(P||W||u.stats.parsing.start===0)&&(u.stats.parsing.start=ce),R&&(V||!ne)&&(R.stats.parsing.start=ce);var ie=!(f&&((o=u.initSegment)===null||o===void 0?void 0:o.url)===((r=f.initSegment)===null||r===void 0?void 0:r.url)),xe=new M.TransmuxState(F,ne,T,P,p,ie);if(!ne||F||ie){D.logger.log("[transmuxer-interface, "+u.type+"]: Starting new transmux session for sn: "+w.sn+" p: "+w.part+" level: "+w.level+" id: "+w.id+`
|
|
discontinuity: `+F+`
|
|
trackSwitch: `+P+`
|
|
contiguous: `+ne+`
|
|
accurateTimeOffset: `+T+`
|
|
timeOffset: `+p+`
|
|
initSegmentChange: `+ie);var ge=new M.TransmuxConfig(S,A,g,i,y);this.configureTransmuxer(ge)}if(this.frag=u,this.part=R,t)t.postMessage({cmd:"demux",data:m,decryptdata:_,chunkMeta:w,state:xe},m instanceof ArrayBuffer?[m]:[]);else if(n){var de=n.push(m,_,w,xe);(0,M.isPromise)(de)?(n.async=!0,de.then(function(Fe){a.handleTransmuxComplete(Fe)}).catch(function(Fe){a.transmuxerError(Fe,w,"transmuxer-interface push error")})):(n.async=!1,this.handleTransmuxComplete(de))}},v.flush=function(m){var g=this;m.transmuxing.start=self.performance.now();var S=this.transmuxer,A=this.worker;if(A)A.postMessage({cmd:"flush",chunkMeta:m});else if(S){var u=S.flush(m),R=(0,M.isPromise)(u);R||S.async?((0,M.isPromise)(u)||(u=Promise.resolve(u)),u.then(function(i){g.handleFlushResult(i,m)}).catch(function(i){g.transmuxerError(i,m,"transmuxer-interface flush error")})):this.handleFlushResult(u,m)}},v.transmuxerError=function(m,g,S){if(!this.hls)return;this.hls.trigger(e.Events.ERROR,{type:N.ErrorTypes.MEDIA_ERROR,details:N.ErrorDetails.FRAG_PARSING_ERROR,chunkMeta:g,fatal:!1,error:m,err:m,reason:S})},v.handleFlushResult=function(m,g){var S=this;m.forEach(function(A){S.handleTransmuxComplete(A)}),this.onFlush(g)},v.onWorkerMessage=function(m){var g=m.data,S=this.hls;switch(g.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(g.data);break}case"flush":{this.onFlush(g.data);break}case"workerLog":D.logger[g.data.logType]&&D.logger[g.data.logType](g.data.message);break;default:{g.data=g.data||{},g.data.frag=this.frag,g.data.id=this.id,S.trigger(g.event,g.data);break}}},v.configureTransmuxer=function(m){var g=this.worker,S=this.transmuxer;g?g.postMessage({cmd:"configure",config:m}):S&&S.configure(m)},v.handleTransmuxComplete=function(m){m.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(m)},E}()},"./src/demux/transmuxer-worker.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>l});var H=O("./src/demux/transmuxer.ts"),e=O("./src/events.ts"),M=O("./src/utils/logger.ts"),D=O("./node_modules/eventemitter3/index.js"),N=O.n(D),c=O("./src/errors.ts");function l(v){var d=new D.EventEmitter,m=function(A,u){v.postMessage({event:A,data:u})};d.on(e.Events.FRAG_DECRYPTED,m),d.on(e.Events.ERROR,m);var g=function(){var A=function(i){var T=function(y){m("workerLog",{logType:i,message:y})};M.logger[i]=T};for(var u in M.logger)A(u)};v.addEventListener("message",function(S){var A=S.data;switch(A.cmd){case"init":{var u=JSON.parse(A.config);v.transmuxer=new H.default(d,A.typeSupported,u,A.vendor,A.id),(0,M.enableLogs)(u.debug,A.id),g(),m("init",null);break}case"configure":{v.transmuxer.configure(A.config);break}case"demux":{var R=v.transmuxer.push(A.data,A.decryptdata,A.chunkMeta,A.state);(0,H.isPromise)(R)?(v.transmuxer.async=!0,R.then(function(y){s(v,y)}).catch(function(y){m(e.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.FRAG_PARSING_ERROR,chunkMeta:A.chunkMeta,fatal:!1,error:y,err:y,reason:"transmuxer-worker push error"})})):(v.transmuxer.async=!1,s(v,R));break}case"flush":{var i=A.chunkMeta,T=v.transmuxer.flush(i),w=(0,H.isPromise)(T);w||v.transmuxer.async?((0,H.isPromise)(T)||(T=Promise.resolve(T)),T.then(function(y){x(v,y,i)}).catch(function(y){m(e.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.FRAG_PARSING_ERROR,chunkMeta:A.chunkMeta,fatal:!1,error:y,err:y,reason:"transmuxer-worker flush error"})})):x(v,T,i);break}default:break}})}function s(v,d){if(E(d.remuxResult))return!1;var m=[],g=d.remuxResult,S=g.audio,A=g.video;return S&&h(m,S),A&&h(m,A),v.postMessage({event:"transmuxComplete",data:d},m),!0}function h(v,d){d.data1&&v.push(d.data1.buffer),d.data2&&v.push(d.data2.buffer)}function x(v,d,m){var g=d.reduce(function(S,A){return s(v,A)||S},!1);g||v.postMessage({event:"transmuxComplete",data:d[0]}),v.postMessage({event:"flush",data:m})}function E(v){return!v.audio&&!v.video&&!v.text&&!v.id3&&!v.initSegment}},"./src/demux/transmuxer.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{TransmuxConfig:()=>A,TransmuxState:()=>u,default:()=>d,isPromise:()=>S});var H=O("./src/events.ts"),e=O("./src/errors.ts"),M=O("./src/crypt/decrypter.ts"),D=O("./src/demux/aacdemuxer.ts"),N=O("./src/demux/mp4demuxer.ts"),c=O("./src/demux/tsdemuxer.ts"),l=O("./src/demux/mp3demuxer.ts"),s=O("./src/remux/mp4-remuxer.ts"),h=O("./src/remux/passthrough-remuxer.ts"),x=O("./src/utils/logger.ts"),E;try{E=self.performance.now.bind(self.performance)}catch(R){x.logger.debug("Unable to use Performance API on this environment"),E=self.Date.now}var v=[{demux:N.default,remux:h.default},{demux:c.default,remux:s.default},{demux:D.default,remux:s.default},{demux:l.default,remux:s.default}],d=function(){function R(T,w,y,o,r){this.async=!1,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=T,this.typeSupported=w,this.config=y,this.vendor=o,this.id=r}var i=R.prototype;return i.configure=function(w){this.transmuxConfig=w,this.decrypter&&this.decrypter.reset()},i.push=function(w,y,o,r){var a=this,n=o.transmuxing;n.executeStart=E();var t=new Uint8Array(w),p=this.currentTransmuxState,_=this.transmuxConfig;r&&(this.currentTransmuxState=r);var f=r||p,F=f.contiguous,P=f.discontinuity,W=f.trackSwitch,V=f.accurateTimeOffset,J=f.timeOffset,ne=f.initSegmentChange,ce=_.audioCodec,ie=_.videoCodec,xe=_.defaultInitPts,ge=_.duration,de=_.initSegmentData,Fe=m(t,y);if(Fe&&Fe.method==="AES-128"){var Qe=this.getDecrypter();if(Qe.isSync()){var Ve=Qe.softwareDecrypt(t,Fe.key.buffer,Fe.iv.buffer),Ne=o.part>-1;if(Ne&&(Ve=Qe.flush()),!Ve)return n.executeEnd=E(),g(o);t=new Uint8Array(Ve)}else return this.decryptionPromise=Qe.webCryptoDecrypt(t,Fe.key.buffer,Fe.iv.buffer).then(function(z){var X=a.push(z,null,o);return a.decryptionPromise=null,X}),this.decryptionPromise}var Ue=this.needsProbing(P,W);Ue&&this.configureTransmuxer(t),(P||W||ne||Ue)&&this.resetInitSegment(de,ce,ie,ge,y),(P||ne||Ue)&&this.resetInitialTimestamp(xe),F||this.resetContiguity();var q=this.transmux(t,Fe,J,V,o),k=this.currentTransmuxState;return k.contiguous=!0,k.discontinuity=!1,k.trackSwitch=!1,n.executeEnd=E(),q},i.flush=function(w){var y=this,o=w.transmuxing;o.executeStart=E();var r=this.decrypter,a=this.currentTransmuxState,n=this.decryptionPromise;if(n)return n.then(function(){return y.flush(w)});var t=[],p=a.timeOffset;if(r){var _=r.flush();_&&t.push(this.push(_,null,w))}var f=this.demuxer,F=this.remuxer;if(!f||!F)return this.observer.emit(H.Events.ERROR,H.Events.ERROR,{type:e.ErrorTypes.MEDIA_ERROR,details:e.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),o.executeEnd=E(),[g(w)];var P=f.flush(p);return S(P)?P.then(function(W){return y.flushRemux(t,W,w),t}):(this.flushRemux(t,P,w),t)},i.flushRemux=function(w,y,o){var r=y.audioTrack,a=y.videoTrack,n=y.id3Track,t=y.textTrack,p=this.currentTransmuxState,_=p.accurateTimeOffset,f=p.timeOffset;x.logger.log("[transmuxer.ts]: Flushed fragment "+o.sn+(o.part>-1?" p: "+o.part:"")+" of level "+o.level);var F=this.remuxer.remux(r,a,n,t,f,_,!0,this.id);w.push({remuxResult:F,chunkMeta:o}),o.transmuxing.executeEnd=E()},i.resetInitialTimestamp=function(w){var y=this.demuxer,o=this.remuxer;if(!y||!o)return;y.resetTimeStamp(w),o.resetTimeStamp(w)},i.resetContiguity=function(){var w=this.demuxer,y=this.remuxer;if(!w||!y)return;w.resetContiguity(),y.resetNextTimestamp()},i.resetInitSegment=function(w,y,o,r,a){var n=this.demuxer,t=this.remuxer;if(!n||!t)return;n.resetInitSegment(w,y,o,r),t.resetInitSegment(w,y,o,a)},i.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},i.transmux=function(w,y,o,r,a){var n;return y&&y.method==="SAMPLE-AES"?n=this.transmuxSampleAes(w,y,o,r,a):n=this.transmuxUnencrypted(w,o,r,a),n},i.transmuxUnencrypted=function(w,y,o,r){var a=this.demuxer.demux(w,y,!1,!this.config.progressive),n=a.audioTrack,t=a.videoTrack,p=a.id3Track,_=a.textTrack,f=this.remuxer.remux(n,t,p,_,y,o,!1,this.id);return{remuxResult:f,chunkMeta:r}},i.transmuxSampleAes=function(w,y,o,r,a){var n=this;return this.demuxer.demuxSampleAes(w,y,o).then(function(t){var p=n.remuxer.remux(t.audioTrack,t.videoTrack,t.id3Track,t.textTrack,o,r,!1,n.id);return{remuxResult:p,chunkMeta:a}})},i.configureTransmuxer=function(w){for(var y=this.config,o=this.observer,r=this.typeSupported,a=this.vendor,n,t=0,p=v.length;t<p;t++)if(v[t].demux.probe(w)){n=v[t];break}n||(x.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),n={demux:N.default,remux:h.default});var _=this.demuxer,f=this.remuxer,F=n.remux,P=n.demux;(!f||!(f instanceof F))&&(this.remuxer=new F(o,y,r,a)),(!_||!(_ instanceof P))&&(this.demuxer=new P(o,y,r),this.probe=P.probe)},i.needsProbing=function(w,y){return!this.demuxer||!this.remuxer||w||y},i.getDecrypter=function(){var w=this.decrypter;return w||(w=this.decrypter=new M.default(this.config)),w},R}();function m(R,i){var T=null;return R.byteLength>0&&i!=null&&i.key!=null&&i.iv!==null&&i.method!=null&&(T=i),T}var g=function(i){return{remuxResult:{},chunkMeta:i}};function S(R){return"then"in R&&R.then instanceof Function}var A=function(i,T,w,y,o){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=i,this.videoCodec=T,this.initSegmentData=w,this.duration=y,this.defaultInitPts=o},u=function(i,T,w,y,o,r){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=i,this.contiguous=T,this.accurateTimeOffset=w,this.trackSwitch=y,this.timeOffset=o,this.initSegmentChange=r}},"./src/demux/tsdemuxer.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>R});var H=O("./src/demux/adts.ts"),e=O("./src/demux/mpegaudio.ts"),M=O("./src/demux/exp-golomb.ts"),D=O("./src/demux/sample-aes.ts"),N=O("./src/events.ts"),c=O("./src/utils/mp4-tools.ts"),l=O("./src/utils/logger.ts"),s=O("./src/errors.ts"),h=O("./src/types/demuxer.ts");function x(){return x=Object.assign?Object.assign.bind():function(i){for(var T=1;T<arguments.length;T++){var w=arguments[T];for(var y in w)Object.prototype.hasOwnProperty.call(w,y)&&(i[y]=w[y])}return i},x.apply(this,arguments)}var E=188,v=function(){function i(w,y,o){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this._pmtId=-1,this._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=w,this.config=y,this.typeSupported=o}i.probe=function(y){var o=i.syncOffset(y);return o>0&&l.logger.warn("MPEG2-TS detected but first sync word found @ offset "+o),o!==-1},i.syncOffset=function(y){for(var o=y.length,r=Math.min(E*5,y.length-E)+1,a=0;a<r;){for(var n=!1,t=a;t<o&&y[t]===71;t+=E)if(!n&&m(y,t)===0&&(n=!0),n&&t+E>r)return a;a++}return-1},i.createTrack=function(y,o){return{container:y==="video"||y==="audio"?"video/mp2t":void 0,type:y,id:c.RemuxerTrackIdConfig[y],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:y==="audio"?o:void 0}};var T=i.prototype;return T.resetInitSegment=function(y,o,r,a){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=i.createTrack("video"),this._audioTrack=i.createTrack("audio",a),this._id3Track=i.createTrack("id3"),this._txtTrack=i.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.audioCodec=o,this.videoCodec=r,this._duration=a},T.resetTimeStamp=function(){},T.resetContiguity=function(){var y=this._audioTrack,o=this._avcTrack,r=this._id3Track;y&&(y.pesData=null),o&&(o.pesData=null),r&&(r.pesData=null),this.aacOverFlow=null,this.avcSample=null,this.remainderData=null},T.demux=function(y,o,r,a){r===void 0&&(r=!1),a===void 0&&(a=!1),r||(this.sampleAes=null);var n,t=this._avcTrack,p=this._audioTrack,_=this._id3Track,f=this._txtTrack,F=t.pid,P=t.pesData,W=p.pid,V=_.pid,J=p.pesData,ne=_.pesData,ce=null,ie=this.pmtParsed,xe=this._pmtId,ge=y.length;if(this.remainderData&&(y=(0,c.appendUint8Array)(this.remainderData,y),ge=y.length,this.remainderData=null),ge<E&&!a)return this.remainderData=y,{audioTrack:p,videoTrack:t,id3Track:_,textTrack:f};var de=Math.max(0,i.syncOffset(y));ge-=(ge-de)%E,ge<y.byteLength&&!a&&(this.remainderData=new Uint8Array(y.buffer,ge,y.buffer.byteLength-ge));for(var Fe=0,Qe=de;Qe<ge;Qe+=E)if(y[Qe]===71){var Ve=!!(y[Qe+1]&64),Ne=m(y,Qe),Ue=(y[Qe+3]&48)>>4,q=void 0;if(Ue>1){if(q=Qe+5+y[Qe+4],q===Qe+E)continue}else q=Qe+4;switch(Ne){case F:Ve&&(P&&(n=A(P))&&this.parseAVCPES(t,f,n,!1),P={data:[],size:0}),P&&(P.data.push(y.subarray(q,Qe+E)),P.size+=Qe+E-q);break;case W:if(Ve){if(J&&(n=A(J)))switch(p.segmentCodec){case"aac":this.parseAACPES(p,n);break;case"mp3":this.parseMPEGPES(p,n);break}J={data:[],size:0}}J&&(J.data.push(y.subarray(q,Qe+E)),J.size+=Qe+E-q);break;case V:Ve&&(ne&&(n=A(ne))&&this.parseID3PES(_,n),ne={data:[],size:0}),ne&&(ne.data.push(y.subarray(q,Qe+E)),ne.size+=Qe+E-q);break;case 0:Ve&&(q+=y[q]+1),xe=this._pmtId=g(y,q);break;case xe:{Ve&&(q+=y[q]+1);var k=S(y,q,this.typeSupported,r);F=k.avc,F>0&&(t.pid=F),W=k.audio,W>0&&(p.pid=W,p.segmentCodec=k.segmentCodec),V=k.id3,V>0&&(_.pid=V),ce!==null&&!ie&&(l.logger.warn("MPEG-TS PMT found at "+Qe+" after unknown PID '"+ce+"'. Backtracking to sync byte @"+de+" to parse all TS packets."),ce=null,Qe=de-188),ie=this.pmtParsed=!0;break}case 17:case 8191:break;default:ce=Ne;break}}else Fe++;Fe>0&&this.observer.emit(N.Events.ERROR,N.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"Found "+Fe+" TS packet/s that do not start with 0x47"}),t.pesData=P,p.pesData=J,_.pesData=ne;var z={audioTrack:p,videoTrack:t,id3Track:_,textTrack:f};return a&&this.extractRemainingSamples(z),z},T.flush=function(){var y=this.remainderData;this.remainderData=null;var o;return y?o=this.demux(y,-1,!1,!0):o={videoTrack:this._avcTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(o),this.sampleAes?this.decrypt(o,this.sampleAes):o},T.extractRemainingSamples=function(y){var o=y.audioTrack,r=y.videoTrack,a=y.id3Track,n=y.textTrack,t=r.pesData,p=o.pesData,_=a.pesData,f;if(t&&(f=A(t))?(this.parseAVCPES(r,n,f,!0),r.pesData=null):r.pesData=t,p&&(f=A(p))){switch(o.segmentCodec){case"aac":this.parseAACPES(o,f);break;case"mp3":this.parseMPEGPES(o,f);break}o.pesData=null}else p!=null&&p.size&&l.logger.log("last AAC PES packet truncated,might overlap between fragments"),o.pesData=p;_&&(f=A(_))?(this.parseID3PES(a,f),a.pesData=null):a.pesData=_},T.demuxSampleAes=function(y,o,r){var a=this.demux(y,r,!0,!this.config.progressive),n=this.sampleAes=new D.default(this.observer,this.config,o);return this.decrypt(a,n)},T.decrypt=function(y,o){return new Promise(function(r){var a=y.audioTrack,n=y.videoTrack;a.samples&&a.segmentCodec==="aac"?o.decryptAacSamples(a.samples,0,function(){n.samples?o.decryptAvcSamples(n.samples,0,0,function(){r(y)}):r(y)}):n.samples&&o.decryptAvcSamples(n.samples,0,0,function(){r(y)})})},T.destroy=function(){this._duration=0},T.parseAVCPES=function(y,o,r,a){var n=this,t=this.parseAVCNALu(y,r.data),p=!1,_=this.avcSample,f,F=!1;r.data=null,_&&t.length&&!y.audFound&&(u(_,y),_=this.avcSample=d(!1,r.pts,r.dts,"")),t.forEach(function(P){switch(P.type){case 1:{f=!0,_||(_=n.avcSample=d(!0,r.pts,r.dts,"")),p&&(_.debug+="NDR "),_.frame=!0;var W=P.data;if(F&&W.length>4){var V=new M.default(W).readSliceType();(V===2||V===4||V===7||V===9)&&(_.key=!0)}break}case 5:f=!0,_||(_=n.avcSample=d(!0,r.pts,r.dts,"")),p&&(_.debug+="IDR "),_.key=!0,_.frame=!0;break;case 6:{f=!0,p&&_&&(_.debug+="SEI "),(0,c.parseSEIMessageFromNALu)(P.data,1,r.pts,o.samples);break}case 7:if(f=!0,F=!0,p&&_&&(_.debug+="SPS "),!y.sps){var J=new M.default(P.data),ne=J.readSPS();y.width=ne.width,y.height=ne.height,y.pixelRatio=ne.pixelRatio,y.sps=[P.data],y.duration=n._duration;for(var ce=P.data.subarray(1,4),ie="avc1.",xe=0;xe<3;xe++){var ge=ce[xe].toString(16);ge.length<2&&(ge="0"+ge),ie+=ge}y.codec=ie}break;case 8:f=!0,p&&_&&(_.debug+="PPS "),y.pps||(y.pps=[P.data]);break;case 9:f=!1,y.audFound=!0,_&&u(_,y),_=n.avcSample=d(!1,r.pts,r.dts,p?"AUD ":"");break;case 12:f=!0;break;default:f=!1,_&&(_.debug+="unknown NAL "+P.type+" ");break}if(_&&f){var de=_.units;de.push(P)}}),a&&_&&(u(_,y),this.avcSample=null)},T.getLastNalUnit=function(y){var o,r=this.avcSample,a;if((!r||r.units.length===0)&&(r=y[y.length-1]),(o=r)!==null&&o!==void 0&&o.units){var n=r.units;a=n[n.length-1]}return a},T.parseAVCNALu=function(y,o){var r=o.byteLength,a=y.naluState||0,n=a,t=[],p=0,_,f,F,P=-1,W=0;for(a===-1&&(P=0,W=o[0]&31,a=0,p=1);p<r;){if(_=o[p++],!a){a=_?0:1;continue}if(a===1){a=_?0:2;continue}if(!_)a=3;else if(_===1){if(P>=0){var V={data:o.subarray(P,p-a-1),type:W};t.push(V)}else{var J=this.getLastNalUnit(y.samples);if(J&&(n&&p<=4-n&&(J.state&&(J.data=J.data.subarray(0,J.data.byteLength-n))),f=p-a-1,f>0)){var ne=new Uint8Array(J.data.byteLength+f);ne.set(J.data,0),ne.set(o.subarray(0,f),J.data.byteLength),J.data=ne,J.state=0}}p<r?(F=o[p]&31,P=p,W=F,a=0):a=-1}else a=0}if(P>=0&&a>=0){var ce={data:o.subarray(P,r),type:W,state:a};t.push(ce)}if(t.length===0){var ie=this.getLastNalUnit(y.samples);if(ie){var xe=new Uint8Array(ie.data.byteLength+o.byteLength);xe.set(ie.data,0),xe.set(o,ie.data.byteLength),ie.data=xe}}return y.naluState=a,t},T.parseAACPES=function(y,o){var r=0,a=this.aacOverFlow,n=o.data;if(a){this.aacOverFlow=null;var t=a.missing,p=a.sample.unit.byteLength;if(t===-1){var _=new Uint8Array(p+n.byteLength);_.set(a.sample.unit,0),_.set(n,p),n=_}else{var f=p-t;a.sample.unit.set(n.subarray(0,t),f),y.samples.push(a.sample),r=a.missing}}var F,P;for(F=r,P=n.length;F<P-1&&!H.isHeader(n,F);F++);if(F!==r){var W,V;if(F<P-1?(W="AAC PES did not start with ADTS header,offset:"+F,V=!1):(W="no ADTS header found in AAC PES",V=!0),l.logger.warn("parsing error:"+W),this.observer.emit(N.Events.ERROR,N.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.FRAG_PARSING_ERROR,fatal:V,reason:W}),V)return}H.initTrackConfig(y,this.observer,n,F,this.audioCodec);var J;if(o.pts!==void 0)J=o.pts;else if(a){var ne=H.getFrameDuration(y.samplerate);J=a.sample.pts+ne}else{l.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var ce=0,ie;F<P;)if(ie=H.appendFrame(y,n,F,J,ce),F+=ie.length,ie.missing){this.aacOverFlow=ie;break}else for(ce++;F<P-1&&!H.isHeader(n,F);F++);},T.parseMPEGPES=function(y,o){var r=o.data,a=r.length,n=0,t=0,p=o.pts;if(p===void 0){l.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;t<a;)if(e.isHeader(r,t)){var _=e.appendFrame(y,r,t,p,n);if(_)t+=_.length,n++;else break}else t++},T.parseID3PES=function(y,o){if(o.pts===void 0){l.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}var r=x({},o,{type:this._avcTrack?h.MetadataSchema.emsg:h.MetadataSchema.audioId3,duration:Number.POSITIVE_INFINITY});y.samples.push(r)},i}();function d(i,T,w,y){return{key:i,frame:!1,pts:T,dts:w,units:[],debug:y,length:0}}function m(i,T){return((i[T+1]&31)<<8)+i[T+2]}function g(i,T){return(i[T+10]&31)<<8|i[T+11]}function S(i,T,w,y){var o={audio:-1,avc:-1,id3:-1,segmentCodec:"aac"},r=(i[T+1]&15)<<8|i[T+2],a=T+3+r-4,n=(i[T+10]&15)<<8|i[T+11];for(T+=12+n;T<a;){var t=m(i,T);switch(i[T]){case 207:if(!y){l.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:o.audio===-1&&(o.audio=t);break;case 21:o.id3===-1&&(o.id3=t);break;case 219:if(!y){l.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:o.avc===-1&&(o.avc=t);break;case 3:case 4:w.mpeg!==!0&&w.mp3!==!0?l.logger.log("MPEG audio found, not supported in this browser"):o.audio===-1&&(o.audio=t,o.segmentCodec="mp3");break;case 36:l.logger.warn("Unsupported HEVC stream type found");break;default:break}T+=((i[T+3]&15)<<8|i[T+4])+5}return o}function A(i){var T=0,w,y,o,r,a,n=i.data;if(!i||i.size===0)return null;for(;n[0].length<19&&n.length>1;){var t=new Uint8Array(n[0].length+n[1].length);t.set(n[0]),t.set(n[1],n[0].length),n[0]=t,n.splice(1,1)}w=n[0];var p=(w[0]<<16)+(w[1]<<8)+w[2];if(p===1){if(y=(w[4]<<8)+w[5],y&&y>i.size-6)return null;var _=w[7];_&192&&(r=(w[9]&14)*536870912+(w[10]&255)*4194304+(w[11]&254)*16384+(w[12]&255)*128+(w[13]&254)/2,_&64?(a=(w[14]&14)*536870912+(w[15]&255)*4194304+(w[16]&254)*16384+(w[17]&255)*128+(w[18]&254)/2,r-a>60*9e4&&(l.logger.warn(Math.round((r-a)/9e4)+"s delta between PTS and DTS, align them"),r=a)):a=r),o=w[8];var f=o+9;if(i.size<=f)return null;i.size-=f;for(var F=new Uint8Array(i.size),P=0,W=n.length;P<W;P++){w=n[P];var V=w.byteLength;if(f)if(f>V){f-=V;continue}else w=w.subarray(f),V-=f,f=0;F.set(w,T),T+=V}return y&&(y-=o+3),{data:F,pts:r,dts:a,len:y}}return null}function u(i,T){if(i.units.length&&i.frame){if(i.pts===void 0){var w=T.samples,y=w.length;if(y){var o=w[y-1];i.pts=o.pts,i.dts=o.dts}else{T.dropped++;return}}T.samples.push(i)}i.debug.length&&l.logger.log(i.pts+"/"+i.dts+":"+i.debug)}const R=v},"./src/demux/webworkify-webpack.js":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>E});var H=function(){var d=ENTRY_MODULE,m={},g=function A(u){var R=m[u];if(R!==void 0)return R.exports;var i=m[u]={exports:{}};return d[u].call(i.exports,i,i.exports,A),i.exports};g.m=d,function(){g.n=function(A){var u=A&&A.__esModule?function(){return A.default}:function(){return A};return g.d(u,{a:u}),u}}(),function(){g.d=function(A,u){for(var R in u)g.o(u,R)&&!g.o(A,R)&&Object.defineProperty(A,R,{enumerable:!0,get:u[R]})}}(),function(){g.o=function(A,u){return Object.prototype.hasOwnProperty.call(A,u)}}(),function(){g.r=function(A){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})}}();var S=g(ENTRY_MODULE);return S.default||S},e=H.toString().split("ENTRY_MODULE"),M="[\\.|\\-|\\+|\\w|/|@]+",D="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+M+").*?\\)";function N(v){return(v+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function c(v){return!isNaN(1*v)}function l(v,d,m){var g={};g[m]=[];var S=d.toString().replace(/^"[^"]+"/,"function"),A=S.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/)||S.match(/^\(\w+,\s*\w+,\s*(\w+)\)\s?\=\s?\>/);if(!A)return g;for(var u=A[1],R=new RegExp("(\\\\n|\\W)"+N(u)+D,"g"),i;i=R.exec(S);){if(i[3]==="dll-reference")continue;g[m].push(i[3])}for(R=new RegExp("\\("+N(u)+'\\("(dll-reference\\s('+M+'))"\\)\\)'+D,"g");i=R.exec(S);)v[i[2]]||(g[m].push(i[1]),v[i[2]]=O(i[1]).m),g[i[2]]=g[i[2]]||[],g[i[2]].push(i[4]);for(var T=Object.keys(g),w=0;w<T.length;w++)for(var y=0;y<g[T[w]].length;y++)c(g[T[w]][y])&&(g[T[w]][y]=1*g[T[w]][y]);return g}function s(v){var d=Object.keys(v);return d.reduce(function(m,g){return m||v[g].length>0},!1)}function h(v,d){for(var m={main:[d]},g={main:[]},S={main:{}};s(m);)for(var A=Object.keys(m),u=0;u<A.length;u++){var R=A[u],i=m[R],T=i.pop();if(S[R]=S[R]||{},S[R][T]||!v[R][T])continue;S[R][T]=!0,g[R]=g[R]||[],g[R].push(T);for(var w=l(v,v[R][T],R),y=Object.keys(w),o=0;o<y.length;o++)m[y[o]]=m[y[o]]||[],m[y[o]]=m[y[o]].concat(w[y[o]])}return g}function x(v,d,m,g){var S=v[g].map(function(A){return'"'+A+'": '+d[g][A].toString().replace(/^"[^"]+"/,"function")}).join(",");return e[0]+"{"+S+"}"+e[1]+'"'+m+'"'+e[2]}function E(v,d){d=d||{};var m={main:O.m},g=d.all?{main:Object.keys(m.main)}:h(m,v),S="";Object.keys(g).filter(function(T){return T!=="main"}).forEach(function(T){for(var w=0;g[T][w];)w++;g[T].push(w),m[T][w]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",S=S+("var "+T+" = ("+x(g,m,w,modules)+`)();
|
|
`)}),S=S+("new (("+x(g,m,v,"main")+")())(self);");var A=new window.Blob([S],{type:"text/javascript"}),u=window.URL||window.webkitURL||window.mozURL||window.msURL,R=u.createObjectURL(A),i=new window.Worker(R);return i.objectURL=R,i}},"./src/errors.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{ErrorDetails:()=>e,ErrorTypes:()=>H});var H;(function(M){M.NETWORK_ERROR="networkError",M.MEDIA_ERROR="mediaError",M.KEY_SYSTEM_ERROR="keySystemError",M.MUX_ERROR="muxError",M.OTHER_ERROR="otherError"})(H||(H={}));var e;(function(M){M.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",M.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",M.KEY_SYSTEM_NO_SESSION="keySystemNoSession",M.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",M.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",M.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",M.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",M.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",M.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",M.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",M.MANIFEST_LOAD_ERROR="manifestLoadError",M.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",M.MANIFEST_PARSING_ERROR="manifestParsingError",M.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",M.LEVEL_EMPTY_ERROR="levelEmptyError",M.LEVEL_LOAD_ERROR="levelLoadError",M.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",M.LEVEL_SWITCH_ERROR="levelSwitchError",M.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",M.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",M.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",M.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",M.FRAG_LOAD_ERROR="fragLoadError",M.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",M.FRAG_DECRYPT_ERROR="fragDecryptError",M.FRAG_PARSING_ERROR="fragParsingError",M.REMUX_ALLOC_ERROR="remuxAllocError",M.KEY_LOAD_ERROR="keyLoadError",M.KEY_LOAD_TIMEOUT="keyLoadTimeOut",M.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",M.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",M.BUFFER_APPEND_ERROR="bufferAppendError",M.BUFFER_APPENDING_ERROR="bufferAppendingError",M.BUFFER_STALLED_ERROR="bufferStalledError",M.BUFFER_FULL_ERROR="bufferFullError",M.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",M.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",M.INTERNAL_EXCEPTION="internalException",M.INTERNAL_ABORTED="aborted",M.UNKNOWN="unknown"})(e||(e={}))},"./src/events.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{Events:()=>H});var H;(function(e){e.MEDIA_ATTACHING="hlsMediaAttaching",e.MEDIA_ATTACHED="hlsMediaAttached",e.MEDIA_DETACHING="hlsMediaDetaching",e.MEDIA_DETACHED="hlsMediaDetached",e.BUFFER_RESET="hlsBufferReset",e.BUFFER_CODECS="hlsBufferCodecs",e.BUFFER_CREATED="hlsBufferCreated",e.BUFFER_APPENDING="hlsBufferAppending",e.BUFFER_APPENDED="hlsBufferAppended",e.BUFFER_EOS="hlsBufferEos",e.BUFFER_FLUSHING="hlsBufferFlushing",e.BUFFER_FLUSHED="hlsBufferFlushed",e.MANIFEST_LOADING="hlsManifestLoading",e.MANIFEST_LOADED="hlsManifestLoaded",e.MANIFEST_PARSED="hlsManifestParsed",e.LEVEL_SWITCHING="hlsLevelSwitching",e.LEVEL_SWITCHED="hlsLevelSwitched",e.LEVEL_LOADING="hlsLevelLoading",e.LEVEL_LOADED="hlsLevelLoaded",e.LEVEL_UPDATED="hlsLevelUpdated",e.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",e.LEVELS_UPDATED="hlsLevelsUpdated",e.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",e.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",e.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",e.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",e.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",e.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",e.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",e.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",e.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",e.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",e.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",e.CUES_PARSED="hlsCuesParsed",e.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",e.INIT_PTS_FOUND="hlsInitPtsFound",e.FRAG_LOADING="hlsFragLoading",e.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",e.FRAG_LOADED="hlsFragLoaded",e.FRAG_DECRYPTED="hlsFragDecrypted",e.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",e.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",e.FRAG_PARSING_METADATA="hlsFragParsingMetadata",e.FRAG_PARSED="hlsFragParsed",e.FRAG_BUFFERED="hlsFragBuffered",e.FRAG_CHANGED="hlsFragChanged",e.FPS_DROP="hlsFpsDrop",e.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",e.ERROR="hlsError",e.DESTROYING="hlsDestroying",e.KEY_LOADING="hlsKeyLoading",e.KEY_LOADED="hlsKeyLoaded",e.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",e.BACK_BUFFER_REACHED="hlsBackBufferReached"})(H||(H={}))},"./src/hls.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>w});var H=O("./node_modules/url-toolkit/src/url-toolkit.js"),e=O.n(H),M=O("./src/loader/playlist-loader.ts"),D=O("./src/controller/id3-track-controller.ts"),N=O("./src/controller/latency-controller.ts"),c=O("./src/controller/level-controller.ts"),l=O("./src/controller/fragment-tracker.ts"),s=O("./src/loader/key-loader.ts"),h=O("./src/controller/stream-controller.ts"),x=O("./src/is-supported.ts"),E=O("./src/utils/logger.ts"),v=O("./src/config.ts"),d=O("./node_modules/eventemitter3/index.js"),m=O.n(d),g=O("./src/events.ts"),S=O("./src/errors.ts"),A=O("./src/types/level.ts");function u(y,o){for(var r=0;r<o.length;r++){var a=o[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(y,i(a.key),a)}}function R(y,o,r){return o&&u(y.prototype,o),r&&u(y,r),Object.defineProperty(y,"prototype",{writable:!1}),y}function i(y){var o=T(y,"string");return typeof o=="symbol"?o:String(o)}function T(y,o){if(typeof y!="object"||y===null)return y;var r=y[Symbol.toPrimitive];if(r!==void 0){var a=r.call(y,o||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(y)}var w=function(){y.isSupported=function(){return(0,x.isSupported)()};function y(r){r===void 0&&(r={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new d.EventEmitter,this._autoLevelCapping=void 0,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var a=this.config=(0,v.mergeConfig)(y.DefaultConfig,r);this.userConfig=r,(0,E.enableLogs)(a.debug,"Hls instance"),this._autoLevelCapping=-1,a.progressive&&(0,v.enableStreamingMode)(a);var n=a.abrController,t=a.bufferController,p=a.capLevelController,_=a.fpsController,f=this.abrController=new n(this),F=this.bufferController=new t(this),P=this.capLevelController=new p(this),W=new _(this),V=new M.default(this),J=new D.default(this),ne=this.levelController=new c.default(this),ce=new l.FragmentTracker(this),ie=new s.default(this.config),xe=this.streamController=new h.default(this,ce,ie);P.setStreamController(xe),W.setStreamController(xe);var ge=[V,ne,xe];this.networkControllers=ge;var de=[f,F,P,W,J,ce];this.audioTrackController=this.createController(a.audioTrackController,ge);var Fe=a.audioStreamController;Fe&&ge.push(new Fe(this,ce,ie)),this.subtitleTrackController=this.createController(a.subtitleTrackController,ge);var Qe=a.subtitleStreamController;Qe&&ge.push(new Qe(this,ce,ie)),this.createController(a.timelineController,de),ie.emeController=this.emeController=this.createController(a.emeController,de),this.cmcdController=this.createController(a.cmcdController,de),this.latencyController=this.createController(N.default,de),this.coreComponents=de}var o=y.prototype;return o.createController=function(a,n){if(a){var t=new a(this);return n&&n.push(t),t}return null},o.on=function(a,n,t){t===void 0&&(t=this),this._emitter.on(a,n,t)},o.once=function(a,n,t){t===void 0&&(t=this),this._emitter.once(a,n,t)},o.removeAllListeners=function(a){this._emitter.removeAllListeners(a)},o.off=function(a,n,t,p){t===void 0&&(t=this),this._emitter.off(a,n,t,p)},o.listeners=function(a){return this._emitter.listeners(a)},o.emit=function(a,n,t){return this._emitter.emit(a,n,t)},o.trigger=function(a,n){if(this.config.debug)return this.emit(a,a,n);try{return this.emit(a,a,n)}catch(t){E.logger.error("An internal error happened while handling event "+a+'. Error message: "'+t.message+'". Here is a stacktrace:',t),this.trigger(g.Events.ERROR,{type:S.ErrorTypes.OTHER_ERROR,details:S.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:a,error:t})}return!1},o.listenerCount=function(a){return this._emitter.listenerCount(a)},o.destroy=function(){E.logger.log("destroy"),this.trigger(g.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(a){return a.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(a){return a.destroy()}),this.coreComponents.length=0},o.attachMedia=function(a){E.logger.log("attachMedia"),this._media=a,this.trigger(g.Events.MEDIA_ATTACHING,{media:a})},o.detachMedia=function(){E.logger.log("detachMedia"),this.trigger(g.Events.MEDIA_DETACHING,void 0),this._media=null},o.loadSource=function(a){this.stopLoad();var n=this.media,t=this.url,p=this.url=H.buildAbsoluteURL(self.location.href,a,{alwaysNormalize:!0});E.logger.log("loadSource:"+p),n&&t&&t!==p&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(n)),this.trigger(g.Events.MANIFEST_LOADING,{url:a})},o.startLoad=function(a){a===void 0&&(a=-1),E.logger.log("startLoad("+a+")"),this.networkControllers.forEach(function(n){n.startLoad(a)})},o.stopLoad=function(){E.logger.log("stopLoad"),this.networkControllers.forEach(function(a){a.stopLoad()})},o.swapAudioCodec=function(){E.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},o.recoverMediaError=function(){E.logger.log("recoverMediaError");var a=this._media;this.detachMedia(),a&&this.attachMedia(a)},o.removeLevel=function(a,n){n===void 0&&(n=0),this.levelController.removeLevel(a,n)},R(y,[{key:"levels",get:function(){var a=this.levelController.levels;return a||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(a){E.logger.log("set currentLevel:"+a),this.loadLevel=a,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(a){E.logger.log("set nextLevel:"+a),this.levelController.manualLevel=a,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(a){E.logger.log("set loadLevel:"+a),this.levelController.manualLevel=a}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(a){this.levelController.nextLoadLevel=a}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(a){E.logger.log("set firstLevel:"+a),this.levelController.firstLevel=a}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(a){E.logger.log("set startLevel:"+a),a!==-1&&(a=Math.max(a,this.minAutoLevel)),this.levelController.startLevel=a}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(a){var n=!!a;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(a){this._autoLevelCapping!==a&&(E.logger.log("set autoLevelCapping:"+a),this._autoLevelCapping=a)}},{key:"bandwidthEstimate",get:function(){var a=this.abrController.bwEstimator;return a?a.getEstimate():NaN}},{key:"maxHdcpLevel",get:function(){return this._maxHdcpLevel},set:function(a){A.HdcpLevels.indexOf(a)>-1&&(this._maxHdcpLevel=a)}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var a=this.levels,n=this.config.minAutoBitrate;if(!a)return 0;for(var t=a.length,p=0;p<t;p++)if(a[p].maxBitrate>=n)return p;return 0}},{key:"maxAutoLevel",get:function(){var a=this.levels,n=this.autoLevelCapping,t=this.maxHdcpLevel,p;if(n===-1&&a&&a.length?p=a.length-1:p=n,t)for(var _=p;_--;){var f=a[_].attrs["HDCP-LEVEL"];if(f&&f<=t)return _}return p}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(a){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,a)}},{key:"playingDate",get:function(){return this.streamController.currentProgramDateTime}},{key:"mainForwardBufferInfo",get:function(){return this.streamController.getMainFwdBufferInfo()}},{key:"audioTracks",get:function(){var a=this.audioTrackController;return a?a.audioTracks:[]}},{key:"audioTrack",get:function(){var a=this.audioTrackController;return a?a.audioTrack:-1},set:function(a){var n=this.audioTrackController;n&&(n.audioTrack=a)}},{key:"subtitleTracks",get:function(){var a=this.subtitleTrackController;return a?a.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var a=this.subtitleTrackController;return a?a.subtitleTrack:-1},set:function(a){var n=this.subtitleTrackController;n&&(n.subtitleTrack=a)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var a=this.subtitleTrackController;return a?a.subtitleDisplay:!1},set:function(a){var n=this.subtitleTrackController;n&&(n.subtitleDisplay=a)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(a){this.config.lowLatencyMode=a}},{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.3.5"}},{key:"Events",get:function(){return g.Events}},{key:"ErrorTypes",get:function(){return S.ErrorTypes}},{key:"ErrorDetails",get:function(){return S.ErrorDetails}},{key:"DefaultConfig",get:function(){return y.defaultConfig?y.defaultConfig:v.hlsDefaultConfig},set:function(a){y.defaultConfig=a}}]),y}();w.defaultConfig=void 0},"./src/is-supported.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{changeTypeSupported:()=>D,isSupported:()=>M});var H=O("./src/utils/mediasource-helper.ts");function e(){return self.SourceBuffer||self.WebKitSourceBuffer}function M(){var N=(0,H.getMediaSource)();if(!N)return!1;var c=e(),l=N&&typeof N.isTypeSupported=="function"&&N.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),s=!c||c.prototype&&typeof c.prototype.appendBuffer=="function"&&typeof c.prototype.remove=="function";return!!l&&!!s}function D(){var N,c=e();return typeof(c==null||((N=c.prototype)===null||N===void 0)?void 0:N.changeType)=="function"}},"./src/loader/date-range.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{DateRange:()=>x,DateRangeAttribute:()=>h});var H=O("./src/polyfills/number.ts"),e=O("./src/utils/attr-list.ts"),M=O("./src/utils/logger.ts");function D(){return D=Object.assign?Object.assign.bind():function(E){for(var v=1;v<arguments.length;v++){var d=arguments[v];for(var m in d)Object.prototype.hasOwnProperty.call(d,m)&&(E[m]=d[m])}return E},D.apply(this,arguments)}function N(E,v){for(var d=0;d<v.length;d++){var m=v[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(E,l(m.key),m)}}function c(E,v,d){return v&&N(E.prototype,v),d&&N(E,d),Object.defineProperty(E,"prototype",{writable:!1}),E}function l(E){var v=s(E,"string");return typeof v=="symbol"?v:String(v)}function s(E,v){if(typeof E!="object"||E===null)return E;var d=E[Symbol.toPrimitive];if(d!==void 0){var m=d.call(E,v||"default");if(typeof m!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return(v==="string"?String:Number)(E)}var h;(function(E){E.ID="ID",E.CLASS="CLASS",E.START_DATE="START-DATE",E.DURATION="DURATION",E.END_DATE="END-DATE",E.END_ON_NEXT="END-ON-NEXT",E.PLANNED_DURATION="PLANNED-DURATION",E.SCTE35_OUT="SCTE35-OUT",E.SCTE35_IN="SCTE35-IN"})(h||(h={}));var x=function(){function E(v,d){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,d){var m=d.attr;for(var g in m)if(Object.prototype.hasOwnProperty.call(v,g)&&v[g]!==m[g]){M.logger.warn('DATERANGE tag attribute: "'+g+'" does not match for tags with ID: "'+v.ID+'"'),this._badValueForSameId=g;break}v=D(new e.AttrList({}),m,v)}if(this.attr=v,this._startDate=new Date(v[h.START_DATE]),h.END_DATE in this.attr){var S=new Date(this.attr[h.END_DATE]);(0,H.isFiniteNumber)(S.getTime())&&(this._endDate=S)}}return c(E,[{key:"id",get:function(){return this.attr.ID}},{key:"class",get:function(){return this.attr.CLASS}},{key:"startDate",get:function(){return this._startDate}},{key:"endDate",get:function(){if(this._endDate)return this._endDate;var d=this.duration;return d!==null?new Date(this._startDate.getTime()+d*1e3):null}},{key:"duration",get:function(){if(h.DURATION in this.attr){var d=this.attr.decimalFloatingPoint(h.DURATION);if((0,H.isFiniteNumber)(d))return d}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}},{key:"plannedDuration",get:function(){return h.PLANNED_DURATION in this.attr?this.attr.decimalFloatingPoint(h.PLANNED_DURATION):null}},{key:"endOnNext",get:function(){return this.attr.bool(h.END_ON_NEXT)}},{key:"isValid",get:function(){return!!this.id&&!this._badValueForSameId&&(0,H.isFiniteNumber)(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)}}]),E}()},"./src/loader/fragment-loader.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{LoadError:()=>d,default:()=>E});var H=O("./src/polyfills/number.ts"),e=O("./src/errors.ts");function M(m,g){m.prototype=Object.create(g.prototype),m.prototype.constructor=m,s(m,g)}function D(m){var g=typeof Map=="function"?new Map:void 0;return D=function(A){if(A===null||!l(A))return A;if(typeof A!="function")throw new TypeError("Super expression must either be null or a function");if(typeof g!="undefined"){if(g.has(A))return g.get(A);g.set(A,u)}function u(){return N(A,arguments,h(this).constructor)}return u.prototype=Object.create(A.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),s(u,A)},D(m)}function N(m,g,S){return c()?N=Reflect.construct.bind():N=function(u,R,i){var T=[null];T.push.apply(T,R);var w=Function.bind.apply(u,T),y=new w;return i&&s(y,i.prototype),y},N.apply(null,arguments)}function c(){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(m){return!1}}function l(m){return Function.toString.call(m).indexOf("[native code]")!==-1}function s(m,g){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(A,u){return A.__proto__=u,A},s(m,g)}function h(m){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},h(m)}var x=Math.pow(2,17),E=function(){function m(S){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=S}var g=m.prototype;return g.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},g.abort=function(){this.loader&&this.loader.abort()},g.load=function(A,u){var R=this,i=A.url;if(!i)return Promise.reject(new d({type:e.ErrorTypes.NETWORK_ERROR,details:e.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:A,networkDetails:null},"Fragment does not have a "+(i?"part list":"url")));this.abort();var T=this.config,w=T.fLoader,y=T.loader;return new Promise(function(o,r){R.loader&&R.loader.destroy();var a=R.loader=A.loader=w?new w(T):new y(T),n=v(A),t={timeout:T.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:T.fragLoadingMaxRetryTimeout,highWaterMark:A.sn==="initSegment"?Infinity:x};A.stats=a.stats,a.load(n,t,{onSuccess:function(_,f,F,P){R.resetLoader(A,a);var W=_.data;F.resetIV&&A.decryptdata&&(A.decryptdata.iv=new Uint8Array(W.slice(0,16)),W=W.slice(16)),o({frag:A,part:null,payload:W,networkDetails:P})},onError:function(_,f,F){R.resetLoader(A,a),r(new d({type:e.ErrorTypes.NETWORK_ERROR,details:e.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:A,response:_,networkDetails:F}))},onAbort:function(_,f,F){R.resetLoader(A,a),r(new d({type:e.ErrorTypes.NETWORK_ERROR,details:e.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:A,networkDetails:F}))},onTimeout:function(_,f,F){R.resetLoader(A,a),r(new d({type:e.ErrorTypes.NETWORK_ERROR,details:e.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:A,networkDetails:F}))},onProgress:function(_,f,F,P){u&&u({frag:A,part:null,payload:F,networkDetails:P})}})})},g.loadPart=function(A,u,R){var i=this;this.abort();var T=this.config,w=T.fLoader,y=T.loader;return new Promise(function(o,r){i.loader&&i.loader.destroy();var a=i.loader=A.loader=w?new w(T):new y(T),n=v(A,u),t={timeout:T.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:T.fragLoadingMaxRetryTimeout,highWaterMark:x};u.stats=a.stats,a.load(n,t,{onSuccess:function(_,f,F,P){i.resetLoader(A,a),i.updateStatsFromPart(A,u);var W={frag:A,part:u,payload:_.data,networkDetails:P};R(W),o(W)},onError:function(_,f,F){i.resetLoader(A,a),r(new d({type:e.ErrorTypes.NETWORK_ERROR,details:e.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:A,part:u,response:_,networkDetails:F}))},onAbort:function(_,f,F){A.stats.aborted=u.stats.aborted,i.resetLoader(A,a),r(new d({type:e.ErrorTypes.NETWORK_ERROR,details:e.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:A,part:u,networkDetails:F}))},onTimeout:function(_,f,F){i.resetLoader(A,a),r(new d({type:e.ErrorTypes.NETWORK_ERROR,details:e.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:A,part:u,networkDetails:F}))}})})},g.updateStatsFromPart=function(A,u){var R=A.stats,i=u.stats,T=i.total;if(R.loaded+=i.loaded,T){var w=Math.round(A.duration/u.duration),y=Math.min(Math.round(R.loaded/T),w),o=w-y,r=o*Math.round(R.loaded/y);R.total=R.loaded+r}else R.total=Math.max(R.loaded,R.total);var a=R.loading,n=i.loading;a.start?a.first+=n.first-n.start:(a.start=n.start,a.first=n.first),a.end=n.end},g.resetLoader=function(A,u){A.loader=null,this.loader===u&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),u.destroy()},m}();function v(m,g){g===void 0&&(g=null);var S=g||m,A={frag:m,part:g,responseType:"arraybuffer",url:S.url,headers:{},rangeStart:0,rangeEnd:0},u=S.byteRangeStartOffset,R=S.byteRangeEndOffset;if((0,H.isFiniteNumber)(u)&&(0,H.isFiniteNumber)(R)){var i,T=u,w=R;if(m.sn==="initSegment"&&((i=m.decryptdata)===null||i===void 0?void 0:i.method)==="AES-128"){var y=R-u;y%16&&(w=R+(16-y%16)),u!==0&&(A.resetIV=!0,T=u-16)}A.rangeStart=T,A.rangeEnd=w}return A}var d=function(m){M(g,m);function g(S){for(var A,u=arguments.length,R=new Array(u>1?u-1:0),i=1;i<u;i++)R[i-1]=arguments[i];return A=m.call.apply(m,[this].concat(R))||this,A.data=void 0,A.data=S,A}return g}(D(Error))},"./src/loader/fragment.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{BaseSegment:()=>v,ElementaryStreamTypes:()=>E,Fragment:()=>d,Part:()=>m});var H=O("./src/polyfills/number.ts"),e=O("./node_modules/url-toolkit/src/url-toolkit.js"),M=O.n(e),D=O("./src/loader/load-stats.ts");function N(g,S){g.prototype=Object.create(S.prototype),g.prototype.constructor=g,c(g,S)}function c(g,S){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(u,R){return u.__proto__=R,u},c(g,S)}function l(g,S){for(var A=0;A<S.length;A++){var u=S[A];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(g,h(u.key),u)}}function s(g,S,A){return S&&l(g.prototype,S),A&&l(g,A),Object.defineProperty(g,"prototype",{writable:!1}),g}function h(g){var S=x(g,"string");return typeof S=="symbol"?S:String(S)}function x(g,S){if(typeof g!="object"||g===null)return g;var A=g[Symbol.toPrimitive];if(A!==void 0){var u=A.call(g,S||"default");if(typeof u!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(g)}var E;(function(g){g.AUDIO="audio",g.VIDEO="video",g.AUDIOVIDEO="audiovideo"})(E||(E={}));var v=function(){function g(A){var u;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(u={},u[E.AUDIO]=null,u[E.VIDEO]=null,u[E.AUDIOVIDEO]=null,u),this.baseurl=A}var S=g.prototype;return S.setByteRange=function(u,R){var i=u.split("@",2),T=[];i.length===1?T[0]=R?R.byteRangeEndOffset:0:T[0]=parseInt(i[1]),T[1]=parseInt(i[0])+T[0],this._byteRange=T},s(g,[{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=(0,e.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(u){this._url=u}}]),g}(),d=function(g){N(S,g);function S(u,R){var i;return i=g.call(this,R)||this,i._decryptdata=null,i.rawProgramDateTime=null,i.programDateTime=null,i.tagList=[],i.duration=0,i.sn=0,i.levelkeys=void 0,i.type=void 0,i.loader=null,i.keyLoader=null,i.level=-1,i.cc=0,i.startPTS=void 0,i.endPTS=void 0,i.appendedPTS=void 0,i.startDTS=void 0,i.endDTS=void 0,i.start=0,i.deltaPTS=void 0,i.maxStartPTS=void 0,i.minEndPTS=void 0,i.stats=new D.LoadStats,i.urlId=0,i.data=void 0,i.bitrateTest=!1,i.title=null,i.initSegment=null,i.endList=void 0,i.type=u,i}var A=S.prototype;return A.setKeyFormat=function(R){if(this.levelkeys){var i=this.levelkeys[R];i&&!this._decryptdata&&(this._decryptdata=i.getDecryptData(this.sn))}},A.abortRequests=function(){var R,i;(R=this.loader)===null||R===void 0||R.abort(),(i=this.keyLoader)===null||i===void 0||i.abort()},A.setElementaryStreamInfo=function(R,i,T,w,y,o){o===void 0&&(o=!1);var r=this.elementaryStreams,a=r[R];if(!a){r[R]={startPTS:i,endPTS:T,startDTS:w,endDTS:y,partial:o};return}a.startPTS=Math.min(a.startPTS,i),a.endPTS=Math.max(a.endPTS,T),a.startDTS=Math.min(a.startDTS,w),a.endDTS=Math.max(a.endDTS,y)},A.clearElementaryStreamInfo=function(){var R=this.elementaryStreams;R[E.AUDIO]=null,R[E.VIDEO]=null,R[E.AUDIOVIDEO]=null},s(S,[{key:"decryptdata",get:function(){var R=this.levelkeys;if(!R&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){var i=this.levelkeys.identity;if(i)this._decryptdata=i.getDecryptData(this.sn);else{var T=Object.keys(this.levelkeys);if(T.length===1)return this._decryptdata=this.levelkeys[T[0]].getDecryptData(this.sn)}}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!(0,H.isFiniteNumber)(this.programDateTime))return null;var R=(0,H.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+R*1e3}},{key:"encrypted",get:function(){var R;if((R=this._decryptdata)!==null&&R!==void 0&&R.encrypted)return!0;if(this.levelkeys){var i=Object.keys(this.levelkeys),T=i.length;if(T>1||T===1&&this.levelkeys[i[0]].encrypted)return!0}return!1}}]),S}(v),m=function(g){N(S,g);function S(A,u,R,i,T){var w;w=g.call(this,R)||this,w.fragOffset=0,w.duration=0,w.gap=!1,w.independent=!1,w.relurl=void 0,w.fragment=void 0,w.index=void 0,w.stats=new D.LoadStats,w.duration=A.decimalFloatingPoint("DURATION"),w.gap=A.bool("GAP"),w.independent=A.bool("INDEPENDENT"),w.relurl=A.enumeratedString("URI"),w.fragment=u,w.index=i;var y=A.enumeratedString("BYTERANGE");return y&&w.setByteRange(y,T),T&&(w.fragOffset=T.fragOffset+T.duration),w}return s(S,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var u=this.elementaryStreams;return!!(u.audio||u.video||u.audiovideo)}}]),S}(v)},"./src/loader/key-loader.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>M});var H=O("./src/errors.ts"),e=O("./src/loader/fragment-loader.ts"),M=function(){function D(c){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=c}var N=D.prototype;return N.abort=function(){for(var l in this.keyUriToKeyInfo){var s=this.keyUriToKeyInfo[l].loader;s&&s.abort()}},N.detach=function(){for(var l in this.keyUriToKeyInfo){var s=this.keyUriToKeyInfo[l];(s.mediaKeySessionContext||s.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[l]}},N.destroy=function(){this.detach();for(var l in this.keyUriToKeyInfo){var s=this.keyUriToKeyInfo[l].loader;s&&s.destroy()}this.keyUriToKeyInfo={}},N.createKeyLoadError=function(l,s,h,x){return s===void 0&&(s=H.ErrorDetails.KEY_LOAD_ERROR),new e.LoadError({type:H.ErrorTypes.NETWORK_ERROR,details:s,fatal:!1,frag:l,networkDetails:h})},N.loadClear=function(l,s){var h=this;if(this.emeController&&this.config.emeEnabled)for(var x=l.sn,E=l.cc,v=function(S){var A=s[S];if(E<=A.cc&&(x==="initSegment"||x<A.sn))return h.emeController.selectKeySystemFormat(A).then(function(u){A.setKeyFormat(u)}),"break"},d=0;d<s.length;d++){var m=v(d);if(m==="break")break}},N.load=function(l){var s=this;return!l.decryptdata&&l.encrypted&&this.emeController?this.emeController.selectKeySystemFormat(l).then(function(h){return s.loadInternal(l,h)}):this.loadInternal(l)},N.loadInternal=function(l,s){var h,x;s&&l.setKeyFormat(s);var E=l.decryptdata;if(!E){var v=s?"Expected frag.decryptdata to be defined after setting format "+s:"Missing decryption data on fragment in onKeyLoading";return Promise.reject(this.createKeyLoadError(l,H.ErrorDetails.KEY_LOAD_ERROR,null,v))}var d=E.uri;if(!d)return Promise.reject(this.createKeyLoadError(l,H.ErrorDetails.KEY_LOAD_ERROR,null,'Invalid key URI: "'+d+'"'));var m=this.keyUriToKeyInfo[d];if((h=m)!==null&&h!==void 0&&h.decryptdata.key)return E.key=m.decryptdata.key,Promise.resolve({frag:l,keyInfo:m});if((x=m)!==null&&x!==void 0&&x.keyLoadPromise){var g;switch((g=m.mediaKeySessionContext)===null||g===void 0?void 0:g.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return m.keyLoadPromise.then(function(S){return E.key=S.keyInfo.decryptdata.key,{frag:l,keyInfo:m}})}}m=this.keyUriToKeyInfo[d]={decryptdata:E,keyLoadPromise:null,loader:null,mediaKeySessionContext:null};switch(E.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return E.keyFormat==="identity"?this.loadKeyHTTP(m,l):this.loadKeyEME(m,l);case"AES-128":return this.loadKeyHTTP(m,l);default:return Promise.reject(this.createKeyLoadError(l,H.ErrorDetails.KEY_LOAD_ERROR,null,'Key supplied with unsupported METHOD: "'+E.method+'"'))}},N.loadKeyEME=function(l,s){var h={frag:s,keyInfo:l};if(this.emeController&&this.config.emeEnabled){var x=this.emeController.loadKey(h);if(x)return(l.keyLoadPromise=x.then(function(E){return l.mediaKeySessionContext=E,h})).catch(function(E){throw l.keyLoadPromise=null,E})}return Promise.resolve(h)},N.loadKeyHTTP=function(l,s){var h=this,x=this.config,E=x.loader,v=new E(x);return s.keyLoader=l.loader=v,l.keyLoadPromise=new Promise(function(d,m){var g={keyInfo:l,frag:s,responseType:"arraybuffer",url:l.decryptdata.uri},S={timeout:x.fragLoadingTimeOut,maxRetry:0,retryDelay:x.fragLoadingRetryDelay,maxRetryDelay:x.fragLoadingMaxRetryTimeout,highWaterMark:0},A={onSuccess:function(R,i,T,w){var y=T.frag,o=T.keyInfo,r=T.url;if(!y.decryptdata||o!==h.keyUriToKeyInfo[r])return m(h.createKeyLoadError(y,H.ErrorDetails.KEY_LOAD_ERROR,w,"after key load, decryptdata unset or changed"));o.decryptdata.key=y.decryptdata.key=new Uint8Array(R.data),y.keyLoader=null,o.loader=null,d({frag:y,keyInfo:o})},onError:function(R,i,T){h.resetLoader(i),m(h.createKeyLoadError(s,H.ErrorDetails.KEY_LOAD_ERROR,T))},onTimeout:function(R,i,T){h.resetLoader(i),m(h.createKeyLoadError(s,H.ErrorDetails.KEY_LOAD_TIMEOUT,T))},onAbort:function(R,i,T){h.resetLoader(i),m(h.createKeyLoadError(s,H.ErrorDetails.INTERNAL_ABORTED,T))}};v.load(g,S,A)})},N.resetLoader=function(l){var s=l.frag,h=l.keyInfo,x=l.url,E=h.loader;s.keyLoader===E&&(s.keyLoader=null,h.loader=null),delete this.keyUriToKeyInfo[x],E&&E.destroy()},D}()},"./src/loader/level-details.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{LevelDetails:()=>l});var H=O("./src/polyfills/number.ts");function e(s,h){for(var x=0;x<h.length;x++){var E=h[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(s,D(E.key),E)}}function M(s,h,x){return h&&e(s.prototype,h),x&&e(s,x),Object.defineProperty(s,"prototype",{writable:!1}),s}function D(s){var h=N(s,"string");return typeof h=="symbol"?h:String(h)}function N(s,h){if(typeof s!="object"||s===null)return s;var x=s[Symbol.toPrimitive];if(x!==void 0){var E=x.call(s,h||"default");if(typeof E!="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return(h==="string"?String:Number)(s)}var c=10,l=function(){function s(x){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=x}var h=s.prototype;return h.reloaded=function(E){if(!E){this.advanced=!0,this.updated=!0;return}var v=this.lastPartSn-E.lastPartSn,d=this.lastPartIndex-E.lastPartIndex;this.updated=this.endSN!==E.endSN||!!d||!!v,this.advanced=this.endSN>E.endSN||v>0||v===0&&d>0,this.updated||this.advanced?this.misses=Math.floor(E.misses*.6):this.misses=E.misses+1,this.availabilityDelay=E.availabilityDelay},M(s,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?(0,H.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||c}},{key:"drift",get:function(){var E=this.driftEndTime-this.driftStartTime;if(E>0){var v=this.driftEnd-this.driftStart;return v*1e3/E}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var E;return(E=this.partList)!==null&&E!==void 0&&E.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var E;return(E=this.fragments)!==null&&E!==void 0&&E.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 E;return(E=this.partList)!==null&&E!==void 0&&E.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var E;return(E=this.partList)!==null&&E!==void 0&&E.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),s}()},"./src/loader/level-key.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{LevelKey:()=>l});var H=O("./src/utils/keysystem-util.ts"),e=O("./src/utils/mediakeys-helper.ts"),M=O("./src/utils/mp4-tools.ts"),D=O("./src/utils/logger.ts"),N=O("./src/utils/numeric-encoding-utils.ts"),c={},l=function(){h.clearKeyUriToKeyIdMap=function(){c={}};function h(E,v,d,m,g){m===void 0&&(m=[1]),g===void 0&&(g=null),this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=E,this.uri=v,this.keyFormat=d,this.keyFormatVersions=m,this.iv=g,this.encrypted=E?E!=="NONE":!1,this.isCommonEncryption=this.encrypted&&E!=="AES-128"}var x=h.prototype;return x.isSupported=function(){if(this.method){if(this.method==="AES-128"||this.method==="NONE")return!0;switch(this.keyFormat){case"identity":return this.method==="SAMPLE-AES";case e.KeySystemFormats.FAIRPLAY:case e.KeySystemFormats.WIDEVINE:case e.KeySystemFormats.PLAYREADY:case e.KeySystemFormats.CLEARKEY:return["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)!==-1}}return!1},x.getDecryptData=function(v){if(!this.encrypted||!this.uri)return null;if(this.method==="AES-128"&&this.uri&&!this.iv){typeof v!="number"&&(this.method==="AES-128"&&!this.iv&&D.logger.warn('missing IV for initialization segment with method="'+this.method+'" - compliance issue'),v=0);var d=s(v),m=new h(this.method,this.uri,"identity",this.keyFormatVersions,d);return m}var g=(0,H.convertDataUriToArrayBytes)(this.uri);if(g)switch(this.keyFormat){case e.KeySystemFormats.WIDEVINE:this.pssh=g,g.length>=22&&(this.keyId=g.subarray(g.length-22,g.length-6));break;case e.KeySystemFormats.PLAYREADY:{var S=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=(0,M.mp4pssh)(S,null,g);var A=new Uint16Array(g.buffer,g.byteOffset,g.byteLength/2),u=String.fromCharCode.apply(null,Array.from(A)),R=u.substring(u.indexOf("<"),u.length),i=new DOMParser,T=i.parseFromString(R,"text/xml"),w=T.getElementsByTagName("KID")[0];if(w){var y=w.childNodes[0]?w.childNodes[0].nodeValue:w.getAttribute("VALUE");if(y){var o=(0,N.base64Decode)(y).subarray(0,16);(0,H.changeEndianness)(o),this.keyId=o}}break}default:{var r=g.subarray(0,16);if(r.length!==16){var a=new Uint8Array(16);a.set(r,16-r.length),r=a}this.keyId=r;break}}if(!this.keyId||this.keyId.byteLength!==16){var n=c[this.uri];if(!n){var t=Object.keys(c).length%Number.MAX_SAFE_INTEGER;n=new Uint8Array(16);var p=new DataView(n.buffer,12,4);p.setUint32(0,t),c[this.uri]=n}this.keyId=n}return this},h}();function s(h){for(var x=new Uint8Array(16),E=12;E<16;E++)x[E]=h>>8*(15-E)&255;return x}},"./src/loader/load-stats.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{LoadStats:()=>H});var H=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":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>S});var H=O("./src/polyfills/number.ts"),e=O("./node_modules/url-toolkit/src/url-toolkit.js"),M=O.n(e),D=O("./src/loader/date-range.ts"),N=O("./src/loader/fragment.ts"),c=O("./src/loader/level-details.ts"),l=O("./src/loader/level-key.ts"),s=O("./src/utils/attr-list.ts"),h=O("./src/utils/logger.ts"),x=O("./src/utils/codecs.ts");function E(){return E=Object.assign?Object.assign.bind():function(o){for(var r=1;r<arguments.length;r++){var a=arguments[r];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(o[n]=a[n])}return o},E.apply(this,arguments)}var v=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+|#EXT-X-SESSION-KEY:([^\n\r]*)[\r\n]+/g,d=/#EXT-X-MEDIA:(.*)/g,m=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),g=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(DATERANGE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),S=function(){function o(){}return o.findGroup=function(a,n){for(var t=0;t<a.length;t++){var p=a[t];if(p.id===n)return p}},o.convertAVC1ToAVCOTI=function(a){var n=a.split(".");if(n.length>2){var t=n.shift()+".";return t+=parseInt(n.shift()).toString(16),t+=("000"+parseInt(n.shift()).toString(16)).slice(-4),t}return a},o.resolve=function(a,n){return(0,e.buildAbsoluteURL)(n,a,{alwaysNormalize:!0})},o.parseMasterPlaylist=function(a,n){var t=[],p=[],_={},f=[],F=!1;v.lastIndex=0;for(var P;(P=v.exec(a))!=null;)if(P[1]){var W,V=new s.AttrList(P[1]),J={attrs:V,bitrate:V.decimalInteger("AVERAGE-BANDWIDTH")||V.decimalInteger("BANDWIDTH"),name:V.NAME,url:o.resolve(P[2],n)},ne=V.decimalResolution("RESOLUTION");ne&&(J.width=ne.width,J.height=ne.height),u((V.CODECS||"").split(/[ ,]+/).filter(function(de){return de}),J),J.videoCodec&&J.videoCodec.indexOf("avc1")!==-1&&(J.videoCodec=o.convertAVC1ToAVCOTI(J.videoCodec)),(W=J.unknownCodecs)!==null&&W!==void 0&&W.length||p.push(J),t.push(J)}else if(P[3]){var ce=new s.AttrList(P[3]);ce["DATA-ID"]&&(F=!0,_[ce["DATA-ID"]]=ce)}else if(P[4]){var ie=P[4],xe=A(ie,n);xe.encrypted&&xe.isSupported()?f.push(xe):h.logger.warn('[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "'+ie+'"')}var ge=p.length>0&&p.length<t.length;return{levels:ge?p:t,sessionData:F?_:null,sessionKeys:f.length?f:null}},o.parseMasterPlaylistMedia=function(a,n,t,p){p===void 0&&(p=[]);var _,f=[],F=0;for(d.lastIndex=0;(_=d.exec(a))!==null;){var P=new s.AttrList(_[1]);if(P.TYPE===t){var W={attrs:P,bitrate:0,id:F++,groupId:P["GROUP-ID"],instreamId:P["INSTREAM-ID"],name:P.NAME||P.LANGUAGE||"",type:t,default:P.bool("DEFAULT"),autoselect:P.bool("AUTOSELECT"),forced:P.bool("FORCED"),lang:P.LANGUAGE,url:P.URI?o.resolve(P.URI,n):""};if(p.length){var V=o.findGroup(p,W.groupId)||p[0];R(W,V,"audioCodec"),R(W,V,"textCodec")}f.push(W)}}return f},o.parseLevelPlaylist=function(a,n,t,p,_){var f=new c.LevelDetails(n),F=f.fragments,P=null,W=0,V=0,J=0,ne=0,ce=null,ie=new N.Fragment(p,n),xe,ge,de,Fe=-1,Qe=!1;for(m.lastIndex=0,f.m3u8=a;(xe=m.exec(a))!==null;){Qe&&(Qe=!1,ie=new N.Fragment(p,n),ie.start=J,ie.sn=W,ie.cc=ne,ie.level=t,P&&(ie.initSegment=P,ie.rawProgramDateTime=P.rawProgramDateTime,P.rawProgramDateTime=null));var Ve=xe[1];if(Ve){ie.duration=parseFloat(Ve);var Ne=(" "+xe[2]).slice(1);ie.title=Ne||null,ie.tagList.push(Ne?["INF",Ve,Ne]:["INF",Ve])}else if(xe[3])(0,H.isFiniteNumber)(ie.duration)&&(ie.start=J,de&&y(ie,de,f),ie.sn=W,ie.level=t,ie.cc=ne,ie.urlId=_,F.push(ie),ie.relurl=(" "+xe[3]).slice(1),T(ie,ce),ce=ie,J+=ie.duration,W++,V=0,Qe=!0);else if(xe[4]){var Ue=(" "+xe[4]).slice(1);ce?ie.setByteRange(Ue,ce):ie.setByteRange(Ue)}else if(xe[5])ie.rawProgramDateTime=(" "+xe[5]).slice(1),ie.tagList.push(["PROGRAM-DATE-TIME",ie.rawProgramDateTime]),Fe===-1&&(Fe=F.length);else{if(xe=xe[0].match(g),!xe){h.logger.warn("No matches on slow regex match for level playlist!");continue}for(ge=1;ge<xe.length&&!(typeof xe[ge]!="undefined");ge++);var q=(" "+xe[ge]).slice(1),k=(" "+xe[ge+1]).slice(1),z=xe[ge+2]?(" "+xe[ge+2]).slice(1):"";switch(q){case"PLAYLIST-TYPE":f.type=k.toUpperCase();break;case"MEDIA-SEQUENCE":W=f.startSN=parseInt(k);break;case"SKIP":{var X=new s.AttrList(k),re=X.decimalInteger("SKIPPED-SEGMENTS");if((0,H.isFiniteNumber)(re)){f.skippedSegments=re;for(var te=re;te--;)F.unshift(null);W+=re}var ae=X.enumeratedString("RECENTLY-REMOVED-DATERANGES");ae&&(f.recentlyRemovedDateranges=ae.split(" "));break}case"TARGETDURATION":f.targetduration=parseFloat(k);break;case"VERSION":f.version=parseInt(k);break;case"EXTM3U":break;case"ENDLIST":f.live=!1;break;case"#":(k||z)&&ie.tagList.push(z?[k,z]:[k]);break;case"DISCONTINUITY":ne++,ie.tagList.push(["DIS"]);break;case"GAP":ie.tagList.push([q]);break;case"BITRATE":ie.tagList.push([q,k]);break;case"DATERANGE":{var ye=new s.AttrList(k),Le=new D.DateRange(ye,f.dateRanges[ye.ID]);Le.isValid||f.skippedSegments?f.dateRanges[Le.id]=Le:h.logger.warn('Ignoring invalid DATERANGE tag: "'+k+'"'),ie.tagList.push(["EXT-X-DATERANGE",k]);break}case"DISCONTINUITY-SEQUENCE":ne=parseInt(k);break;case"KEY":{var Pe=A(k,n);if(Pe.isSupported()){if(Pe.method==="NONE"){de=void 0;break}de||(de={}),de[Pe.keyFormat]&&(de=E({},de)),de[Pe.keyFormat]=Pe}else h.logger.warn('[Keys] Ignoring invalid EXT-X-KEY tag: "'+k+'"');break}case"START":{var ke=new s.AttrList(k),Je=ke.decimalFloatingPoint("TIME-OFFSET");(0,H.isFiniteNumber)(Je)&&(f.startTimeOffset=Je);break}case"MAP":{var qe=new s.AttrList(k);if(ie.duration){var it=new N.Fragment(p,n);w(it,qe,t,de),P=it,ie.initSegment=P,P.rawProgramDateTime&&!ie.rawProgramDateTime&&(ie.rawProgramDateTime=P.rawProgramDateTime)}else w(ie,qe,t,de),P=ie,Qe=!0;break}case"SERVER-CONTROL":{var rt=new s.AttrList(k);f.canBlockReload=rt.bool("CAN-BLOCK-RELOAD"),f.canSkipUntil=rt.optionalFloat("CAN-SKIP-UNTIL",0),f.canSkipDateRanges=f.canSkipUntil>0&&rt.bool("CAN-SKIP-DATERANGES"),f.partHoldBack=rt.optionalFloat("PART-HOLD-BACK",0),f.holdBack=rt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var et=new s.AttrList(k);f.partTarget=et.decimalFloatingPoint("PART-TARGET");break}case"PART":{var At=f.partList;At||(At=f.partList=[]);var We=V>0?At[At.length-1]:void 0,Ge=V++,De=new N.Part(new s.AttrList(k),ie,n,Ge,We);At.push(De),ie.duration+=De.duration;break}case"PRELOAD-HINT":{var Te=new s.AttrList(k);f.preloadHint=Te;break}case"RENDITION-REPORT":{var Oe=new s.AttrList(k);f.renditionReports=f.renditionReports||[],f.renditionReports.push(Oe);break}default:h.logger.warn("line parsed but not handled: "+xe);break}}}ce&&!ce.relurl?(F.pop(),J-=ce.duration,f.partList&&(f.fragmentHint=ce)):f.partList&&(T(ie,ce),ie.cc=ne,f.fragmentHint=ie,de&&y(ie,de,f));var le=F.length,fe=F[0],Ce=F[le-1];if(J+=f.skippedSegments*f.targetduration,J>0&&le&&Ce){f.averagetargetduration=J/le;var we=Ce.sn;f.endSN=we!=="initSegment"?we:0,f.live||(Ce.endList=!0),fe&&(f.startCC=fe.cc)}else f.endSN=0,f.startCC=0;return f.fragmentHint&&(J+=f.fragmentHint.duration),f.totalduration=J,f.endCC=ne,Fe>0&&i(F,Fe),f},o}();function A(o,r){var a,n,t=new s.AttrList(o),p=(a=t.enumeratedString("METHOD"))!=null?a:"",_=t.URI,f=t.hexadecimalInteger("IV"),F=t.enumeratedString("KEYFORMATVERSIONS"),P=(n=t.enumeratedString("KEYFORMAT"))!=null?n:"identity";_&&t.IV&&!f&&h.logger.error("Invalid IV: "+t.IV);var W=_?S.resolve(_,r):"",V=(F||"1").split("/").map(Number).filter(Number.isFinite);return new l.LevelKey(p,W,P,V,f)}function u(o,r){["video","audio","text"].forEach(function(a){var n=o.filter(function(p){return(0,x.isCodecType)(p,a)});if(n.length){var t=n.filter(function(p){return p.lastIndexOf("avc1",0)===0||p.lastIndexOf("mp4a",0)===0});r[a+"Codec"]=t.length>0?t[0]:n[0],o=o.filter(function(p){return n.indexOf(p)===-1})}}),r.unknownCodecs=o}function R(o,r,a){var n=r[a];n&&(o[a]=n)}function i(o,r){for(var a=o[r],n=r;n--;){var t=o[n];if(!t)return;t.programDateTime=a.programDateTime-t.duration*1e3,a=t}}function T(o,r){o.rawProgramDateTime?o.programDateTime=Date.parse(o.rawProgramDateTime):r!=null&&r.programDateTime&&(o.programDateTime=r.endProgramDateTime),(0,H.isFiniteNumber)(o.programDateTime)||(o.programDateTime=null,o.rawProgramDateTime=null)}function w(o,r,a,n){o.relurl=r.URI,r.BYTERANGE&&o.setByteRange(r.BYTERANGE),o.level=a,o.sn="initSegment",n&&(o.levelkeys=n),o.initSegment=null}function y(o,r,a){o.levelkeys=r;var n=a.encryptedFragments;(!n.length||n[n.length-1].levelkeys!==r)&&Object.keys(r).some(function(t){return r[t].isCommonEncryption})&&n.push(o)}},"./src/loader/playlist-loader.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>E});var H=O("./src/polyfills/number.ts"),e=O("./src/events.ts"),M=O("./src/errors.ts"),D=O("./src/utils/logger.ts"),N=O("./src/loader/m3u8-parser.ts"),c=O("./src/types/loader.ts"),l=O("./src/utils/attr-list.ts");function s(v){var d=v.type;switch(d){case c.PlaylistContextType.AUDIO_TRACK:return c.PlaylistLevelType.AUDIO;case c.PlaylistContextType.SUBTITLE_TRACK:return c.PlaylistLevelType.SUBTITLE;default:return c.PlaylistLevelType.MAIN}}function h(v,d){var m=v.url;return(m===void 0||m.indexOf("data:")===0)&&(m=d.url),m}var x=function(){function v(m){this.hls=void 0,this.loaders=Object.create(null),this.hls=m,this.registerListeners()}var d=v.prototype;return d.startLoad=function(g){},d.stopLoad=function(){this.destroyInternalLoaders()},d.registerListeners=function(){var g=this.hls;g.on(e.Events.MANIFEST_LOADING,this.onManifestLoading,this),g.on(e.Events.LEVEL_LOADING,this.onLevelLoading,this),g.on(e.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),g.on(e.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},d.unregisterListeners=function(){var g=this.hls;g.off(e.Events.MANIFEST_LOADING,this.onManifestLoading,this),g.off(e.Events.LEVEL_LOADING,this.onLevelLoading,this),g.off(e.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),g.off(e.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},d.createInternalLoader=function(g){var S=this.hls.config,A=S.pLoader,u=S.loader,R=A||u,i=new R(S);return g.loader=i,this.loaders[g.type]=i,i},d.getInternalLoader=function(g){return this.loaders[g.type]},d.resetInternalLoader=function(g){this.loaders[g]&&delete this.loaders[g]},d.destroyInternalLoaders=function(){for(var g in this.loaders){var S=this.loaders[g];S&&S.destroy(),this.resetInternalLoader(g)}},d.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},d.onManifestLoading=function(g,S){var A=S.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:c.PlaylistContextType.MANIFEST,url:A,deliveryDirectives:null})},d.onLevelLoading=function(g,S){var A=S.id,u=S.level,R=S.url,i=S.deliveryDirectives;this.load({id:A,groupId:null,level:u,responseType:"text",type:c.PlaylistContextType.LEVEL,url:R,deliveryDirectives:i})},d.onAudioTrackLoading=function(g,S){var A=S.id,u=S.groupId,R=S.url,i=S.deliveryDirectives;this.load({id:A,groupId:u,level:null,responseType:"text",type:c.PlaylistContextType.AUDIO_TRACK,url:R,deliveryDirectives:i})},d.onSubtitleTrackLoading=function(g,S){var A=S.id,u=S.groupId,R=S.url,i=S.deliveryDirectives;this.load({id:A,groupId:u,level:null,responseType:"text",type:c.PlaylistContextType.SUBTITLE_TRACK,url:R,deliveryDirectives:i})},d.load=function(g){var S,A=this.hls.config,u=this.getInternalLoader(g);if(u){var R=u.context;if(R&&R.url===g.url){D.logger.trace("[playlist-loader]: playlist request ongoing");return}D.logger.log("[playlist-loader]: aborting previous loader for type: "+g.type),u.abort()}var i,T,w,y;switch(g.type){case c.PlaylistContextType.MANIFEST:i=A.manifestLoadingMaxRetry,T=A.manifestLoadingTimeOut,w=A.manifestLoadingRetryDelay,y=A.manifestLoadingMaxRetryTimeout;break;case c.PlaylistContextType.LEVEL:case c.PlaylistContextType.AUDIO_TRACK:case c.PlaylistContextType.SUBTITLE_TRACK:i=0,T=A.levelLoadingTimeOut;break;default:i=A.levelLoadingMaxRetry,T=A.levelLoadingTimeOut,w=A.levelLoadingRetryDelay,y=A.levelLoadingMaxRetryTimeout;break}if(u=this.createInternalLoader(g),(S=g.deliveryDirectives)!==null&&S!==void 0&&S.part){var o;if(g.type===c.PlaylistContextType.LEVEL&&g.level!==null?o=this.hls.levels[g.level].details:g.type===c.PlaylistContextType.AUDIO_TRACK&&g.id!==null?o=this.hls.audioTracks[g.id].details:g.type===c.PlaylistContextType.SUBTITLE_TRACK&&g.id!==null&&(o=this.hls.subtitleTracks[g.id].details),o){var r=o.partTarget,a=o.targetduration;r&&a&&(T=Math.min(Math.max(r*3,a*.8)*1e3,T))}}var n={timeout:T,maxRetry:i,retryDelay:w,maxRetryDelay:y,highWaterMark:0},t={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(g,n,t)},d.loadsuccess=function(g,S,A,u){u===void 0&&(u=null),this.resetInternalLoader(A.type);var R=g.data;if(R.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(g,A,"no EXTM3U delimiter",u);return}S.parsing.start=performance.now(),R.indexOf("#EXTINF:")>0||R.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(g,S,A,u):this.handleMasterPlaylist(g,S,A,u)},d.loaderror=function(g,S,A){A===void 0&&(A=null),this.handleNetworkError(S,A,!1,g)},d.loadtimeout=function(g,S,A){A===void 0&&(A=null),this.handleNetworkError(S,A,!0)},d.handleMasterPlaylist=function(g,S,A,u){var R=this.hls,i=g.data,T=h(g,A),w=N.default.parseMasterPlaylist(i,T),y=w.levels,o=w.sessionData,r=w.sessionKeys;if(!y.length){this.handleManifestParsingError(g,A,"no level found in manifest",u);return}var a=y.map(function(F){return{id:F.attrs.AUDIO,audioCodec:F.audioCodec}}),n=y.map(function(F){return{id:F.attrs.SUBTITLES,textCodec:F.textCodec}}),t=N.default.parseMasterPlaylistMedia(i,T,"AUDIO",a),p=N.default.parseMasterPlaylistMedia(i,T,"SUBTITLES",n),_=N.default.parseMasterPlaylistMedia(i,T,"CLOSED-CAPTIONS");if(t.length){var f=t.some(function(F){return!F.url});!f&&y[0].audioCodec&&!y[0].attrs.AUDIO&&(D.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),t.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new l.AttrList({}),bitrate:0,url:""}))}R.trigger(e.Events.MANIFEST_LOADED,{levels:y,audioTracks:t,subtitles:p,captions:_,url:T,stats:S,networkDetails:u,sessionData:o,sessionKeys:r})},d.handleTrackOrLevelPlaylist=function(g,S,A,u){var R=this.hls,i=A.id,T=A.level,w=A.type,y=h(g,A),o=(0,H.isFiniteNumber)(i)?i:0,r=(0,H.isFiniteNumber)(T)?T:o,a=s(A),n=N.default.parseLevelPlaylist(g.data,y,r,a,o);if(!n.fragments.length){R.trigger(e.Events.ERROR,{type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:y,reason:"no fragments found in level",level:typeof A.level=="number"?A.level:void 0});return}if(w===c.PlaylistContextType.MANIFEST){var t={attrs:new l.AttrList({}),bitrate:0,details:n,name:"",url:y};R.trigger(e.Events.MANIFEST_LOADED,{levels:[t],audioTracks:[],url:y,stats:S,networkDetails:u,sessionData:null,sessionKeys:null})}S.parsing.end=performance.now(),A.levelDetails=n,this.handlePlaylistLoaded(g,S,A,u)},d.handleManifestParsingError=function(g,S,A,u){this.hls.trigger(e.Events.ERROR,{type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:S.type===c.PlaylistContextType.MANIFEST,url:g.url,reason:A,response:g,context:S,networkDetails:u})},d.handleNetworkError=function(g,S,A,u){A===void 0&&(A=!1),D.logger.warn("[playlist-loader]: A network "+(A?"timeout":"error")+" occurred while loading "+g.type+" level: "+g.level+" id: "+g.id+' group-id: "'+g.groupId+'"');var R=M.ErrorDetails.UNKNOWN,i=!1,T=this.getInternalLoader(g);switch(g.type){case c.PlaylistContextType.MANIFEST:R=A?M.ErrorDetails.MANIFEST_LOAD_TIMEOUT:M.ErrorDetails.MANIFEST_LOAD_ERROR,i=!0;break;case c.PlaylistContextType.LEVEL:R=A?M.ErrorDetails.LEVEL_LOAD_TIMEOUT:M.ErrorDetails.LEVEL_LOAD_ERROR,i=!1;break;case c.PlaylistContextType.AUDIO_TRACK:R=A?M.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:M.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,i=!1;break;case c.PlaylistContextType.SUBTITLE_TRACK:R=A?M.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:M.ErrorDetails.SUBTITLE_LOAD_ERROR,i=!1;break}T&&this.resetInternalLoader(g.type);var w={type:M.ErrorTypes.NETWORK_ERROR,details:R,fatal:i,url:g.url,loader:T,context:g,networkDetails:S};u&&(w.response=u),this.hls.trigger(e.Events.ERROR,w)},d.handlePlaylistLoaded=function(g,S,A,u){var R=A.type,i=A.level,T=A.id,w=A.groupId,y=A.loader,o=A.levelDetails,r=A.deliveryDirectives;if(!(o!=null&&o.targetduration)){this.handleManifestParsingError(g,A,"invalid target duration",u);return}if(!y)return;o.live&&(y.getCacheAge&&(o.ageHeader=y.getCacheAge()||0),(!y.getCacheAge||isNaN(o.ageHeader))&&(o.ageHeader=0));switch(R){case c.PlaylistContextType.MANIFEST:case c.PlaylistContextType.LEVEL:this.hls.trigger(e.Events.LEVEL_LOADED,{details:o,level:i||0,id:T||0,stats:S,networkDetails:u,deliveryDirectives:r});break;case c.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(e.Events.AUDIO_TRACK_LOADED,{details:o,id:T||0,groupId:w||"",stats:S,networkDetails:u,deliveryDirectives:r});break;case c.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(e.Events.SUBTITLE_TRACK_LOADED,{details:o,id:T||0,groupId:w||"",stats:S,networkDetails:u,deliveryDirectives:r});break}},v}();const E=x},"./src/polyfills/number.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{MAX_SAFE_INTEGER:()=>e,isFiniteNumber:()=>H});var H=Number.isFinite||function(M){return typeof M=="number"&&isFinite(M)},e=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>e});var H=function(){function M(){}return M.getSilentFrame=function(N,c){switch(N){case"mp4a.40.2":if(c===1)return new Uint8Array([0,200,0,128,35,128]);if(c===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(c===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(c===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(c===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(c===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(c===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(c===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(c===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},M}();const e=H},"./src/remux/mp4-generator.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>M});var H=Math.pow(2,32)-1,e=function(){function D(){}return D.init=function(){D.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 c;for(c in D.types)D.types.hasOwnProperty(c)&&(D.types[c]=[c.charCodeAt(0),c.charCodeAt(1),c.charCodeAt(2),c.charCodeAt(3)]);var l=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),s=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);D.HDLR_TYPES={video:l,audio:s};var h=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),x=new Uint8Array([0,0,0,0,0,0,0,0]);D.STTS=D.STSC=D.STCO=x,D.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),D.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),D.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),D.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var E=new Uint8Array([105,115,111,109]),v=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);D.FTYP=D.box(D.types.ftyp,E,d,E,v),D.DINF=D.box(D.types.dinf,D.box(D.types.dref,h))},D.box=function(c){for(var l=8,s=arguments.length,h=new Array(s>1?s-1:0),x=1;x<s;x++)h[x-1]=arguments[x];for(var E=h.length,v=E;E--;)l+=h[E].byteLength;var d=new Uint8Array(l);for(d[0]=l>>24&255,d[1]=l>>16&255,d[2]=l>>8&255,d[3]=l&255,d.set(c,4),E=0,l=8;E<v;E++)d.set(h[E],l),l+=h[E].byteLength;return d},D.hdlr=function(c){return D.box(D.types.hdlr,D.HDLR_TYPES[c])},D.mdat=function(c){return D.box(D.types.mdat,c)},D.mdhd=function(c,l){l*=c;var s=Math.floor(l/(H+1)),h=Math.floor(l%(H+1));return D.box(D.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,c>>24&255,c>>16&255,c>>8&255,c&255,s>>24,s>>16&255,s>>8&255,s&255,h>>24,h>>16&255,h>>8&255,h&255,85,196,0,0]))},D.mdia=function(c){return D.box(D.types.mdia,D.mdhd(c.timescale,c.duration),D.hdlr(c.type),D.minf(c))},D.mfhd=function(c){return D.box(D.types.mfhd,new Uint8Array([0,0,0,0,c>>24,c>>16&255,c>>8&255,c&255]))},D.minf=function(c){return c.type==="audio"?D.box(D.types.minf,D.box(D.types.smhd,D.SMHD),D.DINF,D.stbl(c)):D.box(D.types.minf,D.box(D.types.vmhd,D.VMHD),D.DINF,D.stbl(c))},D.moof=function(c,l,s){return D.box(D.types.moof,D.mfhd(c),D.traf(s,l))},D.moov=function(c){for(var l=c.length,s=[];l--;)s[l]=D.trak(c[l]);return D.box.apply(null,[D.types.moov,D.mvhd(c[0].timescale,c[0].duration)].concat(s).concat(D.mvex(c)))},D.mvex=function(c){for(var l=c.length,s=[];l--;)s[l]=D.trex(c[l]);return D.box.apply(null,[D.types.mvex].concat(s))},D.mvhd=function(c,l){l*=c;var s=Math.floor(l/(H+1)),h=Math.floor(l%(H+1)),x=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,c>>24&255,c>>16&255,c>>8&255,c&255,s>>24,s>>16&255,s>>8&255,s&255,h>>24,h>>16&255,h>>8&255,h&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 D.box(D.types.mvhd,x)},D.sdtp=function(c){var l=c.samples||[],s=new Uint8Array(4+l.length),h,x;for(h=0;h<l.length;h++)x=l[h].flags,s[h+4]=x.dependsOn<<4|x.isDependedOn<<2|x.hasRedundancy;return D.box(D.types.sdtp,s)},D.stbl=function(c){return D.box(D.types.stbl,D.stsd(c),D.box(D.types.stts,D.STTS),D.box(D.types.stsc,D.STSC),D.box(D.types.stsz,D.STSZ),D.box(D.types.stco,D.STCO))},D.avc1=function(c){var l=[],s=[],h,x,E;for(h=0;h<c.sps.length;h++)x=c.sps[h],E=x.byteLength,l.push(E>>>8&255),l.push(E&255),l=l.concat(Array.prototype.slice.call(x));for(h=0;h<c.pps.length;h++)x=c.pps[h],E=x.byteLength,s.push(E>>>8&255),s.push(E&255),s=s.concat(Array.prototype.slice.call(x));var v=D.box(D.types.avcC,new Uint8Array([1,l[3],l[4],l[5],252|3,224|c.sps.length].concat(l).concat([c.pps.length]).concat(s))),d=c.width,m=c.height,g=c.pixelRatio[0],S=c.pixelRatio[1];return D.box(D.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,d>>8&255,d&255,m>>8&255,m&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),v,D.box(D.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),D.box(D.types.pasp,new Uint8Array([g>>24,g>>16&255,g>>8&255,g&255,S>>24,S>>16&255,S>>8&255,S&255])))},D.esds=function(c){var l=c.config.length;return new Uint8Array([0,0,0,0,3,23+l,0,1,0,4,15+l,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([l]).concat(c.config).concat([6,1,2]))},D.mp4a=function(c){var l=c.samplerate;return D.box(D.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,c.channelCount,0,16,0,0,0,0,l>>8&255,l&255,0,0]),D.box(D.types.esds,D.esds(c)))},D.mp3=function(c){var l=c.samplerate;return D.box(D.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,c.channelCount,0,16,0,0,0,0,l>>8&255,l&255,0,0]))},D.stsd=function(c){return c.type==="audio"?c.segmentCodec==="mp3"&&c.codec==="mp3"?D.box(D.types.stsd,D.STSD,D.mp3(c)):D.box(D.types.stsd,D.STSD,D.mp4a(c)):D.box(D.types.stsd,D.STSD,D.avc1(c))},D.tkhd=function(c){var l=c.id,s=c.duration*c.timescale,h=c.width,x=c.height,E=Math.floor(s/(H+1)),v=Math.floor(s%(H+1));return D.box(D.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,l>>24&255,l>>16&255,l>>8&255,l&255,0,0,0,0,E>>24,E>>16&255,E>>8&255,E&255,v>>24,v>>16&255,v>>8&255,v&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,h>>8&255,h&255,0,0,x>>8&255,x&255,0,0]))},D.traf=function(c,l){var s=D.sdtp(c),h=c.id,x=Math.floor(l/(H+1)),E=Math.floor(l%(H+1));return D.box(D.types.traf,D.box(D.types.tfhd,new Uint8Array([0,0,0,0,h>>24,h>>16&255,h>>8&255,h&255])),D.box(D.types.tfdt,new Uint8Array([1,0,0,0,x>>24,x>>16&255,x>>8&255,x&255,E>>24,E>>16&255,E>>8&255,E&255])),D.trun(c,s.length+16+20+8+16+8+8),s)},D.trak=function(c){return c.duration=c.duration||4294967295,D.box(D.types.trak,D.tkhd(c),D.mdia(c))},D.trex=function(c){var l=c.id;return D.box(D.types.trex,new Uint8Array([0,0,0,0,l>>24,l>>16&255,l>>8&255,l&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},D.trun=function(c,l){var s=c.samples||[],h=s.length,x=12+16*h,E=new Uint8Array(x),v,d,m,g,S,A;for(l+=8+x,E.set([c.type==="video"?1:0,0,15,1,h>>>24&255,h>>>16&255,h>>>8&255,h&255,l>>>24&255,l>>>16&255,l>>>8&255,l&255],0),v=0;v<h;v++)d=s[v],m=d.duration,g=d.size,S=d.flags,A=d.cts,E.set([m>>>24&255,m>>>16&255,m>>>8&255,m&255,g>>>24&255,g>>>16&255,g>>>8&255,g&255,S.isLeading<<2|S.dependsOn,S.isDependedOn<<6|S.hasRedundancy<<4|S.paddingValue<<1|S.isNonSync,S.degradPrio&240<<8,S.degradPrio&15,A>>>24&255,A>>>16&255,A>>>8&255,A&255],12+16*v);return D.box(D.types.trun,E)},D.initSegment=function(c){D.types||D.init();var l=D.moov(c),s=new Uint8Array(D.FTYP.byteLength+l.byteLength);return s.set(D.FTYP),s.set(l,D.FTYP.byteLength),s},D}();e.types=void 0,e.HDLR_TYPES=void 0,e.STTS=void 0,e.STSC=void 0,e.STCO=void 0,e.STSZ=void 0,e.VMHD=void 0,e.SMHD=void 0,e.STSD=void 0,e.FTYP=void 0,e.DINF=void 0;const M=e},"./src/remux/mp4-remuxer.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>g,flushTextTrackMetadataCueSamples:()=>u,flushTextTrackUserdataCueSamples:()=>R,normalizePts:()=>S});var H=O("./src/polyfills/number.ts"),e=O("./src/remux/aac-helper.ts"),M=O("./src/remux/mp4-generator.ts"),D=O("./src/events.ts"),N=O("./src/errors.ts"),c=O("./src/utils/logger.ts"),l=O("./src/types/loader.ts"),s=O("./src/utils/timescale-conversion.ts");function h(){return h=Object.assign?Object.assign.bind():function(w){for(var y=1;y<arguments.length;y++){var o=arguments[y];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(w[r]=o[r])}return w},h.apply(this,arguments)}var x=10*1e3,E=1024,v=1152,d=null,m=null,g=function(){function w(o,r,a,n){if(n===void 0&&(n=""),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.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=o,this.config=r,this.typeSupported=a,this.ISGenerated=!1,d===null){var t=navigator.userAgent||"",p=t.match(/Chrome\/(\d+)/i);d=p?parseInt(p[1]):0}if(m===null){var _=navigator.userAgent.match(/Safari\/(\d+)/i);m=_?parseInt(_[1]):0}}var y=w.prototype;return y.destroy=function(){},y.resetTimeStamp=function(r){c.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=r},y.resetNextTimestamp=function(){c.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},y.resetInitSegment=function(){c.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},y.getVideoStartPts=function(r){var a=!1,n=r.reduce(function(t,p){var _=p.pts-t;return _<-4294967296?(a=!0,S(t,p.pts)):_>0?t:p.pts},r[0].pts);return a&&c.logger.debug("PTS rollover detected"),n},y.remux=function(r,a,n,t,p,_,f,F){var P,W,V,J,ne,ce,ie=p,xe=p,ge=r.pid>-1,de=a.pid>-1,Fe=a.samples.length,Qe=r.samples.length>0,Ve=f&&Fe>0||Fe>1,Ne=(!ge||Qe)&&(!de||Ve)||this.ISGenerated||f;if(Ne){this.ISGenerated||(V=this.generateIS(r,a,p));var Ue=this.isVideoContiguous,q=-1,k;if(Ve&&(q=A(a.samples),!Ue&&this.config.forceKeyFrameOnDiscontinuity))if(ce=!0,q>0){c.logger.warn("[mp4-remuxer]: Dropped "+q+" out of "+Fe+" video samples due to a missing keyframe");var z=this.getVideoStartPts(a.samples);a.samples=a.samples.slice(q),a.dropped+=q,xe+=(a.samples[0].pts-z)/a.inputTimeScale,k=xe}else q===-1&&(c.logger.warn("[mp4-remuxer]: No keyframe found out of "+Fe+" video samples"),ce=!1);if(this.ISGenerated){if(Qe&&Ve){var X=this.getVideoStartPts(a.samples),re=S(r.samples[0].pts,X)-X,te=re/a.inputTimeScale;ie+=Math.max(0,te),xe+=Math.max(0,-te)}if(Qe){if(r.samplerate||(c.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),V=this.generateIS(r,a,p)),W=this.remuxAudio(r,ie,this.isAudioContiguous,_,de||Ve||F===l.PlaylistLevelType.AUDIO?xe:void 0),Ve){var ae=W?W.endPTS-W.startPTS:0;a.inputTimeScale||(c.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),V=this.generateIS(r,a,p)),P=this.remuxVideo(a,xe,Ue,ae)}}else Ve&&(P=this.remuxVideo(a,xe,Ue,0));P&&(P.firstKeyFrame=q,P.independent=q!==-1,P.firstKeyFramePTS=k)}}return this.ISGenerated&&(n.samples.length&&(ne=u(n,p,this._initPTS,this._initDTS)),t.samples.length&&(J=R(t,p,this._initPTS))),{audio:W,video:P,initSegment:V,independent:ce,text:J,id3:ne}},y.generateIS=function(r,a,n){var t=r.samples,p=a.samples,_=this.typeSupported,f={},F=!(0,H.isFiniteNumber)(this._initPTS),P="audio/mp4",W,V,J;if(F&&(W=V=Infinity),r.config&&t.length){r.timescale=r.samplerate;switch(r.segmentCodec){case"mp3":_.mpeg?(P="audio/mpeg",r.codec=""):_.mp3&&(r.codec="mp3");break}f.audio={id:"audio",container:P,codec:r.codec,initSegment:r.segmentCodec==="mp3"&&_.mpeg?new Uint8Array(0):M.default.initSegment([r]),metadata:{channelCount:r.channelCount}},F&&(J=r.inputTimeScale,W=V=t[0].pts-Math.round(J*n))}if(a.sps&&a.pps&&p.length&&(a.timescale=a.inputTimeScale,f.video={id:"main",container:"video/mp4",codec:a.codec,initSegment:M.default.initSegment([a]),metadata:{width:a.width,height:a.height}},F)){J=a.inputTimeScale;var ne=this.getVideoStartPts(p),ce=Math.round(J*n);V=Math.min(V,S(p[0].dts,ne)-ce),W=Math.min(W,ne-ce)}if(Object.keys(f).length)return this.ISGenerated=!0,F&&(this._initPTS=W,this._initDTS=V),{tracks:f,initPTS:W,timescale:J}},y.remuxVideo=function(r,a,n,t){var p=r.inputTimeScale,_=r.samples,f=[],F=_.length,P=this._initPTS,W=this.nextAvcDts,V=8,J=this.videoSampleDuration,ne,ce,ie=Number.POSITIVE_INFINITY,xe=Number.NEGATIVE_INFINITY,ge=!1;if(!n||W===null){var de=a*p,Fe=_[0].pts-S(_[0].dts,_[0].pts);W=de-Fe}for(var Qe=0;Qe<F;Qe++){var Ve=_[Qe];Ve.pts=S(Ve.pts-P,W),Ve.dts=S(Ve.dts-P,W),Ve.dts<_[Qe>0?Qe-1:Qe].dts&&(ge=!0)}ge&&_.sort(function(Et,Lt){var Ht=Et.dts-Lt.dts,mr=Et.pts-Lt.pts;return Ht||mr}),ne=_[0].dts,ce=_[_.length-1].dts;var Ne=ce-ne,Ue=Ne?Math.round(Ne/(F-1)):J||r.inputTimeScale/30;if(n){var q=ne-W,k=q>Ue,z=q<-1;if((k||z)&&(k?c.logger.warn("AVC: "+(0,s.toMsFromMpegTsClock)(q,!0)+" ms ("+q+"dts) hole between fragments detected, filling it"):c.logger.warn("AVC: "+(0,s.toMsFromMpegTsClock)(-q,!0)+" ms ("+q+"dts) overlapping between fragments detected"),!z||W>_[0].pts)){ne=W;var X=_[0].pts-q;_[0].dts=ne,_[0].pts=X,c.logger.log("Video: First PTS/DTS adjusted: "+(0,s.toMsFromMpegTsClock)(X,!0)+"/"+(0,s.toMsFromMpegTsClock)(ne,!0)+", delta: "+(0,s.toMsFromMpegTsClock)(q,!0)+" ms")}}ne=Math.max(0,ne);for(var re=0,te=0,ae=0;ae<F;ae++){for(var ye=_[ae],Le=ye.units,Pe=Le.length,ke=0,Je=0;Je<Pe;Je++)ke+=Le[Je].data.length;te+=ke,re+=Pe,ye.length=ke,ye.dts=Math.max(ye.dts,ne),ie=Math.min(ye.pts,ie),xe=Math.max(ye.pts,xe)}ce=_[F-1].dts;var qe=te+4*re+8,it;try{it=new Uint8Array(qe)}catch(Et){this.observer.emit(D.Events.ERROR,D.Events.ERROR,{type:N.ErrorTypes.MUX_ERROR,details:N.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:qe,reason:"fail allocating video mdat "+qe});return}var rt=new DataView(it.buffer);rt.setUint32(0,qe),it.set(M.default.types.mdat,4);for(var et=!1,At=Number.POSITIVE_INFINITY,We=Number.POSITIVE_INFINITY,Ge=Number.NEGATIVE_INFINITY,De=Number.NEGATIVE_INFINITY,Te=0;Te<F;Te++){for(var Oe=_[Te],le=Oe.units,fe=0,Ce=0,we=le.length;Ce<we;Ce++){var Me=le[Ce],$e=Me.data,Ie=Me.data.byteLength;rt.setUint32(V,Ie),V+=4,it.set($e,V),V+=Ie,fe+=4+Ie}var Ye=void 0;if(Te<F-1)J=_[Te+1].dts-Oe.dts,Ye=_[Te+1].pts-Oe.pts;else{var tt=this.config,at=Te>0?Oe.dts-_[Te-1].dts:Ue;if(Ye=Te>0?Oe.pts-_[Te-1].pts:Ue,tt.stretchShortVideoTrack&&this.nextAudioPts!==null){var mt=Math.floor(tt.maxBufferHole*p),ft=(t?ie+t*p:this.nextAudioPts)-Oe.pts;ft>mt?(J=ft-at,J<0?J=at:et=!0,c.logger.log("[mp4-remuxer]: It is approximately "+ft/90+" ms to the next segment; using duration "+J/90+" ms for the last video frame.")):J=at}else J=at}var Ze=Math.round(Oe.pts-Oe.dts);At=Math.min(At,J),Ge=Math.max(Ge,J),We=Math.min(We,Ye),De=Math.max(De,Ye),f.push(new i(Oe.key,J,fe,Ze))}if(f.length){if(d){if(d<70){var yt=f[0].flags;yt.dependsOn=2,yt.isNonSync=0}}else if(m&&(De-We<Ge-At&&Ue/Ge<.025&&f[0].cts===0)){c.logger.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");for(var lt=ne,gt=0,xt=f.length;gt<xt;gt++){var bt=lt+f[gt].duration,Ot=lt+f[gt].cts;if(gt<xt-1){var Tt=bt+f[gt+1].cts;f[gt].duration=Tt-Ot}else f[gt].duration=gt?f[gt-1].duration:Ue;f[gt].cts=0,lt=bt}}}console.assert(J!==null,"mp4SampleDuration must be computed"),J=et||!J?Ue:J,this.nextAvcDts=W=ce+J,this.videoSampleDuration=J,this.isVideoContiguous=!0;var Vt=M.default.moof(r.sequenceNumber++,ne,h({},r,{samples:f})),Zt="video",ut={data1:Vt,data2:it,startPTS:ie/p,endPTS:(xe+J)/p,startDTS:ne/p,endDTS:W/p,type:Zt,hasAudio:!1,hasVideo:!0,nb:f.length,dropped:r.dropped};return r.samples=[],r.dropped=0,console.assert(it.length,"MDAT length must not be zero"),ut},y.remuxAudio=function(r,a,n,t,p){var _=r.inputTimeScale,f=r.samplerate?r.samplerate:_,F=_/f,P=r.segmentCodec==="aac"?E:v,W=P*F,V=this._initPTS,J=r.segmentCodec==="mp3"&&this.typeSupported.mpeg,ne=[],ce=p!==void 0,ie=r.samples,xe=J?0:8,ge=this.nextAudioPts||-1,de=a*_;if(this.isAudioContiguous=n=n||ie.length&&ge>0&&(t&&Math.abs(de-ge)<9e3||Math.abs(S(ie[0].pts-V,de)-ge)<20*W),ie.forEach(function(Me){Me.pts=S(Me.pts-V,de)}),!n||ge<0){if(ie=ie.filter(function(Me){return Me.pts>=0}),!ie.length)return;p===0?ge=0:t&&!ce?ge=Math.max(0,de):ge=ie[0].pts}if(r.segmentCodec==="aac")for(var Fe=this.config.maxAudioFramesDrift,Qe=0,Ve=ge;Qe<ie.length;Qe++){var Ne=ie[Qe],Ue=Ne.pts,q=Ue-Ve,k=Math.abs(1e3*q/_);if(q<=-Fe*W&&ce)Qe===0&&(c.logger.warn("Audio frame @ "+(Ue/_).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*q/_)+" ms."),this.nextAudioPts=ge=Ve=Ue);else if(q>=Fe*W&&k<x&&ce){var z=Math.round(q/W);Ve=Ue-z*W,Ve<0&&(z--,Ve+=W),Qe===0&&(this.nextAudioPts=ge=Ve),c.logger.warn("[mp4-remuxer]: Injecting "+z+" audio frame @ "+(Ve/_).toFixed(3)+"s due to "+Math.round(1e3*q/_)+" ms gap.");for(var X=0;X<z;X++){var re=Math.max(Ve,0),te=e.default.getSilentFrame(r.manifestCodec||r.codec,r.channelCount);te||(c.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),te=Ne.unit.subarray()),ie.splice(Qe,0,{unit:te,pts:re}),Ve+=W,Qe++}}Ne.pts=Ve,Ve+=W}for(var ae=null,ye=null,Le,Pe=0,ke=ie.length;ke--;)Pe+=ie[ke].unit.byteLength;for(var Je=0,qe=ie.length;Je<qe;Je++){var it=ie[Je],rt=it.unit,et=it.pts;if(ye!==null){var At=ne[Je-1];At.duration=Math.round((et-ye)/F)}else if(n&&r.segmentCodec==="aac"&&(et=ge),ae=et,Pe>0){Pe+=xe;try{Le=new Uint8Array(Pe)}catch(Me){this.observer.emit(D.Events.ERROR,D.Events.ERROR,{type:N.ErrorTypes.MUX_ERROR,details:N.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Pe,reason:"fail allocating audio mdat "+Pe});return}if(!J){var We=new DataView(Le.buffer);We.setUint32(0,Pe),Le.set(M.default.types.mdat,4)}}else return;Le.set(rt,xe);var Ge=rt.byteLength;xe+=Ge,ne.push(new i(!0,P,Ge,0)),ye=et}var De=ne.length;if(!De)return;var Te=ne[ne.length-1];this.nextAudioPts=ge=ye+F*Te.duration;var Oe=J?new Uint8Array(0):M.default.moof(r.sequenceNumber++,ae/F,h({},r,{samples:ne}));r.samples=[];var le=ae/_,fe=ge/_,Ce="audio",we={data1:Oe,data2:Le,startPTS:le,endPTS:fe,startDTS:le,endDTS:fe,type:Ce,hasAudio:!0,hasVideo:!1,nb:De};return this.isAudioContiguous=!0,console.assert(Le.length,"MDAT length must not be zero"),we},y.remuxEmptyAudio=function(r,a,n,t){var p=r.inputTimeScale,_=r.samplerate?r.samplerate:p,f=p/_,F=this.nextAudioPts,P=(F!==null?F:t.startDTS*p)+this._initDTS,W=t.endDTS*p+this._initDTS,V=f*E,J=Math.ceil((W-P)/V),ne=e.default.getSilentFrame(r.manifestCodec||r.codec,r.channelCount);if(c.logger.warn("[mp4-remuxer]: remux empty Audio"),!ne){c.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ce=[],ie=0;ie<J;ie++){var xe=P+ie*V;ce.push({unit:ne,pts:xe,dts:xe})}return r.samples=ce,this.remuxAudio(r,a,n,!1)},w}();function S(w,y){var o;if(y===null)return w;for(y<w?o=-8589934592:o=8589934592;Math.abs(w-y)>4294967296;)w+=o;return w}function A(w){for(var y=0;y<w.length;y++)if(w[y].key)return y;return-1}function u(w,y,o,r){var a=w.samples.length;if(!a)return;for(var n=w.inputTimeScale,t=0;t<a;t++){var p=w.samples[t];p.pts=S(p.pts-o,y*n)/n,p.dts=S(p.dts-r,y*n)/n}var _=w.samples;return w.samples=[],{samples:_}}function R(w,y,o){var r=w.samples.length;if(!r)return;for(var a=w.inputTimeScale,n=0;n<r;n++){var t=w.samples[n];t.pts=S(t.pts-o,y*a)/a}w.samples.sort(function(_,f){return _.pts-f.pts});var p=w.samples;return w.samples=[],{samples:p}}var i=function(y,o,r,a){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=o,this.size=r,this.cts=a,this.flags=new T(y)},T=function(y){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=y?2:1,this.isNonSync=y?0:1}},"./src/remux/passthrough-remuxer.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>s});var H=O("./src/polyfills/number.ts"),e=O("./src/remux/mp4-remuxer.ts"),M=O("./src/utils/mp4-tools.ts"),D=O("./src/loader/fragment.ts"),N=O("./src/utils/logger.ts"),c=function(){function h(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndTime=null}var x=h.prototype;return x.destroy=function(){},x.resetTimeStamp=function(v){this.initPTS=v,this.lastEndTime=null},x.resetNextTimestamp=function(){this.lastEndTime=null},x.resetInitSegment=function(v,d,m,g){this.audioCodec=d,this.videoCodec=m,this.generateInitSegment((0,M.patchEncyptionData)(v,g)),this.emitInitSegment=!0},x.generateInitSegment=function(v){var d=this.audioCodec,m=this.videoCodec;if(!v||!v.byteLength){this.initTracks=void 0,this.initData=void 0;return}var g=this.initData=(0,M.parseInitSegment)(v);d||(d=l(g.audio,D.ElementaryStreamTypes.AUDIO)),m||(m=l(g.video,D.ElementaryStreamTypes.VIDEO));var S={};g.audio&&g.video?S.audiovideo={container:"video/mp4",codec:d+","+m,initSegment:v,id:"main"}:g.audio?S.audio={container:"audio/mp4",codec:d,initSegment:v,id:"audio"}:g.video?S.video={container:"video/mp4",codec:m,initSegment:v,id:"main"}:N.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=S},x.remux=function(v,d,m,g,S){var A,u=this.initPTS,R=this.lastEndTime,i={audio:void 0,video:void 0,text:g,id3:m,initSegment:void 0};(0,H.isFiniteNumber)(R)||(R=this.lastEndTime=S||0);var T=d.samples;if(!T||!T.length)return i;var w={initPTS:void 0,timescale:1},y=this.initData;if((!y||!y.length)&&(this.generateInitSegment(T),y=this.initData),!y||!y.length)return N.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),i;this.emitInitSegment&&(w.tracks=this.initTracks,this.emitInitSegment=!1);var o=(0,M.getStartDTS)(y,T);(0,H.isFiniteNumber)(u)||(this.initPTS=w.initPTS=u=o-S);var r=(0,M.getDuration)(T,y),a=v?o-u:R,n=a+r;(0,M.offsetStartDTS)(y,T,u),r>0?this.lastEndTime=n:(N.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var t=!!y.audio,p=!!y.video,_="";t&&(_+="audio"),p&&(_+="video");var f={data1:T,startPTS:a,startDTS:a,endPTS:n,endDTS:n,type:_,hasAudio:t,hasVideo:p,nb:1,dropped:0};i.audio=f.type==="audio"?f:void 0,i.video=f.type!=="audio"?f:void 0,i.initSegment=w;var F=(A=this.initPTS)!=null?A:0;return i.id3=(0,e.flushTextTrackMetadataCueSamples)(m,S,F,F),g.samples.length&&(i.text=(0,e.flushTextTrackUserdataCueSamples)(g,S,F)),i},h}();function l(h,x){var E=h==null?void 0:h.codec;return E&&E.length>4?E:E==="hvc1"||E==="hev1"?"hvc1.1.c.L120.90":E==="av01"?"av01.0.04M.08":E==="avc1"||x===D.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}const s=c},"./src/task-loop.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>H});var H=function(){function e(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var M=e.prototype;return M.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},M.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},M.onHandlerDestroyed=function(){},M.hasInterval=function(){return!!this._tickInterval},M.hasNextTick=function(){return!!this._tickTimer},M.setInterval=function(N){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,N),!0)},M.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},M.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},M.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},M.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},M.doTick=function(){},e}()},"./src/types/cmcd.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{CMCDObjectType:()=>e,CMCDStreamType:()=>D,CMCDStreamingFormat:()=>M,CMCDVersion:()=>H});var H=1,e;(function(N){N.MANIFEST="m",N.AUDIO="a",N.VIDEO="v",N.MUXED="av",N.INIT="i",N.CAPTION="c",N.TIMED_TEXT="tt",N.KEY="k",N.OTHER="o"})(e||(e={}));var M;(function(N){N.DASH="d",N.HLS="h",N.SMOOTH="s",N.OTHER="o"})(M||(M={}));var D;(function(N){N.VOD="v",N.LIVE="l"})(D||(D={}))},"./src/types/demuxer.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{MetadataSchema:()=>H});var H;(function(e){e.audioId3="org.id3",e.dateRange="com.apple.quicktime.HLS",e.emsg="https://aomedia.org/emsg/ID3"})(H||(H={}))},"./src/types/level.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{HdcpLevels:()=>N,HlsSkip:()=>c,HlsUrlParameters:()=>s,Level:()=>h,getSkipValue:()=>l});function H(x,E){for(var v=0;v<E.length;v++){var d=E[v];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(x,M(d.key),d)}}function e(x,E,v){return E&&H(x.prototype,E),v&&H(x,v),Object.defineProperty(x,"prototype",{writable:!1}),x}function M(x){var E=D(x,"string");return typeof E=="symbol"?E:String(E)}function D(x,E){if(typeof x!="object"||x===null)return x;var v=x[Symbol.toPrimitive];if(v!==void 0){var d=v.call(x,E||"default");if(typeof d!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(E==="string"?String:Number)(x)}var N=["NONE","TYPE-0","TYPE-1","TYPE-2",null],c;(function(x){x.No="",x.Yes="YES",x.v2="v2"})(c||(c={}));function l(x,E){var v=x.canSkipUntil,d=x.canSkipDateRanges,m=x.endSN,g=E!==void 0?E-m:0;return v&&g<v?d?c.v2:c.Yes:c.No}var s=function(){function x(v,d,m){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=v,this.part=d,this.skip=m}var E=x.prototype;return E.addDirectives=function(d){var m=new self.URL(d);return this.msn!==void 0&&m.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&m.searchParams.set("_HLS_part",this.part.toString()),this.skip&&m.searchParams.set("_HLS_skip",this.skip),m.href},x}(),h=function(){function x(E){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=[E.url],this.attrs=E.attrs,this.bitrate=E.bitrate,E.details&&(this.details=E.details),this.id=E.id||0,this.name=E.name,this.width=E.width||0,this.height=E.height||0,this.audioCodec=E.audioCodec,this.videoCodec=E.videoCodec,this.unknownCodecs=E.unknownCodecs,this.codecSet=[E.videoCodec,E.audioCodec].filter(function(v){return v}).join(",").replace(/\.[^.,]+/g,"")}return e(x,[{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 d=v%this.url.length;this._urlId!==d&&(this.details=void 0,this._urlId=d)}}]),x}()},"./src/types/loader.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{PlaylistContextType:()=>H,PlaylistLevelType:()=>e});var H;(function(M){M.MANIFEST="manifest",M.LEVEL="level",M.AUDIO_TRACK="audioTrack",M.SUBTITLE_TRACK="subtitleTrack"})(H||(H={}));var e;(function(M){M.MAIN="main",M.AUDIO="audio",M.SUBTITLE="subtitle"})(e||(e={}))},"./src/types/transmuxer.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{ChunkMetadata:()=>H});var H=function(D,N,c,l,s,h){l===void 0&&(l=0),s===void 0&&(s=-1),h===void 0&&(h=!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=e(),this.buffering={audio:e(),video:e(),audiovideo:e()},this.level=D,this.sn=N,this.id=c,this.size=l,this.part=s,this.partial=h};function e(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{AttrList:()=>M});var H=/^(\d+)x(\d+)$/,e=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,M=function(){function D(c){typeof c=="string"&&(c=D.parseAttrList(c));for(var l in c)c.hasOwnProperty(l)&&(this[l]=c[l])}var N=D.prototype;return N.decimalInteger=function(l){var s=parseInt(this[l],10);return s>Number.MAX_SAFE_INTEGER?Infinity:s},N.hexadecimalInteger=function(l){if(this[l]){var s=(this[l]||"0x").slice(2);s=(s.length&1?"0":"")+s;for(var h=new Uint8Array(s.length/2),x=0;x<s.length/2;x++)h[x]=parseInt(s.slice(x*2,x*2+2),16);return h}else return null},N.hexadecimalIntegerAsNumber=function(l){var s=parseInt(this[l],16);return s>Number.MAX_SAFE_INTEGER?Infinity:s},N.decimalFloatingPoint=function(l){return parseFloat(this[l])},N.optionalFloat=function(l,s){var h=this[l];return h?parseFloat(h):s},N.enumeratedString=function(l){return this[l]},N.bool=function(l){return this[l]==="YES"},N.decimalResolution=function(l){var s=H.exec(this[l]);return s===null?void 0:{width:parseInt(s[1],10),height:parseInt(s[2],10)}},D.parseAttrList=function(l){var s,h={},x='"';for(e.lastIndex=0;(s=e.exec(l))!==null;){var E=s[2];E.indexOf(x)===0&&E.lastIndexOf(x)===E.length-1&&(E=E.slice(1,-1)),h[s[1]]=E}return h},D}()},"./src/utils/binary-search.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>e});var H={search:function(D,N){for(var c=0,l=D.length-1,s=null,h=null;c<=l;){s=(c+l)/2|0,h=D[s];var x=N(h);if(x>0)c=s+1;else if(x<0)l=s-1;else return h}return null}};const e=H},"./src/utils/buffer-helper.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{BufferHelper:()=>M});var H=O("./src/utils/logger.ts"),e={length:0,start:function(){return 0},end:function(){return 0}},M=function(){function D(){}return D.isBuffered=function(c,l){try{if(c){for(var s=D.getBuffered(c),h=0;h<s.length;h++)if(l>=s.start(h)&&l<=s.end(h))return!0}}catch(x){}return!1},D.bufferInfo=function(c,l,s){try{if(c){var h=D.getBuffered(c),x=[],E;for(E=0;E<h.length;E++)x.push({start:h.start(E),end:h.end(E)});return this.bufferedInfo(x,l,s)}}catch(v){}return{len:0,start:l,end:l,nextStart:void 0}},D.bufferedInfo=function(c,l,s){l=Math.max(0,l),c.sort(function(i,T){var w=i.start-T.start;return w||T.end-i.end});var h=[];if(s)for(var x=0;x<c.length;x++){var E=h.length;if(E){var v=h[E-1].end;c[x].start-v<s?c[x].end>v&&(h[E-1].end=c[x].end):h.push(c[x])}else h.push(c[x])}else h=c;for(var d=0,m,g=l,S=l,A=0;A<h.length;A++){var u=h[A].start,R=h[A].end;if(l+s>=u&&l<R)g=u,S=R,d=S-l;else if(l+s<u){m=u;break}}return{len:d,start:g||0,end:S||0,nextStart:m}},D.getBuffered=function(c){try{return c.buffered}catch(l){return H.logger.log("failed to get media.buffered",l),e}},D}()},"./src/utils/cea-608-parser.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{CaptionScreen:()=>A,Row:()=>S,default:()=>y});var H=O("./src/utils/logger.ts"),e={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},M=function(r){var a=r;return e.hasOwnProperty(r)&&(a=e[r]),String.fromCharCode(a)},D=15,N=100,c={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},l={17:2,18:4,21:6,22:8,23:10,19:13,20:15},s={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},h={25:2,26:4,29:6,30:8,31:10,27:13,28:15},x=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],E;(function(o){o[o.ERROR=0]="ERROR",o[o.TEXT=1]="TEXT",o[o.WARNING=2]="WARNING",o[o.INFO=2]="INFO",o[o.DEBUG=3]="DEBUG",o[o.DATA=3]="DATA"})(E||(E={}));var v=function(){function o(){this.time=null,this.verboseLevel=E.ERROR}var r=o.prototype;return r.log=function(n,t){if(this.verboseLevel>=n){var p=typeof t=="function"?t():t;H.logger.log(this.time+" ["+n+"] "+p)}},o}(),d=function(r){for(var a=[],n=0;n<r.length;n++)a.push(r[n].toString(16));return a},m=function(){function o(a,n,t,p,_){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=a||"white",this.underline=n||!1,this.italics=t||!1,this.background=p||"black",this.flash=_||!1}var r=o.prototype;return r.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},r.setStyles=function(n){for(var t=["foreground","underline","italics","background","flash"],p=0;p<t.length;p++){var _=t[p];n.hasOwnProperty(_)&&(this[_]=n[_])}},r.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},r.equals=function(n){return this.foreground===n.foreground&&this.underline===n.underline&&this.italics===n.italics&&this.background===n.background&&this.flash===n.flash},r.copy=function(n){this.foreground=n.foreground,this.underline=n.underline,this.italics=n.italics,this.background=n.background,this.flash=n.flash},r.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},o}(),g=function(){function o(a,n,t,p,_,f){this.uchar=void 0,this.penState=void 0,this.uchar=a||" ",this.penState=new m(n,t,p,_,f)}var r=o.prototype;return r.reset=function(){this.uchar=" ",this.penState.reset()},r.setChar=function(n,t){this.uchar=n,this.penState.copy(t)},r.setPenState=function(n){this.penState.copy(n)},r.equals=function(n){return this.uchar===n.uchar&&this.penState.equals(n.penState)},r.copy=function(n){this.uchar=n.uchar,this.penState.copy(n.penState)},r.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},o}(),S=function(){function o(a){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var n=0;n<N;n++)this.chars.push(new g);this.logger=a,this.pos=0,this.currPenState=new m}var r=o.prototype;return r.equals=function(n){for(var t=!0,p=0;p<N;p++)if(!this.chars[p].equals(n.chars[p])){t=!1;break}return t},r.copy=function(n){for(var t=0;t<N;t++)this.chars[t].copy(n.chars[t])},r.isEmpty=function(){for(var n=!0,t=0;t<N;t++)if(!this.chars[t].isEmpty()){n=!1;break}return n},r.setCursor=function(n){this.pos!==n&&(this.pos=n),this.pos<0?(this.logger.log(E.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>N&&(this.logger.log(E.DEBUG,"Too large cursor position "+this.pos),this.pos=N)},r.moveCursor=function(n){var t=this.pos+n;if(n>1)for(var p=this.pos+1;p<t+1;p++)this.chars[p].setPenState(this.currPenState);this.setCursor(t)},r.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},r.insertChar=function(n){var t=this;n>=144&&this.backSpace();var p=M(n);if(this.pos>=N){this.logger.log(E.ERROR,function(){return"Cannot insert "+n.toString(16)+" ("+p+") at position "+t.pos+". Skipping it!"});return}this.chars[this.pos].setChar(p,this.currPenState),this.moveCursor(1)},r.clearFromPos=function(n){var t;for(t=n;t<N;t++)this.chars[t].reset()},r.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},r.clearToEndOfRow=function(){this.clearFromPos(this.pos)},r.getTextString=function(){for(var n=[],t=!0,p=0;p<N;p++){var _=this.chars[p].uchar;_!==" "&&(t=!1),n.push(_)}return t?"":n.join("")},r.setPenStyles=function(n){this.currPenState.setStyles(n);var t=this.chars[this.pos];t.setPenState(this.currPenState)},o}(),A=function(){function o(a){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var n=0;n<D;n++)this.rows.push(new S(a));this.logger=a,this.currRow=D-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var r=o.prototype;return r.reset=function(){for(var n=0;n<D;n++)this.rows[n].clear();this.currRow=D-1},r.equals=function(n){for(var t=!0,p=0;p<D;p++)if(!this.rows[p].equals(n.rows[p])){t=!1;break}return t},r.copy=function(n){for(var t=0;t<D;t++)this.rows[t].copy(n.rows[t])},r.isEmpty=function(){for(var n=!0,t=0;t<D;t++)if(!this.rows[t].isEmpty()){n=!1;break}return n},r.backSpace=function(){var n=this.rows[this.currRow];n.backSpace()},r.clearToEndOfRow=function(){var n=this.rows[this.currRow];n.clearToEndOfRow()},r.insertChar=function(n){var t=this.rows[this.currRow];t.insertChar(n)},r.setPen=function(n){var t=this.rows[this.currRow];t.setPenStyles(n)},r.moveCursor=function(n){var t=this.rows[this.currRow];t.moveCursor(n)},r.setCursor=function(n){this.logger.log(E.INFO,"setCursor: "+n);var t=this.rows[this.currRow];t.setCursor(n)},r.setPAC=function(n){this.logger.log(E.INFO,function(){return"pacData = "+JSON.stringify(n)});var t=n.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(var p=0;p<D;p++)this.rows[p].clear();var _=this.currRow+1-this.nrRollUpRows,f=this.lastOutputScreen;if(f){var F=f.rows[_].cueStartTime,P=this.logger.time;if(F&&P!==null&&F<P)for(var W=0;W<this.nrRollUpRows;W++)this.rows[t-this.nrRollUpRows+W+1].copy(f.rows[_+W])}}this.currRow=t;var V=this.rows[this.currRow];if(n.indent!==null){var J=n.indent,ne=Math.max(J-1,0);V.setCursor(n.indent),n.color=V.chars[ne].penState.foreground}var ce={foreground:n.color,underline:n.underline,italics:n.italics,background:"black",flash:!1};this.setPen(ce)},r.setBkgData=function(n){this.logger.log(E.INFO,function(){return"bkgData = "+JSON.stringify(n)}),this.backSpace(),this.setPen(n),this.insertChar(32)},r.setRollUpRows=function(n){this.nrRollUpRows=n},r.rollUp=function(){var n=this;if(this.nrRollUpRows===null){this.logger.log(E.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(E.TEXT,function(){return n.getDisplayText()});var t=this.currRow+1-this.nrRollUpRows,p=this.rows.splice(t,1)[0];p.clear(),this.rows.splice(this.currRow,0,p),this.logger.log(E.INFO,"Rolling up")},r.getDisplayText=function(n){n=n||!1;for(var t=[],p="",_=-1,f=0;f<D;f++){var F=this.rows[f].getTextString();F&&(_=f+1,n?t.push("Row "+_+": '"+F+"'"):t.push(F.trim()))}return t.length>0&&(n?p="["+t.join(" | ")+"]":p=t.join(`
|
|
`)),p},r.getTextAndFormat=function(){return this.rows},o}(),u=function(){function o(a,n,t){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=a,this.outputFilter=n,this.mode=null,this.verbose=0,this.displayedMemory=new A(t),this.nonDisplayedMemory=new A(t),this.lastOutputScreen=new A(t),this.currRollUpRow=this.displayedMemory.rows[D-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=t}var r=o.prototype;return r.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[D-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},r.getHandler=function(){return this.outputFilter},r.setHandler=function(n){this.outputFilter=n},r.setPAC=function(n){this.writeScreen.setPAC(n)},r.setBkgData=function(n){this.writeScreen.setBkgData(n)},r.setMode=function(n){if(n===this.mode)return;this.mode=n,this.logger.log(E.INFO,function(){return"MODE="+n}),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=n},r.insertChars=function(n){for(var t=this,p=0;p<n.length;p++)this.writeScreen.insertChar(n[p]);var _=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(E.INFO,function(){return _+": "+t.writeScreen.getDisplayText(!0)}),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(E.TEXT,function(){return"DISPLAYED: "+t.displayedMemory.getDisplayText(!0)}),this.outputDataUpdate())},r.ccRCL=function(){this.logger.log(E.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},r.ccBS=function(){if(this.logger.log(E.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},r.ccAOF=function(){},r.ccAON=function(){},r.ccDER=function(){this.logger.log(E.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},r.ccRU=function(n){this.logger.log(E.INFO,"RU("+n+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(n)},r.ccFON=function(){this.logger.log(E.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},r.ccRDC=function(){this.logger.log(E.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},r.ccTR=function(){this.logger.log(E.INFO,"TR"),this.setMode("MODE_TEXT")},r.ccRTD=function(){this.logger.log(E.INFO,"RTD"),this.setMode("MODE_TEXT")},r.ccEDM=function(){this.logger.log(E.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},r.ccCR=function(){this.logger.log(E.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},r.ccENM=function(){this.logger.log(E.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},r.ccEOC=function(){var n=this;if(this.logger.log(E.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var t=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=t,this.writeScreen=this.nonDisplayedMemory,this.logger.log(E.TEXT,function(){return"DISP: "+n.displayedMemory.getDisplayText()})}this.outputDataUpdate(!0)},r.ccTO=function(n){this.logger.log(E.INFO,"TO("+n+") - Tab Offset"),this.writeScreen.moveCursor(n)},r.ccMIDROW=function(n){var t={flash:!1};if(t.underline=n%2===1,t.italics=n>=46,t.italics)t.foreground="white";else{var p=Math.floor(n/2)-16,_=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=_[p]}this.logger.log(E.INFO,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},r.outputDataUpdate=function(n){n===void 0&&(n=!1);var t=this.logger.time;if(t===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=t:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),n&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t),this.lastOutputScreen.copy(this.displayedMemory))},r.cueSplitAtTime=function(n){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,n,this.displayedMemory),this.cueStartTime=n))},o}(),R=function(){function o(a,n,t){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var p=new v;this.channels=[null,new u(a,n,p),new u(a+1,t,p)],this.cmdHistory=w(),this.logger=p}var r=o.prototype;return r.getHandler=function(n){return this.channels[n].getHandler()},r.setHandler=function(n,t){this.channels[n].setHandler(t)},r.addData=function(n,t){var p,_,f,F=!1;this.logger.time=n;for(var P=0;P<t.length;P+=2){if(_=t[P]&127,f=t[P+1]&127,_===0&&f===0)continue;if(this.logger.log(E.DATA,"["+d([t[P],t[P+1]])+"] -> ("+d([_,f])+")"),p=this.parseCmd(_,f),p||(p=this.parseMidrow(_,f)),p||(p=this.parsePAC(_,f)),p||(p=this.parseBackgroundAttributes(_,f)),!p&&(F=this.parseChars(_,f),F)){var W=this.currentChannel;if(W&&W>0){var V=this.channels[W];V.insertChars(F)}else this.logger.log(E.WARNING,"No channel found yet. TEXT-MODE?")}!p&&!F&&this.logger.log(E.WARNING,"Couldn't parse cleaned data "+d([_,f])+" orig: "+d([t[P],t[P+1]]))}},r.parseCmd=function(n,t){var p=this.cmdHistory,_=(n===20||n===28||n===21||n===29)&&t>=32&&t<=47,f=(n===23||n===31)&&t>=33&&t<=35;if(!(_||f))return!1;if(T(n,t,p))return i(null,null,p),this.logger.log(E.DEBUG,"Repeated command ("+d([n,t])+") is dropped"),!0;var F=n===20||n===21||n===23?1:2,P=this.channels[F];return n===20||n===21||n===28||n===29?t===32?P.ccRCL():t===33?P.ccBS():t===34?P.ccAOF():t===35?P.ccAON():t===36?P.ccDER():t===37?P.ccRU(2):t===38?P.ccRU(3):t===39?P.ccRU(4):t===40?P.ccFON():t===41?P.ccRDC():t===42?P.ccTR():t===43?P.ccRTD():t===44?P.ccEDM():t===45?P.ccCR():t===46?P.ccENM():t===47&&P.ccEOC():P.ccTO(t-32),i(n,t,p),this.currentChannel=F,!0},r.parseMidrow=function(n,t){var p=0;if((n===17||n===25)&&t>=32&&t<=47){if(n===17?p=1:p=2,p!==this.currentChannel)return this.logger.log(E.ERROR,"Mismatch channel in midrow parsing"),!1;var _=this.channels[p];return _?(_.ccMIDROW(t),this.logger.log(E.DEBUG,"MIDROW ("+d([n,t])+")"),!0):!1}return!1},r.parsePAC=function(n,t){var p,_=this.cmdHistory,f=(n>=17&&n<=23||n>=25&&n<=31)&&t>=64&&t<=127,F=(n===16||n===24)&&t>=64&&t<=95;if(!(f||F))return!1;if(T(n,t,_))return i(null,null,_),!0;var P=n<=23?1:2;t>=64&&t<=95?p=P===1?c[n]:s[n]:p=P===1?l[n]:h[n];var W=this.channels[P];return W?(W.setPAC(this.interpretPAC(p,t)),i(n,t,_),this.currentChannel=P,!0):!1},r.interpretPAC=function(n,t){var p,_={color:null,italics:!1,indent:null,underline:!1,row:n};return t>95?p=t-96:p=t-64,_.underline=(p&1)===1,p<=13?_.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(p/2)]:p<=15?(_.italics=!0,_.color="white"):_.indent=Math.floor((p-16)/2)*4,_},r.parseChars=function(n,t){var p,_=null,f=null;if(n>=25?(p=2,f=n-8):(p=1,f=n),f>=17&&f<=19){var F;f===17?F=t+80:f===18?F=t+112:F=t+144,this.logger.log(E.INFO,"Special char '"+M(F)+"' in channel "+p),_=[F]}else n>=32&&n<=127&&(_=t===0?[n]:[n,t]);if(_){var P=d(_);this.logger.log(E.DEBUG,"Char codes = "+P.join(",")),i(n,t,this.cmdHistory)}return _},r.parseBackgroundAttributes=function(n,t){var p=(n===16||n===24)&&t>=32&&t<=47,_=(n===23||n===31)&&t>=45&&t<=47;if(!(p||_))return!1;var f,F={};n===16||n===24?(f=Math.floor((t-32)/2),F.background=x[f],t%2===1&&(F.background=F.background+"_semi")):t===45?F.background="transparent":(F.foreground="black",t===47&&(F.underline=!0));var P=n<=23?1:2,W=this.channels[P];return W.setBkgData(F),i(n,t,this.cmdHistory),!0},r.reset=function(){for(var n=0;n<Object.keys(this.channels).length;n++){var t=this.channels[n];t&&t.reset()}this.cmdHistory=w()},r.cueSplitAtTime=function(n){for(var t=0;t<this.channels.length;t++){var p=this.channels[t];p&&p.cueSplitAtTime(n)}},o}();function i(o,r,a){a.a=o,a.b=r}function T(o,r,a){return a.a===o&&a.b===r}function w(){return{a:null,b:null}}const y=R},"./src/utils/codecs.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{isCodecSupportedInMp4:()=>M,isCodecType:()=>e});var H={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,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,dva1:!0,dvav:!0,dvh1:!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 e(D,N){var c=H[N];return!!c&&c[D.slice(0,4)]===!0}function M(D,N){return MediaSource.isTypeSupported((N||"video")+'/mp4;codecs="'+D+'"')}},"./src/utils/cues.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>c});var H=O("./src/utils/vttparser.ts"),e=O("./src/utils/webvtt-parser.ts"),M=O("./src/utils/texttrack-utils.ts"),D=/\s/,N={newCue:function(s,h,x,E){for(var v=[],d,m,g,S,A,u=self.VTTCue||self.TextTrackCue,R=0;R<E.rows.length;R++)if(d=E.rows[R],g=!0,S=0,A="",!d.isEmpty()){for(var i=0;i<d.chars.length;i++)D.test(d.chars[i].uchar)&&g?S++:(A+=d.chars[i].uchar,g=!1);d.cueStartTime=h,h===x&&(x+=1e-4),S>=16?S--:S++;var T=(0,H.fixLineBreaks)(A.trim()),w=(0,e.generateCueId)(h,x,T);(!s||!s.cues||!s.cues.getCueById(w))&&(m=new u(h,x,T),m.id=w,m.line=R+1,m.align="left",m.position=10+Math.min(80,Math.floor(S*8/32)*10),v.push(m))}return s&&v.length&&(v.sort(function(y,o){return y.line==="auto"||o.line==="auto"?0:y.line>8&&o.line>8?o.line-y.line:y.line-o.line}),v.forEach(function(y){return(0,M.addCueToTrack)(s,y)})),v}};const c=N},"./src/utils/discontinuities.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{adjustSlidingStart:()=>s,alignMediaPlaylistByPDT:()=>v,alignPDT:()=>E,alignStream:()=>h,findDiscontinuousReferenceFrag:()=>c,findFirstFragWithCC:()=>D,shouldAlignOnDiscontinuities:()=>N});var H=O("./src/polyfills/number.ts"),e=O("./src/utils/logger.ts"),M=O("./src/controller/level-helper.ts");function D(d,m){for(var g=null,S=0,A=d.length;S<A;S++){var u=d[S];if(u&&u.cc===m){g=u;break}}return g}function N(d,m,g){return!!(m.details&&(g.endCC>g.startCC||d&&d.cc<g.startCC))}function c(d,m,g){g===void 0&&(g=0);var S=d.fragments,A=m.fragments;if(!A.length||!S.length){e.logger.log("No fragments to align");return}var u=D(S,A[0].cc);if(!u||u&&!u.startPTS){e.logger.log("No frag in previous level to align on");return}return u}function l(d,m){if(d){var g=d.start+m;d.start=d.startPTS=g,d.endPTS=g+d.duration}}function s(d,m){for(var g=m.fragments,S=0,A=g.length;S<A;S++)l(g[S],d);m.fragmentHint&&l(m.fragmentHint,d),m.alignedSliding=!0}function h(d,m,g){if(!m)return;x(d,g,m),!g.alignedSliding&&m.details&&E(g,m.details),!g.alignedSliding&&m.details&&!g.skippedSegments&&(0,M.adjustSliding)(m.details,g)}function x(d,m,g){if(N(d,g,m)){var S=c(g.details,m);S&&(0,H.isFiniteNumber)(S.start)&&(e.logger.log("Adjusting PTS using last level due to CC increase within current level "+m.url),s(S.start,m))}}function E(d,m){if(!m.fragments.length||!d.hasProgramDateTime||!m.hasProgramDateTime)return;var g=m.fragments[0].programDateTime,S=d.fragments[0].programDateTime,A=(S-g)/1e3+m.fragments[0].start;A&&(0,H.isFiniteNumber)(A)&&(e.logger.log("Adjusting PTS using programDateTime delta "+(S-g)+"ms, sliding:"+A.toFixed(3)+" "+d.url+" "),s(A,d))}function v(d,m){if(!d.hasProgramDateTime||!m.hasProgramDateTime)return;var g=d.fragments,S=m.fragments;if(!g.length||!S.length)return;var A=Math.round(S.length/2)-1,u=S[A],R=D(g,u.cc)||g[Math.round(g.length/2)-1],i=u.programDateTime,T=R.programDateTime;if(i===null||T===null)return;var w=(T-i)/1e3-(R.start-u.start);s(w,d)}},"./src/utils/ewma-bandwidth-estimator.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>M});var H=O("./src/utils/ewma.ts"),e=function(){function D(c,l,s){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=s,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new H.default(c),this.fast_=new H.default(l)}var N=D.prototype;return N.update=function(l,s){var h=this.slow_,x=this.fast_;this.slow_.halfLife!==l&&(this.slow_=new H.default(l,h.getEstimate(),h.getTotalWeight())),this.fast_.halfLife!==s&&(this.fast_=new H.default(s,x.getEstimate(),x.getTotalWeight()))},N.sample=function(l,s){l=Math.max(l,this.minDelayMs_);var h=8*s,x=l/1e3,E=h/x;this.fast_.sample(x,E),this.slow_.sample(x,E)},N.canEstimate=function(){var l=this.fast_;return l&&l.getTotalWeight()>=this.minWeight_},N.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},N.destroy=function(){},D}();const M=e},"./src/utils/ewma.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>e});var H=function(){function M(N,c,l){c===void 0&&(c=0),l===void 0&&(l=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=N,this.alpha_=N?Math.exp(Math.log(.5)/N):0,this.estimate_=c,this.totalWeight_=l}var D=M.prototype;return D.sample=function(c,l){var s=Math.pow(this.alpha_,c);this.estimate_=l*(1-s)+s*this.estimate_,this.totalWeight_+=c},D.getTotalWeight=function(){return this.totalWeight_},D.getEstimate=function(){if(this.alpha_){var c=1-Math.pow(this.alpha_,this.totalWeight_);if(c)return this.estimate_/c}return this.estimate_},M}();const e=H},"./src/utils/fetch-loader.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>A,fetchSupported:()=>v});var H=O("./src/polyfills/number.ts"),e=O("./src/loader/load-stats.ts"),M=O("./src/demux/chunk-cache.ts");function D(u,R){u.prototype=Object.create(R.prototype),u.prototype.constructor=u,h(u,R)}function N(u){var R=typeof Map=="function"?new Map:void 0;return N=function(T){if(T===null||!s(T))return T;if(typeof T!="function")throw new TypeError("Super expression must either be null or a function");if(typeof R!="undefined"){if(R.has(T))return R.get(T);R.set(T,w)}function w(){return c(T,arguments,x(this).constructor)}return w.prototype=Object.create(T.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),h(w,T)},N(u)}function c(u,R,i){return l()?c=Reflect.construct.bind():c=function(w,y,o){var r=[null];r.push.apply(r,y);var a=Function.bind.apply(w,r),n=new a;return o&&h(n,o.prototype),n},c.apply(null,arguments)}function l(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(u){return!1}}function s(u){return Function.toString.call(u).indexOf("[native code]")!==-1}function h(u,R){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(T,w){return T.__proto__=w,T},h(u,R)}function x(u){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},x(u)}function E(){return E=Object.assign?Object.assign.bind():function(u){for(var R=1;R<arguments.length;R++){var i=arguments[R];for(var T in i)Object.prototype.hasOwnProperty.call(i,T)&&(u[T]=i[T])}return u},E.apply(this,arguments)}function v(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(u){}return!1}var d=function(){function u(i){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=i.fetchSetup||g,this.controller=new self.AbortController,this.stats=new e.LoadStats}var R=u.prototype;return R.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},R.abortInternal=function(){var T=this.response;(!T||!T.ok)&&(this.stats.aborted=!0,this.controller.abort())},R.abort=function(){var T;this.abortInternal(),(T=this.callbacks)!==null&&T!==void 0&&T.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},R.load=function(T,w,y){var o=this,r=this.stats;if(r.loading.start)throw new Error("Loader can only be used once.");r.loading.start=self.performance.now();var a=m(T,this.controller.signal),n=y.onProgress,t=T.responseType==="arraybuffer",p=t?"byteLength":"length";this.context=T,this.config=w,this.callbacks=y,this.request=this.fetchSetup(T,a),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){o.abortInternal(),y.onTimeout(r,T,o.response)},w.timeout),self.fetch(this.request).then(function(_){if(o.response=o.loader=_,!_.ok){var f=_.status,F=_.statusText;throw new S(F||"fetch, bad network response",f,_)}return r.loading.first=Math.max(self.performance.now(),r.loading.start),r.total=parseInt(_.headers.get("Content-Length")||"0"),n&&(0,H.isFiniteNumber)(w.highWaterMark)?o.loadProgressively(_,r,T,w.highWaterMark,n):t?_.arrayBuffer():_.text()}).then(function(_){var f=o.response;self.clearTimeout(o.requestTimeout),r.loading.end=Math.max(self.performance.now(),r.loading.first);var F=_[p];F&&(r.loaded=r.total=F);var P={url:f.url,data:_};n&&!(0,H.isFiniteNumber)(w.highWaterMark)&&n(r,T,_,f),y.onSuccess(P,r,T,f)}).catch(function(_){if(self.clearTimeout(o.requestTimeout),r.aborted)return;var f=_&&_.code||0,F=_?_.message:null;y.onError({code:f,text:F},T,_?_.details:null)})},R.getCacheAge=function(){var T=null;if(this.response){var w=this.response.headers.get("age");T=w?parseFloat(w):null}return T},R.loadProgressively=function(T,w,y,o,r){o===void 0&&(o=0);var a=new M.default,n=T.body.getReader(),t=function p(){return n.read().then(function(_){if(_.done)return a.dataLength&&r(w,y,a.flush(),T),Promise.resolve(new ArrayBuffer(0));var f=_.value,F=f.length;return w.loaded+=F,F<o||a.dataLength?(a.push(f),a.dataLength>=o&&r(w,y,a.flush(),T)):r(w,y,f,T),p()}).catch(function(){return Promise.reject()})};return t()},u}();function m(u,R){var i={method:"GET",mode:"cors",credentials:"same-origin",signal:R,headers:new self.Headers(E({},u.headers))};return u.rangeEnd&&i.headers.set("Range","bytes="+u.rangeStart+"-"+String(u.rangeEnd-1)),i}function g(u,R){return new self.Request(u.url,R)}var S=function(u){D(R,u);function R(i,T,w){var y;return y=u.call(this,i)||this,y.code=void 0,y.details=void 0,y.code=T,y.details=w,y}return R}(N(Error));const A=d},"./src/utils/hex.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>e});var H={hexDump:function(D){for(var N="",c=0;c<D.length;c++){var l=D[c].toString(16);l.length<2&&(l="0"+l),N+=l}return N}};const e=H},"./src/utils/imsc1-ttml-parser.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{IMSC1_CODEC:()=>s,parseIMSC1:()=>v});var H=O("./src/utils/mp4-tools.ts"),e=O("./src/utils/vttparser.ts"),M=O("./src/utils/vttcue.ts"),D=O("./src/demux/id3.ts"),N=O("./src/utils/timescale-conversion.ts"),c=O("./src/utils/webvtt-parser.ts");function l(){return l=Object.assign?Object.assign.bind():function(y){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(y[a]=r[a])}return y},l.apply(this,arguments)}var s="stpp.ttml.im1t",h=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,x=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,E={left:"start",center:"center",right:"end",start:"start",end:"end"};function v(y,o,r,a,n){var t=(0,H.findBox)(new Uint8Array(y),["mdat"]);if(t.length===0){n(new Error("Could not parse IMSC1 mdat"));return}var p=t.map(function(f){return(0,D.utf8ArrayToStr)(f)}),_=(0,N.toTimescaleFromScale)(o,1,r);try{p.forEach(function(f){return a(d(f,_))})}catch(f){n(f)}}function d(y,o){var r=new DOMParser,a=r.parseFromString(y,"text/xml"),n=a.getElementsByTagName("tt")[0];if(!n)throw new Error("Invalid ttml");var t={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},p=Object.keys(t).reduce(function(W,V){return W[V]=n.getAttribute("ttp:"+V)||t[V],W},{}),_=n.getAttribute("xml:space")!=="preserve",f=g(m(n,"styling","style")),F=g(m(n,"layout","region")),P=m(n,"body","[begin]");return[].map.call(P,function(W){var V=S(W,_);if(!V||!W.hasAttribute("begin"))return null;var J=i(W.getAttribute("begin"),p),ne=i(W.getAttribute("dur"),p),ce=i(W.getAttribute("end"),p);if(J===null)throw R(W);if(ce===null){if(ne===null)throw R(W);ce=J+ne}var ie=new M.default(J-o,ce-o,V);ie.id=(0,c.generateCueId)(ie.startTime,ie.endTime,ie.text);var xe=F[W.getAttribute("region")],ge=f[W.getAttribute("style")],de=A(xe,ge,f),Fe=de.textAlign;if(Fe){var Qe=E[Fe];Qe&&(ie.lineAlign=Qe),ie.align=Fe}return l(ie,de),ie}).filter(function(W){return W!==null})}function m(y,o,r){var a=y.getElementsByTagName(o)[0];return a?[].slice.call(a.querySelectorAll(r)):[]}function g(y){return y.reduce(function(o,r){var a=r.getAttribute("xml:id");return a&&(o[a]=r),o},{})}function S(y,o){return[].slice.call(y.childNodes).reduce(function(r,a,n){var t;return a.nodeName==="br"&&n?r+`
|
|
`:(t=a.childNodes)!==null&&t!==void 0&&t.length?S(a,o):o?r+a.textContent.trim().replace(/\s+/g," "):r+a.textContent},"")}function A(y,o,r){var a="http://www.w3.org/ns/ttml#styling",n=null,t=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],p=y!=null&&y.hasAttribute("style")?y.getAttribute("style"):null;return p&&r.hasOwnProperty(p)&&(n=r[p]),t.reduce(function(_,f){var F=u(o,a,f)||u(y,a,f)||u(n,a,f);return F&&(_[f]=F),_},{})}function u(y,o,r){return y&&y.hasAttributeNS(o,r)?y.getAttributeNS(o,r):null}function R(y){return new Error("Could not parse ttml timestamp "+y)}function i(y,o){if(!y)return null;var r=(0,e.parseTimeStamp)(y);return r===null&&(h.test(y)?r=T(y,o):x.test(y)&&(r=w(y,o))),r}function T(y,o){var r=h.exec(y),a=(r[4]|0)+(r[5]|0)/o.subFrameRate;return(r[1]|0)*3600+(r[2]|0)*60+(r[3]|0)+a/o.frameRate}function w(y,o){var r=x.exec(y),a=Number(r[1]),n=r[2];switch(n){case"h":return a*3600;case"m":return a*60;case"ms":return a*1e3;case"f":return a/o.frameRate;case"t":return a/o.tickRate}return a}},"./src/utils/keysystem-util.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{changeEndianness:()=>M,convertDataUriToArrayBytes:()=>D,strToUtf8array:()=>N});var H=O("./src/utils/numeric-encoding-utils.ts");function e(c){var l=N(c).subarray(0,16),s=new Uint8Array(16);return s.set(l,16-l.length),s}function M(c){var l=function(h,x,E){var v=h[x];h[x]=h[E],h[E]=v};l(c,0,3),l(c,1,2),l(c,4,5),l(c,6,7)}function D(c){var l=c.split(":"),s=null;if(l[0]==="data"&&l.length===2){var h=l[1].split(";"),x=h[h.length-1].split(",");if(x.length===2){var E=x[0]==="base64",v=x[1];E?(h.splice(-1,1),s=(0,H.base64Decode)(v)):s=e(v)}}return s}function N(c){return Uint8Array.from(unescape(encodeURIComponent(c)),function(l){return l.charCodeAt(0)})}},"./src/utils/logger.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{enableLogs:()=>c,logger:()=>l});var H=function(){},e={trace:H,debug:H,log:H,warn:H,info:H,error:H},M=e;function D(s){var h=self.console[s];return h?h.bind(self.console,"["+s+"] >"):H}function N(s){for(var h=arguments.length,x=new Array(h>1?h-1:0),E=1;E<h;E++)x[E-1]=arguments[E];x.forEach(function(v){M[v]=s[v]?s[v].bind(s):D(v)})}function c(s,h){if(self.console&&s===!0||typeof s=="object"){N(s,"debug","log","info","warn","error");try{M.log('Debug logs enabled for "'+h+'"')}catch(x){M=e}}else M=e}var l=M},"./src/utils/mediakeys-helper.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{KeySystemFormats:()=>e,KeySystemIds:()=>D,KeySystems:()=>H,getKeySystemsForConfig:()=>l,getSupportedMediaKeySystemConfigurations:()=>h,keySystemDomainToKeySystemFormat:()=>c,keySystemFormatToKeySystemDomain:()=>M,keySystemIdToKeySystemDomain:()=>N,requestMediaKeySystemAccess:()=>s});var H;(function(E){E.CLEARKEY="org.w3.clearkey",E.FAIRPLAY="com.apple.fps",E.PLAYREADY="com.microsoft.playready",E.WIDEVINE="com.widevine.alpha"})(H||(H={}));var e;(function(E){E.CLEARKEY="org.w3.clearkey",E.FAIRPLAY="com.apple.streamingkeydelivery",E.PLAYREADY="com.microsoft.playready",E.WIDEVINE="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"})(e||(e={}));function M(E){switch(E){case e.FAIRPLAY:return H.FAIRPLAY;case e.PLAYREADY:return H.PLAYREADY;case e.WIDEVINE:return H.WIDEVINE;case e.CLEARKEY:return H.CLEARKEY}}var D;(function(E){E.WIDEVINE="edef8ba979d64acea3c827dcd51d21ed"})(D||(D={}));function N(E){if(E===D.WIDEVINE)return H.WIDEVINE}function c(E){switch(E){case H.FAIRPLAY:return e.FAIRPLAY;case H.PLAYREADY:return e.PLAYREADY;case H.WIDEVINE:return e.WIDEVINE;case H.CLEARKEY:return e.CLEARKEY}}function l(E){var v=E.drmSystems,d=E.widevineLicenseUrl,m=v?[H.FAIRPLAY,H.WIDEVINE,H.PLAYREADY,H.CLEARKEY].filter(function(g){return!!v[g]}):[];return!m[H.WIDEVINE]&&d&&m.push(H.WIDEVINE),m}var s=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function h(E,v,d,m){var g;switch(E){case H.FAIRPLAY:g=["cenc","sinf"];break;case H.WIDEVINE:case H.PLAYREADY:g=["cenc"];break;case H.CLEARKEY:g=["cenc","keyids"];break;default:throw new Error("Unknown key-system: "+E)}return x(g,v,d,m)}function x(E,v,d,m){var g={initDataTypes:E,persistentState:m.persistentState||"not-allowed",distinctiveIdentifier:m.distinctiveIdentifier||"not-allowed",sessionTypes:m.sessionTypes||[m.sessionType||"temporary"],audioCapabilities:v.map(function(S){return{contentType:'audio/mp4; codecs="'+S+'"',robustness:m.audioRobustness||"",encryptionScheme:m.audioEncryptionScheme||null}}),videoCapabilities:d.map(function(S){return{contentType:'video/mp4; codecs="'+S+'"',robustness:m.videoRobustness||"",encryptionScheme:m.videoEncryptionScheme||null}})};return[g]}},"./src/utils/mediasource-helper.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{getMediaSource:()=>H});function H(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{RemuxerTrackIdConfig:()=>s,appendUint8Array:()=>o,bin2str:()=>h,computeRawDurationFromSamples:()=>T,discardEPB:()=>p,findBox:()=>m,getDuration:()=>i,getStartDTS:()=>R,mp4Box:()=>f,mp4pssh:()=>F,offsetStartDTS:()=>w,parseEmsg:()=>_,parseInitSegment:()=>S,parsePssh:()=>P,parseSEIMessageFromNALu:()=>t,parseSamples:()=>r,parseSegmentIndex:()=>g,parseSinf:()=>u,patchEncyptionData:()=>A,readSint32:()=>v,readUint16:()=>x,readUint32:()=>E,segmentValidRange:()=>y,writeUint32:()=>d});var H=O("./src/loader/fragment.ts"),e=O("./src/utils/typed-array.ts"),M=O("./src/demux/id3.ts"),D=O("./src/utils/logger.ts"),N=O("./src/utils/hex.ts"),c=Math.pow(2,32)-1,l=[].push,s={video:1,audio:2,id3:3,text:4};function h(W){return String.fromCharCode.apply(null,W)}function x(W,V){var J=W[V]<<8|W[V+1];return J<0?65536+J:J}function E(W,V){var J=v(W,V);return J<0?4294967296+J:J}function v(W,V){return W[V]<<24|W[V+1]<<16|W[V+2]<<8|W[V+3]}function d(W,V,J){W[V]=J>>24,W[V+1]=J>>16&255,W[V+2]=J>>8&255,W[V+3]=J&255}function m(W,V){var J=[];if(!V.length)return J;for(var ne=W.byteLength,ce=0;ce<ne;){var ie=E(W,ce),xe=h(W.subarray(ce+4,ce+8)),ge=ie>1?ce+ie:ne;if(xe===V[0])if(V.length===1)J.push(W.subarray(ce+8,ge));else{var de=m(W.subarray(ce+8,ge),V.slice(1));de.length&&l.apply(J,de)}ce=ge}return J}function g(W){var V=[],J=W[0],ne=8,ce=E(W,ne);ne+=4;var ie=0,xe=0;J===0?ne+=8:ne+=16,ne+=2;var ge=W.length+xe,de=x(W,ne);ne+=2;for(var Fe=0;Fe<de;Fe++){var Qe=ne,Ve=E(W,Qe);Qe+=4;var Ne=Ve&2147483647,Ue=(Ve&2147483648)>>>31;if(Ue===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var q=E(W,Qe);Qe+=4,V.push({referenceSize:Ne,subsegmentDuration:q,info:{duration:q/ce,start:ge,end:ge+Ne-1}}),ge+=Ne,Qe+=4,ne=Qe}return{earliestPresentationTime:ie,timescale:ce,version:J,referencesCount:de,references:V}}function S(W){for(var V=[],J=m(W,["moov","trak"]),ne=0;ne<J.length;ne++){var ce=J[ne],ie=m(ce,["tkhd"])[0];if(ie){var xe=ie[0],ge=xe===0?12:20,de=E(ie,ge),Fe=m(ce,["mdia","mdhd"])[0];if(Fe){xe=Fe[0],ge=xe===0?12:20;var Qe=E(Fe,ge),Ve=m(ce,["mdia","hdlr"])[0];if(Ve){var Ne=h(Ve.subarray(8,12)),Ue={soun:H.ElementaryStreamTypes.AUDIO,vide:H.ElementaryStreamTypes.VIDEO}[Ne];if(Ue){var q=m(ce,["mdia","minf","stbl","stsd"])[0],k=void 0;q&&(k=h(q.subarray(12,16))),V[de]={timescale:Qe,type:Ue},V[Ue]={timescale:Qe,id:de,codec:k}}}}}}var z=m(W,["moov","mvex","trex"]);return z.forEach(function(X){var re=E(X,4),te=V[re];te&&(te.default={duration:E(X,12),flags:E(X,20)})}),V}function A(W,V){if(!W||!V)return W;var J=V.keyId;if(J&&V.isCommonEncryption){var ne=m(W,["moov","trak"]);ne.forEach(function(ce){var ie=m(ce,["mdia","minf","stbl","stsd"])[0],xe=ie.subarray(8),ge=m(xe,["enca"]),de=ge.length>0;de||(ge=m(xe,["encv"])),ge.forEach(function(Fe){var Qe=de?Fe.subarray(28):Fe.subarray(78),Ve=m(Qe,["sinf"]);Ve.forEach(function(Ne){var Ue=u(Ne);if(Ue){var q=Ue.subarray(8,24);q.some(function(k){return k!==0})||(D.logger.log("[eme] Patching keyId in 'enc"+(de?"a":"v")+">sinf>>tenc' box: "+N.default.hexDump(q)+" -> "+N.default.hexDump(J)),Ue.set(J,8))}})})})}return W}function u(W){var V=m(W,["schm"])[0];if(V){var J=h(V.subarray(4,8));if(J==="cbcs"||J==="cenc")return m(W,["schi","tenc"])[0]}return D.logger.error("[eme] missing 'schm' box"),null}function R(W,V){return m(V,["moof","traf"]).reduce(function(J,ne){var ce=m(ne,["tfdt"])[0],ie=ce[0],xe=m(ne,["tfhd"]).reduce(function(ge,de){var Fe=E(de,4),Qe=W[Fe];if(Qe){var Ve=E(ce,4);ie===1&&(Ve*=Math.pow(2,32),Ve+=E(ce,8));var Ne=Qe.timescale||9e4,Ue=Ve/Ne;if(isFinite(Ue)&&(ge===null||Ue<ge))return Ue}return ge},null);return xe!==null&&isFinite(xe)&&(J===null||xe<J)?xe:J},null)||0}function i(W,V){for(var J=0,ne=0,ce=0,ie=m(W,["moof","traf"]),xe=0;xe<ie.length;xe++){var ge=ie[xe],de=m(ge,["tfhd"])[0],Fe=E(de,4),Qe=V[Fe];if(!Qe)continue;var Ve=Qe.default,Ne=E(de,0)|(Ve==null?void 0:Ve.flags),Ue=Ve==null?void 0:Ve.duration;Ne&8&&(Ne&2?Ue=E(de,12):Ue=E(de,8));for(var q=Qe.timescale||9e4,k=m(ge,["trun"]),z=0;z<k.length;z++){if(J=T(k[z]),!J&&Ue){var X=E(k[z],4);J=Ue*X}Qe.type===H.ElementaryStreamTypes.VIDEO?ne+=J/q:Qe.type===H.ElementaryStreamTypes.AUDIO&&(ce+=J/q)}}if(ne===0&&ce===0){for(var re=0,te=m(W,["sidx"]),ae=0;ae<te.length;ae++){var ye=g(te[ae]);ye!=null&&ye.references&&(re+=ye.references.reduce(function(Le,Pe){return Le+Pe.info.duration||0},0))}return re}return ne||ce}function T(W){var V=E(W,0),J=8;V&1&&(J+=4),V&4&&(J+=4);for(var ne=0,ce=E(W,4),ie=0;ie<ce;ie++){if(V&256){var xe=E(W,J);ne+=xe,J+=4}V&512&&(J+=4),V&1024&&(J+=4),V&2048&&(J+=4)}return ne}function w(W,V,J){m(V,["moof","traf"]).forEach(function(ne){m(ne,["tfhd"]).forEach(function(ce){var ie=E(ce,4),xe=W[ie];if(!xe)return;var ge=xe.timescale||9e4;m(ne,["tfdt"]).forEach(function(de){var Fe=de[0],Qe=E(de,4);if(Fe===0)Qe-=J*ge,Qe=Math.max(Qe,0),d(de,4,Qe);else{Qe*=Math.pow(2,32),Qe+=E(de,8),Qe-=J*ge,Qe=Math.max(Qe,0);var Ve=Math.floor(Qe/(c+1)),Ne=Math.floor(Qe%(c+1));d(de,4,Ve),d(de,8,Ne)}})})})}function y(W){var V={valid:null,remainder:null},J=m(W,["moof"]);if(J){if(J.length<2)return V.remainder=W,V}else return V;var ne=J[J.length-1];return V.valid=(0,e.sliceUint8)(W,0,ne.byteOffset-8),V.remainder=(0,e.sliceUint8)(W,ne.byteOffset-8),V}function o(W,V){var J=new Uint8Array(W.length+V.length);return J.set(W),J.set(V,W.length),J}function r(W,V){var J=[],ne=V.samples,ce=V.timescale,ie=V.id,xe=!1,ge=m(ne,["moof"]);return ge.map(function(de){var Fe=de.byteOffset-8,Qe=m(de,["traf"]);Qe.map(function(Ve){var Ne=m(Ve,["tfdt"]).map(function(Ue){var q=Ue[0],k=E(Ue,4);return q===1&&(k*=Math.pow(2,32),k+=E(Ue,8)),k/ce})[0];return Ne!==void 0&&(W=Ne),m(Ve,["tfhd"]).map(function(Ue){var q=E(Ue,4),k=E(Ue,0)&16777215,z=(k&1)!==0,X=(k&2)!==0,re=(k&8)!==0,te=0,ae=(k&16)!==0,ye=0,Le=(k&32)!==0,Pe=8;q===ie&&(z&&(Pe+=8),X&&(Pe+=4),re&&(te=E(Ue,Pe),Pe+=4),ae&&(ye=E(Ue,Pe),Pe+=4),Le&&(Pe+=4),V.type==="video"&&(xe=a(V.codec)),m(Ve,["trun"]).map(function(ke){var Je=ke[0],qe=E(ke,0)&16777215,it=(qe&1)!==0,rt=0,et=(qe&4)!==0,At=(qe&256)!==0,We=0,Ge=(qe&512)!==0,De=0,Te=(qe&1024)!==0,Oe=(qe&2048)!==0,le=0,fe=E(ke,4),Ce=8;it&&(rt=E(ke,Ce),Ce+=4),et&&(Ce+=4);for(var we=rt+Fe,Me=0;Me<fe;Me++){if(At?(We=E(ke,Ce),Ce+=4):We=te,Ge?(De=E(ke,Ce),Ce+=4):De=ye,Te&&(Ce+=4),Oe&&(Je===0?le=E(ke,Ce):le=v(ke,Ce),Ce+=4),V.type===H.ElementaryStreamTypes.VIDEO)for(var $e=0;$e<De;){var Ie=E(ne,we);if(we+=4,n(xe,ne[we])){var Ye=ne.subarray(we,we+Ie);t(Ye,xe?2:1,W+le/ce,J)}we+=Ie,$e+=Ie+4}W+=We/ce}}))})})}),J}function a(W){if(!W)return!1;var V=W.indexOf("."),J=V<0?W:W.substring(0,V);return J==="hvc1"||J==="hev1"||J==="dvh1"||J==="dvhe"}function n(W,V){if(W){var J=V>>1&63;return J===39||J===40}else{var ne=V&31;return ne===6}}function t(W,V,J,ne){var ce=p(W),ie=0;ie+=V;for(var xe=0,ge=0,de=!1,Fe=0;ie<ce.length;){xe=0;do{if(ie>=ce.length)break;Fe=ce[ie++],xe+=Fe}while(Fe===255);ge=0;do{if(ie>=ce.length)break;Fe=ce[ie++],ge+=Fe}while(Fe===255);var Qe=ce.length-ie;if(!de&&xe===4&&ie<ce.length){de=!0;var Ve=ce[ie++];if(Ve===181){var Ne=x(ce,ie);if(ie+=2,Ne===49){var Ue=E(ce,ie);if(ie+=4,Ue===1195456820){var q=ce[ie++];if(q===3){var k=ce[ie++],z=31&k,X=64&k,re=X?2+z*3:0,te=new Uint8Array(re);if(X){te[0]=k;for(var ae=1;ae<re;ae++)te[ae]=ce[ie++]}ne.push({type:q,payloadType:xe,pts:J,bytes:te})}}}}}else if(xe===5&&ge<Qe){if(de=!0,ge>16){for(var ye=[],Le=0;Le<16;Le++){var Pe=ce[ie++].toString(16);ye.push(Pe.length==1?"0"+Pe:Pe),(Le===3||Le===5||Le===7||Le===9)&&ye.push("-")}for(var ke=ge-16,Je=new Uint8Array(ke),qe=0;qe<ke;qe++)Je[qe]=ce[ie++];ne.push({payloadType:xe,pts:J,uuid:ye.join(""),userData:(0,M.utf8ArrayToStr)(Je),userDataBytes:Je})}}else if(ge<Qe)ie+=ge;else if(ge>Qe)break}}function p(W){for(var V=W.byteLength,J=[],ne=1;ne<V-2;)W[ne]===0&&W[ne+1]===0&&W[ne+2]===3?(J.push(ne+2),ne+=2):ne++;if(J.length===0)return W;var ce=V-J.length,ie=new Uint8Array(ce),xe=0;for(ne=0;ne<ce;xe++,ne++)xe===J[0]&&(xe++,J.shift()),ie[ne]=W[xe];return ie}function _(W){var V=W[0],J="",ne="",ce=0,ie=0,xe=0,ge=0,de=0,Fe=0;if(V===0){for(;h(W.subarray(Fe,Fe+1))!=="\0";)J+=h(W.subarray(Fe,Fe+1)),Fe+=1;for(J+=h(W.subarray(Fe,Fe+1)),Fe+=1;h(W.subarray(Fe,Fe+1))!=="\0";)ne+=h(W.subarray(Fe,Fe+1)),Fe+=1;ne+=h(W.subarray(Fe,Fe+1)),Fe+=1,ce=E(W,12),ie=E(W,16),ge=E(W,20),de=E(W,24),Fe=28}else if(V===1){Fe+=4,ce=E(W,Fe),Fe+=4;var Qe=E(W,Fe);Fe+=4;var Ve=E(W,Fe);for(Fe+=4,xe=Math.pow(2,32)*Qe+Ve,Number.isSafeInteger(xe)||(xe=Number.MAX_SAFE_INTEGER,console.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),ge=E(W,Fe),Fe+=4,de=E(W,Fe),Fe+=4;h(W.subarray(Fe,Fe+1))!=="\0";)J+=h(W.subarray(Fe,Fe+1)),Fe+=1;for(J+=h(W.subarray(Fe,Fe+1)),Fe+=1;h(W.subarray(Fe,Fe+1))!=="\0";)ne+=h(W.subarray(Fe,Fe+1)),Fe+=1;ne+=h(W.subarray(Fe,Fe+1)),Fe+=1}var Ne=W.subarray(Fe,W.byteLength);return{schemeIdUri:J,value:ne,timeScale:ce,presentationTime:xe,presentationTimeDelta:ie,eventDuration:ge,id:de,payload:Ne}}function f(W){for(var V=arguments.length,J=new Array(V>1?V-1:0),ne=1;ne<V;ne++)J[ne-1]=arguments[ne];for(var ce=J.length,ie=8,xe=ce;xe--;)ie+=J[xe].byteLength;var ge=new Uint8Array(ie);for(ge[0]=ie>>24&255,ge[1]=ie>>16&255,ge[2]=ie>>8&255,ge[3]=ie&255,ge.set(W,4),xe=0,ie=8;xe<ce;xe++)ge.set(J[xe],ie),ie+=J[xe].byteLength;return ge}function F(W,V,J){if(W.byteLength!==16)throw new RangeError("Invalid system id");var ne,ce;if(V){ne=1,ce=new Uint8Array(V.length*16);for(var ie=0;ie<V.length;ie++){var xe=V[ie];if(xe.byteLength!==16)throw new RangeError("Invalid key");ce.set(xe,ie*16)}}else ne=0,ce=new Uint8Array;var ge;ne>0?(ge=new Uint8Array(4),V.length>0&&new DataView(ge.buffer).setUint32(0,V.length,!1)):ge=new Uint8Array;var de=new Uint8Array(4);return J&&J.byteLength>0&&new DataView(de.buffer).setUint32(0,J.byteLength,!1),f([112,115,115,104],new Uint8Array([ne,0,0,0]),W,ge,ce,de,J||new Uint8Array)}function P(W){if(!(W instanceof ArrayBuffer)||W.byteLength<32)return null;var V={version:0,systemId:"",kids:null,data:null},J=new DataView(W),ne=J.getUint32(0);if(W.byteLength!==ne&&ne>44)return null;var ce=J.getUint32(4);if(ce!==1886614376)return null;if(V.version=J.getUint32(8)>>>24,V.version>1)return null;V.systemId=N.default.hexDump(new Uint8Array(W,12,16));var ie=J.getUint32(28);if(V.version===0){if(ne-32<ie)return null;V.data=new Uint8Array(W,32,ie)}else if(V.version===1){V.kids=[];for(var xe=0;xe<ie;xe++)V.kids.push(new Uint8Array(W,32+xe*16,16))}return V}},"./src/utils/numeric-encoding-utils.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{base64Decode:()=>c,base64DecodeToStr:()=>M,base64Encode:()=>D,base64ToBase64Url:()=>H,base64UrlEncode:()=>N,strToBase64Encode:()=>e});function H(l){return l.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function e(l){return btoa(l)}function M(l){return atob(l)}function D(l){return btoa(String.fromCharCode.apply(String,l))}function N(l){return H(D(l))}function c(l){return Uint8Array.from(atob(l),function(s){return s.charCodeAt(0)})}},"./src/utils/output-filter.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>H});var H=function(){function e(D,N){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=D,this.trackName=N}var M=e.prototype;return M.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},M.newCue=function(N,c,l){(this.startTime===null||this.startTime>N)&&(this.startTime=N),this.endTime=c,this.screen=l,this.timelineController.createCaptionsTrack(this.trackName)},M.reset=function(){this.cueRanges=[],this.startTime=null},e}()},"./src/utils/texttrack-utils.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{addCueToTrack:()=>M,clearCurrentCues:()=>D,getCuesInRange:()=>l,removeCuesInRange:()=>N,sendAddTrackEvent:()=>e});var H=O("./src/utils/logger.ts");function e(s,h){var x;try{x=new Event("addtrack")}catch(E){x=document.createEvent("Event"),x.initEvent("addtrack",!1,!1)}x.track=s,h.dispatchEvent(x)}function M(s,h){var x=s.mode;if(x==="disabled"&&(s.mode="hidden"),s.cues&&!s.cues.getCueById(h.id))try{if(s.addCue(h),!s.cues.getCueById(h.id))throw new Error("addCue is failed for: "+h)}catch(v){H.logger.debug("[texttrack-utils]: "+v);var E=new self.TextTrackCue(h.startTime,h.endTime,h.text);E.id=h.id,s.addCue(E)}x==="disabled"&&(s.mode=x)}function D(s){var h=s.mode;if(h==="disabled"&&(s.mode="hidden"),s.cues)for(var x=s.cues.length;x--;)s.removeCue(s.cues[x]);h==="disabled"&&(s.mode=h)}function N(s,h,x,E){var v=s.mode;if(v==="disabled"&&(s.mode="hidden"),s.cues&&s.cues.length>0)for(var d=l(s.cues,h,x),m=0;m<d.length;m++)(!E||E(d[m]))&&s.removeCue(d[m]);v==="disabled"&&(s.mode=v)}function c(s,h){if(h<s[0].startTime)return 0;var x=s.length-1;if(h>s[x].endTime)return-1;for(var E=0,v=x;E<=v;){var d=Math.floor((v+E)/2);if(h<s[d].startTime)v=d-1;else if(h>s[d].startTime&&E<x)E=d+1;else return d}return s[E].startTime-h<h-s[v].startTime?E:v}function l(s,h,x){var E=[],v=c(s,h);if(v>-1)for(var d=v,m=s.length;d<m;d++){var g=s[d];if(g.startTime>=h&&g.endTime<=x)E.push(g);else if(g.startTime>x)return E}return E}},"./src/utils/time-ranges.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>e});var H={toString:function(D){for(var N="",c=D.length,l=0;l<c;l++)N+="["+D.start(l).toFixed(3)+"-"+D.end(l).toFixed(3)+"]";return N}};const e=H},"./src/utils/timescale-conversion.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{toMpegTsClockFromTimescale:()=>N,toMsFromMpegTsClock:()=>D,toTimescaleFromBase:()=>e,toTimescaleFromScale:()=>M});var H=9e4;function e(c,l,s,h){s===void 0&&(s=1),h===void 0&&(h=!1);var x=c*l*s;return h?Math.round(x):x}function M(c,l,s,h){return s===void 0&&(s=1),h===void 0&&(h=!1),e(c,l,1/s,h)}function D(c,l){return l===void 0&&(l=!1),e(c,1e3,1/H,l)}function N(c,l){return l===void 0&&(l=1),e(c,H,1/l)}},"./src/utils/typed-array.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{sliceUint8:()=>H});function H(e,M,D){return Uint8Array.prototype.slice?e.slice(M,D):new Uint8Array(Array.prototype.slice.call(e,M,D))}},"./src/utils/vttcue.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>H});const H=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var e=["","lr","rl"],M=["start","middle","end","left","right"];function D(h,x){if(typeof x!="string")return!1;if(!Array.isArray(h))return!1;var E=x.toLowerCase();return~h.indexOf(E)?E:!1}function N(h){return D(e,h)}function c(h){return D(M,h)}function l(h){for(var x=arguments.length,E=new Array(x>1?x-1:0),v=1;v<x;v++)E[v-1]=arguments[v];for(var d=1;d<arguments.length;d++){var m=arguments[d];for(var g in m)h[g]=m[g]}return h}function s(h,x,E){var v=this,d={enumerable:!0};v.hasBeenReset=!1;var m="",g=!1,S=h,A=x,u=E,R=null,i="",T=!0,w="auto",y="start",o=50,r="middle",a=50,n="middle";Object.defineProperty(v,"id",l({},d,{get:function(){return m},set:function(p){m=""+p}})),Object.defineProperty(v,"pauseOnExit",l({},d,{get:function(){return g},set:function(p){g=!!p}})),Object.defineProperty(v,"startTime",l({},d,{get:function(){return S},set:function(p){if(typeof p!="number")throw new TypeError("Start time must be set to a number.");S=p,this.hasBeenReset=!0}})),Object.defineProperty(v,"endTime",l({},d,{get:function(){return A},set:function(p){if(typeof p!="number")throw new TypeError("End time must be set to a number.");A=p,this.hasBeenReset=!0}})),Object.defineProperty(v,"text",l({},d,{get:function(){return u},set:function(p){u=""+p,this.hasBeenReset=!0}})),Object.defineProperty(v,"region",l({},d,{get:function(){return R},set:function(p){R=p,this.hasBeenReset=!0}})),Object.defineProperty(v,"vertical",l({},d,{get:function(){return i},set:function(p){var _=N(p);if(_===!1)throw new SyntaxError("An invalid or illegal string was specified.");i=_,this.hasBeenReset=!0}})),Object.defineProperty(v,"snapToLines",l({},d,{get:function(){return T},set:function(p){T=!!p,this.hasBeenReset=!0}})),Object.defineProperty(v,"line",l({},d,{get:function(){return w},set:function(p){if(typeof p!="number"&&p!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");w=p,this.hasBeenReset=!0}})),Object.defineProperty(v,"lineAlign",l({},d,{get:function(){return y},set:function(p){var _=c(p);if(!_)throw new SyntaxError("An invalid or illegal string was specified.");y=_,this.hasBeenReset=!0}})),Object.defineProperty(v,"position",l({},d,{get:function(){return o},set:function(p){if(p<0||p>100)throw new Error("Position must be between 0 and 100.");o=p,this.hasBeenReset=!0}})),Object.defineProperty(v,"positionAlign",l({},d,{get:function(){return r},set:function(p){var _=c(p);if(!_)throw new SyntaxError("An invalid or illegal string was specified.");r=_,this.hasBeenReset=!0}})),Object.defineProperty(v,"size",l({},d,{get:function(){return a},set:function(p){if(p<0||p>100)throw new Error("Size must be between 0 and 100.");a=p,this.hasBeenReset=!0}})),Object.defineProperty(v,"align",l({},d,{get:function(){return n},set:function(p){var _=c(p);if(!_)throw new SyntaxError("An invalid or illegal string was specified.");n=_,this.hasBeenReset=!0}})),v.displayState=void 0}return s.prototype.getCueAsHTML=function(){var h=self.WebVTT;return h.convertCueToDOMTree(self,this.text)},s}()},"./src/utils/vttparser.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{VTTParser:()=>x,fixLineBreaks:()=>h,parseTimeStamp:()=>M});var H=O("./src/utils/vttcue.ts"),e=function(){function E(){}var v=E.prototype;return v.decode=function(m,g){if(!m)return"";if(typeof m!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(m))},E}();function M(E){function v(m,g,S,A){return(m|0)*3600+(g|0)*60+(S|0)+parseFloat(A||0)}var d=E.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return d?parseFloat(d[2])>59?v(d[2],d[3],0,d[4]):v(d[1],d[2],d[3],d[4]):null}var D=function(){function E(){this.values=Object.create(null)}var v=E.prototype;return v.set=function(m,g){!this.get(m)&&g!==""&&(this.values[m]=g)},v.get=function(m,g,S){return S?this.has(m)?this.values[m]:g[S]:this.has(m)?this.values[m]:g},v.has=function(m){return m in this.values},v.alt=function(m,g,S){for(var A=0;A<S.length;++A)if(g===S[A]){this.set(m,g);break}},v.integer=function(m,g){/^-?\d+$/.test(g)&&this.set(m,parseInt(g,10))},v.percent=function(m,g){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(g)){var S=parseFloat(g);if(S>=0&&S<=100)return this.set(m,S),!0}return!1},E}();function N(E,v,d,m){var g=m?E.split(m):[E];for(var S in g){if(typeof g[S]!="string")continue;var A=g[S].split(d);if(A.length!==2)continue;var u=A[0],R=A[1];v(u,R)}}var c=new H.default(0,0,""),l=c.align==="middle"?"middle":"center";function s(E,v,d){var m=E;function g(){var u=M(E);if(u===null)throw new Error("Malformed timestamp: "+m);return E=E.replace(/^[^\sa-zA-Z-]+/,""),u}function S(u,R){var i=new D;N(u,function(y,o){var r;switch(y){case"region":for(var a=d.length-1;a>=0;a--)if(d[a].id===o){i.set(y,d[a].region);break}break;case"vertical":i.alt(y,o,["rl","lr"]);break;case"line":r=o.split(","),i.integer(y,r[0]),i.percent(y,r[0])&&i.set("snapToLines",!1),i.alt(y,r[0],["auto"]),r.length===2&&i.alt("lineAlign",r[1],["start",l,"end"]);break;case"position":r=o.split(","),i.percent(y,r[0]),r.length===2&&i.alt("positionAlign",r[1],["start",l,"end","line-left","line-right","auto"]);break;case"size":i.percent(y,o);break;case"align":i.alt(y,o,["start",l,"end","left","right"]);break}},/:/,/\s/),R.region=i.get("region",null),R.vertical=i.get("vertical","");var T=i.get("line","auto");T==="auto"&&c.line===-1&&(T=-1),R.line=T,R.lineAlign=i.get("lineAlign","start"),R.snapToLines=i.get("snapToLines",!0),R.size=i.get("size",100),R.align=i.get("align",l);var w=i.get("position","auto");w==="auto"&&c.position===50&&(w=R.align==="start"||R.align==="left"?0:R.align==="end"||R.align==="right"?100:50),R.position=w}function A(){E=E.replace(/^\s+/,"")}if(A(),v.startTime=g(),A(),E.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+m);E=E.slice(3),A(),v.endTime=g(),A(),S(E,v)}function h(E){return E.replace(/<br(?: \/)?>/gi,`
|
|
`)}var x=function(){function E(){this.state="INITIAL",this.buffer="",this.decoder=new e,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var v=E.prototype;return v.parse=function(m){var g=this;m&&(g.buffer+=g.decoder.decode(m,{stream:!0}));function S(){var w=g.buffer,y=0;for(w=h(w);y<w.length&&w[y]!=="\r"&&w[y]!==`
|
|
`;)++y;var o=w.slice(0,y);return w[y]==="\r"&&++y,w[y]===`
|
|
`&&++y,g.buffer=w.slice(y),o}function A(w){N(w,function(y,o){},/:/)}try{var u="";if(g.state==="INITIAL"){if(!/\r\n|\n/.test(g.buffer))return this;u=S();var R=u.match(/^()?WEBVTT([ \t].*)?$/);if(!R||!R[0])throw new Error("Malformed WebVTT signature.");g.state="HEADER"}for(var i=!1;g.buffer;){if(!/\r\n|\n/.test(g.buffer))return this;i?i=!1:u=S();switch(g.state){case"HEADER":/:/.test(u)?A(u):u||(g.state="ID");continue;case"NOTE":u||(g.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(u)){g.state="NOTE";break}if(!u)continue;if(g.cue=new H.default(0,0,""),g.state="CUE",u.indexOf("-->")===-1){g.cue.id=u;continue}case"CUE":if(!g.cue){g.state="BADCUE";continue}try{s(u,g.cue,g.regionList)}catch(w){g.cue=null,g.state="BADCUE";continue}g.state="CUETEXT";continue;case"CUETEXT":{var T=u.indexOf("-->")!==-1;if(!u||T&&(i=!0)){g.oncue&&g.cue&&g.oncue(g.cue),g.cue=null,g.state="ID";continue}if(g.cue===null)continue;g.cue.text&&(g.cue.text+=`
|
|
`),g.cue.text+=u}continue;case"BADCUE":u||(g.state="ID")}}}catch(w){g.state==="CUETEXT"&&g.cue&&g.oncue&&g.oncue(g.cue),g.cue=null,g.state=g.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},v.flush=function(){var m=this;try{if((m.cue||m.state==="HEADER")&&(m.buffer+=`
|
|
|
|
`,m.parse()),m.state==="INITIAL"||m.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(g){m.onparsingerror&&m.onparsingerror(g)}return m.onflush&&m.onflush(),this},E}()},"./src/utils/webvtt-parser.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{generateCueId:()=>x,parseWebVTT:()=>v});var H=O("./src/polyfills/number.ts"),e=O("./src/utils/vttparser.ts"),M=O("./src/demux/id3.ts"),D=O("./src/utils/timescale-conversion.ts"),N=O("./src/remux/mp4-remuxer.ts"),c=/\r\n|\n\r|\n|\r/g,l=function(m,g,S){return S===void 0&&(S=0),m.slice(S,S+g.length)===g},s=function(m){var g=parseInt(m.slice(-3)),S=parseInt(m.slice(-6,-4)),A=parseInt(m.slice(-9,-7)),u=m.length>9?parseInt(m.substring(0,m.indexOf(":"))):0;if(!(0,H.isFiniteNumber)(g)||!(0,H.isFiniteNumber)(S)||!(0,H.isFiniteNumber)(A)||!(0,H.isFiniteNumber)(u))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+m);return g+=1e3*S,g+=60*1e3*A,g+=60*60*1e3*u,g},h=function(m){for(var g=5381,S=m.length;S;)g=g*33^m.charCodeAt(--S);return(g>>>0).toString()};function x(d,m,g){return h(d.toString())+h(m.toString())+h(g)}var E=function(m,g,S){var A=m[g],u=m[A.prevCC];if(!u||!u.new&&A.new){m.ccOffset=m.presentationOffset=A.start,A.new=!1;return}for(;(R=u)!==null&&R!==void 0&&R.new;){var R;m.ccOffset+=A.start-u.start,A.new=!1,A=u,u=m[A.prevCC]}m.presentationOffset=S};function v(d,m,g,S,A,u,R,i){var T=new e.VTTParser,w=(0,M.utf8ArrayToStr)(new Uint8Array(d)).trim().replace(c,`
|
|
`).split(`
|
|
`),y=[],o=(0,D.toMpegTsClockFromTimescale)(m,g),r="00:00.000",a=0,n=0,t,p=!0;T.oncue=function(_){var f=S[A],F=S.ccOffset,P=(a-o)/9e4;f!=null&&f.new&&(n!==void 0?F=S.ccOffset=f.start:E(S,A,P)),P&&(F=P-S.presentationOffset);var W=_.endTime-_.startTime,V=(0,N.normalizePts)((_.startTime+F-n)*9e4,u*9e4)/9e4;_.startTime=Math.max(V,0),_.endTime=Math.max(V+W,0);var J=_.text.trim();_.text=decodeURIComponent(encodeURIComponent(J)),_.id||(_.id=x(_.startTime,_.endTime,J)),_.endTime>0&&y.push(_)},T.onparsingerror=function(_){t=_},T.onflush=function(){if(t){i(t);return}R(y)},w.forEach(function(_){if(p)if(l(_,"X-TIMESTAMP-MAP=")){p=!1,_.slice(16).split(",").forEach(function(f){l(f,"LOCAL:")?r=f.slice(6):l(f,"MPEGTS:")&&(a=parseInt(f.slice(7)))});try{n=s(r)/1e3}catch(f){t=f}return}else _===""&&(p=!1);T.parse(_+`
|
|
`)}),T.flush()}},"./src/utils/xhr-loader.ts":(ue,$,O)=>{"use strict";O.r($),O.d($,{default:()=>N});var H=O("./src/utils/logger.ts"),e=O("./src/loader/load-stats.ts"),M=/^age:\s*[\d.]+\s*$/m,D=function(){function c(s){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=s?s.xhrSetup:null,this.stats=new e.LoadStats,this.retryDelay=0}var l=c.prototype;return l.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},l.abortInternal=function(){var h=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),h&&(h.onreadystatechange=null,h.onprogress=null,h.readyState!==4&&(this.stats.aborted=!0,h.abort()))},l.abort=function(){var h;this.abortInternal(),(h=this.callbacks)!==null&&h!==void 0&&h.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},l.load=function(h,x,E){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=h,this.config=x,this.callbacks=E,this.retryDelay=x.retryDelay,this.loadInternal()},l.loadInternal=function(){var h=this.config,x=this.context;if(!h)return;var E=this.loader=new self.XMLHttpRequest,v=this.stats;v.loading.first=0,v.loaded=0;var d=this.xhrSetup;try{if(d)try{d(E,x.url)}catch(S){E.open("GET",x.url,!0),d(E,x.url)}E.readyState||E.open("GET",x.url,!0);var m=this.context.headers;if(m)for(var g in m)E.setRequestHeader(g,m[g])}catch(S){this.callbacks.onError({code:E.status,text:S.message},x,E);return}x.rangeEnd&&E.setRequestHeader("Range","bytes="+x.rangeStart+"-"+(x.rangeEnd-1)),E.onreadystatechange=this.readystatechange.bind(this),E.onprogress=this.loadprogress.bind(this),E.responseType=x.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),h.timeout),E.send()},l.readystatechange=function(){var h=this.context,x=this.loader,E=this.stats;if(!h||!x)return;var v=x.readyState,d=this.config;if(E.aborted)return;if(v>=2)if(self.clearTimeout(this.requestTimeout),E.loading.first===0&&(E.loading.first=Math.max(self.performance.now(),E.loading.start)),v===4){x.onreadystatechange=null,x.onprogress=null;var m=x.status,g=x.responseType==="arraybuffer";if(m>=200&&m<300&&(g&&x.response||x.responseText!==null)){E.loading.end=Math.max(self.performance.now(),E.loading.first);var S,A;if(g?(S=x.response,A=S.byteLength):(S=x.responseText,A=S.length),E.loaded=E.total=A,!this.callbacks)return;var u=this.callbacks.onProgress;if(u&&u(E,h,S,x),!this.callbacks)return;var R={url:x.responseURL,data:S};this.callbacks.onSuccess(R,E,h,x)}else E.retry>=d.maxRetry||m>=400&&m<499?(H.logger.error(m+" while loading "+h.url),this.callbacks.onError({code:m,text:x.statusText},h,x)):(H.logger.warn(m+" while loading "+h.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,d.maxRetryDelay),E.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),d.timeout)},l.loadtimeout=function(){H.logger.warn("timeout while loading "+this.context.url);var h=this.callbacks;h&&(this.abortInternal(),h.onTimeout(this.stats,this.context,this.loader))},l.loadprogress=function(h){var x=this.stats;x.loaded=h.loaded,h.lengthComputable&&(x.total=h.total)},l.getCacheAge=function(){var h=null;if(this.loader&&M.test(this.loader.getAllResponseHeaders())){var x=this.loader.getResponseHeader("age");h=x?parseFloat(x):null}return h},c}();const N=D},"./node_modules/eventemitter3/index.js":ue=>{"use strict";var $=Object.prototype.hasOwnProperty,O="~";function H(){}Object.create&&(H.prototype=Object.create(null),new H().__proto__||(O=!1));function e(c,l,s){this.fn=c,this.context=l,this.once=s||!1}function M(c,l,s,h,x){if(typeof s!="function")throw new TypeError("The listener must be a function");var E=new e(s,h||c,x),v=O?O+l:l;return c._events[v]?c._events[v].fn?c._events[v]=[c._events[v],E]:c._events[v].push(E):(c._events[v]=E,c._eventsCount++),c}function D(c,l){--c._eventsCount===0?c._events=new H:delete c._events[l]}function N(){this._events=new H,this._eventsCount=0}N.prototype.eventNames=function(){var l=[],s,h;if(this._eventsCount===0)return l;for(h in s=this._events)$.call(s,h)&&l.push(O?h.slice(1):h);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(s)):l},N.prototype.listeners=function(l){var s=O?O+l:l,h=this._events[s];if(!h)return[];if(h.fn)return[h.fn];for(var x=0,E=h.length,v=new Array(E);x<E;x++)v[x]=h[x].fn;return v},N.prototype.listenerCount=function(l){var s=O?O+l:l,h=this._events[s];return h?h.fn?1:h.length:0},N.prototype.emit=function(l,s,h,x,E,v){var d=O?O+l:l;if(!this._events[d])return!1;var m=this._events[d],g=arguments.length,S,A;if(m.fn){m.once&&this.removeListener(l,m.fn,void 0,!0);switch(g){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,s),!0;case 3:return m.fn.call(m.context,s,h),!0;case 4:return m.fn.call(m.context,s,h,x),!0;case 5:return m.fn.call(m.context,s,h,x,E),!0;case 6:return m.fn.call(m.context,s,h,x,E,v),!0}for(A=1,S=new Array(g-1);A<g;A++)S[A-1]=arguments[A];m.fn.apply(m.context,S)}else{var u=m.length,R;for(A=0;A<u;A++){m[A].once&&this.removeListener(l,m[A].fn,void 0,!0);switch(g){case 1:m[A].fn.call(m[A].context);break;case 2:m[A].fn.call(m[A].context,s);break;case 3:m[A].fn.call(m[A].context,s,h);break;case 4:m[A].fn.call(m[A].context,s,h,x);break;default:if(!S)for(R=1,S=new Array(g-1);R<g;R++)S[R-1]=arguments[R];m[A].fn.apply(m[A].context,S)}}}return!0},N.prototype.on=function(l,s,h){return M(this,l,s,h,!1)},N.prototype.once=function(l,s,h){return M(this,l,s,h,!0)},N.prototype.removeListener=function(l,s,h,x){var E=O?O+l:l;if(!this._events[E])return this;if(!s)return D(this,E),this;var v=this._events[E];if(v.fn)v.fn===s&&(!x||v.once)&&(!h||v.context===h)&&D(this,E);else{for(var d=0,m=[],g=v.length;d<g;d++)(v[d].fn!==s||x&&!v[d].once||h&&v[d].context!==h)&&m.push(v[d]);m.length?this._events[E]=m.length===1?m[0]:m:D(this,E)}return this},N.prototype.removeAllListeners=function(l){var s;return l?(s=O?O+l:l,this._events[s]&&D(this,s)):(this._events=new H,this._eventsCount=0),this},N.prototype.off=N.prototype.removeListener,N.prototype.addListener=N.prototype.on,N.prefixed=O,N.EventEmitter=N,ue.exports=N},"./node_modules/url-toolkit/src/url-toolkit.js":function(ue){(function($){var O=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,H=/^(?=([^\/?#]*))\1([^]*)$/,e=/(?:\/|^)\.(?=\/)/g,M=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,D={buildAbsoluteURL:function(N,c,l){if(l=l||{},N=N.trim(),c=c.trim(),!c){if(!l.alwaysNormalize)return N;var s=D.parseURL(N);if(!s)throw new Error("Error trying to parse base URL.");return s.path=D.normalizePath(s.path),D.buildURLFromParts(s)}var h=D.parseURL(c);if(!h)throw new Error("Error trying to parse relative URL.");if(h.scheme)return l.alwaysNormalize?(h.path=D.normalizePath(h.path),D.buildURLFromParts(h)):c;var x=D.parseURL(N);if(!x)throw new Error("Error trying to parse base URL.");if(!x.netLoc&&x.path&&x.path[0]!=="/"){var E=H.exec(x.path);x.netLoc=E[1],x.path=E[2]}x.netLoc&&!x.path&&(x.path="/");var v={scheme:x.scheme,netLoc:h.netLoc,path:null,params:h.params,query:h.query,fragment:h.fragment};if(!h.netLoc&&(v.netLoc=x.netLoc,h.path[0]!=="/"))if(!h.path)v.path=x.path,h.params||(v.params=x.params,h.query||(v.query=x.query));else{var d=x.path,m=d.substring(0,d.lastIndexOf("/")+1)+h.path;v.path=D.normalizePath(m)}return v.path===null&&(v.path=l.alwaysNormalize?D.normalizePath(h.path):h.path),D.buildURLFromParts(v)},parseURL:function(N){var c=O.exec(N);return c?{scheme:c[1]||"",netLoc:c[2]||"",path:c[3]||"",params:c[4]||"",query:c[5]||"",fragment:c[6]||""}:null},normalizePath:function(N){for(N=N.split("").reverse().join("").replace(e,"");N.length!==(N=N.replace(M,"")).length;);return N.split("").reverse().join("")},buildURLFromParts:function(N){return N.scheme+N.netLoc+N.path+N.params+N.query+N.fragment}};ue.exports=D})(this)}},be={};function ve(ue){var $=be[ue];if($!==void 0)return $.exports;var O=be[ue]={exports:{}};return he[ue].call(O.exports,O,O.exports,ve),O.exports}ve.m=he,(()=>{ve.n=ue=>{var $=ue&&ue.__esModule?()=>ue.default:()=>ue;return ve.d($,{a:$}),$}})(),(()=>{ve.d=(ue,$)=>{for(var O in $)ve.o($,O)&&!ve.o(ue,O)&&Object.defineProperty(ue,O,{enumerable:!0,get:$[O]})}})(),(()=>{ve.o=(ue,$)=>Object.prototype.hasOwnProperty.call(ue,$)})(),(()=>{ve.r=ue=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(ue,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(ue,"__esModule",{value:!0})}})();var Ee=ve("./src/hls.ts");return Ee=Ee.default,Ee})())},vHTk:function(dt,_e,Q){dt.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},vqdp:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return O});var he=Q("B/uU"),be=Q("El5i");function ve(H,e){var M=new Set;return H.forEach(function(D){e.has(D)||M.add(D)}),M}function Ee(H){var e=H||{},M=e.disabled,D=e.disableCheckbox,N=e.checkable;return!!(M||D)||N===!1}function ue(H,e,M,D){for(var N=new Set(H),c=new Set,l=0;l<=M;l+=1){var s=e.get(l)||new Set;s.forEach(function(v){var d=v.key,m=v.node,g=v.children,S=g===void 0?[]:g;N.has(d)&&!D(m)&&S.filter(function(A){return!D(A.node)}).forEach(function(A){N.add(A.key)})})}for(var h=new Set,x=M;x>=0;x-=1){var E=e.get(x)||new Set;E.forEach(function(v){var d=v.parent,m=v.node;if(D(m)||!v.parent||h.has(v.parent.key))return;if(D(v.parent.node)){h.add(d.key);return}var g=!0,S=!1;(d.children||[]).filter(function(A){return!D(A.node)}).forEach(function(A){var u=A.key,R=N.has(u);g&&!R&&(g=!1),!S&&(R||c.has(u))&&(S=!0)}),g&&N.add(d.key),S&&c.add(d.key),h.add(d.key)})}return{checkedKeys:Array.from(N),halfCheckedKeys:Array.from(ve(c,N))}}function $(H,e,M,D,N){for(var c=new Set(H),l=new Set(e),s=0;s<=D;s+=1){var h=M.get(s)||new Set;h.forEach(function(d){var m=d.key,g=d.node,S=d.children,A=S===void 0?[]:S;!c.has(m)&&!l.has(m)&&!N(g)&&A.filter(function(u){return!N(u.node)}).forEach(function(u){c.delete(u.key)})})}l=new Set;for(var x=new Set,E=D;E>=0;E-=1){var v=M.get(E)||new Set;v.forEach(function(d){var m=d.parent,g=d.node;if(N(g)||!d.parent||x.has(d.parent.key))return;if(N(d.parent.node)){x.add(m.key);return}var S=!0,A=!1;(m.children||[]).filter(function(u){return!N(u.node)}).forEach(function(u){var R=u.key,i=c.has(R);S&&!i&&(S=!1),!A&&(i||l.has(R))&&(A=!0)}),S||c.delete(m.key),A&&l.add(m.key),x.add(m.key)})}return{checkedKeys:Array.from(c),halfCheckedKeys:Array.from(ve(l,c))}}function O(H,e,M,D){var N=[],c;D?c=D:c=Ee;var l=new Set(H.filter(function(E){var v=!!Object(be.a)(M,E);return v||N.push(E),v})),s=new Map,h=0;Object.keys(M).forEach(function(E){var v=M[E],d=v.level,m=s.get(d);m||(m=new Set,s.set(d,m)),m.add(v),h=Math.max(h,d)}),Object(he.a)(!N.length,"Tree missing follow keys: ".concat(N.slice(0,100).map(function(E){return"'".concat(E,"'")}).join(", ")));var x;return e===!0?x=ue(l,s,h,c):x=$(l,e.halfCheckedKeys,s,h,c),x}},wOnQ:function(dt,_e,Q){/*!
|
|
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
|
|
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
|
* Released under MIT License
|
|
*/(function(he,be){dt.exports=be()})(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 he=function(I,C){return he=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(U,L){U.__proto__=L}||function(U,L){for(var Y in L)Object.prototype.hasOwnProperty.call(L,Y)&&(U[Y]=L[Y])},he(I,C)};function be(I,C){if(typeof C!="function"&&C!==null)throw new TypeError("Class extends value "+String(C)+" is not a constructor or null");he(I,C);function U(){this.constructor=I}I.prototype=C===null?Object.create(C):(U.prototype=C.prototype,new U)}var ve=function(){return ve=Object.assign||function(C){for(var U,L=1,Y=arguments.length;L<Y;L++){U=arguments[L];for(var ee in U)Object.prototype.hasOwnProperty.call(U,ee)&&(C[ee]=U[ee])}return C},ve.apply(this,arguments)};function Ee(I,C,U,L){function Y(ee){return ee instanceof U?ee:new U(function(me){me(ee)})}return new(U||(U=Promise))(function(ee,me){function Se(ze){try{je(L.next(ze))}catch(st){me(st)}}function Be(ze){try{je(L.throw(ze))}catch(st){me(st)}}function je(ze){ze.done?ee(ze.value):Y(ze.value).then(Se,Be)}je((L=L.apply(I,C||[])).next())})}function ue(I,C){var U={label:0,sent:function(){if(ee[0]&1)throw ee[1];return ee[1]},trys:[],ops:[]},L,Y,ee,me;return me={next:Se(0),throw:Se(1),return:Se(2)},typeof Symbol=="function"&&(me[Symbol.iterator]=function(){return this}),me;function Se(je){return function(ze){return Be([je,ze])}}function Be(je){if(L)throw new TypeError("Generator is already executing.");for(;U;)try{if(L=1,Y&&(ee=je[0]&2?Y.return:je[0]?Y.throw||((ee=Y.return)&&ee.call(Y),0):Y.next)&&!(ee=ee.call(Y,je[1])).done)return ee;(Y=0,ee)&&(je=[je[0]&2,ee.value]);switch(je[0]){case 0:case 1:ee=je;break;case 4:return U.label++,{value:je[1],done:!1};case 5:U.label++,Y=je[1],je=[0];continue;case 7:je=U.ops.pop(),U.trys.pop();continue;default:if(!(ee=U.trys,ee=ee.length>0&&ee[ee.length-1])&&(je[0]===6||je[0]===2)){U=0;continue}if(je[0]===3&&(!ee||je[1]>ee[0]&&je[1]<ee[3])){U.label=je[1];break}if(je[0]===6&&U.label<ee[1]){U.label=ee[1],ee=je;break}if(ee&&U.label<ee[2]){U.label=ee[2],U.ops.push(je);break}ee[2]&&U.ops.pop(),U.trys.pop();continue}je=C.call(I,U)}catch(ze){je=[6,ze],Y=0}finally{L=ee=0}if(je[0]&5)throw je[1];return{value:je[0]?je[1]:void 0,done:!0}}}function $(I,C,U){if(U||arguments.length===2)for(var L=0,Y=C.length,ee;L<Y;L++)(ee||!(L in C))&&(ee||(ee=Array.prototype.slice.call(C,0,L)),ee[L]=C[L]);return I.concat(ee||C)}for(var O=function(){function I(C,U,L,Y){this.left=C,this.top=U,this.width=L,this.height=Y}return I.prototype.add=function(C,U,L,Y){return new I(this.left+C,this.top+U,this.width+L,this.height+Y)},I.fromClientRect=function(C,U){return new I(U.left+C.windowBounds.left,U.top+C.windowBounds.top,U.width,U.height)},I.fromDOMRectList=function(C,U){var L=Array.from(U).find(function(Y){return Y.width!==0});return L?new I(L.left+C.windowBounds.left,L.top+C.windowBounds.top,L.width,L.height):I.EMPTY},I.EMPTY=new I(0,0,0,0),I}(),H=function(I,C){return O.fromClientRect(I,C.getBoundingClientRect())},e=function(I){var C=I.body,U=I.documentElement;if(!C||!U)throw new Error("Unable to get document size");var L=Math.max(Math.max(C.scrollWidth,U.scrollWidth),Math.max(C.offsetWidth,U.offsetWidth),Math.max(C.clientWidth,U.clientWidth)),Y=Math.max(Math.max(C.scrollHeight,U.scrollHeight),Math.max(C.offsetHeight,U.offsetHeight),Math.max(C.clientHeight,U.clientHeight));return new O(0,0,L,Y)},M=function(I){for(var C=[],U=0,L=I.length;U<L;){var Y=I.charCodeAt(U++);if(Y>=55296&&Y<=56319&&U<L){var ee=I.charCodeAt(U++);(ee&64512)===56320?C.push(((Y&1023)<<10)+(ee&1023)+65536):(C.push(Y),U--)}else C.push(Y)}return C},D=function(){for(var I=[],C=0;C<arguments.length;C++)I[C]=arguments[C];if(String.fromCodePoint)return String.fromCodePoint.apply(String,I);var U=I.length;if(!U)return"";for(var L=[],Y=-1,ee="";++Y<U;){var me=I[Y];me<=65535?L.push(me):(me-=65536,L.push((me>>10)+55296,me%1024+56320)),(Y+1===U||L.length>16384)&&(ee+=String.fromCharCode.apply(String,L),L.length=0)}return ee},N="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),l=0;l<N.length;l++)c[N.charCodeAt(l)]=l;for(var s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),x=0;x<s.length;x++)h[s.charCodeAt(x)]=x;for(var E=function(I){var C=I.length*.75,U=I.length,L,Y=0,ee,me,Se,Be;I[I.length-1]==="="&&(C--,I[I.length-2]==="="&&C--);var je=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(C):new Array(C),ze=Array.isArray(je)?je:new Uint8Array(je);for(L=0;L<U;L+=4)ee=h[I.charCodeAt(L)],me=h[I.charCodeAt(L+1)],Se=h[I.charCodeAt(L+2)],Be=h[I.charCodeAt(L+3)],ze[Y++]=ee<<2|me>>4,ze[Y++]=(me&15)<<4|Se>>2,ze[Y++]=(Se&3)<<6|Be&63;return je},v=function(I){for(var C=I.length,U=[],L=0;L<C;L+=2)U.push(I[L+1]<<8|I[L]);return U},d=function(I){for(var C=I.length,U=[],L=0;L<C;L+=4)U.push(I[L+3]<<24|I[L+2]<<16|I[L+1]<<8|I[L]);return U},m=5,g=6+5,S=2,A=g-m,u=65536>>m,R=1<<m,i=R-1,T=1024>>m,w=u+T,y=w,o=2048>>6,r=y+o,a=65536>>g,n=1<<A,t=n-1,p=function(I,C,U){return I.slice?I.slice(C,U):new Uint16Array(Array.prototype.slice.call(I,C,U))},_=function(I,C,U){return I.slice?I.slice(C,U):new Uint32Array(Array.prototype.slice.call(I,C,U))},f=function(I,C){var U=E(I),L=Array.isArray(U)?d(U):new Uint32Array(U),Y=Array.isArray(U)?v(U):new Uint16Array(U),ee=24,me=p(Y,ee/2,L[4]/2),Se=L[5]===2?p(Y,(ee+L[4])/2):_(L,Math.ceil((ee+L[4])/4));return new F(L[0],L[1],L[2],L[3],me,Se)},F=function(){function I(C,U,L,Y,ee,me){this.initialValue=C,this.errorValue=U,this.highStart=L,this.highValueIndex=Y,this.index=ee,this.data=me}return I.prototype.get=function(C){var U;if(C>=0){if(C<55296||C>56319&&C<=65535)return U=this.index[C>>m],U=(U<<S)+(C&i),this.data[U];if(C<=65535)return U=this.index[u+(C-55296>>m)],U=(U<<S)+(C&i),this.data[U];if(C<this.highStart)return U=r-a+(C>>g),U=this.index[U],U+=C>>m&t,U=this.index[U],U=(U<<S)+(C&i),this.data[U];if(C<=1114111)return this.data[this.highValueIndex]}return this.errorValue},I}(),P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",W=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),V=0;V<P.length;V++)W[P.charCodeAt(V)]=V;var J="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==",ne=50,ce=1,ie=2,xe=3,ge=4,de=5,Fe=7,Qe=8,Ve=9,Ne=10,Ue=11,q=12,k=13,z=14,X=15,re=16,te=17,ae=18,ye=19,Le=20,Pe=21,ke=22,Je=23,qe=24,it=25,rt=26,et=27,At=28,We=29,Ge=30,De=31,Te=32,Oe=33,le=34,fe=35,Ce=36,we=37,Me=38,$e=39,Ie=40,Ye=41,tt=42,at=43,mt=[9001,65288],ft="!",Ze="\xD7",yt="\xF7",lt=f(J),gt=[Ge,Ce],xt=[ce,ie,xe,de],bt=[Ne,Qe],Ot=[et,rt],Tt=xt.concat(bt),Vt=[Me,$e,Ie,le,fe],Zt=[X,k],ut=function(I,C){C===void 0&&(C="strict");var U=[],L=[],Y=[];return I.forEach(function(ee,me){var Se=lt.get(ee);if(Se>ne?(Y.push(!0),Se-=ne):Y.push(!1),["normal","auto","loose"].indexOf(C)!==-1&&[8208,8211,12316,12448].indexOf(ee)!==-1)return L.push(me),U.push(re);if(Se===ge||Se===Ue){if(me===0)return L.push(me),U.push(Ge);var Be=U[me-1];return Tt.indexOf(Be)===-1?(L.push(L[me-1]),U.push(Be)):(L.push(me),U.push(Ge))}if(L.push(me),Se===De)return U.push(C==="strict"?Pe:we);if(Se===tt)return U.push(Ge);if(Se===We)return U.push(Ge);if(Se===at)return ee>=131072&&ee<=196605||ee>=196608&&ee<=262141?U.push(we):U.push(Ge);U.push(Se)}),[L,U,Y]},Et=function(I,C,U,L){var Y=L[U];if(Array.isArray(I)?I.indexOf(Y)!==-1:I===Y)for(var ee=U;ee<=L.length;){ee++;var me=L[ee];if(me===C)return!0;if(me!==Ne)break}if(Y===Ne)for(var ee=U;ee>0;){ee--;var Se=L[ee];if(Array.isArray(I)?I.indexOf(Se)!==-1:I===Se)for(var Be=U;Be<=L.length;){Be++;var me=L[Be];if(me===C)return!0;if(me!==Ne)break}if(Se!==Ne)break}return!1},Lt=function(I,C){for(var U=I;U>=0;){var L=C[U];if(L===Ne)U--;else return L}return 0},Ht=function(I,C,U,L,Y){if(U[L]===0)return Ze;var ee=L-1;if(Array.isArray(Y)&&Y[ee]===!0)return Ze;var me=ee-1,Se=ee+1,Be=C[ee],je=me>=0?C[me]:0,ze=C[Se];if(Be===ie&&ze===xe)return Ze;if(xt.indexOf(Be)!==-1)return ft;if(xt.indexOf(ze)!==-1)return Ze;if(bt.indexOf(ze)!==-1)return Ze;if(Lt(ee,C)===Qe)return yt;if(lt.get(I[ee])===Ue)return Ze;if((Be===Te||Be===Oe)&<.get(I[Se])===Ue)return Ze;if(Be===Fe||ze===Fe)return Ze;if(Be===Ve)return Ze;if([Ne,k,X].indexOf(Be)===-1&&ze===Ve)return Ze;if([te,ae,ye,qe,At].indexOf(ze)!==-1)return Ze;if(Lt(ee,C)===ke)return Ze;if(Et(Je,ke,ee,C))return Ze;if(Et([te,ae],Pe,ee,C))return Ze;if(Et(q,q,ee,C))return Ze;if(Be===Ne)return yt;if(Be===Je||ze===Je)return Ze;if(ze===re||Be===re)return yt;if([k,X,Pe].indexOf(ze)!==-1||Be===z)return Ze;if(je===Ce&&Zt.indexOf(Be)!==-1)return Ze;if(Be===At&&ze===Ce)return Ze;if(ze===Le)return Ze;if(gt.indexOf(ze)!==-1&&Be===it||gt.indexOf(Be)!==-1&&ze===it)return Ze;if(Be===et&&[we,Te,Oe].indexOf(ze)!==-1||[we,Te,Oe].indexOf(Be)!==-1&&ze===rt)return Ze;if(gt.indexOf(Be)!==-1&&Ot.indexOf(ze)!==-1||Ot.indexOf(Be)!==-1&>.indexOf(ze)!==-1)return Ze;if([et,rt].indexOf(Be)!==-1&&(ze===it||[ke,X].indexOf(ze)!==-1&&C[Se+1]===it)||[ke,X].indexOf(Be)!==-1&&ze===it||Be===it&&[it,At,qe].indexOf(ze)!==-1)return Ze;if([it,At,qe,te,ae].indexOf(ze)!==-1)for(var st=ee;st>=0;){var ot=C[st];if(ot===it)return Ze;if([At,qe].indexOf(ot)!==-1)st--;else break}if([et,rt].indexOf(ze)!==-1)for(var st=[te,ae].indexOf(Be)!==-1?me:ee;st>=0;){var ot=C[st];if(ot===it)return Ze;if([At,qe].indexOf(ot)!==-1)st--;else break}if(Me===Be&&[Me,$e,le,fe].indexOf(ze)!==-1||[$e,le].indexOf(Be)!==-1&&[$e,Ie].indexOf(ze)!==-1||[Ie,fe].indexOf(Be)!==-1&&ze===Ie)return Ze;if(Vt.indexOf(Be)!==-1&&[Le,rt].indexOf(ze)!==-1||Vt.indexOf(ze)!==-1&&Be===et)return Ze;if(gt.indexOf(Be)!==-1&>.indexOf(ze)!==-1)return Ze;if(Be===qe&>.indexOf(ze)!==-1)return Ze;if(gt.concat(it).indexOf(Be)!==-1&&ze===ke&&mt.indexOf(I[Se])===-1||gt.concat(it).indexOf(ze)!==-1&&Be===ae)return Ze;if(Be===Ye&&ze===Ye){for(var Ut=U[ee],Ct=1;Ut>0&&(Ut--,C[Ut]===Ye);)Ct++;if(Ct%2!==0)return Ze}return Be===Te&&ze===Oe?Ze:yt},mr=function(I,C){C||(C={lineBreak:"normal",wordBreak:"normal"});var U=ut(I,C.lineBreak),L=U[0],Y=U[1],ee=U[2];(C.wordBreak==="break-all"||C.wordBreak==="break-word")&&(Y=Y.map(function(Se){return[it,Ge,tt].indexOf(Se)!==-1?we:Se}));var me=C.wordBreak==="keep-all"?ee.map(function(Se,Be){return Se&&I[Be]>=19968&&I[Be]<=40959}):void 0;return[L,Y,me]},_r=function(){function I(C,U,L,Y){this.codePoints=C,this.required=U===ft,this.start=L,this.end=Y}return I.prototype.slice=function(){return D.apply(void 0,this.codePoints.slice(this.start,this.end))},I}(),Ar=function(I,C){var U=M(I),L=mr(U,C),Y=L[0],ee=L[1],me=L[2],Se=U.length,Be=0,je=0;return{next:function(){if(je>=Se)return{done:!0,value:null};for(var ze=Ze;je<Se&&(ze=Ht(U,ee,Y,++je,me))===Ze;);if(ze!==Ze||je===Se){var st=new _r(U,ze,Be,je);return Be=je,{value:st,done:!1}}return{done:!0,value:null}}}},nr=1<<0,Mt=1<<1,sr=1<<2,Er=1<<3,ur=10,kt=47,zt=92,Ae=9,se=32,pe=34,Re=61,Ke=35,nt=36,ht=37,vt=39,K=40,b=41,B=95,j=45,Z=33,G=60,oe=62,He=64,ct=91,_t=93,Xe=61,pt=123,wt=63,Kt=125,rr=124,Wt=126,Bt=128,fr=65533,qt=42,Lr=43,gr=44,er=58,Sr=59,xr=46,Rr=0,lr=8,Fr=11,Kr=14,Pr=31,Ir=127,yr=-1,Ur=48,Nr=97,dr=101,cr=102,Or=117,ir=122,jr=65,jt=69,Yt=70,Dt=85,pr=90,Qt=function(I){return I>=Ur&&I<=57},Jt=function(I){return I>=55296&&I<=57343},Gt=function(I){return Qt(I)||I>=jr&&I<=Yt||I>=Nr&&I<=cr},kr=function(I){return I>=Nr&&I<=ir},Xr=function(I){return I>=jr&&I<=pr},Cn=function(I){return kr(I)||Xr(I)},Wr=function(I){return I>=Bt},Yr=function(I){return I===ur||I===Ae||I===se},mn=function(I){return Cn(I)||Wr(I)||I===B},qr=function(I){return mn(I)||Qt(I)||I===j},Hn=function(I){return I>=Rr&&I<=lr||I===Fr||I>=Kr&&I<=Pr||I===Ir},Gr=function(I,C){return I!==zt?!1:C!==ur},xn=function(I,C,U){return I===j?mn(C)||Gr(C,U):mn(I)?!0:!!(I===zt&&Gr(I,C))},Mr=function(I,C,U){return I===Lr||I===j?Qt(C)?!0:C===xr&&Qt(U):I===xr?Qt(C):Qt(I)},dn=function(I){var C=0,U=1;(I[C]===Lr||I[C]===j)&&(I[C]===j&&(U=-1),C++);for(var L=[];Qt(I[C]);)L.push(I[C++]);var Y=L.length?parseInt(D.apply(void 0,L),10):0;I[C]===xr&&C++;for(var ee=[];Qt(I[C]);)ee.push(I[C++]);var me=ee.length,Se=me?parseInt(D.apply(void 0,ee),10):0;(I[C]===jt||I[C]===dr)&&C++;var Be=1;(I[C]===Lr||I[C]===j)&&(I[C]===j&&(Be=-1),C++);for(var je=[];Qt(I[C]);)je.push(I[C++]);var ze=je.length?parseInt(D.apply(void 0,je),10):0;return U*(Y+Se*Math.pow(10,-me))*Math.pow(10,Be*ze)},Tn={type:2},$r={type:3},nn={type:4},ln={type:13},Bn={type:8},gn={type:21},en={type:9},an={type:10},cn={type:11},An={type:12},tn={type:14},hn={type:23},Jn={type:1},mi={type:25},gi={type:24},vn={type:26},Oi={type:27},oa={type:28},Li={type:29},la={type:31},vi={type:32},yi=function(){function I(){this._value=[]}return I.prototype.write=function(C){this._value=this._value.concat(M(C))},I.prototype.read=function(){for(var C=[],U=this.consumeToken();U!==vi;)C.push(U),U=this.consumeToken();return C},I.prototype.consumeToken=function(){var C=this.consumeCodePoint();switch(C){case pe:return this.consumeStringToken(pe);case Ke:var U=this.peekCodePoint(0),L=this.peekCodePoint(1),Y=this.peekCodePoint(2);if(qr(U)||Gr(L,Y)){var ee=xn(U,L,Y)?Mt:nr,me=this.consumeName();return{type:5,value:me,flags:ee}}break;case nt:if(this.peekCodePoint(0)===Re)return this.consumeCodePoint(),ln;break;case vt:return this.consumeStringToken(vt);case K:return Tn;case b:return $r;case qt:if(this.peekCodePoint(0)===Re)return this.consumeCodePoint(),tn;break;case Lr:if(Mr(C,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(C),this.consumeNumericToken();break;case gr:return nn;case j:var Se=C,Be=this.peekCodePoint(0),je=this.peekCodePoint(1);if(Mr(Se,Be,je))return this.reconsumeCodePoint(C),this.consumeNumericToken();if(xn(Se,Be,je))return this.reconsumeCodePoint(C),this.consumeIdentLikeToken();if(Be===j&&je===oe)return this.consumeCodePoint(),this.consumeCodePoint(),gi;break;case xr:if(Mr(C,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(C),this.consumeNumericToken();break;case kt:if(this.peekCodePoint(0)===qt)for(this.consumeCodePoint();;){var ze=this.consumeCodePoint();if(ze===qt&&(ze=this.consumeCodePoint(),ze===kt))return this.consumeToken();if(ze===yr)return this.consumeToken()}break;case er:return vn;case Sr:return Oi;case G:if(this.peekCodePoint(0)===Z&&this.peekCodePoint(1)===j&&this.peekCodePoint(2)===j)return this.consumeCodePoint(),this.consumeCodePoint(),mi;break;case He:var st=this.peekCodePoint(0),ot=this.peekCodePoint(1),Ut=this.peekCodePoint(2);if(xn(st,ot,Ut)){var me=this.consumeName();return{type:7,value:me}}break;case ct:return oa;case zt:if(Gr(C,this.peekCodePoint(0)))return this.reconsumeCodePoint(C),this.consumeIdentLikeToken();break;case _t:return Li;case Xe:if(this.peekCodePoint(0)===Re)return this.consumeCodePoint(),Bn;break;case pt:return cn;case Kt:return An;case Or:case Dt:var Ct=this.peekCodePoint(0),St=this.peekCodePoint(1);return Ct===Lr&&(Gt(St)||St===wt)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(C),this.consumeIdentLikeToken();case rr:if(this.peekCodePoint(0)===Re)return this.consumeCodePoint(),en;if(this.peekCodePoint(0)===rr)return this.consumeCodePoint(),gn;break;case Wt:if(this.peekCodePoint(0)===Re)return this.consumeCodePoint(),an;break;case yr:return vi}return Yr(C)?(this.consumeWhiteSpace(),la):Qt(C)?(this.reconsumeCodePoint(C),this.consumeNumericToken()):mn(C)?(this.reconsumeCodePoint(C),this.consumeIdentLikeToken()):{type:6,value:D(C)}},I.prototype.consumeCodePoint=function(){var C=this._value.shift();return typeof C=="undefined"?-1:C},I.prototype.reconsumeCodePoint=function(C){this._value.unshift(C)},I.prototype.peekCodePoint=function(C){return C>=this._value.length?-1:this._value[C]},I.prototype.consumeUnicodeRangeToken=function(){for(var C=[],U=this.consumeCodePoint();Gt(U)&&C.length<6;)C.push(U),U=this.consumeCodePoint();for(var L=!1;U===wt&&C.length<6;)C.push(U),U=this.consumeCodePoint(),L=!0;if(L){var Y=parseInt(D.apply(void 0,C.map(function(Be){return Be===wt?Ur:Be})),16),ee=parseInt(D.apply(void 0,C.map(function(Be){return Be===wt?Yt:Be})),16);return{type:30,start:Y,end:ee}}var me=parseInt(D.apply(void 0,C),16);if(this.peekCodePoint(0)===j&&Gt(this.peekCodePoint(1))){this.consumeCodePoint(),U=this.consumeCodePoint();for(var Se=[];Gt(U)&&Se.length<6;)Se.push(U),U=this.consumeCodePoint();var ee=parseInt(D.apply(void 0,Se),16);return{type:30,start:me,end:ee}}else return{type:30,start:me,end:me}},I.prototype.consumeIdentLikeToken=function(){var C=this.consumeName();return C.toLowerCase()==="url"&&this.peekCodePoint(0)===K?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===K?(this.consumeCodePoint(),{type:19,value:C}):{type:20,value:C}},I.prototype.consumeUrlToken=function(){var C=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===yr)return{type:22,value:""};var U=this.peekCodePoint(0);if(U===vt||U===pe){var L=this.consumeStringToken(this.consumeCodePoint());return L.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===yr||this.peekCodePoint(0)===b)?(this.consumeCodePoint(),{type:22,value:L.value}):(this.consumeBadUrlRemnants(),hn)}for(;;){var Y=this.consumeCodePoint();if(Y===yr||Y===b)return{type:22,value:D.apply(void 0,C)};if(Yr(Y))return this.consumeWhiteSpace(),this.peekCodePoint(0)===yr||this.peekCodePoint(0)===b?(this.consumeCodePoint(),{type:22,value:D.apply(void 0,C)}):(this.consumeBadUrlRemnants(),hn);if(Y===pe||Y===vt||Y===K||Hn(Y))return this.consumeBadUrlRemnants(),hn;if(Y===zt)if(Gr(Y,this.peekCodePoint(0)))C.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),hn;else C.push(Y)}},I.prototype.consumeWhiteSpace=function(){for(;Yr(this.peekCodePoint(0));)this.consumeCodePoint()},I.prototype.consumeBadUrlRemnants=function(){for(;;){var C=this.consumeCodePoint();if(C===b||C===yr)return;Gr(C,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},I.prototype.consumeStringSlice=function(C){for(var U=5e4,L="";C>0;){var Y=Math.min(U,C);L+=D.apply(void 0,this._value.splice(0,Y)),C-=Y}return this._value.shift(),L},I.prototype.consumeStringToken=function(C){var U="",L=0;do{var Y=this._value[L];if(Y===yr||Y===void 0||Y===C)return U+=this.consumeStringSlice(L),{type:0,value:U};if(Y===ur)return this._value.splice(0,L),Jn;if(Y===zt){var ee=this._value[L+1];ee!==yr&&ee!==void 0&&(ee===ur?(U+=this.consumeStringSlice(L),L=-1,this._value.shift()):Gr(Y,ee)&&(U+=this.consumeStringSlice(L),U+=D(this.consumeEscapedCodePoint()),L=-1))}L++}while(!0)},I.prototype.consumeNumber=function(){var C=[],U=sr,L=this.peekCodePoint(0);for((L===Lr||L===j)&&C.push(this.consumeCodePoint());Qt(this.peekCodePoint(0));)C.push(this.consumeCodePoint());L=this.peekCodePoint(0);var Y=this.peekCodePoint(1);if(L===xr&&Qt(Y))for(C.push(this.consumeCodePoint(),this.consumeCodePoint()),U=Er;Qt(this.peekCodePoint(0));)C.push(this.consumeCodePoint());L=this.peekCodePoint(0),Y=this.peekCodePoint(1);var ee=this.peekCodePoint(2);if((L===jt||L===dr)&&((Y===Lr||Y===j)&&Qt(ee)||Qt(Y)))for(C.push(this.consumeCodePoint(),this.consumeCodePoint()),U=Er;Qt(this.peekCodePoint(0));)C.push(this.consumeCodePoint());return[dn(C),U]},I.prototype.consumeNumericToken=function(){var C=this.consumeNumber(),U=C[0],L=C[1],Y=this.peekCodePoint(0),ee=this.peekCodePoint(1),me=this.peekCodePoint(2);if(xn(Y,ee,me)){var Se=this.consumeName();return{type:15,number:U,flags:L,unit:Se}}return Y===ht?(this.consumeCodePoint(),{type:16,number:U,flags:L}):{type:17,number:U,flags:L}},I.prototype.consumeEscapedCodePoint=function(){var C=this.consumeCodePoint();if(Gt(C)){for(var U=D(C);Gt(this.peekCodePoint(0))&&U.length<6;)U+=D(this.consumeCodePoint());Yr(this.peekCodePoint(0))&&this.consumeCodePoint();var L=parseInt(U,16);return L===0||Jt(L)||L>1114111?fr:L}return C===yr?fr:C},I.prototype.consumeName=function(){for(var C="";;){var U=this.consumeCodePoint();if(qr(U))C+=D(U);else if(Gr(U,this.peekCodePoint(0)))C+=D(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(U),C}},I}(),Zn=function(){function I(C){this._tokens=C}return I.create=function(C){var U=new yi;return U.write(C),new I(U.read())},I.parseValue=function(C){return I.create(C).parseComponentValue()},I.parseValues=function(C){return I.create(C).parseComponentValues()},I.prototype.parseComponentValue=function(){for(var C=this.consumeToken();C.type===31;)C=this.consumeToken();if(C.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(C);var U=this.consumeComponentValue();do C=this.consumeToken();while(C.type===31);if(C.type===32)return U;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},I.prototype.parseComponentValues=function(){for(var C=[];;){var U=this.consumeComponentValue();if(U.type===32)return C;C.push(U),C.push()}},I.prototype.consumeComponentValue=function(){var C=this.consumeToken();switch(C.type){case 11:case 28:case 2:return this.consumeSimpleBlock(C.type);case 19:return this.consumeFunction(C)}return C},I.prototype.consumeSimpleBlock=function(C){for(var U={type:C,values:[]},L=this.consumeToken();;){if(L.type===32||Aa(L,C))return U;this.reconsumeToken(L),U.values.push(this.consumeComponentValue()),L=this.consumeToken()}},I.prototype.consumeFunction=function(C){for(var U={name:C.value,values:[],type:18};;){var L=this.consumeToken();if(L.type===32||L.type===3)return U;this.reconsumeToken(L),U.values.push(this.consumeComponentValue())}},I.prototype.consumeToken=function(){var C=this._tokens.shift();return typeof C=="undefined"?vi:C},I.prototype.reconsumeToken=function(C){this._tokens.unshift(C)},I}(),Fn=function(I){return I.type===15},In=function(I){return I.type===17},Tr=function(I){return I.type===20},Di=function(I){return I.type===0},ai=function(I,C){return Tr(I)&&I.value===C},_i=function(I){return I.type!==31},On=function(I){return I.type!==31&&I.type!==4},fn=function(I){var C=[],U=[];return I.forEach(function(L){if(L.type===4){if(U.length===0)throw new Error("Error parsing function args, zero tokens for arg");C.push(U),U=[];return}L.type!==31&&U.push(L)}),U.length&&C.push(U),C},Aa=function(I,C){return C===11&&I.type===12||C===28&&I.type===29?!0:C===2&&I.type===3},yn=function(I){return I.type===17||I.type===15},Hr=function(I){return I.type===16||yn(I)},Ui=function(I){return I.length>1?[I[0],I[1]]:[I[0]]},Vr={type:17,number:0,flags:sr},Ei={type:16,number:50,flags:sr},$t={type:16,number:100,flags:sr},hr=function(I,C,U){var L=I[0],Y=I[1];return[tr(L,C),tr(typeof Y!="undefined"?Y:L,U)]},tr=function(I,C){if(I.type===16)return I.number/100*C;if(Fn(I))switch(I.unit){case"rem":case"em":return 16*I.number;case"px":default:return I.number}return I.number},sn="deg",Fi="grad",Sn="rad",bi="turn",Qn={name:"angle",parse:function(I,C){if(C.type===15)switch(C.unit){case sn:return Math.PI*C.number/180;case Fi:return Math.PI/200*C.number;case Sn:return C.number;case bi:return Math.PI*2*C.number}throw new Error("Unsupported angle type")}},si=function(I){return I.type===15&&(I.unit===sn||I.unit===Fi||I.unit===Sn||I.unit===bi)},oi=function(I){var C=I.filter(Tr).map(function(U){return U.value}).join(" ");switch(C){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Vr,Vr];case"to top":case"bottom":return _n(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Vr,$t];case"to right":case"left":return _n(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[$t,$t];case"to bottom":case"top":return _n(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[$t,Vr];case"to left":case"right":return _n(270)}return 0},_n=function(I){return Math.PI*I/180},Kn={name:"color",parse:function(I,C){if(C.type===18){var U=eo[C.name];if(typeof U=="undefined")throw new Error('Attempting to parse an unsupported color function "'+C.name+'"');return U(I,C.values)}if(C.type===5){if(C.value.length===3){var L=C.value.substring(0,1),Y=C.value.substring(1,2),ee=C.value.substring(2,3);return Wn(parseInt(L+L,16),parseInt(Y+Y,16),parseInt(ee+ee,16),1)}if(C.value.length===4){var L=C.value.substring(0,1),Y=C.value.substring(1,2),ee=C.value.substring(2,3),me=C.value.substring(3,4);return Wn(parseInt(L+L,16),parseInt(Y+Y,16),parseInt(ee+ee,16),parseInt(me+me,16)/255)}if(C.value.length===6){var L=C.value.substring(0,2),Y=C.value.substring(2,4),ee=C.value.substring(4,6);return Wn(parseInt(L,16),parseInt(Y,16),parseInt(ee,16),1)}if(C.value.length===8){var L=C.value.substring(0,2),Y=C.value.substring(2,4),ee=C.value.substring(4,6),me=C.value.substring(6,8);return Wn(parseInt(L,16),parseInt(Y,16),parseInt(ee,16),parseInt(me,16)/255)}}if(C.type===20){var Se=Pn[C.value.toUpperCase()];if(typeof Se!="undefined")return Se}return Pn.TRANSPARENT}},jn=function(I){return(255&I)===0},Jr=function(I){var C=255&I,U=255&I>>8,L=255&I>>16,Y=255&I>>24;return C<255?"rgba("+Y+","+L+","+U+","+C/255+")":"rgb("+Y+","+L+","+U+")"},Wn=function(I,C,U,L){return(I<<24|C<<16|U<<8|Math.round(L*255)<<0)>>>0},ka=function(I,C){if(I.type===17)return I.number;if(I.type===16){var U=C===3?1:255;return C===3?I.number/100*U:Math.round(I.number/100*U)}return 0},Ma=function(I,C){var U=C.filter(On);if(U.length===3){var L=U.map(ka),Y=L[0],ee=L[1],me=L[2];return Wn(Y,ee,me,1)}if(U.length===4){var Se=U.map(ka),Y=Se[0],ee=Se[1],me=Se[2],Be=Se[3];return Wn(Y,ee,me,Be)}return 0};function ua(I,C,U){return U<0&&(U+=1),U>=1&&(U-=1),U<1/6?(C-I)*U*6+I:U<1/2?C:U<2/3?(C-I)*6*(2/3-U)+I:I}var Ha=function(I,C){var U=C.filter(On),L=U[0],Y=U[1],ee=U[2],me=U[3],Se=(L.type===17?_n(L.number):Qn.parse(I,L))/(Math.PI*2),Be=Hr(Y)?Y.number/100:0,je=Hr(ee)?ee.number/100:0,ze=typeof me!="undefined"&&Hr(me)?tr(me,1):1;if(Be===0)return Wn(je*255,je*255,je*255,1);var st=je<=.5?je*(Be+1):je+Be-je*Be,ot=je*2-st,Ut=ua(ot,st,Se+1/3),Ct=ua(ot,st,Se),St=ua(ot,st,Se-1/3);return Wn(Ut*255,Ct*255,St*255,ze)},eo={hsl:Ha,hsla:Ha,rgb:Ma,rgba:Ma},wi=function(I,C){return Kn.parse(I,Zn.create(C).parseComponentValue())},Pn={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(I,C){return C.map(function(U){if(Tr(U))switch(U.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"},Pi=function(I,C){var U=Kn.parse(I,C[0]),L=C[1];return L&&Hr(L)?{color:U,stop:L}:{color:U,stop:null}},Qa=function(I,C){var U=I[0],L=I[I.length-1];U.stop===null&&(U.stop=Vr),L.stop===null&&(L.stop=$t);for(var Y=[],ee=0,me=0;me<I.length;me++){var Se=I[me].stop;if(Se!==null){var Be=tr(Se,C);Be>ee?Y.push(Be):Y.push(ee),ee=Be}else Y.push(null)}for(var je=null,me=0;me<Y.length;me++){var ze=Y[me];if(ze===null)je===null&&(je=me);else if(je!==null){for(var st=me-je,ot=Y[je-1],Ut=(ze-ot)/(st+1),Ct=1;Ct<=st;Ct++)Y[je+Ct-1]=Ut*Ct;je=null}}return I.map(function(St,Xt){var It=St.color;return{color:It,stop:Math.max(Math.min(1,Y[Xt]/C),0)}})},no=function(I,C,U){var L=C/2,Y=U/2,ee=tr(I[0],C)-L,me=Y-tr(I[1],U);return(Math.atan2(me,ee)+Math.PI*2)%(Math.PI*2)},io=function(I,C,U){var L=typeof I=="number"?I:no(I,C,U),Y=Math.abs(C*Math.sin(L))+Math.abs(U*Math.cos(L)),ee=C/2,me=U/2,Se=Y/2,Be=Math.sin(L-Math.PI/2)*Se,je=Math.cos(L-Math.PI/2)*Se;return[Y,ee-je,ee+je,me-Be,me+Be]},Rn=function(I,C){return Math.sqrt(I*I+C*C)},Ka=function(I,C,U,L,Y){var ee=[[0,0],[0,C],[I,0],[I,C]];return ee.reduce(function(me,Se){var Be=Se[0],je=Se[1],ze=Rn(U-Be,L-je);return(Y?ze<me.optimumDistance:ze>me.optimumDistance)?{optimumCorner:Se,optimumDistance:ze}:me},{optimumDistance:Y?Infinity:-Infinity,optimumCorner:null}).optimumCorner},ao=function(I,C,U,L,Y){var ee=0,me=0;switch(I.size){case 0:I.shape===0?ee=me=Math.min(Math.abs(C),Math.abs(C-L),Math.abs(U),Math.abs(U-Y)):I.shape===1&&(ee=Math.min(Math.abs(C),Math.abs(C-L)),me=Math.min(Math.abs(U),Math.abs(U-Y)));break;case 2:if(I.shape===0)ee=me=Math.min(Rn(C,U),Rn(C,U-Y),Rn(C-L,U),Rn(C-L,U-Y));else if(I.shape===1){var Se=Math.min(Math.abs(U),Math.abs(U-Y))/Math.min(Math.abs(C),Math.abs(C-L)),Be=Ka(L,Y,C,U,!0),je=Be[0],ze=Be[1];ee=Rn(je-C,(ze-U)/Se),me=Se*ee}break;case 1:I.shape===0?ee=me=Math.max(Math.abs(C),Math.abs(C-L),Math.abs(U),Math.abs(U-Y)):I.shape===1&&(ee=Math.max(Math.abs(C),Math.abs(C-L)),me=Math.max(Math.abs(U),Math.abs(U-Y)));break;case 3:if(I.shape===0)ee=me=Math.max(Rn(C,U),Rn(C,U-Y),Rn(C-L,U),Rn(C-L,U-Y));else if(I.shape===1){var Se=Math.max(Math.abs(U),Math.abs(U-Y))/Math.max(Math.abs(C),Math.abs(C-L)),st=Ka(L,Y,C,U,!1),je=st[0],ze=st[1];ee=Rn(je-C,(ze-U)/Se),me=Se*ee}break}return Array.isArray(I.size)&&(ee=tr(I.size[0],L),me=I.size.length===2?tr(I.size[1],Y):ee),[ee,me]},so=function(I,C){var U=_n(180),L=[];return fn(C).forEach(function(Y,ee){if(ee===0){var me=Y[0];if(me.type===20&&me.value==="to"){U=oi(Y);return}else if(si(me)){U=Qn.parse(I,me);return}}var Se=Pi(I,Y);L.push(Se)}),{angle:U,stops:L,type:1}},Ni=function(I,C){var U=_n(180),L=[];return fn(C).forEach(function(Y,ee){if(ee===0){var me=Y[0];if(me.type===20&&["top","left","right","bottom"].indexOf(me.value)!==-1){U=oi(Y);return}else if(si(me)){U=(Qn.parse(I,me)+_n(270))%_n(360);return}}var Se=Pi(I,Y);L.push(Se)}),{angle:U,stops:L,type:1}},oo=function(I,C){var U=_n(180),L=[],Y=1,ee=0,me=3,Se=[];return fn(C).forEach(function(Be,je){var ze=Be[0];if(je===0){if(Tr(ze)&&ze.value==="linear"){Y=1;return}else if(Tr(ze)&&ze.value==="radial"){Y=2;return}}if(ze.type===18){if(ze.name==="from"){var st=Kn.parse(I,ze.values[0]);L.push({stop:Vr,color:st})}else if(ze.name==="to"){var st=Kn.parse(I,ze.values[0]);L.push({stop:$t,color:st})}else if(ze.name==="color-stop"){var ot=ze.values.filter(On);if(ot.length===2){var st=Kn.parse(I,ot[1]),Ut=ot[0];In(Ut)&&L.push({stop:{type:16,number:Ut.number*100,flags:Ut.flags},color:st})}}}}),Y===1?{angle:(U+_n(180))%_n(360),stops:L,type:Y}:{size:me,shape:ee,stops:L,position:Se,type:Y}},ja="closest-side",Wa="farthest-side",Ga="closest-corner",Va="farthest-corner",za="circle",Xa="ellipse",Ya="cover",$a="contain",lo=function(I,C){var U=0,L=3,Y=[],ee=[];return fn(C).forEach(function(me,Se){var Be=!0;if(Se===0){var je=!1;Be=me.reduce(function(st,ot){if(je)if(Tr(ot))switch(ot.value){case"center":return ee.push(Ei),st;case"top":case"left":return ee.push(Vr),st;case"right":case"bottom":return ee.push($t),st}else(Hr(ot)||yn(ot))&&ee.push(ot);else if(Tr(ot))switch(ot.value){case za:return U=0,!1;case Xa:return U=1,!1;case"at":return je=!0,!1;case ja:return L=0,!1;case Ya:case Wa:return L=1,!1;case $a:case Ga:return L=2,!1;case Va:return L=3,!1}else if(yn(ot)||Hr(ot))return Array.isArray(L)||(L=[]),L.push(ot),!1;return st},Be)}if(Be){var ze=Pi(I,me);Y.push(ze)}}),{size:L,shape:U,stops:Y,position:ee,type:2}},ki=function(I,C){var U=0,L=3,Y=[],ee=[];return fn(C).forEach(function(me,Se){var Be=!0;if(Se===0?Be=me.reduce(function(ze,st){if(Tr(st))switch(st.value){case"center":return ee.push(Ei),!1;case"top":case"left":return ee.push(Vr),!1;case"right":case"bottom":return ee.push($t),!1}else if(Hr(st)||yn(st))return ee.push(st),!1;return ze},Be):Se===1&&(Be=me.reduce(function(ze,st){if(Tr(st))switch(st.value){case za:return U=0,!1;case Xa:return U=1,!1;case $a:case ja:return L=0,!1;case Wa:return L=1,!1;case Ga:return L=2,!1;case Ya:case Va:return L=3,!1}else if(yn(st)||Hr(st))return Array.isArray(L)||(L=[]),L.push(st),!1;return ze},Be)),Be){var je=Pi(I,me);Y.push(je)}}),{size:L,shape:U,stops:Y,position:ee,type:2}},Ao=function(I){return I.type===1},uo=function(I){return I.type===2},da={name:"image",parse:function(I,C){if(C.type===22){var U={url:C.value,type:0};return I.cache.addImage(C.value),U}if(C.type===18){var L=Ja[C.name];if(typeof L=="undefined")throw new Error('Attempting to parse an unsupported image function "'+C.name+'"');return L(I,C.values)}throw new Error("Unsupported image type "+C.type)}};function co(I){return!(I.type===20&&I.value==="none")&&(I.type!==18||!!Ja[I.name])}var Ja={"linear-gradient":so,"-moz-linear-gradient":Ni,"-ms-linear-gradient":Ni,"-o-linear-gradient":Ni,"-webkit-linear-gradient":Ni,"radial-gradient":lo,"-moz-radial-gradient":ki,"-ms-radial-gradient":ki,"-o-radial-gradient":ki,"-webkit-radial-gradient":ki,"-webkit-gradient":oo},ho={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(I,C){if(C.length===0)return[];var U=C[0];return U.type===20&&U.value==="none"?[]:C.filter(function(L){return On(L)&&co(L)}).map(function(L){return da.parse(I,L)})}},fo={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(I,C){return C.map(function(U){if(Tr(U))switch(U.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(I,C){return fn(C).map(function(U){return U.filter(Hr)}).map(Ui)}},mo={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(I,C){return fn(C).map(function(U){return U.filter(Tr).map(function(L){return L.value}).join(" ")}).map(go)}},go=function(I){switch(I){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}},li;(function(I){I.AUTO="auto",I.CONTAIN="contain",I.COVER="cover"})(li||(li={}));var vo={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(I,C){return fn(C).map(function(U){return U.filter(yo)})}},yo=function(I){return Tr(I)||Hr(I)},Mi=function(I){return{name:"border-"+I+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},_o=Mi("top"),Eo=Mi("right"),bo=Mi("bottom"),wo=Mi("left"),Hi=function(I){return{name:"border-radius-"+I,initialValue:"0 0",prefix:!1,type:1,parse:function(C,U){return Ui(U.filter(Hr))}}},Co=Hi("top-left"),xo=Hi("top-right"),To=Hi("bottom-right"),Bo=Hi("bottom-left"),Qi=function(I){return{name:"border-"+I+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(C,U){switch(U){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},So=Qi("top"),Ro=Qi("right"),Io=Qi("bottom"),Oo=Qi("left"),Ki=function(I){return{name:"border-"+I+"-width",initialValue:"0",type:0,prefix:!1,parse:function(C,U){return Fn(U)?U.number:0}}},Lo=Ki("top"),Do=Ki("right"),Uo=Ki("bottom"),Fo=Ki("left"),Po={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},No={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(I,C){switch(C){case"rtl":return 1;case"ltr":default:return 0}}},ko={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(I,C){return C.filter(Tr).reduce(function(U,L){return U|Mo(L.value)},0)}},Mo=function(I){switch(I){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(I,C){switch(C){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(I,C){return C.type===20&&C.value==="normal"?0:C.type===17||C.type===15?C.number:0}},ji;(function(I){I.NORMAL="normal",I.STRICT="strict"})(ji||(ji={}));var Ko={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(I,C){switch(C){case"strict":return ji.STRICT;case"normal":default:return ji.NORMAL}}},jo={name:"line-height",initialValue:"normal",prefix:!1,type:4},Za=function(I,C){return Tr(I)&&I.value==="normal"?1.2*C:I.type===17?C*I.number:Hr(I)?tr(I,C):C},Wo={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(I,C){return C.type===20&&C.value==="none"?null:da.parse(I,C)}},Go={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(I,C){switch(C){case"inside":return 0;case"outside":default:return 1}}},ca={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(I,C){switch(C){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},Wi=function(I){return{name:"margin-"+I,initialValue:"0",prefix:!1,type:4}},Vo=Wi("top"),zo=Wi("right"),Xo=Wi("bottom"),Yo=Wi("left"),$o={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(I,C){return C.filter(Tr).map(function(U){switch(U.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},Jo={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(I,C){switch(C){case"break-word":return"break-word";case"normal":default:return"normal"}}},Gi=function(I){return{name:"padding-"+I,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Zo=Gi("top"),qo=Gi("right"),el=Gi("bottom"),tl=Gi("left"),rl={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(I,C){switch(C){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},nl={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(I,C){switch(C){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},il={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(I,C){return C.length===1&&ai(C[0],"none")?[]:fn(C).map(function(U){for(var L={color:Pn.TRANSPARENT,offsetX:Vr,offsetY:Vr,blur:Vr},Y=0,ee=0;ee<U.length;ee++){var me=U[ee];yn(me)?(Y===0?L.offsetX=me:Y===1?L.offsetY=me:L.blur=me,Y++):L.color=Kn.parse(I,me)}return L})}},al={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(I,C){switch(C){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},sl={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(I,C){if(C.type===20&&C.value==="none")return null;if(C.type===18){var U=Al[C.name];if(typeof U=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+C.name+'"');return U(C.values)}return null}},ol=function(I){var C=I.filter(function(U){return U.type===17}).map(function(U){return U.number});return C.length===6?C:null},ll=function(I){var C=I.filter(function(Be){return Be.type===17}).map(function(Be){return Be.number}),U=C[0],L=C[1];C[2],C[3];var Y=C[4],ee=C[5];C[6],C[7],C[8],C[9],C[10],C[11];var me=C[12],Se=C[13];return C[14],C[15],C.length===16?[U,L,Y,ee,me,Se]:null},Al={matrix:ol,matrix3d:ll},qa={type:16,number:50,flags:sr},ul=[qa,qa],dl={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(I,C){var U=C.filter(Hr);return U.length!==2?ul:[U[0],U[1]]}},cl={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(I,C){switch(C){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},Ci;(function(I){I.NORMAL="normal",I.BREAK_ALL="break-all",I.KEEP_ALL="keep-all"})(Ci||(Ci={}));for(var hl={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(I,C){switch(C){case"break-all":return Ci.BREAK_ALL;case"keep-all":return Ci.KEEP_ALL;case"normal":default:return Ci.NORMAL}}},fl={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(I,C){if(C.type===20)return{auto:!0,order:0};if(In(C))return{auto:!1,order:C.number};throw new Error("Invalid z-index number parsed")}},es={name:"time",parse:function(I,C){if(C.type===15)switch(C.unit.toLowerCase()){case"s":return 1e3*C.number;case"ms":return C.number}throw new Error("Unsupported time type")}},pl={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(I,C){return In(C)?C.number:1}},ml={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},gl={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(I,C){return C.filter(Tr).map(function(U){switch(U.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(U){return U!==0})}},vl={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(I,C){var U=[],L=[];return C.forEach(function(Y){switch(Y.type){case 20:case 0:U.push(Y.value);break;case 17:U.push(Y.number.toString());break;case 4:L.push(U.join(" ")),U.length=0;break}}),U.length&&L.push(U.join(" ")),L.map(function(Y){return Y.indexOf(" ")===-1?Y:"'"+Y+"'"})}},yl={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},_l={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(I,C){if(In(C))return C.number;if(Tr(C))switch(C.value){case"bold":return 700;case"normal":default:return 400}return 400}},El={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(I,C){return C.filter(Tr).map(function(U){return U.value})}},bl={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(I,C){switch(C){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},zr=function(I,C){return(I&C)!==0},wl={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(I,C){if(C.length===0)return[];var U=C[0];return U.type===20&&U.value==="none"?[]:C}},Cl={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(I,C){if(C.length===0)return null;var U=C[0];if(U.type===20&&U.value==="none")return null;for(var L=[],Y=C.filter(_i),ee=0;ee<Y.length;ee++){var me=Y[ee],Se=Y[ee+1];if(me.type===20){var Be=Se&&In(Se)?Se.number:1;L.push({counter:me.value,increment:Be})}}return L}},xl={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(I,C){if(C.length===0)return[];for(var U=[],L=C.filter(_i),Y=0;Y<L.length;Y++){var ee=L[Y],me=L[Y+1];if(Tr(ee)&&ee.value!=="none"){var Se=me&&In(me)?me.number:0;U.push({counter:ee.value,reset:Se})}}return U}},Tl={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(I,C){return C.filter(Fn).map(function(U){return es.parse(I,U)})}},Bl={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(I,C){if(C.length===0)return null;var U=C[0];if(U.type===20&&U.value==="none")return null;var L=[],Y=C.filter(Di);if(Y.length%2!==0)return null;for(var ee=0;ee<Y.length;ee+=2){var me=Y[ee].value,Se=Y[ee+1].value;L.push({open:me,close:Se})}return L}},ts=function(I,C,U){if(!I)return"";var L=I[Math.min(C,I.length-1)];return L?U?L.open:L.close:""},Sl={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(I,C){return C.length===1&&ai(C[0],"none")?[]:fn(C).map(function(U){for(var L={color:255,offsetX:Vr,offsetY:Vr,blur:Vr,spread:Vr,inset:!1},Y=0,ee=0;ee<U.length;ee++){var me=U[ee];ai(me,"inset")?L.inset=!0:yn(me)?(Y===0?L.offsetX=me:Y===1?L.offsetY=me:Y===2?L.blur=me:L.spread=me,Y++):L.color=Kn.parse(I,me)}return L})}},Rl={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(I,C){var U=[0,1,2],L=[];return C.filter(Tr).forEach(function(Y){switch(Y.value){case"stroke":L.push(1);break;case"fill":L.push(0);break;case"markers":L.push(2);break}}),U.forEach(function(Y){L.indexOf(Y)===-1&&L.push(Y)}),L}},Il={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},Ol={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(I,C){return Fn(C)?C.number:0}},Ll=function(){function I(C,U){var L,Y;this.animationDuration=Pt(C,Tl,U.animationDuration),this.backgroundClip=Pt(C,to,U.backgroundClip),this.backgroundColor=Pt(C,ro,U.backgroundColor),this.backgroundImage=Pt(C,ho,U.backgroundImage),this.backgroundOrigin=Pt(C,fo,U.backgroundOrigin),this.backgroundPosition=Pt(C,po,U.backgroundPosition),this.backgroundRepeat=Pt(C,mo,U.backgroundRepeat),this.backgroundSize=Pt(C,vo,U.backgroundSize),this.borderTopColor=Pt(C,_o,U.borderTopColor),this.borderRightColor=Pt(C,Eo,U.borderRightColor),this.borderBottomColor=Pt(C,bo,U.borderBottomColor),this.borderLeftColor=Pt(C,wo,U.borderLeftColor),this.borderTopLeftRadius=Pt(C,Co,U.borderTopLeftRadius),this.borderTopRightRadius=Pt(C,xo,U.borderTopRightRadius),this.borderBottomRightRadius=Pt(C,To,U.borderBottomRightRadius),this.borderBottomLeftRadius=Pt(C,Bo,U.borderBottomLeftRadius),this.borderTopStyle=Pt(C,So,U.borderTopStyle),this.borderRightStyle=Pt(C,Ro,U.borderRightStyle),this.borderBottomStyle=Pt(C,Io,U.borderBottomStyle),this.borderLeftStyle=Pt(C,Oo,U.borderLeftStyle),this.borderTopWidth=Pt(C,Lo,U.borderTopWidth),this.borderRightWidth=Pt(C,Do,U.borderRightWidth),this.borderBottomWidth=Pt(C,Uo,U.borderBottomWidth),this.borderLeftWidth=Pt(C,Fo,U.borderLeftWidth),this.boxShadow=Pt(C,Sl,U.boxShadow),this.color=Pt(C,Po,U.color),this.direction=Pt(C,No,U.direction),this.display=Pt(C,ko,U.display),this.float=Pt(C,Ho,U.cssFloat),this.fontFamily=Pt(C,vl,U.fontFamily),this.fontSize=Pt(C,yl,U.fontSize),this.fontStyle=Pt(C,bl,U.fontStyle),this.fontVariant=Pt(C,El,U.fontVariant),this.fontWeight=Pt(C,_l,U.fontWeight),this.letterSpacing=Pt(C,Qo,U.letterSpacing),this.lineBreak=Pt(C,Ko,U.lineBreak),this.lineHeight=Pt(C,jo,U.lineHeight),this.listStyleImage=Pt(C,Wo,U.listStyleImage),this.listStylePosition=Pt(C,Go,U.listStylePosition),this.listStyleType=Pt(C,ca,U.listStyleType),this.marginTop=Pt(C,Vo,U.marginTop),this.marginRight=Pt(C,zo,U.marginRight),this.marginBottom=Pt(C,Xo,U.marginBottom),this.marginLeft=Pt(C,Yo,U.marginLeft),this.opacity=Pt(C,pl,U.opacity);var ee=Pt(C,$o,U.overflow);this.overflowX=ee[0],this.overflowY=ee[ee.length>1?1:0],this.overflowWrap=Pt(C,Jo,U.overflowWrap),this.paddingTop=Pt(C,Zo,U.paddingTop),this.paddingRight=Pt(C,qo,U.paddingRight),this.paddingBottom=Pt(C,el,U.paddingBottom),this.paddingLeft=Pt(C,tl,U.paddingLeft),this.paintOrder=Pt(C,Rl,U.paintOrder),this.position=Pt(C,nl,U.position),this.textAlign=Pt(C,rl,U.textAlign),this.textDecorationColor=Pt(C,ml,(L=U.textDecorationColor)!==null&&L!==void 0?L:U.color),this.textDecorationLine=Pt(C,gl,(Y=U.textDecorationLine)!==null&&Y!==void 0?Y:U.textDecoration),this.textShadow=Pt(C,il,U.textShadow),this.textTransform=Pt(C,al,U.textTransform),this.transform=Pt(C,sl,U.transform),this.transformOrigin=Pt(C,dl,U.transformOrigin),this.visibility=Pt(C,cl,U.visibility),this.webkitTextStrokeColor=Pt(C,Il,U.webkitTextStrokeColor),this.webkitTextStrokeWidth=Pt(C,Ol,U.webkitTextStrokeWidth),this.wordBreak=Pt(C,hl,U.wordBreak),this.zIndex=Pt(C,fl,U.zIndex)}return I.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},I.prototype.isTransparent=function(){return jn(this.backgroundColor)},I.prototype.isTransformed=function(){return this.transform!==null},I.prototype.isPositioned=function(){return this.position!==0},I.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},I.prototype.isFloating=function(){return this.float!==0},I.prototype.isInlineLevel=function(){return zr(this.display,4)||zr(this.display,33554432)||zr(this.display,268435456)||zr(this.display,536870912)||zr(this.display,67108864)||zr(this.display,134217728)},I}(),Dl=function(){function I(C,U){this.content=Pt(C,wl,U.content),this.quotes=Pt(C,Bl,U.quotes)}return I}(),rs=function(){function I(C,U){this.counterIncrement=Pt(C,Cl,U.counterIncrement),this.counterReset=Pt(C,xl,U.counterReset)}return I}(),Pt=function(I,C,U){var L=new yi,Y=U!==null&&typeof U!="undefined"?U.toString():C.initialValue;L.write(Y);var ee=new Zn(L.read());switch(C.type){case 2:var me=ee.parseComponentValue();return C.parse(I,Tr(me)?me.value:C.initialValue);case 0:return C.parse(I,ee.parseComponentValue());case 1:return C.parse(I,ee.parseComponentValues());case 4:return ee.parseComponentValue();case 3:switch(C.format){case"angle":return Qn.parse(I,ee.parseComponentValue());case"color":return Kn.parse(I,ee.parseComponentValue());case"image":return da.parse(I,ee.parseComponentValue());case"length":var Se=ee.parseComponentValue();return yn(Se)?Se:Vr;case"length-percentage":var Be=ee.parseComponentValue();return Hr(Be)?Be:Vr;case"time":return es.parse(I,ee.parseComponentValue())}break}},Ul="data-html2canvas-debug",Fl=function(I){var C=I.getAttribute(Ul);switch(C){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},ha=function(I,C){var U=Fl(I);return U===1||C===U},Ln=function(){function I(C,U){if(this.context=C,this.textNodes=[],this.elements=[],this.flags=0,ha(U,3))debugger;this.styles=new Ll(C,window.getComputedStyle(U,null)),Ba(U)&&(this.styles.animationDuration.some(function(L){return L>0})&&(U.style.animationDuration="0s"),this.styles.transform!==null&&(U.style.transform="none")),this.bounds=H(this.context,U),ha(U,4)&&(this.flags|=16)}return I}(),Pl="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",ns="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xi=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Vi=0;Vi<ns.length;Vi++)xi[ns.charCodeAt(Vi)]=Vi;for(var Nl=function(I){var C=I.length*.75,U=I.length,L,Y=0,ee,me,Se,Be;I[I.length-1]==="="&&(C--,I[I.length-2]==="="&&C--);var je=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(C):new Array(C),ze=Array.isArray(je)?je:new Uint8Array(je);for(L=0;L<U;L+=4)ee=xi[I.charCodeAt(L)],me=xi[I.charCodeAt(L+1)],Se=xi[I.charCodeAt(L+2)],Be=xi[I.charCodeAt(L+3)],ze[Y++]=ee<<2|me>>4,ze[Y++]=(me&15)<<4|Se>>2,ze[Y++]=(Se&3)<<6|Be&63;return je},kl=function(I){for(var C=I.length,U=[],L=0;L<C;L+=2)U.push(I[L+1]<<8|I[L]);return U},Ml=function(I){for(var C=I.length,U=[],L=0;L<C;L+=4)U.push(I[L+3]<<24|I[L+2]<<16|I[L+1]<<8|I[L]);return U},qn=5,fa=6+5,pa=2,Hl=fa-qn,is=65536>>qn,Ql=1<<qn,ma=Ql-1,Kl=1024>>qn,jl=is+Kl,Wl=jl,Gl=2048>>6,Vl=Wl+Gl,zl=65536>>fa,Xl=1<<Hl,Yl=Xl-1,as=function(I,C,U){return I.slice?I.slice(C,U):new Uint16Array(Array.prototype.slice.call(I,C,U))},$l=function(I,C,U){return I.slice?I.slice(C,U):new Uint32Array(Array.prototype.slice.call(I,C,U))},Jl=function(I,C){var U=Nl(I),L=Array.isArray(U)?Ml(U):new Uint32Array(U),Y=Array.isArray(U)?kl(U):new Uint16Array(U),ee=24,me=as(Y,ee/2,L[4]/2),Se=L[5]===2?as(Y,(ee+L[4])/2):$l(L,Math.ceil((ee+L[4])/4));return new Zl(L[0],L[1],L[2],L[3],me,Se)},Zl=function(){function I(C,U,L,Y,ee,me){this.initialValue=C,this.errorValue=U,this.highStart=L,this.highValueIndex=Y,this.index=ee,this.data=me}return I.prototype.get=function(C){var U;if(C>=0){if(C<55296||C>56319&&C<=65535)return U=this.index[C>>qn],U=(U<<pa)+(C&ma),this.data[U];if(C<=65535)return U=this.index[is+(C-55296>>qn)],U=(U<<pa)+(C&ma),this.data[U];if(C<this.highStart)return U=Vl-zl+(C>>fa),U=this.index[U],U+=C>>qn&Yl,U=this.index[U],U=(U<<pa)+(C&ma),this.data[U];if(C<=1114111)return this.data[this.highValueIndex]}return this.errorValue},I}(),ss="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ql=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),zi=0;zi<ss.length;zi++)ql[ss.charCodeAt(zi)]=zi;var eA=1,ga=2,va=3,os=4,ls=5,tA=7,As=8,ya=9,_a=10,us=11,ds=12,cs=13,hs=14,Ea=15,rA=function(I){for(var C=[],U=0,L=I.length;U<L;){var Y=I.charCodeAt(U++);if(Y>=55296&&Y<=56319&&U<L){var ee=I.charCodeAt(U++);(ee&64512)===56320?C.push(((Y&1023)<<10)+(ee&1023)+65536):(C.push(Y),U--)}else C.push(Y)}return C},nA=function(){for(var I=[],C=0;C<arguments.length;C++)I[C]=arguments[C];if(String.fromCodePoint)return String.fromCodePoint.apply(String,I);var U=I.length;if(!U)return"";for(var L=[],Y=-1,ee="";++Y<U;){var me=I[Y];me<=65535?L.push(me):(me-=65536,L.push((me>>10)+55296,me%1024+56320)),(Y+1===U||L.length>16384)&&(ee+=String.fromCharCode.apply(String,L),L.length=0)}return ee},iA=Jl(Pl),En="\xD7",ba="\xF7",aA=function(I){return iA.get(I)},sA=function(I,C,U){var L=U-2,Y=C[L],ee=C[U-1],me=C[U];if(ee===ga&&me===va)return En;if(ee===ga||ee===va||ee===os)return ba;if(me===ga||me===va||me===os)return ba;if(ee===As&&[As,ya,us,ds].indexOf(me)!==-1)return En;if((ee===us||ee===ya)&&(me===ya||me===_a))return En;if((ee===ds||ee===_a)&&me===_a)return En;if(me===cs||me===ls)return En;if(me===tA)return En;if(ee===eA)return En;if(ee===cs&&me===hs){for(;Y===ls;)Y=C[--L];if(Y===hs)return En}if(ee===Ea&&me===Ea){for(var Se=0;Y===Ea;)Se++,Y=C[--L];if(Se%2===0)return En}return ba},oA=function(I){var C=rA(I),U=C.length,L=0,Y=0,ee=C.map(aA);return{next:function(){if(L>=U)return{done:!0,value:null};for(var me=En;L<U&&(me=sA(C,ee,++L))===En;);if(me!==En||L===U){var Se=nA.apply(null,C.slice(Y,L));return Y=L,{value:Se,done:!1}}return{done:!0,value:null}}}},lA=function(I){for(var C=oA(I),U=[],L;!(L=C.next()).done;)L.value&&U.push(L.value.slice());return U},AA=function(I){var C=123;if(I.createRange){var U=I.createRange();if(U.getBoundingClientRect){var L=I.createElement("boundtest");L.style.height=C+"px",L.style.display="block",I.body.appendChild(L),U.selectNode(L);var Y=U.getBoundingClientRect(),ee=Math.round(Y.height);if(I.body.removeChild(L),ee===C)return!0}}return!1},uA=function(I){var C=I.createElement("boundtest");C.style.width="50px",C.style.display="block",C.style.fontSize="12px",C.style.letterSpacing="0px",C.style.wordSpacing="0px",I.body.appendChild(C);var U=I.createRange();C.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var L=C.firstChild,Y=M(L.data).map(function(Be){return D(Be)}),ee=0,me={},Se=Y.every(function(Be,je){U.setStart(L,ee),U.setEnd(L,ee+Be.length);var ze=U.getBoundingClientRect();ee+=Be.length;var st=ze.x>me.x||ze.y>me.y;return me=ze,je===0?!0:st});return I.body.removeChild(C),Se},dA=function(){return typeof new Image().crossOrigin!="undefined"},cA=function(){return typeof new XMLHttpRequest().responseType=="string"},hA=function(I){var C=new Image,U=I.createElement("canvas"),L=U.getContext("2d");if(!L)return!1;C.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{L.drawImage(C,0,0),U.toDataURL()}catch(Y){return!1}return!0},fs=function(I){return I[0]===0&&I[1]===255&&I[2]===0&&I[3]===255},fA=function(I){var C=I.createElement("canvas"),U=100;C.width=U,C.height=U;var L=C.getContext("2d");if(!L)return Promise.reject(!1);L.fillStyle="rgb(0, 255, 0)",L.fillRect(0,0,U,U);var Y=new Image,ee=C.toDataURL();Y.src=ee;var me=wa(U,U,0,0,Y);return L.fillStyle="red",L.fillRect(0,0,U,U),ps(me).then(function(Se){L.drawImage(Se,0,0);var Be=L.getImageData(0,0,U,U).data;L.fillStyle="red",L.fillRect(0,0,U,U);var je=I.createElement("div");return je.style.backgroundImage="url("+ee+")",je.style.height=U+"px",fs(Be)?ps(wa(U,U,0,0,je)):Promise.reject(!1)}).then(function(Se){return L.drawImage(Se,0,0),fs(L.getImageData(0,0,U,U).data)}).catch(function(){return!1})},wa=function(I,C,U,L,Y){var ee="http://www.w3.org/2000/svg",me=document.createElementNS(ee,"svg"),Se=document.createElementNS(ee,"foreignObject");return me.setAttributeNS(null,"width",I.toString()),me.setAttributeNS(null,"height",C.toString()),Se.setAttributeNS(null,"width","100%"),Se.setAttributeNS(null,"height","100%"),Se.setAttributeNS(null,"x",U.toString()),Se.setAttributeNS(null,"y",L.toString()),Se.setAttributeNS(null,"externalResourcesRequired","true"),me.appendChild(Se),Se.appendChild(Y),me},ps=function(I){return new Promise(function(C,U){var L=new Image;L.onload=function(){return C(L)},L.onerror=U,L.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(I))})},rn={get SUPPORT_RANGE_BOUNDS(){var I=AA(document);return Object.defineProperty(rn,"SUPPORT_RANGE_BOUNDS",{value:I}),I},get SUPPORT_WORD_BREAKING(){var I=rn.SUPPORT_RANGE_BOUNDS&&uA(document);return Object.defineProperty(rn,"SUPPORT_WORD_BREAKING",{value:I}),I},get SUPPORT_SVG_DRAWING(){var I=hA(document);return Object.defineProperty(rn,"SUPPORT_SVG_DRAWING",{value:I}),I},get SUPPORT_FOREIGNOBJECT_DRAWING(){var I=typeof Array.from=="function"&&typeof window.fetch=="function"?fA(document):Promise.resolve(!1);return Object.defineProperty(rn,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:I}),I},get SUPPORT_CORS_IMAGES(){var I=dA();return Object.defineProperty(rn,"SUPPORT_CORS_IMAGES",{value:I}),I},get SUPPORT_RESPONSE_TYPE(){var I=cA();return Object.defineProperty(rn,"SUPPORT_RESPONSE_TYPE",{value:I}),I},get SUPPORT_CORS_XHR(){var I="withCredentials"in new XMLHttpRequest;return Object.defineProperty(rn,"SUPPORT_CORS_XHR",{value:I}),I},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var I=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(rn,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:I}),I}},Ti=function(){function I(C,U){this.text=C,this.bounds=U}return I}(),pA=function(I,C,U,L){var Y=vA(C,U),ee=[],me=0;return Y.forEach(function(Se){if(U.textDecorationLine.length||Se.trim().length>0)if(rn.SUPPORT_RANGE_BOUNDS){var Be=ms(L,me,Se.length).getClientRects();if(Be.length>1){var je=Ca(Se),ze=0;je.forEach(function(ot){ee.push(new Ti(ot,O.fromDOMRectList(I,ms(L,ze+me,ot.length).getClientRects()))),ze+=ot.length})}else ee.push(new Ti(Se,O.fromDOMRectList(I,Be)))}else{var st=L.splitText(Se.length);ee.push(new Ti(Se,mA(I,L))),L=st}else rn.SUPPORT_RANGE_BOUNDS||(L=L.splitText(Se.length));me+=Se.length}),ee},mA=function(I,C){var U=C.ownerDocument;if(U){var L=U.createElement("html2canvaswrapper");L.appendChild(C.cloneNode(!0));var Y=C.parentNode;if(Y){Y.replaceChild(L,C);var ee=H(I,L);return L.firstChild&&Y.replaceChild(L.firstChild,L),ee}}return O.EMPTY},ms=function(I,C,U){var L=I.ownerDocument;if(!L)throw new Error("Node has no owner document");var Y=L.createRange();return Y.setStart(I,C),Y.setEnd(I,C+U),Y},Ca=function(I){if(rn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var C=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(C.segment(I)).map(function(U){return U.segment})}return lA(I)},gA=function(I,C){if(rn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var U=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(U.segment(I)).map(function(L){return L.segment})}return _A(I,C)},vA=function(I,C){return C.letterSpacing!==0?Ca(I):gA(I,C)},yA=[32,160,4961,65792,65793,4153,4241],_A=function(I,C){for(var U=Ar(I,{lineBreak:C.lineBreak,wordBreak:C.overflowWrap==="break-word"?"break-word":C.wordBreak}),L=[],Y,ee=function(){if(Y.value){var me=Y.value.slice(),Se=M(me),Be="";Se.forEach(function(je){yA.indexOf(je)===-1?Be+=D(je):(Be.length&&L.push(Be),L.push(D(je)),Be="")}),Be.length&&L.push(Be)}};!(Y=U.next()).done;)ee();return L},EA=function(){function I(C,U,L){this.text=bA(U.data,L.textTransform),this.textBounds=pA(C,this.text,L,U)}return I}(),bA=function(I,C){switch(C){case 1:return I.toLowerCase();case 3:return I.replace(wA,CA);case 2:return I.toUpperCase();default:return I}},wA=/(^|\s|:|-|\(|\))([a-z])/g,CA=function(I,C,U){return I.length>0?C+U.toUpperCase():I},gs=function(I){be(C,I);function C(U,L){var Y=I.call(this,U,L)||this;return Y.src=L.currentSrc||L.src,Y.intrinsicWidth=L.naturalWidth,Y.intrinsicHeight=L.naturalHeight,Y.context.cache.addImage(Y.src),Y}return C}(Ln),vs=function(I){be(C,I);function C(U,L){var Y=I.call(this,U,L)||this;return Y.canvas=L,Y.intrinsicWidth=L.width,Y.intrinsicHeight=L.height,Y}return C}(Ln),ys=function(I){be(C,I);function C(U,L){var Y=I.call(this,U,L)||this,ee=new XMLSerializer,me=H(U,L);return L.setAttribute("width",me.width+"px"),L.setAttribute("height",me.height+"px"),Y.svg="data:image/svg+xml,"+encodeURIComponent(ee.serializeToString(L)),Y.intrinsicWidth=L.width.baseVal.value,Y.intrinsicHeight=L.height.baseVal.value,Y.context.cache.addImage(Y.svg),Y}return C}(Ln),_s=function(I){be(C,I);function C(U,L){var Y=I.call(this,U,L)||this;return Y.value=L.value,Y}return C}(Ln),xa=function(I){be(C,I);function C(U,L){var Y=I.call(this,U,L)||this;return Y.start=L.start,Y.reversed=typeof L.reversed=="boolean"&&L.reversed===!0,Y}return C}(Ln),xA=[{type:15,flags:0,unit:"px",number:3}],TA=[{type:16,flags:0,number:50}],BA=function(I){return I.width>I.height?new O(I.left+(I.width-I.height)/2,I.top,I.height,I.height):I.width<I.height?new O(I.left,I.top+(I.height-I.width)/2,I.width,I.width):I},SA=function(I){var C=I.type===RA?new Array(I.value.length+1).join("\u2022"):I.value;return C.length===0?I.placeholder||"":C},Xi="checkbox",Yi="radio",RA="password",Es=707406591,Ta=function(I){be(C,I);function C(U,L){var Y=I.call(this,U,L)||this;Y.type=L.type.toLowerCase(),Y.checked=L.checked,Y.value=SA(L),(Y.type===Xi||Y.type===Yi)&&(Y.styles.backgroundColor=3739148031,Y.styles.borderTopColor=Y.styles.borderRightColor=Y.styles.borderBottomColor=Y.styles.borderLeftColor=2779096575,Y.styles.borderTopWidth=Y.styles.borderRightWidth=Y.styles.borderBottomWidth=Y.styles.borderLeftWidth=1,Y.styles.borderTopStyle=Y.styles.borderRightStyle=Y.styles.borderBottomStyle=Y.styles.borderLeftStyle=1,Y.styles.backgroundClip=[0],Y.styles.backgroundOrigin=[0],Y.bounds=BA(Y.bounds));switch(Y.type){case Xi:Y.styles.borderTopRightRadius=Y.styles.borderTopLeftRadius=Y.styles.borderBottomRightRadius=Y.styles.borderBottomLeftRadius=xA;break;case Yi:Y.styles.borderTopRightRadius=Y.styles.borderTopLeftRadius=Y.styles.borderBottomRightRadius=Y.styles.borderBottomLeftRadius=TA;break}return Y}return C}(Ln),bs=function(I){be(C,I);function C(U,L){var Y=I.call(this,U,L)||this,ee=L.options[L.selectedIndex||0];return Y.value=ee&&ee.text||"",Y}return C}(Ln),ws=function(I){be(C,I);function C(U,L){var Y=I.call(this,U,L)||this;return Y.value=L.value,Y}return C}(Ln),Cs=function(I){be(C,I);function C(U,L){var Y=I.call(this,U,L)||this;Y.src=L.src,Y.width=parseInt(L.width,10)||0,Y.height=parseInt(L.height,10)||0,Y.backgroundColor=Y.styles.backgroundColor;try{if(L.contentWindow&&L.contentWindow.document&&L.contentWindow.document.documentElement){Y.tree=Ts(U,L.contentWindow.document.documentElement);var ee=L.contentWindow.document.documentElement?wi(U,getComputedStyle(L.contentWindow.document.documentElement).backgroundColor):Pn.TRANSPARENT,me=L.contentWindow.document.body?wi(U,getComputedStyle(L.contentWindow.document.body).backgroundColor):Pn.TRANSPARENT;Y.backgroundColor=jn(ee)?jn(me)?Y.styles.backgroundColor:me:ee}}catch(Se){}return Y}return C}(Ln),IA=["OL","UL","MENU"],$i=function(I,C,U,L){for(var Y=C.firstChild,ee=void 0;Y;Y=ee)if(ee=Y.nextSibling,Bs(Y)&&Y.data.trim().length>0)U.textNodes.push(new EA(I,Y,U.styles));else if(Ai(Y))if(Ds(Y)&&Y.assignedNodes)Y.assignedNodes().forEach(function(Se){return $i(I,Se,U,L)});else{var me=xs(I,Y);me.styles.isVisible()&&(OA(Y,me,L)?me.flags|=4:LA(me.styles)&&(me.flags|=2),IA.indexOf(Y.tagName)!==-1&&(me.flags|=8),U.elements.push(me),Y.slot,Y.shadowRoot?$i(I,Y.shadowRoot,me,L):!Zi(Y)&&!Ss(Y)&&!qi(Y)&&$i(I,Y,me,L))}},xs=function(I,C){return Ra(C)?new gs(I,C):Rs(C)?new vs(I,C):Ss(C)?new ys(I,C):DA(C)?new _s(I,C):UA(C)?new xa(I,C):FA(C)?new Ta(I,C):qi(C)?new bs(I,C):Zi(C)?new ws(I,C):Os(C)?new Cs(I,C):new Ln(I,C)},Ts=function(I,C){var U=xs(I,C);return U.flags|=4,$i(I,C,U,U),U},OA=function(I,C,U){return C.styles.isPositionedWithZIndex()||C.styles.opacity<1||C.styles.isTransformed()||Sa(I)&&U.styles.isTransparent()},LA=function(I){return I.isPositioned()||I.isFloating()},Bs=function(I){return I.nodeType===Node.TEXT_NODE},Ai=function(I){return I.nodeType===Node.ELEMENT_NODE},Ba=function(I){return Ai(I)&&typeof I.style!="undefined"&&!Ji(I)},Ji=function(I){return typeof I.className=="object"},DA=function(I){return I.tagName==="LI"},UA=function(I){return I.tagName==="OL"},FA=function(I){return I.tagName==="INPUT"},PA=function(I){return I.tagName==="HTML"},Ss=function(I){return I.tagName==="svg"},Sa=function(I){return I.tagName==="BODY"},Rs=function(I){return I.tagName==="CANVAS"},Is=function(I){return I.tagName==="VIDEO"},Ra=function(I){return I.tagName==="IMG"},Os=function(I){return I.tagName==="IFRAME"},Ls=function(I){return I.tagName==="STYLE"},NA=function(I){return I.tagName==="SCRIPT"},Zi=function(I){return I.tagName==="TEXTAREA"},qi=function(I){return I.tagName==="SELECT"},Ds=function(I){return I.tagName==="SLOT"},Us=function(I){return I.tagName.indexOf("-")>0},kA=function(){function I(){this.counters={}}return I.prototype.getCounterValue=function(C){var U=this.counters[C];return U&&U.length?U[U.length-1]:1},I.prototype.getCounterValues=function(C){var U=this.counters[C];return U||[]},I.prototype.pop=function(C){var U=this;C.forEach(function(L){return U.counters[L].pop()})},I.prototype.parse=function(C){var U=this,L=C.counterIncrement,Y=C.counterReset,ee=!0;L!==null&&L.forEach(function(Se){var Be=U.counters[Se.counter];Be&&Se.increment!==0&&(ee=!1,Be.length||Be.push(1),Be[Math.max(0,Be.length-1)]+=Se.increment)});var me=[];return ee&&Y.forEach(function(Se){var Be=U.counters[Se.counter];me.push(Se.counter),Be||(Be=U.counters[Se.counter]=[]),Be.push(Se.reset)}),me},I}(),Fs={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"]},Ps={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"]},MA={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"]},HA={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"]},ui=function(I,C,U,L,Y,ee){return I<C||I>U?Si(I,Y,ee.length>0):L.integers.reduce(function(me,Se,Be){for(;I>=Se;)I-=Se,me+=L.values[Be];return me},"")+ee},Ns=function(I,C,U,L){var Y="";do U||I--,Y=L(I)+Y,I/=C;while(I*C>=C);return Y},Qr=function(I,C,U,L,Y){var ee=U-C+1;return(I<0?"-":"")+(Ns(Math.abs(I),ee,L,function(me){return D(Math.floor(me%ee)+C)})+Y)},ei=function(I,C,U){U===void 0&&(U=". ");var L=C.length;return Ns(Math.abs(I),L,!1,function(Y){return C[Math.floor(Y%L)]})+U},di=1<<0,Gn=1<<1,Vn=1<<2,Bi=1<<3,Nn=function(I,C,U,L,Y,ee){if(I<-9999||I>9999)return Si(I,4,Y.length>0);var me=Math.abs(I),Se=Y;if(me===0)return C[0]+Se;for(var Be=0;me>0&&Be<=4;Be++){var je=me%10;je===0&&zr(ee,di)&&Se!==""?Se=C[je]+Se:je>1||je===1&&Be===0||je===1&&Be===1&&zr(ee,Gn)||je===1&&Be===1&&zr(ee,Vn)&&I>100||je===1&&Be>1&&zr(ee,Bi)?Se=C[je]+(Be>0?U[Be-1]:"")+Se:je===1&&Be>0&&(Se=U[Be-1]+Se),me=Math.floor(me/10)}return(I<0?L:"")+Se},ks="\u5341\u767E\u5343\u842C",Ms="\u62FE\u4F70\u4EDF\u842C",Hs="\u30DE\u30A4\u30CA\u30B9",Ia="\uB9C8\uC774\uB108\uC2A4",Si=function(I,C,U){var L=U?". ":"",Y=U?"\u3001":"",ee=U?", ":"",me=U?" ":"";switch(C){case 0:return"\u2022"+me;case 1:return"\u25E6"+me;case 2:return"\u25FE"+me;case 5:var Se=Qr(I,48,57,!0,L);return Se.length<4?"0"+Se:Se;case 4:return ei(I,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Y);case 6:return ui(I,1,3999,Fs,3,L).toLowerCase();case 7:return ui(I,1,3999,Fs,3,L);case 8:return Qr(I,945,969,!1,L);case 9:return Qr(I,97,122,!1,L);case 10:return Qr(I,65,90,!1,L);case 11:return Qr(I,1632,1641,!0,L);case 12:case 49:return ui(I,1,9999,Ps,3,L);case 35:return ui(I,1,9999,Ps,3,L).toLowerCase();case 13:return Qr(I,2534,2543,!0,L);case 14:case 30:return Qr(I,6112,6121,!0,L);case 15:return ei(I,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",Y);case 16:return ei(I,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",Y);case 17:case 48:return Nn(I,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",ks,"\u8CA0",Y,Gn|Vn|Bi);case 47:return Nn(I,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",Ms,"\u8CA0",Y,di|Gn|Vn|Bi);case 42:return Nn(I,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",ks,"\u8D1F",Y,Gn|Vn|Bi);case 41:return Nn(I,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",Ms,"\u8D1F",Y,di|Gn|Vn|Bi);case 26:return Nn(I,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",Hs,Y,0);case 25:return Nn(I,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",Hs,Y,di|Gn|Vn);case 31:return Nn(I,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",Ia,ee,di|Gn|Vn);case 33:return Nn(I,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",Ia,ee,0);case 32:return Nn(I,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",Ia,ee,di|Gn|Vn);case 18:return Qr(I,2406,2415,!0,L);case 20:return ui(I,1,19999,HA,3,L);case 21:return Qr(I,2790,2799,!0,L);case 22:return Qr(I,2662,2671,!0,L);case 22:return ui(I,1,10999,MA,3,L);case 23:return ei(I,"\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 ei(I,"\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 Qr(I,3302,3311,!0,L);case 28:return ei(I,"\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",Y);case 29:return ei(I,"\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",Y);case 34:return Qr(I,3792,3801,!0,L);case 37:return Qr(I,6160,6169,!0,L);case 38:return Qr(I,4160,4169,!0,L);case 39:return Qr(I,2918,2927,!0,L);case 40:return Qr(I,1776,1785,!0,L);case 43:return Qr(I,3046,3055,!0,L);case 44:return Qr(I,3174,3183,!0,L);case 45:return Qr(I,3664,3673,!0,L);case 46:return Qr(I,3872,3881,!0,L);case 3:default:return Qr(I,48,57,!0,L)}},Qs="data-html2canvas-ignore",Ks=function(){function I(C,U,L){if(this.context=C,this.options=L,this.scrolledElements=[],this.referenceElement=U,this.counters=new kA,this.quoteDepth=0,!U.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(U.ownerDocument.documentElement,!1)}return I.prototype.toIFrame=function(C,U){var L=this,Y=QA(C,U);if(!Y.contentWindow)return Promise.reject("Unable to find iframe window");var ee=C.defaultView.pageXOffset,me=C.defaultView.pageYOffset,Se=Y.contentWindow,Be=Se.document,je=WA(Y).then(function(){return Ee(L,void 0,void 0,function(){var ze,st;return ue(this,function(ot){switch(ot.label){case 0:return this.scrolledElements.forEach(XA),Se&&(Se.scrollTo(U.left,U.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(Se.scrollY!==U.top||Se.scrollX!==U.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(Se.scrollX-U.left,Se.scrollY-U.top,0,0))),ze=this.options.onclone,st=this.clonedReferenceElement,typeof st=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:Be.fonts&&Be.fonts.ready?[4,Be.fonts.ready]:[3,2];case 1:ot.sent(),ot.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,jA(Be)]:[3,4];case 3:ot.sent(),ot.label=4;case 4:return typeof ze=="function"?[2,Promise.resolve().then(function(){return ze(Be,st)}).then(function(){return Y})]:[2,Y]}})})});return Be.open(),Be.write(VA(document.doctype)+"<html></html>"),zA(this.referenceElement.ownerDocument,ee,me),Be.replaceChild(Be.adoptNode(this.documentElement),Be.documentElement),Be.close(),je},I.prototype.createElementClone=function(C){if(ha(C,2))debugger;if(Rs(C))return this.createCanvasClone(C);if(Is(C))return this.createVideoClone(C);if(Ls(C))return this.createStyleClone(C);var U=C.cloneNode(!1);return Ra(U)&&(Ra(C)&&C.currentSrc&&C.currentSrc!==C.src&&(U.src=C.currentSrc,U.srcset=""),U.loading==="lazy"&&(U.loading="eager")),Us(U)?this.createCustomElementClone(U):U},I.prototype.createCustomElementClone=function(C){var U=document.createElement("html2canvascustomelement");return Oa(C.style,U),U},I.prototype.createStyleClone=function(C){try{var U=C.sheet;if(U&&U.cssRules){var L=[].slice.call(U.cssRules,0).reduce(function(ee,me){return me&&typeof me.cssText=="string"?ee+me.cssText:ee},""),Y=C.cloneNode(!1);return Y.textContent=L,Y}}catch(ee){if(this.context.logger.error("Unable to access cssRules property",ee),ee.name!=="SecurityError")throw ee}return C.cloneNode(!1)},I.prototype.createCanvasClone=function(C){var U;if(this.options.inlineImages&&C.ownerDocument){var L=C.ownerDocument.createElement("img");try{return L.src=C.toDataURL(),L}catch(je){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",C)}}var Y=C.cloneNode(!1);try{Y.width=C.width,Y.height=C.height;var ee=C.getContext("2d"),me=Y.getContext("2d");if(me)if(!this.options.allowTaint&&ee)me.putImageData(ee.getImageData(0,0,C.width,C.height),0,0);else{var Se=(U=C.getContext("webgl2"))!==null&&U!==void 0?U:C.getContext("webgl");if(Se){var Be=Se.getContextAttributes();(Be==null?void 0:Be.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",C)}me.drawImage(C,0,0)}return Y}catch(je){this.context.logger.info("Unable to clone canvas as it is tainted",C)}return Y},I.prototype.createVideoClone=function(C){var U=C.ownerDocument.createElement("canvas");U.width=C.offsetWidth,U.height=C.offsetHeight;var L=U.getContext("2d");try{return L&&(L.drawImage(C,0,0,U.width,U.height),this.options.allowTaint||L.getImageData(0,0,U.width,U.height)),U}catch(ee){this.context.logger.info("Unable to clone video as it is tainted",C)}var Y=C.ownerDocument.createElement("canvas");return Y.width=C.offsetWidth,Y.height=C.offsetHeight,Y},I.prototype.appendChildNode=function(C,U,L){(!Ai(U)||!NA(U)&&!U.hasAttribute(Qs)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(U)))&&((!this.options.copyStyles||!Ai(U)||!Ls(U))&&C.appendChild(this.cloneNode(U,L)))},I.prototype.cloneChildNodes=function(C,U,L){for(var Y=this,ee=C.shadowRoot?C.shadowRoot.firstChild:C.firstChild;ee;ee=ee.nextSibling)if(Ai(ee)&&Ds(ee)&&typeof ee.assignedNodes=="function"){var me=ee.assignedNodes();me.length&&me.forEach(function(Se){return Y.appendChildNode(U,Se,L)})}else this.appendChildNode(U,ee,L)},I.prototype.cloneNode=function(C,U){if(Bs(C))return document.createTextNode(C.data);if(!C.ownerDocument)return C.cloneNode(!1);var L=C.ownerDocument.defaultView;if(L&&Ai(C)&&(Ba(C)||Ji(C))){var Y=this.createElementClone(C);Y.style.transitionProperty="none";var ee=L.getComputedStyle(C),me=L.getComputedStyle(C,":before"),Se=L.getComputedStyle(C,":after");this.referenceElement===C&&Ba(Y)&&(this.clonedReferenceElement=Y),Sa(Y)&&JA(Y);var Be=this.counters.parse(new rs(this.context,ee)),je=this.resolvePseudoContent(C,Y,me,Ri.BEFORE);Us(C)&&(U=!0),Is(C)||this.cloneChildNodes(C,Y,U),je&&Y.insertBefore(je,Y.firstChild);var ze=this.resolvePseudoContent(C,Y,Se,Ri.AFTER);return ze&&Y.appendChild(ze),this.counters.pop(Be),(ee&&(this.options.copyStyles||Ji(C))&&!Os(C)||U)&&Oa(ee,Y),(C.scrollTop!==0||C.scrollLeft!==0)&&this.scrolledElements.push([Y,C.scrollLeft,C.scrollTop]),(Zi(C)||qi(C))&&(Zi(Y)||qi(Y))&&(Y.value=C.value),Y}return C.cloneNode(!1)},I.prototype.resolvePseudoContent=function(C,U,L,Y){var ee=this;if(!L)return;var me=L.content,Se=U.ownerDocument;if(!Se||!me||me==="none"||me==="-moz-alt-content"||L.display==="none")return;this.counters.parse(new rs(this.context,L));var Be=new Dl(this.context,L),je=Se.createElement("html2canvaspseudoelement");Oa(L,je),Be.content.forEach(function(st){if(st.type===0)je.appendChild(Se.createTextNode(st.value));else if(st.type===22){var ot=Se.createElement("img");ot.src=st.value,ot.style.opacity="1",je.appendChild(ot)}else if(st.type===18){if(st.name==="attr"){var Ut=st.values.filter(Tr);Ut.length&&je.appendChild(Se.createTextNode(C.getAttribute(Ut[0].value)||""))}else if(st.name==="counter"){var Ct=st.values.filter(On),St=Ct[0],Xt=Ct[1];if(St&&Tr(St)){var It=ee.counters.getCounterValue(St.value),Nt=Xt&&Tr(Xt)?ca.parse(ee.context,Xt.value):3;je.appendChild(Se.createTextNode(Si(It,Nt,!1)))}}else if(st.name==="counters"){var vr=st.values.filter(On),St=vr[0],or=vr[1],Xt=vr[2];if(St&&Tr(St)){var wr=ee.counters.getCounterValues(St.value),Ft=Xt&&Tr(Xt)?ca.parse(ee.context,Xt.value):3,br=or&&or.type===0?or.value:"",Cr=wr.map(function(on){return Si(on,Ft,!1)}).join(br);je.appendChild(Se.createTextNode(Cr))}}}else if(st.type===20)switch(st.value){case"open-quote":je.appendChild(Se.createTextNode(ts(Be.quotes,ee.quoteDepth++,!0)));break;case"close-quote":je.appendChild(Se.createTextNode(ts(Be.quotes,--ee.quoteDepth,!1)));break;default:je.appendChild(Se.createTextNode(st.value))}}),je.className=La+" "+Da;var ze=Y===Ri.BEFORE?" "+La:" "+Da;return Ji(U)?U.className.baseValue+=ze:U.className+=ze,je},I.destroy=function(C){return C.parentNode?(C.parentNode.removeChild(C),!0):!1},I}(),Ri;(function(I){I[I.BEFORE=0]="BEFORE",I[I.AFTER=1]="AFTER"})(Ri||(Ri={}));var QA=function(I,C){var U=I.createElement("iframe");return U.className="html2canvas-container",U.style.visibility="hidden",U.style.position="fixed",U.style.left="-10000px",U.style.top="0px",U.style.border="0",U.width=C.width.toString(),U.height=C.height.toString(),U.scrolling="no",U.setAttribute(Qs,"true"),I.body.appendChild(U),U},KA=function(I){return new Promise(function(C){if(I.complete){C();return}if(!I.src){C();return}I.onload=C,I.onerror=C})},jA=function(I){return Promise.all([].slice.call(I.images,0).map(KA))},WA=function(I){return new Promise(function(C,U){var L=I.contentWindow;if(!L)return U("No window assigned for iframe");var Y=L.document;L.onload=I.onload=function(){L.onload=I.onload=null;var ee=setInterval(function(){Y.body.childNodes.length>0&&Y.readyState==="complete"&&(clearInterval(ee),C(I))},50)}})},GA=["all","d","content"],Oa=function(I,C){for(var U=I.length-1;U>=0;U--){var L=I.item(U);GA.indexOf(L)===-1&&C.style.setProperty(L,I.getPropertyValue(L))}return C},VA=function(I){var C="";return I&&(C+="<!DOCTYPE ",I.name&&(C+=I.name),I.internalSubset&&(C+=I.internalSubset),I.publicId&&(C+='"'+I.publicId+'"'),I.systemId&&(C+='"'+I.systemId+'"'),C+=">"),C},zA=function(I,C,U){I&&I.defaultView&&(C!==I.defaultView.pageXOffset||U!==I.defaultView.pageYOffset)&&I.defaultView.scrollTo(C,U)},XA=function(I){var C=I[0],U=I[1],L=I[2];C.scrollLeft=U,C.scrollTop=L},YA=":before",$A=":after",La="___html2canvas___pseudoelement_before",Da="___html2canvas___pseudoelement_after",js=`{
|
|
content: "" !important;
|
|
display: none !important;
|
|
}`,JA=function(I){ZA(I,"."+La+YA+js+`
|
|
.`+Da+$A+js)},ZA=function(I,C){var U=I.ownerDocument;if(U){var L=U.createElement("style");L.textContent=C,I.appendChild(L)}},Ws=function(){function I(){}return I.getOrigin=function(C){var U=I._link;return U?(U.href=C,U.href=U.href,U.protocol+U.hostname+U.port):"about:blank"},I.isSameOrigin=function(C){return I.getOrigin(C)===I._origin},I.setContext=function(C){I._link=C.document.createElement("a"),I._origin=I.getOrigin(C.location.href)},I._origin="about:blank",I}(),qA=function(){function I(C,U){this.context=C,this._options=U,this._cache={}}return I.prototype.addImage=function(C){var U=Promise.resolve();return this.has(C)||(Fa(C)||nu(C))&&(this._cache[C]=this.loadImage(C)).catch(function(){}),U},I.prototype.match=function(C){return this._cache[C]},I.prototype.loadImage=function(C){return Ee(this,void 0,void 0,function(){var U,L,Y,ee,me=this;return ue(this,function(Se){switch(Se.label){case 0:return U=Ws.isSameOrigin(C),L=!Ua(C)&&this._options.useCORS===!0&&rn.SUPPORT_CORS_IMAGES&&!U,Y=!Ua(C)&&!U&&!Fa(C)&&typeof this._options.proxy=="string"&&rn.SUPPORT_CORS_XHR&&!L,!U&&this._options.allowTaint===!1&&!Ua(C)&&!Fa(C)&&!Y&&!L?[2]:(ee=C,Y?[4,this.proxy(ee)]:[3,2]);case 1:ee=Se.sent(),Se.label=2;case 2:return this.context.logger.debug("Added image "+C.substring(0,256)),[4,new Promise(function(Be,je){var ze=new Image;ze.onload=function(){return Be(ze)},ze.onerror=je,(iu(ee)||L)&&(ze.crossOrigin="anonymous"),ze.src=ee,ze.complete===!0&&setTimeout(function(){return Be(ze)},500),me._options.imageTimeout>0&&setTimeout(function(){return je("Timed out ("+me._options.imageTimeout+"ms) loading image")},me._options.imageTimeout)})];case 3:return[2,Se.sent()]}})})},I.prototype.has=function(C){return typeof this._cache[C]!="undefined"},I.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},I.prototype.proxy=function(C){var U=this,L=this._options.proxy;if(!L)throw new Error("No proxy defined");var Y=C.substring(0,256);return new Promise(function(ee,me){var Se=rn.SUPPORT_RESPONSE_TYPE?"blob":"text",Be=new XMLHttpRequest;Be.onload=function(){if(Be.status===200)if(Se==="text")ee(Be.response);else{var st=new FileReader;st.addEventListener("load",function(){return ee(st.result)},!1),st.addEventListener("error",function(ot){return me(ot)},!1),st.readAsDataURL(Be.response)}else me("Failed to proxy resource "+Y+" with status code "+Be.status)},Be.onerror=me;var je=L.indexOf("?")>-1?"&":"?";if(Be.open("GET",""+L+je+"url="+encodeURIComponent(C)+"&responseType="+Se),Se!=="text"&&Be instanceof XMLHttpRequest&&(Be.responseType=Se),U._options.imageTimeout){var ze=U._options.imageTimeout;Be.timeout=ze,Be.ontimeout=function(){return me("Timed out ("+ze+"ms) proxying "+Y)}}Be.send()})},I}(),eu=/^data:image\/svg\+xml/i,tu=/^data:image\/.*;base64,/i,ru=/^data:image\/.*/i,nu=function(I){return rn.SUPPORT_SVG_DRAWING||!au(I)},Ua=function(I){return ru.test(I)},iu=function(I){return tu.test(I)},Fa=function(I){return I.substr(0,4)==="blob"},au=function(I){return I.substr(-3).toLowerCase()==="svg"||eu.test(I)},Rt=function(){function I(C,U){this.type=0,this.x=C,this.y=U}return I.prototype.add=function(C,U){return new I(this.x+C,this.y+U)},I}(),ci=function(I,C,U){return new Rt(I.x+(C.x-I.x)*U,I.y+(C.y-I.y)*U)},ea=function(){function I(C,U,L,Y){this.type=1,this.start=C,this.startControl=U,this.endControl=L,this.end=Y}return I.prototype.subdivide=function(C,U){var L=ci(this.start,this.startControl,C),Y=ci(this.startControl,this.endControl,C),ee=ci(this.endControl,this.end,C),me=ci(L,Y,C),Se=ci(Y,ee,C),Be=ci(me,Se,C);return U?new I(this.start,L,me,Be):new I(Be,Se,ee,this.end)},I.prototype.add=function(C,U){return new I(this.start.add(C,U),this.startControl.add(C,U),this.endControl.add(C,U),this.end.add(C,U))},I.prototype.reverse=function(){return new I(this.end,this.endControl,this.startControl,this.start)},I}(),bn=function(I){return I.type===1},su=function(){function I(C){var U=C.styles,L=C.bounds,Y=hr(U.borderTopLeftRadius,L.width,L.height),ee=Y[0],me=Y[1],Se=hr(U.borderTopRightRadius,L.width,L.height),Be=Se[0],je=Se[1],ze=hr(U.borderBottomRightRadius,L.width,L.height),st=ze[0],ot=ze[1],Ut=hr(U.borderBottomLeftRadius,L.width,L.height),Ct=Ut[0],St=Ut[1],Xt=[];Xt.push((ee+Be)/L.width),Xt.push((Ct+st)/L.width),Xt.push((me+St)/L.height),Xt.push((je+ot)/L.height);var It=Math.max.apply(Math,Xt);It>1&&(ee/=It,me/=It,Be/=It,je/=It,st/=It,ot/=It,Ct/=It,St/=It);var Nt=L.width-Be,vr=L.height-ot,or=L.width-st,wr=L.height-St,Ft=U.borderTopWidth,br=U.borderRightWidth,Cr=U.borderBottomWidth,ar=U.borderLeftWidth,un=tr(U.paddingTop,C.bounds.width),on=tr(U.paddingRight,C.bounds.width),pn=tr(U.paddingBottom,C.bounds.width),Zr=tr(U.paddingLeft,C.bounds.width);this.topLeftBorderDoubleOuterBox=ee>0||me>0?Dr(L.left+ar/3,L.top+Ft/3,ee-ar/3,me-Ft/3,Br.TOP_LEFT):new Rt(L.left+ar/3,L.top+Ft/3),this.topRightBorderDoubleOuterBox=ee>0||me>0?Dr(L.left+Nt,L.top+Ft/3,Be-br/3,je-Ft/3,Br.TOP_RIGHT):new Rt(L.left+L.width-br/3,L.top+Ft/3),this.bottomRightBorderDoubleOuterBox=st>0||ot>0?Dr(L.left+or,L.top+vr,st-br/3,ot-Cr/3,Br.BOTTOM_RIGHT):new Rt(L.left+L.width-br/3,L.top+L.height-Cr/3),this.bottomLeftBorderDoubleOuterBox=Ct>0||St>0?Dr(L.left+ar/3,L.top+wr,Ct-ar/3,St-Cr/3,Br.BOTTOM_LEFT):new Rt(L.left+ar/3,L.top+L.height-Cr/3),this.topLeftBorderDoubleInnerBox=ee>0||me>0?Dr(L.left+ar*2/3,L.top+Ft*2/3,ee-ar*2/3,me-Ft*2/3,Br.TOP_LEFT):new Rt(L.left+ar*2/3,L.top+Ft*2/3),this.topRightBorderDoubleInnerBox=ee>0||me>0?Dr(L.left+Nt,L.top+Ft*2/3,Be-br*2/3,je-Ft*2/3,Br.TOP_RIGHT):new Rt(L.left+L.width-br*2/3,L.top+Ft*2/3),this.bottomRightBorderDoubleInnerBox=st>0||ot>0?Dr(L.left+or,L.top+vr,st-br*2/3,ot-Cr*2/3,Br.BOTTOM_RIGHT):new Rt(L.left+L.width-br*2/3,L.top+L.height-Cr*2/3),this.bottomLeftBorderDoubleInnerBox=Ct>0||St>0?Dr(L.left+ar*2/3,L.top+wr,Ct-ar*2/3,St-Cr*2/3,Br.BOTTOM_LEFT):new Rt(L.left+ar*2/3,L.top+L.height-Cr*2/3),this.topLeftBorderStroke=ee>0||me>0?Dr(L.left+ar/2,L.top+Ft/2,ee-ar/2,me-Ft/2,Br.TOP_LEFT):new Rt(L.left+ar/2,L.top+Ft/2),this.topRightBorderStroke=ee>0||me>0?Dr(L.left+Nt,L.top+Ft/2,Be-br/2,je-Ft/2,Br.TOP_RIGHT):new Rt(L.left+L.width-br/2,L.top+Ft/2),this.bottomRightBorderStroke=st>0||ot>0?Dr(L.left+or,L.top+vr,st-br/2,ot-Cr/2,Br.BOTTOM_RIGHT):new Rt(L.left+L.width-br/2,L.top+L.height-Cr/2),this.bottomLeftBorderStroke=Ct>0||St>0?Dr(L.left+ar/2,L.top+wr,Ct-ar/2,St-Cr/2,Br.BOTTOM_LEFT):new Rt(L.left+ar/2,L.top+L.height-Cr/2),this.topLeftBorderBox=ee>0||me>0?Dr(L.left,L.top,ee,me,Br.TOP_LEFT):new Rt(L.left,L.top),this.topRightBorderBox=Be>0||je>0?Dr(L.left+Nt,L.top,Be,je,Br.TOP_RIGHT):new Rt(L.left+L.width,L.top),this.bottomRightBorderBox=st>0||ot>0?Dr(L.left+or,L.top+vr,st,ot,Br.BOTTOM_RIGHT):new Rt(L.left+L.width,L.top+L.height),this.bottomLeftBorderBox=Ct>0||St>0?Dr(L.left,L.top+wr,Ct,St,Br.BOTTOM_LEFT):new Rt(L.left,L.top+L.height),this.topLeftPaddingBox=ee>0||me>0?Dr(L.left+ar,L.top+Ft,Math.max(0,ee-ar),Math.max(0,me-Ft),Br.TOP_LEFT):new Rt(L.left+ar,L.top+Ft),this.topRightPaddingBox=Be>0||je>0?Dr(L.left+Math.min(Nt,L.width-br),L.top+Ft,Nt>L.width+br?0:Math.max(0,Be-br),Math.max(0,je-Ft),Br.TOP_RIGHT):new Rt(L.left+L.width-br,L.top+Ft),this.bottomRightPaddingBox=st>0||ot>0?Dr(L.left+Math.min(or,L.width-ar),L.top+Math.min(vr,L.height-Cr),Math.max(0,st-br),Math.max(0,ot-Cr),Br.BOTTOM_RIGHT):new Rt(L.left+L.width-br,L.top+L.height-Cr),this.bottomLeftPaddingBox=Ct>0||St>0?Dr(L.left+ar,L.top+Math.min(wr,L.height-Cr),Math.max(0,Ct-ar),Math.max(0,St-Cr),Br.BOTTOM_LEFT):new Rt(L.left+ar,L.top+L.height-Cr),this.topLeftContentBox=ee>0||me>0?Dr(L.left+ar+Zr,L.top+Ft+un,Math.max(0,ee-(ar+Zr)),Math.max(0,me-(Ft+un)),Br.TOP_LEFT):new Rt(L.left+ar+Zr,L.top+Ft+un),this.topRightContentBox=Be>0||je>0?Dr(L.left+Math.min(Nt,L.width+ar+Zr),L.top+Ft+un,Nt>L.width+ar+Zr?0:Be-ar+Zr,je-(Ft+un),Br.TOP_RIGHT):new Rt(L.left+L.width-(br+on),L.top+Ft+un),this.bottomRightContentBox=st>0||ot>0?Dr(L.left+Math.min(or,L.width-(ar+Zr)),L.top+Math.min(vr,L.height+Ft+un),Math.max(0,st-(br+on)),ot-(Cr+pn),Br.BOTTOM_RIGHT):new Rt(L.left+L.width-(br+on),L.top+L.height-(Cr+pn)),this.bottomLeftContentBox=Ct>0||St>0?Dr(L.left+ar+Zr,L.top+wr,Math.max(0,Ct-(ar+Zr)),St-(Cr+pn),Br.BOTTOM_LEFT):new Rt(L.left+ar+Zr,L.top+L.height-(Cr+pn))}return I}(),Br;(function(I){I[I.TOP_LEFT=0]="TOP_LEFT",I[I.TOP_RIGHT=1]="TOP_RIGHT",I[I.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",I[I.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Br||(Br={}));var Dr=function(I,C,U,L,Y){var ee=4*((Math.sqrt(2)-1)/3),me=U*ee,Se=L*ee,Be=I+U,je=C+L;switch(Y){case Br.TOP_LEFT:return new ea(new Rt(I,je),new Rt(I,je-Se),new Rt(Be-me,C),new Rt(Be,C));case Br.TOP_RIGHT:return new ea(new Rt(I,C),new Rt(I+me,C),new Rt(Be,je-Se),new Rt(Be,je));case Br.BOTTOM_RIGHT:return new ea(new Rt(Be,C),new Rt(Be,C+Se),new Rt(I+me,je),new Rt(I,je));case Br.BOTTOM_LEFT:default:return new ea(new Rt(Be,je),new Rt(Be-me,je),new Rt(I,C+Se),new Rt(I,C))}},ta=function(I){return[I.topLeftBorderBox,I.topRightBorderBox,I.bottomRightBorderBox,I.bottomLeftBorderBox]},ou=function(I){return[I.topLeftContentBox,I.topRightContentBox,I.bottomRightContentBox,I.bottomLeftContentBox]},ra=function(I){return[I.topLeftPaddingBox,I.topRightPaddingBox,I.bottomRightPaddingBox,I.bottomLeftPaddingBox]},lu=function(){function I(C,U,L){this.offsetX=C,this.offsetY=U,this.matrix=L,this.type=0,this.target=2|4}return I}(),na=function(){function I(C,U){this.path=C,this.target=U,this.type=1}return I}(),Au=function(){function I(C){this.opacity=C,this.type=2,this.target=2|4}return I}(),uu=function(I){return I.type===0},Gs=function(I){return I.type===1},du=function(I){return I.type===2},Vs=function(I,C){return I.length===C.length?I.some(function(U,L){return U===C[L]}):!1},cu=function(I,C,U,L,Y){return I.map(function(ee,me){switch(me){case 0:return ee.add(C,U);case 1:return ee.add(C+L,U);case 2:return ee.add(C+L,U+Y);case 3:return ee.add(C,U+Y)}return ee})},zs=function(){function I(C){this.element=C,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return I}(),Xs=function(){function I(C,U){if(this.container=C,this.parent=U,this.effects=[],this.curves=new su(this.container),this.container.styles.opacity<1&&this.effects.push(new Au(this.container.styles.opacity)),this.container.styles.transform!==null){var L=this.container.bounds.left+this.container.styles.transformOrigin[0].number,Y=this.container.bounds.top+this.container.styles.transformOrigin[1].number,ee=this.container.styles.transform;this.effects.push(new lu(L,Y,ee))}if(this.container.styles.overflowX!==0){var me=ta(this.curves),Se=ra(this.curves);Vs(me,Se)?this.effects.push(new na(me,2|4)):(this.effects.push(new na(me,2)),this.effects.push(new na(Se,4)))}}return I.prototype.getEffects=function(C){for(var U=[2,3].indexOf(this.container.styles.position)===-1,L=this.parent,Y=this.effects.slice(0);L;){var ee=L.effects.filter(function(Be){return!Gs(Be)});if(U||L.container.styles.position!==0||!L.parent){if(Y.unshift.apply(Y,ee),U=[2,3].indexOf(L.container.styles.position)===-1,L.container.styles.overflowX!==0){var me=ta(L.curves),Se=ra(L.curves);Vs(me,Se)||Y.unshift(new na(Se,2|4))}}else Y.unshift.apply(Y,ee);L=L.parent}return Y.filter(function(Be){return zr(Be.target,C)})},I}(),Pa=function(I,C,U,L){I.container.elements.forEach(function(Y){var ee=zr(Y.flags,4),me=zr(Y.flags,2),Se=new Xs(Y,I);zr(Y.styles.display,2048)&&L.push(Se);var Be=zr(Y.flags,8)?[]:L;if(ee||me){var je=ee||Y.styles.isPositioned()?U:C,ze=new zs(Se);if(Y.styles.isPositioned()||Y.styles.opacity<1||Y.styles.isTransformed()){var st=Y.styles.zIndex.order;if(st<0){var ot=0;je.negativeZIndex.some(function(Ct,St){return st>Ct.element.container.styles.zIndex.order?(ot=St,!1):ot>0}),je.negativeZIndex.splice(ot,0,ze)}else if(st>0){var Ut=0;je.positiveZIndex.some(function(Ct,St){return st>=Ct.element.container.styles.zIndex.order?(Ut=St+1,!1):Ut>0}),je.positiveZIndex.splice(Ut,0,ze)}else je.zeroOrAutoZIndexOrTransformedOrOpacity.push(ze)}else Y.styles.isFloating()?je.nonPositionedFloats.push(ze):je.nonPositionedInlineLevel.push(ze);Pa(Se,ze,ee?ze:U,Be)}else Y.styles.isInlineLevel()?C.inlineLevel.push(Se):C.nonInlineLevel.push(Se),Pa(Se,C,U,Be);zr(Y.flags,8)&&Ys(Y,Be)})},Ys=function(I,C){for(var U=I instanceof xa?I.start:1,L=I instanceof xa?I.reversed:!1,Y=0;Y<C.length;Y++){var ee=C[Y];ee.container instanceof _s&&typeof ee.container.value=="number"&&ee.container.value!==0&&(U=ee.container.value),ee.listValue=Si(U,ee.container.styles.listStyleType,!0),U+=L?-1:1}},hu=function(I){var C=new Xs(I,null),U=new zs(C),L=[];return Pa(C,U,U,L),Ys(C.container,L),U},$s=function(I,C){switch(C){case 0:return wn(I.topLeftBorderBox,I.topLeftPaddingBox,I.topRightBorderBox,I.topRightPaddingBox);case 1:return wn(I.topRightBorderBox,I.topRightPaddingBox,I.bottomRightBorderBox,I.bottomRightPaddingBox);case 2:return wn(I.bottomRightBorderBox,I.bottomRightPaddingBox,I.bottomLeftBorderBox,I.bottomLeftPaddingBox);case 3:default:return wn(I.bottomLeftBorderBox,I.bottomLeftPaddingBox,I.topLeftBorderBox,I.topLeftPaddingBox)}},fu=function(I,C){switch(C){case 0:return wn(I.topLeftBorderBox,I.topLeftBorderDoubleOuterBox,I.topRightBorderBox,I.topRightBorderDoubleOuterBox);case 1:return wn(I.topRightBorderBox,I.topRightBorderDoubleOuterBox,I.bottomRightBorderBox,I.bottomRightBorderDoubleOuterBox);case 2:return wn(I.bottomRightBorderBox,I.bottomRightBorderDoubleOuterBox,I.bottomLeftBorderBox,I.bottomLeftBorderDoubleOuterBox);case 3:default:return wn(I.bottomLeftBorderBox,I.bottomLeftBorderDoubleOuterBox,I.topLeftBorderBox,I.topLeftBorderDoubleOuterBox)}},pu=function(I,C){switch(C){case 0:return wn(I.topLeftBorderDoubleInnerBox,I.topLeftPaddingBox,I.topRightBorderDoubleInnerBox,I.topRightPaddingBox);case 1:return wn(I.topRightBorderDoubleInnerBox,I.topRightPaddingBox,I.bottomRightBorderDoubleInnerBox,I.bottomRightPaddingBox);case 2:return wn(I.bottomRightBorderDoubleInnerBox,I.bottomRightPaddingBox,I.bottomLeftBorderDoubleInnerBox,I.bottomLeftPaddingBox);case 3:default:return wn(I.bottomLeftBorderDoubleInnerBox,I.bottomLeftPaddingBox,I.topLeftBorderDoubleInnerBox,I.topLeftPaddingBox)}},mu=function(I,C){switch(C){case 0:return ia(I.topLeftBorderStroke,I.topRightBorderStroke);case 1:return ia(I.topRightBorderStroke,I.bottomRightBorderStroke);case 2:return ia(I.bottomRightBorderStroke,I.bottomLeftBorderStroke);case 3:default:return ia(I.bottomLeftBorderStroke,I.topLeftBorderStroke)}},ia=function(I,C){var U=[];return bn(I)?U.push(I.subdivide(.5,!1)):U.push(I),bn(C)?U.push(C.subdivide(.5,!0)):U.push(C),U},wn=function(I,C,U,L){var Y=[];return bn(I)?Y.push(I.subdivide(.5,!1)):Y.push(I),bn(U)?Y.push(U.subdivide(.5,!0)):Y.push(U),bn(L)?Y.push(L.subdivide(.5,!0).reverse()):Y.push(L),bn(C)?Y.push(C.subdivide(.5,!1).reverse()):Y.push(C),Y},Js=function(I){var C=I.bounds,U=I.styles;return C.add(U.borderLeftWidth,U.borderTopWidth,-(U.borderRightWidth+U.borderLeftWidth),-(U.borderTopWidth+U.borderBottomWidth))},aa=function(I){var C=I.styles,U=I.bounds,L=tr(C.paddingLeft,U.width),Y=tr(C.paddingRight,U.width),ee=tr(C.paddingTop,U.width),me=tr(C.paddingBottom,U.width);return U.add(L+C.borderLeftWidth,ee+C.borderTopWidth,-(C.borderRightWidth+C.borderLeftWidth+L+Y),-(C.borderTopWidth+C.borderBottomWidth+ee+me))},gu=function(I,C){return I===0?C.bounds:I===2?aa(C):Js(C)},vu=function(I,C){return I===0?C.bounds:I===2?aa(C):Js(C)},Na=function(I,C,U){var L=gu(fi(I.styles.backgroundOrigin,C),I),Y=vu(fi(I.styles.backgroundClip,C),I),ee=yu(fi(I.styles.backgroundSize,C),U,L),me=ee[0],Se=ee[1],Be=hr(fi(I.styles.backgroundPosition,C),L.width-me,L.height-Se),je=_u(fi(I.styles.backgroundRepeat,C),Be,ee,L,Y),ze=Math.round(L.left+Be[0]),st=Math.round(L.top+Be[1]);return[je,ze,st,me,Se]},hi=function(I){return Tr(I)&&I.value===li.AUTO},sa=function(I){return typeof I=="number"},yu=function(I,C,U){var L=C[0],Y=C[1],ee=C[2],me=I[0],Se=I[1];if(!me)return[0,0];if(Hr(me)&&Se&&Hr(Se))return[tr(me,U.width),tr(Se,U.height)];var Be=sa(ee);if(Tr(me)&&(me.value===li.CONTAIN||me.value===li.COVER)){if(sa(ee)){var je=U.width/U.height;return je<ee!==(me.value===li.COVER)?[U.width,U.width/ee]:[U.height*ee,U.height]}return[U.width,U.height]}var ze=sa(L),st=sa(Y),ot=ze||st;if(hi(me)&&(!Se||hi(Se))){if(ze&&st)return[L,Y];if(!Be&&!ot)return[U.width,U.height];if(ot&&Be){var Ut=ze?L:Y*ee,Ct=st?Y:L/ee;return[Ut,Ct]}var St=ze?L:U.width,Xt=st?Y:U.height;return[St,Xt]}if(Be){var It=0,Nt=0;return Hr(me)?It=tr(me,U.width):Hr(Se)&&(Nt=tr(Se,U.height)),hi(me)?It=Nt*ee:(!Se||hi(Se))&&(Nt=It/ee),[It,Nt]}var vr=null,or=null;if(Hr(me)?vr=tr(me,U.width):Se&&Hr(Se)&&(or=tr(Se,U.height)),vr!==null&&(!Se||hi(Se))&&(or=ze&&st?vr/L*Y:U.height),or!==null&&hi(me)&&(vr=ze&&st?or/Y*L:U.width),vr!==null&&or!==null)return[vr,or];throw new Error("Unable to calculate background-size for element")},fi=function(I,C){var U=I[C];return typeof U=="undefined"?I[0]:U},_u=function(I,C,U,L,Y){var ee=C[0],me=C[1],Se=U[0],Be=U[1];switch(I){case 2:return[new Rt(Math.round(L.left),Math.round(L.top+me)),new Rt(Math.round(L.left+L.width),Math.round(L.top+me)),new Rt(Math.round(L.left+L.width),Math.round(Be+L.top+me)),new Rt(Math.round(L.left),Math.round(Be+L.top+me))];case 3:return[new Rt(Math.round(L.left+ee),Math.round(L.top)),new Rt(Math.round(L.left+ee+Se),Math.round(L.top)),new Rt(Math.round(L.left+ee+Se),Math.round(L.height+L.top)),new Rt(Math.round(L.left+ee),Math.round(L.height+L.top))];case 1:return[new Rt(Math.round(L.left+ee),Math.round(L.top+me)),new Rt(Math.round(L.left+ee+Se),Math.round(L.top+me)),new Rt(Math.round(L.left+ee+Se),Math.round(L.top+me+Be)),new Rt(Math.round(L.left+ee),Math.round(L.top+me+Be))];default:return[new Rt(Math.round(Y.left),Math.round(Y.top)),new Rt(Math.round(Y.left+Y.width),Math.round(Y.top)),new Rt(Math.round(Y.left+Y.width),Math.round(Y.height+Y.top)),new Rt(Math.round(Y.left),Math.round(Y.height+Y.top))]}},Eu="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Zs="Hidden Text",bu=function(){function I(C){this._data={},this._document=C}return I.prototype.parseMetrics=function(C,U){var L=this._document.createElement("div"),Y=this._document.createElement("img"),ee=this._document.createElement("span"),me=this._document.body;L.style.visibility="hidden",L.style.fontFamily=C,L.style.fontSize=U,L.style.margin="0",L.style.padding="0",L.style.whiteSpace="nowrap",me.appendChild(L),Y.src=Eu,Y.width=1,Y.height=1,Y.style.margin="0",Y.style.padding="0",Y.style.verticalAlign="baseline",ee.style.fontFamily=C,ee.style.fontSize=U,ee.style.margin="0",ee.style.padding="0",ee.appendChild(this._document.createTextNode(Zs)),L.appendChild(ee),L.appendChild(Y);var Se=Y.offsetTop-ee.offsetTop+2;L.removeChild(ee),L.appendChild(this._document.createTextNode(Zs)),L.style.lineHeight="normal",Y.style.verticalAlign="super";var Be=Y.offsetTop-L.offsetTop+2;return me.removeChild(L),{baseline:Se,middle:Be}},I.prototype.getMetrics=function(C,U){var L=C+" "+U;return typeof this._data[L]=="undefined"&&(this._data[L]=this.parseMetrics(C,U)),this._data[L]},I}(),qs=function(){function I(C,U){this.context=C,this.options=U}return I}(),wu=1e4,Cu=function(I){be(C,I);function C(U,L){var Y=I.call(this,U,L)||this;return Y._activeEffects=[],Y.canvas=L.canvas?L.canvas:document.createElement("canvas"),Y.ctx=Y.canvas.getContext("2d"),L.canvas||(Y.canvas.width=Math.floor(L.width*L.scale),Y.canvas.height=Math.floor(L.height*L.scale),Y.canvas.style.width=L.width+"px",Y.canvas.style.height=L.height+"px"),Y.fontMetrics=new bu(document),Y.ctx.scale(Y.options.scale,Y.options.scale),Y.ctx.translate(-L.x,-L.y),Y.ctx.textBaseline="bottom",Y._activeEffects=[],Y.context.logger.debug("Canvas renderer initialized ("+L.width+"x"+L.height+") with scale "+L.scale),Y}return C.prototype.applyEffects=function(U){for(var L=this;this._activeEffects.length;)this.popEffect();U.forEach(function(Y){return L.applyEffect(Y)})},C.prototype.applyEffect=function(U){this.ctx.save(),du(U)&&(this.ctx.globalAlpha=U.opacity),uu(U)&&(this.ctx.translate(U.offsetX,U.offsetY),this.ctx.transform(U.matrix[0],U.matrix[1],U.matrix[2],U.matrix[3],U.matrix[4],U.matrix[5]),this.ctx.translate(-U.offsetX,-U.offsetY)),Gs(U)&&(this.path(U.path),this.ctx.clip()),this._activeEffects.push(U)},C.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},C.prototype.renderStack=function(U){return Ee(this,void 0,void 0,function(){var L;return ue(this,function(Y){switch(Y.label){case 0:return L=U.element.container.styles,L.isVisible()?[4,this.renderStackContent(U)]:[3,2];case 1:Y.sent(),Y.label=2;case 2:return[2]}})})},C.prototype.renderNode=function(U){return Ee(this,void 0,void 0,function(){return ue(this,function(L){switch(L.label){case 0:if(zr(U.container.flags,16))debugger;return U.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(U)]:[3,3];case 1:return L.sent(),[4,this.renderNodeContent(U)];case 2:L.sent(),L.label=3;case 3:return[2]}})})},C.prototype.renderTextWithLetterSpacing=function(U,L,Y){var ee=this;if(L===0)this.ctx.fillText(U.text,U.bounds.left,U.bounds.top+Y);else{var me=Ca(U.text);me.reduce(function(Se,Be){return ee.ctx.fillText(Be,Se,U.bounds.top+Y),Se+ee.ctx.measureText(Be).width},U.bounds.left)}},C.prototype.createFontStyle=function(U){var L=U.fontVariant.filter(function(me){return me==="normal"||me==="small-caps"}).join(""),Y=Ru(U.fontFamily).join(", "),ee=Fn(U.fontSize)?""+U.fontSize.number+U.fontSize.unit:U.fontSize.number+"px";return[[U.fontStyle,L,U.fontWeight,ee,Y].join(" "),Y,ee]},C.prototype.renderTextNode=function(U,L){return Ee(this,void 0,void 0,function(){var Y,ee,me,Se,Be,je,ze,st,ot=this;return ue(this,function(Ut){return Y=this.createFontStyle(L),ee=Y[0],me=Y[1],Se=Y[2],this.ctx.font=ee,this.ctx.direction=L.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",Be=this.fontMetrics.getMetrics(me,Se),je=Be.baseline,ze=Be.middle,st=L.paintOrder,U.textBounds.forEach(function(Ct){st.forEach(function(St){switch(St){case 0:ot.ctx.fillStyle=Jr(L.color),ot.renderTextWithLetterSpacing(Ct,L.letterSpacing,je);var Xt=L.textShadow;Xt.length&&Ct.text.trim().length&&(Xt.slice(0).reverse().forEach(function(It){ot.ctx.shadowColor=Jr(It.color),ot.ctx.shadowOffsetX=It.offsetX.number*ot.options.scale,ot.ctx.shadowOffsetY=It.offsetY.number*ot.options.scale,ot.ctx.shadowBlur=It.blur.number,ot.renderTextWithLetterSpacing(Ct,L.letterSpacing,je)}),ot.ctx.shadowColor="",ot.ctx.shadowOffsetX=0,ot.ctx.shadowOffsetY=0,ot.ctx.shadowBlur=0),L.textDecorationLine.length&&(ot.ctx.fillStyle=Jr(L.textDecorationColor||L.color),L.textDecorationLine.forEach(function(It){switch(It){case 1:ot.ctx.fillRect(Ct.bounds.left,Math.round(Ct.bounds.top+je),Ct.bounds.width,1);break;case 2:ot.ctx.fillRect(Ct.bounds.left,Math.round(Ct.bounds.top),Ct.bounds.width,1);break;case 3:ot.ctx.fillRect(Ct.bounds.left,Math.ceil(Ct.bounds.top+ze),Ct.bounds.width,1);break}}));break;case 1:L.webkitTextStrokeWidth&&Ct.text.trim().length&&(ot.ctx.strokeStyle=Jr(L.webkitTextStrokeColor),ot.ctx.lineWidth=L.webkitTextStrokeWidth,ot.ctx.lineJoin=window.chrome?"miter":"round",ot.ctx.strokeText(Ct.text,Ct.bounds.left,Ct.bounds.top+je)),ot.ctx.strokeStyle="",ot.ctx.lineWidth=0,ot.ctx.lineJoin="miter";break}})}),[2]})})},C.prototype.renderReplacedElement=function(U,L,Y){if(Y&&U.intrinsicWidth>0&&U.intrinsicHeight>0){var ee=aa(U),me=ra(L);this.path(me),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(Y,0,0,U.intrinsicWidth,U.intrinsicHeight,ee.left,ee.top,ee.width,ee.height),this.ctx.restore()}},C.prototype.renderNodeContent=function(U){return Ee(this,void 0,void 0,function(){var L,Y,ee,me,Se,Be,je,je,ze,st,ot,Ut,Ct,St,Xt,It,Nt,vr,or,je,wr,Ct,It;return ue(this,function(Ft){switch(Ft.label){case 0:this.applyEffects(U.getEffects(4)),L=U.container,Y=U.curves,ee=L.styles,me=0,Se=L.textNodes,Ft.label=1;case 1:return me<Se.length?(Be=Se[me],[4,this.renderTextNode(Be,ee)]):[3,4];case 2:Ft.sent(),Ft.label=3;case 3:return me++,[3,1];case 4:if(!(L instanceof gs))return[3,8];Ft.label=5;case 5:return Ft.trys.push([5,7,,8]),[4,this.context.cache.match(L.src)];case 6:return je=Ft.sent(),this.renderReplacedElement(L,Y,je),[3,8];case 7:return Ft.sent(),this.context.logger.error("Error loading image "+L.src),[3,8];case 8:if(L instanceof vs&&this.renderReplacedElement(L,Y,L.canvas),!(L instanceof ys))return[3,12];Ft.label=9;case 9:return Ft.trys.push([9,11,,12]),[4,this.context.cache.match(L.svg)];case 10:return je=Ft.sent(),this.renderReplacedElement(L,Y,je),[3,12];case 11:return Ft.sent(),this.context.logger.error("Error loading svg "+L.svg.substring(0,255)),[3,12];case 12:return L instanceof Cs&&L.tree?(ze=new C(this.context,{scale:this.options.scale,backgroundColor:L.backgroundColor,x:0,y:0,width:L.width,height:L.height}),[4,ze.render(L.tree)]):[3,14];case 13:st=Ft.sent(),L.width&&L.height&&this.ctx.drawImage(st,0,0,L.width,L.height,L.bounds.left,L.bounds.top,L.bounds.width,L.bounds.height),Ft.label=14;case 14:if(L instanceof Ta&&(ot=Math.min(L.bounds.width,L.bounds.height),L.type===Xi?L.checked&&(this.ctx.save(),this.path([new Rt(L.bounds.left+ot*.39363,L.bounds.top+ot*.79),new Rt(L.bounds.left+ot*.16,L.bounds.top+ot*.5549),new Rt(L.bounds.left+ot*.27347,L.bounds.top+ot*.44071),new Rt(L.bounds.left+ot*.39694,L.bounds.top+ot*.5649),new Rt(L.bounds.left+ot*.72983,L.bounds.top+ot*.23),new Rt(L.bounds.left+ot*.84,L.bounds.top+ot*.34085),new Rt(L.bounds.left+ot*.39363,L.bounds.top+ot*.79)]),this.ctx.fillStyle=Jr(Es),this.ctx.fill(),this.ctx.restore()):L.type===Yi&&(L.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(L.bounds.left+ot/2,L.bounds.top+ot/2,ot/4,0,Math.PI*2,!0),this.ctx.fillStyle=Jr(Es),this.ctx.fill(),this.ctx.restore()))),xu(L)&&L.value.length){Ut=this.createFontStyle(ee),Ct=Ut[0],St=Ut[1],Xt=this.fontMetrics.getMetrics(Ct,St).baseline,this.ctx.font=Ct,this.ctx.fillStyle=Jr(ee.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Bu(L.styles.textAlign),It=aa(L),Nt=0;switch(L.styles.textAlign){case 1:Nt+=It.width/2;break;case 2:Nt+=It.width;break}vr=It.add(Nt,0,0,-It.height/2+1),this.ctx.save(),this.path([new Rt(It.left,It.top),new Rt(It.left+It.width,It.top),new Rt(It.left+It.width,It.top+It.height),new Rt(It.left,It.top+It.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Ti(L.value,vr),ee.letterSpacing,Xt),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!zr(L.styles.display,2048))return[3,20];if(!(L.styles.listStyleImage!==null))return[3,19];if(or=L.styles.listStyleImage,!(or.type===0))return[3,18];je=void 0,wr=or.url,Ft.label=15;case 15:return Ft.trys.push([15,17,,18]),[4,this.context.cache.match(wr)];case 16:return je=Ft.sent(),this.ctx.drawImage(je,L.bounds.left-(je.width+10),L.bounds.top),[3,18];case 17:return Ft.sent(),this.context.logger.error("Error loading list-style-image "+wr),[3,18];case 18:return[3,20];case 19:U.listValue&&L.styles.listStyleType!==-1&&(Ct=this.createFontStyle(ee)[0],this.ctx.font=Ct,this.ctx.fillStyle=Jr(ee.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",It=new O(L.bounds.left,L.bounds.top+tr(L.styles.paddingTop,L.bounds.width),L.bounds.width,Za(ee.lineHeight,ee.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Ti(U.listValue,It),ee.letterSpacing,Za(ee.lineHeight,ee.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),Ft.label=20;case 20:return[2]}})})},C.prototype.renderStackContent=function(U){return Ee(this,void 0,void 0,function(){var L,Y,ee,me,Se,ee,Be,je,ee,ze,st,ee,ot,Ut,ee,Ct,St,ee,Xt,It,ee;return ue(this,function(Nt){switch(Nt.label){case 0:if(zr(U.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(U.element)];case 1:Nt.sent(),L=0,Y=U.negativeZIndex,Nt.label=2;case 2:return L<Y.length?(ee=Y[L],[4,this.renderStack(ee)]):[3,5];case 3:Nt.sent(),Nt.label=4;case 4:return L++,[3,2];case 5:return[4,this.renderNodeContent(U.element)];case 6:Nt.sent(),me=0,Se=U.nonInlineLevel,Nt.label=7;case 7:return me<Se.length?(ee=Se[me],[4,this.renderNode(ee)]):[3,10];case 8:Nt.sent(),Nt.label=9;case 9:return me++,[3,7];case 10:Be=0,je=U.nonPositionedFloats,Nt.label=11;case 11:return Be<je.length?(ee=je[Be],[4,this.renderStack(ee)]):[3,14];case 12:Nt.sent(),Nt.label=13;case 13:return Be++,[3,11];case 14:ze=0,st=U.nonPositionedInlineLevel,Nt.label=15;case 15:return ze<st.length?(ee=st[ze],[4,this.renderStack(ee)]):[3,18];case 16:Nt.sent(),Nt.label=17;case 17:return ze++,[3,15];case 18:ot=0,Ut=U.inlineLevel,Nt.label=19;case 19:return ot<Ut.length?(ee=Ut[ot],[4,this.renderNode(ee)]):[3,22];case 20:Nt.sent(),Nt.label=21;case 21:return ot++,[3,19];case 22:Ct=0,St=U.zeroOrAutoZIndexOrTransformedOrOpacity,Nt.label=23;case 23:return Ct<St.length?(ee=St[Ct],[4,this.renderStack(ee)]):[3,26];case 24:Nt.sent(),Nt.label=25;case 25:return Ct++,[3,23];case 26:Xt=0,It=U.positiveZIndex,Nt.label=27;case 27:return Xt<It.length?(ee=It[Xt],[4,this.renderStack(ee)]):[3,30];case 28:Nt.sent(),Nt.label=29;case 29:return Xt++,[3,27];case 30:return[2]}})})},C.prototype.mask=function(U){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(U.slice(0).reverse()),this.ctx.closePath()},C.prototype.path=function(U){this.ctx.beginPath(),this.formatPath(U),this.ctx.closePath()},C.prototype.formatPath=function(U){var L=this;U.forEach(function(Y,ee){var me=bn(Y)?Y.start:Y;ee===0?L.ctx.moveTo(me.x,me.y):L.ctx.lineTo(me.x,me.y),bn(Y)&&L.ctx.bezierCurveTo(Y.startControl.x,Y.startControl.y,Y.endControl.x,Y.endControl.y,Y.end.x,Y.end.y)})},C.prototype.renderRepeat=function(U,L,Y,ee){this.path(U),this.ctx.fillStyle=L,this.ctx.translate(Y,ee),this.ctx.fill(),this.ctx.translate(-Y,-ee)},C.prototype.resizeImage=function(U,L,Y){var ee;if(U.width===L&&U.height===Y)return U;var me=(ee=this.canvas.ownerDocument)!==null&&ee!==void 0?ee:document,Se=me.createElement("canvas");Se.width=Math.max(1,L),Se.height=Math.max(1,Y);var Be=Se.getContext("2d");return Be.drawImage(U,0,0,U.width,U.height,0,0,L,Y),Se},C.prototype.renderBackgroundImage=function(U){return Ee(this,void 0,void 0,function(){var L,Y,ee,me,Se,Be;return ue(this,function(je){switch(je.label){case 0:L=U.styles.backgroundImage.length-1,Y=function(ze){var st,ot,Ut,Ct,St,Xt,It,Nt,vr,or,Ct,St,Xt,It,Nt,wr,Ft,br,Cr,ar,un,on,pn,Zr,vr,Dn,Ct,zn,Xn,It,Nt,Yn,St,Xt,ti,Un,$n,ri,ni,kn,ii,Mn;return ue(this,function(pi){switch(pi.label){case 0:if(!(ze.type===0))return[3,5];st=void 0,ot=ze.url,pi.label=1;case 1:return pi.trys.push([1,3,,4]),[4,ee.context.cache.match(ot)];case 2:return st=pi.sent(),[3,4];case 3:return pi.sent(),ee.context.logger.error("Error loading background-image "+ot),[3,4];case 4:return st&&(Ut=Na(U,L,[st.width,st.height,st.width/st.height]),Ct=Ut[0],St=Ut[1],Xt=Ut[2],It=Ut[3],Nt=Ut[4],vr=ee.ctx.createPattern(ee.resizeImage(st,It,Nt),"repeat"),ee.renderRepeat(Ct,vr,St,Xt)),[3,6];case 5:Ao(ze)?(or=Na(U,L,[null,null,null]),Ct=or[0],St=or[1],Xt=or[2],It=or[3],Nt=or[4],wr=io(ze.angle,It,Nt),Ft=wr[0],br=wr[1],Cr=wr[2],ar=wr[3],un=wr[4],on=document.createElement("canvas"),on.width=It,on.height=Nt,pn=on.getContext("2d"),Zr=pn.createLinearGradient(br,ar,Cr,un),Qa(ze.stops,Ft).forEach(function(Ii){return Zr.addColorStop(Ii.stop,Jr(Ii.color))}),pn.fillStyle=Zr,pn.fillRect(0,0,It,Nt),It>0&&Nt>0&&(vr=ee.ctx.createPattern(on,"repeat"),ee.renderRepeat(Ct,vr,St,Xt))):uo(ze)&&(Dn=Na(U,L,[null,null,null]),Ct=Dn[0],zn=Dn[1],Xn=Dn[2],It=Dn[3],Nt=Dn[4],Yn=ze.position.length===0?[Ei]:ze.position,St=tr(Yn[0],It),Xt=tr(Yn[Yn.length-1],Nt),ti=ao(ze,St,Xt,It,Nt),Un=ti[0],$n=ti[1],Un>0&&$n>0&&(ri=ee.ctx.createRadialGradient(zn+St,Xn+Xt,0,zn+St,Xn+Xt,Un),Qa(ze.stops,Un*2).forEach(function(Ii){return ri.addColorStop(Ii.stop,Jr(Ii.color))}),ee.path(Ct),ee.ctx.fillStyle=ri,Un!==$n?(ni=U.bounds.left+.5*U.bounds.width,kn=U.bounds.top+.5*U.bounds.height,ii=$n/Un,Mn=1/ii,ee.ctx.save(),ee.ctx.translate(ni,kn),ee.ctx.transform(1,0,0,ii,0,0),ee.ctx.translate(-ni,-kn),ee.ctx.fillRect(zn,Mn*(Xn-kn)+kn,It,Nt*Mn),ee.ctx.restore()):ee.ctx.fill())),pi.label=6;case 6:return L--,[2]}})},ee=this,me=0,Se=U.styles.backgroundImage.slice(0).reverse(),je.label=1;case 1:return me<Se.length?(Be=Se[me],[5,Y(Be)]):[3,4];case 2:je.sent(),je.label=3;case 3:return me++,[3,1];case 4:return[2]}})})},C.prototype.renderSolidBorder=function(U,L,Y){return Ee(this,void 0,void 0,function(){return ue(this,function(ee){return this.path($s(Y,L)),this.ctx.fillStyle=Jr(U),this.ctx.fill(),[2]})})},C.prototype.renderDoubleBorder=function(U,L,Y,ee){return Ee(this,void 0,void 0,function(){var me,Se;return ue(this,function(Be){switch(Be.label){case 0:return L<3?[4,this.renderSolidBorder(U,Y,ee)]:[3,2];case 1:return Be.sent(),[2];case 2:return me=fu(ee,Y),this.path(me),this.ctx.fillStyle=Jr(U),this.ctx.fill(),Se=pu(ee,Y),this.path(Se),this.ctx.fill(),[2]}})})},C.prototype.renderNodeBackgroundAndBorders=function(U){return Ee(this,void 0,void 0,function(){var L,Y,ee,me,Se,Be,je,ze,st=this;return ue(this,function(ot){switch(ot.label){case 0:return this.applyEffects(U.getEffects(2)),L=U.container.styles,Y=!jn(L.backgroundColor)||L.backgroundImage.length,ee=[{style:L.borderTopStyle,color:L.borderTopColor,width:L.borderTopWidth},{style:L.borderRightStyle,color:L.borderRightColor,width:L.borderRightWidth},{style:L.borderBottomStyle,color:L.borderBottomColor,width:L.borderBottomWidth},{style:L.borderLeftStyle,color:L.borderLeftColor,width:L.borderLeftWidth}],me=Tu(fi(L.backgroundClip,0),U.curves),Y||L.boxShadow.length?(this.ctx.save(),this.path(me),this.ctx.clip(),jn(L.backgroundColor)||(this.ctx.fillStyle=Jr(L.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(U.container)]):[3,2];case 1:ot.sent(),this.ctx.restore(),L.boxShadow.slice(0).reverse().forEach(function(Ut){st.ctx.save();var Ct=ta(U.curves),St=Ut.inset?0:wu,Xt=cu(Ct,-St+(Ut.inset?1:-1)*Ut.spread.number,(Ut.inset?1:-1)*Ut.spread.number,Ut.spread.number*(Ut.inset?-2:2),Ut.spread.number*(Ut.inset?-2:2));Ut.inset?(st.path(Ct),st.ctx.clip(),st.mask(Xt)):(st.mask(Ct),st.ctx.clip(),st.path(Xt)),st.ctx.shadowOffsetX=Ut.offsetX.number+St,st.ctx.shadowOffsetY=Ut.offsetY.number,st.ctx.shadowColor=Jr(Ut.color),st.ctx.shadowBlur=Ut.blur.number,st.ctx.fillStyle=Ut.inset?Jr(Ut.color):"rgba(0,0,0,1)",st.ctx.fill(),st.ctx.restore()}),ot.label=2;case 2:Se=0,Be=0,je=ee,ot.label=3;case 3:return Be<je.length?(ze=je[Be],ze.style!==0&&!jn(ze.color)&&ze.width>0?ze.style===2?[4,this.renderDashedDottedBorder(ze.color,ze.width,Se,U.curves,2)]:[3,5]:[3,11]):[3,13];case 4:return ot.sent(),[3,11];case 5:return ze.style===3?[4,this.renderDashedDottedBorder(ze.color,ze.width,Se,U.curves,3)]:[3,7];case 6:return ot.sent(),[3,11];case 7:return ze.style===4?[4,this.renderDoubleBorder(ze.color,ze.width,Se,U.curves)]:[3,9];case 8:return ot.sent(),[3,11];case 9:return[4,this.renderSolidBorder(ze.color,Se,U.curves)];case 10:ot.sent(),ot.label=11;case 11:Se++,ot.label=12;case 12:return Be++,[3,3];case 13:return[2]}})})},C.prototype.renderDashedDottedBorder=function(U,L,Y,ee,me){return Ee(this,void 0,void 0,function(){var Se,Be,je,ze,st,ot,Ut,Ct,St,Xt,It,Nt,vr,or,wr,Ft,wr,Ft;return ue(this,function(br){return this.ctx.save(),Se=mu(ee,Y),Be=$s(ee,Y),me===2&&(this.path(Be),this.ctx.clip()),bn(Be[0])?(je=Be[0].start.x,ze=Be[0].start.y):(je=Be[0].x,ze=Be[0].y),bn(Be[1])?(st=Be[1].end.x,ot=Be[1].end.y):(st=Be[1].x,ot=Be[1].y),Y===0||Y===2?Ut=Math.abs(je-st):Ut=Math.abs(ze-ot),this.ctx.beginPath(),me===3?this.formatPath(Se):this.formatPath(Be.slice(0,2)),Ct=L<3?L*3:L*2,St=L<3?L*2:L,me===3&&(Ct=L,St=L),Xt=!0,Ut<=Ct*2?Xt=!1:Ut<=Ct*2+St?(It=Ut/(2*Ct+St),Ct*=It,St*=It):(Nt=Math.floor((Ut+St)/(Ct+St)),vr=(Ut-Nt*Ct)/(Nt-1),or=(Ut-(Nt+1)*Ct)/Nt,St=or<=0||Math.abs(St-vr)<Math.abs(St-or)?vr:or),Xt&&(me===3?this.ctx.setLineDash([0,Ct+St]):this.ctx.setLineDash([Ct,St])),me===3?(this.ctx.lineCap="round",this.ctx.lineWidth=L):this.ctx.lineWidth=L*2+1.1,this.ctx.strokeStyle=Jr(U),this.ctx.stroke(),this.ctx.setLineDash([]),me===2&&(bn(Be[0])&&(wr=Be[3],Ft=Be[0],this.ctx.beginPath(),this.formatPath([new Rt(wr.end.x,wr.end.y),new Rt(Ft.start.x,Ft.start.y)]),this.ctx.stroke()),bn(Be[1])&&(wr=Be[1],Ft=Be[2],this.ctx.beginPath(),this.formatPath([new Rt(wr.end.x,wr.end.y),new Rt(Ft.start.x,Ft.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},C.prototype.render=function(U){return Ee(this,void 0,void 0,function(){var L;return ue(this,function(Y){switch(Y.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Jr(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),L=hu(U),[4,this.renderStack(L)];case 1:return Y.sent(),this.applyEffects([]),[2,this.canvas]}})})},C}(qs),xu=function(I){return I instanceof ws||I instanceof bs?!0:I instanceof Ta&&I.type!==Yi&&I.type!==Xi},Tu=function(I,C){switch(I){case 0:return ta(C);case 2:return ou(C);case 1:default:return ra(C)}},Bu=function(I){switch(I){case 1:return"center";case 2:return"right";case 0:default:return"left"}},Su=["-apple-system","system-ui"],Ru=function(I){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?I.filter(function(C){return Su.indexOf(C)===-1}):I},Iu=function(I){be(C,I);function C(U,L){var Y=I.call(this,U,L)||this;return Y.canvas=L.canvas?L.canvas:document.createElement("canvas"),Y.ctx=Y.canvas.getContext("2d"),Y.options=L,Y.canvas.width=Math.floor(L.width*L.scale),Y.canvas.height=Math.floor(L.height*L.scale),Y.canvas.style.width=L.width+"px",Y.canvas.style.height=L.height+"px",Y.ctx.scale(Y.options.scale,Y.options.scale),Y.ctx.translate(-L.x,-L.y),Y.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+L.width+"x"+L.height+" at "+L.x+","+L.y+") with scale "+L.scale),Y}return C.prototype.render=function(U){return Ee(this,void 0,void 0,function(){var L,Y;return ue(this,function(ee){switch(ee.label){case 0:return L=wa(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,U),[4,Ou(L)];case 1:return Y=ee.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Jr(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(Y,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},C}(qs),Ou=function(I){return new Promise(function(C,U){var L=new Image;L.onload=function(){C(L)},L.onerror=U,L.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(I))})},Lu=function(){function I(C){var U=C.id,L=C.enabled;this.id=U,this.enabled=L,this.start=Date.now()}return I.prototype.debug=function(){for(var C=[],U=0;U<arguments.length;U++)C[U]=arguments[U];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,$([this.id,this.getTime()+"ms"],C)):this.info.apply(this,C))},I.prototype.getTime=function(){return Date.now()-this.start},I.prototype.info=function(){for(var C=[],U=0;U<arguments.length;U++)C[U]=arguments[U];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,$([this.id,this.getTime()+"ms"],C)))},I.prototype.warn=function(){for(var C=[],U=0;U<arguments.length;U++)C[U]=arguments[U];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,$([this.id,this.getTime()+"ms"],C)):this.info.apply(this,C))},I.prototype.error=function(){for(var C=[],U=0;U<arguments.length;U++)C[U]=arguments[U];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,$([this.id,this.getTime()+"ms"],C)):this.info.apply(this,C))},I.instances={},I}(),Du=function(){function I(C,U){var L;this.windowBounds=U,this.instanceName="#"+I.instanceCount++,this.logger=new Lu({id:this.instanceName,enabled:C.logging}),this.cache=(L=C.cache)!==null&&L!==void 0?L:new qA(this,C)}return I.instanceCount=1,I}(),Uu=function(I,C){return C===void 0&&(C={}),Fu(I,C)};typeof window!="undefined"&&Ws.setContext(window);var Fu=function(I,C){return Ee(void 0,void 0,void 0,function(){var U,L,Y,ee,me,Se,Be,je,ze,st,ot,Ut,Ct,St,Xt,It,Nt,vr,or,wr,Ft,br,Ft,Cr,ar,un,on,pn,Zr,Dn,zn,Xn,Yn,ti,Un,$n,ri,ni,kn,ii;return ue(this,function(Mn){switch(Mn.label){case 0:if(!I||typeof I!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(U=I.ownerDocument,!U)throw new Error("Element is not attached to a Document");if(L=U.defaultView,!L)throw new Error("Document is not attached to a Window");return Y={allowTaint:(Cr=C.allowTaint)!==null&&Cr!==void 0?Cr:!1,imageTimeout:(ar=C.imageTimeout)!==null&&ar!==void 0?ar:15e3,proxy:C.proxy,useCORS:(un=C.useCORS)!==null&&un!==void 0?un:!1},ee=ve({logging:(on=C.logging)!==null&&on!==void 0?on:!0,cache:C.cache},Y),me={windowWidth:(pn=C.windowWidth)!==null&&pn!==void 0?pn:L.innerWidth,windowHeight:(Zr=C.windowHeight)!==null&&Zr!==void 0?Zr:L.innerHeight,scrollX:(Dn=C.scrollX)!==null&&Dn!==void 0?Dn:L.pageXOffset,scrollY:(zn=C.scrollY)!==null&&zn!==void 0?zn:L.pageYOffset},Se=new O(me.scrollX,me.scrollY,me.windowWidth,me.windowHeight),Be=new Du(ee,Se),je=(Xn=C.foreignObjectRendering)!==null&&Xn!==void 0?Xn:!1,ze={allowTaint:(Yn=C.allowTaint)!==null&&Yn!==void 0?Yn:!1,onclone:C.onclone,ignoreElements:C.ignoreElements,inlineImages:je,copyStyles:je},Be.logger.debug("Starting document clone with size "+Se.width+"x"+Se.height+" scrolled to "+-Se.left+","+-Se.top),st=new Ks(Be,I,ze),ot=st.clonedReferenceElement,ot?[4,st.toIFrame(U,Se)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return Ut=Mn.sent(),Ct=Sa(ot)||PA(ot)?e(ot.ownerDocument):H(Be,ot),St=Ct.width,Xt=Ct.height,It=Ct.left,Nt=Ct.top,vr=Pu(Be,ot,C.backgroundColor),or={canvas:C.canvas,backgroundColor:vr,scale:(Un=(ti=C.scale)!==null&&ti!==void 0?ti:L.devicePixelRatio)!==null&&Un!==void 0?Un:1,x:(($n=C.x)!==null&&$n!==void 0?$n:0)+It,y:((ri=C.y)!==null&&ri!==void 0?ri:0)+Nt,width:(ni=C.width)!==null&&ni!==void 0?ni:Math.ceil(St),height:(kn=C.height)!==null&&kn!==void 0?kn:Math.ceil(Xt)},je?(Be.logger.debug("Document cloned, using foreign object rendering"),Ft=new Iu(Be,or),[4,Ft.render(ot)]):[3,3];case 2:return wr=Mn.sent(),[3,5];case 3:return Be.logger.debug("Document cloned, element located at "+It+","+Nt+" with size "+St+"x"+Xt+" using computed rendering"),Be.logger.debug("Starting DOM parsing"),br=Ts(Be,ot),vr===br.styles.backgroundColor&&(br.styles.backgroundColor=Pn.TRANSPARENT),Be.logger.debug("Starting renderer for element at "+or.x+","+or.y+" with size "+or.width+"x"+or.height),Ft=new Cu(Be,or),[4,Ft.render(br)];case 4:wr=Mn.sent(),Mn.label=5;case 5:return((ii=C.removeContainer)!==null&&ii!==void 0?ii:!0)&&(Ks.destroy(Ut)||Be.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),Be.logger.debug("Finished rendering"),[2,wr]}})})},Pu=function(I,C,U){var L=C.ownerDocument,Y=L.documentElement?wi(I,getComputedStyle(L.documentElement).backgroundColor):Pn.TRANSPARENT,ee=L.body?wi(I,getComputedStyle(L.body).backgroundColor):Pn.TRANSPARENT,me=typeof U=="string"?wi(I,U):U===null?Pn.TRANSPARENT:4294967295;return C===L.documentElement?jn(Y)?jn(ee)?me:ee:Y:me};return Uu})},wx14:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return he});function he(){return he=Object.assign?Object.assign.bind():function(be){for(var ve=1;ve<arguments.length;ve++){var Ee=arguments[ve];for(var ue in Ee)Object.prototype.hasOwnProperty.call(Ee,ue)&&(be[ue]=Ee[ue])}return be},he.apply(this,arguments)}},"x/L2":function(dt,_e,Q){"use strict";var he=Q("yuO0"),be=Q("XjgL"),ve=Q("6ASS"),Ee=Q("fNpE"),ue=Q("36hc"),$=Q("kxoy"),O=Q("T/Jt"),H=Q.n(O),e=Q("27eb"),M=Q.n(e),D=Q("1HCi"),N=Q.n(D),c=Q("Eiay"),l=Q("5Und"),s=Q("MRIS"),h=Q("QOAJ"),x=Q("ynYK"),E=Q("B/uU"),v=Q("VbWF"),d=Q("U+Vu"),m=["colSpan","rowSpan","style","className"];function g(o,r,a,n){var t=o+r-1;return o<=n&&t>=a}function S(o){return o&&Object($.a)(o)==="object"&&!Array.isArray(o)&&!O.isValidElement(o)}function A(o){return typeof o=="string"?!0:Object(c.c)(o)}var u=function(r){var a=r.ellipsis,n=r.rowType,t=r.children,p,_=a===!0?{showTitle:!0}:a;return _&&(_.showTitle||n==="header")&&(typeof t=="string"||typeof t=="number"?p=t.toString():O.isValidElement(t)&&typeof t.props.children=="string"&&(p=t.props.children)),p};function R(o,r){var a,n,t,p=o.prefixCls,_=o.className,f=o.record,F=o.index,P=o.renderIndex,W=o.dataIndex,V=o.render,J=o.children,ne=o.component,ce=ne===void 0?"td":ne,ie=o.colSpan,xe=o.rowSpan,ge=o.fixLeft,de=o.fixRight,Fe=o.firstFixLeft,Qe=o.lastFixLeft,Ve=o.firstFixRight,Ne=o.lastFixRight,Ue=o.appendNode,q=o.additionalProps,k=q===void 0?{}:q,z=o.ellipsis,X=o.align,re=o.rowType,te=o.isSticky,ae=o.hovering,ye=o.onHover,Le="".concat(p,"-cell"),Pe=O.useContext(v.a),ke=O.useContext(s.a),Je=O.useContext(x.a),qe=Je.allColumnsFixedLeft,it=O.useMemo(function(){if(Object(l.c)(J))return[J];var Ze=Object(l.b)(f,W),yt=Ze,lt=void 0;if(V){var gt=V(Ze,f,P);S(gt)?(yt=gt.children,lt=gt.props,Pe.renderWithProps=!0):yt=gt}return[yt,lt]},[Pe.renderWithProps?Math.random():0,J,W,Pe,f,V,P]),rt=Object(ue.a)(it,2),et=rt[0],At=rt[1],We=et;Object($.a)(We)==="object"&&!Array.isArray(We)&&!O.isValidElement(We)&&(We=null),z&&(Qe||Ve)&&(We=O.createElement("span",{className:"".concat(Le,"-content")},We));var Ge=At||{},De=Ge.colSpan,Te=Ge.rowSpan,Oe=Ge.style,le=Ge.className,fe=Object(Ee.a)(Ge,m),Ce=(a=De!==void 0?De:ie)!==null&&a!==void 0?a:1,we=(n=Te!==void 0?Te:xe)!==null&&n!==void 0?n:1;if(Ce===0||we===0)return null;var Me={},$e=typeof ge=="number"&&ke,Ie=typeof de=="number"&&ke;$e&&(Me.position="sticky",Me.left=ge),Ie&&(Me.position="sticky",Me.right=de);var Ye={};X&&(Ye.textAlign=X);var tt=function(yt){var lt;f&&ye(F,F+we-1),k==null||((lt=k.onMouseEnter)===null||lt===void 0)||lt.call(k,yt)},at=function(yt){var lt;f&&ye(-1,-1),k==null||((lt=k.onMouseLeave)===null||lt===void 0)||lt.call(k,yt)},mt=u({rowType:re,ellipsis:z,children:et}),ft=Object(ve.a)(Object(ve.a)(Object(ve.a)({title:mt},fe),k),{},{colSpan:Ce!==1?Ce:null,rowSpan:we!==1?we:null,className:M()(Le,_,(t={},Object(be.a)(t,"".concat(Le,"-fix-left"),$e&&ke),Object(be.a)(t,"".concat(Le,"-fix-left-first"),Fe&&ke),Object(be.a)(t,"".concat(Le,"-fix-left-last"),Qe&&ke),Object(be.a)(t,"".concat(Le,"-fix-left-all"),Qe&&qe&&ke),Object(be.a)(t,"".concat(Le,"-fix-right"),Ie&&ke),Object(be.a)(t,"".concat(Le,"-fix-right-first"),Ve&&ke),Object(be.a)(t,"".concat(Le,"-fix-right-last"),Ne&&ke),Object(be.a)(t,"".concat(Le,"-ellipsis"),z),Object(be.a)(t,"".concat(Le,"-with-append"),Ue),Object(be.a)(t,"".concat(Le,"-fix-sticky"),($e||Ie)&&te&&ke),Object(be.a)(t,"".concat(Le,"-row-hover"),!At&&ae),t),k.className,le),style:Object(ve.a)(Object(ve.a)(Object(ve.a)(Object(ve.a)({},k.style),Ye),Me),Oe),onMouseEnter:tt,onMouseLeave:at,ref:A(ce)?r:null});return O.createElement(ce,ft,Ue,We)}var i=O.forwardRef(R);i.displayName="Cell";var T=["expanded","className","hovering"],w=O.memo(i,function(o,r){return r.shouldCellUpdate?T.every(function(a){return o[a]===r[a]})&&!r.shouldCellUpdate(r.record,o.record):N()(o,r)}),y=O.forwardRef(function(o,r){var a=o.index,n=o.additionalProps,t=n===void 0?{}:n,p=o.colSpan,_=o.rowSpan,f=t.colSpan,F=t.rowSpan,P=p!=null?p:f,W=_!=null?_:F,V=Object(d.b)(h.a,function(ce){var ie=g(a,W||1,ce==null?void 0:ce.startRow,ce==null?void 0:ce.endRow);return{onHover:ce==null?void 0:ce.onHover,hovering:ie}}),J=V.onHover,ne=V.hovering;return O.createElement(w,Object(he.a)({},o,{colSpan:P,rowSpan:W,hovering:ne,ref:r,onHover:J}))});y.displayName="WrappedCell",_e.a=y},xYGA:function(dt,_e,Q){"use strict";Q.r(_e),Q.d(_e,"ResizableTextArea",function(){return w});var he=Q("yuO0"),be=Q("eA01"),ve=Q("fXDJ"),Ee=Q("BPTR"),ue=Q("udol"),$=Q("T/Jt"),O=Q("XjgL"),H=Q("6ASS"),e=Q("kxoy"),M=Q("36hc"),D=Q("fNpE"),N=Q("s3yx"),c=Q("s7W6"),l=Q("IRwA"),s=Q("8wWb"),h=Q("27eb"),x=Q.n(h),E=`
|
|
min-height:0 !important;
|
|
max-height:none !important;
|
|
height:0 !important;
|
|
visibility:hidden !important;
|
|
overflow:hidden !important;
|
|
position:absolute !important;
|
|
z-index:-1000 !important;
|
|
top:0 !important;
|
|
right:0 !important;
|
|
pointer-events: none !important;
|
|
`,v=["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"],d={},m;function g(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=r.getAttribute("id")||r.getAttribute("data-reactid")||r.getAttribute("name");if(a&&d[n])return d[n];var t=window.getComputedStyle(r),p=t.getPropertyValue("box-sizing")||t.getPropertyValue("-moz-box-sizing")||t.getPropertyValue("-webkit-box-sizing"),_=parseFloat(t.getPropertyValue("padding-bottom"))+parseFloat(t.getPropertyValue("padding-top")),f=parseFloat(t.getPropertyValue("border-bottom-width"))+parseFloat(t.getPropertyValue("border-top-width")),F=v.map(function(W){return"".concat(W,":").concat(t.getPropertyValue(W))}).join(";"),P={sizingStyle:F,paddingSize:_,borderSize:f,boxSizing:p};return a&&n&&(d[n]=P),P}function S(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;m||(m=document.createElement("textarea"),m.setAttribute("tab-index","-1"),m.setAttribute("aria-hidden","true"),document.body.appendChild(m)),r.getAttribute("wrap")?m.setAttribute("wrap",r.getAttribute("wrap")):m.removeAttribute("wrap");var p=g(r,a),_=p.paddingSize,f=p.borderSize,F=p.boxSizing,P=p.sizingStyle;m.setAttribute("style","".concat(P,";").concat(E)),m.value=r.value||r.placeholder||"";var W=void 0,V=void 0,J,ne=m.scrollHeight;if(F==="border-box"?ne+=f:F==="content-box"&&(ne-=_),n!==null||t!==null){m.value=" ";var ce=m.scrollHeight-_;n!==null&&(W=ce*n,F==="border-box"&&(W=W+_+f),ne=Math.max(W,ne)),t!==null&&(V=ce*t,F==="border-box"&&(V=V+_+f),J=ne>V?"":"hidden",ne=Math.min(V,ne))}var ie={height:ne,overflowY:J,resize:"none"};return W&&(ie.minHeight=W),V&&(ie.maxHeight=V),ie}var A=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],u=0,R=1,i=2,T=$.forwardRef(function(r,a){var n=r.prefixCls,t=n===void 0?"rc-textarea":n,p=r.onPressEnter,_=r.defaultValue,f=r.value,F=r.autoSize,P=r.onResize,W=r.className,V=r.style,J=r.disabled,ne=r.onChange,ce=r.onInternalAutoSize,ie=Object(D.a)(r,A),xe=Object(s.a)(_,{value:f,postState:function(De){return De!=null?De:""}}),ge=Object(M.a)(xe,2),de=ge[0],Fe=ge[1],Qe=function(De){Fe(De.target.value),ne==null||ne(De)},Ve=$.useRef();$.useImperativeHandle(a,function(){return{textArea:Ve.current}});var Ne=$.useMemo(function(){return F&&Object(e.a)(F)==="object"?[F.minRows,F.maxRows]:[]},[F]),Ue=Object(M.a)(Ne,2),q=Ue[0],k=Ue[1],z=!!F,X=function(){try{if(document.activeElement===Ve.current){var De=Ve.current,Te=De.selectionStart,Oe=De.selectionEnd,le=De.scrollTop;Ve.current.setSelectionRange(Te,Oe),Ve.current.scrollTop=le}}catch(fe){}},re=$.useState(i),te=Object(M.a)(re,2),ae=te[0],ye=te[1],Le=$.useState(),Pe=Object(M.a)(Le,2),ke=Pe[0],Je=Pe[1],qe=function(){ye(u)};Object(c.a)(function(){z&&qe()},[f,q,k,z]),Object(c.a)(function(){if(ae===u)ye(R);else if(ae===R){var Ge=S(Ve.current,!1,q,k);ye(i),Je(Ge)}else X()},[ae]);var it=$.useRef(),rt=function(){l.a.cancel(it.current)},et=function(De){ae===i&&(P==null||P(De),F&&(rt(),it.current=Object(l.a)(function(){qe()})))};$.useEffect(function(){return rt},[]);var At=z?ke:null,We=Object(H.a)(Object(H.a)({},V),At);return(ae===u||ae===R)&&(We.overflowY="hidden",We.overflowX="hidden"),$.createElement(N.a,{onResize:et,disabled:!(F||P)},$.createElement("textarea",Object(he.a)({},ie,{ref:Ve,style:We,className:x()(t,W,Object(O.a)({},"".concat(t,"-disabled"),J)),disabled:J,value:de,onChange:Qe})))}),w=T,y=function(r){Object(Ee.a)(n,r);var a=Object(ue.a)(n);function n(t){var p;Object(be.a)(this,n),p=a.call(this,t),p.resizableTextArea=void 0,p.focus=function(){p.resizableTextArea.textArea.focus()},p.saveTextArea=function(f){p.resizableTextArea=f},p.handleChange=function(f){var F=p.props.onChange;p.setValue(f.target.value),F&&F(f)},p.handleKeyDown=function(f){var F=p.props,P=F.onPressEnter,W=F.onKeyDown;f.keyCode===13&&P&&P(f),W&&W(f)};var _=typeof t.value=="undefined"||t.value===null?t.defaultValue:t.value;return p.state={value:_},p}return Object(ve.a)(n,[{key:"setValue",value:function(p,_){"value"in this.props||this.setState({value:p},_)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return $.createElement(w,Object(he.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(p){return"value"in p?{value:p.value}:null}}]),n}($.Component),o=_e.default=y},"yg+E":function(dt,_e,Q){"use strict";Q.r(_e),Q.d(_e,"BaseInput",function(){return c});var he=Q("XjgL"),be=Q("kxoy"),ve=Q("T/Jt"),Ee=Q.n(ve),ue=Q("27eb"),$=Q.n(ue);function O(A){return!!(A.addonBefore||A.addonAfter)}function H(A){return!!(A.prefix||A.suffix||A.allowClear)}function e(A,u,R,i){if(!R)return;var T=u;if(u.type==="click"){var w=A.cloneNode(!0);T=Object.create(u,{target:{value:w},currentTarget:{value:w}}),w.value="",R(T);return}if(i!==void 0){T=Object.create(u,{target:{value:A},currentTarget:{value:A}}),A.value=i,R(T);return}R(T)}function M(A,u){if(!A)return;A.focus(u);var R=u||{},i=R.cursor;if(i){var T=A.value.length;switch(i){case"start":A.setSelectionRange(0,0);break;case"end":A.setSelectionRange(T,T);break;default:A.setSelectionRange(0,T)}}}function D(A){return typeof A=="undefined"||A===null?"":String(A)}var N=function(u){var R=u.inputElement,i=u.prefixCls,T=u.prefix,w=u.suffix,y=u.addonBefore,o=u.addonAfter,r=u.className,a=u.style,n=u.affixWrapperClassName,t=u.groupClassName,p=u.wrapperClassName,_=u.disabled,f=u.readOnly,F=u.focused,P=u.triggerFocus,W=u.allowClear,V=u.value,J=u.handleReset,ne=u.hidden,ce=Object(ve.useRef)(null),ie=function(X){var re;(re=ce.current)!==null&&re!==void 0&&re.contains(X.target)&&(P==null||P())},xe=function(){var X;if(!W)return null;var re=!_&&!f&&V,te="".concat(i,"-clear-icon"),ae=Object(be.a)(W)==="object"&&W!==null&&W!==void 0&&W.clearIcon?W.clearIcon:"\u2716";return Ee.a.createElement("span",{onClick:J,onMouseDown:function(Le){return Le.preventDefault()},className:$()(te,(X={},Object(he.a)(X,"".concat(te,"-hidden"),!re),Object(he.a)(X,"".concat(te,"-has-suffix"),!!w),X)),role:"button",tabIndex:-1},ae)},ge=Object(ve.cloneElement)(R,{value:V,hidden:ne});if(H(u)){var de,Fe="".concat(i,"-affix-wrapper"),Qe=$()(Fe,(de={},Object(he.a)(de,"".concat(Fe,"-disabled"),_),Object(he.a)(de,"".concat(Fe,"-focused"),F),Object(he.a)(de,"".concat(Fe,"-readonly"),f),Object(he.a)(de,"".concat(Fe,"-input-with-clear-btn"),w&&W&&V),de),!O(u)&&r,n),Ve=(w||W)&&Ee.a.createElement("span",{className:"".concat(i,"-suffix")},xe(),w);ge=Ee.a.createElement("span",{className:Qe,style:a,hidden:!O(u)&&ne,onClick:ie,ref:ce},T&&Ee.a.createElement("span",{className:"".concat(i,"-prefix")},T),Object(ve.cloneElement)(R,{style:null,value:V,hidden:null}),Ve)}if(O(u)){var Ne="".concat(i,"-group"),Ue="".concat(Ne,"-addon"),q=$()("".concat(i,"-wrapper"),Ne,p),k=$()("".concat(i,"-group-wrapper"),r,t);return Ee.a.createElement("span",{className:k,style:a,hidden:ne},Ee.a.createElement("span",{className:q},y&&Ee.a.createElement("span",{className:Ue},y),Object(ve.cloneElement)(ge,{style:null,hidden:null}),o&&Ee.a.createElement("span",{className:Ue},o)))}return ge},c=N,l=Q("aVTQ"),s=Q("yuO0"),h=Q("36hc"),x=Q("fNpE"),E=Q("N7A4"),v=Q("8wWb"),d=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","inputClassName"],m=Object(ve.forwardRef)(function(A,u){var R=A.autoComplete,i=A.onChange,T=A.onFocus,w=A.onBlur,y=A.onPressEnter,o=A.onKeyDown,r=A.prefixCls,a=r===void 0?"rc-input":r,n=A.disabled,t=A.htmlSize,p=A.className,_=A.maxLength,f=A.suffix,F=A.showCount,P=A.type,W=P===void 0?"text":P,V=A.inputClassName,J=Object(x.a)(A,d),ne=Object(v.a)(A.defaultValue,{value:A.value}),ce=Object(h.a)(ne,2),ie=ce[0],xe=ce[1],ge=Object(ve.useState)(!1),de=Object(h.a)(ge,2),Fe=de[0],Qe=de[1],Ve=Object(ve.useRef)(null),Ne=function(ye){Ve.current&&M(Ve.current,ye)};Object(ve.useImperativeHandle)(u,function(){return{focus:Ne,blur:function(){var ye;(ye=Ve.current)===null||ye===void 0||ye.blur()},setSelectionRange:function(ye,Le,Pe){var ke;(ke=Ve.current)===null||ke===void 0||ke.setSelectionRange(ye,Le,Pe)},select:function(){var ye;(ye=Ve.current)===null||ye===void 0||ye.select()},input:Ve.current}}),Object(ve.useEffect)(function(){Qe(function(ae){return ae&&n?!1:ae})},[n]);var Ue=function(ye){A.value===void 0&&xe(ye.target.value),Ve.current&&e(Ve.current,ye,i)},q=function(ye){y&&ye.key==="Enter"&&y(ye),o==null||o(ye)},k=function(ye){Qe(!0),T==null||T(ye)},z=function(ye){Qe(!1),w==null||w(ye)},X=function(ye){xe(""),Ne(),Ve.current&&e(Ve.current,ye,i)},re=function(){var ye=Object(E.a)(A,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","affixWrapperClassName","groupClassName","inputClassName","wrapperClassName","htmlSize"]);return Ee.a.createElement("input",Object(s.a)({autoComplete:R},ye,{onChange:Ue,onFocus:k,onBlur:z,onKeyDown:q,className:$()(a,Object(he.a)({},"".concat(a,"-disabled"),n),V,!O(A)&&!H(A)&&p),ref:Ve,size:t,type:W}))},te=function(){var ye=Number(_)>0;if(f||F){var Le=D(ie),Pe=Object(l.a)(Le).length,ke=Object(be.a)(F)==="object"?F.formatter({value:Le,count:Pe,maxLength:_}):"".concat(Pe).concat(ye?" / ".concat(_):"");return Ee.a.createElement(Ee.a.Fragment,null,!!F&&Ee.a.createElement("span",{className:$()("".concat(a,"-show-count-suffix"),Object(he.a)({},"".concat(a,"-show-count-has-suffix"),!!f))},ke),f)}return null};return Ee.a.createElement(c,Object(s.a)({},J,{prefixCls:a,className:p,inputElement:re(),handleReset:X,value:D(ie),focused:Fe,triggerFocus:Ne,suffix:te(),disabled:n}))}),g=m,S=_e.default=g},ynYK:function(dt,_e,Q){"use strict";var he=Q("T/Jt"),be=Q.n(he),ve=he.createContext(null);_e.a=ve},zLVn:function(dt,_e,Q){"use strict";Q.d(_e,"a",function(){return he});function he(be,ve){if(be==null)return{};var Ee={},ue=Object.keys(be),$,O;for(O=0;O<ue.length;O++){if($=ue[O],ve.indexOf($)>=0)continue;Ee[$]=be[$]}return Ee}}}]);
|