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.
408 lines
1.1 MiB
408 lines
1.1 MiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[283,3,4,6,7,8,9,11],{"+GGh":function(Pe,he){Pe.exports="data:image/png;base64,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"},"+oxA":function(Pe,he,j){Pe.exports={flex_box_center:"flex_box_center___1SA8P",flex_space_between:"flex_space_between___3iSxN",flex_box_vertical_center:"flex_box_vertical_center___2JAtS",flex_box_center_end:"flex_box_center_end___2w-PB",flex_box_column:"flex_box_column___2s4Ak",head:"head___3iBvF",node:"node____ISDx"}},"+ua5":function(Pe,he,j){},"/cxE":function(Pe,he,j){"use strict";j.d(he,"f",function(){return M}),j.d(he,"g",function(){return z}),j.d(he,"h",function(){return A}),j.d(he,"e",function(){return H}),j.d(he,"b",function(){return P}),j.d(he,"c",function(){return e}),j.d(he,"d",function(){return C}),j.d(he,"a",function(){return g});class ce{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(f){setTimeout(()=>{throw f.stack?new Error(f.message+`
|
|
|
|
`+f.stack):f},0)}}emit(f){this.listeners.forEach(o=>{o(f)})}onUnexpectedError(f){this.unexpectedErrorHandler(f),this.emit(f)}onUnexpectedExternalError(f){this.unexpectedErrorHandler(f)}}const W=new ce;function M(f){H(f)||W.onUnexpectedError(f);return}function z(f){H(f)||W.onUnexpectedExternalError(f);return}function A(f){if(f instanceof Error){let{name:o,message:r}=f;const a=f.stacktrace||f.stack;return{$isError:!0,name:o,message:r,stack:a}}return f}const I="Canceled";function H(f){return f instanceof Error&&f.name===I&&f.message===I}function P(){const f=new Error(I);return f.name=f.message,f}function e(f){return f?new Error(`Illegal argument: ${f}`):new Error("Illegal argument")}function C(f){return f?new Error(`Illegal state: ${f}`):new Error("Illegal state")}class g extends Error{constructor(f){super("NotSupported");f&&(this.message=f)}}},"24hK":function(Pe,he,j){"use strict";j.d(he,"a",function(){return W});class ce{constructor(M){this.element=M,this.next=ce.Undefined,this.prev=ce.Undefined}}ce.Undefined=new ce(void 0);class W{constructor(){this._first=ce.Undefined,this._last=ce.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===ce.Undefined}clear(){let M=this._first;for(;M!==ce.Undefined;){const z=M.next;M.prev=ce.Undefined,M.next=ce.Undefined,M=z}this._first=ce.Undefined,this._last=ce.Undefined,this._size=0}unshift(M){return this._insert(M,!1)}push(M){return this._insert(M,!0)}_insert(M,z){const A=new ce(M);if(this._first===ce.Undefined)this._first=A,this._last=A;else if(z){const H=this._last;this._last=A,A.prev=H,H.next=A}else{const H=this._first;this._first=A,A.next=H,H.prev=A}this._size+=1;let I=!1;return()=>{I||(I=!0,this._remove(A))}}shift(){if(this._first===ce.Undefined)return;{const M=this._first.element;return this._remove(this._first),M}}pop(){if(this._last===ce.Undefined)return;{const M=this._last.element;return this._remove(this._last),M}}_remove(M){if(M.prev!==ce.Undefined&&M.next!==ce.Undefined){const z=M.prev;z.next=M.next,M.next.prev=z}else M.prev===ce.Undefined&&M.next===ce.Undefined?(this._first=ce.Undefined,this._last=ce.Undefined):M.next===ce.Undefined?(this._last=this._last.prev,this._last.next=ce.Undefined):M.prev===ce.Undefined&&(this._first=this._first.next,this._first.prev=ce.Undefined);this._size-=1}*[Symbol.iterator](){let M=this._first;for(;M!==ce.Undefined;)yield M.element,M=M.next}}},"3/fG":function(Pe,he,j){"use strict";j.d(he,"a",function(){return W});function ce(M,z){let A;return z.length===0?A=M:A=M.replace(/\{(\d+)\}/g,function(I,H){const P=H[0];return typeof z[P]!="undefined"?z[P]:I}),A}function W(M,z,...A){return ce(z,A)}},"5VLF":function(Pe,he,j){"use strict";var ce,W;function M(z,A,I){var H=function(P,e){return z.js_beautify(P,e)};return H.js=z.js_beautify,H.css=A.css_beautify,H.html=I.html_beautify,H.js_beautify=z.js_beautify,H.css_beautify=A.css_beautify,H.html_beautify=I.html_beautify,H}!(ce=[j("6UM0"),j("TXwP"),j("psGv")],W=function(z,A,I){return M(z,A,I)}.apply(he,ce),W!==void 0&&(Pe.exports=W))},"5Y4S":function(Pe,he,j){"use strict";j.d(he,"a",function(){return M});var ce=j("MNsG");const W=ce.b.performance&&typeof ce.b.performance.now=="function";class M{constructor(z){this._highResolution=W&&z,this._startTime=this._now(),this._stopTime=-1}static create(z=!0){return new M(z)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?ce.b.performance.now():Date.now()}}},"6+eU":function(Pe,he,j){"use strict";j.d(he,"a",function(){return E});var ce=j("wx14"),W=j("rePB"),M=j("VTBJ"),z=j("1OyB"),A=j("vuIU"),I=j("Ji7U"),H=j("LK+K"),P=j("q1tI"),e=j.n(P),C=j("TSYQ"),g=j.n(C),f=function(x){var _,p="".concat(x.rootPrefixCls,"-item"),u=g()(p,"".concat(p,"-").concat(x.page),(_={},Object(W.a)(_,"".concat(p,"-active"),x.active),Object(W.a)(_,x.className,!!x.className),Object(W.a)(_,"".concat(p,"-disabled"),!x.page),_)),l=function(){x.onClick(x.page)},m=function(T){x.onKeyPress(T,x.onClick,x.page)};return e.a.createElement("li",{title:x.showTitle?x.page:null,className:u,onClick:l,onKeyPress:m,tabIndex:"0"},x.itemRender(x.page,"page",e.a.createElement("a",{rel:"nofollow"},x.page)))},o=f,r={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},a=function(w){Object(I.a)(_,w);var x=Object(H.a)(_);function _(){var p;Object(z.a)(this,_);for(var u=arguments.length,l=new Array(u),m=0;m<u;m++)l[m]=arguments[m];return p=x.call.apply(x,[this].concat(l)),p.state={goInputText:""},p.buildOptionText=function(c){return"".concat(c," ").concat(p.props.locale.items_per_page)},p.changeSize=function(c){p.props.changeSize(Number(c))},p.handleChange=function(c){p.setState({goInputText:c.target.value})},p.handleBlur=function(c){var T=p.props,N=T.goButton,D=T.quickGo,y=T.rootPrefixCls,O=p.state.goInputText;if(N||O==="")return;if(c.relatedTarget&&(c.relatedTarget.className.indexOf("".concat(y,"-prev"))>=0||c.relatedTarget.className.indexOf("".concat(y,"-next"))>=0))return;p.setState({goInputText:""}),D(p.getValidValue())},p.go=function(c){var T=p.state.goInputText;if(T==="")return;(c.keyCode===r.ENTER||c.type==="click")&&(p.setState({goInputText:""}),p.props.quickGo(p.getValidValue()))},p}return Object(A.a)(_,[{key:"getValidValue",value:function(){var u=this.state,l=u.goInputText,m=u.current;return!l||isNaN(l)?m:Number(l)}},{key:"getPageSizeOptions",value:function(){var u=this.props,l=u.pageSize,m=u.pageSizeOptions;return m.some(function(c){return c.toString()===l.toString()})?m:m.concat([l.toString()]).sort(function(c,T){var N=isNaN(Number(c))?0:Number(c),D=isNaN(Number(T))?0:Number(T);return N-D})}},{key:"render",value:function(){var u=this,l=this.props,m=l.pageSize,c=l.locale,T=l.rootPrefixCls,N=l.changeSize,D=l.quickGo,y=l.goButton,O=l.selectComponentClass,k=l.buildOptionText,R=l.selectPrefixCls,B=l.disabled,V=this.state.goInputText,ee="".concat(T,"-options"),re=O,_e=null,se=null,ye=null;if(!N&&!D)return null;var ve=this.getPageSizeOptions();if(N&&re){var Ee=ve.map(function(le,F){return e.a.createElement(re.Option,{key:F,value:le.toString()},(k||u.buildOptionText)(le))});_e=e.a.createElement(re,{disabled:B,prefixCls:R,showSearch:!1,className:"".concat(ee,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(m||ve[0]).toString(),onChange:this.changeSize,getPopupContainer:function(F){return F.parentNode}},Ee)}return D&&(y&&(ye=typeof y=="boolean"?e.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:B,className:"".concat(ee,"-quick-jumper-button")},c.jump_to_confirm):e.a.createElement("span",{onClick:this.go,onKeyUp:this.go},y)),se=e.a.createElement("div",{className:"".concat(ee,"-quick-jumper")},c.jump_to,e.a.createElement("input",{disabled:B,type:"text",value:V,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),c.page,ye)),e.a.createElement("li",{className:"".concat(ee)},_e,se)}}]),_}(e.a.Component);a.defaultProps={pageSizeOptions:["10","20","50","100"]};var h=a,s=j("N2Kk");function i(){}function n(w){return typeof w=="number"&&isFinite(w)&&Math.floor(w)===w}function t(w,x,_){return _}function b(w,x,_){var p=typeof w=="undefined"?x.pageSize:w;return Math.floor((_.total-1)/p)+1}var v=function(w){Object(I.a)(_,w);var x=Object(H.a)(_);function _(p){var u;Object(z.a)(this,_),u=x.call(this,p),u.getJumpPrevPage=function(){return Math.max(1,u.state.current-(u.props.showLessItems?3:5))},u.getJumpNextPage=function(){return Math.min(b(void 0,u.state,u.props),u.state.current+(u.props.showLessItems?3:5))},u.getItemIcon=function(N,D){var y=u.props.prefixCls,O=N||e.a.createElement("button",{type:"button","aria-label":D,className:"".concat(y,"-item-link")});return typeof N=="function"&&(O=e.a.createElement(N,Object(M.a)({},u.props))),O},u.savePaginationNode=function(N){u.paginationNode=N},u.isValid=function(N){return n(N)&&N!==u.state.current},u.shouldDisplayQuickJumper=function(){var N=u.props,D=N.showQuickJumper,y=N.pageSize,O=N.total;return O<=y?!1:D},u.handleKeyDown=function(N){(N.keyCode===r.ARROW_UP||N.keyCode===r.ARROW_DOWN)&&N.preventDefault()},u.handleKeyUp=function(N){var D=u.getValidValue(N),y=u.state.currentInputValue;D!==y&&u.setState({currentInputValue:D}),N.keyCode===r.ENTER?u.handleChange(D):N.keyCode===r.ARROW_UP?u.handleChange(D-1):N.keyCode===r.ARROW_DOWN&&u.handleChange(D+1)},u.changePageSize=function(N){var D=u.state.current,y=b(N,u.state,u.props);D=D>y?y:D,y===0&&(D=u.state.current),typeof N=="number"&&("pageSize"in u.props||u.setState({pageSize:N}),"current"in u.props||u.setState({current:D,currentInputValue:D})),u.props.onShowSizeChange(D,N),"onChange"in u.props&&u.props.onChange&&u.props.onChange(D,N)},u.handleChange=function(N){var D=u.props.disabled,y=N;if(u.isValid(y)&&!D){var O=b(void 0,u.state,u.props);y>O?y=O:y<1&&(y=1),"current"in u.props||u.setState({current:y,currentInputValue:y});var k=u.state.pageSize;return u.props.onChange(y,k),y}return u.state.current},u.prev=function(){u.hasPrev()&&u.handleChange(u.state.current-1)},u.next=function(){u.hasNext()&&u.handleChange(u.state.current+1)},u.jumpPrev=function(){u.handleChange(u.getJumpPrevPage())},u.jumpNext=function(){u.handleChange(u.getJumpNextPage())},u.hasPrev=function(){return u.state.current>1},u.hasNext=function(){return u.state.current<b(void 0,u.state,u.props)},u.runIfEnter=function(N,D){if(N.key==="Enter"||N.charCode===13){for(var y=arguments.length,O=new Array(y>2?y-2:0),k=2;k<y;k++)O[k-2]=arguments[k];D.apply(void 0,O)}},u.runIfEnterPrev=function(N){u.runIfEnter(N,u.prev)},u.runIfEnterNext=function(N){u.runIfEnter(N,u.next)},u.runIfEnterJumpPrev=function(N){u.runIfEnter(N,u.jumpPrev)},u.runIfEnterJumpNext=function(N){u.runIfEnter(N,u.jumpNext)},u.handleGoTO=function(N){(N.keyCode===r.ENTER||N.type==="click")&&u.handleChange(u.state.currentInputValue)};var l=p.onChange!==i,m="current"in p;m&&!l&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var c=p.defaultCurrent;"current"in p&&(c=p.current);var T=p.defaultPageSize;return"pageSize"in p&&(T=p.pageSize),c=Math.min(c,b(T,void 0,p)),u.state={current:c,currentInputValue:c,pageSize:T},u}return Object(A.a)(_,[{key:"componentDidUpdate",value:function(u,l){var m=this.props.prefixCls;if(l.current!==this.state.current&&this.paginationNode){var c=this.paginationNode.querySelector(".".concat(m,"-item-").concat(l.current));c&&document.activeElement===c&&c.blur()}}},{key:"getValidValue",value:function(u){var l=u.target.value,m=b(void 0,this.state,this.props),c=this.state.currentInputValue,T;return l===""?T=l:isNaN(Number(l))?T=c:l>=m?T=m:T=Number(l),T}},{key:"getShowSizeChanger",value:function(){var u=this.props,l=u.showSizeChanger,m=u.total,c=u.totalBoundaryShowSizeChanger;return typeof l!="undefined"?l:m>c}},{key:"renderPrev",value:function(u){var l=this.props,m=l.prevIcon,c=l.itemRender,T=c(u,"prev",this.getItemIcon(m,"prev page")),N=!this.hasPrev();return Object(P.isValidElement)(T)?Object(P.cloneElement)(T,{disabled:N}):T}},{key:"renderNext",value:function(u){var l=this.props,m=l.nextIcon,c=l.itemRender,T=c(u,"next",this.getItemIcon(m,"next page")),N=!this.hasNext();return Object(P.isValidElement)(T)?Object(P.cloneElement)(T,{disabled:N}):T}},{key:"render",value:function(){var u=this,l=this.props,m=l.prefixCls,c=l.className,T=l.style,N=l.disabled,D=l.hideOnSinglePage,y=l.total,O=l.locale,k=l.showQuickJumper,R=l.showLessItems,B=l.showTitle,V=l.showTotal,ee=l.simple,re=l.itemRender,_e=l.showPrevNextJumpers,se=l.jumpPrevIcon,ye=l.jumpNextIcon,ve=l.selectComponentClass,Ee=l.selectPrefixCls,le=l.pageSizeOptions,F=this.state,d=F.current,S=F.pageSize,L=F.currentInputValue;if(D===!0&&y<=S)return null;var G=b(void 0,this.state,this.props),U=[],$=null,de=null,xe=null,q=null,ae=null,fe=k&&k.goButton,pe=R?1:2,Ce=d-1>0?d-1:0,Me=d+1<G?d+1:G,He=Object.keys(this.props).reduce(function(J,Q){return(Q.substr(0,5)==="data-"||Q.substr(0,5)==="aria-"||Q==="role")&&(J[Q]=u.props[Q]),J},{});if(ee)return fe&&(typeof fe=="boolean"?ae=e.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},O.jump_to_confirm):ae=e.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},fe),ae=e.a.createElement("li",{title:B?"".concat(O.jump_to).concat(d,"/").concat(G):null,className:"".concat(m,"-simple-pager")},ae)),e.a.createElement("ul",Object(ce.a)({className:g()(m,"".concat(m,"-simple"),Object(W.a)({},"".concat(m,"-disabled"),N),c),style:T,ref:this.savePaginationNode},He),e.a.createElement("li",{title:B?O.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:g()("".concat(m,"-prev"),Object(W.a)({},"".concat(m,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(Ce)),e.a.createElement("li",{title:B?"".concat(d,"/").concat(G):null,className:"".concat(m,"-simple-pager")},e.a.createElement("input",{type:"text",value:L,disabled:N,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),e.a.createElement("span",{className:"".concat(m,"-slash")},"/"),G),e.a.createElement("li",{title:B?O.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:g()("".concat(m,"-next"),Object(W.a)({},"".concat(m,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Me)),ae);if(G<=3+pe*2){var je={locale:O,rootPrefixCls:m,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:B,itemRender:re};G||U.push(e.a.createElement(o,Object(ce.a)({},je,{key:"noPager",page:G,className:"".concat(m,"-disabled")})));for(var Ye=1;Ye<=G;Ye+=1){var Xe=d===Ye;U.push(e.a.createElement(o,Object(ce.a)({},je,{key:Ye,page:Ye,active:Xe})))}}else{var ze=R?O.prev_3:O.prev_5,Fe=R?O.next_3:O.next_5;_e&&($=e.a.createElement("li",{title:B?ze:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:g()("".concat(m,"-jump-prev"),Object(W.a)({},"".concat(m,"-jump-prev-custom-icon"),!!se))},re(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(se,"prev page"))),de=e.a.createElement("li",{title:B?Fe:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:g()("".concat(m,"-jump-next"),Object(W.a)({},"".concat(m,"-jump-next-custom-icon"),!!ye))},re(this.getJumpNextPage(),"jump-next",this.getItemIcon(ye,"next page")))),q=e.a.createElement(o,{locale:O,last:!0,rootPrefixCls:m,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:G,page:G,active:!1,showTitle:B,itemRender:re}),xe=e.a.createElement(o,{locale:O,rootPrefixCls:m,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:B,itemRender:re});var et=Math.max(1,d-pe),st=Math.min(d+pe,G);d-1<=pe&&(st=1+pe*2),G-d<=pe&&(et=G-pe*2);for(var te=et;te<=st;te+=1){var Y=d===te;U.push(e.a.createElement(o,{locale:O,rootPrefixCls:m,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:te,page:te,active:Y,showTitle:B,itemRender:re}))}d-1>=pe*2&&d!==1+2&&(U[0]=Object(P.cloneElement)(U[0],{className:"".concat(m,"-item-after-jump-prev")}),U.unshift($)),G-d>=pe*2&&d!==G-2&&(U[U.length-1]=Object(P.cloneElement)(U[U.length-1],{className:"".concat(m,"-item-before-jump-next")}),U.push(de)),et!==1&&U.unshift(xe),st!==G&&U.push(q)}var X=null;V&&(X=e.a.createElement("li",{className:"".concat(m,"-total-text")},V(y,[y===0?0:(d-1)*S+1,d*S>y?y:d*S])));var Z=!this.hasPrev()||!G,ne=!this.hasNext()||!G;return e.a.createElement("ul",Object(ce.a)({className:g()(m,c,Object(W.a)({},"".concat(m,"-disabled"),N)),style:T,unselectable:"unselectable",ref:this.savePaginationNode},He),X,e.a.createElement("li",{title:B?O.prev_page:null,onClick:this.prev,tabIndex:Z?null:0,onKeyPress:this.runIfEnterPrev,className:g()("".concat(m,"-prev"),Object(W.a)({},"".concat(m,"-disabled"),Z)),"aria-disabled":Z},this.renderPrev(Ce)),U,e.a.createElement("li",{title:B?O.next_page:null,onClick:this.next,tabIndex:ne?null:0,onKeyPress:this.runIfEnterNext,className:g()("".concat(m,"-next"),Object(W.a)({},"".concat(m,"-disabled"),ne)),"aria-disabled":ne},this.renderNext(Me)),e.a.createElement(h,{disabled:N,locale:O,rootPrefixCls:m,selectComponentClass:ve,selectPrefixCls:Ee,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:d,pageSize:S,pageSizeOptions:le,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:fe}))}}],[{key:"getDerivedStateFromProps",value:function(u,l){var m={};if("current"in u&&(m.current=u.current,u.current!==l.current&&(m.currentInputValue=m.current)),"pageSize"in u&&u.pageSize!==l.pageSize){var c=l.current,T=b(u.pageSize,l,u);c=c>T?T:c,"current"in u||(m.current=c,m.currentInputValue=c),m.pageSize=u.pageSize}return m}}]),_}(e.a.Component);v.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:i,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:i,locale:s.a,style:{},itemRender:t,totalBoundaryShowSizeChanger:50};var E=v},"6UM0":function(Pe,he,j){var ce,W;(function(){var M;(function(){"use strict";var A=[function(e,C,g){var f=g(1).Beautifier,o=g(5).Options;function r(a,h){var s=new f(a,h);return s.beautify()}e.exports=r,e.exports.defaultOptions=function(){return new o}},function(e,C,g){var f=g(2).Output,o=g(3).Token,r=g(4),a=g(5).Options,h=g(7).Tokenizer,s=g(7).line_starters,i=g(7).positionable_operators,n=g(7).TOKEN;function t(R,B){return B.indexOf(R)!==-1}function b(R){return R.replace(/^\s+/g,"")}function v(R){for(var B={},V=0;V<R.length;V++)B[R[V].replace(/-/g,"_")]=R[V];return B}function E(R,B){return R&&R.type===n.RESERVED&&R.text===B}function w(R,B){return R&&R.type===n.RESERVED&&t(R.text,B)}var x=["case","return","do","if","throw","else","await","break","continue","async"],_=["before-newline","after-newline","preserve-newline"],p=v(_),u=[p.before_newline,p.preserve_newline],l={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function m(R,B){if(B.multiline_frame||B.mode===l.ForInitializer||B.mode===l.Conditional)return;R.remove_indent(B.start_line_index)}function c(R){R=R.replace(r.allLineBreaks,`
|
|
`);for(var B=[],V=R.indexOf(`
|
|
`);V!==-1;)B.push(R.substring(0,V)),R=R.substring(V+1),V=R.indexOf(`
|
|
`);return R.length&&B.push(R),B}function T(R){return R===l.ArrayLiteral}function N(R){return t(R,[l.Expression,l.ForInitializer,l.Conditional])}function D(R,B){for(var V=0;V<R.length;V++){var ee=R[V].trim();if(ee.charAt(0)!==B)return!1}return!0}function y(R,B){for(var V=0,ee=R.length,re;V<ee;V++)if(re=R[V],re&&re.indexOf(B)!==0)return!1;return!0}function O(R,B){B=B||{},this._source_text=R||"",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 a(B)}O.prototype.create_flags=function(R,B){var V=0;R&&(V=R.indentation_level,!this._output.just_added_newline()&&R.line_indent_level>V&&(V=R.line_indent_level));var ee={mode:B,parent:R,last_token:R?R.last_token:new o(n.START_BLOCK,""),last_word:R?R.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:V,alignment:0,line_indent_level:R?R.line_indent_level:V,start_line_index:this._output.get_line_number(),ternary_depth:0};return ee},O.prototype._reset=function(R){var B=R.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new f(this._options,B),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(l.BlockStatement);var V=new h(R,this._options);return this._tokens=V.tokenize(),R},O.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var R,B=this._reset(this._source_text),V=this._options.eol;this._options.eol==="auto"&&(V=`
|
|
`,B&&r.lineBreak.test(B||"")&&(V=B.match(r.lineBreak)[0]));for(var ee=this._tokens.next();ee;)this.handle_token(ee),this._last_last_text=this._flags.last_token.text,this._flags.last_token=ee,ee=this._tokens.next();return R=this._output.get_code(V),R},O.prototype.handle_token=function(R,B){R.type===n.START_EXPR?this.handle_start_expr(R):R.type===n.END_EXPR?this.handle_end_expr(R):R.type===n.START_BLOCK?this.handle_start_block(R):R.type===n.END_BLOCK?this.handle_end_block(R):R.type===n.WORD?this.handle_word(R):R.type===n.RESERVED?this.handle_word(R):R.type===n.SEMICOLON?this.handle_semicolon(R):R.type===n.STRING?this.handle_string(R):R.type===n.EQUALS?this.handle_equals(R):R.type===n.OPERATOR?this.handle_operator(R):R.type===n.COMMA?this.handle_comma(R):R.type===n.BLOCK_COMMENT?this.handle_block_comment(R,B):R.type===n.COMMENT?this.handle_comment(R,B):R.type===n.DOT?this.handle_dot(R):R.type===n.EOF?this.handle_eof(R):R.type===n.UNKNOWN?this.handle_unknown(R,B):this.handle_unknown(R,B)},O.prototype.handle_whitespace_and_comments=function(R,B){var V=R.newlines,ee=this._options.keep_array_indentation&&T(this._flags.mode);if(R.comments_before)for(var re=R.comments_before.next();re;)this.handle_whitespace_and_comments(re,B),this.handle_token(re,B),re=R.comments_before.next();if(ee)for(var _e=0;_e<V;_e+=1)this.print_newline(_e>0,B);else if(this._options.max_preserve_newlines&&V>this._options.max_preserve_newlines&&(V=this._options.max_preserve_newlines),this._options.preserve_newlines&&V>1){this.print_newline(!1,B);for(var se=1;se<V;se+=1)this.print_newline(!0,B)}};var k=["async","break","continue","return","throw","yield"];O.prototype.allow_wrap_or_preserved_newline=function(R,B){if(B=B===void 0?!1:B,this._output.just_added_newline())return;var V=this._options.preserve_newlines&&R.newlines||B,ee=t(this._flags.last_token.text,i)||t(R.text,i);if(ee){var re=t(this._flags.last_token.text,i)&&t(this._options.operator_position,u)||t(R.text,i);V=V&&re}if(V)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(w(this._flags.last_token,k))return;this._output.set_wrap_point()}},O.prototype.print_newline=function(R,B){if(!B&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==n.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var V=this._tokens.peek();this._flags.mode===l.Statement&&!(this._flags.if_block&&E(V,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(R)&&(this._flags.multiline_frame=!0)},O.prototype.print_token_line_indentation=function(R){this._output.just_added_newline()&&(this._options.keep_array_indentation&&R.newlines&&(R.text==="["||T(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(R.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))},O.prototype.print_token=function(R){if(this._output.raw){this._output.add_raw_token(R);return}if(this._options.comma_first&&R.previous&&R.previous.type===n.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var B=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(B),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(R),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(R),this._output.non_breaking_space=!0,this._output.add_token(R.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},O.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},O.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))},O.prototype.set_mode=function(R){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,R),this._flags=this.create_flags(this._previous_flags,R),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},O.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===l.Statement&&m(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},O.prototype.start_of_object_property=function(){return this._flags.parent.mode===l.ObjectLiteral&&this._flags.mode===l.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||w(this._flags.last_token,["get","set"]))},O.prototype.start_of_statement=function(R){var B=!1;return B=B||w(this._flags.last_token,["var","let","const"])&&R.type===n.WORD,B=B||E(this._flags.last_token,"do"),B=B||!(this._flags.parent.mode===l.ObjectLiteral&&this._flags.mode===l.Statement)&&w(this._flags.last_token,k)&&!R.newlines,B=B||E(this._flags.last_token,"else")&&!(E(R,"if")&&!R.comments_before),B=B||this._flags.last_token.type===n.END_EXPR&&(this._previous_flags.mode===l.ForInitializer||this._previous_flags.mode===l.Conditional),B=B||this._flags.last_token.type===n.WORD&&this._flags.mode===l.BlockStatement&&!this._flags.in_case&&!(R.text==="--"||R.text==="++")&&this._last_last_text!=="function"&&R.type!==n.WORD&&R.type!==n.RESERVED,B=B||this._flags.mode===l.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||w(this._flags.last_token,["get","set"])),B?(this.set_mode(l.Statement),this.indent(),this.handle_whitespace_and_comments(R,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(R,w(R,["do","for","if","while"])),!0):!1},O.prototype.handle_start_expr=function(R){this.start_of_statement(R)||this.handle_whitespace_and_comments(R);var B=l.Expression;if(R.text==="["){if(this._flags.last_token.type===n.WORD||this._flags.last_token.text===")"){w(this._flags.last_token,s)&&(this._output.space_before_token=!0),this.print_token(R),this.set_mode(B),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}B=l.ArrayLiteral,T(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),t(this._flags.last_token.type,[n.START_EXPR,n.END_EXPR,n.WORD,n.OPERATOR,n.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===n.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,B=l.ForInitializer):t(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,B=l.Conditional):t(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&R.whitespace_before===""?this._output.space_before_token=!1:(t(this._flags.last_token.text,s)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===n.EQUALS||this._flags.last_token.type===n.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(R);else if(this._flags.last_token.type===n.WORD){this._output.space_before_token=!1;var V=this._tokens.peek(-3);if(this._options.space_after_named_function&&V){var ee=this._tokens.peek(-4);w(V,["async","function"])||V.text==="*"&&w(ee,["async","function"])?this._output.space_before_token=!0:this._flags.mode===l.ObjectLiteral?(V.text==="{"||V.text===","||V.text==="*"&&(ee.text==="{"||ee.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(R);(this._flags.last_token.type===n.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===l.ObjectLiteral&&t(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===n.START_BLOCK?this.print_newline():(this._flags.last_token.type===n.END_EXPR||this._flags.last_token.type===n.START_EXPR||this._flags.last_token.type===n.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===n.COMMA)&&this.allow_wrap_or_preserved_newline(R,R.newlines),this.print_token(R),this.set_mode(B),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},O.prototype.handle_end_expr=function(R){for(;this._flags.mode===l.Statement;)this.restore_mode();this.handle_whitespace_and_comments(R),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(R,R.text==="]"&&T(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===n.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(R),this.restore_mode(),m(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===l.Conditional&&(this._previous_flags.mode=l.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},O.prototype.handle_start_block=function(R){this.handle_whitespace_and_comments(R);var B=this._tokens.peek(),V=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===n.END_EXPR?(this.set_mode(l.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(l.BlockStatement):V&&(t(V.text,[":",","])&&t(B.type,[n.STRING,n.WORD,n.RESERVED])||t(B.text,["get","set","..."])&&t(V.type,[n.WORD,n.RESERVED]))?t(this._last_last_text,["class","interface"])&&!t(V.text,[":",","])?this.set_mode(l.BlockStatement):this.set_mode(l.ObjectLiteral):this._flags.last_token.type===n.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(l.BlockStatement):t(this._flags.last_token.type,[n.EQUALS,n.START_EXPR,n.COMMA,n.OPERATOR])||w(this._flags.last_token,["return","throw","import","default"])?this.set_mode(l.ObjectLiteral):this.set_mode(l.BlockStatement),this._flags.last_token&&(w(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var ee=!B.comments_before&&B.text==="}",re=ee&&this._flags.last_word==="function"&&this._flags.last_token.type===n.END_EXPR;if(this._options.brace_preserve_inline){var _e=0,se=null;this._flags.inline_frame=!0;do if(_e+=1,se=this._tokens.peek(_e-1),se.newlines){this._flags.inline_frame=!1;break}while(se.type!==n.EOF&&!(se.type===n.END_BLOCK&&se.opened===R))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&R.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==n.OPERATOR&&(re||this._flags.last_token.type===n.EQUALS||w(this._flags.last_token,x)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(T(this._previous_flags.mode)&&(this._flags.last_token.type===n.START_EXPR||this._flags.last_token.type===n.COMMA)&&((this._flags.last_token.type===n.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===n.COMMA||this._flags.last_token.type===n.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(R),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==n.OPERATOR&&this._flags.last_token.type!==n.START_EXPR&&(this._flags.last_token.type===n.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(R),this.indent(),!ee&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},O.prototype.handle_end_block=function(R){for(this.handle_whitespace_and_comments(R);this._flags.mode===l.Statement;)this.restore_mode();var B=this._flags.last_token.type===n.START_BLOCK;this._flags.inline_frame&&!B?this._output.space_before_token=!0:this._options.brace_style==="expand"?B||this.print_newline():B||(T(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(R)},O.prototype.handle_word=function(R){if(R.type===n.RESERVED){if(t(R.text,["set","get"])&&this._flags.mode!==l.ObjectLiteral)R.type=n.WORD;else if(R.text==="import"&&t(this._tokens.peek().text,["(","."]))R.type=n.WORD;else if(t(R.text,["as","from"])&&!this._flags.import_block)R.type=n.WORD;else if(this._flags.mode===l.ObjectLiteral){var B=this._tokens.peek();B.text===":"&&(R.type=n.WORD)}}if(this.start_of_statement(R)?w(this._flags.last_token,["var","let","const"])&&R.type===n.WORD&&(this._flags.declaration_statement=!0):R.newlines&&!N(this._flags.mode)&&(this._flags.last_token.type!==n.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==n.EQUALS&&(this._options.preserve_newlines||!w(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(R),this.print_newline()):this.handle_whitespace_and_comments(R),this._flags.do_block&&!this._flags.do_while)if(E(R,"while")){this._output.space_before_token=!0,this.print_token(R),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&E(R,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===l.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&w(R,["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(R),this._flags.in_case=!0;return}if((this._flags.last_token.type===n.COMMA||this._flags.last_token.type===n.START_EXPR||this._flags.last_token.type===n.EQUALS||this._flags.last_token.type===n.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(R)),E(R,"function")){(t(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(t(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===n.OPERATOR))&&(!this._output.just_added_blankline()&&!R.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===n.RESERVED||this._flags.last_token.type===n.WORD?w(this._flags.last_token,["get","set","new","export"])||w(this._flags.last_token,k)?this._output.space_before_token=!0:E(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===n.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(N(this._flags.mode)||T(this._flags.mode))||this.print_newline(),this.print_token(R),this._flags.last_word=R.text;return}var V="NONE";if(this._flags.last_token.type===n.END_BLOCK?this._previous_flags.inline_frame?V="SPACE":w(R,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&R.newlines?V="NEWLINE":(V="SPACE",this._output.space_before_token=!0):V="NEWLINE":this._flags.last_token.type===n.SEMICOLON&&this._flags.mode===l.BlockStatement?V="NEWLINE":this._flags.last_token.type===n.SEMICOLON&&N(this._flags.mode)?V="SPACE":this._flags.last_token.type===n.STRING?V="NEWLINE":this._flags.last_token.type===n.RESERVED||this._flags.last_token.type===n.WORD||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===l.ObjectLiteral&&t(this._last_last_text,["{",","]))?V="SPACE":this._flags.last_token.type===n.START_BLOCK?this._flags.inline_frame?V="SPACE":V="NEWLINE":this._flags.last_token.type===n.END_EXPR&&(this._output.space_before_token=!0,V="NEWLINE"),w(R,s)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?V="SPACE":V="NEWLINE"),w(R,["else","catch","finally"]))if((!(this._flags.last_token.type===n.END_BLOCK&&this._previous_flags.mode===l.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&R.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var ee=this._output.current_line;ee.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else V==="NEWLINE"?w(this._flags.last_token,x)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&w(R,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==n.END_EXPR?(this._flags.last_token.type!==n.START_EXPR||!w(R,["var","let","const"]))&&this._flags.last_token.text!==":"&&(E(R,"if")&&E(R.previous,"else")?this._output.space_before_token=!0:this.print_newline()):w(R,s)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&T(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():V==="SPACE"&&(this._output.space_before_token=!0);R.previous&&(R.previous.type===n.WORD||R.previous.type===n.RESERVED)&&(this._output.space_before_token=!0),this.print_token(R),this._flags.last_word=R.text,R.type===n.RESERVED&&(R.text==="do"?this._flags.do_block=!0:R.text==="if"?this._flags.if_block=!0:R.text==="import"?this._flags.import_block=!0:this._flags.import_block&&E(R,"from")&&(this._flags.import_block=!1))},O.prototype.handle_semicolon=function(R){this.start_of_statement(R)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(R);for(var B=this._tokens.peek();this._flags.mode===l.Statement&&!(this._flags.if_block&&E(B,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(R)},O.prototype.handle_string=function(R){R.text.startsWith("`")&&R.newlines===0&&R.whitespace_before===""&&(R.previous.text===")"||this._flags.last_token.type===n.WORD)||(this.start_of_statement(R)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(R),this._flags.last_token.type===n.RESERVED||this._flags.last_token.type===n.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===n.COMMA||this._flags.last_token.type===n.START_EXPR||this._flags.last_token.type===n.EQUALS||this._flags.last_token.type===n.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(R):R.text.startsWith("`")&&this._flags.last_token.type===n.END_EXPR&&(R.previous.text==="]"||R.previous.text===")")&&R.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(R)},O.prototype.handle_equals=function(R){this.start_of_statement(R)||this.handle_whitespace_and_comments(R),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(R),this._output.space_before_token=!0},O.prototype.handle_comma=function(R){this.handle_whitespace_and_comments(R,!0),this.print_token(R),this._output.space_before_token=!0,this._flags.declaration_statement?(N(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(R)):this._flags.mode===l.ObjectLiteral||this._flags.mode===l.Statement&&this._flags.parent.mode===l.ObjectLiteral?(this._flags.mode===l.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(R)},O.prototype.handle_operator=function(R){var B=R.text==="*"&&(w(this._flags.last_token,["function","yield"])||t(this._flags.last_token.type,[n.START_BLOCK,n.COMMA,n.END_BLOCK,n.SEMICOLON])),V=t(R.text,["-","+"])&&(t(this._flags.last_token.type,[n.START_BLOCK,n.START_EXPR,n.EQUALS,n.OPERATOR])||t(this._flags.last_token.text,s)||this._flags.last_token.text===",");if(!this.start_of_statement(R)){var ee=!B;this.handle_whitespace_and_comments(R,ee)}if(R.text==="*"&&this._flags.last_token.type===n.DOT){this.print_token(R);return}if(R.text==="::"){this.print_token(R);return}if(this._flags.last_token.type===n.OPERATOR&&t(this._options.operator_position,u)&&this.allow_wrap_or_preserved_newline(R),R.text===":"&&this._flags.in_case){this.print_token(R),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==n.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var re=!0,_e=!0,se=!1;if(R.text===":"?this._flags.ternary_depth===0?re=!1:(this._flags.ternary_depth-=1,se=!0):R.text==="?"&&(this._flags.ternary_depth+=1),!V&&!B&&this._options.preserve_newlines&&t(R.text,i)){var ye=R.text===":",ve=ye&&se,Ee=ye&&!se;switch(this._options.operator_position){case p.before_newline:this._output.space_before_token=!Ee,this.print_token(R),(!ye||ve)&&this.allow_wrap_or_preserved_newline(R),this._output.space_before_token=!0;return;case p.after_newline:this._output.space_before_token=!0,!ye||ve?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(R):this._output.space_before_token=!1,this.print_token(R),this._output.space_before_token=!0;return;case p.preserve_newline:Ee||this.allow_wrap_or_preserved_newline(R),re=!(this._output.just_added_newline()||Ee),this._output.space_before_token=re,this.print_token(R),this._output.space_before_token=!0;return}}if(B){this.allow_wrap_or_preserved_newline(R),re=!1;var le=this._tokens.peek();_e=le&&t(le.type,[n.WORD,n.RESERVED])}else if(R.text==="...")this.allow_wrap_or_preserved_newline(R),re=this._flags.last_token.type===n.START_BLOCK,_e=!1;else if(t(R.text,["--","++","!","~"])||V){if((this._flags.last_token.type===n.COMMA||this._flags.last_token.type===n.START_EXPR)&&this.allow_wrap_or_preserved_newline(R),re=!1,_e=!1,R.newlines&&(R.text==="--"||R.text==="++"||R.text==="~")){var F=w(this._flags.last_token,x)&&R.newlines;F&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(F,!0)}this._flags.last_token.text===";"&&N(this._flags.mode)&&(re=!0),this._flags.last_token.type===n.RESERVED?re=!0:this._flags.last_token.type===n.END_EXPR?re=!(this._flags.last_token.text==="]"&&(R.text==="--"||R.text==="++")):this._flags.last_token.type===n.OPERATOR&&(re=t(R.text,["--","-","++","+"])&&t(this._flags.last_token.text,["--","-","++","+"]),t(R.text,["+","-"])&&t(this._flags.last_token.text,["--","++"])&&(_e=!0)),(this._flags.mode===l.BlockStatement&&!this._flags.inline_frame||this._flags.mode===l.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||re,this.print_token(R),this._output.space_before_token=_e},O.prototype.handle_block_comment=function(R,B){if(this._output.raw){this._output.add_raw_token(R),R.directives&&R.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(R.directives){this.print_newline(!1,B),this.print_token(R),R.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!r.newline.test(R.text)&&!R.newlines){this._output.space_before_token=!0,this.print_token(R),this._output.space_before_token=!0;return}else this.print_block_commment(R,B)},O.prototype.print_block_commment=function(R,B){var V=c(R.text),ee,re=!1,_e=!1,se=R.whitespace_before,ye=se.length;if(this.print_newline(!1,B),this.print_token_line_indentation(R),this._output.add_token(V[0]),this.print_newline(!1,B),V.length>1){for(V=V.slice(1),re=D(V,"*"),_e=y(V,se),re&&(this._flags.alignment=1),ee=0;ee<V.length;ee++)re?(this.print_token_line_indentation(R),this._output.add_token(b(V[ee]))):_e&&V[ee]?(this.print_token_line_indentation(R),this._output.add_token(V[ee].substring(ye))):(this._output.current_line.set_indent(-1),this._output.add_token(V[ee])),this.print_newline(!1,B);this._flags.alignment=0}},O.prototype.handle_comment=function(R,B){R.newlines?this.print_newline(!1,B):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(R),this.print_newline(!1,B)},O.prototype.handle_dot=function(R){this.start_of_statement(R)||this.handle_whitespace_and_comments(R,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),w(this._flags.last_token,x)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(R,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(R)},O.prototype.handle_unknown=function(R,B){this.print_token(R),R.text[R.text.length-1]===`
|
|
`&&this.print_newline(!1,B)},O.prototype.handle_eof=function(R){for(;this._flags.mode===l.Statement;)this.restore_mode();this.handle_whitespace_and_comments(R)},e.exports.Beautifier=O},function(e){function C(o){this.__parent=o,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=[]}C.prototype.clone_empty=function(){var o=new C(this.__parent);return o.set_indent(this.__indent_count,this.__alignment_count),o},C.prototype.item=function(o){return o<0?this.__items[this.__items.length+o]:this.__items[o]},C.prototype.has_match=function(o){for(var r=this.__items.length-1;r>=0;r--)if(this.__items[r].match(o))return!0;return!1},C.prototype.set_indent=function(o,r){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=r||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},C.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)},C.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},C.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},C.prototype.is_empty=function(){return this.__items.length===0},C.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},C.prototype.push=function(o){this.__items.push(o);var r=o.lastIndexOf(`
|
|
`);r!==-1?this.__character_count=o.length-r:this.__character_count+=o.length},C.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},C.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},C.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},C.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},C.prototype.toString=function(){var o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function g(o,r){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),r=r||"",o.indent_level>0&&(r=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=r,this.__base_string_length=r.length}g.prototype.get_indent_size=function(o,r){var a=this.__base_string_length;return r=r||0,o<0&&(a=0),a+=o*this.__indent_size,a+=r,a},g.prototype.get_indent_string=function(o,r){var a=this.__base_string;return r=r||0,o<0&&(o=0,a=""),r+=o*this.__indent_size,this.__ensure_cache(r),a+=this.__cache[r],a},g.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},g.prototype.__add_column=function(){var o=this.__cache.length,r=0,a="";this.__indent_size&&o>=this.__indent_size&&(r=Math.floor(o/this.__indent_size),o-=r*this.__indent_size,a=new Array(r+1).join(this.__indent_string)),o&&(a+=new Array(o+1).join(" ")),this.__cache.push(a)};function f(o,r){this.__indent_cache=new g(o,r),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new C(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}f.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},f.prototype.get_line_number=function(){return this.__lines.length},f.prototype.get_indent_string=function(o,r){return this.__indent_cache.get_indent_string(o,r)},f.prototype.get_indent_size=function(o,r){return this.__indent_cache.get_indent_size(o,r)},f.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},f.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},f.prototype.get_code=function(o){this.trim(!0);var r=this.current_line.pop();r&&(r[r.length-1]===`
|
|
`&&(r=r.replace(/\n+$/g,"")),this.current_line.push(r)),this._end_with_newline&&this.__add_outputline();var a=this.__lines.join(`
|
|
`);return o!==`
|
|
`&&(a=a.replace(/[\n]/g,o)),a},f.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},f.prototype.set_indent=function(o,r){return o=o||0,r=r||0,this.next_line.set_indent(o,r),this.__lines.length>1?(this.current_line.set_indent(o,r),!0):(this.current_line.set_indent(),!1)},f.prototype.add_raw_token=function(o){for(var r=0;r<o.newlines;r++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(o.whitespace_before),this.current_line.push(o.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},f.prototype.add_token=function(o){this.__add_space_before_token(),this.current_line.push(o),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},f.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(" "))},f.prototype.remove_indent=function(o){for(var r=this.__lines.length;o<r;)this.__lines[o]._remove_indent(),o++;this.current_line._remove_wrap_indent()},f.prototype.trim=function(o){for(o=o===void 0?!1:o,this.current_line.trim();o&&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},f.prototype.just_added_newline=function(){return this.current_line.is_empty()},f.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},f.prototype.ensure_empty_line_above=function(o,r){for(var a=this.__lines.length-2;a>=0;){var h=this.__lines[a];if(h.is_empty())break;if(h.item(0).indexOf(o)!==0&&h.item(-1)!==r){this.__lines.splice(a+1,0,new C(this)),this.previous_line=this.__lines[this.__lines.length-2];break}a--}},e.exports.Output=f},function(e){function C(g,f,o,r){this.type=g,this.text=f,this.comments_before=null,this.newlines=o||0,this.whitespace_before=r||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}e.exports.Token=C},function(e,C){var g="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",f="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",o="\\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",r="\\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",a="(?:\\\\u[0-9a-fA-F]{4}|["+g+o+"])",h="(?:\\\\u[0-9a-fA-F]{4}|["+f+o+r+"])*";C.identifier=new RegExp(a+h,"g"),C.identifierStart=new RegExp(a),C.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+f+o+r+"])+");var s=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;C.newline=/[\n\r\u2028\u2029]/,C.lineBreak=new RegExp(`\r
|
|
|`+C.newline.source),C.allLineBreaks=new RegExp(C.lineBreak.source,"g")},function(e,C,g){var f=g(6).Options,o=["before-newline","after-newline","preserve-newline"];function r(a){f.call(this,a,"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 s=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var i=0;i<s.length;i++)s[i]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=s[i];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",o),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}r.prototype=new f,e.exports.Options=r},function(e){function C(o,r){this.raw_options=g(o,r),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"])}C.prototype._get_array=function(o,r){var a=this.raw_options[o],h=r||[];return typeof a=="object"?a!==null&&typeof a.concat=="function"&&(h=a.concat()):typeof a=="string"&&(h=a.split(/[^a-zA-Z0-9_\/\-]+/)),h},C.prototype._get_boolean=function(o,r){var a=this.raw_options[o],h=a===void 0?!!r:!!a;return h},C.prototype._get_characters=function(o,r){var a=this.raw_options[o],h=r||"";return typeof a=="string"&&(h=a.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),h},C.prototype._get_number=function(o,r){var a=this.raw_options[o];r=parseInt(r,10),isNaN(r)&&(r=0);var h=parseInt(a,10);return isNaN(h)&&(h=r),h},C.prototype._get_selection=function(o,r,a){var h=this._get_selection_list(o,r,a);if(h.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values:
|
|
`+r+`
|
|
You passed in: '`+this.raw_options[o]+"'");return h[0]},C.prototype._get_selection_list=function(o,r,a){if(!r||r.length===0)throw new Error("Selection list cannot be empty.");if(a=a||[r[0]],!this._is_valid_selection(a,r))throw new Error("Invalid Default Value!");var h=this._get_array(o,a);if(!this._is_valid_selection(h,r))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values:
|
|
`+r+`
|
|
You passed in: '`+this.raw_options[o]+"'");return h},C.prototype._is_valid_selection=function(o,r){return o.length&&r.length&&!o.some(function(a){return r.indexOf(a)===-1})};function g(o,r){var a={};o=f(o);var h;for(h in o)h!==r&&(a[h]=o[h]);if(r&&o[r])for(h in o[r])a[h]=o[r][h];return a}function f(o){var r={},a;for(a in o){var h=a.replace(/-/g,"_");r[h]=o[a]}return r}e.exports.Options=C,e.exports.normalizeOpts=f,e.exports.mergeOpts=g},function(e,C,g){var f=g(8).InputScanner,o=g(9).Tokenizer,r=g(9).TOKEN,a=g(13).Directives,h=g(4),s=g(12).Pattern,i=g(14).TemplatablePattern;function n(D,y){return y.indexOf(D)!==-1}var t={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:r.START,RAW:r.RAW,EOF:r.EOF},b=new a(/\/\*/,/\*\//),v=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,E=/[0-9]/,w=/[^\d\.]/,x=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),_=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";_=_.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),_="\\?\\.(?!\\d) "+_,_=_.replace(/ /g,"|");var p=new RegExp(_),u="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),l=u.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),m=new RegExp("^(?:"+l.join("|")+")$"),c,T=function(D,y){o.call(this,D,y),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var O=new s(this._input),k=new i(this._input).read_options(this._options);this.__patterns={template:k,identifier:k.starting_with(h.identifier).matching(h.identifierMatch),number:O.matching(v),punct:O.matching(p),comment:O.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:O.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:O.matching(/<!--/),html_comment_end:O.matching(/-->/),include:O.starting_with(/#include/).until_after(h.lineBreak),shebang:O.starting_with(/#!/).until_after(h.lineBreak),xml:O.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:k.until(/['\\\n\r\u2028\u2029]/),double_quote:k.until(/["\\\n\r\u2028\u2029]/),template_text:k.until(/[`\\$]/),template_expression:k.until(/[`}\\]/)}};T.prototype=new o,T.prototype._is_comment=function(D){return D.type===t.COMMENT||D.type===t.BLOCK_COMMENT||D.type===t.UNKNOWN},T.prototype._is_opening=function(D){return D.type===t.START_BLOCK||D.type===t.START_EXPR},T.prototype._is_closing=function(D,y){return(D.type===t.END_BLOCK||D.type===t.END_EXPR)&&y&&(D.text==="]"&&y.text==="["||D.text===")"&&y.text==="("||D.text==="}"&&y.text==="{")},T.prototype._reset=function(){c=!1},T.prototype._get_next_token=function(D,y){var O=null;this._readWhitespace();var k=this._input.peek();return k===null?this._create_token(t.EOF,""):(O=O||this._read_non_javascript(k),O=O||this._read_string(k),O=O||this._read_word(D),O=O||this._read_singles(k),O=O||this._read_comment(k),O=O||this._read_regexp(k,D),O=O||this._read_xml(k,D),O=O||this._read_punctuation(),O=O||this._create_token(t.UNKNOWN,this._input.next()),O)},T.prototype._read_word=function(D){var y;if(y=this.__patterns.identifier.read(),y!=="")return y=y.replace(h.allLineBreaks,`
|
|
`),!(D.type===t.DOT||D.type===t.RESERVED&&(D.text==="set"||D.text==="get"))&&m.test(y)?(y==="in"||y==="of")&&(D.type===t.WORD||D.type===t.STRING)?this._create_token(t.OPERATOR,y):this._create_token(t.RESERVED,y):this._create_token(t.WORD,y);if(y=this.__patterns.number.read(),y!=="")return this._create_token(t.WORD,y)},T.prototype._read_singles=function(D){var y=null;return D==="("||D==="["?y=this._create_token(t.START_EXPR,D):D===")"||D==="]"?y=this._create_token(t.END_EXPR,D):D==="{"?y=this._create_token(t.START_BLOCK,D):D==="}"?y=this._create_token(t.END_BLOCK,D):D===";"?y=this._create_token(t.SEMICOLON,D):D==="."&&w.test(this._input.peek(1))?y=this._create_token(t.DOT,D):D===","&&(y=this._create_token(t.COMMA,D)),y&&this._input.next(),y},T.prototype._read_punctuation=function(){var D=this.__patterns.punct.read();if(D!=="")return D==="="?this._create_token(t.EQUALS,D):D==="?."?this._create_token(t.DOT,D):this._create_token(t.OPERATOR,D)},T.prototype._read_non_javascript=function(D){var y="";if(D==="#"){if(this._is_first_token()&&(y=this.__patterns.shebang.read(),y))return this._create_token(t.UNKNOWN,y.trim()+`
|
|
`);if(y=this.__patterns.include.read(),y)return this._create_token(t.UNKNOWN,y.trim()+`
|
|
`);D=this._input.next();var O="#";if(this._input.hasNext()&&this._input.testChar(E)){do D=this._input.next(),O+=D;while(this._input.hasNext()&&D!=="#"&&D!=="=");return D==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(O+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(O+="{}",this._input.next(),this._input.next())),this._create_token(t.WORD,O)}this._input.back()}else if(D==="<"&&this._is_first_token()){if(y=this.__patterns.html_comment_start.read(),y){for(;this._input.hasNext()&&!this._input.testChar(h.newline);)y+=this._input.next();return c=!0,this._create_token(t.COMMENT,y)}}else if(c&&D==="-"&&(y=this.__patterns.html_comment_end.read(),y))return c=!1,this._create_token(t.COMMENT,y);return null},T.prototype._read_comment=function(D){var y=null;if(D==="/"){var O="";if(this._input.peek(1)==="*"){O=this.__patterns.block_comment.read();var k=b.get_directives(O);k&&k.ignore==="start"&&(O+=b.readIgnored(this._input)),O=O.replace(h.allLineBreaks,`
|
|
`),y=this._create_token(t.BLOCK_COMMENT,O),y.directives=k}else this._input.peek(1)==="/"&&(O=this.__patterns.comment.read(),y=this._create_token(t.COMMENT,O))}return y},T.prototype._read_string=function(D){if(D==="`"||D==="'"||D==='"'){var y=this._input.next();return this.has_char_escapes=!1,D==="`"?y+=this._read_string_recursive("`",!0,"${"):y+=this._read_string_recursive(D),this.has_char_escapes&&this._options.unescape_strings&&(y=N(y)),this._input.peek()===D&&(y+=this._input.next()),y=y.replace(h.allLineBreaks,`
|
|
`),this._create_token(t.STRING,y)}return null},T.prototype._allow_regexp_or_xml=function(D){return D.type===t.RESERVED&&n(D.text,["return","case","throw","else","do","typeof","yield"])||D.type===t.END_EXPR&&D.text===")"&&D.opened.previous.type===t.RESERVED&&n(D.opened.previous.text,["if","while","for"])||n(D.type,[t.COMMENT,t.START_EXPR,t.START_BLOCK,t.START,t.END_BLOCK,t.OPERATOR,t.EQUALS,t.EOF,t.SEMICOLON,t.COMMA])},T.prototype._read_regexp=function(D,y){if(D==="/"&&this._allow_regexp_or_xml(y)){for(var O=this._input.next(),k=!1,R=!1;this._input.hasNext()&&(k||R||this._input.peek()!==D)&&!this._input.testChar(h.newline);)O+=this._input.peek(),k?k=!1:(k=this._input.peek()==="\\",this._input.peek()==="["?R=!0:this._input.peek()==="]"&&(R=!1)),this._input.next();return this._input.peek()===D&&(O+=this._input.next(),O+=this._input.read(h.identifier)),this._create_token(t.STRING,O)}return null},T.prototype._read_xml=function(D,y){if(this._options.e4x&&D==="<"&&this._allow_regexp_or_xml(y)){var O="",k=this.__patterns.xml.read_match();if(k){for(var R=k[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),B=R.indexOf("{")===0,V=0;k;){var ee=!!k[1],re=k[2],_e=!!k[k.length-1]||re.slice(0,8)==="![CDATA[";if(!_e&&(re===R||B&&re.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(ee?--V:++V),O+=k[0],V<=0)break;k=this.__patterns.xml.read_match()}return k||(O+=this._input.match(/[\s\S]*/g)[0]),O=O.replace(h.allLineBreaks,`
|
|
`),this._create_token(t.STRING,O)}}return null};function N(D){for(var y="",O=0,k=new f(D),R=null;k.hasNext();)if(R=k.match(/([\s]|[^\\]|\\\\)+/g),R&&(y+=R[0]),k.peek()==="\\"){if(k.next(),k.peek()==="x")R=k.match(/x([0-9A-Fa-f]{2})/g);else if(k.peek()==="u")R=k.match(/u([0-9A-Fa-f]{4})/g);else{y+="\\",k.hasNext()&&(y+=k.next());continue}if(!R)return D;if(O=parseInt(R[1],16),O>126&&O<=255&&R[0].indexOf("x")===0)return D;if(O>=0&&O<32){y+="\\"+R[0];continue}else O===34||O===39||O===92?y+="\\"+String.fromCharCode(O):y+=String.fromCharCode(O)}return y}T.prototype._read_string_recursive=function(D,y,O){var k,R;D==="'"?R=this.__patterns.single_quote:D==='"'?R=this.__patterns.double_quote:D==="`"?R=this.__patterns.template_text:D==="}"&&(R=this.__patterns.template_expression);for(var B=R.read(),V="";this._input.hasNext();){if(V=this._input.next(),V===D||!y&&h.newline.test(V)){this._input.back();break}else V==="\\"&&this._input.hasNext()?(k=this._input.peek(),k==="x"||k==="u"?this.has_char_escapes=!0:k==="\r"&&this._input.peek(1)===`
|
|
`&&this._input.next(),V+=this._input.next()):O&&(O==="${"&&V==="$"&&this._input.peek()==="{"&&(V+=this._input.next()),O===V&&(D==="`"?V+=this._read_string_recursive("}",y,"`"):V+=this._read_string_recursive("`",y,"${"),this._input.hasNext()&&(V+=this._input.next())));V+=R.read(),B+=V}return B},e.exports.Tokenizer=T,e.exports.TOKEN=t,e.exports.positionable_operators=x.slice(),e.exports.line_starters=u.slice()},function(e){var C=RegExp.prototype.hasOwnProperty("sticky");function g(f){this.__input=f||"",this.__input_length=this.__input.length,this.__position=0}g.prototype.restart=function(){this.__position=0},g.prototype.back=function(){this.__position>0&&(this.__position-=1)},g.prototype.hasNext=function(){return this.__position<this.__input_length},g.prototype.next=function(){var f=null;return this.hasNext()&&(f=this.__input.charAt(this.__position),this.__position+=1),f},g.prototype.peek=function(f){var o=null;return f=f||0,f+=this.__position,f>=0&&f<this.__input_length&&(o=this.__input.charAt(f)),o},g.prototype.__match=function(f,o){f.lastIndex=o;var r=f.exec(this.__input);return r&&!(C&&f.sticky)&&(r.index!==o&&(r=null)),r},g.prototype.test=function(f,o){return o=o||0,o+=this.__position,o>=0&&o<this.__input_length?!!this.__match(f,o):!1},g.prototype.testChar=function(f,o){var r=this.peek(o);return f.lastIndex=0,r!==null&&f.test(r)},g.prototype.match=function(f){var o=this.__match(f,this.__position);return o?this.__position+=o[0].length:o=null,o},g.prototype.read=function(f,o,r){var a="",h;return f&&(h=this.match(f),h&&(a+=h[0])),o&&(h||!f)&&(a+=this.readUntil(o,r)),a},g.prototype.readUntil=function(f,o){var r="",a=this.__position;f.lastIndex=this.__position;var h=f.exec(this.__input);return h?(a=h.index,o&&(a+=h[0].length)):a=this.__input_length,r=this.__input.substring(this.__position,a),this.__position=a,r},g.prototype.readUntilAfter=function(f){return this.readUntil(f,!0)},g.prototype.get_regexp=function(f,o){var r=null,a="g";return o&&C&&(a="y"),typeof f=="string"&&f!==""?r=new RegExp(f,a):f&&(r=new RegExp(f.source,a)),r},g.prototype.get_literal_regexp=function(f){return RegExp(f.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},g.prototype.peekUntilAfter=function(f){var o=this.__position,r=this.readUntilAfter(f);return this.__position=o,r},g.prototype.lookBack=function(f){var o=this.__position-1;return o>=f.length&&this.__input.substring(o-f.length,o).toLowerCase()===f},e.exports.InputScanner=g},function(e,C,g){var f=g(8).InputScanner,o=g(3).Token,r=g(10).TokenStream,a=g(11).WhitespacePattern,h={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},s=function(i,n){this._input=new f(i),this._options=n||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new a(this._input)};s.prototype.tokenize=function(){this._input.restart(),this.__tokens=new r,this._reset();for(var i,n=new o(h.START,""),t=null,b=[],v=new r;n.type!==h.EOF;){for(i=this._get_next_token(n,t);this._is_comment(i);)v.add(i),i=this._get_next_token(n,t);v.isEmpty()||(i.comments_before=v,v=new r),i.parent=t,this._is_opening(i)?(b.push(t),t=i):t&&this._is_closing(i,t)&&(i.opened=t,t.closed=i,t=b.pop(),i.parent=t),i.previous=n,n.next=i,this.__tokens.add(i),n=i}return this.__tokens},s.prototype._is_first_token=function(){return this.__tokens.isEmpty()},s.prototype._reset=function(){},s.prototype._get_next_token=function(i,n){this._readWhitespace();var t=this._input.read(/.+/g);return t?this._create_token(h.RAW,t):this._create_token(h.EOF,"")},s.prototype._is_comment=function(i){return!1},s.prototype._is_opening=function(i){return!1},s.prototype._is_closing=function(i,n){return!1},s.prototype._create_token=function(i,n){var t=new o(i,n,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return t},s.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},e.exports.Tokenizer=s,e.exports.TOKEN=h},function(e){function C(g){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=g}C.prototype.restart=function(){this.__position=0},C.prototype.isEmpty=function(){return this.__tokens_length===0},C.prototype.hasNext=function(){return this.__position<this.__tokens_length},C.prototype.next=function(){var g=null;return this.hasNext()&&(g=this.__tokens[this.__position],this.__position+=1),g},C.prototype.peek=function(g){var f=null;return g=g||0,g+=this.__position,g>=0&&g<this.__tokens_length&&(f=this.__tokens[g]),f},C.prototype.add=function(g){this.__parent_token&&(g.parent=this.__parent_token),this.__tokens.push(g),this.__tokens_length+=1},e.exports.TokenStream=C},function(e,C,g){var f=g(12).Pattern;function o(r,a){f.call(this,r,a),a?this._line_regexp=this._input.get_regexp(a._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}o.prototype=new f,o.prototype.__set_whitespace_patterns=function(r,a){r+="\\t ",a+="\\n\\r",this._match_pattern=this._input.get_regexp("["+r+a+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+a+"]")},o.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var r=this._input.read(this._match_pattern);if(r===" ")this.whitespace_before_token=" ";else if(r){var a=this.__split(this._newline_regexp,r);this.newline_count=a.length-1,this.whitespace_before_token=a[this.newline_count]}return r},o.prototype.matching=function(r,a){var h=this._create();return h.__set_whitespace_patterns(r,a),h._update(),h},o.prototype._create=function(){return new o(this._input,this)},o.prototype.__split=function(r,a){r.lastIndex=0;for(var h=0,s=[],i=r.exec(a);i;)s.push(a.substring(h,i.index)),h=i.index+i[0].length,i=r.exec(a);return h<a.length?s.push(a.substring(h,a.length)):s.push(""),s},e.exports.WhitespacePattern=o},function(e){function C(g,f){this._input=g,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,f&&(this._starting_pattern=this._input.get_regexp(f._starting_pattern,!0),this._match_pattern=this._input.get_regexp(f._match_pattern,!0),this._until_pattern=this._input.get_regexp(f._until_pattern),this._until_after=f._until_after)}C.prototype.read=function(){var g=this._input.read(this._starting_pattern);return(!this._starting_pattern||g)&&(g+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),g},C.prototype.read_match=function(){return this._input.match(this._match_pattern)},C.prototype.until_after=function(g){var f=this._create();return f._until_after=!0,f._until_pattern=this._input.get_regexp(g),f._update(),f},C.prototype.until=function(g){var f=this._create();return f._until_after=!1,f._until_pattern=this._input.get_regexp(g),f._update(),f},C.prototype.starting_with=function(g){var f=this._create();return f._starting_pattern=this._input.get_regexp(g,!0),f._update(),f},C.prototype.matching=function(g){var f=this._create();return f._match_pattern=this._input.get_regexp(g,!0),f._update(),f},C.prototype._create=function(){return new C(this._input,this)},C.prototype._update=function(){},e.exports.Pattern=C},function(e){function C(g,f){g=typeof g=="string"?g:g.source,f=typeof f=="string"?f:f.source,this.__directives_block_pattern=new RegExp(g+/ beautify( \w+[:]\w+)+ /.source+f,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(g+/\sbeautify\signore:end\s/.source+f,"g")}C.prototype.get_directives=function(g){if(!g.match(this.__directives_block_pattern))return null;var f={};this.__directive_pattern.lastIndex=0;for(var o=this.__directive_pattern.exec(g);o;)f[o[1]]=o[2],o=this.__directive_pattern.exec(g);return f},C.prototype.readIgnored=function(g){return g.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=C},function(e,C,g){var f=g(12).Pattern,o={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function r(a,h){f.call(this,a,h),this.__template_pattern=null,this._disabled=Object.assign({},o),this._excluded=Object.assign({},o),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 s=new f(a);this.__patterns={handlebars_comment:s.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:s.starting_with(/{{{/).until_after(/}}}/),handlebars:s.starting_with(/{{/).until_after(/}}/),php:s.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:s.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:s.starting_with(/{%/).until_after(/%}/),django_value:s.starting_with(/{{/).until_after(/}}/),django_comment:s.starting_with(/{#/).until_after(/#}/),smarty:s.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:s.starting_with(/{\*/).until_after(/\*}/),smarty_literal:s.starting_with(/{literal}/).until_after(/{\/literal}/)}}r.prototype=new f,r.prototype._create=function(){return new r(this._input,this)},r.prototype._update=function(){this.__set_templated_pattern()},r.prototype.disable=function(a){var h=this._create();return h._disabled[a]=!0,h._update(),h},r.prototype.read_options=function(a){var h=this._create();for(var s in o)h._disabled[s]=a.templating.indexOf(s)===-1;return h._update(),h},r.prototype.exclude=function(a){var h=this._create();return h._excluded[a]=!0,h._update(),h},r.prototype.read=function(){var a="";this._match_pattern?a=this._input.read(this._starting_pattern):a=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),a+=h,h=this._read_template();return this._until_after&&(a+=this._input.readUntilAfter(this._until_pattern)),a},r.prototype.__set_templated_pattern=function(){var a=[];this._disabled.php||a.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||a.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||a.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(a.push(this.__patterns.django._starting_pattern.source),a.push(this.__patterns.django_value._starting_pattern.source),a.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||a.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&a.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+a.join("|")+")")},r.prototype._read_template=function(){var a="",h=this._input.peek();if(h==="<"){var s=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&s==="?"&&(a=a||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&s==="%"&&(a=a||this.__patterns.erb.read())}else h==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(a=a||this.__patterns.handlebars_comment.read(),a=a||this.__patterns.handlebars_unescaped.read(),a=a||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(a=a||this.__patterns.django_value.read()),this._excluded.django||(a=a||this.__patterns.django_comment.read(),a=a||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(a=a||this.__patterns.smarty_comment.read(),a=a||this.__patterns.smarty_literal.read(),a=a||this.__patterns.smarty.read()));return a},e.exports.TemplatablePattern=r}],I={};function H(e){var C=I[e];if(C!==void 0)return C.exports;var g=I[e]={exports:{}};return A[e](g,g.exports,H),g.exports}var P=H(0);M=P})();var z=M;!(ce=[],W=function(){return{js_beautify:z}}.apply(he,ce),W!==void 0&&(Pe.exports=W))})()},"6nfa":function(Pe,he,j){Pe.exports={flex_box_center:"flex_box_center___24EuS",flex_space_between:"flex_space_between___H0sq_",flex_box_vertical_center:"flex_box_vertical_center___lroQv",flex_box_center_end:"flex_box_center_end___2zqAg",flex_box_column:"flex_box_column___1sePp",row:"row___FQAuJ",title:"title___1l3-g",tagsWrap:"tagsWrap___18FE-",action:"action___asdVT",bar:"bar___M_nl0",name:"name___BKyJY",active:"active___1eybt",tagsBorderWrap:"tagsBorderWrap___1NzgL"}},"746U":function(Pe,he,j){"use strict";j.d(he,"f",function(){return ce}),j.d(he,"l",function(){return W}),j.d(he,"k",function(){return M}),j.d(he,"j",function(){return z}),j.d(he,"g",function(){return A}),j.d(he,"m",function(){return I}),j.d(he,"h",function(){return H}),j.d(he,"n",function(){return P}),j.d(he,"c",function(){return e}),j.d(he,"a",function(){return C}),j.d(he,"i",function(){return g}),j.d(he,"o",function(){return f}),j.d(he,"e",function(){return a}),j.d(he,"d",function(){return h}),j.d(he,"p",function(){return s}),j.d(he,"b",function(){return i});function ce(n){return Array.isArray(n)}function W(n){return typeof n=="string"}function M(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)&&!(n instanceof RegExp)&&!(n instanceof Date)}function z(n){return typeof n=="number"&&!isNaN(n)}function A(n){return n===!0||n===!1}function I(n){return typeof n=="undefined"}function H(n){return!P(n)}function P(n){return I(n)||n===null}function e(n,t){if(!n)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function C(n){if(P(n))throw new Error("Assertion Failed: argument is undefined or null");return n}function g(n){return typeof n=="function"}function f(n,t){const b=Math.min(n.length,t.length);for(let v=0;v<b;v++)o(n[v],t[v])}function o(n,t){if(W(t)){if(typeof n!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(g(t)){try{if(n instanceof t)return}catch(b){}if(!P(n)&&n.constructor===t)return;if(t.length===1&&t.call(void 0,n)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function r(n){let t=[],b=Object.getPrototypeOf(n);for(;Object.prototype!==b;)t=t.concat(Object.getOwnPropertyNames(b)),b=Object.getPrototypeOf(b);return t}function a(n){const t=[];for(const b of r(n))typeof n[b]=="function"&&t.push(b);return t}function h(n,t){const b=E=>function(){const w=Array.prototype.slice.call(arguments,0);return t(E,w)};let v={};for(const E of n)v[E]=b(E);return v}function s(n){return n===null?void 0:n}function i(n,t="Unreachable"){throw new Error(t)}},"8HAY":function(Pe,he,j){"use strict";j.d(he,"a",function(){return A}),j.d(he,"b",function(){return I}),j.d(he,"d",function(){return H}),j.d(he,"e",function(){return P}),j.d(he,"c",function(){return e});var ce=j("MI8n"),W=j("pmY6"),M=j("3/fG"),z=function(C,g,f,o){function r(a){return a instanceof f?a:new f(function(h){h(a)})}return new(f||(f=Promise))(function(a,h){function s(t){try{n(o.next(t))}catch(b){h(b)}}function i(t){try{n(o.throw(t))}catch(b){h(b)}}function n(t){t.done?a(t.value):r(t.value).then(s,i)}n((o=o.apply(C,g||[])).next())})};class A extends W.a{constructor(C,g="",f="",o=!0,r){super();this._onDidChange=this._register(new ce.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=C,this._label=g,this._cssClass=f,this._enabled=o,this._actionCallback=r}get id(){return this._id}get label(){return this._label}set label(C){this._setLabel(C)}_setLabel(C){this._label!==C&&(this._label=C,this._onDidChange.fire({label:C}))}get tooltip(){return this._tooltip||""}set tooltip(C){this._setTooltip(C)}_setTooltip(C){this._tooltip!==C&&(this._tooltip=C,this._onDidChange.fire({tooltip:C}))}get class(){return this._cssClass}set class(C){this._setClass(C)}_setClass(C){this._cssClass!==C&&(this._cssClass=C,this._onDidChange.fire({class:C}))}get enabled(){return this._enabled}set enabled(C){this._setEnabled(C)}_setEnabled(C){this._enabled!==C&&(this._enabled=C,this._onDidChange.fire({enabled:C}))}get checked(){return this._checked}set checked(C){this._setChecked(C)}_setChecked(C){this._checked!==C&&(this._checked=C,this._onDidChange.fire({checked:C}))}run(C,g){return z(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(C))})}}class I extends W.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new ce.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new ce.b),this.onDidRun=this._onDidRun.event}run(C,g){return z(this,void 0,void 0,function*(){if(!C.enabled)return;this._onBeforeRun.fire({action:C});let f;try{yield this.runAction(C,g)}catch(o){f=o}this._onDidRun.fire({action:C,error:f})})}runAction(C,g){return z(this,void 0,void 0,function*(){yield C.run(g)})}}class H extends A{constructor(C){super(H.ID,C,C?"separator text":"separator");this.checked=!1,this.enabled=!1}}H.ID="vs.actions.separator";class P{constructor(C,g,f,o){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=C,this.label=g,this.class=o,this._actions=f}get actions(){return this._actions}dispose(){}run(){return z(this,void 0,void 0,function*(){})}}class e extends A{constructor(){super(e.ID,M.a("submenu.empty","(empty)"),void 0,!1)}}e.ID="vs.actions.empty"},"8WcF":function(Pe,he,j){Pe.exports={flex_box_center:"flex_box_center___2fahw",flex_space_between:"flex_space_between___1h4HM",flex_box_vertical_center:"flex_box_vertical_center___2kxeE",flex_box_center_end:"flex_box_center_end___OjPB4",flex_box_column:"flex_box_column___3zY1h",orderWrap:"orderWrap___VQuq1",orderIconWrap:"orderIconWrap___18q7W",orderAsc:"orderAsc___3WBGg",orderDesc:"orderDesc____ipxK",active:"active___3EMfI",cursorPointer:"cursorPointer___3og_L",orderTextWrap:"orderTextWrap___XQlmv"}},"8hTe":function(Pe,he,j){Pe.exports={button:"button___1wy9m"}},"8mKB":function(Pe,he,j){"use strict";var ce=j("rePB"),W=j("1OyB"),M=j("vuIU"),z=j("Ji7U"),A=j("md7G"),I=j("foSv"),H=j("q1tI"),P=j.n(H),e=j("m+aA"),C=j("TSYQ"),g=j.n(C),f=j("4IlW");function o(p){var u=p.pageXOffset,l="scrollLeft";if(typeof u!="number"){var m=p.document;u=m.documentElement[l],typeof u!="number"&&(u=m.body[l])}return u}function r(p){var u,l,m=p.ownerDocument,c=m.body,T=m&&m.documentElement,N=p.getBoundingClientRect();return u=N.left,l=N.top,u-=T.clientLeft||c.clientLeft||0,l-=T.clientTop||c.clientTop||0,{left:u,top:l}}function a(p){var u=r(p),l=p.ownerDocument,m=l.defaultView||l.parentWindow;return u.left+=o(m),u.left}function h(p){var u=s();return function(){var m=Object(I.a)(p),c;if(u){var T=Object(I.a)(this).constructor;c=Reflect.construct(m,arguments,T)}else c=m.apply(this,arguments);return Object(A.a)(this,c)}}function s(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(p){return!1}}var i=function(p){Object(z.a)(l,p);var u=h(l);function l(){var m;return Object(W.a)(this,l),m=u.apply(this,arguments),m.onHover=function(c){var T=m.props,N=T.onHover,D=T.index;N(c,D)},m.onClick=function(c){var T=m.props,N=T.onClick,D=T.index;N(c,D)},m.onKeyDown=function(c){var T=m.props,N=T.onClick,D=T.index;c.keyCode===13&&N(c,D)},m}return Object(M.a)(l,[{key:"getClassName",value:function(){var c=this.props,T=c.prefixCls,N=c.index,D=c.value,y=c.allowHalf,O=c.focused,k=N+1,R=T;return D===0&&N===0&&O?R+=" ".concat(T,"-focused"):y&&D+.5>=k&&D<k?(R+=" ".concat(T,"-half ").concat(T,"-active"),O&&(R+=" ".concat(T,"-focused"))):(R+=k<=D?" ".concat(T,"-full"):" ".concat(T,"-zero"),k===D&&O&&(R+=" ".concat(T,"-focused"))),R}},{key:"render",value:function(){var c=this.onHover,T=this.onClick,N=this.onKeyDown,D=this.props,y=D.disabled,O=D.prefixCls,k=D.character,R=D.characterRender,B=D.index,V=D.count,ee=D.value,re=typeof k=="function"?k(this.props):k,_e=P.a.createElement("li",{className:this.getClassName()},P.a.createElement("div",{onClick:y?null:T,onKeyDown:y?null:N,onMouseMove:y?null:c,role:"radio","aria-checked":ee>B?"true":"false","aria-posinset":B+1,"aria-setsize":V,tabIndex:y?-1:0},P.a.createElement("div",{className:"".concat(O,"-first")},re),P.a.createElement("div",{className:"".concat(O,"-second")},re)));return R&&(_e=R(_e,this.props)),_e}}]),l}(P.a.Component);function n(p,u){var l=Object.keys(p);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(p);u&&(m=m.filter(function(c){return Object.getOwnPropertyDescriptor(p,c).enumerable})),l.push.apply(l,m)}return l}function t(p){for(var u=1;u<arguments.length;u++){var l=arguments[u]!=null?arguments[u]:{};u%2?n(Object(l),!0).forEach(function(m){Object(ce.a)(p,m,l[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(l)):n(Object(l)).forEach(function(m){Object.defineProperty(p,m,Object.getOwnPropertyDescriptor(l,m))})}return p}function b(p){var u=v();return function(){var m=Object(I.a)(p),c;if(u){var T=Object(I.a)(this).constructor;c=Reflect.construct(m,arguments,T)}else c=m.apply(this,arguments);return Object(A.a)(this,c)}}function v(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(p){return!1}}function E(){}var w=function(p){Object(z.a)(l,p);var u=b(l);function l(m){var c;Object(W.a)(this,l),c=u.call(this,m),c.onHover=function(N,D){var y=c.props.onHoverChange,O=c.getStarValue(D,N.pageX),k=c.state.cleanedValue;O!==k&&c.setState({hoverValue:O,cleanedValue:null}),y(O)},c.onMouseLeave=function(){var N=c.props.onHoverChange;c.setState({hoverValue:void 0,cleanedValue:null}),N(void 0)},c.onClick=function(N,D){var y=c.props.allowClear,O=c.state.value,k=c.getStarValue(D,N.pageX),R=!1;y&&(R=k===O),c.onMouseLeave(),c.changeValue(R?0:k),c.setState({cleanedValue:R?k:null})},c.onFocus=function(){var N=c.props.onFocus;c.setState({focused:!0}),N&&N()},c.onBlur=function(){var N=c.props.onBlur;c.setState({focused:!1}),N&&N()},c.onKeyDown=function(N){var D=N.keyCode,y=c.props,O=y.count,k=y.allowHalf,R=y.onKeyDown,B=y.direction,V=B==="rtl",ee=c.state.value;D===f.a.RIGHT&&ee<O&&!V?(k?ee+=.5:ee+=1,c.changeValue(ee),N.preventDefault()):D===f.a.LEFT&&ee>0&&!V||D===f.a.RIGHT&&ee>0&&V?(k?ee-=.5:ee-=1,c.changeValue(ee),N.preventDefault()):D===f.a.LEFT&&ee<O&&V&&(k?ee+=.5:ee+=1,c.changeValue(ee),N.preventDefault()),R&&R(N)},c.saveRef=function(N){return function(D){c.stars[N]=D}},c.saveRate=function(N){c.rate=N};var T=m.value;return T===void 0&&(T=m.defaultValue),c.stars={},c.state={value:T,focused:!1,cleanedValue:null},c}return Object(M.a)(l,[{key:"componentDidMount",value:function(){var c=this.props,T=c.autoFocus,N=c.disabled;T&&!N&&this.focus()}},{key:"getStarDOM",value:function(c){return Object(e.a)(this.stars[c])}},{key:"getStarValue",value:function(c,T){var N=this.props,D=N.allowHalf,y=N.direction,O=y==="rtl",k=c+1;if(D){var R=this.getStarDOM(c),B=a(R),V=R.clientWidth;(O&&T-B>V/2||!O&&T-B<V/2)&&(k-=.5)}return k}},{key:"focus",value:function(){var c=this.props.disabled;c||this.rate.focus()}},{key:"blur",value:function(){var c=this.props.disabled;c||this.rate.blur()}},{key:"changeValue",value:function(c){var T=this.props.onChange;"value"in this.props||this.setState({value:c}),T(c)}},{key:"render",value:function(){for(var c=this.props,T=c.count,N=c.allowHalf,D=c.style,y=c.prefixCls,O=c.disabled,k=c.className,R=c.character,B=c.characterRender,V=c.tabIndex,ee=c.direction,re=this.state,_e=re.value,se=re.hoverValue,ye=re.focused,ve=[],Ee=O?"".concat(y,"-disabled"):"",le=0;le<T;le+=1)ve.push(P.a.createElement(i,{ref:this.saveRef(le),index:le,count:T,disabled:O,prefixCls:"".concat(y,"-star"),allowHalf:N,value:se===void 0?_e:se,onClick:this.onClick,onHover:this.onHover,key:le,character:R,characterRender:B,focused:ye}));var F=g()(y,Ee,k,Object(ce.a)({},"".concat(y,"-rtl"),ee==="rtl"));return P.a.createElement("ul",{className:F,style:D,onMouseLeave:O?null:this.onMouseLeave,tabIndex:O?-1:V,onFocus:O?null:this.onFocus,onBlur:O?null:this.onBlur,onKeyDown:O?null:this.onKeyDown,ref:this.saveRate,role:"radiogroup"},ve)}}],[{key:"getDerivedStateFromProps",value:function(c,T){return"value"in c&&c.value!==void 0?t(t({},T),{},{value:c.value}):T}}]),l}(P.a.Component);w.defaultProps={defaultValue:0,count:5,allowHalf:!1,allowClear:!0,style:{},prefixCls:"rc-rate",onChange:E,character:"\u2605",onHoverChange:E,tabIndex:0,direction:"ltr"};var x=w,_=he.a=x},"9Bee":function(Pe,he,j){"use strict";var ce=j("DYRE"),W=j("zeV3"),M=j("+L6B"),z=j("2/Rp"),A=j("k1fw"),I=j("9og8"),H=j("tJVT"),P=j("WmNS"),e=j.n(P),C=j("q1tI"),g=j.n(C),f=j("vg9a"),o=j("DlQD"),r=j.n(o),a=j("rUJ1");function h(te,Y){var X=te.match(/^(\s+)(?:```)/);if(X===null)return Y;var Z=X[1];return Y.split(`
|
|
`).map(function(ne){var J=ne.match(/^\s+/);if(J===null)return ne;var Q=Object(H.a)(J,1),ie=Q[0];return ie.length>=Z.length?ne.slice(Z.length):ne}).join(`
|
|
`)}var s=[],i=["<ul>"],n=new r.a.Renderer,t=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function b(){s.length=0,i=["<ul>"]}var v={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function E(te,Y,X,Z){if(Y>=te.length||te[Y].level<=X)return Y;var ne=te[Y];Z.push("<li><a href='#"+ne.anchor+"'>"+ne.text+"</a>"),Y++;var J=[];return Y=E(te,Y,ne.level,J),J.length>0&&(Z.push("<ul>"),J.forEach(function(Q){Z.push(Q)}),Z.push("</ul>")),Z.push("</li>"),Y=E(te,Y,X,Z),Y}function w(){return E(s,0,0,i),i.push("</ul>"),i.join("")}var x={heading:function(Y){var X=t.exec(Y);if(X)return{type:"heading",raw:X[0],depth:X[1].length,text:X[2]}},fences:function(Y){var X=this.rules.block.fences.exec(Y);if(X){var Z=X[0],ne=h(Z,X[3]||""),J=X[2]?X[2].trim():X[2];if(["latex","katex","math"].indexOf(J)>=0){var Q=u(),ie=ne;ne=Q,l[Q]={type:"block",expression:ie}}return{type:"code",raw:Z,lang:J,text:ne}}}},_=/(?:\${2})([^\n`]+?)(?:\${2})/gi,p=0,u=function(){return"__special_katext_id_".concat(p++,"__")},l={};function m(){return l}function c(){p=0,l={}}function T(te){return te=te.replace(_,function(Y,X){var Z=u();return l[Z]={type:"inline",expression:X},Z}),te}var N=n.listitem;n.listitem=function(te){return N(T(te))};var D=n.paragraph;n.paragraph=function(te){return D(T(te))};var y=n.tablecell;n.tablecell=function(te,Y){return y(T(te),Y)},n.code=function(te,Y,X){var Z=(Y||"").match(/\S*/)[0];return Z?["latex","katex","math"].indexOf(Z)>=0?"<p class='editormd-tex'>".concat(te,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(Y,'">').concat(X?te:Object(a.escape)(te,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(X?te:Object(a.escape)(te,!0))+"</code></pre>"},n.heading=function(te,Y,X){var Z=this.options.headerPrefix+X.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return s.push({anchor:Z,level:Y,text:te}),"<h"+Y+' id="'+Z+'">'+te+"</h"+Y+">"},r.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),r.a.use({tokenizer:x,renderer:n});var O=r.a,k=j("SJMd"),R=j("ulZh"),B=j.n(R),V=j("m3rI"),ee=j("Oy/b"),re=j("p5ED"),_e=j("ErOA"),se=j("STEk");/* **********************************
|
|
cropro version 1.2.0
|
|
@license SEE LICENSE IN LICENSE
|
|
|
|
copyright Alan Mendelevich
|
|
see README and LICENSE for details
|
|
********************************** *//*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** */var ye=function(te,Y){return(ye=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(X,Z){X.__proto__=Z}||function(X,Z){for(var ne in Z)Object.prototype.hasOwnProperty.call(Z,ne)&&(X[ne]=Z[ne])})(te,Y)};function ve(te,Y){if(typeof Y!="function"&&Y!==null)throw new TypeError("Class extends value "+String(Y)+" is not a constructor or null");function X(){this.constructor=te}ye(te,Y),te.prototype=Y===null?Object.create(Y):(X.prototype=Y.prototype,new X)}function Ee(te,Y,X,Z){return new(X||(X=Promise))(function(ne,J){function Q(be){try{oe(Z.next(be))}catch(Te){J(Te)}}function ie(be){try{oe(Z.throw(be))}catch(Te){J(Te)}}function oe(be){var Te;be.done?ne(be.value):(Te=be.value,Te instanceof X?Te:new X(function(Ie){Ie(Te)})).then(Q,ie)}oe((Z=Z.apply(te,Y||[])).next())})}function le(te,Y){var X,Z,ne,J,Q={label:0,sent:function(){if(1&ne[0])throw ne[1];return ne[1]},trys:[],ops:[]};return J={next:ie(0),throw:ie(1),return:ie(2)},typeof Symbol=="function"&&(J[Symbol.iterator]=function(){return this}),J;function ie(oe){return function(be){return function(Te){if(X)throw new TypeError("Generator is already executing.");for(;Q;)try{if(X=1,Z&&(ne=2&Te[0]?Z.return:Te[0]?Z.throw||((ne=Z.return)&&ne.call(Z),0):Z.next)&&!(ne=ne.call(Z,Te[1])).done)return ne;switch(Z=0,ne&&(Te=[2&Te[0],ne.value]),Te[0]){case 0:case 1:ne=Te;break;case 4:return Q.label++,{value:Te[1],done:!1};case 5:Q.label++,Z=Te[1],Te=[0];continue;case 7:Te=Q.ops.pop(),Q.trys.pop();continue;default:if(!(ne=Q.trys,(ne=ne.length>0&&ne[ne.length-1])||Te[0]!==6&&Te[0]!==2)){Q=0;continue}if(Te[0]===3&&(!ne||Te[1]>ne[0]&&Te[1]<ne[3])){Q.label=Te[1];break}if(Te[0]===6&&Q.label<ne[1]){Q.label=ne[1],ne=Te;break}if(ne&&Q.label<ne[2]){Q.label=ne[2],Q.ops.push(Te);break}ne[2]&&Q.ops.pop(),Q.trys.pop();continue}Te=Y.call(te,Q)}catch(Ie){Te=[6,Ie],Z=0}finally{X=ne=0}if(5&Te[0])throw Te[1];return{value:Te[0]?Te[1]:void 0,done:!0}}([oe,be])}}}var F=function(){function te(){}return te.addKey=function(Y){te.key=Y},Object.defineProperty(te,"isLicensed",{get:function(){return!!te.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(te.key)},enumerable:!1,configurable:!0}),te}(),d=function(){function te(){}return te.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},te.setAttributes=function(Y,X){for(var Z=0,ne=X;Z<ne.length;Z++){var J=ne[Z],Q=J[0],ie=J[1];Y.setAttribute(Q,ie)}},te.createRect=function(Y,X,Z){var ne=document.createElementNS("http://www.w3.org/2000/svg","rect");return ne.setAttribute("width",Y.toString()),ne.setAttribute("height",X.toString()),Z&&te.setAttributes(ne,Z),ne},te.createLine=function(Y,X,Z,ne,J){var Q=document.createElementNS("http://www.w3.org/2000/svg","line");return Q.setAttribute("x1",Y.toString()),Q.setAttribute("y1",X.toString()),Q.setAttribute("x2",Z.toString()),Q.setAttribute("y2",ne.toString()),J&&te.setAttributes(Q,J),Q},te.createPolygon=function(Y,X){var Z=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Z.setAttribute("points",Y),X&&te.setAttributes(Z,X),Z},te.createCircle=function(Y,X){var Z=document.createElementNS("http://www.w3.org/2000/svg","circle");return Z.setAttribute("cx",(Y/2).toString()),Z.setAttribute("cy",(Y/2).toString()),Z.setAttribute("r",Y.toString()),X&&te.setAttributes(Z,X),Z},te.createEllipse=function(Y,X,Z){var ne=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ne.setAttribute("cx",(Y/2).toString()),ne.setAttribute("cy",(X/2).toString()),ne.setAttribute("rx",(Y/2).toString()),ne.setAttribute("ry",(X/2).toString()),Z&&te.setAttributes(ne,Z),ne},te.createGroup=function(Y){var X=document.createElementNS("http://www.w3.org/2000/svg","g");return Y&&te.setAttributes(X,Y),X},te.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},te.createMarker=function(Y,X,Z,ne,J,Q,ie){var oe=document.createElementNS("http://www.w3.org/2000/svg","marker");return te.setAttributes(oe,[["id",Y],["orient",X],["markerWidth",Z.toString()],["markerHeight",ne.toString()],["refX",J.toString()],["refY",Q.toString()]]),oe.appendChild(ie),oe},te.createText=function(Y){var X=document.createElementNS("http://www.w3.org/2000/svg","text");return X.setAttribute("x","0"),X.setAttribute("y","0"),Y&&te.setAttributes(X,Y),X},te.createTSpan=function(Y,X){var Z=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Z.textContent=Y,X&&te.setAttributes(Z,X),Z},te.createImage=function(Y){var X=document.createElementNS("http://www.w3.org/2000/svg","image");return Y&&te.setAttributes(X,Y),X},te.createPoint=function(Y,X){var Z=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Z.x=Y,Z.y=X,Z},te.createPath=function(Y,X){var Z=document.createElementNS("http://www.w3.org/2000/svg","path");return Z.setAttribute("d",Y),X&&te.setAttributes(Z,X),Z},te.createElement=function(Y,X){var Z=document.createElementNS("http://www.w3.org/2000/svg",Y);return X&&te.setAttributes(Z,X),Z},te.getHollowRectanglePath=function(Y,X,Z,ne,J,Q,ie,oe){return"M"+Y+","+X+"V"+(X+ne)+"H"+(Y+Z)+"V"+X+"H"+J+"V"+Q+"H"+(J+ie)+"V"+(Q+oe)+"H"+J+"V"+X+"Z"},te}(),S=function(){function te(Y){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Y+"_"}return Object.defineProperty(te.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(te.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(te.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),te.prototype.addClass=function(Y){return this.styleSheet===void 0&&this.addStyleSheet(),Y.name=""+this.classNamePrefix+Y.localName,this.classes.push(Y),this.styleSheet.sheet.insertRule("."+Y.name+" {"+Y.style+"}",this.styleSheet.sheet.cssRules.length),Y},te.prototype.addRule=function(Y){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Y),this.styleSheet.sheet.insertRule(Y.selector+" {"+Y.style+"}",this.styleSheet.sheet.cssRules.length)},te.prototype.addStyleSheet=function(){var Y;this.styleSheet=document.createElement("style"),((Y=this.styleSheetRoot)!==null&&Y!==void 0?Y:document.head).appendChild(this.styleSheet),this.addRule(new L("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new L("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new L("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new G("_fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new G("_fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},te.prototype.removeStyleSheet=function(){var Y;this.styleSheet&&(((Y=this.styleSheetRoot)!==null&&Y!==void 0?Y:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},te}(),L=function(te,Y){this.selector=te,this.style=Y},G=function(te,Y){this.localName=te,this.style=Y},U=function(){function te(){this.blocks=[],this.display=""}return te.prototype.addButtonBlock=function(Y){Y.className=this.blockClassName,Y.buttonClassName=this.buttonClassName,Y.buttonColorsClassName=this.buttonColorsClassName,Y.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(Y)},te.prototype.addElementBlock=function(Y){Y.className===void 0&&(Y.className=this.blockClassName),this.blocks.push(Y)},te.prototype.getUI=function(){var Y=document.createElement("div");return Y.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,Y.style.display=this.display,this.blocks.forEach(function(X){return Y.appendChild(X.getUI())}),Y},te}(),$=function(){function te(){}return te.prototype.getUI=function(){var Y=document.createElement("div");if(Y.className=this.className,this.minWidth!==void 0&&(Y.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":Y.style.justifyContent="flex-start";break;case"center":Y.style.justifyContent="center";break;case"end":Y.style.justifyContent="flex-end"}return Y.style.whiteSpace="nowrap",Y},te}(),de=function(te){function Y(){var X=te!==null&&te.apply(this,arguments)||this;return X.buttons=[],X}return ve(Y,te),Y.prototype.addButton=function(X){X.className=this.buttonClassName,X.colorsClassName=this.buttonColorsClassName,X.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(X)},Y.prototype.getUI=function(){var X=te.prototype.getUI.call(this);return this.buttons.forEach(function(Z){return X.appendChild(Z.getUI())}),X},Y}($),xe=function(){function te(Y,X){this._isActive=!1,this._isHidden=!1,this._icon=Y,this.title=X,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(te.prototype,"icon",{get:function(){return this._icon},set:function(Y){this._icon=Y,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isActive",{get:function(){return this._isActive},set:function(Y){this._isActive=Y,this.adjustClassName()},enumerable:!1,configurable:!0}),te.prototype.getUI=function(){var Y=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return Y.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},te.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,"")))},te.prototype.hide=function(){this._isHidden=!0},te}(),q=function(te){function Y(){var X=te!==null&&te.apply(this,arguments)||this;return X.elements=[],X}return ve(Y,te),Y.prototype.addElement=function(X){this.elements.push(X)},Y.prototype.getUI=function(){var X=te.prototype.getUI.call(this);return this.elements.forEach(function(Z){return X.appendChild(Z)}),X},Y}($),ae=function(){function te(Y,X){this.horizontal=Y,this.vertical=X}return Object.defineProperty(te.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),te.prototype.getVerticalLength=function(Y){return Y/this.ratio},te.prototype.getHorizontalLength=function(Y){return Y*this.ratio},te}(),fe=function(){function te(){}return te.getIcon=function(Y,X){if(Y>0&&X>0){var Z=new ae(Y,X),ne=Z.ratio>=1?20:Z.getHorizontalLength(20),J=Z.ratio<1?20:Z.getVerticalLength(20),Q=document.createElementNS("http://www.w3.org/2000/svg","svg");Q.setAttribute("xmlns","http://www.w3.org/2000/svg"),Q.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Q);var ie=d.createDefs();Q.appendChild(ie);var oe=d.createElement("clipPath",[["id","text-bg-clip"]]);ie.appendChild(oe);var be=d.createPath(d.getHollowRectanglePath((24-ne)/2,(24-J)/2,ne,J,(24-ne)/2+2,(24-J)/2+2,ne-4,J-4));Q.appendChild(be);var Te=d.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Te.appendChild(d.createTSpan(Y+":"+X)),Q.appendChild(Te);var Ie=Te.getBBox();d.setAttributes(Te,[["x",((24-Ie.width)/2).toString()],["y",((24-Ie.height)/2-Ie.y).toString()]]);var Je=d.createPath(d.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Ie.width))/2,(24-Math.ceil(Ie.height))/2,Math.ceil(Ie.width),Math.ceil(Ie.height)));return oe.appendChild(Je),d.setAttributes(be,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Q),Q.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>'},te}(),pe=function(te){function Y(X,Z,ne){var J=te.call(this,X,Z)||this;return J.isDropdownOpen=!1,J.onClick=J.dropdownButtonClicked,J.dropdownButtons=ne,J}return ve(Y,te),Y.prototype.setupDropdown=function(){var X=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(Z){Z.className=X.className,Z.colorsClassName=X.colorsClassName,X.dropdownBlock.appendChild(Z.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},Y.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},Y.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},Y.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},Y.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},Y.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},Y}(xe),Ce=function(){function te(Y,X){this.GRIP_SIZE=10,this.color=Y,this.fillColor=X,this.visual=d.createGroup(),this.visual.appendChild(d.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(d.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return te.prototype.ownsTarget=function(Y){return Y===this.visual||Y===this.visual.childNodes[0]||Y===this.visual.childNodes[1]},te.prototype.setCenter=function(Y,X){this.visual.childNodes.forEach(function(Z){return d.setAttributes(Z,[["cx",Y.toString()],["cy",X.toString()]])})},te}(),Me=function(){function te(Y,X,Z,ne){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=Y,this.canvasHeight=X,this.margin=Z,this.container=ne,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(te.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(Y){this._aspectRatio=Y,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(Y){this._isGridVisible=Y,this.gridContainer&&d.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(Y){this._zoomFactor=Y,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),te.prototype.open=function(){var Y=this;this.cropShadeElement=d.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=d.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var X=0;X<this.numberOfGridLines;X++)this.horizontalGridLines.push(d.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(d.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(Z){return Y.gridContainer.appendChild(Z)}),this.verticalGridLines.forEach(function(Z){return Y.gridContainer.appendChild(Z)}),this.cropRectElement=d.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Ce(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Ce(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Ce(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Ce(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},te.prototype.setCropRectangle=function(Y){this.cropRect=Y;var X=Object.assign({},this.cropRect);this.zoomFactor!==1&&(X.width=this.cropRect.width*this.zoomFactor,X.height=this.cropRect.height*this.zoomFactor,X.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-X.width/2,X.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-X.height/2),d.setAttributes(this.cropRectElement,[["x",X.x.toString()],["y",X.y.toString()],["width",X.width.toString()],["height",X.height.toString()]]);var Z=X.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(J,Q){var ie=X.y+Z*(Q+1);d.setAttributes(J,[["x1",""+X.x],["y1",""+ie],["x2",""+(X.x+X.width)],["y2",""+ie]])});var ne=X.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(J,Q){var ie=X.x+ne*(Q+1);d.setAttributes(J,[["x1",""+ie],["y1",""+X.y],["x2",""+ie],["y2",""+(X.y+X.height)]])}),d.setAttributes(this.cropShadeElement,[["d",d.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,X.x,X.y,X.width,X.height)]]),this.topLeftGrip.setCenter(X.x,X.y),this.topRightGrip.setCenter(X.x+X.width,X.y),this.bottomLeftGrip.setCenter(X.x,X.y+X.height),this.bottomRightGrip.setCenter(X.x+X.width,X.y+X.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},te.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)},te.prototype.clientToLocalCoordinates=function(Y,X){var Z=this.container.getBoundingClientRect();return{x:Y-Z.left+this.margin,y:X-Z.top+this.margin}},te.prototype.onPointerDown=function(Y){this.container.setPointerCapture(Y.pointerId),this.previousPoint=this.clientToLocalCoordinates(Y.clientX,Y.clientY),this.cropRectElement===Y.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(Y.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(Y.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(Y.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(Y.target)&&(this.activeGrip=this.bottomRightGrip)},te.prototype.onPointerMove=function(Y){if(this.isMoving)this.move(this.clientToLocalCoordinates(Y.clientX,Y.clientY));else if(this.activeGrip){var X=this.clientToLocalCoordinates(Y.clientX,Y.clientY);this.resize(X)}Y.preventDefault()},te.prototype.onPointerUp=function(Y){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(Y.pointerId)},te.prototype.move=function(Y){var X=Y.x-this.previousPoint.x,Z=Y.y-this.previousPoint.y;this.zoomFactor!==1&&(X=-X/this.zoomFactor,Z=-Z/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+X),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+Z),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=Y},te.prototype.resize=function(Y){var X=Object.assign({},this.cropRect),Z=Y.x-this.previousPoint.x,ne=Y.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:X.x+Z<this.margin&&(Z=this.margin-X.x),X.x+=Z,X.width=this.cropRect.x+this.cropRect.width-X.x;break;case this.bottomRightGrip:case this.topRightGrip:X.width+Z>this.canvasWidth*this.zoomFactor&&(Z=this.canvasWidth*this.zoomFactor-X.width),X.width+=Z}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(X.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(Z),X.height=this.aspectRatio.getVerticalLength(X.width)):(X.y+=ne,X.height=this.cropRect.y+this.cropRect.height-X.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?X.height=this.aspectRatio.getVerticalLength(X.width):X.height+=ne}X.width<10&&(X.x=this.cropRect.x,X.width=10),X.height<10&&(X.y=this.cropRect.y,X.height=10),this.previousPoint=Y,X.x>=this.margin&&X.y>=this.margin&&X.x-this.margin+X.width<=this.canvasWidth&&X.y-this.margin+X.height<=this.canvasHeight&&(this.cropRect=X,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},te.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var Y=this.cropRect.x+this.cropRect.width/2,X=this.cropRect.y+this.cropRect.height/2,Z=this.aspectRatio.getHorizontalLength(this.cropRect.height),ne=this.aspectRatio.getVerticalLength(this.cropRect.width);Z/this.canvasWidth<ne/this.canvasHeight?this.cropRect.width=Z:this.cropRect.height=ne,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=Y-this.cropRect.width/2,this.cropRect.y=X-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)}},te.prototype.getRescaledRect=function(Y,X,Z,ne,J,Q){var ie=Z/Y,oe=ne/X;return{x:(J.x-Q)*ie+Q,y:(J.y-Q)*oe+Q,width:J.width*ie,height:J.height*oe}},te.prototype.scaleCanvas=function(Y,X){var Z=this.getRescaledRect(this.canvasWidth,this.canvasHeight,Y,X,this.cropRect,this.margin);this.canvasWidth=Y,this.canvasHeight=X,this.onCropChange&&this.onCropChange(Z),this.setCropRectangle(Z)},te}(),He=function(){function te(Y){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=Y,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(te.prototype,"angle",{get:function(){return this._angle},set:function(Y){this._angle=Y,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),te.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},te.prototype.onPointerDown=function(Y){this.controlContainer.setPointerCapture(Y.pointerId),this.isDragging=!0,this.previousPoint={x:Y.clientX,y:Y.clientY}},te.prototype.onPointerMove=function(Y){this.isDragging&&(this.onAngleChange&&this.onAngleChange((Y.clientX-this.previousPoint.x)/5),this.previousPoint.x=Y.clientX)},te.prototype.onPointerUp=function(Y){this.isDragging&&this.onAngleChange&&this.onAngleChange((Y.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(Y.pointerId)},te.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var Y=this.angleLabelText.getBBox();d.setAttributes(this.angleLabelElement,[["x",((this.width-Y.width)/2).toString()],["y",(this.height/2).toString()]])}},te.prototype.positionScaleShape=function(){if(this.scaleShape){var Y=this.scaleShape.transform.baseVal.getItem(0);Y.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(Y,0)}},te.prototype.getVisual=function(){var Y=document.createElementNS("http://www.w3.org/2000/svg","svg");Y.setAttribute("xmlns","http://www.w3.org/2000/svg"),Y.setAttribute("width",this.width+"px"),Y.setAttribute("height",this.height+"px"),Y.setAttribute("viewBox","0 0 "+this.width+" "+this.height),Y.style.flexShrink="0",document.body.appendChild(Y);for(var X="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,Z=1;Z<=this.width/5+10;Z++){var ne=Z%5==0?this.height/3:this.height/6;X+="h4v"+-ne+"h1v"+ne}X+="v1H0Z",this.scaleShape=d.createPath(X);var J=d.createTransform();this.scaleShape.transform.baseVal.appendItem(J),Y.appendChild(this.scaleShape),this.angleLabelElement=d.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=d.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Q=d.createTSpan("");return Q.innerHTML="°",this.angleLabelElement.appendChild(Q),Y.appendChild(this.angleLabelElement),document.body.removeChild(Y),Y},te}(),je=function(){function te(){this.naturalSize=!1,this.imageType="image/png"}return te.prototype.rasterize=function(Y,X,Z,ne,J,Q,ie){var oe=this;return new Promise(function(be){var Te=document.createElement("canvas");Te.width=Y.width.baseVal.value-2*ne,Te.height=Y.height.baseVal.value-2*ne;var Ie=1,Je=1;oe.naturalSize===!0?(Ie=X.naturalWidth/(Y.width.baseVal.value-2*ne)/Q,Je=X.naturalHeight/(Y.height.baseVal.value-2*ne)/ie,Te.width=X.naturalWidth/Q,Te.height=X.naturalHeight/ie):oe.width!==void 0&&oe.height!==void 0&&(Ie=oe.width/Z.width,Je=oe.height/Z.height,Te.width*=Ie,Te.height*=Je);var ht=Te.getContext("2d");ht.translate(Te.width/2,Te.height/2),ht.rotate(J*Math.PI/180),ht.scale(Q,ie),ht.translate(-Te.width/2,-Te.height/2),ht.drawImage(X,0,0,Te.width,Te.height);var lt=document.createElement("canvas");lt.width=Z.width*Ie,lt.height=Z.height*Je,lt.getContext("2d").putImageData(ht.getImageData((Z.x-ne)*Ie,(Z.y-ne)*Je,Z.width*Ie,Z.height*Je),0,0),be(lt.toDataURL(oe.imageType,oe.imageQuality))})},te}(),Ye=function(){function te(Y){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=te.instanceCounter++,this.styles=new S(this.instanceNo),this.target=Y,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(te.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(Y){this._zoomToCropEnabled=Y,Y?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(Y){this._isGridVisible=Y,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"gridLines",{get:function(){return this._gridLines},set:function(Y){this._gridLines=Y,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(Y){this._rotationAngle=Y,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"aspectRatio",{get:function(){var Y;return(Y=this._aspectRatio)!==null&&Y!==void 0?Y:this.aspectRatios[0]},set:function(Y){this._aspectRatio=Y},enumerable:!1,configurable:!0}),te.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},te.prototype.show=function(){this.showUI(),this.open()},te.prototype.close=function(Y){Y===void 0&&(Y=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),Y||this.closeEventListeners.forEach(function(X){return X()}),this._isOpen=!1)},te.prototype.addRenderEventListener=function(Y){this.renderEventListeners.push(Y)},te.prototype.removeRenderEventListener=function(Y){this.renderEventListeners.indexOf(Y)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(Y),1)},te.prototype.addCloseEventListener=function(Y){this.closeEventListeners.push(Y)},te.prototype.removeCloseEventListener=function(Y){this.closeEventListeners.indexOf(Y)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(Y),1)},te.prototype.setupResizeObserver=function(){var Y=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Y.resize(Y.target.clientWidth,Y.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))},te.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var Y=1*this.target.clientWidth/this.target.clientHeight,X=this.contentDiv.clientWidth/Y>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*Y:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,Z=X+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/Y;this.resize(X,Z)}},te.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},te.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",d.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},te.prototype.resize=function(Y,X){this.imageWidth=Math.round(Y),this.imageHeight=Math.round(X),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()},te.prototype.setEditingTarget=function(){var Y=document.createElement("canvas");Y.width=this.target.naturalWidth,Y.height=this.target.naturalHeight,Y.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var X=Y.toDataURL();d.setAttributes(this.editingTarget,[["href",X]]),this.setEditingTargetSize()},te.prototype.setTopLeft=function(){var Y=this.target.getBoundingClientRect(),X=this.editorCanvas.getBoundingClientRect();this.left=Y.left-X.left-this.CANVAS_MARGIN,this.top=Y.top-X.top-this.CANVAS_MARGIN},te.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=d.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=d.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=d.createGroup(),this.editingTargetRotationScaleContainer=d.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var Y=d.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(Y);var X=d.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(X),this.editingTargetContainer=d.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)},te.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},te.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=d.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Me(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},te.prototype.zoomToCrop=function(){if(this.cropRect){var Y=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,X=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=Y+"px "+X+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-Y+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-X+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},te.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)},te.prototype.cropRectChanged=function(Y){this.cropRect=Y,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},te.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},te.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"},te.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},te.prototype.showUI=function(){switch(this.addStyles(),this.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var Y=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,X=this.target.offsetTop>Y+this.CANVAS_MARGIN?this.target.offsetTop-(Y+this.CANVAS_MARGIN):0;this.coverDiv.style.top=X+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},te.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},te.prototype.addTopToolbar=function(){var Y=this;this.topToolbar=new U,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 X=new de;X.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(X);var Z=[];this.aspectRatios.forEach(function(Je){var ht=new xe(fe.getIcon(Je.horizontal,Je.vertical),Je.horizontal===0&&Je.vertical===0?"FREE":Je.horizontal+":"+Je.vertical);ht.onClick=function(){return Y.ratioButtonClicked(Je)},Z.push(ht)}),this.aspectRatioButton=new pe(fe.getIcon(0,0),"Aspect ratio",Z),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,X.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ne=new xe('<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");ne.isActive=this.isGridVisible,ne.onClick=function(){Y.isGridVisible=!Y.isGridVisible,ne.isActive=Y.isGridVisible},X.addButton(ne);var J=new xe('<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(J.isActive=this.zoomToCropEnabled,J.onClick=function(){Y.zoomToCropEnabled=!Y.zoomToCropEnabled,J.isActive=Y.zoomToCropEnabled},X.addButton(J),!F.isLicensed){var Q=new q;this.topToolbar.addElementBlock(Q);var ie=document.createElement("div");ie.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var oe=document.createElement("a");oe.style.color="currentColor",oe.href="https://markerjs.com/products/cropro",oe.target="_blank",oe.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>',ie.appendChild(oe),Q.addElement(ie)}var be=new de;be.minWidth=3*this.toolbarHeight+"px",be.contentAlign="end",this.topToolbar.addButtonBlock(be);var Te=new xe('<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");Te.onClick=this.startRenderAndClose,be.addButton(Te),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Te.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Ie=new xe('<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");Ie.onClick=this.close,be.addButton(Ie),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Ie.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},te.prototype.addBottomToolbar=function(){var Y=this;this.bottomToolbar=new U,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 X=new de;X.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(X);var Z=new xe('<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");Z.onClick=this.rotateLeftButtonClicked,X.addButton(Z);var ne=new xe('<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");ne.onClick=this.rotateRightButtonClicked,X.addButton(ne);var J=new q;J.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(J),this.straightener=new He("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(be){Y.rotateBy(be),Y.straightener.angle=Y.rotationAngle},J.addElement(this.straightener.getUI());var Q=new de;Q.minWidth=2*this.toolbarHeight+"px",Q.contentAlign="end",this.bottomToolbar.addButtonBlock(Q);var ie=new xe('<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");ie.onClick=this.flipHorizontallyButtonClicked,Q.addButton(ie);var oe=new xe('<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");oe.onClick=this.flipVerticallyButtonClicked,Q.addButton(oe)},te.prototype.ratioButtonClicked=function(Y){this.aspectRatio=Y,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},te.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=fe.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},te.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new ae(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},te.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},te.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},te.prototype.restoreState=function(Y){if(Y){var X=this.cropLayer.getRescaledRect(Y.width,Y.height,this.imageWidth,this.imageHeight,Y.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(X),this.cropRectChanged(X),this.flippedHorizontally=Y.flippedHorizontally,this.flippedVertically=Y.flippedVertically,this.applyFlip(),this.rotationAngle=Y.rotationAngle,this.applyRotation()}},te.prototype.clientToLocalCoordinates=function(Y,X){var Z=this.cropImage.getBoundingClientRect();return{x:Y-Z.left,y:X-Z.top}},te.prototype.onWindowResize=function(){this.positionUI()},te.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var Y=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=Y+"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()},te.prototype.rotateLeftButtonClicked=function(){var Y=this.rotationAngle-90;this.rotationAngle%90!=0&&(Y+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(Y)},te.prototype.rotateRightButtonClicked=function(){var Y=this.rotationAngle+90;this.rotationAngle%90!=0&&(Y-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(Y)},te.prototype.rotateTo=function(Y){Y=(Y=Y>180?Y-360:Y)<=-180?Y+360:Y,this.rotationAngle=Y,this.applyRotation()},te.prototype.rotateBy=function(Y){this.rotateTo((this.rotationAngle+Y)%360)},te.prototype.applyRotation=function(){var Y=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var X=this.editingTargetRotationContainer.transform.baseVal.getItem(0);X.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(X,0);var Z=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/Z.width,this.imageHeight/Z.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=Y},te.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},te.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},te.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},te.prototype.startRenderAndClose=function(){return Ee(this,void 0,void 0,function(){var Y,X;return le(this,function(Z){switch(Z.label){case 0:return[4,this.render()];case 1:return Y=Z.sent(),X=this.getState(),this.renderEventListeners.forEach(function(ne){return ne(Y,X)}),this.close(!0),[2]}})})},te.prototype.render=function(){return Ee(this,void 0,void 0,function(){var Y;return le(this,function(X){switch(X.label){case 0:return(Y=new je).naturalSize=this.renderAtNaturalSize,Y.imageType=this.renderImageType,Y.imageQuality=this.renderImageQuality,Y.width=this.renderWidth,Y.height=this.renderHeight,this.unzoomFromCrop(),d.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,Y.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 X.sent(),[4,Y.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,X.sent()]}})})},te.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new G("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 G("toolbar_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new G("toolbar-block",`
|
|
display: flex;
|
|
align-items: center;
|
|
box-sizing: content-box;
|
|
`));var Y=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new G("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.toolbarHeight-2*Y)+`px;
|
|
height: `+(this.toolbarHeight-2*Y)+`px;
|
|
padding: `+Y+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new G("toolbar_button_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new G("toolbar_active_button",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
`)),this.styles.addRule(new L("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new L("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new G("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 G("toolbar_dropdown_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new G("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 G("toolbar_straightener",`
|
|
display: flex;
|
|
overflow: hidden;
|
|
justify-content: center;
|
|
height: `+(this.toolbarHeight-2*Y)+`px;
|
|
padding: `+Y+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new G("toolbar_straightener_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`))},te.instanceCounter=0,te}(),Xe=j("8hTe"),ze=j.n(Xe),Fe=/<pre[^>]*>/g;function et(te){var Y=document.createElement("div");return Y.innerHTML=te,Y.childNodes.length===0?"":Y.childNodes[0].nodeValue}var st=he.a=function(te){var Y=te.value,X=Y===void 0?"":Y,Z=te.edit,ne=Z===void 0?!1:Z,J=te.className,Q=te.showTextOnly,ie=te.showLines,oe=te.replaces,be=te.zoomImg,Te=te.hasMask,Ie=te.style,Je=Ie===void 0?{}:Ie,ht=te.stylesPrev,lt=ht===void 0?{}:ht,Rt=String(X),vt=Object(C.useRef)(),ut=Object(C.useRef)(),Ht=Object(C.useState)(""),Pt=Object(H.a)(Ht,2),Ut=Pt[0],Kt=Pt[1],It=Object(C.useState)("office"),mn=Object(H.a)(It,2),Bn=mn[0],Qt=mn[1],Ve=function(){var qe=new Ye(ut.current);qe.displayMode="popup",qe.addRenderEventListener(function(){var ot=Object(I.a)(e.a.mark(function Ze(St){var dt;return e.a.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:return vt.current.style.display="none",Et.next=3,Object(_e.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:St}});case 3:dt=Et.sent,dt!=null&&dt.id&&oe(ut.current.getAttribute("src").replace(V.a.API_SERVER,""),"/api/attachments/".concat(dt==null?void 0:dt.id,"?type=").concat(dt.content_type));case 5:case"end":return Et.stop()}},Ze)}));return function(Ze){return ot.apply(this,arguments)}}()),qe.show()},tt=function(){var qe=new se.a(ut.current);qe.settings.displayMode="popup",qe.addEventListener("render",function(){var ot=Object(I.a)(e.a.mark(function Ze(St){var dt;return e.a.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:if(vt.current.style.display="none",!ut.current){Et.next=6;break}return Et.next=4,Object(_e.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:St.dataUrl}});case 4:dt=Et.sent,dt!=null&&dt.id&&oe(ut.current.getAttribute("src").replace(V.a.API_SERVER,""),"/api/attachments/".concat(dt==null?void 0:dt.id,"?type=").concat(dt.content_type));case 6:case"end":return Et.stop()}},Ze)}));return function(Ze){return ot.apply(this,arguments)}}()),qe.show(),window.markerArea=qe},nt=Object(C.useMemo)(function(){vt.current&&(vt.current.style.zIndex=-1);try{var pt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,qe=/\"\/api\/attachments\/|\"\/attachments\/download\//g,ot=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Rt=Rt.replace(pt,"("+V.a.API_SERVER+"/api/attachments/").replace(qe,'"'+V.a.API_SERVER+"/api/attachments/").replace(ot,'"'+V.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(Mt){}var Ze=O(Rt),St=m();if(Rt.match(/\[TOC\]/)&&(Ze=Ze.replace("<p>[TOC]</p>",w()),b()),Ze=Ze.replace(/(__special_katext_id_\d+__)/g,function(Mt,Et){var Bt=St[Et],zt=Bt.type,Zt=Bt.expression;return Object(ee.renderToString)(et(Zt)||"",{displayMode:zt==="block",throwOnError:!1,output:"html"})}),Ze=Ze.replace(/▁/g,"\u2581\u2581\u2581"),c(),Q){var dt=document.createElement("div");return dt.innerHTML=Ze,dt.innerText}return setTimeout(function(){return ct()},500),Ze},[Rt]),Se=Object(C.useRef)();v.WebkitLineClamp=ie,ie&&(Je=Object(A.a)(Object(A.a)({},Je),v));function it(pt){var qe=pt.target;if(qe.tagName.toUpperCase()==="IMG"){if(be){var ot=qe.getAttribute("src");Kt(ot),Qt("image")}}else if(qe.tagName.toUpperCase()==="A"){var Ze=qe.getAttribute("href");if(Ze.indexOf("office")>-1)pt.preventDefault(),Kt(Ze),Qt("office");else if(Ze.indexOf("application/pdf")>-1)pt.preventDefault(),Kt(Ze),Qt("pdf");else if(Ze.indexOf("text/html")>-1)pt.preventDefault(),Kt(Ze),Qt("html");else if(Ze.startsWith("#")){pt.preventDefault();var St=document.getElementById(Ze.replace("#",""));St&&St.scrollIntoView(!0)}}}var ct=function(){var qe,ot=(qe=Se.current)===null||qe===void 0?void 0:qe.querySelectorAll("video");ot==null||ot.forEach(function(Ze){if(Ze.oncontextmenu=function(){return!1},Ze.src.indexOf(".m3u8")>-1&&!Ze.canPlayType("application/vnd.apple.mpegurl")){if(B.a.isSupported()){var St=new B.a;St.loadSource(Ze.src),St.attachMedia(Ze)}}})};Object(C.useEffect)(function(){if(Se.current&&nt&&(nt.match(Fe)&&window.PR.prettyPrint()),Se.current)return Se.current.addEventListener("click",it),function(){Se.current.removeEventListener("click",it),c(),b()}},[nt,Se.current,it]);var ft=function(qe){if(!ne)return;qe.target.nodeName==="IMG"?(vt.current.style.zIndex=1,vt.current.style.display="flex",vt.current.style.width=qe.target.clientWidth+"px",vt.current.style.height=qe.target.clientHeight+"px",vt.current.style.top=qe.target.offsetTop+"px",vt.current.style.left=qe.target.offsetLeft+"px",ut.current.src=qe.target.getAttribute("src")):vt.current.style.display="none"};return g.a.createElement("div",{style:{position:"relative"}},g.a.createElement("div",{ref:Se,style:Object(A.a)({},Je),className:"".concat(J||""," markdown-body ").concat(ze.a.mdBody),onMouseOver:ft,dangerouslySetInnerHTML:{__html:nt}}),g.a.createElement("div",{ref:vt,className:ze.a.button},g.a.createElement(W.a,null,g.a.createElement(z.a,{onClick:function(){return Ve()}},"\u88C1\u526A"),g.a.createElement(z.a,{onClick:function(){return tt()}},"\u7F16\u8F91"))),g.a.createElement("img",{ref:ut,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),g.a.createElement(re.a,{close:!0,data:Ut,type:Ut!=null&&Ut.length?Bn:"",style:Object(A.a)({},lt),onClose:function(){return Kt("")}}))}},"9JIy":function(Pe,he,j){Pe.exports={flex_box_center:"flex_box_center___Hq8-r",flex_space_between:"flex_space_between___3Nl1U",flex_box_vertical_center:"flex_box_vertical_center___1hgum",flex_box_center_end:"flex_box_center_end___i5ldC",flex_box_column:"flex_box_column____1u-K",table:"table___2yPMl"}},BU3w:function(Pe,he,j){"use strict";j.d(he,"a",function(){return I});var ce=j("MNnm"),W="rc-util-key";function M(H){if(H.attachTo)return H.attachTo;var P=document.querySelector("head");return P||document.body}function z(H){var P,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(ce.a)())return null;var C=document.createElement("style");if((P=e.csp)===null||P===void 0?void 0:P.nonce){var g;C.nonce=(g=e.csp)===null||g===void 0?void 0:g.nonce}C.innerHTML=H;var f=M(e),o=f.firstChild;return e.prepend&&f.prepend?f.prepend(C):e.prepend&&o?f.insertBefore(C,o):f.appendChild(C),C}var A=new Map;function I(H,P){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},C=M(e);if(!A.has(C)){var g=z("",e),f=g.parentNode;A.set(C,f),f.removeChild(g)}var o=Array.from(A.get(C).children).find(function(i){return i.tagName==="STYLE"&&i[W]===P});if(o){var r,a;if(((r=e.csp)===null||r===void 0?void 0:r.nonce)&&o.nonce!==((a=e.csp)===null||a===void 0?void 0:a.nonce)){var h;o.nonce=(h=e.csp)===null||h===void 0?void 0:h.nonce}return o.innerHTML!==H&&(o.innerHTML=H),o}var s=z(H,e);return s[W]=P,s}},BdwD:function(Pe,he,j){"use strict";var ce=j("+L6B"),W=j("2/Rp"),M=j("0Owb"),z=j("k1fw"),A=j("q1tI"),I=j.n(A),H=j("FOrL"),P=j.n(H),e=function(g){var f=g.buttonProps,o=f===void 0?{}:f,r=g.styles,a=r===void 0?{}:r,h=g.imgStyles,s=h===void 0?{}:h,i=g.customText,n=g.ButtonText,t=g.ButtonClick,b=g.Buttonclass,v=g.ButtonTwo;return I.a.createElement("section",{className:"tc animated fadeIn",style:Object(z.a)(Object(z.a)({},{color:"#999",margin:"0 auto",padding:"100px 0"}),a)},I.a.createElement("img",{src:P.a,style:Object(z.a)(Object(z.a)({},{width:"200px",height:"150px"}),s)}),I.a.createElement("p",{className:"mt10 font14"},i||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),n&&I.a.createElement(W.a,Object(M.a)({className:b,onClick:t},o),n),v&&v)};he.a=e},Bq7L:function(Pe,he){Pe.exports="data:image/png;base64,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"},"C/vA":function(Pe,he,j){"use strict";j.d(he,"a",function(){return ce});function ce(W){const M=this;let z=!1,A;return function(){return z||(z=!0,A=W.apply(M,arguments)),A}}},"Cg/j":function(Pe,he,j){"use strict";j.d(he,"b",function(){return ce}),j.d(he,"a",function(){return W}),j.d(he,"c",function(){return z}),j.d(he,"d",function(){return A});var ce;(function(I){I.serviceIds=new Map,I.DI_TARGET="$di$target",I.DI_DEPENDENCIES="$di$dependencies";function H(P){return P[I.DI_DEPENDENCIES]||[]}I.getServiceDependencies=H})(ce||(ce={}));const W=z("instantiationService");function M(I,H,P,e){H[ce.DI_TARGET]===H?H[ce.DI_DEPENDENCIES].push({id:I,index:P,optional:e}):(H[ce.DI_DEPENDENCIES]=[{id:I,index:P,optional:e}],H[ce.DI_TARGET]=H)}function z(I){if(ce.serviceIds.has(I))return ce.serviceIds.get(I);const H=function(P,e,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");M(H,P,C,!1)};return H.toString=()=>I,ce.serviceIds.set(I,H),H}function A(I){return function(H,P,e){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");M(I,H,e,!0)}}},DlQD:function(Pe,he,j){(function(ce,W){Pe.exports=W()})(this,function(){"use strict";function ce(X,Z){for(var ne=0;ne<Z.length;ne++){var J=Z[ne];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(X,J.key,J)}}function W(X,Z,ne){return Z&&ce(X.prototype,Z),ne&&ce(X,ne),X}function M(X,Z){if(!X)return;if(typeof X=="string")return z(X,Z);var ne=Object.prototype.toString.call(X).slice(8,-1);if(ne==="Object"&&X.constructor&&(ne=X.constructor.name),ne==="Map"||ne==="Set")return Array.from(X);if(ne==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ne))return z(X,Z)}function z(X,Z){(Z==null||Z>X.length)&&(Z=X.length);for(var ne=0,J=new Array(Z);ne<Z;ne++)J[ne]=X[ne];return J}function A(X,Z){var ne;if(typeof Symbol=="undefined"||X[Symbol.iterator]==null){if(Array.isArray(X)||(ne=M(X))||Z&&X&&typeof X.length=="number"){ne&&(X=ne);var J=0;return function(){return J>=X.length?{done:!0}:{done:!1,value:X[J++]}}}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 ne=X[Symbol.iterator](),ne.next.bind(ne)}function I(X,Z){return Z={exports:{}},X(Z,Z.exports),Z.exports}var H=I(function(X){function Z(){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 ne(J){X.exports.defaults=J}X.exports={defaults:Z(),getDefaults:Z,changeDefaults:ne}}),P=H.defaults,e=H.getDefaults,C=H.changeDefaults,g=/[&<>"']/,f=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,r=/[<>"']|&(?!#?\w+;)/g,a={"&":"&","<":"<",">":">",'"':""","'":"'"},h=function(Z){return a[Z]};function s(X,Z){if(Z){if(g.test(X))return X.replace(f,h)}else if(o.test(X))return X.replace(r,h);return X}var i=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function n(X){return X.replace(i,function(Z,ne){return ne=ne.toLowerCase(),ne==="colon"?":":ne.charAt(0)==="#"?ne.charAt(1)==="x"?String.fromCharCode(parseInt(ne.substring(2),16)):String.fromCharCode(+ne.substring(1)):""})}var t=/(^|[^\[])\^/g;function b(X,Z){X=X.source||X,Z=Z||"";var ne={replace:function(Q,ie){return ie=ie.source||ie,ie=ie.replace(t,"$1"),X=X.replace(Q,ie),ne},getRegex:function(){return new RegExp(X,Z)}};return ne}var v=/[^\w:]/g,E=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function w(X,Z,ne){if(X){var J;try{J=decodeURIComponent(n(ne)).replace(v,"").toLowerCase()}catch(Q){return null}if(J.indexOf("javascript:")===0||J.indexOf("vbscript:")===0||J.indexOf("data:")===0)return null}Z&&!E.test(ne)&&(ne=l(Z,ne));try{ne=encodeURI(ne).replace(/%25/g,"%")}catch(Q){return null}return ne}var x={},_=/^[^:]+:\/*[^/]*$/,p=/^([^:]+:)[\s\S]*$/,u=/^([^:]+:\/*[^/]*)[\s\S]*$/;function l(X,Z){x[" "+X]||(_.test(X)?x[" "+X]=X+"/":x[" "+X]=N(X,"/",!0)),X=x[" "+X];var ne=X.indexOf(":")===-1;return Z.substring(0,2)==="//"?ne?Z:X.replace(p,"$1")+Z:Z.charAt(0)==="/"?ne?Z:X.replace(u,"$1")+Z:X+Z}var m={exec:function(){}};function c(X){for(var Z=1,ne,J;Z<arguments.length;Z++){ne=arguments[Z];for(J in ne)Object.prototype.hasOwnProperty.call(ne,J)&&(X[J]=ne[J])}return X}function T(X,Z){var ne=X.replace(/\|/g,function(ie,oe,be){for(var Te=!1,Ie=oe;--Ie>=0&&be[Ie]==="\\";)Te=!Te;return Te?"|":" |"}),J=ne.split(/ \|/),Q=0;if(J.length>Z)J.splice(Z);else for(;J.length<Z;)J.push("");for(;Q<J.length;Q++)J[Q]=J[Q].trim().replace(/\\\|/g,"|");return J}function N(X,Z,ne){var J=X.length;if(J===0)return"";for(var Q=0;Q<J;){var ie=X.charAt(J-Q-1);if(ie===Z&&!ne)Q++;else if(ie!==Z&&ne)Q++;else break}return X.substr(0,J-Q)}function D(X,Z){if(X.indexOf(Z[1])===-1)return-1;for(var ne=X.length,J=0,Q=0;Q<ne;Q++)if(X[Q]==="\\")Q++;else if(X[Q]===Z[0])J++;else if(X[Q]===Z[1]&&(J--,J<0))return Q;return-1}function y(X){X&&X.sanitize&&!X.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var O={escape:s,unescape:n,edit:b,cleanUrl:w,resolveUrl:l,noopTest:m,merge:c,splitCells:T,rtrim:N,findClosingBracket:D,checkSanitizeDeprecation:y},k=H.defaults,R=O.rtrim,B=O.splitCells,V=O.escape,ee=O.findClosingBracket;function re(X,Z,ne){var J=Z.href,Q=Z.title?V(Z.title):null,ie=X[1].replace(/\\([\[\]])/g,"$1");return X[0].charAt(0)!=="!"?{type:"link",raw:ne,href:J,title:Q,text:ie}:{type:"image",raw:ne,href:J,title:Q,text:V(ie)}}function _e(X,Z){var ne=X.match(/^(\s+)(?:```)/);if(ne===null)return Z;var J=ne[1];return Z.split(`
|
|
`).map(function(Q){var ie=Q.match(/^\s+/);if(ie===null)return Q;var oe=ie[0];return oe.length>=J.length?Q.slice(J.length):Q}).join(`
|
|
`)}var se=function(){function X(ne){this.options=ne||k}var Z=X.prototype;return Z.space=function(J){var Q=this.rules.block.newline.exec(J);if(Q)return Q[0].length>1?{type:"space",raw:Q[0]}:{raw:`
|
|
`}},Z.code=function(J,Q){var ie=this.rules.block.code.exec(J);if(ie){var oe=Q[Q.length-1];if(oe&&oe.type==="paragraph")return{raw:ie[0],text:ie[0].trimRight()};var be=ie[0].replace(/^ {4}/gm,"");return{type:"code",raw:ie[0],codeBlockStyle:"indented",text:this.options.pedantic?be:R(be,`
|
|
`)}}},Z.fences=function(J){var Q=this.rules.block.fences.exec(J);if(Q){var ie=Q[0],oe=_e(ie,Q[3]||"");return{type:"code",raw:ie,lang:Q[2]?Q[2].trim():Q[2],text:oe}}},Z.heading=function(J){var Q=this.rules.block.heading.exec(J);if(Q)return{type:"heading",raw:Q[0],depth:Q[1].length,text:Q[2]}},Z.nptable=function(J){var Q=this.rules.block.nptable.exec(J);if(Q){var ie={type:"table",header:B(Q[1].replace(/^ *| *\| *$/g,"")),align:Q[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Q[3]?Q[3].replace(/\n$/,"").split(`
|
|
`):[],raw:Q[0]};if(ie.header.length===ie.align.length){var oe=ie.align.length,be;for(be=0;be<oe;be++)/^ *-+: *$/.test(ie.align[be])?ie.align[be]="right":/^ *:-+: *$/.test(ie.align[be])?ie.align[be]="center":/^ *:-+ *$/.test(ie.align[be])?ie.align[be]="left":ie.align[be]=null;for(oe=ie.cells.length,be=0;be<oe;be++)ie.cells[be]=B(ie.cells[be],ie.header.length);return ie}}},Z.hr=function(J){var Q=this.rules.block.hr.exec(J);if(Q)return{type:"hr",raw:Q[0]}},Z.blockquote=function(J){var Q=this.rules.block.blockquote.exec(J);if(Q){var ie=Q[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:Q[0],text:ie}}},Z.list=function(J){var Q=this.rules.block.list.exec(J);if(Q){for(var ie=Q[0],oe=Q[2],be=oe.length>1,Te=oe[oe.length-1]===")",Ie={type:"list",raw:ie,ordered:be,start:be?+oe.slice(0,-1):"",loose:!1,items:[]},Je=Q[0].match(this.rules.block.item),ht=!1,lt,Rt,vt,ut,Ht,Pt,Ut,Kt=Je.length,It=0;It<Kt;It++)lt=Je[It],ie=lt,Rt=lt.length,lt=lt.replace(/^ *([*+-]|\d+[.)]) */,""),~lt.indexOf(`
|
|
`)&&(Rt-=lt.length,lt=this.options.pedantic?lt.replace(/^ {1,4}/gm,""):lt.replace(new RegExp("^ {1,"+Rt+"}","gm"),"")),It!==Kt-1&&(vt=this.rules.block.bullet.exec(Je[It+1])[0],(be?vt.length===1||!Te&&vt[vt.length-1]===")":vt.length>1||this.options.smartLists&&vt!==oe)&&(ut=Je.slice(It+1).join(`
|
|
`),Ie.raw=Ie.raw.substring(0,Ie.raw.length-ut.length),It=Kt-1)),Ht=ht||/\n\n(?!\s*$)/.test(lt),It!==Kt-1&&(ht=lt.charAt(lt.length-1)===`
|
|
`,Ht||(Ht=ht)),Ht&&(Ie.loose=!0),Pt=/^\[[ xX]\] /.test(lt),Ut=void 0,Pt&&(Ut=lt[1]!==" ",lt=lt.replace(/^\[[ xX]\] +/,"")),Ie.items.push({type:"list_item",raw:ie,task:Pt,checked:Ut,loose:Ht,text:lt});return Ie}},Z.html=function(J){var Q=this.rules.block.html.exec(J);if(Q)return{type:this.options.sanitize?"paragraph":"html",raw:Q[0],pre:!this.options.sanitizer&&(Q[1]==="pre"||Q[1]==="script"||Q[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Q[0]):V(Q[0]):Q[0]}},Z.def=function(J){var Q=this.rules.block.def.exec(J);if(Q){Q[3]&&(Q[3]=Q[3].substring(1,Q[3].length-1));var ie=Q[1].toLowerCase().replace(/\s+/g," ");return{tag:ie,raw:Q[0],href:Q[2],title:Q[3]}}},Z.table=function(J){var Q=this.rules.block.table.exec(J);if(Q){var ie={type:"table",header:B(Q[1].replace(/^ *| *\| *$/g,"")),align:Q[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Q[3]?Q[3].replace(/\n$/,"").split(`
|
|
`):[]};if(ie.header.length===ie.align.length){ie.raw=Q[0];var oe=ie.align.length,be;for(be=0;be<oe;be++)/^ *-+: *$/.test(ie.align[be])?ie.align[be]="right":/^ *:-+: *$/.test(ie.align[be])?ie.align[be]="center":/^ *:-+ *$/.test(ie.align[be])?ie.align[be]="left":ie.align[be]=null;for(oe=ie.cells.length,be=0;be<oe;be++)ie.cells[be]=B(ie.cells[be].replace(/^ *\| *| *\| *$/g,""),ie.header.length);return ie}}},Z.lheading=function(J){var Q=this.rules.block.lheading.exec(J);if(Q)return{type:"heading",raw:Q[0],depth:Q[2].charAt(0)==="="?1:2,text:Q[1]}},Z.paragraph=function(J){var Q=this.rules.block.paragraph.exec(J);if(Q)return{type:"paragraph",raw:Q[0],text:Q[1].charAt(Q[1].length-1)===`
|
|
`?Q[1].slice(0,-1):Q[1]}},Z.text=function(J,Q){var ie=this.rules.block.text.exec(J);if(ie){var oe=Q[Q.length-1];return oe&&oe.type==="text"?{raw:ie[0],text:ie[0]}:{type:"text",raw:ie[0],text:ie[0]}}},Z.escape=function(J){var Q=this.rules.inline.escape.exec(J);if(Q)return{type:"escape",raw:Q[0],text:V(Q[1])}},Z.tag=function(J,Q,ie){var oe=this.rules.inline.tag.exec(J);if(oe)return!Q&&/^<a /i.test(oe[0])?Q=!0:Q&&/^<\/a>/i.test(oe[0])&&(Q=!1),!ie&&/^<(pre|code|kbd|script)(\s|>)/i.test(oe[0])?ie=!0:ie&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(oe[0])&&(ie=!1),{type:this.options.sanitize?"text":"html",raw:oe[0],inLink:Q,inRawBlock:ie,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(oe[0]):V(oe[0]):oe[0]}},Z.link=function(J){var Q=this.rules.inline.link.exec(J);if(Q){var ie=ee(Q[2],"()");if(ie>-1){var oe=Q[0].indexOf("!")===0?5:4,be=oe+Q[1].length+ie;Q[2]=Q[2].substring(0,ie),Q[0]=Q[0].substring(0,be).trim(),Q[3]=""}var Te=Q[2],Ie="";if(this.options.pedantic){var Je=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Te);Je?(Te=Je[1],Ie=Je[3]):Ie=""}else Ie=Q[3]?Q[3].slice(1,-1):"";Te=Te.trim().replace(/^<([\s\S]*)>$/,"$1");var ht=re(Q,{href:Te&&Te.replace(this.rules.inline._escapes,"$1"),title:Ie&&Ie.replace(this.rules.inline._escapes,"$1")},Q[0]);return ht}},Z.reflink=function(J,Q){var ie;if((ie=this.rules.inline.reflink.exec(J))||(ie=this.rules.inline.nolink.exec(J))){var oe=(ie[2]||ie[1]).replace(/\s+/g," ");if(oe=Q[oe.toLowerCase()],!oe||!oe.href){var be=ie[0].charAt(0);return{type:"text",raw:be,text:be}}var Te=re(ie,oe,ie[0]);return Te}},Z.strong=function(J,Q,ie){ie===void 0&&(ie="");var oe=this.rules.inline.strong.start.exec(J);if(oe&&(!oe[1]||oe[1]&&(ie===""||this.rules.inline.punctuation.exec(ie)))){Q=Q.slice(-1*J.length);var be=oe[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;be.lastIndex=0;for(var Te;(oe=be.exec(Q))!=null;)if(Te=this.rules.inline.strong.middle.exec(Q.slice(0,oe.index+3)),Te)return{type:"strong",raw:J.slice(0,Te[0].length),text:J.slice(2,Te[0].length-2)}}},Z.em=function(J,Q,ie){ie===void 0&&(ie="");var oe=this.rules.inline.em.start.exec(J);if(oe&&(!oe[1]||oe[1]&&(ie===""||this.rules.inline.punctuation.exec(ie)))){Q=Q.slice(-1*J.length);var be=oe[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;be.lastIndex=0;for(var Te;(oe=be.exec(Q))!=null;)if(Te=this.rules.inline.em.middle.exec(Q.slice(0,oe.index+2)),Te)return{type:"em",raw:J.slice(0,Te[0].length),text:J.slice(1,Te[0].length-1)}}},Z.codespan=function(J){var Q=this.rules.inline.code.exec(J);if(Q){var ie=Q[2].replace(/\n/g," "),oe=/[^ ]/.test(ie),be=ie.startsWith(" ")&&ie.endsWith(" ");return oe&&be&&(ie=ie.substring(1,ie.length-1)),ie=V(ie,!0),{type:"codespan",raw:Q[0],text:ie}}},Z.br=function(J){var Q=this.rules.inline.br.exec(J);if(Q)return{type:"br",raw:Q[0]}},Z.del=function(J){var Q=this.rules.inline.del.exec(J);if(Q)return{type:"del",raw:Q[0],text:Q[1]}},Z.autolink=function(J,Q){var ie=this.rules.inline.autolink.exec(J);if(ie){var oe,be;return ie[2]==="@"?(oe=V(this.options.mangle?Q(ie[1]):ie[1]),be="mailto:"+oe):(oe=V(ie[1]),be=oe),{type:"link",raw:ie[0],text:oe,href:be,tokens:[{type:"text",raw:oe,text:oe}]}}},Z.url=function(J,Q){var ie;if(ie=this.rules.inline.url.exec(J)){var oe,be;if(ie[2]==="@")oe=V(this.options.mangle?Q(ie[0]):ie[0]),be="mailto:"+oe;else{var Te;do Te=ie[0],ie[0]=this.rules.inline._backpedal.exec(ie[0])[0];while(Te!==ie[0]);oe=V(ie[0]),ie[1]==="www."?be="http://"+oe:be=oe}return{type:"link",raw:ie[0],text:oe,href:be,tokens:[{type:"text",raw:oe,text:oe}]}}},Z.inlineText=function(J,Q,ie){var oe=this.rules.inline.text.exec(J);if(oe){var be;return Q?be=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(oe[0]):V(oe[0]):oe[0]:be=V(this.options.smartypants?ie(oe[0]):oe[0]),{type:"text",raw:oe[0],text:be}}},X}(),ye=O.noopTest,ve=O.edit,Ee=O.merge,le={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:ye,table:ye,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};le._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,le._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,le.def=ve(le.def).replace("label",le._label).replace("title",le._title).getRegex(),le.bullet=/(?:[*+-]|\d{1,9}[.)])/,le.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,le.item=ve(le.item,"gm").replace(/bull/g,le.bullet).getRegex(),le.list=ve(le.list).replace(/bull/g,le.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+le.def.source+")").getRegex(),le._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",le._comment=/<!--(?!-?>)[\s\S]*?-->/,le.html=ve(le.html,"i").replace("comment",le._comment).replace("tag",le._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),le.paragraph=ve(le._paragraph).replace("hr",le.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",le._tag).getRegex(),le.blockquote=ve(le.blockquote).replace("paragraph",le.paragraph).getRegex(),le.normal=Ee({},le),le.gfm=Ee({},le.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*|$)"}),le.gfm.nptable=ve(le.gfm.nptable).replace("hr",le.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",le._tag).getRegex(),le.gfm.table=ve(le.gfm.table).replace("hr",le.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",le._tag).getRegex(),le.pedantic=Ee({},le.normal,{html:ve(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",le._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:ye,paragraph:ve(le.normal._paragraph).replace("hr",le.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",le.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var F={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ye,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:ye,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};F._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",F.punctuation=ve(F.punctuation).replace(/punctuation/g,F._punctuation).getRegex(),F._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",F._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",F.em.start=ve(F.em.start).replace(/punctuation/g,F._punctuation).getRegex(),F.em.middle=ve(F.em.middle).replace(/punctuation/g,F._punctuation).replace(/overlapSkip/g,F._overlapSkip).getRegex(),F.em.endAst=ve(F.em.endAst,"g").replace(/punctuation/g,F._punctuation).getRegex(),F.em.endUnd=ve(F.em.endUnd,"g").replace(/punctuation/g,F._punctuation).getRegex(),F.strong.start=ve(F.strong.start).replace(/punctuation/g,F._punctuation).getRegex(),F.strong.middle=ve(F.strong.middle).replace(/punctuation/g,F._punctuation).replace(/blockSkip/g,F._blockSkip).getRegex(),F.strong.endAst=ve(F.strong.endAst,"g").replace(/punctuation/g,F._punctuation).getRegex(),F.strong.endUnd=ve(F.strong.endUnd,"g").replace(/punctuation/g,F._punctuation).getRegex(),F.blockSkip=ve(F._blockSkip,"g").getRegex(),F.overlapSkip=ve(F._overlapSkip,"g").getRegex(),F._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,F._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,F._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])?)+(?![-_])/,F.autolink=ve(F.autolink).replace("scheme",F._scheme).replace("email",F._email).getRegex(),F._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,F.tag=ve(F.tag).replace("comment",le._comment).replace("attribute",F._attribute).getRegex(),F._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,F._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,F._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,F.link=ve(F.link).replace("label",F._label).replace("href",F._href).replace("title",F._title).getRegex(),F.reflink=ve(F.reflink).replace("label",F._label).getRegex(),F.reflinkSearch=ve(F.reflinkSearch,"g").replace("reflink",F.reflink).replace("nolink",F.nolink).getRegex(),F.normal=Ee({},F),F.pedantic=Ee({},F.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:ve(/^!?\[(label)\]\((.*?)\)/).replace("label",F._label).getRegex(),reflink:ve(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",F._label).getRegex()}),F.gfm=Ee({},F.normal,{escape:ve(F.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),F.gfm.url=ve(F.gfm.url,"i").replace("email",F.gfm._extended_email).getRegex(),F.breaks=Ee({},F.gfm,{br:ve(F.br).replace("{2,}","*").getRegex(),text:ve(F.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var d={block:le,inline:F},S=H.defaults,L=d.block,G=d.inline;function U(X){return X.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 $(X){var Z="",ne,J,Q=X.length;for(ne=0;ne<Q;ne++)J=X.charCodeAt(ne),Math.random()>.5&&(J="x"+J.toString(16)),Z+="&#"+J+";";return Z}var de=function(){function X(ne){this.tokens=[],this.tokens.links=Object.create(null),this.options=ne||S,this.options.tokenizer=this.options.tokenizer||new se,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var J={block:L.normal,inline:G.normal};this.options.pedantic?(J.block=L.pedantic,J.inline=G.pedantic):this.options.gfm&&(J.block=L.gfm,this.options.breaks?J.inline=G.breaks:J.inline=G.gfm),this.tokenizer.rules=J}X.lex=function(J,Q){var ie=new X(Q);return ie.lex(J)};var Z=X.prototype;return Z.lex=function(J){return J=J.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(J,this.tokens,!0),this.inline(this.tokens),this.tokens},Z.blockTokens=function(J,Q,ie){Q===void 0&&(Q=[]),ie===void 0&&(ie=!0),J=J.replace(/^ +$/gm,"");for(var oe,be,Te,Ie;J;){if(oe=this.tokenizer.space(J)){J=J.substring(oe.raw.length),oe.type&&Q.push(oe);continue}if(oe=this.tokenizer.code(J,Q)){J=J.substring(oe.raw.length),oe.type?Q.push(oe):(Ie=Q[Q.length-1],Ie.raw+=`
|
|
`+oe.raw,Ie.text+=`
|
|
`+oe.text);continue}if(oe=this.tokenizer.fences(J)){J=J.substring(oe.raw.length),Q.push(oe);continue}if(oe=this.tokenizer.heading(J)){J=J.substring(oe.raw.length),Q.push(oe);continue}if(oe=this.tokenizer.nptable(J)){J=J.substring(oe.raw.length),Q.push(oe);continue}if(oe=this.tokenizer.hr(J)){J=J.substring(oe.raw.length),Q.push(oe);continue}if(oe=this.tokenizer.blockquote(J)){J=J.substring(oe.raw.length),oe.tokens=this.blockTokens(oe.text,[],ie),Q.push(oe);continue}if(oe=this.tokenizer.list(J)){for(J=J.substring(oe.raw.length),Te=oe.items.length,be=0;be<Te;be++)oe.items[be].tokens=this.blockTokens(oe.items[be].text,[],!1);Q.push(oe);continue}if(oe=this.tokenizer.html(J)){J=J.substring(oe.raw.length),Q.push(oe);continue}if(ie&&(oe=this.tokenizer.def(J))){J=J.substring(oe.raw.length),this.tokens.links[oe.tag]||(this.tokens.links[oe.tag]={href:oe.href,title:oe.title});continue}if(oe=this.tokenizer.table(J)){J=J.substring(oe.raw.length),Q.push(oe);continue}if(oe=this.tokenizer.lheading(J)){J=J.substring(oe.raw.length),Q.push(oe);continue}if(ie&&(oe=this.tokenizer.paragraph(J))){J=J.substring(oe.raw.length),Q.push(oe);continue}if(oe=this.tokenizer.text(J,Q)){J=J.substring(oe.raw.length),oe.type?Q.push(oe):(Ie=Q[Q.length-1],Ie.raw+=`
|
|
`+oe.raw,Ie.text+=`
|
|
`+oe.text);continue}if(J){var Je="Infinite loop on byte: "+J.charCodeAt(0);if(this.options.silent){console.error(Je);break}else throw new Error(Je)}}return Q},Z.inline=function(J){var Q,ie,oe,be,Te,Ie,Je=J.length;for(Q=0;Q<Je;Q++){Ie=J[Q];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:[]},be=Ie.header.length,ie=0;ie<be;ie++)Ie.tokens.header[ie]=[],this.inlineTokens(Ie.header[ie],Ie.tokens.header[ie]);for(be=Ie.cells.length,ie=0;ie<be;ie++)for(Te=Ie.cells[ie],Ie.tokens.cells[ie]=[],oe=0;oe<Te.length;oe++)Ie.tokens.cells[ie][oe]=[],this.inlineTokens(Te[oe],Ie.tokens.cells[ie][oe]);break}case"blockquote":{this.inline(Ie.tokens);break}case"list":{for(be=Ie.items.length,ie=0;ie<be;ie++)this.inline(Ie.items[ie].tokens);break}}}return J},Z.inlineTokens=function(J,Q,ie,oe,be){Q===void 0&&(Q=[]),ie===void 0&&(ie=!1),oe===void 0&&(oe=!1),be===void 0&&(be="");var Te,Ie=J,Je;if(this.tokens.links){var ht=Object.keys(this.tokens.links);if(ht.length>0)for(;(Je=this.tokenizer.rules.inline.reflinkSearch.exec(Ie))!=null;)ht.includes(Je[0].slice(Je[0].lastIndexOf("[")+1,-1))&&(Ie=Ie.slice(0,Je.index)+"["+"a".repeat(Je[0].length-2)+"]"+Ie.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Je=this.tokenizer.rules.inline.blockSkip.exec(Ie))!=null;)Ie=Ie.slice(0,Je.index)+"["+"a".repeat(Je[0].length-2)+"]"+Ie.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;J;){if(Te=this.tokenizer.escape(J)){J=J.substring(Te.raw.length),Q.push(Te);continue}if(Te=this.tokenizer.tag(J,ie,oe)){J=J.substring(Te.raw.length),ie=Te.inLink,oe=Te.inRawBlock,Q.push(Te);continue}if(Te=this.tokenizer.link(J)){J=J.substring(Te.raw.length),Te.type==="link"&&(Te.tokens=this.inlineTokens(Te.text,[],!0,oe)),Q.push(Te);continue}if(Te=this.tokenizer.reflink(J,this.tokens.links)){J=J.substring(Te.raw.length),Te.type==="link"&&(Te.tokens=this.inlineTokens(Te.text,[],!0,oe)),Q.push(Te);continue}if(Te=this.tokenizer.strong(J,Ie,be)){J=J.substring(Te.raw.length),Te.tokens=this.inlineTokens(Te.text,[],ie,oe),Q.push(Te);continue}if(Te=this.tokenizer.em(J,Ie,be)){J=J.substring(Te.raw.length),Te.tokens=this.inlineTokens(Te.text,[],ie,oe),Q.push(Te);continue}if(Te=this.tokenizer.codespan(J)){J=J.substring(Te.raw.length),Q.push(Te);continue}if(Te=this.tokenizer.br(J)){J=J.substring(Te.raw.length),Q.push(Te);continue}if(Te=this.tokenizer.del(J)){J=J.substring(Te.raw.length),Te.tokens=this.inlineTokens(Te.text,[],ie,oe),Q.push(Te);continue}if(Te=this.tokenizer.autolink(J,$)){J=J.substring(Te.raw.length),Q.push(Te);continue}if(!ie&&(Te=this.tokenizer.url(J,$))){J=J.substring(Te.raw.length),Q.push(Te);continue}if(Te=this.tokenizer.inlineText(J,oe,U)){J=J.substring(Te.raw.length),be=Te.raw.slice(-1),Q.push(Te);continue}if(J){var lt="Infinite loop on byte: "+J.charCodeAt(0);if(this.options.silent){console.error(lt);break}else throw new Error(lt)}}return Q},W(X,null,[{key:"rules",get:function(){return{block:L,inline:G}}}]),X}(),xe=H.defaults,q=O.cleanUrl,ae=O.escape,fe=function(){function X(ne){this.options=ne||xe}var Z=X.prototype;return Z.code=function(J,Q,ie){var oe=(Q||"").match(/\S*/)[0];if(this.options.highlight){var be=this.options.highlight(J,oe);be!=null&&be!==J&&(ie=!0,J=be)}return oe?'<pre><code class="'+this.options.langPrefix+ae(oe,!0)+'">'+(ie?J:ae(J,!0))+`</code></pre>
|
|
`:"<pre><code>"+(ie?J:ae(J,!0))+`</code></pre>
|
|
`},Z.blockquote=function(J){return`<blockquote>
|
|
`+J+`</blockquote>
|
|
`},Z.html=function(J){return J},Z.heading=function(J,Q,ie,oe){return this.options.headerIds?"<h"+Q+' id="'+this.options.headerPrefix+oe.slug(ie)+'">'+J+"</h"+Q+`>
|
|
`:"<h"+Q+">"+J+"</h"+Q+`>
|
|
`},Z.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},Z.list=function(J,Q,ie){var oe=Q?"ol":"ul",be=Q&&ie!==1?' start="'+ie+'"':"";return"<"+oe+be+`>
|
|
`+J+"</"+oe+`>
|
|
`},Z.listitem=function(J){return"<li>"+J+`</li>
|
|
`},Z.checkbox=function(J){return"<input "+(J?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Z.paragraph=function(J){return"<p>"+J+`</p>
|
|
`},Z.table=function(J,Q){return Q&&(Q="<tbody>"+Q+"</tbody>"),`<table>
|
|
<thead>
|
|
`+J+`</thead>
|
|
`+Q+`</table>
|
|
`},Z.tablerow=function(J){return`<tr>
|
|
`+J+`</tr>
|
|
`},Z.tablecell=function(J,Q){var ie=Q.header?"th":"td",oe=Q.align?"<"+ie+' align="'+Q.align+'">':"<"+ie+">";return oe+J+"</"+ie+`>
|
|
`},Z.strong=function(J){return"<strong>"+J+"</strong>"},Z.em=function(J){return"<em>"+J+"</em>"},Z.codespan=function(J){return"<code>"+J+"</code>"},Z.br=function(){return this.options.xhtml?"<br/>":"<br>"},Z.del=function(J){return"<del>"+J+"</del>"},Z.link=function(J,Q,ie){if(J=q(this.options.sanitize,this.options.baseUrl,J),J===null)return ie;var oe='<a href="'+ae(J)+'"';return Q&&(oe+=' title="'+Q+'"'),oe+=">"+ie+"</a>",oe},Z.image=function(J,Q,ie){if(J=q(this.options.sanitize,this.options.baseUrl,J),J===null)return ie;var oe='<img src="'+J+'" alt="'+ie+'"';return Q&&(oe+=' title="'+Q+'"'),oe+=this.options.xhtml?"/>":">",oe},Z.text=function(J){return J},X}(),pe=function(){function X(){}var Z=X.prototype;return Z.strong=function(J){return J},Z.em=function(J){return J},Z.codespan=function(J){return J},Z.del=function(J){return J},Z.html=function(J){return J},Z.text=function(J){return J},Z.link=function(J,Q,ie){return""+ie},Z.image=function(J,Q,ie){return""+ie},Z.br=function(){return""},X}(),Ce=function(){function X(){this.seen={}}var Z=X.prototype;return Z.slug=function(J){var Q=J.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Q)){var ie=Q;do this.seen[ie]++,Q=ie+"-"+this.seen[ie];while(this.seen.hasOwnProperty(Q))}return this.seen[Q]=0,Q},X}(),Me=H.defaults,He=O.unescape,je=function(){function X(ne){this.options=ne||Me,this.options.renderer=this.options.renderer||new fe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new pe,this.slugger=new Ce}X.parse=function(J,Q){var ie=new X(Q);return ie.parse(J)};var Z=X.prototype;return Z.parse=function(J,Q){Q===void 0&&(Q=!0);var ie="",oe,be,Te,Ie,Je,ht,lt,Rt,vt,ut,Ht,Pt,Ut,Kt,It,mn,Bn,Qt,Ve=J.length;for(oe=0;oe<Ve;oe++){ut=J[oe];switch(ut.type){case"space":continue;case"hr":{ie+=this.renderer.hr();continue}case"heading":{ie+=this.renderer.heading(this.parseInline(ut.tokens),ut.depth,He(this.parseInline(ut.tokens,this.textRenderer)),this.slugger);continue}case"code":{ie+=this.renderer.code(ut.text,ut.lang,ut.escaped);continue}case"table":{for(Rt="",lt="",Ie=ut.header.length,be=0;be<Ie;be++)lt+=this.renderer.tablecell(this.parseInline(ut.tokens.header[be]),{header:!0,align:ut.align[be]});for(Rt+=this.renderer.tablerow(lt),vt="",Ie=ut.cells.length,be=0;be<Ie;be++){for(ht=ut.tokens.cells[be],lt="",Je=ht.length,Te=0;Te<Je;Te++)lt+=this.renderer.tablecell(this.parseInline(ht[Te]),{header:!1,align:ut.align[Te]});vt+=this.renderer.tablerow(lt)}ie+=this.renderer.table(Rt,vt);continue}case"blockquote":{vt=this.parse(ut.tokens),ie+=this.renderer.blockquote(vt);continue}case"list":{for(Ht=ut.ordered,Pt=ut.start,Ut=ut.loose,Ie=ut.items.length,vt="",be=0;be<Ie;be++)It=ut.items[be],mn=It.checked,Bn=It.task,Kt="",It.task&&(Qt=this.renderer.checkbox(mn),Ut?It.tokens.length>0&&It.tokens[0].type==="text"?(It.tokens[0].text=Qt+" "+It.tokens[0].text,It.tokens[0].tokens&&It.tokens[0].tokens.length>0&&It.tokens[0].tokens[0].type==="text"&&(It.tokens[0].tokens[0].text=Qt+" "+It.tokens[0].tokens[0].text)):It.tokens.unshift({type:"text",text:Qt}):Kt+=Qt),Kt+=this.parse(It.tokens,Ut),vt+=this.renderer.listitem(Kt,Bn,mn);ie+=this.renderer.list(vt,Ht,Pt);continue}case"html":{ie+=this.renderer.html(ut.text);continue}case"paragraph":{ie+=this.renderer.paragraph(this.parseInline(ut.tokens));continue}case"text":{for(vt=ut.tokens?this.parseInline(ut.tokens):ut.text;oe+1<Ve&&J[oe+1].type==="text";)ut=J[++oe],vt+=`
|
|
`+(ut.tokens?this.parseInline(ut.tokens):ut.text);ie+=Q?this.renderer.paragraph(vt):vt;continue}default:{var tt='Token with "'+ut.type+'" type was not found.';if(this.options.silent){console.error(tt);return}else throw new Error(tt)}}}return ie},Z.parseInline=function(J,Q){Q=Q||this.renderer;var ie="",oe,be,Te=J.length;for(oe=0;oe<Te;oe++){be=J[oe];switch(be.type){case"escape":{ie+=Q.text(be.text);break}case"html":{ie+=Q.html(be.text);break}case"link":{ie+=Q.link(be.href,be.title,this.parseInline(be.tokens,Q));break}case"image":{ie+=Q.image(be.href,be.title,be.text);break}case"strong":{ie+=Q.strong(this.parseInline(be.tokens,Q));break}case"em":{ie+=Q.em(this.parseInline(be.tokens,Q));break}case"codespan":{ie+=Q.codespan(be.text);break}case"br":{ie+=Q.br();break}case"del":{ie+=Q.del(this.parseInline(be.tokens,Q));break}case"text":{ie+=Q.text(be.text);break}default:{var Ie='Token with "'+be.type+'" type was not found.';if(this.options.silent){console.error(Ie);return}else throw new Error(Ie)}}}return ie},X}(),Ye=O.merge,Xe=O.checkSanitizeDeprecation,ze=O.escape,Fe=H.getDefaults,et=H.changeDefaults,st=H.defaults;function te(X,Z,ne){if(typeof X=="undefined"||X===null)throw new Error("marked(): input parameter is undefined or null");if(typeof X!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(X)+", string expected");if(typeof Z=="function"&&(ne=Z,Z=null),Z=Ye({},te.defaults,Z||{}),Xe(Z),ne){var J=Z.highlight,Q;try{Q=de.lex(X,Z)}catch(Te){return ne(Te)}var ie=function(Ie){var Je;if(!Ie)try{Je=je.parse(Q,Z)}catch(ht){Ie=ht}return Z.highlight=J,Ie?ne(Ie):ne(null,Je)};if(!J||J.length<3)return ie();if(delete Z.highlight,!Q.length)return ie();var oe=0;te.walkTokens(Q,function(Te){Te.type==="code"&&(oe++,setTimeout(function(){J(Te.text,Te.lang,function(Ie,Je){if(Ie)return ie(Ie);Je!=null&&Je!==Te.text&&(Te.text=Je,Te.escaped=!0),oe--,oe===0&&ie()})},0))}),oe===0&&ie();return}try{var be=de.lex(X,Z);return Z.walkTokens&&te.walkTokens(be,Z.walkTokens),je.parse(be,Z)}catch(Te){if(Te.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,Z.silent)return"<p>An error occurred:</p><pre>"+ze(Te.message+"",!0)+"</pre>";throw Te}}te.options=te.setOptions=function(X){return Ye(te.defaults,X),et(te.defaults),te},te.getDefaults=Fe,te.defaults=st,te.use=function(X){var Z=Ye({},X);if(X.renderer&&function(){var J=te.defaults.renderer||new fe,Q=function(be){var Te=J[be];J[be]=function(){for(var Ie=arguments.length,Je=new Array(Ie),ht=0;ht<Ie;ht++)Je[ht]=arguments[ht];var lt=X.renderer[be].apply(J,Je);return lt===!1&&(lt=Te.apply(J,Je)),lt}};for(var ie in X.renderer)Q(ie);Z.renderer=J}(),X.tokenizer&&function(){var J=te.defaults.tokenizer||new se,Q=function(be){var Te=J[be];J[be]=function(){for(var Ie=arguments.length,Je=new Array(Ie),ht=0;ht<Ie;ht++)Je[ht]=arguments[ht];var lt=X.tokenizer[be].apply(J,Je);return lt===!1&&(lt=Te.apply(J,Je)),lt}};for(var ie in X.tokenizer)Q(ie);Z.tokenizer=J}(),X.walkTokens){var ne=te.defaults.walkTokens;Z.walkTokens=function(J){X.walkTokens(J),ne&&ne(J)}}te.setOptions(Z)},te.walkTokens=function(X,Z){for(var ne=A(X),J;!(J=ne()).done;){var Q=J.value;Z(Q);switch(Q.type){case"table":{for(var ie=A(Q.tokens.header),oe;!(oe=ie()).done;){var be=oe.value;te.walkTokens(be,Z)}for(var Te=A(Q.tokens.cells),Ie;!(Ie=Te()).done;)for(var Je=Ie.value,ht=A(Je),lt;!(lt=ht()).done;){var Rt=lt.value;te.walkTokens(Rt,Z)}break}case"list":{te.walkTokens(Q.items,Z);break}default:Q.tokens&&te.walkTokens(Q.tokens,Z)}}},te.Parser=je,te.parser=je.parse,te.Renderer=fe,te.TextRenderer=pe,te.Lexer=de,te.lexer=de.lex,te.Tokenizer=se,te.Slugger=Ce,te.parse=te;var Y=te;return Y})},Dz72:function(Pe,he,j){"use strict";var ce=j("2qtc"),W=j("kLXV"),M=j("7Kak"),z=j("9yH6"),A=j("iQDF"),I=j("+eQT"),H=j("5NDa"),P=j("5rEg"),e=j("OaEy"),C=j("2fM7"),g=j("9og8"),f=j("k1fw"),o=j("y8nQ"),r=j("Vl3Y"),a=j("tJVT"),h=j("WmNS"),s=j.n(h),i=j("q1tI"),n=j.n(i),t=j("9kvl"),b=j("wd/R"),v=j.n(b),E=j("J1Xd"),w=j.n(E),x=j("NReP"),_=function(u){var l,m,c=u.visible,T=u.onOk,N=u.onCancel,D=u.title,y=D===void 0?"":D,O=u.coreCurriculum,k=u.dispatch,R=O.CoreSubjects,B=r.a.useForm(),V=Object(a.a)(B,1),ee=V[0],re=Object(i.useState)(!1),_e=Object(a.a)(re,2),se=_e[0],ye=_e[1],ve=Object(i.useState)([]),Ee=Object(a.a)(ve,2),le=Ee[0],F=Ee[1],d=Object(i.useState)(!1),S=Object(a.a)(d,2),L=S[0],G=S[1],U=Object(i.useState)(""),$=Object(a.a)(U,2),de=$[0],xe=$[1];Object(i.useEffect)(function(){if(k({type:"coreCurriculum/getCoreSubjects",payload:{page:1,limit:12}}),c!=null&&c.id){var pe,Ce;console.log(c),ee.setFieldsValue(Object(f.a)(Object(f.a)({},c),{},{attachment_id:c==null||((pe=c.attachment)===null||pe===void 0)?void 0:pe.id,publication_time:v()(c==null?void 0:c.publication_time)}));var Me=[Object(f.a)(Object(f.a)({},c==null?void 0:c.attachment),{},{response:{id:c==null||((Ce=c.attachment)===null||Ce===void 0)?void 0:Ce.id}})];F(Me),xe(c==null?void 0:c.name)}},[c]);var q=function(){ee.submit()},ae=function(){N()},fe=function(){var pe=Object(g.a)(s.a.mark(function Ce(Me){var He;return s.a.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:ye(!0),He=Object(f.a)({},Me),T(He);case 3:case"end":return Ye.stop()}},Ce)}));return function(Me){return pe.apply(this,arguments)}}();return n.a.createElement(W.a,{title:"".concat(c!=null&&c.id?"\u7F16\u8F91":"\u65B0\u5EFA").concat(y),visible:c,onOk:q,centered:!0,onCancel:ae,confirmLoading:se,okButtonProps:{disabled:L},width:686,afterClose:function(){ye(!1),F([]),xe(""),ee.resetFields()},okText:"\u786E\u8BA4\u65B0\u589E",cancelText:"\u53D6\u6D88"},n.a.createElement(r.a,{form:ee,colon:!1,labelCol:{span:4},wrapperCol:{span:18},onFinish:fe,initialValues:{platform_language:((l=localStorage)===null||l===void 0?void 0:l.getItem("umi_locale"))==="zh-CN"?1:2},className:w.a.form},n.a.createElement(r.a.Item,{label:"\u6838\u5FC3\u8BFE\u7A0B",name:"core_subject_id",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BFE\u7A0B"}]},n.a.createElement(C.a,{placeholder:"\u8BF7\u9009\u62E9",getPopupContainer:function(Ce){return Ce.parentElement}},R==null||((m=R.list)===null||m===void 0)?void 0:m.map(function(pe,Ce){return n.a.createElement(C.a.Option,{key:Ce,value:pe==null?void 0:pe.id},pe==null?void 0:pe.name)}))),n.a.createElement(r.a.Item,{label:"\u6559\u6750\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6559\u6750\u540D\u79F0"},{whitespace:!0,message:"\u8BF7\u8F93\u5165\u6559\u6750\u540D\u79F0"},{max:100,message:"\u53EA\u80FD\u8F93\u5165100\u4E2A\u5B57\u7B26"}]},n.a.createElement(P.a,{maxLength:100,value:de,placeholder:"\u8BF7\u8F93\u5165\u6559\u6750\u540D\u79F0",suffix:n.a.createElement("span",null,de==null?void 0:de.length,"/100"),onChange:function(Ce){return xe(Ce.target.value)}})),n.a.createElement(r.a.Item,{label:"\u4F5C\u8005",name:"author",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u8005\u59D3\u540D"},{whitespace:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u8005"},{max:200,message:"\u53EA\u80FD\u8F93\u516550\u4E2A\u5B57\u7B26"}]},n.a.createElement(P.a,{maxLength:200,placeholder:"\u8BF7\u8F93\u5165\u4F5C\u8005"})),n.a.createElement(r.a.Item,{label:"\u51FA\u7248\u793E",name:"publisher",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u51FA\u7248\u793E"},{whitespace:!0,message:"\u5B9E\u8DF5\u51FA\u7248\u793E"},{max:500,message:"\u53EA\u80FD\u8F93\u516550\u4E2A\u5B57\u7B26"}]},n.a.createElement(P.a,{maxLength:500,placeholder:"\u8BF7\u8F93\u5165\u51FA\u7248\u793E"})),n.a.createElement(r.a.Item,{label:"\u51FA\u7248\u65F6\u95F4",name:"publication_time",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u51FA\u7248\u65F6\u95F4"}]},n.a.createElement(I.a,{style:{width:"100%"},placeholder:"\u8BF7\u9009\u62E9\u51FA\u7248\u65F6\u95F4",format:"YYYY-MM-DD",allowClear:!1})),n.a.createElement(r.a.Item,{label:"ISBN",name:"number",rules:[{required:!0,message:"\u8BF7\u8F93\u5165ISBN"},{whitespace:!0,message:"\u8BF7\u8F93\u5165ISBN"}]},n.a.createElement(P.a,{maxLength:50,placeholder:"\u8BF7\u8F93\u5165ISBN"})),n.a.createElement(r.a.Item,{label:"\u9605\u8BFB\u94FE\u63A5",name:"link"},n.a.createElement(P.a,{maxLength:200,placeholder:"\u8BF7\u8F93\u5165\u9605\u8BFB\u94FE\u63A5"})),n.a.createElement(r.a.Item,{label:"\u7C7B\u578B",name:"material_type",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7C7B\u578B"}]},n.a.createElement(z.a.Group,{style:{paddingTop:5}},n.a.createElement(z.a,{value:1},"\u4E3B\u6559\u6750"),n.a.createElement(z.a,{value:2,style:{marginLeft:14}},"\u5B9E\u8DF5\u6559\u6750"))),n.a.createElement(r.a.Item,{label:"\u51FA\u5904",name:"source_type",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u51FA\u5904"}]},n.a.createElement(z.a.Group,{style:{paddingTop:5}},n.a.createElement(z.a,{value:1},"\u56FD\u5185\u6559\u6750"),n.a.createElement(z.a,{value:2},"\u56FD\u5916\u6559\u6750"))),n.a.createElement(r.a.Item,{name:"platform_language",label:"\u5E73\u53F0\u8BED\u8A00\u7248\u672C",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5E73\u53F0\u8BED\u8A00"}]},n.a.createElement(z.a.Group,null,n.a.createElement(z.a,{value:1},"\u4E2D\u6587\u7248\u5E73\u53F0"),n.a.createElement(z.a,{value:2},"\u82F1\u6587\u7248\u5E73\u53F0"))),n.a.createElement(r.a.Item,{name:"attachment_id",label:"\u5C01\u9762\u56FE\u7247",rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u5C01\u9762\u56FE\u7247"}]},n.a.createElement(x.a,{ButtonText:n.a.createElement(n.a.Fragment,null,n.a.createElement("i",{className:"iconfont icon-shangchuanfujian r5 font14"}),n.a.createElement("span",{className:"ml5"},"\u4E0A\u4F20\u5C01\u9762"))}))))};he.a=Object(t.a)(function(p){var u=p.dispatch,l=p.coreCurriculum;return{dispatch:u,coreCurriculum:l}})(_)},FOrL:function(Pe,he,j){Pe.exports=j.p+"static/nodata.a6b3f948.png"},FWmy:function(Pe,he,j){"use strict";j.d(he,"a",function(){return ce});function ce(W,M){if(!W)throw new Error(M?`Assertion failed (${M})`:"Assertion Failed")}},GfqC:function(Pe,he,j){"use strict";var ce=j("q1tI"),W=j.n(ce),M=j("TSYQ"),z=j.n(M);function A(O,k){var R="cannot "+O.method+" "+O.action+" "+k.status+"'",B=new Error(R);return B.status=k.status,B.method=O.method,B.url=O.action,B}function I(O){var k=O.responseText||O.response;if(!k)return k;try{return JSON.parse(k)}catch(R){return k}}function H(O){var k=new XMLHttpRequest;O.onProgress&&k.upload&&(k.upload.onprogress=function(ee){ee.total>0&&(ee.percent=ee.loaded/ee.total*100),O.onProgress(ee)});var R=new FormData;O.data&&Object.keys(O.data).forEach(function(V){var ee=O.data[V];if(Array.isArray(ee)){ee.forEach(function(re){R.append(V+"[]",re)});return}R.append(V,O.data[V])}),O.file instanceof Blob?R.append(O.filename,O.file,O.file.name):R.append(O.filename,O.file),k.onerror=function(ee){O.onError(ee)},k.onload=function(){return k.status<200||k.status>=300?O.onError(A(O,k),I(k)):O.onSuccess(I(k),k)},k.open(O.method,O.action,!0),O.withCredentials&&"withCredentials"in k&&(k.withCredentials=!0);var B=O.headers||{};return B["X-Requested-With"]!==null&&k.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(B).forEach(function(V){B[V]!==null&&k.setRequestHeader(V,B[V])}),k.send(R),{abort:function(){k.abort()}}}var P=+new Date,e=0;function C(){return"rc-upload-"+P+"-"+ ++e}function g(O,k){return O.indexOf(k,O.length-k.length)!==-1}var f=function(O,k){if(O&&k){var R=Array.isArray(k)?k:k.split(","),B=O.name||"",V=O.type||"",ee=V.replace(/\/.*$/,"");return R.some(function(re){var _e=re.trim();return _e.charAt(0)==="."?g(B.toLowerCase(),_e.toLowerCase()):/\/\*$/.test(_e)?ee===_e.replace(/\/.*$/,""):V===_e})}return!0};function o(O,k){var R=O.createReader(),B=[];function V(){R.readEntries(function(ee){var re=Array.prototype.slice.apply(ee);B=B.concat(re);var _e=!re.length;_e?k(B):V()})}V()}var r=function(k,R,B){var V=function ee(re,_e){_e=_e||"",re.isFile?re.file(function(se){B(se)&&(re.fullPath&&!se.webkitRelativePath&&(Object.defineProperties(se,{webkitRelativePath:{writable:!0}}),se.webkitRelativePath=re.fullPath.replace(/^\//,""),Object.defineProperties(se,{webkitRelativePath:{writable:!1}})),R([se]))}):re.isDirectory&&o(re,function(se){se.forEach(function(ye){ee(ye,""+_e+re.name+"/")})})};k.forEach(function(ee){V(ee.webkitGetAsEntry())})},a=r,h=Object.assign||function(O){for(var k=1;k<arguments.length;k++){var R=arguments[k];for(var B in R)Object.prototype.hasOwnProperty.call(R,B)&&(O[B]=R[B])}return O},s=function(){function O(k,R){var B=[],V=!0,ee=!1,re=void 0;try{for(var _e=k[Symbol.iterator](),se;!(V=(se=_e.next()).done)&&!(B.push(se.value),R&&B.length===R);V=!0);}catch(ye){ee=!0,re=ye}finally{try{!V&&_e.return&&_e.return()}finally{if(ee)throw re}}return B}return function(k,R){if(Array.isArray(k))return k;if(Symbol.iterator in Object(k))return O(k,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function O(k,R){for(var B=0;B<R.length;B++){var V=R[B];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(k,V.key,V)}}return function(k,R,B){return R&&O(k.prototype,R),B&&O(k,B),k}}();function n(O,k,R){return k in O?Object.defineProperty(O,k,{value:R,enumerable:!0,configurable:!0,writable:!0}):O[k]=R,O}function t(O,k){var R={};for(var B in O){if(k.indexOf(B)>=0)continue;if(!Object.prototype.hasOwnProperty.call(O,B))continue;R[B]=O[B]}return R}function b(O,k){if(!(O instanceof k))throw new TypeError("Cannot call a class as a function")}function v(O,k){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k&&(typeof k=="object"||typeof k=="function")?k:O}function E(O,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof k);O.prototype=Object.create(k&&k.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(O,k):O.__proto__=k)}var w=function(k){return Object.keys(k).reduce(function(R,B){return(B.substr(0,5)==="data-"||B.substr(0,5)==="aria-"||B==="role")&&(R[B]=k[B]),R},{})},x=function(O){E(k,O);function k(){var R,B,V,ee;b(this,k);for(var re=arguments.length,_e=Array(re),se=0;se<re;se++)_e[se]=arguments[se];return ee=(B=(V=v(this,(R=k.__proto__||Object.getPrototypeOf(k)).call.apply(R,[this].concat(_e))),V),V.state={uid:C()},V.reqs={},V.onChange=function(ye){var ve=ye.target.files;V.uploadFiles(ve),V.reset()},V.onClick=function(ye){var ve=V.fileInput;if(!ve)return;var Ee=V.props,le=Ee.children,F=Ee.onClick;le&&le.type==="button"&&(ve.parentNode.focus(),ve.parentNode.querySelector("button").blur()),ve.click(),F&&F(ye)},V.onKeyDown=function(ye){ye.key==="Enter"&&V.onClick()},V.onFileDrop=function(ye){var ve=V.props.multiple;if(ye.preventDefault(),ye.type==="dragover")return;if(V.props.directory)a(Array.prototype.slice.call(ye.dataTransfer.items),V.uploadFiles,function(le){return f(le,V.props.accept)});else{var Ee=Array.prototype.slice.call(ye.dataTransfer.files).filter(function(le){return f(le,V.props.accept)});ve===!1&&(Ee=Ee.slice(0,1)),V.uploadFiles(Ee)}},V.uploadFiles=function(ye){var ve=Array.prototype.slice.call(ye);ve.map(function(Ee){return Ee.uid=C(),Ee}).forEach(function(Ee){V.upload(Ee,ve)})},V.saveFileInput=function(ye){V.fileInput=ye},B),v(V,ee)}return i(k,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(B,V){var ee=this,re=this.props;if(!re.beforeUpload)return setTimeout(function(){return ee.post(B)},0);var _e=re.beforeUpload(B,V);_e&&_e.then?_e.then(function(se){var ye=Object.prototype.toString.call(se);return ye==="[object File]"||ye==="[object Blob]"?ee.post(se):ee.post(B)}).catch(function(se){console.log(se)}):_e!==!1&&setTimeout(function(){return ee.post(B)},0);return}},{key:"post",value:function(B){var V=this;if(!this._isMounted)return;var ee=this.props,re=ee.onStart,_e=ee.onProgress,se=ee.transformFile,ye=se===void 0?function(ve){return ve}:se;new Promise(function(ve){var Ee=ee.action;return typeof Ee=="function"&&(Ee=Ee(B)),ve(Ee)}).then(function(ve){var Ee=B.uid,le=ee.customRequest||H,F=Promise.resolve(ye(B)).then(function(d){var S=ee.data;return typeof S=="function"&&(S=S(d)),Promise.all([d,S])}).catch(function(d){console.error(d)});F.then(function(d){var S=s(d,2),L=S[0],G=S[1],U={action:ve,filename:ee.name,data:G,file:L,headers:ee.headers,withCredentials:ee.withCredentials,method:ee.method||"post",onProgress:_e?function($){_e($,B)}:null,onSuccess:function(de,xe){delete V.reqs[Ee],ee.onSuccess(de,B,xe)},onError:function(de,xe){delete V.reqs[Ee],ee.onError(de,xe,B)}};re(B),V.reqs[Ee]=le(U)})})}},{key:"reset",value:function(){this.setState({uid:C()})}},{key:"abort",value:function(B){var V=this.reqs;if(B){var ee=B;B&&B.uid&&(ee=B.uid),V[ee]&&V[ee].abort&&V[ee].abort(),delete V[ee]}else Object.keys(V).forEach(function(re){V[re]&&V[re].abort&&V[re].abort(),delete V[re]})}},{key:"render",value:function(){var B,V=this.props,ee=V.component,re=V.prefixCls,_e=V.className,se=V.disabled,ye=V.id,ve=V.style,Ee=V.multiple,le=V.accept,F=V.children,d=V.directory,S=V.openFileDialogOnClick,L=V.onMouseEnter,G=V.onMouseLeave,U=t(V,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),$=z()((B={},n(B,re,!0),n(B,re+"-disabled",se),n(B,_e,_e),B)),de=se?{}:{onClick:S?this.onClick:function(){},onKeyDown:S?this.onKeyDown:function(){},onMouseEnter:L,onMouseLeave:G,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return W.a.createElement(ee,h({},de,{className:$,role:"button",style:ve}),W.a.createElement("input",h({},w(U),{id:ye,type:"file",ref:this.saveFileInput,onClick:function(q){return q.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:le,directory:d?"directory":null,webkitdirectory:d?"webkitdirectory":null,multiple:Ee,onChange:this.onChange})),F)}}]),k}(ce.Component),_=x,p=Object.assign||function(O){for(var k=1;k<arguments.length;k++){var R=arguments[k];for(var B in R)Object.prototype.hasOwnProperty.call(R,B)&&(O[B]=R[B])}return O},u=function(){function O(k,R){for(var B=0;B<R.length;B++){var V=R[B];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(k,V.key,V)}}return function(k,R,B){return R&&O(k.prototype,R),B&&O(k,B),k}}();function l(O,k){if(!(O instanceof k))throw new TypeError("Cannot call a class as a function")}function m(O,k){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k&&(typeof k=="object"||typeof k=="function")?k:O}function c(O,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof k);O.prototype=Object.create(k&&k.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(O,k):O.__proto__=k)}function T(){}var N=function(O){c(k,O);function k(){var R,B,V,ee;l(this,k);for(var re=arguments.length,_e=Array(re),se=0;se<re;se++)_e[se]=arguments[se];return ee=(B=(V=m(this,(R=k.__proto__||Object.getPrototypeOf(k)).call.apply(R,[this].concat(_e))),V),V.saveUploader=function(ye){V.uploader=ye},B),m(V,ee)}return u(k,[{key:"abort",value:function(B){this.uploader.abort(B)}},{key:"render",value:function(){return W.a.createElement(_,p({},this.props,{ref:this.saveUploader}))}}]),k}(ce.Component);N.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:T,onError:T,onSuccess:T,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var D=N,y=he.a=D},J1Xd:function(Pe,he,j){Pe.exports={flex_box_center:"flex_box_center___2GWAp",flex_space_between:"flex_space_between___3LGpf",flex_box_vertical_center:"flex_box_vertical_center___2nX-J",flex_box_center_end:"flex_box_center_end___aRaMn",flex_box_column:"flex_box_column___1csdj",form:"form___3oiEv",btn:"btn___Lmn3l",img:"img___1eSOH"}},JAbv:function(Pe,he){Pe.exports="data:image/png;base64,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"},JYp7:function(Pe,he,j){"use strict";j.d(he,"a",function(){return ce});var ce;(function(W){function M(t){return t&&typeof t=="object"&&typeof t[Symbol.iterator]=="function"}W.is=M;const z=Object.freeze([]);function A(){return z}W.empty=A;function*I(t){yield t}W.single=I;function H(t){return t||z}W.from=H;function P(t){return!t||t[Symbol.iterator]().next().done===!0}W.isEmpty=P;function e(t){return t[Symbol.iterator]().next().value}W.first=e;function C(t,b){for(const v of t)if(b(v))return!0;return!1}W.some=C;function g(t,b){for(const v of t)if(b(v))return v;return}W.find=g;function*f(t,b){for(const v of t)b(v)&&(yield v)}W.filter=f;function*o(t,b){let v=0;for(const E of t)yield b(E,v++)}W.map=o;function*r(...t){for(const b of t)for(const v of b)yield v}W.concat=r;function*a(t){for(const b of t)for(const v of b)yield v}W.concatNested=a;function h(t,b,v){let E=v;for(const w of t)E=b(E,w);return E}W.reduce=h;function*s(t,b,v=t.length){for(b<0&&(b+=t.length),v<0?v+=t.length:v>t.length&&(v=t.length);b<v;b++)yield t[b]}W.slice=s;function i(t,b=Number.POSITIVE_INFINITY){const v=[];if(b===0)return[v,t];const E=t[Symbol.iterator]();for(let w=0;w<b;w++){const x=E.next();if(x.done)return[v,W.empty()];v.push(x.value)}return[v,{[Symbol.iterator](){return E}}]}W.consume=i;function n(t,b,v=(E,w)=>E===w){const E=t[Symbol.iterator](),w=b[Symbol.iterator]();for(;;){const x=E.next(),_=w.next();if(x.done!==_.done)return!1;if(x.done)return!0;if(!v(x.value,_.value))return!1}}W.equals=n})(ce||(ce={}))},KOXS:function(Pe,he,j){Pe.exports={flex_box_center:"flex_box_center___4BHX-",flex_space_between:"flex_space_between___fH2oM",flex_box_vertical_center:"flex_box_vertical_center___TgSS9",flex_box_center_end:"flex_box_center_end___1vKaD",flex_box_column:"flex_box_column___1kCgI",input:"input___2mV-b",dropdown:"dropdown___1QKW2",menu:"menu___37CBn",text:"text___159fF",b1:"b1___2uGyF",b2:"b2___2DXw1"}},LdHM:function(Pe,he,j){"use strict";j.d(he,"b",function(){return t}),j.d(he,"a",function(){return v});var ce=j("1OyB"),W=j("vuIU"),M=j("Ji7U"),z=j("LK+K"),A=j("q1tI"),I=j("rePB"),H=j("Ff2n"),P=j("ODXe"),e=j("4IlW"),C=j("bX4T"),g=j("YrtM"),f=j("TSYQ"),o=j.n(f),r=j("+nKL"),a=j("8OUc"),h=function(B,V){var ee=B.prefixCls,re=B.id,_e=B.flattenOptions,se=B.childrenAsData,ye=B.values,ve=B.searchValue,Ee=B.multiple,le=B.defaultActiveFirstOption,F=B.height,d=B.itemHeight,S=B.notFoundContent,L=B.open,G=B.menuItemSelectedIcon,U=B.virtual,$=B.onSelect,de=B.onToggleOpen,xe=B.onActiveValue,q=B.onScroll,ae=B.onMouseEnter,fe="".concat(ee,"-item"),pe=Object(g.a)(function(){return _e},[L,_e],function(Y,X){return X[0]&&Y[1]!==X[1]}),Ce=A.useRef(null),Me=function(X){X.preventDefault()},He=function(X){Ce.current&&Ce.current.scrollTo({index:X})},je=function(X){for(var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ne=pe.length,J=0;J<ne;J+=1){var Q=(X+J*Z+ne)%ne,ie=pe[Q],oe=ie.group,be=ie.data;if(!oe&&!be.disabled)return Q}return-1},Ye=A.useState(function(){return je(0)}),Xe=Object(P.a)(Ye,2),ze=Xe[0],Fe=Xe[1],et=function(X){Fe(X);var Z=pe[X];if(!Z){xe(null,-1);return}xe(Z.data.value,X)};A.useEffect(function(){et(le!==!1?je(0):-1)},[pe.length,ve]),A.useEffect(function(){var Y=setTimeout(function(){if(!Ee&&L&&ye.size===1){var X=Array.from(ye)[0],Z=pe.findIndex(function(ne){var J=ne.data;return J.value===X});et(Z),He(Z)}});return function(){return clearTimeout(Y)}},[L]);var st=function(X){X!==void 0&&$(X,{selected:!ye.has(X)}),Ee||de(!1)};if(A.useImperativeHandle(V,function(){return{onKeyDown:function(X){var Z=X.which;switch(Z){case e.a.UP:case e.a.DOWN:{var ne=0;if(Z===e.a.UP?ne=-1:Z===e.a.DOWN&&(ne=1),ne!==0){var J=je(ze+ne,ne);He(J),et(J)}break}case e.a.ENTER:{var Q=pe[ze];Q&&!Q.data.disabled?st(Q.data.value):st(void 0),L&&X.preventDefault();break}case e.a.ESC:de(!1)}},onKeyUp:function(){},scrollTo:function(X){He(X)}}}),pe.length===0)return A.createElement("div",{role:"listbox",id:"".concat(re,"_list"),className:"".concat(fe,"-empty"),onMouseDown:Me},S);function te(Y){var X=pe[Y];if(!X)return null;var Z=X.data||{},ne=Z.value,J=Z.label,Q=Z.children,ie=Object(C.a)(Z,!0),oe=se?Q:J;return X?A.createElement("div",Object.assign({"aria-label":typeof oe=="string"?oe:null},ie,{key:Y,role:"option",id:"".concat(re,"_list_").concat(Y),"aria-selected":ye.has(ne)}),ne):null}return A.createElement(A.Fragment,null,A.createElement("div",{role:"listbox",id:"".concat(re,"_list"),style:{height:0,width:0,overflow:"hidden"}},te(ze-1),te(ze),te(ze+1)),A.createElement(r.a,{itemKey:"key",ref:Ce,data:pe,height:F,itemHeight:d,fullHeight:!1,onMouseDown:Me,onScroll:q,virtual:U,onMouseEnter:ae},function(Y,X){var Z,ne=Y.group,J=Y.groupOption,Q=Y.data,ie=Q.label,oe=Q.key;if(ne)return A.createElement("div",{className:o()(fe,"".concat(fe,"-group"))},ie!==void 0?ie:oe);var be=Q.disabled,Te=Q.value,Ie=Q.title,Je=Q.children,ht=Q.style,lt=Q.className,Rt=Object(H.a)(Q,["disabled","value","title","children","style","className"]),vt=ye.has(Te),ut="".concat(fe,"-option"),Ht=o()(fe,ut,lt,(Z={},Object(I.a)(Z,"".concat(ut,"-grouped"),J),Object(I.a)(Z,"".concat(ut,"-active"),ze===X&&!be),Object(I.a)(Z,"".concat(ut,"-disabled"),be),Object(I.a)(Z,"".concat(ut,"-selected"),vt),Z)),Pt=se?Je:ie,Ut=!G||typeof G=="function"||vt;return A.createElement("div",Object.assign({},Rt,{"aria-selected":vt,className:Ht,title:Ie,onMouseMove:function(){if(ze===X||be)return;et(X)},onClick:function(){be||st(Te)},style:ht}),A.createElement("div",{className:"".concat(ut,"-content")},Pt||Te),A.isValidElement(G)||vt,Ut&&A.createElement(a.a,{className:"".concat(fe,"-option-state"),customizeIcon:G,customizeIconProps:{isSelected:vt}},vt?"\u2713":null))}))},s=A.forwardRef(h);s.displayName="OptionList";var i=s,n=function(){return null};n.isSelectOption=!0;var t=n,b=function(){return null};b.isSelectOptGroup=!0;var v=b,E=j("VTBJ"),w=j("Zm9Q");function x(R){var B=R.key,V=R.props,ee=V.children,re=V.value,_e=Object(H.a)(V,["children","value"]);return Object(E.a)({key:B,value:re!==void 0?re:B,children:ee},_e)}function _(R){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(w.a)(R).map(function(V,ee){if(!A.isValidElement(V)||!V.type)return null;var re=V.type.isSelectOptGroup,_e=V.key,se=V.props,ye=se.children,ve=Object(H.a)(se,["children"]);return B||!re?x(V):Object(E.a)(Object(E.a)({key:"__RC_SELECT_GRP__".concat(_e===null?ee:_e,"__"),label:_e},ve),{},{options:_(ye)})}).filter(function(V){return V})}var p=j("2Qr1"),u=j("qNPg"),l=j("U8pU"),m=j("Kwbf"),c=j("WKfj");function T(R){var B=R.mode,V=R.options,ee=R.children,re=R.backfill,_e=R.allowClear,se=R.placeholder,ye=R.getInputElement,ve=R.showSearch,Ee=R.onSearch,le=R.defaultOpen,F=R.autoFocus,d=R.labelInValue,S=R.value,L=R.inputValue,G=R.optionLabelProp,U=B==="multiple"||B==="tags",$=ve!==void 0?ve:U||B==="combobox",de=V||_(ee);if(Object(m.a)(B!=="tags"||de.every(function(fe){return!fe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),B==="tags"||B==="combobox"){var xe=de.some(function(fe){return fe.options?fe.options.some(function(pe){return typeof("value"in pe?pe.value:pe.key)=="number"}):typeof("value"in fe?fe.value:fe.key)=="number"});Object(m.a)(!xe,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(m.a)(B!=="combobox"||!G,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(m.a)(B==="combobox"||!re,"`backfill` only works with `combobox` mode."),Object(m.a)(B==="combobox"||!ye,"`getInputElement` only work with `combobox` mode."),Object(m.b)(B!=="combobox"||!ye||!_e||!se,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ee&&!$&&B!=="combobox"&&B!=="tags"&&Object(m.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(m.b)(!le||F,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),S!=null){var q=Object(c.d)(S);Object(m.a)(!d||q.every(function(fe){return Object(l.a)(fe)==="object"&&("key"in fe||"value"in fe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(m.a)(!U||Array.isArray(S),"`value` should be array when `mode` is `multiple` or `tags`")}if(ee){var ae=null;Object(w.a)(ee).some(function(fe){if(!A.isValidElement(fe)||!fe.type)return!1;var pe=fe.type;if(pe.isSelectOption)return!1;if(pe.isSelectOptGroup){var Ce=Object(w.a)(fe.props.children).every(function(Me){return!A.isValidElement(Me)||!fe.type||Me.type.isSelectOption?!0:(ae=Me.type,!1)});return!Ce}return ae=pe,!0}),ae&&Object(m.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ae.displayName||ae.name||ae,"`.")),Object(m.a)(L===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var N=T,D=Object(u.a)({prefixCls:"rc-select",components:{optionList:i},convertChildrenToData:_,flattenOptions:p.d,getLabeledValue:p.e,filterOptions:p.b,isValueDisabled:p.g,findValueOption:p.c,warningProps:N,fillOptionsWithMissingValue:p.a}),y=function(R){Object(M.a)(V,R);var B=Object(z.a)(V);function V(){var ee;return Object(ce.a)(this,V),ee=B.apply(this,arguments),ee.selectRef=A.createRef(),ee.focus=function(){ee.selectRef.current.focus()},ee.blur=function(){ee.selectRef.current.blur()},ee}return Object(W.a)(V,[{key:"render",value:function(){return A.createElement(D,Object.assign({ref:this.selectRef},this.props))}}]),V}(A.Component);y.Option=t,y.OptGroup=v;var O=y,k=he.c=O},MEgm:function(Pe,he){Pe.exports="data:image/png;base64,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"},MI8n:function(Pe,he,j){"use strict";j.d(he,"c",function(){return A}),j.d(he,"b",function(){return e}),j.d(he,"e",function(){return C}),j.d(he,"a",function(){return g}),j.d(he,"d",function(){return f}),j.d(he,"f",function(){return o});var ce=j("/cxE"),W=j("pmY6"),M=j("24hK"),z=j("5Y4S"),A;(function(r){r.None=()=>W.a.None;function a(T){return(N,D=null,y)=>{let O=!1,k;return k=T(R=>O?void 0:(k?k.dispose():O=!0,N.call(D,R)),null,y),O&&k.dispose(),k}}r.once=a;function h(T,N){return v((D,y=null,O)=>T(k=>D.call(y,N(k)),null,O))}r.map=h;function s(T,N){return v((D,y=null,O)=>T(k=>{N(k),D.call(y,k)},null,O))}r.forEach=s;function i(T,N){return v((D,y=null,O)=>T(k=>N(k)&&D.call(y,k),null,O))}r.filter=i;function n(T){return T}r.signal=n;function t(...T){return(N,D=null,y)=>Object(W.e)(...T.map(O=>O(k=>N.call(D,k),null,y)))}r.any=t;function b(T,N,D){let y=D;return h(T,O=>(y=N(y,O),y))}r.reduce=b;function v(T){let N;const D=new e({onFirstListenerAdd(){N=T(D.fire,D)},onLastListenerRemove(){N.dispose()}});return D.event}function E(T,N,D=100,y=!1,O){let k,R,B,V=0;const ee=new e({leakWarningThreshold:O,onFirstListenerAdd(){k=T(re=>{V++,R=N(R,re),y&&!B&&(ee.fire(R),R=void 0),clearTimeout(B),B=setTimeout(()=>{const _e=R;R=void 0,B=void 0,(!y||V>1)&&ee.fire(_e),V=0},D)})},onLastListenerRemove(){k.dispose()}});return ee.event}r.debounce=E;function w(T,N=(D,y)=>D===y){let D=!0,y;return i(T,O=>{const k=D||!N(O,y);return D=!1,y=O,k})}r.latch=w;function x(T,N){return[r.filter(T,N),r.filter(T,D=>!N(D))]}r.split=x;function _(T,N=!1,D=[]){let y=D.slice(),O=T(B=>{y?y.push(B):R.fire(B)});const k=()=>{y&&y.forEach(B=>R.fire(B)),y=null},R=new e({onFirstListenerAdd(){O||(O=T(B=>R.fire(B)))},onFirstListenerDidAdd(){y&&(N?setTimeout(k):k())},onLastListenerRemove(){O&&O.dispose(),O=null}});return R.event}r.buffer=_;class p{constructor(T){this.event=T}map(T){return new p(h(this.event,T))}forEach(T){return new p(s(this.event,T))}filter(T){return new p(i(this.event,T))}reduce(T,N){return new p(b(this.event,T,N))}latch(){return new p(w(this.event))}debounce(T,N=100,D=!1,y){return new p(E(this.event,T,N,D,y))}on(T,N,D){return this.event(T,N,D)}once(T,N,D){return a(this.event)(T,N,D)}}function u(T){return new p(T)}r.chain=u;function l(T,N,D=y=>y){const y=(...B)=>R.fire(D(...B)),O=()=>T.on(N,y),k=()=>T.removeListener(N,y),R=new e({onFirstListenerAdd:O,onLastListenerRemove:k});return R.event}r.fromNodeEventEmitter=l;function m(T,N,D=y=>y){const y=(...B)=>R.fire(D(...B)),O=()=>T.addEventListener(N,y),k=()=>T.removeEventListener(N,y),R=new e({onFirstListenerAdd:O,onLastListenerRemove:k});return R.event}r.fromDOMEventEmitter=m;function c(T){return new Promise(N=>a(T)(N))}r.toPromise=c})(A||(A={}));class I{constructor(r){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${r}_${I._idPool++}`}start(r){this._stopWatch=new z.a(!0),this._listenerCount=r}stop(){if(this._stopWatch){const r=this._stopWatch.elapsed();this._elapsedOverall+=r,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${r.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}I._idPool=0;let H=-1;class P{constructor(r,a=Math.random().toString(18).slice(2,5)){this.customThreshold=r,this.name=a,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(r){let a=H;if(typeof this.customThreshold=="number"&&(a=this.customThreshold),a<=0||r<a)return;this._stacks||(this._stacks=new Map);const h=new Error().stack.split(`
|
|
`).slice(3).join(`
|
|
`),s=this._stacks.get(h)||0;if(this._stacks.set(h,s+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=a*.5;let i,n=0;for(const[t,b]of this._stacks)(!i||n<b)&&(i=t,n=b);console.warn(`[${this.name}] potential listener LEAK detected, having ${r} listeners already. MOST frequent listener (${n}):`),console.warn(i)}return()=>{const i=this._stacks.get(h)||0;this._stacks.set(h,i-1)}}}class e{constructor(r){var a;this._disposed=!1,this._options=r,this._leakageMon=H>0?new P(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((a=this._options)===null||a===void 0?void 0:a._profName)?new I(this._options._profName):void 0}get event(){return this._event||(this._event=(r,a,h)=>{var s;this._listeners||(this._listeners=new M.a);const i=this._listeners.isEmpty();i&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const n=this._listeners.push(a?[r,a]:r);i&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,r,a);const t=(s=this._leakageMon)===null||s===void 0?void 0:s.check(this._listeners.size),b=Object(W.i)(()=>{if(t&&t(),!this._disposed&&(n(),this._options&&this._options.onLastListenerRemove)){const v=this._listeners&&!this._listeners.isEmpty();v||this._options.onLastListenerRemove(this)}});return h instanceof W.b?h.add(b):Array.isArray(h)&&h.push(b),b}),this._event}fire(r){var a,h;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new M.a);for(let s of this._listeners)this._deliveryQueue.push([s,r]);for((a=this._perfMon)===null||a===void 0||a.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[s,i]=this._deliveryQueue.shift();try{typeof s=="function"?s.call(void 0,i):s[0].call(s[1],i)}catch(n){Object(ce.f)(n)}}(h=this._perfMon)===null||h===void 0||h.stop()}}dispose(){var r,a,h,s,i;this._disposed||(this._disposed=!0,(r=this._listeners)===null||r===void 0||r.clear(),(a=this._deliveryQueue)===null||a===void 0||a.clear(),(s=(h=this._options)===null||h===void 0?void 0:h.onLastListenerRemove)===null||s===void 0||s.call(h),(i=this._leakageMon)===null||i===void 0||i.dispose())}}class C extends e{constructor(r){super(r);this._isPaused=0,this._eventQueue=new M.a,this._mergeFn=r==null?void 0:r.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const r=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(r))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(r){this._listeners&&(this._isPaused!==0?this._eventQueue.push(r):super.fire(r))}}class g extends C{constructor(r){var a;super(r);this._delay=(a=r.delay)!==null&&a!==void 0?a:100}fire(r){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(r)}}class f{constructor(){this.buffers=[]}wrapEvent(r){return(a,h,s)=>r(i=>{const n=this.buffers[this.buffers.length-1];n?n.push(()=>a.call(h,i)):a.call(h,i)},void 0,s)}bufferEvents(r){const a=[];this.buffers.push(a);const h=r();return this.buffers.pop(),a.forEach(s=>s()),h}}class o{constructor(){this.listening=!1,this.inputEvent=A.None,this.inputEventListener=W.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(r){this.inputEvent=r,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=r(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(Pe,he,j){"use strict";(function(ce,W){j.d(he,"b",function(){return h}),j.d(he,"i",function(){return t}),j.d(he,"f",function(){return b}),j.d(he,"d",function(){return v}),j.d(he,"g",function(){return E}),j.d(he,"h",function(){return w}),j.d(he,"c",function(){return x}),j.d(he,"k",function(){return _}),j.d(he,"j",function(){return p}),j.d(he,"a",function(){return u}),j.d(he,"e",function(){return c});var M;const z="en";let A=!1,I=!1,H=!1,P=!1,e=!1,C=!1,g=!1,f,o=z,r,a;const h=typeof self=="object"?self:typeof ce=="object"?ce:{};let s;typeof h.vscode!="undefined"&&typeof h.vscode.process!="undefined"?s=h.vscode.process:typeof W!="undefined"&&(s=W);const i=typeof((M=s==null?void 0:s.versions)===null||M===void 0?void 0:M.electron)=="string"&&s.type==="renderer";if(typeof navigator=="object"&&!i)a=navigator.userAgent,A=a.indexOf("Windows")>=0,I=a.indexOf("Macintosh")>=0,g=(a.indexOf("Macintosh")>=0||a.indexOf("iPad")>=0||a.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,H=a.indexOf("Linux")>=0,C=!0,f=navigator.language,o=f;else if(typeof s=="object"){A=s.platform==="win32",I=s.platform==="darwin",H=s.platform==="linux",P=H&&!!s.env.SNAP&&!!s.env.SNAP_REVISION,f=z,o=z;const T=s.env.VSCODE_NLS_CONFIG;if(T)try{const N=JSON.parse(T),D=N.availableLanguages["*"];f=N.locale,o=D||z,r=N._translationsConfigFile}catch(N){}e=!0}else console.error("Unable to resolve platform.");let n=0;I?n=1:A?n=3:H&&(n=2);const t=A,b=I,v=H,E=e,w=C,x=g,_=a,p=function(){if(h.setImmediate)return h.setImmediate.bind(h);if(typeof h.postMessage=="function"&&!h.importScripts){let D=[];h.addEventListener("message",O=>{if(O.data&&O.data.vscodeSetImmediateId)for(let k=0,R=D.length;k<R;k++){const B=D[k];if(B.id===O.data.vscodeSetImmediateId){D.splice(k,1),B.callback();return}}});let y=0;return O=>{const k=++y;D.push({id:k,callback:O}),h.postMessage({vscodeSetImmediateId:k},"*")}}if(typeof(s==null?void 0:s.nextTick)=="function")return s.nextTick.bind(s);const N=Promise.resolve();return D=>N.then(D)}(),u=I||g?2:A?1:3;let l=!0,m=!1;function c(){if(!m){m=!0;const T=new Uint8Array(2);T[0]=1,T[1]=2;const N=new Uint16Array(T.buffer);l=N[0]===(2<<8)+1}return l}}).call(this,j("IyRk"),j("Q2Ig"))},N0LK:function(Pe,he,j){"use strict";j.d(he,"C",function(){return ce}),j.d(he,"v",function(){return M}),j.d(he,"s",function(){return z}),j.d(he,"t",function(){return A}),j.d(he,"U",function(){return I}),j.d(he,"J",function(){return H}),j.d(he,"O",function(){return P}),j.d(he,"p",function(){return e}),j.d(he,"T",function(){return C}),j.d(he,"q",function(){return g}),j.d(he,"N",function(){return f}),j.d(he,"M",function(){return o}),j.d(he,"Q",function(){return r}),j.d(he,"u",function(){return a}),j.d(he,"x",function(){return h}),j.d(he,"I",function(){return s}),j.d(he,"f",function(){return i}),j.d(he,"h",function(){return n}),j.d(he,"g",function(){return t}),j.d(he,"i",function(){return b}),j.d(he,"G",function(){return v}),j.d(he,"H",function(){return E}),j.d(he,"r",function(){return w}),j.d(he,"R",function(){return x}),j.d(he,"d",function(){return _}),j.d(he,"e",function(){return p}),j.d(he,"E",function(){return u}),j.d(he,"F",function(){return l}),j.d(he,"j",function(){return m}),j.d(he,"z",function(){return c}),j.d(he,"K",function(){return N}),j.d(he,"L",function(){return D}),j.d(he,"m",function(){return O}),j.d(he,"k",function(){return R}),j.d(he,"A",function(){return V}),j.d(he,"a",function(){return ee}),j.d(he,"n",function(){return re}),j.d(he,"l",function(){return _e}),j.d(he,"D",function(){return se}),j.d(he,"B",function(){return ye}),j.d(he,"b",function(){return ve}),j.d(he,"S",function(){return Ee}),j.d(he,"o",function(){return le}),j.d(he,"P",function(){return F}),j.d(he,"w",function(){return d}),j.d(he,"c",function(){return S}),j.d(he,"y",function(){return U});function ce(q){return!q||typeof q!="string"?!0:q.trim().length===0}const W=/{(\d+)}/g;function M(q,...ae){return ae.length===0?q:q.replace(W,function(fe,pe){const Ce=parseInt(pe,10);return isNaN(Ce)||Ce<0||Ce>=ae.length?fe:ae[Ce]})}function z(q){return q.replace(/[<>&]/g,function(ae){switch(ae){case"<":return"<";case">":return">";case"&":return"&";default:return ae}})}function A(q){return q.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function I(q,ae=" "){const fe=H(q,ae);return P(fe,ae)}function H(q,ae){if(!q||!ae)return q;const fe=ae.length;if(fe===0||q.length===0)return q;let pe=0;for(;q.indexOf(ae,pe)===pe;)pe=pe+fe;return q.substring(pe)}function P(q,ae){if(!q||!ae)return q;const fe=ae.length,pe=q.length;if(fe===0||pe===0)return q;let Ce=pe,Me=-1;for(;!(Me=q.lastIndexOf(ae,Ce-1),Me===-1||Me+fe!==Ce);){if(Me===0)return"";Ce=Me}return q.substring(0,Ce)}function e(q){return q.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function C(q){return q.replace(/\*/g,"")}function g(q,ae,fe={}){if(!q)throw new Error("Cannot create regex from empty string");ae||(q=A(q)),fe.wholeWord&&(/\B/.test(q.charAt(0))||(q="\\b"+q),/\B/.test(q.charAt(q.length-1))||(q=q+"\\b"));let pe="";return fe.global&&(pe+="g"),fe.matchCase||(pe+="i"),fe.multiline&&(pe+="m"),fe.unicode&&(pe+="u"),new RegExp(q,pe)}function f(q){if(q.source==="^"||q.source==="^$"||q.source==="$"||q.source==="^\\s*$")return!1;const ae=q.exec("");return!!(ae&&q.lastIndex===0)}function o(q){return(q.global?"g":"")+(q.ignoreCase?"i":"")+(q.multiline?"m":"")+(q.unicode?"u":"")}function r(q){return q.split(/\r\n|\r|\n/)}function a(q){for(let ae=0,fe=q.length;ae<fe;ae++){const pe=q.charCodeAt(ae);if(pe!==32&&pe!==9)return ae}return-1}function h(q,ae=0,fe=q.length){for(let pe=ae;pe<fe;pe++){const Ce=q.charCodeAt(pe);if(Ce!==32&&Ce!==9)return q.substring(ae,pe)}return q.substring(ae,fe)}function s(q,ae=q.length-1){for(let fe=ae;fe>=0;fe--){const pe=q.charCodeAt(fe);if(pe!==32&&pe!==9)return fe}return-1}function i(q,ae){return q<ae?-1:q>ae?1:0}function n(q,ae,fe=0,pe=q.length,Ce=0,Me=ae.length){for(;fe<pe&&Ce<Me;fe++,Ce++){let Ye=q.charCodeAt(fe),Xe=ae.charCodeAt(Ce);if(Ye<Xe)return-1;if(Ye>Xe)return 1}const He=pe-fe,je=Me-Ce;return He<je?-1:He>je?1:0}function t(q,ae){return b(q,ae,0,q.length,0,ae.length)}function b(q,ae,fe=0,pe=q.length,Ce=0,Me=ae.length){for(;fe<pe&&Ce<Me;fe++,Ce++){let Ye=q.charCodeAt(fe),Xe=ae.charCodeAt(Ce);if(Ye===Xe)continue;if(Ye>=128||Xe>=128)return n(q.toLowerCase(),ae.toLowerCase(),fe,pe,Ce,Me);v(Ye)&&(Ye-=32),v(Xe)&&(Xe-=32);const ze=Ye-Xe;if(ze===0)continue;return ze}const He=pe-fe,je=Me-Ce;return He<je?-1:He>je?1:0}function v(q){return q>=97&&q<=122}function E(q){return q>=65&&q<=90}function w(q,ae){return q.length===ae.length&&b(q,ae)===0}function x(q,ae){const fe=ae.length;return ae.length>q.length?!1:b(q,ae,0,fe)===0}function _(q,ae){let fe,pe=Math.min(q.length,ae.length);for(fe=0;fe<pe;fe++)if(q.charCodeAt(fe)!==ae.charCodeAt(fe))return fe;return pe}function p(q,ae){let fe,pe=Math.min(q.length,ae.length);const Ce=q.length-1,Me=ae.length-1;for(fe=0;fe<pe;fe++)if(q.charCodeAt(Ce-fe)!==ae.charCodeAt(Me-fe))return fe;return pe}function u(q){return 55296<=q&&q<=56319}function l(q){return 56320<=q&&q<=57343}function m(q,ae){return(q-55296<<10)+(ae-56320)+65536}function c(q,ae,fe){const pe=q.charCodeAt(fe);if(u(pe)&&fe+1<ae){const Ce=q.charCodeAt(fe+1);if(l(Ce))return m(pe,Ce)}return pe}function T(q,ae){const fe=q.charCodeAt(ae-1);if(l(fe)&&ae>1){const pe=q.charCodeAt(ae-2);if(u(pe))return m(pe,fe)}return fe}function N(q,ae){const fe=L.getInstance(),pe=ae,Ce=q.length,Me=c(q,Ce,ae);ae+=Me>=65536?2:1;let He=fe.getGraphemeBreakType(Me);for(;ae<Ce;){const je=c(q,Ce,ae),Ye=fe.getGraphemeBreakType(je);if(S(He,Ye))break;ae+=je>=65536?2:1,He=Ye}return ae-pe}function D(q,ae){const fe=L.getInstance(),pe=ae,Ce=T(q,ae);ae-=Ce>=65536?2:1;let Me=fe.getGraphemeBreakType(Ce);for(;ae>0;){const He=T(q,ae),je=fe.getGraphemeBreakType(He);if(S(je,Me))break;ae-=He>=65536?2:1,Me=je}return pe-ae}const y=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function O(q){return y.test(q)}const k=/(?:[\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 R(q){return k.test(q)}const B=/^[\t\n\r\x20-\x7E]*$/;function V(q){return B.test(q)}const ee=/[\u2028\u2029]/;function re(q){return ee.test(q)}function _e(q){for(let ae=0,fe=q.length;ae<fe;ae++)if(se(q.charCodeAt(ae)))return!0;return!1}function se(q){return q=+q,q>=11904&&q<=55215||q>=63744&&q<=64255||q>=65281&&q<=65374}function ye(q){return q>=127462&&q<=127487||q===8986||q===8987||q===9200||q===9203||q>=9728&&q<=10175||q===11088||q===11093||q>=127744&&q<=128591||q>=128640&&q<=128764||q>=128992&&q<=129003||q>=129280&&q<=129535||q>=129648&&q<=129750}const ve=String.fromCharCode(65279);function Ee(q){return!!(q&&q.length>0&&q.charCodeAt(0)===65279)}function le(q,ae=!1){return q?(ae&&(q=q.replace(/\\./g,"")),q.toLowerCase()!==q):!1}function F(q){const ae=90-65+1;return q=q%(2*ae),q<ae?String.fromCharCode(97+q):String.fromCharCode(65+q-ae)}function d(q){const ae=L.getInstance();return ae.getGraphemeBreakType(q)}function S(q,ae){return q===0?ae!==5&&ae!==7:q===2&&ae===3?!1:q===4||q===2||q===3||(ae===4||ae===2||ae===3)?!0:q===8&&(ae===8||ae===9||ae===11||ae===12)||((q===11||q===9)&&(ae===9||ae===10)||((q===12||q===10)&&ae===10||(ae===5||ae===13||(ae===7||(q===1||q===13&&ae===14)))))?!1:!(q===6&&ae===6)}class L{constructor(){this._data=G()}static getInstance(){return L._INSTANCE||(L._INSTANCE=new L),L._INSTANCE}getGraphemeBreakType(q){if(q<32)return q===10?3:q===13?2:4;if(q<127)return 0;const ae=this._data,fe=ae.length/3;let pe=1;for(;pe<=fe;)if(q<ae[3*pe])pe=2*pe;else if(q>ae[3*pe+1])pe=2*pe+1;else return ae[3*pe+2];return 0}}L._INSTANCE=null;function G(){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 U(q,ae){if(q===0)return 0;const fe=$(q,ae);if(fe!==void 0)return fe;const pe=T(ae,q);return q-=de(pe),q}function $(q,ae){let fe=T(ae,q);for(q-=de(fe);xe(fe)||fe===65039||fe===8419;){if(q===0)return;fe=T(ae,q),q-=de(fe)}if(!ye(fe))return;if(q>=0){const pe=T(ae,q);pe===8205&&(q-=de(pe))}return q}function de(q){return q>=65536?2:1}function xe(q){return 127995<=q&&q<=127999}},NQs2:function(Pe,he,j){Pe.exports={flex_box_center:"flex_box_center___3K14R",flex_space_between:"flex_space_between___1KE7t",flex_box_vertical_center:"flex_box_vertical_center___3Yslx",flex_box_center_end:"flex_box_center_end___2RmV-",flex_box_column:"flex_box_column___3k3IQ",banner:"banner___3caau",content:"content___fxe_p",btns:"btns___Vv-WB",img_noactive:"img_noactive___s1naU",img_active:"img_active___11s7p",input_warp:"input_warp___3Y7JU"}},NReP:function(Pe,he,j){"use strict";var ce=j("DZo9"),W=j("8z0m"),M=j("0Owb"),z=j("14J3"),A=j("BMrR"),I=j("k1fw"),H=j("9og8"),P=j("miYZ"),e=j("tsqr"),C=j("tJVT"),g=j("PpiC"),f=j("WmNS"),o=j.n(f),r=j("q1tI"),a=j.n(r),h=j("m3rI"),s=j("jN4g"),i=j("Nf5h"),n=function(b){var v,E,w=b.ButtonText,x=b.ButtonOptions,_=b.ImgStyle,p=b.ImgClassName,u=Object(g.a)(b,["ButtonText","ButtonOptions","ImgStyle","ImgClassName"]),l=Object(r.useState)(null),m=Object(C.a)(l,2),c=m[0],T=m[1],N={maxCount:1,accept:"image/*",withCredentials:!0,beforeUpload:function(O){var k=O.size/1024/1024;return k==0?(e.b.error("".concat(O.name," \u56FE\u7247\u65E0\u6CD5\u4E0A\u4F20\u3002").concat(k==0?"\u6587\u4EF6\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A":"\u8D85\u8FC7\u56FE\u7247\u5927\u5C0F\u9650\u5236(2MB)")),Promise.reject()):Promise.resolve()},onChange:function(O){var k=["uploading","done","removed"];if(k.includes(O.file.status)&&T(O.file),O.file.status=="done"){var R,B;u==null||u.onChange((R=O.file)===null||R===void 0||((B=R.response)===null||B===void 0)?void 0:B.id)}},onRemove:function(){var y=Object(H.a)(o.a.mark(function k(R){return o.a.wrap(function(V){for(;;)switch(V.prev=V.next){case 0:D();case 1:case"end":return V.stop()}},k)}));function O(k){return y.apply(this,arguments)}return O}(),action:"".concat(h.a.API_SERVER,"/api/attachments.json")},D=function(){T(null),u==null||u.onChange(null)};return Object(r.useEffect)(function(){(u==null?void 0:u.value)&&T({response:{id:u==null?void 0:u.value}})},[u==null?void 0:u.value]),a.a.createElement("div",{id:(u==null?void 0:u.scrollId)||""},c!=null&&(v=c.response)!==null&&v!==void 0&&v.id?a.a.createElement(A.a,{align:"middle",justify:"center",className:p,style:Object(I.a)(Object(I.a)({},{position:"relative",width:400,backgroundColor:"#f4f3f4"}),_)},a.a.createElement("img",{src:h.a.API_SERVER+"/api/attachments/"+(c==null||((E=c.response)===null||E===void 0)?void 0:E.id),alt:"avatar",style:{width:"100%"}}),a.a.createElement("div",{style:{position:"absolute",right:"-6px",top:"-6px",cursor:"pointer",width:16,height:16,borderRadius:"50%",backgroundColor:"#fff"}},a.a.createElement(s.a,{onClick:Object(H.a)(o.a.mark(function y(){return o.a.wrap(function(k){for(;;)switch(k.prev=k.next){case 0:D();case 1:case"end":return k.stop()}},y)})),style:{fontSize:"16px",color:"red"}}))):a.a.createElement(W.a,N,a.a.createElement(i.e,Object(M.a)({style:Object(I.a)({borderRadius:"2px"},x==null?void 0:x.style)},x),w)))};he.a=n},Nf5h:function(Pe,he,j){"use strict";j.d(he,"a",function(){return e}),j.d(he,"i",function(){return h}),j.d(he,"l",function(){return t}),j.d(he,"f",function(){return w}),j.d(he,"j",function(){return u}),j.d(he,"d",function(){return xe}),j.d(he,"b",function(){return Ce}),j.d(he,"h",function(){return Ye}),j.d(he,"g",function(){return et}),j.d(he,"k",function(){return ie}),j.d(he,"e",function(){return Pt}),j.d(he,"c",function(){return tt});var ce=j("5NDa"),W=j("5rEg"),M=j("tJVT"),z=j("q1tI"),A=j.n(z),I=j("NQs2"),H=j.n(I),P=function(Se){var it=Se.dataSource,ct=it===void 0?[]:it,ft=Se.bannerImg,pt=Se.img,qe=Se.imgWidth,ot=qe===void 0?346:qe,Ze=Se.title,St=Se.sunTitle,dt=Se.bannerExtraContent,Mt=Se.placeholder,Et=Se.onChange,Bt=Object(z.useState)(""),zt=Object(M.a)(Bt,2),Zt=zt[0],gn=zt[1];return A.a.createElement("div",{className:H.a.banner,style:{backgroundImage:"url('".concat(ft,"')"),backgroundPosition:"center",backgroundSize:"cover"}},A.a.createElement("div",{className:H.a.content},A.a.createElement("aside",null,A.a.createElement("p",{style:{marginBottom:"".concat(ct.length==0?"0":"")}},A.a.createElement("b",null,Ze),A.a.createElement("span",null,St)),ct.length>0&&A.a.createElement("div",{className:H.a.btns},ct.map(function($e,kt){return $e.buttonShow&&A.a.createElement(A.a.Fragment,null,$e.Button?$e.Button:A.a.createElement("div",{key:kt,onClick:$e.click},A.a.createElement("img",{src:$e.img,className:H.a.img_noactive}),A.a.createElement("img",{src:$e.img_active,className:H.a.img_active}),$e.name))})),dt),ct.length>0&&A.a.createElement("div",{className:H.a.input_warp},A.a.createElement(W.a,{value:Zt,onChange:function(kt){gn(kt.target.value)},placeholder:Mt,onPressEnter:function(){return Et(Zt)},color:"#fff"}),A.a.createElement("i",{onClick:function(){return Et(Zt)},className:"iconfont icon-sousuo9 font14 pl10 current"}))))},e=P,C=j("6nfa"),g=j.n(C),f=j("TSYQ"),o=j.n(f),r=j("9kvl"),a=function(Se){var it=Se.dataSource,ct=it===void 0?[]:it,ft=Se.value,pt=Se.onChange,qe=Se.className,ot=Se.title,Ze=Se.titleWidth,St=Ze===void 0?56:Ze,dt=Se.style,Mt=dt===void 0?{}:dt,Et=Se.fontColor,Bt=Et===void 0?"#6A7283":Et,zt=Se.isId,Zt=zt===void 0?!1:zt,gn=Object(z.useState)(0),$e=Object(M.a)(gn,2),kt=$e[0],Yt=$e[1],Cn=Object(z.useState)(!1),Wt=Object(M.a)(Cn,2),Gt=Wt[0],vn=Wt[1],ln=Object(z.useRef)(null),qt=Object(r.g)();return Object(z.useEffect)(function(){if(ct.length!==0){var nn;(ln==null||((nn=ln.current)===null||nn===void 0)?void 0:nn.clientHeight)>98?Yt(1):Yt(0)}ct.length===0&&Yt(0)},[ct]),A.a.createElement("div",{className:o()(g.a.row,qe),style:Mt},A.a.createElement("div",{style:{width:St,marginTop:Gt?12:4},className:g.a.title},ot),A.a.createElement("div",{className:Gt?"".concat(g.a.tagsWrap," ").concat(g.a.tagsBorderWrap):g.a.tagsWrap},A.a.createElement("div",{className:g.a.bar,style:kt>0?{height:kt===1?100:"auto",overflow:kt===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},A.a.createElement("div",{className:g.a.name,ref:ln},ct==null?void 0:ct.map(function(nn){return A.a.createElement("span",{onClick:function(){return pt(Zt?nn.id:nn.name)},key:Zt?nn.id:nn.name,title:nn.name,style:{color:Bt},className:ft===(Zt?nn.id:nn.name)?g.a.active:""},nn.name)}))),!!kt&&A.a.createElement(z.Fragment,null,kt===1?A.a.createElement("div",{onClick:function(){var ir;Yt(2),(ln==null||((ir=ln.current)===null||ir===void 0)?void 0:ir.clientHeight)>205?vn(!0):vn(!1)},className:g.a.action},qt.formatMessage({id:"quantum.more"}),A.a.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):A.a.createElement("div",{onClick:function(){Yt(1),vn(!1)},className:g.a.action},qt.formatMessage({id:"quantum.back"}),A.a.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},h=a,s=j("cz0n"),i=j.n(s),n=function(Se){var it=Se.dataSource,ct=it===void 0?[]:it,ft=Se.value,pt=Se.onChange,qe=Se.className;return A.a.createElement("div",{className:o()(i.a.tabs,qe)},ct.map(function(ot){return A.a.createElement("span",{onClick:function(){return pt(ot.id)},className:ft===ot.id?i.a.active:"",key:ot.id},ot.name)}))},t=n,b=j("KOXS"),v=j.n(b),E=function(Se){var it,ct=Se.dataSource,ft=ct===void 0?[]:ct,pt=Se.value,qe=Se.onChange,ot=Se.className,Ze=Se.style,St=Ze===void 0?{}:Ze,dt=Se.placeholder,Mt=Object(z.useState)(""),Et=Object(M.a)(Mt,2),Bt=Et[0],zt=Et[1],Zt=Object(z.useState)(""),gn=Object(M.a)(Zt,2),$e=gn[0],kt=gn[1];Object(z.useEffect)(function(){var Wt;(Wt=JSON.stringify(pt))!==null&&Wt!==void 0&&Wt.includes("{")?(zt(pt.id),kt(pt.value)):kt(pt)},[pt]);var Yt=function(){qe($e||null,Bt||"")},Cn=function(Gt){if(Gt===Bt)return;zt(Gt),qe($e,Gt)};return A.a.createElement("div",{className:o()(v.a.input,ot),style:St},!!ft.length&&A.a.createElement("div",{className:v.a.dropdown},A.a.createElement("div",{className:v.a.text},(it=ft.find(function(Wt){return Wt.id===Bt}))===null||it===void 0?void 0:it.name,A.a.createElement("i",{className:"iconfont icon-zhankai4"}),A.a.createElement("b",{className:v.a.b1}),A.a.createElement("b",{className:v.a.b2})),A.a.createElement("div",{className:v.a.menu},ft.map(function(Wt,Gt){return A.a.createElement("div",{key:Gt,onClick:function(){return Cn(Wt.id)}},Wt.name)}))),A.a.createElement(W.a,{onPressEnter:Yt,value:$e,onChange:function(Gt){return kt(Gt.target.value||"")},bordered:!1,placeholder:dt}),A.a.createElement("i",{onClick:Yt,className:"iconfont icon-sousuo9 font14 pl10 current"}))},w=E,x=j("f9pc"),_=j.n(x),p=function(Se){var it=Se.value,ct=Se.onChange,ft=Se.className,pt=Se.total,qe=Se.pageSize,ot=Se.style,Ze=ot===void 0?{}:ot,St=it<2,dt=it>=Math.ceil(pt/qe);return pt<=qe?A.a.createElement(A.a.Fragment,null):A.a.createElement("div",{className:o()(_.a.quickPager,ft),style:Ze},A.a.createElement("div",{onClick:function(){St||ct(it-1,"prev")},className:St?_.a.disabled:""},"\u4E0A\u4E00\u9875"),A.a.createElement("div",{onClick:function(){dt||ct(it+1,"next")},className:dt?_.a.disabled:""},"\u4E0B\u4E00\u9875"))},u=p,l=j("T2oS"),m=j("W9HT"),c=j("pC0b"),T=j("GzdX"),N=j("5Dmo"),D=j("3S7+"),y=j("Oe0F"),O=j.n(y),k=j("m3rI"),R=j("1vsH"),B=j("JAbv"),V=j.n(B),ee=j("Bq7L"),re=j.n(ee),_e=j("MEgm"),se=j.n(_e),ye=j("BdwD"),ve=function(Se){var it=Se.className,ct=Se.dataSource,ft=ct===void 0?[]:ct,pt=Se.col,qe=pt===void 0?4:pt,ot=Se.right,Ze=Se.bottom,St=Ze===void 0?23:Ze,dt=Se.precision,Mt=dt===void 0?0:dt,Et=Se.wrapWidth,Bt=Et===void 0?1200:Et,zt=Se.trackEventItems,Zt=Se.loading,gn=Math.floor((Bt-(qe-1)*ot)/qe);return A.a.createElement(m.a,{spinning:Zt},A.a.createElement("div",{className:o()(O.a.list,it)},!!ft.length&&ft.map(function($e,kt){var Yt=$e.name,Cn=$e.id,Wt=$e.identifier,Gt=$e.power,vn=$e.cover_image_id,ln=$e.pic;return A.a.createElement("div",{className:O.a.wrap,key:Cn,style:{width:gn,marginRight:(1+kt)%qe===0?0:ot+Mt,marginBottom:St}},A.a.createElement("a",{target:"_blank",href:"/shixuns/".concat(Wt,"/challenges"),className:O.a.li,onClick:function(nn){nn.preventDefault(),zt&&Object(R.db)([zt]),Gt&&Object(R.S)("/shixuns/".concat(Wt,"/challenges"))}},A.a.createElement("div",{className:O.a.img},A.a.createElement("img",{className:O.a.cover,src:vn?"".concat(k.a.API_SERVER,"/api/attachments/").concat(vn):"".concat(k.a.IMG_SERVER,"/").concat(ln)}),$e.is_jupyter&&A.a.createElement("img",{className:O.a.sign,src:V.a}),$e.is_jupyter_lab&&A.a.createElement("img",{className:O.a.sign,src:re.a}),$e.is_unity_3d&&A.a.createElement("img",{className:O.a.sign,src:se.a})),A.a.createElement("div",{className:O.a.name},A.a.createElement(D.a,{title:Yt||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},A.a.createElement("span",{className:O.a.e},Yt||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),A.a.createElement("div",{className:O.a.tags},A.a.createElement(D.a,{placement:"bottom",title:"\u5173\u5361\u6570"},A.a.createElement("span",null,A.a.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr3"}),A.a.createElement("span",null,$e.challenges_count))),!!$e.myshixuns_count&&A.a.createElement(D.a,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},A.a.createElement("span",null,A.a.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),A.a.createElement("span",null,$e.myshixuns_count))),A.a.createElement(D.a,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},A.a.createElement("span",null,A.a.createElement("span",null,$e.level))),A.a.createElement("div",{className:O.a.rate},A.a.createElement(T.a,{allowHalf:!0,disabled:!0,defaultValue:$e.score_info}),A.a.createElement("span",null,"\xA0",$e.score_info?"".concat($e.score_info,"\u5206"):"5\u5206")))),!Gt&&A.a.createElement("div",{className:O.a.lockWrap},A.a.createElement("img",{src:"".concat(k.a.IMG_SERVER,"/images/educoder/icon/lockclose.svg")}),A.a.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!ft.length&&A.a.createElement(ye.a,null)))},Ee=ve,le=j("ZJlW"),F=j.n(le),d=j("z4EP"),S=j.n(d),L=j("+GGh"),G=j.n(L),U=j("cFMs"),$=j.n(U),de=function(Se){var it=Se.className,ct=Se.dataSource,ft=ct===void 0?[]:ct,pt=Se.col,qe=pt===void 0?4:pt,ot=Se.right,Ze=Se.bottom,St=Ze===void 0?23:Ze,dt=Se.precision,Mt=dt===void 0?0:dt,Et=Se.wrapWidth,Bt=Et===void 0?1200:Et,zt=Se.trackEventItems,Zt=Se.loading,gn=Math.floor((Bt-(qe-1)*ot)/qe);return A.a.createElement(m.a,{spinning:Zt},A.a.createElement("div",{className:o()(F.a.list,it)},!!ft.length&&ft.map(function($e,kt){var Yt=$e.name,Cn=$e.id,Wt=$e.identifier,Gt=$e.featured,vn=$e.school_name,ln=$e.image_url,qt=$e.excellent;return A.a.createElement("div",{key:Cn,className:F.a.wrap,style:{width:gn,marginRight:(1+kt)%qe===0?0:ot+Mt,marginBottom:St}},A.a.createElement("a",{target:"_blank",href:"/paths/".concat(Wt),className:F.a.li,onClick:function(ir){ir.preventDefault(),zt&&Object(R.db)([zt]),Object(R.S)("/paths/".concat(Wt))}},A.a.createElement("div",{className:F.a.img},A.a.createElement("img",{className:F.a.cover,src:"".concat(k.a.IMG_SERVER,"/").concat(ln)}),Gt===1&&A.a.createElement("img",{className:F.a.sign,src:S.a}),Gt===2&&A.a.createElement("img",{className:F.a.sign,src:""}),Gt===3&&A.a.createElement("img",{className:F.a.sign,src:G.a}),Gt===4&&A.a.createElement("img",{className:F.a.sign,src:""}),Gt===5&&A.a.createElement("img",{className:F.a.sign,src:$.a})),A.a.createElement("div",{className:F.a.name},A.a.createElement(D.a,{title:Yt},A.a.createElement("span",{className:F.a.e},Yt))),A.a.createElement(D.a,{title:"\u53D1\u5E03\u5355\u4F4D\uFF1A".concat(vn)},A.a.createElement("div",{className:F.a.unit},A.a.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),vn)),A.a.createElement("div",{className:F.a.tags},A.a.createElement(D.a,{placement:"bottom",title:"\u7AE0\u8282\u6570"},A.a.createElement("span",null,A.a.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),A.a.createElement("span",null,$e.stages_count))),A.a.createElement(D.a,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},A.a.createElement("span",null,A.a.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),A.a.createElement("span",null,$e.members_count))),qt&&A.a.createElement("div",{className:F.a.tag},"\u5F00\u653E\u8BFE\u7A0B"))))}),!ft.length&&A.a.createElement(ye.a,null)))},xe=de,q=j("iL++"),ae=j.n(q),fe=j("xiVL"),pe=function(Se){var it=Se.className,ct=Se.dataSource,ft=ct===void 0?[]:ct,pt=Se.col,qe=pt===void 0?4:pt,ot=Se.right,Ze=Se.bottom,St=Ze===void 0?23:Ze,dt=Se.precision,Mt=dt===void 0?0:dt,Et=Se.wrapWidth,Bt=Et===void 0?1200:Et,zt=Se.trackEventItems,Zt=Se.loading,gn=Math.floor((Bt-(qe-1)*ot)/qe);return A.a.createElement(m.a,{spinning:Zt},A.a.createElement("div",{className:o()(ae.a.list,it)},!!ft.length&&ft.map(function($e,kt){var Yt=$e.subject_identifier,Cn=$e.id,Wt=$e.identifier,Gt=$e.power,vn=$e.is_public!=0&&$e.is_public;return A.a.createElement("div",{className:ae.a.wrap,key:Cn,style:{width:gn,marginRight:(1+kt)%qe===0?0:ot+Mt,marginBottom:St}},A.a.createElement("a",{className:ae.a.li,onClick:function(qt){qt.preventDefault()}},A.a.createElement("div",{className:ae.a.top},A.a.createElement(D.a,{title:$e.name},A.a.createElement("div",{className:ae.a.name},$e.name)),A.a.createElement("img",{className:ae.a.img,src:k.a.IMG_SERVER+"/images/"+$e.avatar_url}),A.a.createElement("div",{className:ae.a.text},$e.creator),Yt&&A.a.createElement("div",{className:ae.a.btns},A.a.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),A.a.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),vn&&A.a.createElement("div",{className:ae.a.sign},"\u516C\u5F00")),A.a.createElement("div",{className:ae.a.bottom},$e.visits>0&&A.a.createElement(D.a,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},A.a.createElement("span",null,A.a.createElement("i",{className:"iconfont icon-liulanyan"}),A.a.createElement("span",null,$e.visits))),$e.course_members_count>0&&A.a.createElement(D.a,{title:"\u6210\u5458",placement:"bottom"},A.a.createElement("span",null,A.a.createElement("i",{className:"iconfont icon-chengyuan"}),$e.course_members_count)),$e.tasks_count>0&&A.a.createElement(D.a,{title:"\u4F5C\u4E1A",placement:"bottom"},A.a.createElement("span",null,A.a.createElement("i",{className:"iconfont icon-zuoye"}),$e.tasks_count)),$e.is_end?A.a.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):A.a.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),A.a.createElement("div",{className:ae.a.lockWrap},$e.is_accessible?A.a.createElement(A.a.Fragment,null,Yt&&A.a.createElement("div",{onClick:function(){return Object(R.S)("/paths/".concat(Yt))}},"\u8FDB\u5165\u5B9E\u8DF5\u8BFE\u7A0B"),A.a.createElement("div",{onClick:function(qt){zt&&Object(R.db)([zt]),Object(R.S)($e.first_category_url)}},"\u8FDB\u5165\u6559\u5B66\u8BFE\u5802")):A.a.createElement(A.a.Fragment,null,A.a.createElement("img",{src:"".concat(k.a.IMG_SERVER,"/images/educoder/icon/lockclose.svg")}),A.a.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165"))))}),!ft.length&&A.a.createElement(ye.a,null)))},Ce=pe,Me=j("f0W+"),He=j.n(Me),je=function(Se){var it=Se.dataSource,ct=it===void 0?[]:it,ft=Se.value,pt=Se.onChange,qe=Se.className,ot=Se.style,Ze=ot===void 0?{}:ot,St=Se.tabBarExtraContent;return A.a.createElement("div",{className:o()(He.a.tabs,qe),style:Ze},A.a.createElement("div",{className:He.a.tabsWrap},ct.map(function(dt,Mt){return A.a.createElement("div",{onClick:function(){return pt(dt.id)},className:ft===dt.id?He.a.active:"",key:Mt},dt.name)})),A.a.createElement("div",{className:He.a.tabBar},St))},Ye=je,Xe=j("9JIy"),ze=j.n(Xe),Fe=function(Se){var it=Se.className,ct=Se.style,ft=ct===void 0?{}:ct,pt=Se.children;return A.a.createElement("div",{className:o()(ze.a.table,it),style:ft},pt)},et=Fe,st=j("qVdP"),te=j("jsC+"),Y=j("lUTK"),X=j("BvKs"),Z=j("8WcF"),ne=j.n(Z),J=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}],Q=function(Se){var it,ct=Se.sortValue,ft=Se.dropValue,pt=Se.className,qe=Se.onSort,ot=Se.onDrop,Ze=Se.dataSource,St=Ze===void 0?J:Ze;return A.a.createElement("div",{className:o()(ne.a.orderWrap,pt)},A.a.createElement(te.a,{overlay:A.a.createElement(X.a,null,St.map(function(dt,Mt){return A.a.createElement(X.a.Item,{key:Mt,onClick:function(){return ot(dt.id)}},dt.name)}))},A.a.createElement("span",{className:ne.a.orderTextWrap},(it=St.find(function(dt){return ft===dt.id}))===null||it===void 0?void 0:it.name)),A.a.createElement("span",{className:ne.a.orderIconWrap},A.a.createElement("span",{className:ne.a.orderAsc},A.a.createElement("i",{className:ct==="asc"?"iconfont icon-sanjiaoxing-up font12 ".concat(ne.a.cursorPointer," ").concat(ne.a.active):"iconfont icon-sanjiaoxing-up font12 ".concat(ne.a.cursorPointer),onClick:function(){return qe(ct==="asc"?"desc":"asc")}})),A.a.createElement("span",{className:ne.a.orderDesc},A.a.createElement("i",{className:ct==="desc"?"iconfont icon-sanjiaoxing-down font12 ".concat(ne.a.cursorPointer," ").concat(ne.a.active):"iconfont icon-sanjiaoxing-down font12 ".concat(ne.a.cursorPointer),onClick:function(){return qe(ct==="asc"?"desc":"asc")}}))))},ie=Q,oe=j("+L6B"),be=j("2/Rp"),Te=j("0Owb"),Ie=j("9og8"),Je=j("PpiC"),ht=j("WmNS"),lt=j.n(ht),Rt=j("siWv"),vt=j.n(Rt),ut=j("LvDl"),Ht=function(Se){var it=Se.className,ct=Se.style,ft=Se.children,pt=Se.loading,qe=pt===void 0?!1:pt,ot=Se.openLoading,Ze=Se.onClick,St=Ze===void 0?function(){}:Ze,dt=Se.size,Mt=dt===void 0?"middle":dt,Et=Se.shape,Bt=Et===void 0?"round":Et,zt=Se.type,Zt=zt===void 0?"default":zt,gn=Object(Je.a)(Se,["className","style","children","loading","openLoading","onClick","size","shape","type"]),$e=Object(z.useState)(!1),kt=Object(M.a)($e,2),Yt=kt[0],Cn=kt[1];return A.a.createElement(be.a,Object(Te.a)({onClick:Object(ut.throttle)(function(){var Wt=Object(Ie.a)(lt.a.mark(function Gt(vn){return lt.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return ot&&Cn(!0),qt.prev=1,qt.next=4,St(vn);case 4:qt.next=9;break;case 6:qt.prev=6,qt.t0=qt.catch(1),console.log("error",qt.t0);case 9:ot&&Cn(!1);case 10:case"end":return qt.stop()}},Gt,null,[[1,6]])}));return function(Gt){return Wt.apply(this,arguments)}}(),2e3,{leading:!0,trailing:!1}),className:o()(vt.a.btn,vt.a["".concat(Mt,"-").concat(Bt)],it),style:ct,size:Mt,shape:Bt,type:Zt,loading:Yt||qe},gn),ft)},Pt=Ht,Ut=j("+oxA"),Kt=j.n(Ut),It=function(Se){var it=Se.className,ct=Se.style,ft=Se.children,pt=ft===void 0?null:ft,qe=Se.onClick,ot=Se.title;return A.a.createElement("div",{className:o()(Kt.a.head,it),style:ct},A.a.createElement("span",{className:"primary-hover",onClick:qe},A.a.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),A.a.createElement("b",{title:ot},ot),A.a.createElement("div",{className:Kt.a.node},pt))},mn=It,Bn=j("fgAr"),Qt=j.n(Bn),Ve=function(Se){var it=Se.confirmShow,ct=it===void 0?!0:it,ft=Se.confirmTitle,pt=Se.confirmClick,qe=Se.cancelShow,ot=qe===void 0?!0:qe,Ze=Se.cancelTitle,St=Se.cancelClick,dt=Se.className,Mt=Se.style,Et=Se.confirmLoading,Bt=Et===void 0?!1:Et;return A.a.createElement("div",{className:o()(Qt.a.btns,dt),style:Mt},ct&&A.a.createElement(be.a,{loading:Bt,onClick:pt,type:"primary",className:Qt.a.confirm},ft),ot&&A.a.createElement(be.a,{onClick:St,className:Qt.a.cancel},Ze))},tt=Ve},Oe0F:function(Pe,he,j){Pe.exports={flex_box_center:"flex_box_center___1lU21",flex_space_between:"flex_space_between___3CfJd",flex_box_vertical_center:"flex_box_vertical_center___20q2h",flex_box_center_end:"flex_box_center_end___1jeZT",flex_box_column:"flex_box_column___2EyZF",list:"list___3Kz8E",wrap:"wrap___12_X7",lockWrap:"lockWrap___9zL4z",li:"li___2bcH1",cover:"cover___1j6mq",img:"img___3itdG",sign:"sign___1Bm21",name:"name___3H1zU",e:"e___1W7k4",tags:"tags___G1tID",rate:"rate___aZiJa"}},SJMd:function(Pe,he){/**
|
|
* @license
|
|
* Copyright (C) 2006 Google Inc.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/var j,ce,W,M=!1,z,A;window.PR_SHOULD_USE_CONTINUATION=!0;var I,H;(function(){var P=window,e=["break,continue,do,else,for,if,return,while"],C=[e,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],g=[C,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],f=[g,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],o=[g,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],r=[g,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],a="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=[g,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",i=[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"],n=[e,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],t=[e,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],b=[f,r,o,h,s,i,n,t],v=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,E="str",w="kwd",x="com",_="typ",p="lit",u="pun",l="pln",m="tag",c="dec",T="src",N="atn",D="atv",y="nocode",O="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k($){for(var de=0,xe=!1,q=!1,ae=0,fe=$.length;ae<fe;++ae){var pe=$[ae];if(pe.ignoreCase)q=!0;else if(/[a-z]/i.test(pe.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){xe=!0,q=!1;break}}var Ce={b:8,t:9,n:10,v:11,f:12,r:13};function Me(ze){var Fe=ze.charCodeAt(0);if(Fe!==92)return Fe;var et=ze.charAt(1);return Fe=Ce[et],Fe||("0"<=et&&et<="7"?parseInt(ze.substring(1),8):et==="u"||et==="x"?parseInt(ze.substring(2),16):ze.charCodeAt(1))}function He(ze){if(ze<32)return(ze<16?"\\x0":"\\x")+ze.toString(16);var Fe=String.fromCharCode(ze);return Fe==="\\"||Fe==="-"||Fe==="]"||Fe==="^"?"\\"+Fe:Fe}function je(ze){var Fe=ze.substring(1,ze.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=[],st=Fe[0]==="^",te=["["];st&&te.push("^");for(var Y=st?1:0,X=Fe.length;Y<X;++Y){var Z=Fe[Y];if(/\\[bdsw]/i.test(Z))te.push(Z);else{var ne=Me(Z),J;Y+2<X&&Fe[Y+1]==="-"?(J=Me(Fe[Y+2]),Y+=2):J=ne,et.push([ne,J]),J<65||ne>122||(J<65||ne>90||et.push([Math.max(65,ne)|32,Math.min(J,90)|32]),J<97||ne>122||et.push([Math.max(97,ne)&~32,Math.min(J,122)&~32]))}}et.sort(function(be,Te){return be[0]-Te[0]||Te[1]-be[1]});for(var Q=[],ie=[],Y=0;Y<et.length;++Y){var oe=et[Y];oe[0]<=ie[1]+1?ie[1]=Math.max(ie[1],oe[1]):Q.push(ie=oe)}for(var Y=0;Y<Q.length;++Y){var oe=Q[Y];te.push(He(oe[0])),oe[1]>oe[0]&&(oe[1]+1>oe[0]&&te.push("-"),te.push(He(oe[1])))}return te.push("]"),te.join("")}function Ye(ze){for(var Fe=ze.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=Fe.length,st=[],te=0,Y=0;te<et;++te){var X=Fe[te];if(X==="(")++Y;else if(X.charAt(0)==="\\"){var Z=+X.substring(1);Z&&(Z<=Y?st[Z]=-1:Fe[te]=He(Z))}}for(var te=1;te<st.length;++te)st[te]===-1&&(st[te]=++de);for(var te=0,Y=0;te<et;++te){var X=Fe[te];if(X==="(")++Y,st[Y]||(Fe[te]="(?:");else if(X.charAt(0)==="\\"){var Z=+X.substring(1);Z&&Z<=Y&&(Fe[te]="\\"+st[Z])}}for(var te=0;te<et;++te)Fe[te]==="^"&&Fe[te+1]!=="^"&&(Fe[te]="");if(ze.ignoreCase&&xe)for(var te=0;te<et;++te){var X=Fe[te],ne=X.charAt(0);X.length>=2&&ne==="["?Fe[te]=je(X):ne!=="\\"&&(Fe[te]=X.replace(/[a-zA-Z]/g,function(ie){var oe=ie.charCodeAt(0);return"["+String.fromCharCode(oe&~32,oe|32)+"]"}))}return Fe.join("")}for(var Xe=[],ae=0,fe=$.length;ae<fe;++ae){var pe=$[ae];if(pe.global||pe.multiline)throw new Error(""+pe);Xe.push("(?:"+Ye(pe)+")")}return new RegExp(Xe.join("|"),q?"gi":"g")}function R($,de){var xe=/(?:^|\s)nocode(?:\s|$)/,q=[],ae=0,fe=[],pe=0;function Ce(Me){var He=Me.nodeType;if(He==1){if(xe.test(Me.className))return;for(var je=Me.firstChild;je;je=je.nextSibling)Ce(je);var Ye=Me.nodeName.toLowerCase();(Ye==="br"||Ye==="li")&&(q[pe]=`
|
|
`,fe[pe<<1]=ae++,fe[pe++<<1|1]=Me)}else if(He==3||He==4){var Xe=Me.nodeValue;Xe.length&&(de?Xe=Xe.replace(/\r\n?/g,`
|
|
`):Xe=Xe.replace(/[ \t\r\n]+/g," "),q[pe]=Xe,fe[pe<<1]=ae,ae+=Xe.length,fe[pe++<<1|1]=Me)}}return Ce($),{sourceCode:q.join("").replace(/\n$/,""),spans:fe}}function B($,de,xe,q,ae){if(!xe)return;var fe={sourceNode:$,pre:1,langExtension:null,numberLines:null,sourceCode:xe,spans:null,basePos:de,decorations:null};q(fe),ae.push.apply(ae,fe.decorations)}var V=/\S/;function ee($){for(var de=void 0,xe=$.firstChild;xe;xe=xe.nextSibling){var q=xe.nodeType;de=q===1?de?$:xe:q===3&&V.test(xe.nodeValue)?$:de}return de===$?void 0:de}function re($,de){var xe={},q;(function(){for(var pe=$.concat(de),Ce=[],Me={},He=0,je=pe.length;He<je;++He){var Ye=pe[He],Xe=Ye[3];if(Xe)for(var ze=Xe.length;--ze>=0;)xe[Xe.charAt(ze)]=Ye;var Fe=Ye[1],et=""+Fe;Me.hasOwnProperty(et)||(Ce.push(Fe),Me[et]=null)}Ce.push(/[\0-\uffff]/),q=k(Ce)})();var ae=de.length,fe=function(pe){for(var Ce=pe.sourceCode,Me=pe.basePos,He=pe.sourceNode,je=[Me,l],Ye=0,Xe=Ce.match(q)||[],ze={},Fe=0,et=Xe.length;Fe<et;++Fe){var st=Xe[Fe],te=ze[st],Y=void 0,X;if(typeof te=="string")X=!1;else{var Z=xe[st.charAt(0)];if(Z)Y=st.match(Z[1]),te=Z[0];else{for(var ne=0;ne<ae;++ne)if(Z=de[ne],Y=st.match(Z[1]),Y){te=Z[0];break}Y||(te=l)}X=te.length>=5&&te.substring(0,5)==="lang-",X&&!(Y&&typeof Y[1]=="string")&&(X=!1,te=T),X||(ze[st]=te)}var J=Ye;if(Ye+=st.length,!X)je.push(Me+J,te);else{var Q=Y[1],ie=st.indexOf(Q),oe=ie+Q.length;Y[2]&&(oe=st.length-Y[2].length,ie=oe-Q.length);var be=te.substring(5);B(He,Me+J,st.substring(0,ie),fe,je),B(He,Me+J+ie,Q,F(be,Q),je),B(He,Me+J+oe,st.substring(oe),fe,je)}}pe.decorations=je};return fe}function _e($){var de=[],xe=[];$.tripleQuotedStrings?de.push([E,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):$.multiLineStrings?de.push([E,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):de.push([E,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),$.verbatimStrings&&xe.push([E,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var q=$.hashComments;q&&($.cStyleComments?(q>1?de.push([x,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):de.push([x,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),xe.push([E,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):de.push([x,/^#[^\r\n]*/,null,"#"])),$.cStyleComments&&(xe.push([x,/^\/\/[^\r\n]*/,null]),xe.push([x,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ae=$.regexLiterals;if(ae){var fe=ae>1?"":`
|
|
\r`,pe=fe?".":"[\\S\\s]",Ce="/(?=[^/*"+fe+"])(?:[^/\\x5B\\x5C"+fe+"]|\\x5C"+pe+"|\\x5B(?:[^\\x5C\\x5D"+fe+"]|\\x5C"+pe+")*(?:\\x5D|$))+/";xe.push(["lang-regex",RegExp("^"+O+"("+Ce+")")])}var Me=$.types;Me&&xe.push([_,Me]);var He=(""+$.keywords).replace(/^ | $/g,"");He.length&&xe.push([w,new RegExp("^(?:"+He.replace(/[\s,]+/g,"|")+")\\b"),null]),de.push([l,/^\s+/,null,` \r
|
|
\xA0`]);var je="^.[^\\s\\w.$@'\"`/\\\\]*";return $.regexLiterals&&(je+="(?!s*/)"),xe.push([p,/^@[a-z_$][a-z_$@0-9]*/i,null],[_,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[l,/^[a-z_$][a-z_$@0-9]*/i,null],[p,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[l,/^\\[\s\S]?/,null],[u,new RegExp(je),null]),re(de,xe)}var se=_e({keywords:b,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ye($,de,xe){for(var q=/(?:^|\s)nocode(?:\s|$)/,ae=/\r\n?|\n/,fe=$.ownerDocument,pe=fe.createElement("li");$.firstChild;)pe.appendChild($.firstChild);var Ce=[pe];function Me(Fe){var et=Fe.nodeType;if(et==1&&!q.test(Fe.className))if(Fe.nodeName==="br")He(Fe),Fe.parentNode&&Fe.parentNode.removeChild(Fe);else for(var st=Fe.firstChild;st;st=st.nextSibling)Me(st);else if((et==3||et==4)&&xe){var te=Fe.nodeValue,Y=te.match(ae);if(Y){var X=te.substring(0,Y.index);Fe.nodeValue=X;var Z=te.substring(Y.index+Y[0].length);if(Z){var ne=Fe.parentNode;ne.insertBefore(fe.createTextNode(Z),Fe.nextSibling)}He(Fe),X||Fe.parentNode.removeChild(Fe)}}}function He(Fe){for(;!Fe.nextSibling;)if(Fe=Fe.parentNode,!Fe)return;function et(Y,X){var Z=X?Y.cloneNode(!1):Y,ne=Y.parentNode;if(ne){var J=et(ne,1),Q=Y.nextSibling;J.appendChild(Z);for(var ie=Q;ie;ie=Q)Q=ie.nextSibling,J.appendChild(ie)}return Z}for(var st=et(Fe.nextSibling,0),te;(te=st.parentNode)&&te.nodeType===1;)st=te;Ce.push(st)}for(var je=0;je<Ce.length;++je)Me(Ce[je]);de===(de|0)&&Ce[0].setAttribute("value",de);var Ye=fe.createElement("ol");Ye.className="linenums";for(var Xe=Math.max(0,de-1|0)||0,je=0,ze=Ce.length;je<ze;++je)pe=Ce[je],pe.className="L"+(je+Xe)%10,pe.firstChild||pe.appendChild(fe.createTextNode("\xA0")),Ye.appendChild(pe);$.appendChild(Ye)}function ve($){var de=/\bMSIE\s(\d+)/.exec(navigator.userAgent);de=de&&+de[1]<=8;var xe=/\n/g,q=$.sourceCode,ae=q.length,fe=0,pe=$.spans,Ce=pe.length,Me=0,He=$.decorations,je=He.length,Ye=0;He[je]=ae;var Xe,ze;for(ze=Xe=0;ze<je;)He[ze]!==He[ze+2]?(He[Xe++]=He[ze++],He[Xe++]=He[ze++]):ze+=2;for(je=Xe,ze=Xe=0;ze<je;){for(var Fe=He[ze],et=He[ze+1],st=ze+2;st+2<=je&&He[st+1]===et;)st+=2;He[Xe++]=Fe,He[Xe++]=et,ze=st}je=He.length=Xe;var te=$.sourceNode,Y="";te&&(Y=te.style.display,te.style.display="none");try{for(var X=null;Me<Ce;){var Z=pe[Me],ne=pe[Me+2]||ae,J=He[Ye+2]||ae,st=Math.min(ne,J),Q=pe[Me+1],ie;if(Q.nodeType!==1&&(ie=q.substring(fe,st))){de&&(ie=ie.replace(xe,"\r")),Q.nodeValue=ie;var oe=Q.ownerDocument,be=oe.createElement("span");be.className=He[Ye+1];var Te=Q.parentNode;Te.replaceChild(be,Q),be.appendChild(Q),fe<ne&&(pe[Me+1]=Q=oe.createTextNode(q.substring(st,ne)),Te.insertBefore(Q,be.nextSibling))}fe=st,fe>=ne&&(Me+=2),fe>=J&&(Ye+=2)}}finally{te&&(te.style.display=Y)}}var Ee={};function le($,de){for(var xe=de.length;--xe>=0;){var q=de[xe];Ee.hasOwnProperty(q)?P.console&&console.warn("cannot override language handler %s",q):Ee[q]=$}}function F($,de){return $&&Ee.hasOwnProperty($)||($=/^\s*</.test(de)?"default-markup":"default-code"),Ee[$]}le(se,["default-code"]),le(re([],[[l,/^[^<?]+/],[c,/^<!\w[^>]*(?:>|$)/],[x,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[u,/^(?:<[%?]|[%?]>)/],["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"]),le(re([[l,/^[\s]+/,null,` \r
|
|
`],[D,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[N,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[u,/^[=<>\/]+/],["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"]),le(re([],[[D,/^[\s\S]+/]]),["uq.val"]),le(_e({keywords:f,hashComments:!0,cStyleComments:!0,types:v}),["c","cc","cpp","cxx","cyc","m"]),le(_e({keywords:"null,true,false"}),["json"]),le(_e({keywords:r,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:v}),["cs"]),le(_e({keywords:o,cStyleComments:!0}),["java"]),le(_e({keywords:t,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),le(_e({keywords:i,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),le(_e({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),le(_e({keywords:n,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),le(_e({keywords:h,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),le(_e({keywords:a,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),le(re([],[[E,/^[\s\S]+/]]),["regex"]);function d($){var de=$.langExtension;try{var xe=R($.sourceNode,$.pre),q=xe.sourceCode;$.sourceCode=q,$.spans=xe.spans,$.basePos=0,F(de,q)($),ve($)}catch(ae){P.console&&console.log(ae&&ae.stack||ae)}}function S($,de,xe){var q=xe||!1,ae=de||null,fe=document.createElement("div");fe.innerHTML="<pre>"+$+"</pre>",fe=fe.firstChild,q&&ye(fe,q,!0);var pe={langExtension:ae,numberLines:q,sourceNode:fe,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return d(pe),fe.innerHTML}function L($,de){var xe=de||document.body,q=xe.ownerDocument||document;function ae(Z){return xe.getElementsByTagName(Z)}for(var fe=[ae("pre"),ae("code"),ae("xmp")],pe=[],Ce=0;Ce<fe.length;++Ce)for(var Me=0,He=fe[Ce].length;Me<He;++Me)pe.push(fe[Ce][Me]);fe=null;var je=Date;je.now||(je={now:function(){return+new Date}});var Ye=0,Xe=/\blang(?:uage)?-([\w.]+)(?!\S)/,ze=/\bprettyprint\b/,Fe=/\bprettyprinted\b/,et=/pre|xmp/i,st=/^code$/i,te=/^(?:pre|code|xmp)$/i,Y={};function X(){for(var Z=P.PR_SHOULD_USE_CONTINUATION?je.now()+250:Infinity;Ye<pe.length&&je.now()<Z;Ye++){for(var ne=pe[Ye],J=Y,Q=ne;Q=Q.previousSibling;){var ie=Q.nodeType,oe=(ie===7||ie===8)&&Q.nodeValue;if(oe?!/^\??prettify\b/.test(oe):ie!==3||/\S/.test(Q.nodeValue))break;if(oe){J={},oe.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Kt,It,mn){J[It]=mn});break}}var be=ne.className;if((J!==Y||ze.test(be))&&!Fe.test(be)){for(var Te=!1,Ie=ne.parentNode;Ie;Ie=Ie.parentNode){var Je=Ie.tagName;if(te.test(Je)&&Ie.className&&ze.test(Ie.className)){Te=!0;break}}if(!Te){ne.className+=" prettyprinted";var ht=J.lang;if(!ht){ht=be.match(Xe);var lt;!ht&&(lt=ee(ne))&&st.test(lt.tagName)&&(ht=lt.className.match(Xe)),ht&&(ht=ht[1])}var Rt;if(et.test(ne.tagName))Rt=1;else{var vt=ne.currentStyle,ut=q.defaultView,Ht=vt?vt.whiteSpace:ut&&ut.getComputedStyle?ut.getComputedStyle(ne,null).getPropertyValue("white-space"):0;Rt=Ht&&Ht.substring(0,3)==="pre"}var Pt=J.linenums;(Pt=Pt==="true"||+Pt)||(Pt=be.match(/\blinenums\b(?::(\d+))?/),Pt=Pt?Pt[1]&&Pt[1].length?+Pt[1]:!0:!1),Pt&&ye(ne,Pt,Rt);var Ut={langExtension:ht,sourceNode:ne,numberLines:Pt,pre:Rt,sourceCode:null,basePos:null,spans:null,decorations:null};d(Ut)}}}Ye<pe.length?P.setTimeout(X,250):typeof $=="function"&&$()}X()}var G=P.PR={createSimpleLexer:re,registerLangHandler:le,sourceDecorator:_e,PR_ATTRIB_NAME:N,PR_ATTRIB_VALUE:D,PR_COMMENT:x,PR_DECLARATION:c,PR_KEYWORD:w,PR_LITERAL:p,PR_NOCODE:y,PR_PLAIN:l,PR_PUNCTUATION:u,PR_SOURCE:T,PR_STRING:E,PR_TAG:m,PR_TYPE:_,prettyPrintOne:M?P.prettyPrintOne=S:I=S,prettyPrint:H=M?P.prettyPrint=L:H=L},U=P.define;typeof U=="function"&&U.amd&&U("google-code-prettify",[],function(){return G})})()},STEk:function(Pe,he,j){"use strict";j.d(he,"a",function(){return le});/*! *****************************************************************************
|
|
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 ce=function(F,d){return(ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,L){S.__proto__=L}||function(S,L){for(var G in L)Object.prototype.hasOwnProperty.call(L,G)&&(S[G]=L[G])})(F,d)};function W(F,d){function S(){this.constructor=F}ce(F,d),F.prototype=d===null?Object.create(d):(S.prototype=d.prototype,new S)}function M(F,d,S,L){return new(S||(S=Promise))(function(G,U){function $(q){try{xe(L.next(q))}catch(ae){U(ae)}}function de(q){try{xe(L.throw(q))}catch(ae){U(ae)}}function xe(q){var ae;q.done?G(q.value):(ae=q.value,ae instanceof S?ae:new S(function(fe){fe(ae)})).then($,de)}xe((L=L.apply(F,d||[])).next())})}function z(F,d){var S,L,G,U,$={label:0,sent:function(){if(1&G[0])throw G[1];return G[1]},trys:[],ops:[]};return U={next:de(0),throw:de(1),return:de(2)},typeof Symbol=="function"&&(U[Symbol.iterator]=function(){return this}),U;function de(xe){return function(q){return function(ae){if(S)throw new TypeError("Generator is already executing.");for(;$;)try{if(S=1,L&&(G=2&ae[0]?L.return:ae[0]?L.throw||((G=L.return)&&G.call(L),0):L.next)&&!(G=G.call(L,ae[1])).done)return G;switch(L=0,G&&(ae=[2&ae[0],G.value]),ae[0]){case 0:case 1:G=ae;break;case 4:return $.label++,{value:ae[1],done:!1};case 5:$.label++,L=ae[1],ae=[0];continue;case 7:ae=$.ops.pop(),$.trys.pop();continue;default:if(!(G=$.trys,(G=G.length>0&&G[G.length-1])||ae[0]!==6&&ae[0]!==2)){$=0;continue}if(ae[0]===3&&(!G||ae[1]>G[0]&&ae[1]<G[3])){$.label=ae[1];break}if(ae[0]===6&&$.label<G[1]){$.label=G[1],G=ae;break}if(G&&$.label<G[2]){$.label=G[2],$.ops.push(ae);break}G[2]&&$.ops.pop(),$.trys.pop();continue}ae=d.call(F,$)}catch(fe){ae=[6,fe],L=0}finally{S=G=0}if(5&ae[0])throw ae[1];return{value:ae[0]?ae[1]:void 0,done:!0}}([xe,q])}}}function A(){for(var F=0,d=0,S=arguments.length;d<S;d++)F+=arguments[d].length;var L=Array(F),G=0;for(d=0;d<S;d++)for(var U=arguments[d],$=0,de=U.length;$<de;$++,G++)L[G]=U[$];return L}var I=function(){function F(){}return F.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},F.setAttributes=function(d,S){for(var L=0,G=S;L<G.length;L++){var U=G[L],$=U[0],de=U[1];d.setAttribute($,de)}},F.createRect=function(d,S,L){var G=document.createElementNS("http://www.w3.org/2000/svg","rect");return G.setAttribute("width",d.toString()),G.setAttribute("height",S.toString()),L&&F.setAttributes(G,L),G},F.createLine=function(d,S,L,G,U){var $=document.createElementNS("http://www.w3.org/2000/svg","line");return $.setAttribute("x1",d.toString()),$.setAttribute("y1",S.toString()),$.setAttribute("x2",L.toString()),$.setAttribute("y2",G.toString()),U&&F.setAttributes($,U),$},F.createPolygon=function(d,S){var L=document.createElementNS("http://www.w3.org/2000/svg","polygon");return L.setAttribute("points",d),S&&F.setAttributes(L,S),L},F.createCircle=function(d,S){var L=document.createElementNS("http://www.w3.org/2000/svg","circle");return L.setAttribute("cx",(d/2).toString()),L.setAttribute("cy",(d/2).toString()),L.setAttribute("r",d.toString()),S&&F.setAttributes(L,S),L},F.createEllipse=function(d,S,L){var G=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return G.setAttribute("cx",(d/2).toString()),G.setAttribute("cy",(S/2).toString()),G.setAttribute("rx",(d/2).toString()),G.setAttribute("ry",(S/2).toString()),L&&F.setAttributes(G,L),G},F.createGroup=function(d){var S=document.createElementNS("http://www.w3.org/2000/svg","g");return d&&F.setAttributes(S,d),S},F.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},F.createMarker=function(d,S,L,G,U,$,de){var xe=document.createElementNS("http://www.w3.org/2000/svg","marker");return F.setAttributes(xe,[["id",d],["orient",S],["markerWidth",L.toString()],["markerHeight",G.toString()],["refX",U.toString()],["refY",$.toString()]]),xe.appendChild(de),xe},F.createText=function(d){var S=document.createElementNS("http://www.w3.org/2000/svg","text");return S.setAttribute("x","0"),S.setAttribute("y","0"),d&&F.setAttributes(S,d),S},F.createTSpan=function(d,S){var L=document.createElementNS("http://www.w3.org/2000/svg","tspan");return L.textContent=d,S&&F.setAttributes(L,S),L},F.createImage=function(d){var S=document.createElementNS("http://www.w3.org/2000/svg","image");return d&&F.setAttributes(S,d),S},F.createPoint=function(d,S){var L=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return L.x=d,L.y=S,L},F.createPath=function(d,S){var L=document.createElementNS("http://www.w3.org/2000/svg","path");return L.setAttribute("d",d),S&&F.setAttributes(L,S),L},F}(),H=function(){function F(){}return F.addKey=function(d){F.key=d},Object.defineProperty(F,"isLicensed",{get:function(){return!!F.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(F.key)},enumerable:!1,configurable:!0}),F}(),P=function(){function F(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return F.prototype.rasterize=function(d,S,L){var G=this;return new Promise(function(U){var $=L!==void 0?L:document.createElement("canvas");d===null&&(G.markersOnly=!0,G.naturalSize=!1);var de=document.createElementNS("http://www.w3.org/2000/svg","svg");de.setAttribute("xmlns","http://www.w3.org/2000/svg"),de.setAttribute("width",S.width.baseVal.valueAsString),de.setAttribute("height",S.height.baseVal.valueAsString),de.setAttribute("viewBox","0 0 "+S.viewBox.baseVal.width.toString()+" "+S.viewBox.baseVal.height.toString()),de.innerHTML=S.innerHTML,G.naturalSize===!0?(de.width.baseVal.value=d.naturalWidth,de.height.baseVal.value=d.naturalHeight):G.width!==void 0&&G.height!==void 0&&(de.width.baseVal.value=G.width,de.height.baseVal.value=G.height),$.width=de.width.baseVal.value,$.height=de.height.baseVal.value;var xe=de.outerHTML,q=$.getContext("2d");G.markersOnly!==!0&&q.drawImage(d,0,0,$.width,$.height);var ae=window.URL,fe=new Image($.width,$.height);fe.setAttribute("crossOrigin","anonymous");var pe=new Blob([xe],{type:"image/svg+xml"}),Ce=ae.createObjectURL(pe);fe.onload=function(){q.drawImage(fe,0,0),ae.revokeObjectURL(Ce);var Me=$.toDataURL(G.imageType,G.imageQuality);U(Me)},fe.src=Ce})},F}(),e=function(){},C=function(){function F(d){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+d+"_"}return Object.defineProperty(F.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(F.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(F.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),F.prototype.addClass=function(d){return this.styleSheet===void 0&&this.addStyleSheet(),d.name=""+this.classNamePrefix+d.localName,this.classes.push(d),this.styleSheet.sheet.insertRule("."+d.name+" {"+d.style+"}",this.styleSheet.sheet.cssRules.length),d},F.prototype.addRule=function(d){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(d),this.styleSheet.sheet.insertRule(d.selector+" {"+d.style+"}",this.styleSheet.sheet.cssRules.length)},F.prototype.addStyleSheet=function(){var d;this.styleSheet=document.createElement("style"),((d=this.styleSheetRoot)!==null&&d!==void 0?d:document.head).appendChild(this.styleSheet),this.addRule(new g("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new g("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new g("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new f("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new f("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},F.prototype.removeStyleSheet=function(){var d;this.styleSheet&&(((d=this.styleSheetRoot)!==null&&d!==void 0?d:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},F}(),g=function(F,d){this.selector=F,this.style=d},f=function(F,d){this.localName=F,this.style=d},o=function(){function F(d,S,L,G,U){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=d,this.displayMode=S,this.markerItems=L,this.uiStyleSettings=G,this.styles=U,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return F.prototype.show=function(d){var S=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=d,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var L=document.createElement("div");L.className=this.toolbarBlockStyleClass.name,L.style.whiteSpace="nowrap",this.uiContainer.appendChild(L),this.addActionButton(L,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(L,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(L,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(L,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(L,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(L,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(L,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(L,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(U){var $=document.createElement("div");$.className=""+S.toolbarButtonStyleClass.name,$.setAttribute("data-type-name",U.typeName),$.innerHTML=U.icon,$.addEventListener("click",function(){S.markerToolbarButtonClicked($,U)}),S.buttons.push($),S.markerButtons.push($)}),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 G=document.createElement("div");G.className=this.toolbarBlockStyleClass.name,G.style.whiteSpace="nowrap",G.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(G),this.addActionButton(G,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(G,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},F.prototype.addButtonClickListener=function(d){this.buttonClickListeners.push(d)},F.prototype.removeButtonClickListener=function(d){this.buttonClickListeners.indexOf(d)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(d),1)},F.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},F.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var d=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var S=0;S<this.markerButtons.length;S++)S<d||S===d&&this.markerButtons.length-1===d?this.markerButtonBlock.appendChild(this.markerButtons[S]):(S===d&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[S]))}},F.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")},F.prototype.resetButtonStyles=function(){var d=this;this.buttons.forEach(function(S){S.className=S.className.replace(d.uiStyleSettings.toolbarButtonStyleColorsClassName?d.uiStyleSettings.toolbarButtonStyleColorsClassName:d.toolbarButtonStyleColorsClass.name,"").trim(),S.className=S.className.replace(d.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?d.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:d.toolbarActiveButtonStyleColorsClass.name,"").trim(),S.className+=" "+(d.uiStyleSettings.toolbarButtonStyleColorsClassName?d.uiStyleSettings.toolbarButtonStyleColorsClassName:d.toolbarButtonStyleColorsClass.name)})},F.prototype.addActionButton=function(d,S,L){var G=this,U=document.createElement("div");switch(U.className=""+this.toolbarButtonStyleClass.name,U.innerHTML=S,U.setAttribute("data-action",L),U.addEventListener("click",function(){G.actionToolbarButtonClicked(U,L)}),L){case"select":U.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":U.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":U.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":U.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":U.style.fill=this.uiStyleSettings.closeButtonColor}d.appendChild(U),this.buttons.push(U)},F.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new f("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 f("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new f("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new f("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 f("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var d=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new f("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*d)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*d)+`px;
|
|
padding: `+d+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new f("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new f("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new g("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new g("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},F.prototype.markerToolbarButtonClicked=function(d,S){this.setActiveButton(d),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(L){return L("marker",S)}),this.markerButtonOverflowBlock.style.display="none"},F.prototype.actionToolbarButtonClicked=function(d,S){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(L){return L("action",S)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},F.prototype.setActiveButton=function(d){this.resetButtonStyles(),d.className=d.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),d.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},F.prototype.setActiveMarkerButton=function(d){var S=this.markerButtons.find(function(L){return L.getAttribute("data-type-name")===d});S&&this.setActiveButton(S)},F.prototype.setCurrentMarker=function(d){var S=this;this.currentMarker=d,this.buttons.filter(function(L){return/delete|notes/.test(L.getAttribute("data-action"))}).forEach(function(L){S.currentMarker===void 0?(L.style.fillOpacity="0.4",L.style.pointerEvents="none"):(L.style.fillOpacity="1",L.style.pointerEvents="all")})},F}(),r=function(){function F(d,S,L,G){this.panels=[],this.panelButtons=[],this.markerjsContainer=d,this.displayMode=S,this.uiStyleSettings=L,this.styles=G,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return F.prototype.addStyles=function(){var d;this.toolboxStyleClass=this.styles.addClass(new f("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 f("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var S=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new f("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new f("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new f("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 f("toolbox-panel-row_colors",`
|
|
background-color: `+((d=this.uiStyleSettings.toolboxBackgroundColor)!==null&&d!==void 0?d:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new f("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*S)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*S)+`px;
|
|
padding: `+S+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new f("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new f("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new g("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new g("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},F.prototype.show=function(d){var S;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=d,this.uiContainer.className=this.toolboxStyleClass.name+" "+((S=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&S!==void 0?S:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},F.prototype.setPanelButtons=function(d){var S,L,G=this;this.panels=d,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((S=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&S!==void 0?S:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((L=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&L!==void 0?L:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(U){var $;U.uiStyleSettings=G.uiStyleSettings;var de=document.createElement("div");de.className=G.toolboxButtonStyleClass.name+" "+(($=G.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&$!==void 0?$:G.toolboxButtonStyleColorsClass.name),de.innerHTML=U.icon,de.title=U.title,de.addEventListener("click",function(){G.panelButtonClick(U)}),G.panelButtons.push(de),G.buttonRow.appendChild(de)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},F.prototype.panelButtonClick=function(d){var S=this,L=-1;if(d!==this.activePanel){L=this.panels.indexOf(d),this.panelRow.innerHTML="";var G=d.getUi();G.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(G),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=d}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){S.displayMode==="inline"?S.panelRow.style.display="none":S.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(U,$){var de,xe;U.className=S.toolboxButtonStyleClass.name+" "+($===L?""+((de=S.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&de!==void 0?de:S.toolboxActiveButtonStyleColorsClass.name):""+((xe=S.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&xe!==void 0?xe:S.toolboxButtonStyleColorsClass.name))})},F}(),a=function(F,d){this.title=F,this.icon=d},h=function(F){function d(S,L,G,U){var $=F.call(this,S,U||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return $.colors=[],$.addTransparent=!1,$.colorBoxes=[],$.colors=L,$.currentColor=G,$.setCurrentColor=$.setCurrentColor.bind($),$.getColorBox=$.getColorBox.bind($),$}return W(d,F),d.prototype.getUi=function(){var S=this,L=document.createElement("div");return L.style.overflow="hidden",L.style.whiteSpace="nowrap",this.colors.forEach(function(G){var U=S.getColorBox(G);L.appendChild(U),S.colorBoxes.push(U)}),L},d.prototype.getColorBox=function(S){var L=this,G=this.uiStyleSettings.toolbarHeight/4,U=this.uiStyleSettings.toolbarHeight-G,$=document.createElement("div");$.style.display="inline-block",$.style.boxSizing="content-box",$.style.width=U-2+"px",$.style.height=U-2+"px",$.style.padding="1px",$.style.marginRight="2px",$.style.marginBottom="2px",$.style.borderWidth="2px",$.style.borderStyle="solid",$.style.borderRadius=(U+2)/2+"px",$.style.borderColor=S===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",$.addEventListener("click",function(){L.setCurrentColor(S,$)});var de=document.createElement("div");return de.style.display="inline-block",de.style.width=U-2+"px",de.style.height=U-2+"px",de.style.backgroundColor=S,de.style.borderRadius=U/2+"px",S==="transparent"&&(de.style.fill=this.uiStyleSettings.toolboxAccentColor,de.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>`),$.appendChild(de),$},d.prototype.setCurrentColor=function(S,L){var G=this;this.currentColor=S,this.colorBoxes.forEach(function(U){U.style.borderColor=U===L?G.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(S)},d}(a),s=function(){function F(d,S,L){this._state="new",this._isSelected=!1,this._container=d,this._overlayContainer=S,this.globalSettings=L,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(F.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),F.prototype.ownsTarget=function(d){return!1},Object.defineProperty(F.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),F.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},F.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},F.prototype.pointerDown=function(d,S){},F.prototype.dblClick=function(d,S){},F.prototype.manipulate=function(d){},F.prototype.pointerUp=function(d){this.stateChanged()},F.prototype.dispose=function(){},F.prototype.addMarkerVisualToContainer=function(d){this.container.childNodes.length>0?this.container.insertBefore(d,this.container.childNodes[0]):this.container.appendChild(d)},F.prototype.getState=function(){return{typeName:F.typeName,state:this.state,notes:this.notes}},F.prototype.restoreState=function(d){this._state=d.state,this.notes=d.notes},F.prototype.scale=function(d,S){},F.prototype.colorChanged=function(d){this.onColorChanged&&this.onColorChanged(d),this.stateChanged()},F.prototype.fillColorChanged=function(d){this.onFillColorChanged&&this.onFillColorChanged(d),this.stateChanged()},F.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var d=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),d.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(d)&&this.onStateChanged(this)}},F.typeName="MarkerBase",F}(),i=function(){function F(){this.findGripByVisual=this.findGripByVisual.bind(this)}return F.prototype.findGripByVisual=function(d){return this.topLeft.ownsTarget(d)?this.topLeft:this.topCenter.ownsTarget(d)?this.topCenter:this.topRight.ownsTarget(d)?this.topRight:this.centerLeft.ownsTarget(d)?this.centerLeft:this.centerRight.ownsTarget(d)?this.centerRight:this.bottomLeft.ownsTarget(d)?this.bottomLeft:this.bottomCenter.ownsTarget(d)?this.bottomCenter:this.bottomRight.ownsTarget(d)?this.bottomRight:void 0},F}(),n=function(){function F(){this.GRIP_SIZE=10,this.visual=I.createGroup(),this.visual.appendChild(I.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(I.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return F.prototype.ownsTarget=function(d){return d===this.visual||d===this.visual.childNodes[0]||d===this.visual.childNodes[1]},F}(),t=function(){function F(){}return F.toITransformMatrix=function(d){return{a:d.a,b:d.b,c:d.c,d:d.d,e:d.e,f:d.f}},F.toSVGMatrix=function(d,S){return d.a=S.a,d.b=S.b,d.c=S.c,d.d=S.d,d.e=S.e,d.f=S.f,d},F}(),b=function(F){function d(S,L,G){var U=F.call(this,S,L,G)||this;return U.left=0,U.top=0,U.width=0,U.height=0,U.defaultSize={x:50,y:20},U.offsetX=0,U.offsetY=0,U.rotationAngle=0,U.CB_DISTANCE=10,U._suppressMarkerCreateEvent=!1,U.container.transform.baseVal.appendItem(I.createTransform()),U.setupControlBox(),U}return W(d,F),Object.defineProperty(d.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"visual",{get:function(){return this._visual},set:function(S){this._visual=S;var L=I.createTransform();this._visual.transform.baseVal.appendItem(L)},enumerable:!1,configurable:!0}),d.prototype.ownsTarget=function(S){return!!F.prototype.ownsTarget.call(this,S)||!!(this.controlGrips.findGripByVisual(S)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(S))},d.prototype.pointerDown=function(S,L){F.prototype.pointerDown.call(this,S,L),this.state==="new"&&(this.left=S.x,this.top=S.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var G=this.unrotatePoint(S);if(this.manipulationStartX=G.x,this.manipulationStartY=G.y,this.offsetX=G.x-this.left,this.offsetY=G.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(L),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(L)){this.activeGrip=this.rotatorGrip;var U=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=U.x-this.width/2,this.top=U.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var $=this.container.transform.baseVal.getItem(0);$.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem($,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},d.prototype.pointerUp=function(S){var L=this.state;F.prototype.pointerUp.call(this,S),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(S),this._state="select",L==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},d.prototype.moveVisual=function(S){this.visual.style.transform="translate("+S.x+"px, "+S.y+"px)"},d.prototype.manipulate=function(S){var L=this.unrotatePoint(S);this.state==="creating"?this.resize(S):this.state==="move"?(this.left=this.manipulationStartLeft+(L.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(L.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(L):this.state==="rotate"&&this.rotate(S)},d.prototype.resize=function(S){var L=this.manipulationStartLeft,G=this.manipulationStartWidth,U=this.manipulationStartTop,$=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:L=this.manipulationStartLeft+S.x-this.manipulationStartX,G=this.manipulationStartWidth+this.manipulationStartLeft-L;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:G=this.manipulationStartWidth+S.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:U=this.manipulationStartTop+S.y-this.manipulationStartY,$=this.manipulationStartHeight+this.manipulationStartTop-U;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:$=this.manipulationStartHeight+S.y-this.manipulationStartY}G>=0?(this.left=L,this.width=G):(this.left=L+G,this.width=-G),$>=0?(this.top=U,this.height=$):(this.top=U+$,this.height=-$),this.setSize()},d.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},d.prototype.rotate=function(S){if(Math.abs(S.x-this.centerX)>.1){var L=Math.sign(S.x-this.centerX);this.rotationAngle=180*Math.atan((S.y-this.centerY)/(S.x-this.centerX))/Math.PI+90*L,this.applyRotation()}},d.prototype.applyRotation=function(){var S=this.container.transform.baseVal.getItem(0);S.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(S,0)},d.prototype.rotatePoint=function(S){if(this.rotationAngle===0)return S;var L=this.container.getCTM(),G=I.createPoint(S.x,S.y);return{x:(G=G.matrixTransform(L)).x,y:G.y}},d.prototype.unrotatePoint=function(S){if(this.rotationAngle===0)return S;var L=this.container.getCTM();L=L.inverse();var G=I.createPoint(S.x,S.y);return{x:(G=G.matrixTransform(L)).x,y:G.y}},d.prototype.select=function(){F.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},d.prototype.deselect=function(){F.prototype.deselect.call(this),this.controlBox.style.display="none"},d.prototype.setupControlBox=function(){this.controlBox=I.createGroup();var S=I.createTransform();S.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(S),this.container.appendChild(this.controlBox),this.controlRect=I.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=I.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 i,this.addControlGrips(),this.controlBox.style.display="none"},d.prototype.adjustControlBox=function(){var S=this.controlBox.transform.baseVal.getItem(0);S.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(S,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},d.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},d.prototype.createGrip=function(){var S=new n;return S.visual.transform.baseVal.appendItem(I.createTransform()),this.controlBox.appendChild(S.visual),S},d.prototype.positionGrips=function(){var S=this.controlGrips.topLeft.GRIP_SIZE,L=-S/2,G=L,U=(this.width+this.CB_DISTANCE)/2-S/2,$=(this.height+this.CB_DISTANCE)/2-S/2,de=this.height+this.CB_DISTANCE-S/2,xe=this.width+this.CB_DISTANCE-S/2;this.positionGrip(this.controlGrips.topLeft.visual,L,G),this.positionGrip(this.controlGrips.topCenter.visual,U,G),this.positionGrip(this.controlGrips.topRight.visual,xe,G),this.positionGrip(this.controlGrips.centerLeft.visual,L,$),this.positionGrip(this.controlGrips.centerRight.visual,xe,$),this.positionGrip(this.controlGrips.bottomLeft.visual,L,de),this.positionGrip(this.controlGrips.bottomCenter.visual,U,de),this.positionGrip(this.controlGrips.bottomRight.visual,xe,de),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,U,G-3*this.CB_DISTANCE)},d.prototype.positionGrip=function(S,L,G){var U=S.transform.baseVal.getItem(0);U.setTranslate(L,G),S.transform.baseVal.replaceItem(U,0)},d.prototype.hideControlBox=function(){this.controlBox.style.display="none"},d.prototype.showControlBox=function(){this.controlBox.style.display=""},d.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:t.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:t.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},F.prototype.getState.call(this))},d.prototype.restoreState=function(S){F.prototype.restoreState.call(this,S);var L=S;this.left=L.left,this.top=L.top,this.width=L.width,this.height=L.height,this.rotationAngle=L.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(t.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,L.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(t.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,L.containerTransformMatrix))},d.prototype.scale=function(S,L){F.prototype.scale.call(this,S,L);var G=this.rotatePoint({x:this.left,y:this.top}),U=this.unrotatePoint({x:G.x*S,y:G.y*L});this.left=U.x,this.top=U.y,this.width=this.width*S,this.height=this.height*L,this.adjustControlBox()},d}(s),v=function(F){function d(S,L,G){var U=F.call(this,S,L,G)||this;return U.fillColor="transparent",U.strokeColor="transparent",U.strokeWidth=0,U.strokeDasharray="",U.opacity=1,U.setStrokeColor=U.setStrokeColor.bind(U),U.setFillColor=U.setFillColor.bind(U),U.setStrokeWidth=U.setStrokeWidth.bind(U),U.setStrokeDasharray=U.setStrokeDasharray.bind(U),U.createVisual=U.createVisual.bind(U),U}return W(d,F),d.prototype.ownsTarget=function(S){return!(!F.prototype.ownsTarget.call(this,S)&&S!==this.visual)},d.prototype.createVisual=function(){this.visual=I.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},d.prototype.pointerDown=function(S,L){F.prototype.pointerDown.call(this,S,L),this.state==="new"&&(this.createVisual(),this.moveVisual(S),this._state="creating")},d.prototype.manipulate=function(S){F.prototype.manipulate.call(this,S)},d.prototype.resize=function(S){F.prototype.resize.call(this,S),this.setSize()},d.prototype.setSize=function(){F.prototype.setSize.call(this),I.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},d.prototype.pointerUp=function(S){F.prototype.pointerUp.call(this,S),this.setSize()},d.prototype.setStrokeColor=function(S){this.strokeColor=S,this.visual&&I.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(S),this.stateChanged()},d.prototype.setFillColor=function(S){this.fillColor=S,this.visual&&I.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},d.prototype.setStrokeWidth=function(S){this.strokeWidth=S,this.visual&&I.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},d.prototype.setStrokeDasharray=function(S){this.strokeDasharray=S,this.visual&&I.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},d.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},F.prototype.getState.call(this))},d.prototype.restoreState=function(S){var L=S;this.fillColor=L.fillColor,this.strokeColor=L.strokeColor,this.strokeWidth=L.strokeWidth,this.strokeDasharray=L.strokeDasharray,this.opacity=L.opacity,this.createVisual(),F.prototype.restoreState.call(this,S),this.setSize()},d.prototype.scale=function(S,L){F.prototype.scale.call(this,S,L),this.setSize()},d.title="Rectangle marker",d}(b),E=function(F){function d(S,L,G,U){var $=F.call(this,S,U||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return $.widths=[],$.widthBoxes=[],$.widths=L,$.currentWidth=G,$.setCurrentWidth=$.setCurrentWidth.bind($),$}return W(d,F),d.prototype.getUi=function(){var S=this,L=document.createElement("div");return L.style.display="flex",L.style.overflow="hidden",L.style.flexGrow="2",this.widths.forEach(function(G){var U=document.createElement("div");U.style.display="flex",U.style.flexGrow="2",U.style.alignItems="center",U.style.justifyContent="space-between",U.style.padding="5px",U.style.borderWidth="2px",U.style.borderStyle="solid",U.style.borderColor=G===S.currentWidth?S.uiStyleSettings.toolboxAccentColor:"transparent",U.addEventListener("click",function(){S.setCurrentWidth(G,U)}),L.appendChild(U);var $=document.createElement("div");$.innerText=G.toString(),$.style.marginRight="5px",U.appendChild($);var de=document.createElement("div");de.style.minHeight="20px",de.style.flexGrow="2",de.style.display="flex",de.style.alignItems="center";var xe=document.createElement("hr");xe.style.minWidth="20px",xe.style.border="0px",xe.style.borderTop=G+"px solid "+S.uiStyleSettings.toolboxColor,xe.style.flexGrow="2",de.appendChild(xe),U.appendChild(de),S.widthBoxes.push(U)}),L},d.prototype.setCurrentWidth=function(S,L){var G=this;this.currentWidth=S,this.widthBoxes.forEach(function(U){U.style.borderColor=U===L?G.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},d}(a),w=function(F){function d(S,L,G,U){var $=F.call(this,S,U||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return $.styles=[],$.styleBoxes=[],$.styles=L,$.currentStyle=G,$.setCurrentStyle=$.setCurrentStyle.bind($),$}return W(d,F),d.prototype.getUi=function(){var S=this,L=document.createElement("div");return L.style.display="flex",L.style.overflow="hidden",L.style.flexGrow="2",this.styles.forEach(function(G){var U=document.createElement("div");U.style.display="flex",U.style.alignItems="center",U.style.justifyContent="space-between",U.style.padding="5px",U.style.borderWidth="2px",U.style.borderStyle="solid",U.style.overflow="hidden",U.style.maxWidth=100/S.styles.length-5+"%",U.style.borderColor=G===S.currentStyle?S.uiStyleSettings.toolboxAccentColor:"transparent",U.addEventListener("click",function(){S.setCurrentStyle(G,U)}),L.appendChild(U);var $=document.createElement("div");$.style.minHeight="20px",$.style.flexGrow="2",$.style.overflow="hidden";var de=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+S.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(G!==""?'stroke-dasharray="'+G+'"':"")+` />
|
|
</svg>`;$.innerHTML=de,U.appendChild($),S.styleBoxes.push(U)}),L},d.prototype.setCurrentStyle=function(S,L){var G=this;this.currentStyle=S,this.styleBoxes.forEach(function(U){U.style.borderColor=U===L?G.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},d}(a),x=function(F){function d(S,L,G){var U=F.call(this,S,L,G)||this;return U.strokeColor=G.defaultColor,U.strokeWidth=G.defaultStrokeWidth,U.strokeDasharray=G.defaultStrokeDasharray,U.strokePanel=new h("Line color",G.defaultColorSet,G.defaultColor),U.strokePanel.onColorChanged=U.setStrokeColor,U.strokeWidthPanel=new E("Line width",G.defaultStrokeWidths,G.defaultStrokeWidth),U.strokeWidthPanel.onWidthChanged=U.setStrokeWidth,U.strokeStylePanel=new w("Line style",G.defaultStrokeDasharrays,G.defaultStrokeDasharray),U.strokeStylePanel.onStyleChanged=U.setStrokeDasharray,U}return W(d,F),Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var S=F.prototype.getState.call(this);return S.typeName=d.typeName,S},d.typeName="FrameMarker",d.title="Frame marker",d.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',d}(v),_=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},p=function(F){function d(S,L,G){var U=F.call(this,S,L,G)||this;return U.x1=0,U.y1=0,U.x2=0,U.y2=0,U.defaultLength=50,U.manipulationStartX=0,U.manipulationStartY=0,U.manipulationStartX1=0,U.manipulationStartY1=0,U.manipulationStartX2=0,U.manipulationStartY2=0,U.setupControlBox(),U}return W(d,F),d.prototype.ownsTarget=function(S){return!!F.prototype.ownsTarget.call(this,S)||!(!this.grip1.ownsTarget(S)&&!this.grip2.ownsTarget(S))},d.prototype.pointerDown=function(S,L){F.prototype.pointerDown.call(this,S,L),this.manipulationStartX=S.x,this.manipulationStartY=S.y,this.state==="new"&&(this.x1=S.x,this.y1=S.y,this.x2=S.x,this.y2=S.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(L)?this.activeGrip=this.grip1:this.grip2.ownsTarget(L)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},d.prototype.pointerUp=function(S){var L=this.state;F.prototype.pointerUp.call(this,S),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(S),this._state="select",L==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},d.prototype.adjustVisual=function(){},d.prototype.manipulate=function(S){this.state==="creating"?this.resize(S):this.state==="move"?(this.x1=this.manipulationStartX1+S.x-this.manipulationStartX,this.y1=this.manipulationStartY1+S.y-this.manipulationStartY,this.x2=this.manipulationStartX2+S.x-this.manipulationStartX,this.y2=this.manipulationStartY2+S.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(S)},d.prototype.resize=function(S){switch(this.activeGrip){case this.grip1:this.x1=S.x,this.y1=S.y;break;case this.grip2:case void 0:this.x2=S.x,this.y2=S.y}this.adjustVisual(),this.adjustControlBox()},d.prototype.select=function(){F.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},d.prototype.deselect=function(){F.prototype.deselect.call(this),this.controlBox.style.display="none"},d.prototype.setupControlBox=function(){this.controlBox=I.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},d.prototype.adjustControlBox=function(){this.positionGrips()},d.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},d.prototype.createGrip=function(){var S=new n;return S.visual.transform.baseVal.appendItem(I.createTransform()),this.controlBox.appendChild(S.visual),S},d.prototype.positionGrips=function(){var S=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-S/2,this.y1-S/2),this.positionGrip(this.grip2.visual,this.x2-S/2,this.y2-S/2)},d.prototype.positionGrip=function(S,L,G){var U=S.transform.baseVal.getItem(0);U.setTranslate(L,G),S.transform.baseVal.replaceItem(U,0)},d.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},F.prototype.getState.call(this))},d.prototype.restoreState=function(S){F.prototype.restoreState.call(this,S);var L=S;this.x1=L.x1,this.y1=L.y1,this.x2=L.x2,this.y2=L.y2},d.prototype.scale=function(S,L){F.prototype.scale.call(this,S,L),this.x1=this.x1*S,this.y1=this.y1*L,this.x2=this.x2*S,this.y2=this.y2*L,this.adjustVisual(),this.adjustControlBox()},d}(s),u=function(F){function d(S,L,G){var U=F.call(this,S,L,G)||this;return U.strokeColor="transparent",U.strokeWidth=0,U.strokeDasharray="",U.setStrokeColor=U.setStrokeColor.bind(U),U.setStrokeWidth=U.setStrokeWidth.bind(U),U.setStrokeDasharray=U.setStrokeDasharray.bind(U),U.strokeColor=G.defaultColor,U.strokeWidth=G.defaultStrokeWidth,U.strokeDasharray=G.defaultStrokeDasharray,U.strokePanel=new h("Line color",G.defaultColorSet,G.defaultColor),U.strokePanel.onColorChanged=U.setStrokeColor,U.strokeWidthPanel=new E("Line width",G.defaultStrokeWidths,G.defaultStrokeWidth),U.strokeWidthPanel.onWidthChanged=U.setStrokeWidth,U.strokeStylePanel=new w("Line style",G.defaultStrokeDasharrays,G.defaultStrokeDasharray),U.strokeStylePanel.onStyleChanged=U.setStrokeDasharray,U}return W(d,F),d.prototype.ownsTarget=function(S){return!(!F.prototype.ownsTarget.call(this,S)&&S!==this.visual&&S!==this.selectorLine&&S!==this.visibleLine)},d.prototype.createVisual=function(){this.visual=I.createGroup(),this.selectorLine=I.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=I.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},d.prototype.pointerDown=function(S,L){F.prototype.pointerDown.call(this,S,L),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},d.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),I.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),I.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),I.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},d.prototype.setStrokeColor=function(S){this.strokeColor=S,this.adjustVisual(),this.colorChanged(S)},d.prototype.setStrokeWidth=function(S){this.strokeWidth=S,this.adjustVisual()},d.prototype.setStrokeDasharray=function(S){this.strokeDasharray=S,this.adjustVisual(),this.stateChanged()},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var S=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},F.prototype.getState.call(this));return S.typeName=d.typeName,S},d.prototype.restoreState=function(S){F.prototype.restoreState.call(this,S);var L=S;this.strokeColor=L.strokeColor,this.strokeWidth=L.strokeWidth,this.strokeDasharray=L.strokeDasharray,this.createVisual(),this.adjustVisual()},d.typeName="LineMarker",d.title="Line marker",d.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',d}(p),l=function(F){function d(S,L,G,U){var $=F.call(this,S,U||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return $.fonts=[],$.fontBoxes=[],$.fonts=L,$.currentFont=G,$.setCurrentFont=$.setCurrentFont.bind($),$}return W(d,F),d.prototype.getUi=function(){var S=this,L=document.createElement("div");return L.style.overflow="hidden",L.style.flexGrow="2",this.fonts.forEach(function(G){var U=document.createElement("div");U.style.display="inline-block",U.style.alignItems="center",U.style.justifyContent="space-between",U.style.padding="5px",U.style.borderWidth="2px",U.style.borderStyle="solid",U.style.overflow="hidden",U.style.maxWidth=100/S.fonts.length-5+"%",U.style.borderColor=G===S.currentFont?S.uiStyleSettings.toolboxAccentColor:"transparent",U.addEventListener("click",function(){S.setCurrentFont(G,U)}),L.appendChild(U);var $=document.createElement("div");$.style.display="flex",$.style.minHeight="20px",$.style.flexGrow="2",$.style.fontFamily=G,$.style.overflow="hidden";var de=document.createElement("div");de.style.whiteSpace="nowrap",de.style.overflow="hidden",de.style.textOverflow="ellipsis",de.innerHTML="The quick brown fox jumps over the lazy dog",$.appendChild(de),U.appendChild($),S.fontBoxes.push(U)}),L},d.prototype.setCurrentFont=function(S,L){var G=this;this.currentFont=S,this.fontBoxes.forEach(function(U){U.style.borderColor=U===L?G.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},d}(a),m=function(F){function d(S,L,G){var U=F.call(this,S,L,G)||this;return U.color="transparent",U.padding=5,U.DEFAULT_TEXT="your text here",U.text=U.DEFAULT_TEXT,U.isMoved=!1,U.color=G.defaultColor,U.fontFamily=G.defaultFontFamily,U.defaultSize={x:100,y:30},U.setColor=U.setColor.bind(U),U.setFont=U.setFont.bind(U),U.renderText=U.renderText.bind(U),U.sizeText=U.sizeText.bind(U),U.textEditDivClicked=U.textEditDivClicked.bind(U),U.showTextEditor=U.showTextEditor.bind(U),U.setSize=U.setSize.bind(U),U.positionTextEditor=U.positionTextEditor.bind(U),U.colorPanel=new h("Color",G.defaultColorSet,G.defaultColor),U.colorPanel.onColorChanged=U.setColor,U.fontFamilyPanel=new l("Font",G.defaultFontFamilies,G.defaultFontFamily),U.fontFamilyPanel.onFontChanged=U.setFont,U}return W(d,F),d.prototype.ownsTarget=function(S){if(F.prototype.ownsTarget.call(this,S)||S===this.visual||S===this.textElement||S===this.bgRectangle)return!0;var L=!1;return this.textElement.childNodes.forEach(function(G){G===S&&(L=!0)}),L},d.prototype.createVisual=function(){this.visual=I.createGroup(),this.bgRectangle=I.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=I.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(I.createTransform()),this.textElement.transform.baseVal.appendItem(I.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},d.prototype.pointerDown=function(S,L){F.prototype.pointerDown.call(this,S,L),this.isMoved=!1,this.pointerDownPoint=S,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(S),this._state="creating")},d.prototype.renderText=function(){var S=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(L){S.textElement.appendChild(I.createTSpan(L.trim()===""?" ":L.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},d.prototype.getTextScale=function(){var S=this.textElement.getBBox(),L=1;if(S.width>0&&S.height>0){var G=(1*this.width-this.width*this.padding*2/100)/S.width,U=(1*this.height-this.height*this.padding*2/100)/S.height;L=Math.min(G,U)}return L},d.prototype.getTextPosition=function(S){var L=this.textElement.getBBox(),G=0,U=0;return L.width>0&&L.height>0&&(G=(this.width-L.width*S)/2,U=this.height/2-L.height*S/2),{x:G,y:U}},d.prototype.sizeText=function(){var S=this.textElement.getBBox(),L=this.getTextScale(),G=this.getTextPosition(L);G.y-=S.y*L,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+G.x+"px, "+G.y+"px) scale("+L+", "+L+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(G.x,G.y),this.textElement.transform.baseVal.getItem(1).setScale(L,L))},d.prototype.manipulate=function(S){F.prototype.manipulate.call(this,S),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(S.x-this.pointerDownPoint.x)>5||Math.abs(S.y-this.pointerDownPoint.y)>5)},d.prototype.resize=function(S){F.prototype.resize.call(this,S),this.isMoved=!0,this.setSize(),this.sizeText()},d.prototype.setSize=function(){F.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(I.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),I.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},d.prototype.pointerUp=function(S){var L=this.state;L==="creating"&&(this._suppressMarkerCreateEvent=!0),F.prototype.pointerUp.call(this,S),this.setSize(),(L==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},d.prototype.showTextEditor=function(){var S=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(L){L.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var L=Number.parseFloat(S.textEditor.style.fontSize);S.textEditor.clientWidth>=Number.parseInt(S.textEditor.style.maxWidth)&&L>.9;)L-=.1,S.textEditor.style.fontSize=Math.max(L,.9)+"em"}),this.textEditor.addEventListener("keyup",function(L){L.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(L){if(L.clipboardData){var G=L.clipboardData.getData("text"),U=window.getSelection();if(!U.rangeCount)return!1;U.deleteFromDocument(),U.getRangeAt(0).insertNode(document.createTextNode(G)),L.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){S.textEditDivClicked(S.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},d.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var S=this.getTextScale(),L=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),G=this.textElement.getBBox(),U={x:G.width*S,y:G.height*S};L.x-=U.x/2,L.y-=U.y/2,this.textEditor.style.top=L.y+"px",this.textEditor.style.left=L.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-L.x+"px",this.textEditor.style.fontSize=Math.max(16*S,12)+"px",this.textElement.style.display="none"}},d.prototype.textEditDivClicked=function(S){this.text=S.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},d.prototype.select=function(){F.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},d.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),F.prototype.deselect.call(this)},d.prototype.dblClick=function(S,L){F.prototype.dblClick.call(this,S,L),this.showTextEditor()},d.prototype.setColor=function(S){this.textElement&&I.setAttributes(this.textElement,[["fill",S]]),this.color=S,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(S)},d.prototype.setFont=function(S){this.textElement&&I.setAttributes(this.textElement,[["font-family",S]]),this.fontFamily=S,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},d.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},d.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var S=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},F.prototype.getState.call(this));return S.typeName=d.typeName,S},d.prototype.restoreState=function(S){var L=S;this.color=L.color,this.fontFamily=L.fontFamily,this.padding=L.padding,this.text=L.text,this.createVisual(),F.prototype.restoreState.call(this,S),this.setSize()},d.prototype.scale=function(S,L){F.prototype.scale.call(this,S,L),this.setSize(),this.sizeText(),this.positionTextEditor()},d.typeName="TextMarker",d.title="Text marker",d.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',d}(b),c=function(F){function d(S,L,G){var U=F.call(this,S,L,G)||this;return U.color="transparent",U.lineWidth=3,U.drawing=!1,U.pixelRatio=1,U.color=G.defaultColor,U.lineWidth=G.defaultStrokeWidth,U.pixelRatio=G.freehandPixelRatio,U.setColor=U.setColor.bind(U),U.addCanvas=U.addCanvas.bind(U),U.finishCreation=U.finishCreation.bind(U),U.setLineWidth=U.setLineWidth.bind(U),U.colorPanel=new h("Color",G.defaultColorSet,G.defaultColor),U.colorPanel.onColorChanged=U.setColor,U.lineWidthPanel=new E("Line width",G.defaultStrokeWidths,G.defaultStrokeWidth),U.lineWidthPanel.onWidthChanged=U.setLineWidth,U}return W(d,F),d.prototype.ownsTarget=function(S){return!(!F.prototype.ownsTarget.call(this,S)&&S!==this.visual&&S!==this.drawingImage)},d.prototype.createVisual=function(){this.visual=I.createGroup(),this.drawingImage=I.createImage(),this.visual.appendChild(this.drawingImage);var S=I.createTransform();this.visual.transform.baseVal.appendItem(S),this.addMarkerVisualToContainer(this.visual)},d.prototype.pointerDown=function(S,L){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(S.x,S.y),this.drawing=!0):F.prototype.pointerDown.call(this,S,L)},d.prototype.manipulate=function(S){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(S.x,S.y),this.canvasContext.stroke()):F.prototype.manipulate.call(this,S)},d.prototype.resize=function(S){F.prototype.resize.call(this,S),I.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),I.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},d.prototype.pointerUp=function(S){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):F.prototype.pointerUp.call(this,S)},d.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},d.prototype.select=function(){this.state==="creating"&&this.finishCreation(),F.prototype.select.call(this)},d.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),F.prototype.deselect.call(this)},d.prototype.finishCreation=function(){for(var S=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),L=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],G=L[0],U=L[1],$=L[2],de=L[3],xe=!1,q=0;q<this.canvasElement.height;q++)for(var ae=0;ae<this.canvasElement.width;ae++)S.data[q*this.canvasElement.width*4+4*ae+3]>0&&(xe=!0,q<U&&(U=q),ae<G&&(G=ae),q>de&&(de=q),ae>$&&($=ae));if(xe){this.left=G/this.pixelRatio,this.top=U/this.pixelRatio,this.width=($-G)/this.pixelRatio,this.height=(de-U)/this.pixelRatio;var fe=document.createElement("canvas");fe.width=$-G,fe.height=de-U,fe.getContext("2d").putImageData(this.canvasContext.getImageData(G,U,$-G,de-U),0,0),this.drawingImgUrl=fe.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},d.prototype.setDrawingImage=function(){I.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),I.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},d.prototype.setColor=function(S){this.color=S,this.colorChanged(S)},d.prototype.setLineWidth=function(S){this.lineWidth=S},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var S=Object.assign({drawingImgUrl:this.drawingImgUrl},F.prototype.getState.call(this));return S.typeName=d.typeName,S},d.prototype.restoreState=function(S){this.createVisual(),F.prototype.restoreState.call(this,S),this.drawingImgUrl=S.drawingImgUrl,this.setDrawingImage()},d.prototype.scale=function(S,L){F.prototype.scale.call(this,S,L),this.setDrawingImage()},d.typeName="FreehandMarker",d.title="Freehand marker",d.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',d}(b),T=function(F){function d(S,L,G){var U=F.call(this,S,G||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return U.typeBoxes=[],U.currentType=L,U.setCurrentType=U.setCurrentType.bind(U),U}return W(d,F),d.prototype.getUi=function(){var S=this,L=document.createElement("div");L.style.display="flex",L.style.overflow="hidden",L.style.flexGrow="2";for(var G=function(de){var xe="both";switch(de){case 0:xe="both";break;case 1:xe="start";break;case 2:xe="end";break;case 3:xe="none"}var q=document.createElement("div");if(q.style.display="flex",q.style.flexGrow="2",q.style.alignItems="center",q.style.justifyContent="space-between",q.style.padding="5px",q.style.borderWidth="2px",q.style.borderStyle="solid",q.style.borderColor=xe===U.currentType?U.uiStyleSettings.toolboxAccentColor:"transparent",q.addEventListener("click",function(){S.setCurrentType(xe,q)}),L.appendChild(q),xe==="both"||xe==="start"){var ae=document.createElement("div");ae.style.display="flex",ae.style.alignItems="center",ae.style.minHeight="20px",ae.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="`+(U.uiStyleSettings!==void 0?U.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,ae.style.marginLeft="5px",q.appendChild(ae)}var fe=document.createElement("div");fe.style.display="flex",fe.style.alignItems="center",fe.style.minHeight="20px",fe.style.flexGrow="2";var pe=document.createElement("hr");if(pe.style.minWidth="20px",pe.style.border="0px",pe.style.borderTop="3px solid "+(U.uiStyleSettings!==void 0?U.uiStyleSettings.toolboxColor:"#eeeeee"),pe.style.flexGrow="2",fe.appendChild(pe),q.appendChild(fe),xe==="both"||xe==="end"){var Ce=document.createElement("div");Ce.style.display="flex",Ce.style.alignItems="center",Ce.style.minHeight="20px",Ce.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="`+(U.uiStyleSettings!==void 0?U.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Ce.style.marginRight="5px",q.appendChild(Ce)}U.typeBoxes.push(q)},U=this,$=0;$<4;$++)G($);return L},d.prototype.setCurrentType=function(S,L){var G=this;this.currentType=S,this.typeBoxes.forEach(function(U){U.style.borderColor=U===L?G.uiStyleSettings!==void 0?G.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},d}(a),N=function(F){function d(S,L,G){var U=F.call(this,S,L,G)||this;return U.arrowType="end",U.arrowBaseHeight=10,U.arrowBaseWidth=10,U.getArrowPoints=U.getArrowPoints.bind(U),U.setArrowType=U.setArrowType.bind(U),U.arrowTypePanel=new T("Arrow type","end"),U.arrowTypePanel.onArrowTypeChanged=U.setArrowType,U}return W(d,F),d.prototype.ownsTarget=function(S){return!(!F.prototype.ownsTarget.call(this,S)&&S!==this.arrow1&&S!==this.arrow2)},d.prototype.getArrowPoints=function(S,L){var G=this.arrowBaseWidth+2*this.strokeWidth,U=this.arrowBaseHeight+2*this.strokeWidth;return S-G/2+","+(L+U/2)+" "+S+","+(L-U/2)+" "+(S+G/2)+","+(L+U/2)},d.prototype.createTips=function(){this.arrow1=I.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(I.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=I.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(I.createTransform()),this.visual.appendChild(this.arrow2)},d.prototype.pointerDown=function(S,L){F.prototype.pointerDown.call(this,S,L),this.state==="creating"&&this.createTips()},d.prototype.adjustVisual=function(){if(F.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",I.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),I.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var S=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),L=this.arrow1.transform.baseVal.getItem(0);L.setRotate(S,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(L,0);var G=this.arrow2.transform.baseVal.getItem(0);G.setRotate(S+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(G,0)}},d.prototype.setArrowType=function(S){this.arrowType=S,this.adjustVisual(),this.stateChanged()},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var S=Object.assign({arrowType:this.arrowType},F.prototype.getState.call(this));return S.typeName=d.typeName,S},d.prototype.restoreState=function(S){F.prototype.restoreState.call(this,S);var L=S;this.arrowType=L.arrowType,this.createTips(),this.adjustVisual()},d.typeName="ArrowMarker",d.title="Arrow marker",d.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',d}(u),D=function(F){function d(S,L,G){var U=F.call(this,S,L,G)||this;return U.fillColor=G.defaultFillColor,U.strokeWidth=0,U.fillPanel=new h("Color",G.defaultColorSet,G.defaultFillColor),U.fillPanel.onColorChanged=U.setFillColor,U}return W(d,F),Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var S=F.prototype.getState.call(this);return S.typeName=d.typeName,S},d.typeName="CoverMarker",d.title="Cover marker",d.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',d}(v),y=function(F){function d(S,L,G,U){var $=F.call(this,S,U||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return $.opacities=[],$.opacityBoxes=[],$.opacities=L,$.currentOpacity=G,$.setCurrentOpacity=$.setCurrentOpacity.bind($),$}return W(d,F),d.prototype.getUi=function(){var S=this,L=document.createElement("div");return L.style.display="flex",L.style.overflow="hidden",L.style.flexGrow="2",L.style.justifyContent="space-between",this.opacities.forEach(function(G){var U=document.createElement("div");U.style.display="flex",U.style.alignItems="center",U.style.justifyContent="center",U.style.padding="5px",U.style.borderWidth="2px",U.style.borderStyle="solid",U.style.borderColor=G===S.currentOpacity?S.uiStyleSettings.toolboxAccentColor:"transparent",U.addEventListener("click",function(){S.setCurrentOpacity(G,U)}),L.appendChild(U);var $=document.createElement("div");$.innerText=100*G+"%",U.appendChild($),S.opacityBoxes.push(U)}),L},d.prototype.setCurrentOpacity=function(S,L){var G=this;this.currentOpacity=S,this.opacityBoxes.forEach(function(U){U.style.borderColor=U===L?G.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},d}(a),O=function(F){function d(S,L,G){var U=F.call(this,S,L,G)||this;return U.setOpacity=U.setOpacity.bind(U),U.fillColor=G.defaultHighlightColor,U.strokeWidth=0,U.opacity=G.defaultHighlightOpacity,U.fillPanel=new h("Color",G.defaultColorSet,U.fillColor),U.fillPanel.onColorChanged=U.setFillColor,U.opacityPanel=new y("Opacity",G.defaultOpacitySteps,U.opacity),U.opacityPanel.onOpacityChanged=U.setOpacity,U}return W(d,F),d.prototype.setOpacity=function(S){this.opacity=S,this.visual&&I.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var S=F.prototype.getState.call(this);return S.typeName=d.typeName,S},d.typeName="HighlightMarker",d.title="Highlight marker",d.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',d}(D),k='<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>',R=function(F){function d(S,L,G){var U=F.call(this,S,L,G)||this;return U.bgColor="transparent",U.tipPosition={x:0,y:0},U.tipBase1Position={x:0,y:0},U.tipBase2Position={x:0,y:0},U.tipMoving=!1,U.color=G.defaultStrokeColor,U.bgColor=G.defaultFillColor,U.fontFamily=G.defaultFontFamily,U.defaultSize={x:100,y:30},U.setBgColor=U.setBgColor.bind(U),U.getTipPoints=U.getTipPoints.bind(U),U.positionTip=U.positionTip.bind(U),U.setTipPoints=U.setTipPoints.bind(U),U.colorPanel=new h("Text color",G.defaultColorSet,U.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),U.colorPanel.onColorChanged=U.setColor,U.bgColorPanel=new h("Fill color",G.defaultColorSet,U.bgColor,k),U.bgColorPanel.onColorChanged=U.setBgColor,U.fontFamilyPanel=new l("Font",G.defaultFontFamilies,G.defaultFontFamily),U.fontFamilyPanel.onFontChanged=U.setFont,U.tipGrip=new n,U.tipGrip.visual.transform.baseVal.appendItem(I.createTransform()),U.controlBox.appendChild(U.tipGrip.visual),U}return W(d,F),d.prototype.ownsTarget=function(S){return F.prototype.ownsTarget.call(this,S)||this.tipGrip.ownsTarget(S)||this.tip===S},d.prototype.createTip=function(){I.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=I.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},d.prototype.pointerDown=function(S,L){this.state==="new"&&F.prototype.pointerDown.call(this,S,L),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(L)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):F.prototype.pointerDown.call(this,S,L)},d.prototype.pointerUp=function(S){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,F.prototype.pointerUp.call(this,S);else{var L=this.state==="creating";F.prototype.pointerUp.call(this,S),this.setTipPoints(L),this.positionTip()}},d.prototype.manipulate=function(S){if(this.tipMoving){var L=this.unrotatePoint(S);this.tipPosition={x:L.x-this.manipulationStartLeft,y:L.y-this.manipulationStartTop},this.positionTip()}else F.prototype.manipulate.call(this,S)},d.prototype.setBgColor=function(S){this.bgRectangle&&this.tip&&(I.setAttributes(this.bgRectangle,[["fill",S]]),I.setAttributes(this.tip,[["fill",S]])),this.bgColor=S,this.fillColorChanged(S)},d.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},d.prototype.setTipPoints=function(S){S===void 0&&(S=!1);var L=Math.min(this.height/2,15),G=this.height/5;S&&(this.tipPosition={x:L+G/2,y:this.height+20});var U=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?U<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(G=this.width/5,L=Math.min(this.width/2,15),this.tipBase1Position={x:L,y:0},this.tipBase2Position={x:L+G,y:0}):(this.tipBase1Position={x:0,y:L},this.tipBase2Position={x:0,y:L+G}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?U<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(G=this.width/5,L=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-L-G,y:0},this.tipBase2Position={x:this.width-L,y:0}):(this.tipBase1Position={x:this.width,y:L},this.tipBase2Position={x:this.width,y:L+G}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?U<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(G=this.width/5,L=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-L-G,y:this.height},this.tipBase2Position={x:this.width-L,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-L-G},this.tipBase2Position={x:this.width,y:this.height-L}):U<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(G=this.width/5,L=Math.min(this.width/2,15),this.tipBase1Position={x:L,y:this.height},this.tipBase2Position={x:L+G,y:this.height}):(this.tipBase1Position={x:0,y:this.height-L},this.tipBase2Position={x:0,y:this.height-L-G})},d.prototype.resize=function(S){F.prototype.resize.call(this,S),this.positionTip()},d.prototype.positionTip=function(){I.setAttributes(this.tip,[["points",this.getTipPoints()]]);var S=this.tipGrip.visual.transform.baseVal.getItem(0);S.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(S,0)},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),d.prototype.select=function(){this.positionTip(),F.prototype.select.call(this)},d.prototype.getState=function(){var S=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},F.prototype.getState.call(this));return S.typeName=d.typeName,S},d.prototype.restoreState=function(S){var L=S;this.bgColor=L.bgColor,this.tipPosition=L.tipPosition,F.prototype.restoreState.call(this,S),this.createTip(),this.setTipPoints()},d.prototype.scale=function(S,L){F.prototype.scale.call(this,S,L),this.tipPosition={x:this.tipPosition.x*S,y:this.tipPosition.y*L},this.positionTip()},d.typeName="CalloutMarker",d.title="Callout marker",d.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',d}(m),B=function(F){function d(S,L,G){var U=F.call(this,S,L,G)||this;return U.fillColor="transparent",U.strokeColor="transparent",U.strokeWidth=0,U.strokeDasharray="",U.opacity=1,U.strokeColor=G.defaultColor,U.strokeWidth=G.defaultStrokeWidth,U.strokeDasharray=G.defaultStrokeDasharray,U.fillColor=G.defaultFillColor,U.setStrokeColor=U.setStrokeColor.bind(U),U.setFillColor=U.setFillColor.bind(U),U.setStrokeWidth=U.setStrokeWidth.bind(U),U.setStrokeDasharray=U.setStrokeDasharray.bind(U),U.setOpacity=U.setOpacity.bind(U),U.createVisual=U.createVisual.bind(U),U.strokePanel=new h("Line color",A(G.defaultColorSet,["transparent"]),G.defaultColor),U.strokePanel.onColorChanged=U.setStrokeColor,U.fillPanel=new h("Fill color",A(G.defaultColorSet,["transparent"]),U.fillColor,k),U.fillPanel.onColorChanged=U.setFillColor,U.strokeWidthPanel=new E("Line width",G.defaultStrokeWidths,G.defaultStrokeWidth),U.strokeWidthPanel.onWidthChanged=U.setStrokeWidth,U.strokeStylePanel=new w("Line style",G.defaultStrokeDasharrays,G.defaultStrokeDasharray),U.strokeStylePanel.onStyleChanged=U.setStrokeDasharray,U.opacityPanel=new y("Opacity",G.defaultOpacitySteps,U.opacity),U.opacityPanel.onOpacityChanged=U.setOpacity,U}return W(d,F),d.prototype.ownsTarget=function(S){return!(!F.prototype.ownsTarget.call(this,S)&&S!==this.visual)},d.prototype.createVisual=function(){this.visual=I.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},d.prototype.pointerDown=function(S,L){F.prototype.pointerDown.call(this,S,L),this.state==="new"&&(this.createVisual(),this.moveVisual(S),this._state="creating")},d.prototype.manipulate=function(S){F.prototype.manipulate.call(this,S)},d.prototype.resize=function(S){F.prototype.resize.call(this,S),this.setSize()},d.prototype.setSize=function(){F.prototype.setSize.call(this),I.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},d.prototype.pointerUp=function(S){F.prototype.pointerUp.call(this,S),this.setSize()},d.prototype.setStrokeColor=function(S){this.strokeColor=S,this.visual&&I.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(S),this.stateChanged()},d.prototype.setFillColor=function(S){this.fillColor=S,this.visual&&I.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(S),this.stateChanged()},d.prototype.setStrokeWidth=function(S){this.strokeWidth=S,this.visual&&I.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},d.prototype.setStrokeDasharray=function(S){this.strokeDasharray=S,this.visual&&I.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},d.prototype.setOpacity=function(S){this.opacity=S,this.visual&&I.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var S=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},F.prototype.getState.call(this));return S.typeName=d.typeName,S},d.prototype.restoreState=function(S){var L=S;this.fillColor=L.fillColor,this.strokeColor=L.strokeColor,this.strokeWidth=L.strokeWidth,this.strokeDasharray=L.strokeDasharray,this.opacity=L.opacity,this.createVisual(),F.prototype.restoreState.call(this,S),this.setSize()},d.prototype.scale=function(S,L){F.prototype.scale.call(this,S,L),this.setSize()},d.typeName="EllipseMarker",d.title="Ellipse marker",d.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',d}(b),V=function(F){function d(S,L,G){return F.call(this,S,L,G)||this}return W(d,F),Object.defineProperty(d.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),d.prototype.ownsTarget=function(S){return!(!F.prototype.ownsTarget.call(this,S)&&S!==this.tip1&&S!==this.tip2)},d.prototype.createTips=function(){this.tip1=I.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(I.createTransform()),this.visual.appendChild(this.tip1),this.tip2=I.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(I.createTransform()),this.visual.appendChild(this.tip2)},d.prototype.pointerDown=function(S,L){F.prototype.pointerDown.call(this,S,L),this.state==="creating"&&this.createTips()},d.prototype.adjustVisual=function(){if(F.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(I.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()]]),I.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 S=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),L=this.tip1.transform.baseVal.getItem(0);L.setRotate(S,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(L,0);var G=this.tip2.transform.baseVal.getItem(0);G.setRotate(S+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(G,0)}},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var S=F.prototype.getState.call(this);return S.typeName=d.typeName,S},d.prototype.restoreState=function(S){F.prototype.restoreState.call(this,S),this.createTips(),this.adjustVisual()},d.typeName="MeasurementMarker",d.title="Measurement marker",d.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',d}(u),ee=function(F){function d(S,L,G){var U=F.call(this,S,L,G)||this;return U.strokePanel.colors=G.defaultColorSet,U.fillColor="transparent",U}return W(d,F),Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var S=F.prototype.getState.call(this);return S.typeName=d.typeName,S},d.typeName="EllipseFrameMarker",d.title="Ellipse frame marker",d.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',d}(B),re=function(){function F(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(F.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),F.prototype.addUndoStep=function(d){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(d)||(this.undoStack.push(d),JSON.stringify(this.lastRedoStep)!==JSON.stringify(d)&&this.redoStack.splice(0,this.redoStack.length))},F.prototype.replaceLastUndoStep=function(d){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=d)},F.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},F.prototype.undo=function(){if(this.undoStack.length>1){var d=this.undoStack.pop();return d!==void 0&&this.redoStack.push(d),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},F.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},F}(),_e=function(F){function d(S,L,G){var U=F.call(this,S,L,G)||this;return U.strokeColor="transparent",U.strokeWidth=0,U.strokeDasharray="",U.curveX=0,U.curveY=0,U.manipulationStartCurveX=0,U.manipulationStartCurveY=0,U.setStrokeColor=U.setStrokeColor.bind(U),U.setStrokeWidth=U.setStrokeWidth.bind(U),U.setStrokeDasharray=U.setStrokeDasharray.bind(U),U.positionGrips=U.positionGrips.bind(U),U.addControlGrips=U.addControlGrips.bind(U),U.adjustVisual=U.adjustVisual.bind(U),U.setupControlBox=U.setupControlBox.bind(U),U.resize=U.resize.bind(U),U.strokeColor=G.defaultColor,U.strokeWidth=G.defaultStrokeWidth,U.strokeDasharray=G.defaultStrokeDasharray,U.strokePanel=new h("Line color",G.defaultColorSet,G.defaultColor),U.strokePanel.onColorChanged=U.setStrokeColor,U.strokeWidthPanel=new E("Line width",G.defaultStrokeWidths,G.defaultStrokeWidth),U.strokeWidthPanel.onWidthChanged=U.setStrokeWidth,U.strokeStylePanel=new w("Line style",G.defaultStrokeDasharrays,G.defaultStrokeDasharray),U.strokeStylePanel.onStyleChanged=U.setStrokeDasharray,U}return W(d,F),d.prototype.ownsTarget=function(S){return!(!F.prototype.ownsTarget.call(this,S)&&S!==this.visual&&S!==this.selectorCurve&&S!==this.visibleCurve&&!this.curveGrip.ownsTarget(S))},d.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},d.prototype.createVisual=function(){this.visual=I.createGroup(),this.selectorCurve=I.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=I.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},d.prototype.pointerDown=function(S,L){F.prototype.pointerDown.call(this,S,L),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=S.x,this.curveY=S.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(L)&&(this.activeGrip=this.curveGrip,this._state="resize")},d.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),I.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),I.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),I.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},d.prototype.setupControlBox=function(){F.prototype.setupControlBox.call(this),this.curveControlLine1=I.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=I.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},d.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,F.prototype.addControlGrips.call(this)},d.prototype.positionGrips=function(){F.prototype.positionGrips.call(this);var S=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-S/2,this.curveY-S/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},d.prototype.manipulate=function(S){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+S.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+S.y-this.manipulationStartY),F.prototype.manipulate.call(this,S)},d.prototype.resize=function(S){this.activeGrip===this.curveGrip&&(this.curveX=S.x,this.curveY=S.y),F.prototype.resize.call(this,S),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},d.prototype.setStrokeColor=function(S){this.strokeColor=S,this.adjustVisual(),this.colorChanged(S)},d.prototype.setStrokeWidth=function(S){this.strokeWidth=S,this.adjustVisual()},d.prototype.setStrokeDasharray=function(S){this.strokeDasharray=S,this.adjustVisual()},d.prototype.scale=function(S,L){this.curveX=this.curveX*S,this.curveY=this.curveY*L,F.prototype.scale.call(this,S,L)},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var S=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},F.prototype.getState.call(this));return S.typeName=d.typeName,S},d.prototype.restoreState=function(S){F.prototype.restoreState.call(this,S);var L=S;this.strokeColor=L.strokeColor,this.strokeWidth=L.strokeWidth,this.strokeDasharray=L.strokeDasharray,this.curveX=L.curveX,this.curveY=L.curveY,this.createVisual(),this.adjustVisual()},d.typeName="CurveMarker",d.title="Curve marker",d.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',d}(p),se=function(){function F(d,S){S===void 0&&(S=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=d,this.cancelable=S}return Object.defineProperty(F.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),F.prototype.preventDefault=function(){this._defaultPrevented=!0},F}(),ye=function(F){function d(S,L,G){var U=F.call(this,S,!1)||this;return U.dataUrl=L,U.state=G,U}return W(d,F),d}(se),ve=function(F){function d(S,L,G){G===void 0&&(G=!1);var U=F.call(this,S,G)||this;return U.marker=L,U}return W(d,F),d}(se),Ee=function(){function F(){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 F.prototype.addEventListener=function(d,S){this[d].push(S)},F.prototype.removeEventListener=function(d,S){var L=this[d].indexOf(S);L>-1&&this[d].splice(L,1)},F}(),le=function(){function F(d){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new _,this._isOpen=!1,this.undoRedoManager=new re,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 Ee,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=F.instanceCounter++,this.styles=new C(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=d,this.targetRoot=document.body,this.width=d.clientWidth,this.height=d.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(F.prototype,"ALL_MARKER_TYPES",{get:function(){return[x,c,N,m,ee,B,O,R,V,D,u,_e]},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[x,c,N,m,B,O,R]},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"BASIC_MARKER_TYPES",{get:function(){return[x,c,N,m,O]},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(d){var S=this;this._availableMarkerTypes.splice(0),d.forEach(function(L){if(typeof L=="string"){var G=S.ALL_MARKER_TYPES.find(function(U){return U.typeName===L});G!==void 0&&S._availableMarkerTypes.push(G)}else S._availableMarkerTypes.push(L)})},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(d){this._zoomLevel=d,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),F.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),H.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},F.prototype.show=function(){var d=this;this.styles.styleSheetRoot===void 0&&e.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=e.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(S){return S(new se(d))})},F.prototype.render=function(){return M(this,void 0,void 0,function(){var d;return z(this,function(S){switch(S.label){case 0:return this.setCurrentMarker(),(d=new P).naturalSize=this.renderAtNaturalSize,d.imageType=this.renderImageType,d.imageQuality=this.renderImageQuality,d.markersOnly=this.renderMarkersOnly,d.width=this.renderWidth,d.height=this.renderHeight,[4,d.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return S.sent(),[4,d.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,S.sent()]}})})},F.prototype.close=function(d){var S=this;if(d===void 0&&(d=!1),this.isOpen){var L=!1;d||this.eventListeners.beforeclose.forEach(function(G){var U=new se(S,!0);G(U),U.defaultPrevented&&(L=!0)}),L||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(G){return G(new se(S))}),this.detachEvents(),this._isOpen=!1)}},F.prototype.addMarkersToToolbar=function(){for(var d,S=[],L=0;L<arguments.length;L++)S[L]=arguments[L];(d=this._availableMarkerTypes).push.apply(d,S)},F.prototype.addRenderEventListener=function(d){this.addEventListener("render",function(S){d(S.dataUrl,S.state)})},F.prototype.removeRenderEventListener=function(d){},F.prototype.addCloseEventListener=function(d){this.addEventListener("close",function(){d()})},F.prototype.removeCloseEventListener=function(d){},F.prototype.setupResizeObserver=function(){var d=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){d.resize(d.target.clientWidth,d.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return d.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},F.prototype.onPopupTargetResize=function(){var d=1*this.target.clientWidth/this.target.clientHeight,S=this.editorCanvas.clientWidth/d>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*d:this.editorCanvas.clientWidth,L=S<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/d;this.resize(S,L)},F.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},F.prototype.resize=function(d,S){this._isResizing=!0;var L=d/this.imageWidth,G=S/this.imageHeight;this.imageWidth=Math.round(d),this.imageHeight=Math.round(S),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(L,G),this._isResizing=!1},F.prototype.scaleMarkers=function(d,S){var L,G=this;this._currentMarker&&this._currentMarker instanceof m?this._currentMarker.scale(d,S):(L=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(U){U!==G._currentMarker&&U.scale(d,S)}),L!==void 0&&this.setCurrentMarker(L)},F.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"},F.prototype.setTopLeft=function(){var d=this.editingTarget.getBoundingClientRect(),S=this.editorCanvas.getBoundingClientRect();this.left=d.left-S.left,this.top=d.top-S.top},F.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)},F.prototype.addDefs=function(){for(var d,S=[],L=0;L<arguments.length;L++)S[L]=arguments[L];this.defs=I.createDefs(),this.addDefsToImage(),(d=this.defs).append.apply(d,S)},F.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},F.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)},F.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},F.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},F.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)},F.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},F.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)},F.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var d=document.createElement("a");d.href="https://markerjs.com/",d.target="_blank",d.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',d.title="Powered by marker.js",d.style.display="grid",d.style.alignItems="center",d.style.justifyItems="center",d.style.padding="3px",d.style.width="20px",d.style.height="20px",this.logoUI.appendChild(d),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},F.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")},F.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"},F.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},F.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var d=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=d+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new o(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new r(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},F.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},F.prototype.removeMarker=function(d){this.markerImage.removeChild(d.container),this.markers.indexOf(d)>-1&&this.markers.splice(this.markers.indexOf(d),1),d.dispose()},F.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())},F.prototype.toolbarButtonClicked=function(d,S){if(d==="marker"&&S!==void 0)this.createNewMarker(S);else if(d==="action")switch(S){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()}},F.prototype.deleteSelectedMarker=function(){var d=this;if(this._currentMarker!==void 0){var S=!1;if(this.eventListeners.markerbeforedelete.forEach(function(G){var U=new ve(d,d._currentMarker,!0);G(U),U.defaultPrevented&&(S=!0)}),!S){var L=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(G){return G(new ve(d,L))})}}},F.prototype.clear=function(){var d=this,S=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function($){var de=new ve(d,void 0,!0);$(de),de.defaultPrevented&&(S=!0)}),!S)){this.setCurrentMarker();for(var L=function($){var de=G.markers[$];G.setCurrentMarker(G.markers[$]),G._currentMarker.dispose(),G.markerImage.removeChild(G._currentMarker.container),G.markers.splice(G.markers.indexOf(G._currentMarker),1),G.eventListeners.markerdelete.forEach(function(xe){return xe(new ve(d,de))})},G=this,U=this.markers.length-1;U>=0;U--)L(U);this.addUndoStep()}},Object.defineProperty(F.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),F.prototype.showNotesEditor=function(){var d;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(d=this._currentMarker.notes)!==null&&d!==void 0?d:"",this.overlayContainer.appendChild(this.notesArea))},F.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)},F.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},F.prototype.addUndoStep=function(){var d=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var S=this.getState(),L=this.undoRedoManager.getLastUndoStep();if(!L||L.width===S.width&&L.height===S.height){var G=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(S),G<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(U){return U(new se(d))})}else this.undoRedoManager.replaceLastUndoStep(S),this.eventListeners.statechange.forEach(function(U){return U(new se(d))})}},F.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},F.prototype.undoStep=function(){var d=this,S=this.undoRedoManager.undo();S!==void 0&&(this.restoreState(S),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(L){return L(new se(d))}))},F.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},F.prototype.redoStep=function(){var d=this,S=this.undoRedoManager.redo();S!==void 0&&(this.restoreState(S),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(L){return L(new se(d))}))},F.prototype.stepZoom=function(){var d=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=d<this.zoomSteps.length-1?this.zoomSteps[d+1]:this.zoomSteps[0]},F.prototype.panTo=function(d){this.contentDiv.scrollBy({left:this.prevPanPoint.x-d.x,top:this.prevPanPoint.y-d.y}),this.prevPanPoint=d},F.prototype.startRenderAndClose=function(){return M(this,void 0,void 0,function(){var d,S,L=this;return z(this,function(G){switch(G.label){case 0:return[4,this.render()];case 1:return d=G.sent(),S=this.getState(),this.eventListeners.render.forEach(function(U){return U(new ye(L,d,S))}),this.close(!0),[2]}})})},F.prototype.getState=function(d){d===!0&&this.setCurrentMarker();var S={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(L){return S.markers.push(L.getState())}),S},F.prototype.restoreState=function(d){var S=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);d.markers.forEach(function(L){var G=S._availableMarkerTypes.find(function($){return $.typeName===L.typeName});if(G!==void 0){var U=S.addNewMarker(G);U.restoreState(L),S.markers.push(U)}}),d.width&&d.height&&(d.width!==this.imageWidth||d.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/d.width,this.imageHeight/d.height),this.eventListeners.restorestate.forEach(function(L){return L(new se(S))})},F.prototype.addNewMarker=function(d){var S=I.createGroup();return this.markerImage.appendChild(S),new d(S,this.overlayContainer,this.settings)},F.prototype.createNewMarker=function(d){var S,L=this;(S=typeof d=="string"?this._availableMarkerTypes.find(function(G){return G.typeName===d}):d)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(S),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(S.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(G){return G(new ve(L,L._currentMarker))}))},F.prototype.markerCreated=function(d){var S=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(d),this.setCurrentMarker(d),d instanceof c&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(c):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(L){return L(new ve(S,S._currentMarker))})},F.prototype.colorChanged=function(d){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=d,this.settings.defaultStrokeColor=d)},F.prototype.fillColorChanged=function(d){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=d)},F.prototype.markerStateChanged=function(d){var S=this;this.eventListeners.markerchange.forEach(function(L){return L(new ve(S,d))})},F.prototype.setCurrentMarker=function(d){var S=this;this._currentMarker!==d&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(L){return L(new ve(S,S._currentMarker))})),this._currentMarker=d,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(L){return L(new ve(S,S._currentMarker))}))},F.prototype.onPointerDown=function(d){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||d.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var S=this.markers.find(function(L){return L.ownsTarget(d.target)});S!==void 0?(this.setCurrentMarker(S),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(d.clientX,d.clientY),d.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:d.clientX,y:d.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(d.clientX,d.clientY))},F.prototype.onDblClick=function(d){if(this._isFocused||this.focus(),this.mode==="select"){var S=this.markers.find(function(L){return L.ownsTarget(d.target)});S!==void 0&&S!==this._currentMarker&&this.setCurrentMarker(S),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(d.clientX,d.clientY),d.target):this.setCurrentMarker()}},F.prototype.onPointerMove=function(d){this.touchPoints!==1&&d.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||d.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(d.clientX,d.clientY)):this.zoomLevel>1&&this.panTo({x:d.clientX,y:d.clientY}))},F.prototype.onPointerUp=function(d){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(d.clientX,d.clientY)),this.isDragging=!1,this.addUndoStep()},F.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},F.prototype.onKeyUp=function(d){this._currentMarker===void 0||this.notesArea!==void 0||d.key!=="Delete"&&d.key!=="Backspace"||this.deleteSelectedMarker()},F.prototype.clientToLocalCoordinates=function(d,S){var L=this.markerImage.getBoundingClientRect();return{x:(d-L.left)/this.zoomLevel,y:(S-L.top)/this.zoomLevel}},F.prototype.onWindowResize=function(){this.positionUI()},F.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var d=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=d+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},F.prototype.addLicenseKey=function(d){H.addKey(d)},F.prototype.addEventListener=function(d,S){this.eventListeners.addEventListener(d,S)},F.prototype.removeEventListener=function(d,S){this.eventListeners.removeEventListener(d,S)},F.prototype.renderState=function(d){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(d),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(F.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),F.prototype.focus=function(){var d=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(S){return S(new se(d))}))},F.prototype.blur=function(){var d=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(S){return S(new se(d))}))},F.instanceCounter=0,F}()},T8No:function(Pe,he,j){"use strict";j.d(he,"a",function(){return H}),j.d(he,"e",function(){return P}),j.d(he,"c",function(){return u}),j.d(he,"b",function(){return l}),j.d(he,"d",function(){return m}),j.d(he,"f",function(){return N});var ce=j("MNsG"),W=j("N0LK"),M=j("Cg/j");let z=ce.k||"";const A=new Map;A.set("false",!1),A.set("true",!0),A.set("isMac",ce.f),A.set("isLinux",ce.d),A.set("isWindows",ce.i),A.set("isWeb",ce.h),A.set("isMacNative",ce.f&&!ce.h),A.set("isEdge",z.indexOf("Edg/")>=0),A.set("isFirefox",z.indexOf("Firefox")>=0),A.set("isChrome",z.indexOf("Chrome")>=0),A.set("isSafari",z.indexOf("Safari")>=0);const I=Object.prototype.hasOwnProperty;class H{static has(y){return f.create(y)}static equals(y,O){return o.create(y,O)}static regex(y,O){return E.create(y,O)}static not(y){return s.create(y)}static and(...y){return _.create(y,null)}static or(...y){return p.create(y,null,!0)}static deserialize(y,O=!1){return y?this._deserializeOrExpression(y,O):void 0}static _deserializeOrExpression(y,O){let k=y.split("||");return p.create(k.map(R=>this._deserializeAndExpression(R,O)),null,!0)}static _deserializeAndExpression(y,O){let k=y.split("&&");return _.create(k.map(R=>this._deserializeOne(R,O)),null)}static _deserializeOne(y,O){if(y=y.trim(),y.indexOf("!=")>=0){let k=y.split("!=");return h.create(k[0].trim(),this._deserializeValue(k[1],O))}if(y.indexOf("==")>=0){let k=y.split("==");return o.create(k[0].trim(),this._deserializeValue(k[1],O))}if(y.indexOf("=~")>=0){let k=y.split("=~");return E.create(k[0].trim(),this._deserializeRegexValue(k[1],O))}if(y.indexOf(" in ")>=0){let k=y.split(" in ");return r.create(k[0].trim(),k[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(y)){const k=y.split(">=");return t.create(k[0].trim(),k[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(y)){const k=y.split(">");return n.create(k[0].trim(),k[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(y)){const k=y.split("<=");return v.create(k[0].trim(),k[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(y)){const k=y.split("<");return b.create(k[0].trim(),k[1].trim())}return/^\!\s*/.test(y)?s.create(y.substr(1).trim()):f.create(y)}static _deserializeValue(y,O){if(y=y.trim(),y==="true")return!0;if(y==="false")return!1;let k=/^'([^']*)'$/.exec(y);return k?k[1].trim():y}static _deserializeRegexValue(y,O){if(Object(W.C)(y)){if(O)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let k=y.indexOf("/"),R=y.lastIndexOf("/");if(k===R||k<0){if(O)throw new Error(`bad regexp-value '${y}', missing /-enclosure`);return console.warn(`bad regexp-value '${y}', missing /-enclosure`),null}let B=y.slice(k+1,R),V=y[R+1]==="i"?"i":"";try{return new RegExp(B,V)}catch(ee){if(O)throw new Error(`bad regexp-value '${y}', parse error: ${ee}`);return console.warn(`bad regexp-value '${y}', parse error: ${ee}`),null}}}function P(y,O){const k=y?y.substituteConstants():void 0,R=O?O.substituteConstants():void 0;return!k&&!R?!0:!k||!R?!1:k.equals(R)}function e(y,O){return y.cmp(O)}class C{constructor(){this.type=0}cmp(y){return this.type-y.type}equals(y){return y.type===this.type}substituteConstants(){return this}evaluate(y){return!1}serialize(){return"false"}keys(){return[]}negate(){return g.INSTANCE}}C.INSTANCE=new C;class g{constructor(){this.type=1}cmp(y){return this.type-y.type}equals(y){return y.type===this.type}substituteConstants(){return this}evaluate(y){return!0}serialize(){return"true"}keys(){return[]}negate(){return C.INSTANCE}}g.INSTANCE=new g;class f{constructor(y,O){this.key=y,this.negated=O,this.type=2}static create(y,O=null){const k=A.get(y);return typeof k=="boolean"?k?g.INSTANCE:C.INSTANCE:new f(y,O)}cmp(y){return y.type!==this.type?this.type-y.type:c(this.key,y.key)}equals(y){return y.type===this.type?this.key===y.key:!1}substituteConstants(){const y=A.get(this.key);return typeof y=="boolean"?y?g.INSTANCE:C.INSTANCE:this}evaluate(y){return!!y.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=s.create(this.key,this)),this.negated}}class o{constructor(y,O,k){this.key=y,this.value=O,this.negated=k,this.type=4}static create(y,O,k=null){if(typeof O=="boolean")return O?f.create(y,k):s.create(y,k);const R=A.get(y);if(typeof R=="boolean"){const B=R?"true":"false";return O===B?g.INSTANCE:C.INSTANCE}return new o(y,O,k)}cmp(y){return y.type!==this.type?this.type-y.type:T(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){const y=A.get(this.key);if(typeof y=="boolean"){const O=y?"true":"false";return this.value===O?g.INSTANCE:C.INSTANCE}return this}evaluate(y){return y.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=h.create(this.key,this.value,this)),this.negated}}class r{constructor(y,O){this.key=y,this.valueKey=O,this.type=10,this.negated=null}static create(y,O){return new r(y,O)}cmp(y){return y.type!==this.type?this.type-y.type:T(this.key,this.valueKey,y.key,y.valueKey)}equals(y){return y.type===this.type?this.key===y.key&&this.valueKey===y.valueKey:!1}substituteConstants(){return this}evaluate(y){const O=y.getValue(this.valueKey),k=y.getValue(this.key);return Array.isArray(O)?O.indexOf(k)>=0:typeof k=="string"&&typeof O=="object"&&O!==null?I.call(O,k):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=a.create(this)),this.negated}}class a{constructor(y){this._actual=y,this.type=11}static create(y){return new a(y)}cmp(y){return y.type!==this.type?this.type-y.type:this._actual.cmp(y._actual)}equals(y){return y.type===this.type?this._actual.equals(y._actual):!1}substituteConstants(){return this}evaluate(y){return!this._actual.evaluate(y)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class h{constructor(y,O,k){this.key=y,this.value=O,this.negated=k,this.type=5}static create(y,O,k=null){if(typeof O=="boolean")return O?s.create(y,k):f.create(y,k);const R=A.get(y);if(typeof R=="boolean"){const B=R?"true":"false";return O===B?C.INSTANCE:g.INSTANCE}return new h(y,O,k)}cmp(y){return y.type!==this.type?this.type-y.type:T(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){const y=A.get(this.key);if(typeof y=="boolean"){const O=y?"true":"false";return this.value===O?C.INSTANCE:g.INSTANCE}return this}evaluate(y){return y.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=o.create(this.key,this.value,this)),this.negated}}class s{constructor(y,O){this.key=y,this.negated=O,this.type=3}static create(y,O=null){const k=A.get(y);return typeof k=="boolean"?k?C.INSTANCE:g.INSTANCE:new s(y,O)}cmp(y){return y.type!==this.type?this.type-y.type:c(this.key,y.key)}equals(y){return y.type===this.type?this.key===y.key:!1}substituteConstants(){const y=A.get(this.key);return typeof y=="boolean"?y?C.INSTANCE:g.INSTANCE:this}evaluate(y){return!y.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this)),this.negated}}function i(y,O){if(typeof y=="string"){const k=parseFloat(y);isNaN(k)||(y=k)}return typeof y=="string"||typeof y=="number"?O(y):C.INSTANCE}class n{constructor(y,O,k){this.key=y,this.value=O,this.negated=k,this.type=12}static create(y,O,k=null){return i(O,R=>new n(y,R,k))}cmp(y){return y.type!==this.type?this.type-y.type:T(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){return this}evaluate(y){return typeof this.value=="string"?!1:parseFloat(y.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=v.create(this.key,this.value,this)),this.negated}}class t{constructor(y,O,k){this.key=y,this.value=O,this.negated=k,this.type=13}static create(y,O,k=null){return i(O,R=>new t(y,R,k))}cmp(y){return y.type!==this.type?this.type-y.type:T(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){return this}evaluate(y){return typeof this.value=="string"?!1:parseFloat(y.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=b.create(this.key,this.value,this)),this.negated}}class b{constructor(y,O,k){this.key=y,this.value=O,this.negated=k,this.type=14}static create(y,O,k=null){return i(O,R=>new b(y,R,k))}cmp(y){return y.type!==this.type?this.type-y.type:T(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){return this}evaluate(y){return typeof this.value=="string"?!1:parseFloat(y.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=t.create(this.key,this.value,this)),this.negated}}class v{constructor(y,O,k){this.key=y,this.value=O,this.negated=k,this.type=15}static create(y,O,k=null){return i(O,R=>new v(y,R,k))}cmp(y){return y.type!==this.type?this.type-y.type:T(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){return this}evaluate(y){return typeof this.value=="string"?!1:parseFloat(y.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=n.create(this.key,this.value,this)),this.negated}}class E{constructor(y,O){this.key=y,this.regexp=O,this.type=7,this.negated=null}static create(y,O){return new E(y,O)}cmp(y){if(y.type!==this.type)return this.type-y.type;if(this.key<y.key)return-1;if(this.key>y.key)return 1;const O=this.regexp?this.regexp.source:"",k=y.regexp?y.regexp.source:"";return O<k?-1:O>k?1:0}equals(y){if(y.type===this.type){const O=this.regexp?this.regexp.source:"",k=y.regexp?y.regexp.source:"";return this.key===y.key&&O===k}return!1}substituteConstants(){return this}evaluate(y){let O=y.getValue(this.key);return this.regexp?this.regexp.test(O):!1}serialize(){const y=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${y}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=w.create(this)),this.negated}}class w{constructor(y){this._actual=y,this.type=8}static create(y){return new w(y)}cmp(y){return y.type!==this.type?this.type-y.type:this._actual.cmp(y._actual)}equals(y){return y.type===this.type?this._actual.equals(y._actual):!1}substituteConstants(){return this}evaluate(y){return!this._actual.evaluate(y)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function x(y){let O=null;for(let k=0,R=y.length;k<R;k++){const B=y[k].substituteConstants();if(y[k]!==B&&O===null){O=[];for(let V=0;V<k;V++)O[V]=y[V]}O!==null&&(O[k]=B)}return O===null?y:O}class _{constructor(y,O){this.expr=y,this.negated=O,this.type=6}static create(y,O){return _._normalizeArr(y,O)}cmp(y){if(y.type!==this.type)return this.type-y.type;if(this.expr.length<y.expr.length)return-1;if(this.expr.length>y.expr.length)return 1;for(let O=0,k=this.expr.length;O<k;O++){const R=e(this.expr[O],y.expr[O]);if(R!==0)return R}return 0}equals(y){if(y.type===this.type){if(this.expr.length!==y.expr.length)return!1;for(let O=0,k=this.expr.length;O<k;O++)if(!this.expr[O].equals(y.expr[O]))return!1;return!0}return!1}substituteConstants(){const y=x(this.expr);return y===this.expr?this:_.create(y,this.negated)}evaluate(y){for(let O=0,k=this.expr.length;O<k;O++)if(!this.expr[O].evaluate(y))return!1;return!0}static _normalizeArr(y,O){const k=[];let R=!1;for(const B of y){if(!B)continue;if(B.type===1){R=!0;continue}if(B.type===0)return C.INSTANCE;if(B.type===6){k.push(...B.expr);continue}k.push(B)}if(k.length===0&&R)return g.INSTANCE;if(k.length===0)return;if(k.length===1)return k[0];k.sort(e);for(let B=1;B<k.length;B++)k[B-1].equals(k[B])&&(k.splice(B,1),B--);if(k.length===1)return k[0];for(;k.length>1;){const B=k[k.length-1];if(B.type!==9)break;k.pop();const V=k.pop(),ee=k.length===0,re=p.create(B.expr.map(_e=>_.create([_e,V],null)),null,ee);re&&(k.push(re),k.sort(e))}return k.length===1?k[0]:new _(k,O)}serialize(){return this.expr.map(y=>y.serialize()).join(" && ")}keys(){const y=[];for(let O of this.expr)y.push(...O.keys());return y}negate(){if(!this.negated){const y=[];for(let O of this.expr)y.push(O.negate());this.negated=p.create(y,this,!0)}return this.negated}}class p{constructor(y,O){this.expr=y,this.negated=O,this.type=9}static create(y,O,k){return p._normalizeArr(y,O,k)}cmp(y){if(y.type!==this.type)return this.type-y.type;if(this.expr.length<y.expr.length)return-1;if(this.expr.length>y.expr.length)return 1;for(let O=0,k=this.expr.length;O<k;O++){const R=e(this.expr[O],y.expr[O]);if(R!==0)return R}return 0}equals(y){if(y.type===this.type){if(this.expr.length!==y.expr.length)return!1;for(let O=0,k=this.expr.length;O<k;O++)if(!this.expr[O].equals(y.expr[O]))return!1;return!0}return!1}substituteConstants(){const y=x(this.expr);return y===this.expr?this:p.create(y,this.negated,!1)}evaluate(y){for(let O=0,k=this.expr.length;O<k;O++)if(this.expr[O].evaluate(y))return!0;return!1}static _normalizeArr(y,O,k){let R=[],B=!1;if(y){for(let V=0,ee=y.length;V<ee;V++){const re=y[V];if(!re)continue;if(re.type===0){B=!0;continue}if(re.type===1)return g.INSTANCE;if(re.type===9){R=R.concat(re.expr);continue}R.push(re)}if(R.length===0&&B)return C.INSTANCE;R.sort(e)}if(R.length===0)return;if(R.length===1)return R[0];for(let V=1;V<R.length;V++)R[V-1].equals(R[V])&&(R.splice(V,1),V--);if(R.length===1)return R[0];if(k){for(let V=0;V<R.length;V++)for(let ee=V+1;ee<R.length;ee++)N(R[V],R[ee])&&(R.splice(ee,1),ee--);if(R.length===1)return R[0]}return new p(R,O)}serialize(){return this.expr.map(y=>y.serialize()).join(" || ")}keys(){const y=[];for(let O of this.expr)y.push(...O.keys());return y}negate(){if(!this.negated){let y=[];for(let O of this.expr)y.push(O.negate());for(;y.length>1;){const O=y.shift(),k=y.shift(),R=[];for(const V of D(O))for(const ee of D(k))R.push(_.create([V,ee],null));const B=y.length===0;y.unshift(p.create(R,null,B))}this.negated=y[0]}return this.negated}}class u extends f{constructor(y,O,k){super(y,null);this._defaultValue=O,typeof k=="object"?u._info.push(Object.assign(Object.assign({},k),{key:y})):k!==!0&&u._info.push({key:y,description:k,type:O!=null?typeof O:void 0})}static all(){return u._info.values()}bindTo(y){return y.createKey(this.key,this._defaultValue)}getValue(y){return y.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(y){return o.create(this.key,y)}}u._info=[];const l=Object(M.c)("contextKeyService"),m="setContext";function c(y,O){return y<O?-1:y>O?1:0}function T(y,O,k,R){return y<k?-1:y>k?1:O<R?-1:O>R?1:0}function N(y,O){if(O.type===6&&y.type!==9&&y.type!==6){for(const B of O.expr)if(y.equals(B))return!0}const k=y.negate(),R=D(k).concat(D(O));R.sort(e);for(let B=0;B<R.length;B++){const V=R[B],ee=V.negate();for(let re=B+1;re<R.length;re++){const _e=R[re];if(ee.equals(_e))return!0}}return!1}function D(y){return y.type===9?y.expr:[y]}},TXwP:function(Pe,he,j){var ce,W;(function(){var M;(function(){"use strict";var A=[,,function(e){function C(o){this.__parent=o,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=[]}C.prototype.clone_empty=function(){var o=new C(this.__parent);return o.set_indent(this.__indent_count,this.__alignment_count),o},C.prototype.item=function(o){return o<0?this.__items[this.__items.length+o]:this.__items[o]},C.prototype.has_match=function(o){for(var r=this.__items.length-1;r>=0;r--)if(this.__items[r].match(o))return!0;return!1},C.prototype.set_indent=function(o,r){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=r||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},C.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)},C.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},C.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},C.prototype.is_empty=function(){return this.__items.length===0},C.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},C.prototype.push=function(o){this.__items.push(o);var r=o.lastIndexOf(`
|
|
`);r!==-1?this.__character_count=o.length-r:this.__character_count+=o.length},C.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},C.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},C.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},C.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},C.prototype.toString=function(){var o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function g(o,r){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),r=r||"",o.indent_level>0&&(r=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=r,this.__base_string_length=r.length}g.prototype.get_indent_size=function(o,r){var a=this.__base_string_length;return r=r||0,o<0&&(a=0),a+=o*this.__indent_size,a+=r,a},g.prototype.get_indent_string=function(o,r){var a=this.__base_string;return r=r||0,o<0&&(o=0,a=""),r+=o*this.__indent_size,this.__ensure_cache(r),a+=this.__cache[r],a},g.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},g.prototype.__add_column=function(){var o=this.__cache.length,r=0,a="";this.__indent_size&&o>=this.__indent_size&&(r=Math.floor(o/this.__indent_size),o-=r*this.__indent_size,a=new Array(r+1).join(this.__indent_string)),o&&(a+=new Array(o+1).join(" ")),this.__cache.push(a)};function f(o,r){this.__indent_cache=new g(o,r),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new C(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}f.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},f.prototype.get_line_number=function(){return this.__lines.length},f.prototype.get_indent_string=function(o,r){return this.__indent_cache.get_indent_string(o,r)},f.prototype.get_indent_size=function(o,r){return this.__indent_cache.get_indent_size(o,r)},f.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},f.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},f.prototype.get_code=function(o){this.trim(!0);var r=this.current_line.pop();r&&(r[r.length-1]===`
|
|
`&&(r=r.replace(/\n+$/g,"")),this.current_line.push(r)),this._end_with_newline&&this.__add_outputline();var a=this.__lines.join(`
|
|
`);return o!==`
|
|
`&&(a=a.replace(/[\n]/g,o)),a},f.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},f.prototype.set_indent=function(o,r){return o=o||0,r=r||0,this.next_line.set_indent(o,r),this.__lines.length>1?(this.current_line.set_indent(o,r),!0):(this.current_line.set_indent(),!1)},f.prototype.add_raw_token=function(o){for(var r=0;r<o.newlines;r++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(o.whitespace_before),this.current_line.push(o.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},f.prototype.add_token=function(o){this.__add_space_before_token(),this.current_line.push(o),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},f.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(" "))},f.prototype.remove_indent=function(o){for(var r=this.__lines.length;o<r;)this.__lines[o]._remove_indent(),o++;this.current_line._remove_wrap_indent()},f.prototype.trim=function(o){for(o=o===void 0?!1:o,this.current_line.trim();o&&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},f.prototype.just_added_newline=function(){return this.current_line.is_empty()},f.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},f.prototype.ensure_empty_line_above=function(o,r){for(var a=this.__lines.length-2;a>=0;){var h=this.__lines[a];if(h.is_empty())break;if(h.item(0).indexOf(o)!==0&&h.item(-1)!==r){this.__lines.splice(a+1,0,new C(this)),this.previous_line=this.__lines[this.__lines.length-2];break}a--}},e.exports.Output=f},,,,function(e){function C(o,r){this.raw_options=g(o,r),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"])}C.prototype._get_array=function(o,r){var a=this.raw_options[o],h=r||[];return typeof a=="object"?a!==null&&typeof a.concat=="function"&&(h=a.concat()):typeof a=="string"&&(h=a.split(/[^a-zA-Z0-9_\/\-]+/)),h},C.prototype._get_boolean=function(o,r){var a=this.raw_options[o],h=a===void 0?!!r:!!a;return h},C.prototype._get_characters=function(o,r){var a=this.raw_options[o],h=r||"";return typeof a=="string"&&(h=a.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),h},C.prototype._get_number=function(o,r){var a=this.raw_options[o];r=parseInt(r,10),isNaN(r)&&(r=0);var h=parseInt(a,10);return isNaN(h)&&(h=r),h},C.prototype._get_selection=function(o,r,a){var h=this._get_selection_list(o,r,a);if(h.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values:
|
|
`+r+`
|
|
You passed in: '`+this.raw_options[o]+"'");return h[0]},C.prototype._get_selection_list=function(o,r,a){if(!r||r.length===0)throw new Error("Selection list cannot be empty.");if(a=a||[r[0]],!this._is_valid_selection(a,r))throw new Error("Invalid Default Value!");var h=this._get_array(o,a);if(!this._is_valid_selection(h,r))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values:
|
|
`+r+`
|
|
You passed in: '`+this.raw_options[o]+"'");return h},C.prototype._is_valid_selection=function(o,r){return o.length&&r.length&&!o.some(function(a){return r.indexOf(a)===-1})};function g(o,r){var a={};o=f(o);var h;for(h in o)h!==r&&(a[h]=o[h]);if(r&&o[r])for(h in o[r])a[h]=o[r][h];return a}function f(o){var r={},a;for(a in o){var h=a.replace(/-/g,"_");r[h]=o[a]}return r}e.exports.Options=C,e.exports.normalizeOpts=f,e.exports.mergeOpts=g},,function(e){var C=RegExp.prototype.hasOwnProperty("sticky");function g(f){this.__input=f||"",this.__input_length=this.__input.length,this.__position=0}g.prototype.restart=function(){this.__position=0},g.prototype.back=function(){this.__position>0&&(this.__position-=1)},g.prototype.hasNext=function(){return this.__position<this.__input_length},g.prototype.next=function(){var f=null;return this.hasNext()&&(f=this.__input.charAt(this.__position),this.__position+=1),f},g.prototype.peek=function(f){var o=null;return f=f||0,f+=this.__position,f>=0&&f<this.__input_length&&(o=this.__input.charAt(f)),o},g.prototype.__match=function(f,o){f.lastIndex=o;var r=f.exec(this.__input);return r&&!(C&&f.sticky)&&(r.index!==o&&(r=null)),r},g.prototype.test=function(f,o){return o=o||0,o+=this.__position,o>=0&&o<this.__input_length?!!this.__match(f,o):!1},g.prototype.testChar=function(f,o){var r=this.peek(o);return f.lastIndex=0,r!==null&&f.test(r)},g.prototype.match=function(f){var o=this.__match(f,this.__position);return o?this.__position+=o[0].length:o=null,o},g.prototype.read=function(f,o,r){var a="",h;return f&&(h=this.match(f),h&&(a+=h[0])),o&&(h||!f)&&(a+=this.readUntil(o,r)),a},g.prototype.readUntil=function(f,o){var r="",a=this.__position;f.lastIndex=this.__position;var h=f.exec(this.__input);return h?(a=h.index,o&&(a+=h[0].length)):a=this.__input_length,r=this.__input.substring(this.__position,a),this.__position=a,r},g.prototype.readUntilAfter=function(f){return this.readUntil(f,!0)},g.prototype.get_regexp=function(f,o){var r=null,a="g";return o&&C&&(a="y"),typeof f=="string"&&f!==""?r=new RegExp(f,a):f&&(r=new RegExp(f.source,a)),r},g.prototype.get_literal_regexp=function(f){return RegExp(f.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},g.prototype.peekUntilAfter=function(f){var o=this.__position,r=this.readUntilAfter(f);return this.__position=o,r},g.prototype.lookBack=function(f){var o=this.__position-1;return o>=f.length&&this.__input.substring(o-f.length,o).toLowerCase()===f},e.exports.InputScanner=g},,,,,function(e){function C(g,f){g=typeof g=="string"?g:g.source,f=typeof f=="string"?f:f.source,this.__directives_block_pattern=new RegExp(g+/ beautify( \w+[:]\w+)+ /.source+f,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(g+/\sbeautify\signore:end\s/.source+f,"g")}C.prototype.get_directives=function(g){if(!g.match(this.__directives_block_pattern))return null;var f={};this.__directive_pattern.lastIndex=0;for(var o=this.__directive_pattern.exec(g);o;)f[o[1]]=o[2],o=this.__directive_pattern.exec(g);return f},C.prototype.readIgnored=function(g){return g.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=C},,function(e,C,g){var f=g(16).Beautifier,o=g(17).Options;function r(a,h){var s=new f(a,h);return s.beautify()}e.exports=r,e.exports.defaultOptions=function(){return new o}},function(e,C,g){var f=g(17).Options,o=g(2).Output,r=g(8).InputScanner,a=g(13).Directives,h=new a(/\/\*/,/\*\//),s=/\r\n|[\r\n]/,i=/\r\n|[\r\n]/g,n=/\s/,t=/(?:\s|\n)+/g,b=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,v=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function E(w,x){this._source_text=w||"",this._options=new f(x),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}E.prototype.eatString=function(w){var x="";for(this._ch=this._input.next();this._ch;){if(x+=this._ch,this._ch==="\\")x+=this._input.next();else if(w.indexOf(this._ch)!==-1||this._ch===`
|
|
`)break;this._ch=this._input.next()}return x},E.prototype.eatWhitespace=function(w){for(var x=n.test(this._input.peek()),_=0;n.test(this._input.peek());)this._ch=this._input.next(),w&&this._ch===`
|
|
`&&((_===0||_<this._options.max_preserve_newlines)&&(_++,this._output.add_new_line(!0)));return x},E.prototype.foundNestedPseudoClass=function(){for(var w=0,x=1,_=this._input.peek(x);_;){if(_==="{")return!0;if(_==="(")w+=1;else if(_===")"){if(w===0)return!1;w-=1}else if(_===";"||_==="}")return!1;x++,_=this._input.peek(x)}return!1},E.prototype.print_string=function(w){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(w)},E.prototype.preserveSingleSpace=function(w){w&&(this._output.space_before_token=!0)},E.prototype.indent=function(){this._indentLevel++},E.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},E.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var w=this._source_text,x=this._options.eol;x==="auto"&&(x=`
|
|
`,w&&s.test(w||"")&&(x=w.match(s)[0])),w=w.replace(i,`
|
|
`);var _=w.match(/^[\t ]*/)[0];this._output=new o(this._options,_),this._input=new r(w),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var p=0,u=!1,l=!1,m=!1,c=!1,T=!1,N=!1,D=this._ch,y=!1,O,k,R;O=this._input.read(t),k=O!=="",R=D,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),D=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var B=this._input.read(b),V=h.get_directives(B);V&&V.ignore==="start"&&(B+=h.readIgnored(this._input)),this.print_string(B),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(v)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(k),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var ee=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ee.match(/[ :]$/)&&(ee=this.eatString(": ").replace(/\s$/,""),this.print_string(ee),this._output.space_before_token=!0),ee=ee.replace(/\s$/,""),ee==="extend"?c=!0:ee==="import"&&(T=!0),ee in this.NESTED_AT_RULE?(this._nestedLevel+=1,ee in this.CONDITIONAL_GROUP_RULE&&(m=!0)):!u&&p===0&&ee.indexOf(":")!==-1&&(l=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(k),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")l&&(l=!1,this.outdent()),m?(m=!1,u=this._indentLevel>=this._nestedLevel):u=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&u&&(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)):(R==="("?this._output.space_before_token=!1:R!==","&&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(),R==="{"&&this._output.trim(!0),T=!1,c=!1,l&&(this.outdent(),l=!1),this.print_string(this._ch),u=!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 re=0;re<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;re++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[re])){y=!0;break}(u||m)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!c&&p===0?(this.print_string(":"),l||(l=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var _e=R==='"'||R==="'";this.preserveSingleSpace(_e||k),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")y=!1,p===0?(l&&(this.outdent(),l=!1),c=!1,T=!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(),p++,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(")")),p&&(p--,this.outdent()));else{var se=!1;this._input.lookBack("with")&&(se=!0),this.preserveSingleSpace(k||se),this.print_string(this._ch),l&&R==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),N=!0):(this.eatWhitespace(),p++,this.indent())}else if(this._ch===")")p&&(p--,this.outdent()),N&&this._input.peek()===";"&&this._options.selector_separator_newline&&(N=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!l||N)&&p===0&&!T&&!c?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!l&&p===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&n.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(k),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),n.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var ye=R==='"'||R==="'";this.preserveSingleSpace(ye||k),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
`&&y&&this._output.add_new_line()}var ve=this._output.get_code(x);return ve},e.exports.Beautifier=E},function(e,C,g){var f=g(6).Options;function o(r){f.call(this,r,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var a=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||a;var h=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var s=0;s<h.length;s++)h[s]!=="expand"?this.brace_style="collapse":this.brace_style=h[s]}o.prototype=new f,e.exports.Options=o}],I={};function H(e){var C=I[e];if(C!==void 0)return C.exports;var g=I[e]={exports:{}};return A[e](g,g.exports,H),g.exports}var P=H(15);M=P})();var z=M;!(ce=[],W=function(){return{css_beautify:z}}.apply(he,ce),W!==void 0&&(Pe.exports=W))})()},Vhoy:function(Pe,he,j){"use strict";j.d(he,"d",function(){return z}),j.d(he,"e",function(){return A}),j.d(he,"c",function(){return I}),j.d(he,"b",function(){return H}),j.d(he,"a",function(){return P});var ce=j("MI8n");class W{constructor(){this._icons=new Map,this._onDidRegister=new ce.b}add(e){const C=this._icons.get(e.id);C?e.description?C.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 M=new W,z=M;function A(e,C){return new H(e,C)}function I(e){return e?e.replace(/\$\((.*?)\)/g,(C,g)=>` ${g} `).trim():""}class H{constructor(e,C,g){this.id=e,this.definition=C,this.description=g,M.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var P;(function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9\\-]+",e.iconModifierExpression="~[A-Za-z]+";const C=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function g(r){if(r instanceof H)return["codicon","codicon-"+r.id];const a=C.exec(r.id);if(!a)return g(H.error);let[,h,s]=a;const i=["codicon","codicon-"+h];return s&&i.push("codicon-modifier-"+s.substr(1)),i}e.asClassNameArray=g;function f(r){return g(r).join(" ")}e.asClassName=f;function o(r){return"."+g(r).join(".")}e.asCSSSelector=o})(P||(P={})),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"})}(H||(H={}))},Y1PL:function(Pe,he,j){"use strict";j.r(he),j.d(he,"ResizableTextArea",function(){return ee});var ce=j("wx14"),W=j("1OyB"),M=j("vuIU"),z=j("Ji7U"),A=j("LK+K"),I=j("q1tI"),H=j("VTBJ"),P=j("rePB"),e=j("Zm9Q"),C=j("Kwbf"),g=j("c+Xe"),f=j("m+aA"),o=j("bdgK"),r=new Map;function a(se){se.forEach(function(ye){var ve,Ee=ye.target;(ve=r.get(Ee))===null||ve===void 0||ve.forEach(function(le){return le(Ee)})})}var h=new o.default(a),s=null,i=null;function n(se,ye){r.has(se)||(r.set(se,new Set),h.observe(se)),r.get(se).add(ye)}function t(se,ye){r.has(se)&&(r.get(se).delete(ye),r.get(se).size||(h.unobserve(se),r.delete(se)))}var b=function(se){Object(z.a)(ve,se);var ye=Object(A.a)(ve);function ve(){return Object(W.a)(this,ve),ye.apply(this,arguments)}return Object(M.a)(ve,[{key:"render",value:function(){return this.props.children}}]),ve}(I.Component),v=I.createContext(null);function E(se){var ye=se.children,ve=se.onBatchResize,Ee=I.useRef(0),le=I.useRef([]),F=I.useContext(v),d=I.useCallback(function(S,L,G){Ee.current+=1;var U=Ee.current;le.current.push({size:S,element:L,data:G}),Promise.resolve().then(function(){U===Ee.current&&(ve==null||ve(le.current),le.current=[])}),F==null||F(S,L,G)},[ve,F]);return I.createElement(v.Provider,{value:d},ye)}function w(se){var ye=se.children,ve=se.disabled,Ee=I.useRef(null),le=I.useRef(null),F=I.useContext(v),d=I.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),S=I.isValidElement(ye)&&Object(g.c)(ye),L=S?ye.ref:null,G=I.useMemo(function(){return Object(g.a)(L,Ee)},[L,Ee]),U=I.useRef(se);U.current=se;var $=I.useCallback(function(de){var xe=U.current,q=xe.onResize,ae=xe.data,fe=de.getBoundingClientRect(),pe=fe.width,Ce=fe.height,Me=de.offsetWidth,He=de.offsetHeight,je=Math.floor(pe),Ye=Math.floor(Ce);if(d.current.width!==je||d.current.height!==Ye||d.current.offsetWidth!==Me||d.current.offsetHeight!==He){var Xe={width:je,height:Ye,offsetWidth:Me,offsetHeight:He};d.current=Xe;var ze=Me===Math.round(pe)?pe:Me,Fe=He===Math.round(Ce)?Ce:He,et=Object(H.a)(Object(H.a)({},Xe),{},{offsetWidth:ze,offsetHeight:Fe});F==null||F(et,de,ae),q&&Promise.resolve().then(function(){q(et,de)})}},[]);return I.useEffect(function(){var de=Object(f.a)(Ee.current)||Object(f.a)(le.current);return de&&!ve&&n(de,$),function(){return t(de,$)}},[Ee.current,ve]),I.createElement(b,{ref:le},S?I.cloneElement(ye,{ref:G}):ye)}var x="rc-observer-key";function _(se){var ye=se.children,ve=Object(e.a)(ye);return ve.map(function(Ee,le){var F=(Ee==null?void 0:Ee.key)||"".concat(x,"-").concat(le);return I.createElement(w,Object(ce.a)({},se,{key:F}),Ee)})}_.Collection=E;var p=_,u=j("bT9E"),l=j("TSYQ"),m=j.n(l),c=`
|
|
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
|
|
`,T=["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"],N={},D;function y(se){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ve=se.getAttribute("id")||se.getAttribute("data-reactid")||se.getAttribute("name");if(ye&&N[ve])return N[ve];var Ee=window.getComputedStyle(se),le=Ee.getPropertyValue("box-sizing")||Ee.getPropertyValue("-moz-box-sizing")||Ee.getPropertyValue("-webkit-box-sizing"),F=parseFloat(Ee.getPropertyValue("padding-bottom"))+parseFloat(Ee.getPropertyValue("padding-top")),d=parseFloat(Ee.getPropertyValue("border-bottom-width"))+parseFloat(Ee.getPropertyValue("border-top-width")),S=T.map(function(G){return"".concat(G,":").concat(Ee.getPropertyValue(G))}).join(";"),L={sizingStyle:S,paddingSize:F,borderSize:d,boxSizing:le};return ye&&ve&&(N[ve]=L),L}function O(se){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ee=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;D||(D=document.createElement("textarea"),D.setAttribute("tab-index","-1"),D.setAttribute("aria-hidden","true"),document.body.appendChild(D)),se.getAttribute("wrap")?D.setAttribute("wrap",se.getAttribute("wrap")):D.removeAttribute("wrap");var le=y(se,ye),F=le.paddingSize,d=le.borderSize,S=le.boxSizing,L=le.sizingStyle;D.setAttribute("style","".concat(L,";").concat(c)),D.value=se.value||se.placeholder||"";var G=Number.MIN_SAFE_INTEGER,U=Number.MAX_SAFE_INTEGER,$=D.scrollHeight,de;if(S==="border-box"?$+=d:S==="content-box"&&($-=F),ve!==null||Ee!==null){D.value=" ";var xe=D.scrollHeight-F;ve!==null&&(G=xe*ve,S==="border-box"&&(G=G+F+d),$=Math.max(G,$)),Ee!==null&&(U=xe*Ee,S==="border-box"&&(U=U+F+d),de=$>U?"":"hidden",$=Math.min(U,$))}return{height:$,minHeight:G,maxHeight:U,overflowY:de,resize:"none"}}var k=j("Gytx"),R=j.n(k),B;(function(se){se[se.NONE=0]="NONE",se[se.RESIZING=1]="RESIZING",se[se.RESIZED=2]="RESIZED"})(B||(B={}));var V=function(se){Object(z.a)(ve,se);var ye=Object(A.a)(ve);function ve(Ee){var le;return Object(W.a)(this,ve),le=ye.call(this,Ee),le.nextFrameActionId=void 0,le.resizeFrameId=void 0,le.textArea=void 0,le.saveTextArea=function(F){le.textArea=F},le.handleResize=function(F){var d=le.state.resizeStatus,S=le.props,L=S.autoSize,G=S.onResize;if(d!==B.NONE)return;typeof G=="function"&&G(F),L&&le.resizeOnNextFrame()},le.resizeOnNextFrame=function(){cancelAnimationFrame(le.nextFrameActionId),le.nextFrameActionId=requestAnimationFrame(le.resizeTextarea)},le.resizeTextarea=function(){var F=le.props.autoSize;if(!F||!le.textArea)return;var d=F.minRows,S=F.maxRows,L=O(le.textArea,!1,d,S);le.setState({textareaStyles:L,resizeStatus:B.RESIZING},function(){cancelAnimationFrame(le.resizeFrameId),le.resizeFrameId=requestAnimationFrame(function(){le.setState({resizeStatus:B.RESIZED},function(){le.resizeFrameId=requestAnimationFrame(function(){le.setState({resizeStatus:B.NONE}),le.fixFirefoxAutoScroll()})})})})},le.renderTextArea=function(){var F=le.props,d=F.prefixCls,S=d===void 0?"rc-textarea":d,L=F.autoSize,G=F.onResize,U=F.className,$=F.disabled,de=le.state,xe=de.textareaStyles,q=de.resizeStatus,ae=Object(u.a)(le.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),fe=m()(S,U,Object(P.a)({},"".concat(S,"-disabled"),$));"value"in ae&&(ae.value=ae.value||"");var pe=Object(H.a)(Object(H.a)(Object(H.a)({},le.props.style),xe),q===B.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return I.createElement(p,{onResize:le.handleResize,disabled:!(L||G)},I.createElement("textarea",Object(ce.a)({},ae,{className:fe,style:pe,ref:le.saveTextArea})))},le.state={textareaStyles:{},resizeStatus:B.NONE},le}return Object(M.a)(ve,[{key:"componentDidUpdate",value:function(le){(le.value!==this.props.value||!R()(le.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var le=this.textArea.selectionStart,F=this.textArea.selectionEnd;this.textArea.setSelectionRange(le,F)}}catch(d){}}},{key:"render",value:function(){return this.renderTextArea()}}]),ve}(I.Component),ee=V,re=function(se){Object(z.a)(ve,se);var ye=Object(A.a)(ve);function ve(Ee){var le;Object(W.a)(this,ve),le=ye.call(this,Ee),le.resizableTextArea=void 0,le.focus=function(){le.resizableTextArea.textArea.focus()},le.saveTextArea=function(d){le.resizableTextArea=d},le.handleChange=function(d){var S=le.props.onChange;le.setValue(d.target.value,function(){le.resizableTextArea.resizeTextarea()}),S&&S(d)},le.handleKeyDown=function(d){var S=le.props,L=S.onPressEnter,G=S.onKeyDown;d.keyCode===13&&L&&L(d),G&&G(d)};var F=typeof Ee.value=="undefined"||Ee.value===null?Ee.defaultValue:Ee.value;return le.state={value:F},le}return Object(M.a)(ve,[{key:"setValue",value:function(le,F){"value"in this.props||this.setState({value:le},F)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return I.createElement(ee,Object(ce.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(le){return"value"in le?{value:le.value}:null}}]),ve}(I.Component),_e=he.default=re},ZJlW:function(Pe,he,j){Pe.exports={flex_box_center:"flex_box_center___XZ1Hd",flex_space_between:"flex_space_between___2oG4i",flex_box_vertical_center:"flex_box_vertical_center___1UWtb",flex_box_center_end:"flex_box_center_end___1o2xT",flex_box_column:"flex_box_column___SlAE0",list:"list___1HvWe",wrap:"wrap___10sri",lockWrap:"lockWrap___2djiu",li:"li___2W_zn",cover:"cover___2FS3L",img:"img___cyxrw",sign:"sign___1cxDK",name:"name___3tYlu",e:"e___1-orw",unit:"unit___ycOgg",tags:"tags___2FRpJ",tag:"tag___1e0XO"}},ZW9T:function(Pe,he,j){"use strict";j.d(he,"a",function(){return k});var ce=j("k1fw"),W=j("oBTY"),M=j("miYZ"),z=j("tsqr"),A=j("rAM+"),I=j("tJVT"),H=j("PpiC"),P=j("q1tI"),e=j.n(P),C=j("bdgK"),g=j("9og8"),f=j("WmNS"),o=j.n(f),r={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"]},a={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(`
|
|
`)}]},s={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
`)}]},i=j("5VLF"),n=j.n(i),t={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},b=function(B,V){return V.map(function(ee){return{label:ee,kind:B.languages.CompletionItemKind.Keyword,insertText:ee}})},v=function(B){return Object.keys(t.tables).map(function(V){return{label:V,kind:B.languages.CompletionItemKind.Variable,insertText:V}})},E=function(B,V){var ee=t.tables[B];return ee?ee.map(function(re){return{label:re,kind:V.languages.CompletionItemKind.Field,insertText:re}}):[]};function w(R,B,V,ee,re){var _e=B.getWordUntilPosition(V),se={startLineNumber:V.lineNumber,endLineNumber:V.lineNumber,startColumn:_e.startColumn,endColumn:_e.endColumn},ye=ee.map(function(ve){return{label:ve,kind:R.languages.CompletionItemKind.Keyword,insertText:ve,insertTextRules:R.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:se}});return re.map(function(ve){ye.push(Object(ce.a)(Object(ce.a)({},ve),{},{range:se}))}),ye}var x=function(R){t.languages.map(function(re){return R.languages.registerDocumentFormattingEditProvider(re,{provideDocumentFormattingEdits:function(se,ye,ve){return Object(g.a)(o.a.mark(function Ee(){var le;return o.a.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return le=n()(se.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),d.abrupt("return",[{range:se.getFullModelRange(),text:le}]);case 2:case"end":return d.stop()}},Ee)}))()}}),re});var B=h.quickKey.map(function(re){return{label:re.label,kind:R.languages.CompletionItemKind.Method,insertText:re.content,insertTextRules:R.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),V=s.quickKey.map(function(re){return{label:re.label,kind:R.languages.CompletionItemKind.Method,insertText:re.content,insertTextRules:R.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),ee=a.quickKey.map(function(re){return{label:re.label,kind:R.languages.CompletionItemKind.Method,insertText:re.content,insertTextRules:R.languages.CompletionItemInsertTextRule.InsertAsSnippet}});R.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(_e,se){var ye=_e.getWordUntilPosition(se),ve={startLineNumber:se.lineNumber,endLineNumber:se.lineNumber,startColumn:ye.startColumn,endColumn:ye.endColumn},Ee=_e.getLineContent(se.lineNumber).substring(ye.startColumn-2,ye.endColumn);return{suggestions:[].concat(Object(W.a)(h.keywords.map(function(le){return{label:le,kind:R.languages.CompletionItemKind.Function,documentation:le,insertText:le,insertTextRules:R.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ve}})),Object(W.a)(h.quickKey.map(function(le){return{label:le.label,kind:R.languages.CompletionItemKind.Function,documentation:le.content,insertText:Ee.startsWith("#")?le.content.replace(/#/,""):le.content,insertTextRules:R.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ve}})))}}}),R.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(_e,se){var ye=_e.getWordUntilPosition(se),ve={startLineNumber:se.lineNumber,endLineNumber:se.lineNumber,startColumn:ye.startColumn,endColumn:ye.endColumn};return{suggestions:Object(W.a)(r.keywords.map(function(Ee){return{label:Ee,kind:R.languages.CompletionItemKind.Function,documentation:Ee,insertText:Ee,insertTextRules:R.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ve}}))}}}),R.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(_e,se){var ye=_e.getWordUntilPosition(se),ve={startLineNumber:se.lineNumber,endLineNumber:se.lineNumber,startColumn:ye.startColumn,endColumn:ye.endColumn},Ee=_e.getLineContent(se.lineNumber).substring(ye.startColumn-2,ye.endColumn);return{suggestions:[].concat(Object(W.a)(a.keywords.map(function(le){return{label:le,kind:R.languages.CompletionItemKind.Function,documentation:le,insertText:le,insertTextRules:R.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ve}})),Object(W.a)(a.quickKey.map(function(le){return{label:le.label,kind:R.languages.CompletionItemKind.Function,documentation:le.content,insertText:Ee.startsWith("#")?le.content.replace(/#/,""):le.content,insertTextRules:R.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ve}})))}}}),R.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(_e,se){var ye=_e.getWordUntilPosition(se),ve={startLineNumber:se.lineNumber,endLineNumber:se.lineNumber,startColumn:ye.startColumn,endColumn:ye.endColumn},Ee=_e.getLineContent(se.lineNumber).substring(ye.startColumn-2,ye.endColumn);return{suggestions:[].concat(Object(W.a)(s.keywords.map(function(le){return{label:le,kind:R.languages.CompletionItemKind.Function,documentation:le,insertText:le,insertTextRules:R.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ve}})),Object(W.a)(s.quickKey.map(function(le){return{label:le.label,kind:R.languages.CompletionItemKind.Function,documentation:le.content,insertText:Ee.startsWith("#")?le.content.replace(/#/,""):le.content,insertTextRules:R.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ve}})))}}})},_="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",p=j("fjLI"),u=j("LvDl"),l=j("+ua5");function m(R){return/^\d+$/.test(R)?"".concat(R,"px"):R}function c(){}var T=!1,N={"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 D(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],B=R;if(Array.isArray(R)){for(var V=0;V<R.length;V++){var ee=N[R[V]];if(ee)return ee}return B[0]}return N[B]||B}var y=null,O=he.b=function(R){var B=R.width,V=B===void 0?"100%":B,ee=R.height,re=ee===void 0?"100%":ee,_e=R.value,se=R.language,ye=se===void 0?"javascript":se,ve=R.style,Ee=ve===void 0?{}:ve,le=R.options,F=le===void 0?{}:le,d=R.overrideServices,S=d===void 0?{}:d,L=R.theme,G=L===void 0?"vs-dark":L,U=R.onEditBlur,$=R.onSave,de=R.autoHeight,xe=de===void 0?!1:de,q=R.forbidCopy,ae=q===void 0?!1:q,fe=R.onChange,pe=fe===void 0?c:fe,Ce=R.editorDidMount,Me=Ce===void 0?c:Ce,He=R.onFocus,je=He===void 0?c:He,Ye=R.filename,Xe=Ye===void 0?"educoder.txt":Ye,ze=R.errorLine,Fe=R.errorContent,et=Fe===void 0?"":Fe,st=Object(H.a)(R,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),te=Object(P.useRef)(),Y=Object(P.useRef)({}),X=Object(P.useRef)(),Z=Object(P.useRef)(),ne=Object(P.useRef)(!1),J=Object(P.useRef)(),Q=Object(P.useState)(!1),ie=Object(I.a)(Q,2),oe=ie[0],be=ie[1];function Te(){var tt;return te.current&&(tt=new C.default(function(nt){var Se=Object(A.a)(nt),it;try{for(Se.s();!(it=Se.n()).done;){var ct=it.value;(ct.target.offsetHeight>0||ct.target.offsetWidth>0)&&Y.current.instance.layout()}}catch(ft){Se.e(ft)}finally{Se.f()}}),tt.observe(te.current)),tt}function Ie(){z.b.warn(decodeURIComponent(_))}var Je=function(){var nt=Y.current.instance;if(_e!=null&&nt&&oe){var Se=nt.getModel();Se&&_e!==Se.getValue()&&(T=!0,Se.setValue(_e),nt.layout(),T=!1)}};Object(P.useEffect)(function(){Z.current&&clearTimeout(Z.current),Z.current=setTimeout(function(){Je()},500)},[_e,oe,Y.current]),Object(P.useEffect)(function(){if(ze&&Y.current&&Y.current.instance){var tt=Y.current.instance;tt.changeViewZones(function(Se){var it=document.createElement("div");it.style.padding="10px 20px",it.style.width="calc(100% - 20px)",it.className="my-error-line-wrp",it.innerHTML=et,Se.addZone({afterLineNumber:ze||11,heightInLines:3,domNode:it})});var nt={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}};tt.addOverlayWidget(nt),tt.revealPositionInCenter({lineNumber:20,column:1})}},[ze,Y.current,oe]);function ht(){var tt=Y.current.instance;if(tt){var nt=tt.getSelection(),Se=Y.current.pastePos||{},it=new y.Range(Se.startLineNumber||nt.endLineNumber,Se.startColumn||nt.endColumn,Se.endLineNumber||nt.endLineNumber,Se.endColumn||nt.endColumn);setTimeout(function(){tt.executeEdits("",[{range:it,text:""}])},300)}}function lt(tt){(window.navigator.platform.match("Mac")?tt.metaKey:tt.ctrlKey)&&tt.keyCode==83&&(tt.preventDefault(),$())}var Rt=function(){if(xe&&Y.current.instance){var nt=Y.current.instance.getContentHeight();Qt(nt<re?re:nt)}else Qt(re)};function vt(tt){var nt=document.createEvent("MouseEvents");nt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),tt.dispatchEvent(nt)}function ut(tt,nt){var Se=window.URL||window.webkitURL||window,it=new Blob([nt]),ct=document.createElementNS("http://www.w3.org/1999/xhtml","a");ct.href=Se.createObjectURL(it),ct.download=tt,vt(ct)}Object(P.useEffect)(function(){Rt()},[Rt]),Object(P.useEffect)(function(){te.current&&!oe&&Promise.all([j.e(17),j.e(29)]).then(j.t.bind(null,"M/lh",7)).then(function(tt){try{y=tt,Y.current.instance=y.editor.create(te.current,{value:_e,language:D(ye),theme:G,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},S);var nt=Y.current.instance,Se=p.d._menuItems,it=Object(W.a)(Se).find(function(ot){return ot[0]._debugName=="EditorContext"}),ct=it[1],ft=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],pt=function(Ze,St){var dt=Ze._first;do{var Mt,Et,Bt=St.includes((Mt=dt.element)===null||Mt===void 0||((Et=Mt.command)===null||Et===void 0)?void 0:Et.id);Bt&&Ze._remove(dt)}while(dt=dt.next)};if(Me(nt,y),setTimeout(function(){Rt(),Y.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){ut(Xe||"educoder.txt",nt.getValue())}}),nt.getDomNode().addEventListener("input",function(){X.current.autoFormat&&nt.getAction("editor.action.formatDocument").run()})},500),Y.current.subscription=nt.onDidChangeModelContent(function(ot){ne.current?clearTimeout(J.current):(Rt(),pe(nt.getValue(),ot)),J.current=setTimeout(function(){ne.current=!1},500)}),window.Monaco||x(y,D(ye)),ae&&(pt(ct,ft),te.current.classList.add("noCopyPaste"),nt.onKeyDown(function(ot){var Ze=ot.keyCode,St=ot.ctrlKey,dt=ot.metaKey;(Ze===33||Ze===52)&&(dt||St)&&(Ie(),ot.preventDefault())})),window.Monaco=y,U&&nt.onDidBlurEditorWidget(function(){U(nt.getValue())}),je&&nt.onDidFocusEditorText(function(){je(nt.getValue())}),ae){nt.addCommand(y.KeyMod.CtrlCmd|y.KeyCode.KEY_V,function(){return Ie(),null}),nt.onDidPaste(function(ot){Y.current.pastePos=ot});try{window.addEventListener("paste",ht)}catch(ot){}}var qe=Te();return be(!0),function(){var ot=Y.current.instance;ot.dispose();var Ze=ot.getModel();Ze&&Ze.dispose(),Y.current.subscription&&Y.current.subscription.dispose(),ae&&window.removeEventListener("paste",ht),qe.unobserve(te.current)}}catch(ot){}})},[]),Object(P.useEffect)(function(){var tt=Y.current.instance;if(tt&&oe)return document.addEventListener("keydown",lt,!1),function(){document.removeEventListener("keydown",lt)}},[$,oe]),Object(P.useEffect)(function(){var tt=Y.current.instance;if(tt&&oe){var nt=D(ye);y.editor.setModelLanguage(tt.getModel(),nt),console.log("language:",ye,tt.getModel(),nt)}},[ye,oe]),Object(P.useEffect)(function(){var tt=Y.current.instance;tt&&oe&&y.editor.setTheme(G)},[G,oe]),Object(P.useEffect)(function(){var tt=Y.current.instance;X.current=F,tt&&oe&&(tt.updateOptions(Object(ce.a)({},F)),setTimeout(function(){tt.getModel().updateOptions(Object(ce.a)({},F))},200))},[JSON.stringify(F),oe]),Object(P.useEffect)(function(){var tt=Y.current.instance;tt&&oe&&tt.layout()},[V,re,oe]);var Ht=Object(P.useState)(m(V)),Pt=Object(I.a)(Ht,2),Ut=Pt[0],Kt=Pt[1],It=Object(P.useState)(m(re)),mn=Object(I.a)(It,2),Bn=mn[0],Qt=mn[1],Ve=Object(ce.a)(Object(ce.a)({},Ee),{},{width:Ut,height:Bn});return e.a.createElement("div",{className:"my-monaco-editor",ref:te,style:Ve})};function k(R){var B=R.width,V=B===void 0?"100%":B,ee=R.height,re=ee===void 0?"100%":ee,_e=R.original,se=R.modified,ye=R.language,ve=R.options,Ee=ve===void 0?{}:ve,le=Object(P.useRef)(),F=Object(P.useState)(null),d=Object(I.a)(F,2),S=d[0],L=d[1];function G(xe){var q;return le.current&&(q=new C.default(function(ae){var fe=Object(A.a)(ae),pe;try{for(fe.s();!(pe=fe.n()).done;){var Ce=pe.value;(Ce.target.offsetHeight>0||Ce.target.offsetWidth>0)&&xe.layout()}}catch(Me){fe.e(Me)}finally{fe.f()}}),q.observe(le.current)),q}Object(P.useEffect)(function(){le.current&&Promise.all([j.e(17),j.e(29)]).then(j.t.bind(null,"M/lh",7)).then(function(xe){y=xe;var q=y.editor.createDiffEditor(le.current,Object(ce.a)(Object(ce.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},Ee),{},{wordWrap:!0}));L(q);var ae=G(q);return function(){q.dispose();var fe=q.getModel();fe&&fe.dispose(),ae.unobserve(le.current)}})},[]),Object(P.useEffect)(function(){S&&S.setModel({original:y.editor.createModel(_e,ye),modified:y.editor.createModel(se,ye)})},[_e,se,ye,S]);var U=m(V),$=m(re),de={width:U,height:$};return e.a.createElement("div",{className:"my-diff-editor",ref:le,style:de})}},Zss7:function(Pe,he,j){var ce;(function(W){var M=/^\s+/,z=/\s+$/,A=0,I=W.round,H=W.min,P=W.max,e=W.random;function C(d,S){if(d=d||"",S=S||{},d instanceof C)return d;if(!(this instanceof C))return new C(d,S);var L=g(d);this._originalInput=d,this._r=L.r,this._g=L.g,this._b=L.b,this._a=L.a,this._roundA=I(100*this._a)/100,this._format=S.format||L.format,this._gradientType=S.gradientType,this._r<1&&(this._r=I(this._r)),this._g<1&&(this._g=I(this._g)),this._b<1&&(this._b=I(this._b)),this._ok=L.ok,this._tc_id=A++}C.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var d=this.toRgb();return(d.r*299+d.g*587+d.b*114)/1e3},getLuminance:function(){var d=this.toRgb(),S,L,G,U,$,de;return S=d.r/255,L=d.g/255,G=d.b/255,S<=.03928?U=S/12.92:U=W.pow((S+.055)/1.055,2.4),L<=.03928?$=L/12.92:$=W.pow((L+.055)/1.055,2.4),G<=.03928?de=G/12.92:de=W.pow((G+.055)/1.055,2.4),.2126*U+.7152*$+.0722*de},setAlpha:function(d){return this._a=O(d),this._roundA=I(100*this._a)/100,this},toHsv:function(){var d=a(this._r,this._g,this._b);return{h:d.h*360,s:d.s,v:d.v,a:this._a}},toHsvString:function(){var d=a(this._r,this._g,this._b),S=I(d.h*360),L=I(d.s*100),G=I(d.v*100);return this._a==1?"hsv("+S+", "+L+"%, "+G+"%)":"hsva("+S+", "+L+"%, "+G+"%, "+this._roundA+")"},toHsl:function(){var d=o(this._r,this._g,this._b);return{h:d.h*360,s:d.s,l:d.l,a:this._a}},toHslString:function(){var d=o(this._r,this._g,this._b),S=I(d.h*360),L=I(d.s*100),G=I(d.l*100);return this._a==1?"hsl("+S+", "+L+"%, "+G+"%)":"hsla("+S+", "+L+"%, "+G+"%, "+this._roundA+")"},toHex:function(d){return s(this._r,this._g,this._b,d)},toHexString:function(d){return"#"+this.toHex(d)},toHex8:function(d){return i(this._r,this._g,this._b,this._a,d)},toHex8String:function(d){return"#"+this.toHex8(d)},toRgb:function(){return{r:I(this._r),g:I(this._g),b:I(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+I(this._r)+", "+I(this._g)+", "+I(this._b)+")":"rgba("+I(this._r)+", "+I(this._g)+", "+I(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:I(k(this._r,255)*100)+"%",g:I(k(this._g,255)*100)+"%",b:I(k(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+I(k(this._r,255)*100)+"%, "+I(k(this._g,255)*100)+"%, "+I(k(this._b,255)*100)+"%)":"rgba("+I(k(this._r,255)*100)+"%, "+I(k(this._g,255)*100)+"%, "+I(k(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:D[s(this._r,this._g,this._b,!0)]||!1},toFilter:function(d){var S="#"+n(this._r,this._g,this._b,this._a),L=S,G=this._gradientType?"GradientType = 1, ":"";if(d){var U=C(d);L="#"+n(U._r,U._g,U._b,U._a)}return"progid:DXImageTransform.Microsoft.gradient("+G+"startColorstr="+S+",endColorstr="+L+")"},toString:function(d){var S=!!d;d=d||this._format;var L=!1,G=this._a<1&&this._a>=0,U=!S&&G&&(d==="hex"||d==="hex6"||d==="hex3"||d==="hex4"||d==="hex8"||d==="name");return U?d==="name"&&this._a===0?this.toName():this.toRgbString():(d==="rgb"&&(L=this.toRgbString()),d==="prgb"&&(L=this.toPercentageRgbString()),(d==="hex"||d==="hex6")&&(L=this.toHexString()),d==="hex3"&&(L=this.toHexString(!0)),d==="hex4"&&(L=this.toHex8String(!0)),d==="hex8"&&(L=this.toHex8String()),d==="name"&&(L=this.toName()),d==="hsl"&&(L=this.toHslString()),d==="hsv"&&(L=this.toHsvString()),L||this.toHexString())},clone:function(){return C(this.toString())},_applyModification:function(d,S){var L=d.apply(null,[this].concat([].slice.call(S)));return this._r=L._r,this._g=L._g,this._b=L._b,this.setAlpha(L._a),this},lighten:function(){return this._applyModification(E,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(t,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(v,arguments)},spin:function(){return this._applyModification(_,arguments)},_applyCombination:function(d,S){return d.apply(null,[this].concat([].slice.call(S)))},analogous:function(){return this._applyCombination(c,arguments)},complement:function(){return this._applyCombination(p,arguments)},monochromatic:function(){return this._applyCombination(T,arguments)},splitcomplement:function(){return this._applyCombination(m,arguments)},triad:function(){return this._applyCombination(u,arguments)},tetrad:function(){return this._applyCombination(l,arguments)}},C.fromRatio=function(d,S){if(typeof d=="object"){var L={};for(var G in d)d.hasOwnProperty(G)&&(G==="a"?L[G]=d[G]:L[G]=_e(d[G]));d=L}return C(d,S)};function g(d){var S={r:0,g:0,b:0},L=1,G=null,U=null,$=null,de=!1,xe=!1;return typeof d=="string"&&(d=le(d)),typeof d=="object"&&(Ee(d.r)&&Ee(d.g)&&Ee(d.b)?(S=f(d.r,d.g,d.b),de=!0,xe=String(d.r).substr(-1)==="%"?"prgb":"rgb"):Ee(d.h)&&Ee(d.s)&&Ee(d.v)?(G=_e(d.s),U=_e(d.v),S=h(d.h,G,U),de=!0,xe="hsv"):Ee(d.h)&&Ee(d.s)&&Ee(d.l)&&(G=_e(d.s),$=_e(d.l),S=r(d.h,G,$),de=!0,xe="hsl"),d.hasOwnProperty("a")&&(L=d.a)),L=O(L),{ok:de,format:d.format||xe,r:H(255,P(S.r,0)),g:H(255,P(S.g,0)),b:H(255,P(S.b,0)),a:L}}function f(d,S,L){return{r:k(d,255)*255,g:k(S,255)*255,b:k(L,255)*255}}function o(d,S,L){d=k(d,255),S=k(S,255),L=k(L,255);var G=P(d,S,L),U=H(d,S,L),$,de,xe=(G+U)/2;if(G==U)$=de=0;else{var q=G-U;de=xe>.5?q/(2-G-U):q/(G+U);switch(G){case d:$=(S-L)/q+(S<L?6:0);break;case S:$=(L-d)/q+2;break;case L:$=(d-S)/q+4;break}$/=6}return{h:$,s:de,l:xe}}function r(d,S,L){var G,U,$;d=k(d,360),S=k(S,100),L=k(L,100);function de(ae,fe,pe){return pe<0&&(pe+=1),pe>1&&(pe-=1),pe<1/6?ae+(fe-ae)*6*pe:pe<1/2?fe:pe<2/3?ae+(fe-ae)*(2/3-pe)*6:ae}if(S===0)G=U=$=L;else{var xe=L<.5?L*(1+S):L+S-L*S,q=2*L-xe;G=de(q,xe,d+1/3),U=de(q,xe,d),$=de(q,xe,d-1/3)}return{r:G*255,g:U*255,b:$*255}}function a(d,S,L){d=k(d,255),S=k(S,255),L=k(L,255);var G=P(d,S,L),U=H(d,S,L),$,de,xe=G,q=G-U;if(de=G===0?0:q/G,G==U)$=0;else{switch(G){case d:$=(S-L)/q+(S<L?6:0);break;case S:$=(L-d)/q+2;break;case L:$=(d-S)/q+4;break}$/=6}return{h:$,s:de,v:xe}}function h(d,S,L){d=k(d,360)*6,S=k(S,100),L=k(L,100);var G=W.floor(d),U=d-G,$=L*(1-S),de=L*(1-U*S),xe=L*(1-(1-U)*S),q=G%6,ae=[L,de,$,$,xe,L][q],fe=[xe,L,L,de,$,$][q],pe=[$,$,xe,L,L,de][q];return{r:ae*255,g:fe*255,b:pe*255}}function s(d,S,L,G){var U=[re(I(d).toString(16)),re(I(S).toString(16)),re(I(L).toString(16))];return G&&U[0].charAt(0)==U[0].charAt(1)&&U[1].charAt(0)==U[1].charAt(1)&&U[2].charAt(0)==U[2].charAt(1)?U[0].charAt(0)+U[1].charAt(0)+U[2].charAt(0):U.join("")}function i(d,S,L,G,U){var $=[re(I(d).toString(16)),re(I(S).toString(16)),re(I(L).toString(16)),re(se(G))];return U&&$[0].charAt(0)==$[0].charAt(1)&&$[1].charAt(0)==$[1].charAt(1)&&$[2].charAt(0)==$[2].charAt(1)&&$[3].charAt(0)==$[3].charAt(1)?$[0].charAt(0)+$[1].charAt(0)+$[2].charAt(0)+$[3].charAt(0):$.join("")}function n(d,S,L,G){var U=[re(se(G)),re(I(d).toString(16)),re(I(S).toString(16)),re(I(L).toString(16))];return U.join("")}C.equals=function(d,S){return!d||!S?!1:C(d).toRgbString()==C(S).toRgbString()},C.random=function(){return C.fromRatio({r:e(),g:e(),b:e()})};function t(d,S){S=S===0?0:S||10;var L=C(d).toHsl();return L.s-=S/100,L.s=R(L.s),C(L)}function b(d,S){S=S===0?0:S||10;var L=C(d).toHsl();return L.s+=S/100,L.s=R(L.s),C(L)}function v(d){return C(d).desaturate(100)}function E(d,S){S=S===0?0:S||10;var L=C(d).toHsl();return L.l+=S/100,L.l=R(L.l),C(L)}function w(d,S){S=S===0?0:S||10;var L=C(d).toRgb();return L.r=P(0,H(255,L.r-I(255*-(S/100)))),L.g=P(0,H(255,L.g-I(255*-(S/100)))),L.b=P(0,H(255,L.b-I(255*-(S/100)))),C(L)}function x(d,S){S=S===0?0:S||10;var L=C(d).toHsl();return L.l-=S/100,L.l=R(L.l),C(L)}function _(d,S){var L=C(d).toHsl(),G=(L.h+S)%360;return L.h=G<0?360+G:G,C(L)}function p(d){var S=C(d).toHsl();return S.h=(S.h+180)%360,C(S)}function u(d){var S=C(d).toHsl(),L=S.h;return[C(d),C({h:(L+120)%360,s:S.s,l:S.l}),C({h:(L+240)%360,s:S.s,l:S.l})]}function l(d){var S=C(d).toHsl(),L=S.h;return[C(d),C({h:(L+90)%360,s:S.s,l:S.l}),C({h:(L+180)%360,s:S.s,l:S.l}),C({h:(L+270)%360,s:S.s,l:S.l})]}function m(d){var S=C(d).toHsl(),L=S.h;return[C(d),C({h:(L+72)%360,s:S.s,l:S.l}),C({h:(L+216)%360,s:S.s,l:S.l})]}function c(d,S,L){S=S||6,L=L||30;var G=C(d).toHsl(),U=360/L,$=[C(d)];for(G.h=(G.h-(U*S>>1)+720)%360;--S;)G.h=(G.h+U)%360,$.push(C(G));return $}function T(d,S){S=S||6;for(var L=C(d).toHsv(),G=L.h,U=L.s,$=L.v,de=[],xe=1/S;S--;)de.push(C({h:G,s:U,v:$})),$=($+xe)%1;return de}C.mix=function(d,S,L){L=L===0?0:L||50;var G=C(d).toRgb(),U=C(S).toRgb(),$=L/100,de={r:(U.r-G.r)*$+G.r,g:(U.g-G.g)*$+G.g,b:(U.b-G.b)*$+G.b,a:(U.a-G.a)*$+G.a};return C(de)},C.readability=function(d,S){var L=C(d),G=C(S);return(W.max(L.getLuminance(),G.getLuminance())+.05)/(W.min(L.getLuminance(),G.getLuminance())+.05)},C.isReadable=function(d,S,L){var G=C.readability(d,S),U,$;$=!1,U=F(L);switch(U.level+U.size){case"AAsmall":case"AAAlarge":$=G>=4.5;break;case"AAlarge":$=G>=3;break;case"AAAsmall":$=G>=7;break}return $},C.mostReadable=function(d,S,L){var G=null,U=0,$,de,xe,q;L=L||{},de=L.includeFallbackColors,xe=L.level,q=L.size;for(var ae=0;ae<S.length;ae++)$=C.readability(d,S[ae]),$>U&&(U=$,G=C(S[ae]));return C.isReadable(d,G,{level:xe,size:q})||!de?G:(L.includeFallbackColors=!1,C.mostReadable(d,["#fff","#000"],L))};var N=C.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",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:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",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:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",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:"f00",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:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},D=C.hexNames=y(N);function y(d){var S={};for(var L in d)d.hasOwnProperty(L)&&(S[d[L]]=L);return S}function O(d){return d=parseFloat(d),(isNaN(d)||d<0||d>1)&&(d=1),d}function k(d,S){V(d)&&(d="100%");var L=ee(d);return d=H(S,P(0,parseFloat(d))),L&&(d=parseInt(d*S,10)/100),W.abs(d-S)<1e-6?1:d%S/parseFloat(S)}function R(d){return H(1,P(0,d))}function B(d){return parseInt(d,16)}function V(d){return typeof d=="string"&&d.indexOf(".")!=-1&&parseFloat(d)===1}function ee(d){return typeof d=="string"&&d.indexOf("%")!=-1}function re(d){return d.length==1?"0"+d:""+d}function _e(d){return d<=1&&(d=d*100+"%"),d}function se(d){return W.round(parseFloat(d)*255).toString(16)}function ye(d){return B(d)/255}var ve=function(){var d="[-\\+]?\\d+%?",S="[-\\+]?\\d*\\.\\d+%?",L="(?:"+S+")|(?:"+d+")",G="[\\s|\\(]+("+L+")[,|\\s]+("+L+")[,|\\s]+("+L+")\\s*\\)?",U="[\\s|\\(]+("+L+")[,|\\s]+("+L+")[,|\\s]+("+L+")[,|\\s]+("+L+")\\s*\\)?";return{CSS_UNIT:new RegExp(L),rgb:new RegExp("rgb"+G),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+G),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+G),hsva:new RegExp("hsva"+U),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 Ee(d){return!!ve.CSS_UNIT.exec(d)}function le(d){d=d.replace(M,"").replace(z,"").toLowerCase();var S=!1;if(N[d])d=N[d],S=!0;else if(d=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var L;return(L=ve.rgb.exec(d))?{r:L[1],g:L[2],b:L[3]}:(L=ve.rgba.exec(d))?{r:L[1],g:L[2],b:L[3],a:L[4]}:(L=ve.hsl.exec(d))?{h:L[1],s:L[2],l:L[3]}:(L=ve.hsla.exec(d))?{h:L[1],s:L[2],l:L[3],a:L[4]}:(L=ve.hsv.exec(d))?{h:L[1],s:L[2],v:L[3]}:(L=ve.hsva.exec(d))?{h:L[1],s:L[2],v:L[3],a:L[4]}:(L=ve.hex8.exec(d))?{r:B(L[1]),g:B(L[2]),b:B(L[3]),a:ye(L[4]),format:S?"name":"hex8"}:(L=ve.hex6.exec(d))?{r:B(L[1]),g:B(L[2]),b:B(L[3]),format:S?"name":"hex"}:(L=ve.hex4.exec(d))?{r:B(L[1]+""+L[1]),g:B(L[2]+""+L[2]),b:B(L[3]+""+L[3]),a:ye(L[4]+""+L[4]),format:S?"name":"hex8"}:(L=ve.hex3.exec(d))?{r:B(L[1]+""+L[1]),g:B(L[2]+""+L[2]),b:B(L[3]+""+L[3]),format:S?"name":"hex"}:!1}function F(d){var S,L;return d=d||{level:"AA",size:"small"},S=(d.level||"AA").toUpperCase(),L=(d.size||"small").toLowerCase(),S!=="AA"&&S!=="AAA"&&(S="AA"),L!=="small"&&L!=="large"&&(L="small"),{level:S,size:L}}Pe.exports?Pe.exports=C:!(ce=function(){return C}.call(he,j,he,Pe),ce!==void 0&&(Pe.exports=ce))})(Math)},bT9E:function(Pe,he,j){"use strict";j.d(he,"a",function(){return W});var ce=j("VTBJ");function W(M,z){var A=Object(ce.a)({},M);return Array.isArray(z)&&z.forEach(function(I){delete A[I]}),A}},cFMs:function(Pe,he){Pe.exports="data:image/png;base64,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"},cLbz:function(Pe,he,j){Pe.exports=j.p+"static/add_icon_light.3e1b4fba.svg"},cz0n:function(Pe,he,j){Pe.exports={flex_box_center:"flex_box_center___G8W6i",flex_space_between:"flex_space_between___1p_ZB",flex_box_vertical_center:"flex_box_vertical_center___2wivF",flex_box_center_end:"flex_box_center_end___y5a20",flex_box_column:"flex_box_column___6oXp3",tabs:"tabs___sKski",active:"active___10xGM"}},"f0W+":function(Pe,he,j){Pe.exports={flex_box_center:"flex_box_center___2AWuG",flex_space_between:"flex_space_between___4j1zo",flex_box_vertical_center:"flex_box_vertical_center___3dWcm",flex_box_center_end:"flex_box_center_end___qvHJi",flex_box_column:"flex_box_column___3Eier",tabs:"tabs___25WKT",tabsWrap:"tabsWrap___2lPJE",active:"active___gGp9s"}},f9pc:function(Pe,he,j){Pe.exports={flex_box_center:"flex_box_center___fO1Sq",flex_space_between:"flex_space_between___2MANs",flex_box_vertical_center:"flex_box_vertical_center___2x-su",flex_box_center_end:"flex_box_center_end___6bZNq",flex_box_column:"flex_box_column___CGTHC",quickPager:"quickPager___2XH6F",disabled:"disabled___2gPWV"}},fgAr:function(Pe,he,j){Pe.exports={flex_box_center:"flex_box_center___3W32R",flex_space_between:"flex_space_between___2uUoZ",flex_box_vertical_center:"flex_box_vertical_center___3Oxpz",flex_box_center_end:"flex_box_center_end___2tkyR",flex_box_column:"flex_box_column___2IFiF",btns:"btns___1c8D8",confirm:"confirm___2gIuB",cancel:"cancel___1ssuo"}},fjLI:function(Pe,he,j){"use strict";j.d(he,"f",function(){return o}),j.d(he,"b",function(){return r}),j.d(he,"a",function(){return a}),j.d(he,"d",function(){return h}),j.d(he,"e",function(){return s}),j.d(he,"c",function(){return i});var ce=j("8HAY"),W=j("Vhoy"),M=j("MI8n"),z=j("JYp7"),A=j("pmY6"),I=j("24hK"),H=j("nnTU"),P=j("T8No"),e=j("Cg/j"),C=j("t9D7"),g=function(n,t,b,v){var E=arguments.length,w=E<3?t:v===null?v=Object.getOwnPropertyDescriptor(t,b):v,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(n,t,b,v);else for(var _=n.length-1;_>=0;_--)(x=n[_])&&(w=(E<3?x(w):E>3?x(t,b,w):x(t,b))||w);return E>3&&w&&Object.defineProperty(t,b,w),w},f=function(n,t){return function(b,v){t(b,v,n)}};function o(n){return n.command!==void 0}class r{constructor(n){this.id=r._idPool++,this._debugName=n}}r._idPool=0,r.CommandPalette=new r("CommandPalette"),r.EditorContext=new r("EditorContext"),r.SimpleEditorContext=new r("SimpleEditorContext"),r.EditorContextCopy=new r("EditorContextCopy"),r.EditorContextPeek=new r("EditorContextPeek"),r.MenubarEditMenu=new r("MenubarEditMenu"),r.MenubarCopy=new r("MenubarCopy"),r.MenubarGoMenu=new r("MenubarGoMenu"),r.MenubarSelectionMenu=new r("MenubarSelectionMenu"),r.InlineCompletionsActions=new r("InlineCompletionsActions");const a=Object(e.c)("menuService"),h=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new M.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:n=>n===r.CommandPalette}}addCommand(n){return this.addCommands(z.a.single(n))}addCommands(n){for(const t of n)this._commands.set(t.id,t);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(A.i)(()=>{let t=!1;for(const b of n)t=this._commands.delete(b.id)||t;t&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(n){return this._commands.get(n)}getCommands(){const n=new Map;return this._commands.forEach((t,b)=>n.set(b,t)),n}appendMenuItem(n,t){return this.appendMenuItems(z.a.single({id:n,item:t}))}appendMenuItems(n){const t=new Set,b=new I.a;for(const{id:v,item:E}of n){let w=this._menuItems.get(v);w||(w=new I.a,this._menuItems.set(v,w)),b.push(w.push(E)),t.add(v)}return this._onDidChangeMenu.fire(t),Object(A.i)(()=>{if(b.size>0){for(let v of b)v();this._onDidChangeMenu.fire(t),b.clear()}})}getMenuItems(n){let t;return this._menuItems.has(n)?t=[...this._menuItems.get(n)]:t=[],n===r.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(n){const t=new Set;for(const b of n)o(b)&&(t.add(b.command.id),b.alt&&t.add(b.alt.id));this._commands.forEach((b,v)=>{t.has(v)||n.push({command:b})})}};class s extends ce.e{constructor(n,t,b,v){super(`submenuitem.${n.submenu.id}`,typeof n.title=="string"?n.title:n.title.value,[],"submenu");this.item=n,this._menuService=t,this._contextKeyService=b,this._options=v}get actions(){const n=[],t=this._menuService.createMenu(this.item.submenu,this._contextKeyService),b=t.getActions(this._options);t.dispose();for(const[,v]of b)v.length>0&&(n.push(...v),n.push(new ce.d));return n.length&&n.pop(),n}}let i=class n{constructor(t,b,v,E,w){var x,_;if(this._commandService=w,this.id=t.id,this.label=(v==null?void 0:v.renderShortTitle)&&t.shortTitle?typeof t.shortTitle=="string"?t.shortTitle:t.shortTitle.value:typeof t.title=="string"?t.title:t.title.value,this.tooltip=(_=typeof t.tooltip=="string"?t.tooltip:(x=t.tooltip)===null||x===void 0?void 0:x.value)!==null&&_!==void 0?_:"",this.enabled=!t.precondition||E.contextMatchesRules(t.precondition),this.checked=void 0,t.toggled){const p=t.toggled.condition?t.toggled:{condition:t.toggled};this.checked=E.contextMatchesRules(p.condition),this.checked&&p.tooltip&&(this.tooltip=typeof p.tooltip=="string"?p.tooltip:p.tooltip.value),p.title&&(this.label=typeof p.title=="string"?p.title:p.title.value)}this.item=t,this.alt=b?new n(b,void 0,v,E,w):void 0,this._options=v,C.d.isThemeIcon(t.icon)&&(this.class=W.a.asClassName(t.icon))}dispose(){}run(...t){var b,v;let E=[];return((b=this._options)===null||b===void 0?void 0:b.arg)&&(E=[...E,this._options.arg]),((v=this._options)===null||v===void 0?void 0:v.shouldForwardArgs)&&(E=[...E,...t]),this._commandService.executeCommand(this.id,...E)}};i=g([f(3,P.b),f(4,H.b)],i)},h78n:function(Pe,he,j){"use strict";j.d(he,"a",function(){return T});var ce=j("q1tI"),W=j.n(ce),M=j("TSYQ"),z=j.n(M),A={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},I=function(y){var O=y.map(function(){return Object(ce.useRef)()}),k=Object(ce.useRef)();return Object(ce.useEffect)(function(){var R=Date.now(),B=!1;Object.keys(O).forEach(function(V){var ee=O[V].current;if(!ee)return;B=!0;var re=ee.style;re.transitionDuration=".3s, .3s, .3s, .06s",k.current&&R-k.current<100&&(re.transitionDuration="0s, 0s")}),B&&(k.current=Date.now())}),[O]};function H(){return H=Object.assign||function(D){for(var y=1;y<arguments.length;y++){var O=arguments[y];for(var k in O)Object.prototype.hasOwnProperty.call(O,k)&&(D[k]=O[k])}return D},H.apply(this,arguments)}function P(D,y){return o(D)||f(D,y)||C(D,y)||e()}function e(){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 C(D,y){if(!D)return;if(typeof D=="string")return g(D,y);var O=Object.prototype.toString.call(D).slice(8,-1);if(O==="Object"&&D.constructor&&(O=D.constructor.name),O==="Map"||O==="Set")return Array.from(D);if(O==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O))return g(D,y)}function g(D,y){(y==null||y>D.length)&&(y=D.length);for(var O=0,k=new Array(y);O<y;O++)k[O]=D[O];return k}function f(D,y){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(D)))return;var O=[],k=!0,R=!1,B=void 0;try{for(var V=D[Symbol.iterator](),ee;!(k=(ee=V.next()).done)&&!(O.push(ee.value),y&&O.length===y);k=!0);}catch(re){R=!0,B=re}finally{try{!k&&V.return!=null&&V.return()}finally{if(R)throw B}}return O}function o(D){if(Array.isArray(D))return D}function r(D,y){if(D==null)return{};var O=a(D,y),k,R;if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(D);for(R=0;R<B.length;R++){if(k=B[R],y.indexOf(k)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(D,k))continue;O[k]=D[k]}}return O}function a(D,y){if(D==null)return{};var O={},k=Object.keys(D),R,B;for(B=0;B<k.length;B++){if(R=k[B],y.indexOf(R)>=0)continue;O[R]=D[R]}return O}var h=function(y){var O=y.className,k=y.percent,R=y.prefixCls,B=y.strokeColor,V=y.strokeLinecap,ee=y.strokeWidth,re=y.style,_e=y.trailColor,se=y.trailWidth,ye=y.transition,ve=r(y,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete ve.gapPosition;var Ee=Array.isArray(k)?k:[k],le=Array.isArray(B)?B:[B],F=I(Ee),d=P(F,1),S=d[0],L=ee/2,G=100-ee/2,U="M ".concat(V==="round"?L:0,",").concat(L,`
|
|
L `).concat(V==="round"?G:100,",").concat(L),$="0 0 100 ".concat(ee),de=0;return W.a.createElement("svg",H({className:z()("".concat(R,"-line"),O),viewBox:$,preserveAspectRatio:"none",style:re},ve),W.a.createElement("path",{className:"".concat(R,"-line-trail"),d:U,strokeLinecap:V,stroke:_e,strokeWidth:se||ee,fillOpacity:"0"}),Ee.map(function(xe,q){var ae={strokeDasharray:"".concat(xe,"px, 100px"),strokeDashoffset:"-".concat(de,"px"),transition:ye||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},fe=le[q]||le[le.length-1];return de+=xe,W.a.createElement("path",{key:q,className:"".concat(R,"-line-path"),d:U,strokeLinecap:V,stroke:fe,strokeWidth:ee,fillOpacity:"0",ref:S[q],style:ae})}))};h.defaultProps=A;var s=h;function i(){return i=Object.assign||function(D){for(var y=1;y<arguments.length;y++){var O=arguments[y];for(var k in O)Object.prototype.hasOwnProperty.call(O,k)&&(D[k]=O[k])}return D},i.apply(this,arguments)}function n(D,y){return w(D)||E(D,y)||b(D,y)||t()}function t(){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 b(D,y){if(!D)return;if(typeof D=="string")return v(D,y);var O=Object.prototype.toString.call(D).slice(8,-1);if(O==="Object"&&D.constructor&&(O=D.constructor.name),O==="Map"||O==="Set")return Array.from(D);if(O==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O))return v(D,y)}function v(D,y){(y==null||y>D.length)&&(y=D.length);for(var O=0,k=new Array(y);O<y;O++)k[O]=D[O];return k}function E(D,y){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(D)))return;var O=[],k=!0,R=!1,B=void 0;try{for(var V=D[Symbol.iterator](),ee;!(k=(ee=V.next()).done)&&!(O.push(ee.value),y&&O.length===y);k=!0);}catch(re){R=!0,B=re}finally{try{!k&&V.return!=null&&V.return()}finally{if(R)throw B}}return O}function w(D){if(Array.isArray(D))return D}function x(D,y){if(D==null)return{};var O=_(D,y),k,R;if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(D);for(R=0;R<B.length;R++){if(k=B[R],y.indexOf(k)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(D,k))continue;O[k]=D[k]}}return O}function _(D,y){if(D==null)return{};var O={},k=Object.keys(D),R,B;for(B=0;B<k.length;B++){if(R=k[B],y.indexOf(R)>=0)continue;O[R]=D[R]}return O}var p=0;function u(D){return+D.replace("%","")}function l(D){return Array.isArray(D)?D:[D]}function m(D,y,O,k){var R=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,B=arguments.length>5?arguments[5]:void 0,V=50-k/2,ee=0,re=-V,_e=0,se=-2*V;switch(B){case"left":ee=-V,re=0,_e=2*V,se=0;break;case"right":ee=V,re=0,_e=-2*V,se=0;break;case"bottom":re=V,se=2*V;break;default:}var ye="M 50,50 m ".concat(ee,",").concat(re,`
|
|
a `).concat(V,",").concat(V," 0 1 1 ").concat(_e,",").concat(-se,`
|
|
a `).concat(V,",").concat(V," 0 1 1 ").concat(-_e,",").concat(se),ve=Math.PI*2*V,Ee={stroke:O,strokeDasharray:"".concat(y/100*(ve-R),"px ").concat(ve,"px"),strokeDashoffset:"-".concat(R/2+D/100*(ve-R),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:ye,pathStyle:Ee}}var c=function(y){var O=y.prefixCls,k=y.strokeWidth,R=y.trailWidth,B=y.gapDegree,V=y.gapPosition,ee=y.trailColor,re=y.strokeLinecap,_e=y.style,se=y.className,ye=y.strokeColor,ve=y.percent,Ee=x(y,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),le=Object(ce.useMemo)(function(){return p+=1,p},[]),F=m(0,100,ee,k,B,V),d=F.pathString,S=F.pathStyle,L=l(ve),G=l(ye),U=G.find(function(ae){return Object.prototype.toString.call(ae)==="[object Object]"}),$=I(L),de=n($,1),xe=de[0],q=function(){var fe=0;return L.map(function(pe,Ce){var Me=G[Ce]||G[G.length-1],He=Object.prototype.toString.call(Me)==="[object Object]"?"url(#".concat(O,"-gradient-").concat(le,")"):"",je=m(fe,pe,Me,k,B,V);return fe+=pe,W.a.createElement("path",{key:Ce,className:"".concat(O,"-circle-path"),d:je.pathString,stroke:He,strokeLinecap:re,strokeWidth:k,opacity:pe===0?0:1,fillOpacity:"0",style:je.pathStyle,ref:xe[Ce]})})};return W.a.createElement("svg",i({className:z()("".concat(O,"-circle"),se),viewBox:"0 0 100 100",style:_e},Ee),U&&W.a.createElement("defs",null,W.a.createElement("linearGradient",{id:"".concat(O,"-gradient-").concat(le),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(U).sort(function(ae,fe){return u(ae)-u(fe)}).map(function(ae,fe){return W.a.createElement("stop",{key:fe,offset:ae,stopColor:U[ae]})}))),W.a.createElement("path",{className:"".concat(O,"-circle-trail"),d,stroke:ee,strokeLinecap:re,strokeWidth:R||k,fillOpacity:"0",style:S}),q().reverse())};c.defaultProps=A;var T=c,N={Line:s,Circle:T}},"iL++":function(Pe,he,j){Pe.exports={flex_box_center:"flex_box_center___2pHUo",flex_space_between:"flex_space_between___3Bfes",flex_box_vertical_center:"flex_box_vertical_center___1thiW",flex_box_center_end:"flex_box_center_end___3Zr7k",flex_box_column:"flex_box_column___3xe1a",list:"list___3rlGv",wrap:"wrap____oZzM",lockWrap:"lockWrap___24eY2",top:"top___3SCOc",sign:"sign____uZ_B",name:"name___2nHyM",img:"img___3Spn7",text:"text___1Pg2L",btns:"btns___Kr_Ti",bottom:"bottom___2_iOx"}},iLsG:function(Pe,he,j){Pe.exports=j.p+"static/add_icon.9bbccafa.svg"},ic2d:function(Pe,he,j){"use strict";j.d(he,"a",function(){return z});var ce=j("FWmy"),W=j("746U");class M{constructor(){this.data=new Map}add(A,I){ce.a(W.l(A)),ce.a(W.k(I)),ce.a(!this.data.has(A),"There is already an extension with this id"),this.data.set(A,I)}as(A){return this.data.get(A)||null}}const z=new M},nEHx:function(Pe,he,j){"use strict";j.d(he,"a",function(){return ce});var ce;(function(W){W.DARK="dark",W.LIGHT="light",W.HIGH_CONTRAST="hc"})(ce||(ce={}))},nnTU:function(Pe,he,j){"use strict";j.d(he,"b",function(){return H}),j.d(he,"a",function(){return P});var ce=j("MI8n"),W=j("JYp7"),M=j("pmY6"),z=j("24hK"),A=j("746U"),I=j("Cg/j");const H=Object(I.c)("commandService"),P=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new ce.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,C){if(!e)throw new Error("invalid command");if(typeof e=="string"){if(!C)throw new Error("invalid command");return this.registerCommand({id:e,handler:C})}if(e.description){const a=[];for(let s of e.description.args)a.push(s.constraint);const h=e.handler;e.handler=function(s,...i){return Object(A.o)(i,a),h(s,...i)}}const{id:g}=e;let f=this._commands.get(g);f||(f=new z.a,this._commands.set(g,f));let o=f.unshift(e),r=Object(M.i)(()=>{o();const a=this._commands.get(g);(a==null?void 0:a.isEmpty())&&this._commands.delete(g)});return this._onDidRegisterCommand.fire(g),r}registerCommandAlias(e,C){return P.registerCommand(e,(g,...f)=>g.get(H).executeCommand(C,...f))}getCommand(e){const C=this._commands.get(e);return!C||C.isEmpty()?void 0:W.a.first(C)}getCommands(){const e=new Map;for(const C of this._commands.keys()){const g=this.getCommand(C);g&&e.set(C,g)}return e}};P.registerCommand("noop",()=>{})},ogmK:function(Pe,he,j){"use strict";j.d(he,"a",function(){return Bi});var ce=j("1OyB"),W=j("vuIU"),M=j("Ji7U"),z=j("LK+K"),A=j("rePB"),I=j("VTBJ"),H=j("ODXe"),P=j("q1tI"),e=j("TSYQ"),C=j.n(e),g=j("Kwbf"),f=j("6cGi"),o=j("U8pU"),r=j("4IlW"),a=P.createContext({}),h=a,s={visibility:"hidden"};function i(K){var ue=K.prefixCls,ge=K.prevIcon,me=ge===void 0?"\u2039":ge,Ae=K.nextIcon,we=Ae===void 0?"\u203A":Ae,Re=K.superPrevIcon,De=Re===void 0?"\xAB":Re,ke=K.superNextIcon,Ne=ke===void 0?"\xBB":ke,Ke=K.onSuperPrev,We=K.onSuperNext,Oe=K.onPrev,Ue=K.onNext,Le=K.children,Ge=P.useContext(h),Be=Ge.hideNextBtn,Qe=Ge.hidePrevBtn;return P.createElement("div",{className:ue},Ke&&P.createElement("button",{type:"button",onClick:Ke,tabIndex:-1,className:"".concat(ue,"-super-prev-btn"),style:Qe?s:{}},De),Oe&&P.createElement("button",{type:"button",onClick:Oe,tabIndex:-1,className:"".concat(ue,"-prev-btn"),style:Qe?s:{}},me),P.createElement("div",{className:"".concat(ue,"-view")},Le),Ue&&P.createElement("button",{type:"button",onClick:Ue,tabIndex:-1,className:"".concat(ue,"-next-btn"),style:Be?s:{}},we),We&&P.createElement("button",{type:"button",onClick:We,tabIndex:-1,className:"".concat(ue,"-super-next-btn"),style:Be?s:{}},Ne))}var n=i;function t(K){var ue=P.useContext(h),ge=ue.hideHeader;if(ge)return null;var me=K.prefixCls,Ae=K.generateConfig,we=K.locale,Re=K.value,De=K.format,ke="".concat(me,"-header");return P.createElement(n,{prefixCls:ke},Re?Ae.locale.format(we.locale,Re,De):"\xA0")}var b=t,v=j("YrtM"),E=j("KQm4"),w=new Map;function x(K,ue,ge){if(w.get(K)&&cancelAnimationFrame(w.get(K)),ge<=0){w.set(K,requestAnimationFrame(function(){K.scrollTop=ue}));return}var me=ue-K.scrollTop,Ae=me/ge*10;w.set(K,requestAnimationFrame(function(){K.scrollTop+=Ae,K.scrollTop!==ue&&x(K,ue,ge-10)}))}function _(K,ue){var ge=ue.onLeftRight,me=ue.onCtrlLeftRight,Ae=ue.onUpDown,we=ue.onPageUpDown,Re=ue.onEnter,De=K.which,ke=K.ctrlKey,Ne=K.metaKey;switch(De){case r.a.LEFT:if(ke||Ne){if(me)return me(-1),!0}else if(ge)return ge(-1),!0;break;case r.a.RIGHT:if(ke||Ne){if(me)return me(1),!0}else if(ge)return ge(1),!0;break;case r.a.UP:if(Ae)return Ae(-1),!0;break;case r.a.DOWN:if(Ae)return Ae(1),!0;break;case r.a.PAGE_UP:if(we)return we(-1),!0;break;case r.a.PAGE_DOWN:if(we)return we(1),!0;break;case r.a.ENTER:if(Re)return Re(),!0;break}return!1}function p(K,ue,ge,me){var Ae=K;if(!Ae)switch(ue){case"time":Ae=me?"hh:mm:ss a":"HH:mm:ss";break;case"week":Ae="gggg-wo";break;case"month":Ae="YYYY-MM";break;case"quarter":Ae="YYYY-[Q]Q";break;case"year":Ae="YYYY";break;default:Ae=ge?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD"}return Ae}function u(K,ue){var ge=K==="time"?8:10;return Math.max(ge,ue.length)+2}var l=null,m=new Set;function c(K){return!l&&typeof window!="undefined"&&window.addEventListener&&(l=function(ge){Object(E.a)(m).forEach(function(me){me(ge)})},window.addEventListener("mousedown",l)),m.add(K),function(){m.delete(K),m.size===0&&(window.removeEventListener("mousedown",l),l=null)}}var T=function(ue){return ue==="month"||ue==="date"?"year":ue},N=function(ue){return ue==="date"?"month":ue},D=function(ue){return ue==="month"||ue==="date"?"quarter":ue},y=function(ue){return ue==="date"?"week":ue},O={year:T,month:N,quarter:D,week:y,time:null,date:null};function k(K,ue){return K.some(function(ge){return ge&&ge.contains(ue)})}function R(K){var ue=K.prefixCls,ge=K.units,me=K.onSelect,Ae=K.value,we=K.active,Re=K.hideDisabledOptions,De="".concat(ue,"-cell"),ke=P.useContext(h),Ne=ke.open,Ke=P.useRef(null),We=P.useRef(new Map);return P.useLayoutEffect(function(){var Oe=We.current.get(Ae);Oe&&Ne!==!1&&x(Ke.current,Oe.offsetTop,120)},[Ae]),P.useLayoutEffect(function(){if(Ne){var Oe=We.current.get(Ae);Oe&&x(Ke.current,Oe.offsetTop,0)}},[Ne]),P.createElement("ul",{className:C()("".concat(ue,"-column"),Object(A.a)({},"".concat(ue,"-column-active"),we)),ref:Ke,style:{position:"relative"}},ge.map(function(Oe){var Ue;return Re&&Oe.disabled?null:P.createElement("li",{key:Oe.value,ref:function(Ge){We.current.set(Oe.value,Ge)},className:C()(De,(Ue={},Object(A.a)(Ue,"".concat(De,"-disabled"),Oe.disabled),Object(A.a)(Ue,"".concat(De,"-selected"),Ae===Oe.value),Ue)),onClick:function(){if(Oe.disabled)return;me(Oe.value)}},P.createElement("div",{className:"".concat(De,"-inner")},Oe.label))}))}var B=R;function V(K,ue){for(var ge=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0",me=String(K);me.length<ue;)me="".concat(ge).concat(K);return me}var ee=function(){for(var ue=arguments.length,ge=new Array(ue),me=0;me<ue;me++)ge[me]=arguments[me];return ge};function re(K){return K==null?[]:Array.isArray(K)?K:[K]}function _e(K){var ue={};return Object.keys(K).forEach(function(ge){(ge.substr(0,5)==="data-"||ge.substr(0,5)==="aria-"||ge==="role"||ge==="name")&&ge.substr(0,7)!=="data-__"&&(ue[ge]=K[ge])}),ue}function se(K,ue){return K?K[ue]:null}function ye(K,ue,ge){var me=[se(K,0),se(K,1)];return me[ge]=typeof ue=="function"?ue(me[ge]):ue,!me[0]&&!me[1]?null:me}function ve(K,ue,ge,me,Ae){var we=K.setHour(ue,ge);return we=K.setMinute(we,me),we=K.setSecond(we,Ae),we}function Ee(K,ue,ge,me,Ae,we){var Re=Math.floor(K/me)*me;if(Re<K)return[Re,60-Ae,60-we];var De=Math.floor(ue/Ae)*Ae;if(De<ue)return[Re,De,60-we];var ke=Math.floor(ge/we)*we;return[Re,De,ke]}function le(K,ue){if(K.length!==ue.length)return!0;for(var ge=0;ge<K.length;ge+=1)if(K[ge].disabled!==ue[ge].disabled)return!0;return!1}function F(K,ue,ge,me){for(var Ae=[],we=K;we<=ue;we+=ge)Ae.push({label:V(we,2),value:we,disabled:(me||[]).includes(we)});return Ae}function d(K){var ue=K.generateConfig,ge=K.prefixCls,me=K.operationRef,Ae=K.activeColumnIndex,we=K.value,Re=K.showHour,De=K.showMinute,ke=K.showSecond,Ne=K.use12Hours,Ke=K.hourStep,We=Ke===void 0?1:Ke,Oe=K.minuteStep,Ue=Oe===void 0?1:Oe,Le=K.secondStep,Ge=Le===void 0?1:Le,Be=K.disabledHours,Qe=K.disabledMinutes,at=K.disabledSeconds,bt=K.hideDisabledOptions,Ot=K.onSelect,gt=[],yt="".concat(ge,"-content"),xt="".concat(ge,"-time-panel"),Tt,rn=we?ue.getHour(we):-1,an=we?ue.getMinute(we):-1,An=we?ue.getSecond(we):-1,$t=function(Ft,Xt,Rn,yn){var fn=we||ue.getNow(),On=Math.max(0,Xt),In=Math.max(0,Rn),Tn=Math.max(0,yn);return fn=ve(ue,fn,!Ne||!Ft?On:On+12,In,Tn),fn},hn=F(0,23,We,Be&&Be()),dn=Object(v.a)(function(){return hn},hn,le);Ne&&(Tt=rn>=12,rn%=12);var Vn=P.useMemo(function(){if(!Ne)return[!1,!1];var Nt=[!0,!0];return dn.forEach(function(Ft){var Xt=Ft.disabled,Rn=Ft.value;if(Xt)return;Rn>=12?Nt[1]=!1:Nt[0]=!1}),Nt},[Ne,dn]),Yn=Object(H.a)(Vn,2),Xn=Yn[0],Jn=Yn[1],Qn=P.useMemo(function(){return Ne?dn.filter(Tt?function(Nt){return Nt.value>=12}:function(Nt){return Nt.value<12}).map(function(Nt){var Ft=Nt.value%12,Xt=Ft===0?"12":V(Ft,2);return Object(I.a)(Object(I.a)({},Nt),{},{label:Xt,value:Ft})}):dn},[Ne,dn]),jn=F(0,59,Ue,Qe&&Qe(rn)),ar=F(0,59,Ge,at&&at(rn,an));me.current={onUpDown:function(Ft){var Xt=gt[Ae];if(Xt)for(var Rn=Xt.units.findIndex(function(In){return In.value===Xt.value}),yn=Xt.units.length,fn=1;fn<yn;fn+=1){var On=Xt.units[(Rn+Ft*fn+yn)%yn];if(On.disabled!==!0){Xt.onSelect(On.value);break}}}};function Hn(Nt,Ft,Xt,Rn,yn){Nt!==!1&>.push({node:P.cloneElement(Ft,{prefixCls:xt,value:Xt,active:Ae===gt.length,onSelect:yn,units:Rn,hideDisabledOptions:bt}),onSelect:yn,value:Xt,units:Rn})}Hn(Re,P.createElement(B,{key:"hour"}),rn,Qn,function(Nt){Ot($t(Tt,Nt,an,An),"mouse")}),Hn(De,P.createElement(B,{key:"minute"}),an,jn,function(Nt){Ot($t(Tt,rn,Nt,An),"mouse")}),Hn(ke,P.createElement(B,{key:"second"}),An,ar,function(Nt){Ot($t(Tt,rn,an,Nt),"mouse")});var sr=-1;return typeof Tt=="boolean"&&(sr=Tt?1:0),Hn(Ne===!0,P.createElement(B,{key:"12hours"}),sr,[{label:"AM",value:0,disabled:Xn},{label:"PM",value:1,disabled:Jn}],function(Nt){Ot($t(!!Nt,rn,an,An),"mouse")}),P.createElement("div",{className:yt},gt.map(function(Nt){var Ft=Nt.node;return Ft}))}var S=d,L=function(ue){return ue.filter(function(ge){return ge!==!1}).length};function G(K){var ue=K.generateConfig,ge=K.format,me=ge===void 0?"HH:mm:ss":ge,Ae=K.prefixCls,we=K.active,Re=K.operationRef,De=K.showHour,ke=K.showMinute,Ne=K.showSecond,Ke=K.use12Hours,We=Ke===void 0?!1:Ke,Oe=K.onSelect,Ue=K.value,Le="".concat(Ae,"-time-panel"),Ge=P.useRef(),Be=P.useState(-1),Qe=Object(H.a)(Be,2),at=Qe[0],bt=Qe[1],Ot=L([De,ke,Ne,We]);return Re.current={onKeyDown:function(yt){return _(yt,{onLeftRight:function(Tt){bt((at+Tt+Ot)%Ot)},onUpDown:function(Tt){at===-1?bt(0):Ge.current&&Ge.current.onUpDown(Tt)},onEnter:function(){Oe(Ue||ue.getNow(),"key"),bt(-1)}})},onBlur:function(){bt(-1)}},P.createElement("div",{className:C()(Le,Object(A.a)({},"".concat(Le,"-active"),we))},P.createElement(b,Object.assign({},K,{format:me,prefixCls:Ae})),P.createElement(S,Object.assign({},K,{prefixCls:Ae,activeColumnIndex:at,operationRef:Ge})))}var U=G,$=7;function de(K,ue){return!K&&!ue?!0:!K||!ue?!1:void 0}function xe(K,ue,ge){var me=de(ue,ge);if(typeof me=="boolean")return me;var Ae=Math.floor(K.getYear(ue)/10),we=Math.floor(K.getYear(ge)/10);return Ae===we}function q(K,ue,ge){var me=de(ue,ge);return typeof me=="boolean"?me:K.getYear(ue)===K.getYear(ge)}function ae(K,ue){var ge=Math.floor(K.getMonth(ue)/3);return ge+1}function fe(K,ue,ge){var me=de(ue,ge);return typeof me=="boolean"?me:q(K,ue,ge)&&ae(K,ue)===ae(K,ge)}function pe(K,ue,ge){var me=de(ue,ge);return typeof me=="boolean"?me:q(K,ue,ge)&&K.getMonth(ue)===K.getMonth(ge)}function Ce(K,ue,ge){var me=de(ue,ge);return typeof me=="boolean"?me:K.getYear(ue)===K.getYear(ge)&&K.getMonth(ue)===K.getMonth(ge)&&K.getDate(ue)===K.getDate(ge)}function Me(K,ue,ge){var me=de(ue,ge);return typeof me=="boolean"?me:K.getHour(ue)===K.getHour(ge)&&K.getMinute(ue)===K.getMinute(ge)&&K.getSecond(ue)===K.getSecond(ge)}function He(K,ue,ge,me){var Ae=de(ge,me);return typeof Ae=="boolean"?Ae:K.locale.getWeek(ue,ge)===K.locale.getWeek(ue,me)}function je(K,ue,ge){return Ce(K,ue,ge)&&Me(K,ue,ge)}function Ye(K,ue,ge,me){return!ue||!ge||!me?!1:!Ce(K,ue,me)&&!Ce(K,ge,me)&&K.isAfter(me,ue)&&K.isAfter(ge,me)}function Xe(K,ue,ge){var me=ue.locale.getWeekFirstDay(K),Ae=ue.setDate(ge,1),we=ue.getWeekDay(Ae),Re=ue.addDate(Ae,me-we);return ue.getMonth(Re)===ue.getMonth(ge)&&ue.getDate(Re)>1&&(Re=ue.addDate(Re,-7)),Re}function ze(K,ue,ge){var me=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;switch(ue){case"year":return ge.addYear(K,me*10);case"quarter":case"month":return ge.addYear(K,me);default:return ge.addMonth(K,me)}}var Fe=P.createContext({}),et=Fe;function st(K){var ue=K.cellPrefixCls,ge=K.generateConfig,me=K.rangedValue,Ae=K.hoverRangedValue,we=K.isInView,Re=K.isSameCell,De=K.offsetCell,ke=K.today,Ne=K.value;function Ke(We){var Oe,Ue=De(We,-1),Le=De(We,1),Ge=se(me,0),Be=se(me,1),Qe=se(Ae,0),at=se(Ae,1),bt=Ye(ge,Qe,at,We);function Ot(an){return Re(Ge,an)}function gt(an){return Re(Be,an)}var yt=Re(Qe,We),xt=Re(at,We),Tt=(bt||xt)&&(!we(Ue)||gt(Ue)),rn=(bt||yt)&&(!we(Le)||Ot(Le));return Oe={},Object(A.a)(Oe,"".concat(ue,"-in-view"),we(We)),Object(A.a)(Oe,"".concat(ue,"-in-range"),Ye(ge,Ge,Be,We)),Object(A.a)(Oe,"".concat(ue,"-range-start"),Ot(We)),Object(A.a)(Oe,"".concat(ue,"-range-end"),gt(We)),Object(A.a)(Oe,"".concat(ue,"-range-start-single"),Ot(We)&&!Be),Object(A.a)(Oe,"".concat(ue,"-range-end-single"),gt(We)&&!Ge),Object(A.a)(Oe,"".concat(ue,"-range-start-near-hover"),Ot(We)&&(Re(Ue,Qe)||Ye(ge,Qe,at,Ue))),Object(A.a)(Oe,"".concat(ue,"-range-end-near-hover"),gt(We)&&(Re(Le,at)||Ye(ge,Qe,at,Le))),Object(A.a)(Oe,"".concat(ue,"-range-hover"),bt),Object(A.a)(Oe,"".concat(ue,"-range-hover-start"),yt),Object(A.a)(Oe,"".concat(ue,"-range-hover-end"),xt),Object(A.a)(Oe,"".concat(ue,"-range-hover-edge-start"),Tt),Object(A.a)(Oe,"".concat(ue,"-range-hover-edge-end"),rn),Object(A.a)(Oe,"".concat(ue,"-range-hover-edge-start-near-range"),Tt&&Re(Ue,Be)),Object(A.a)(Oe,"".concat(ue,"-range-hover-edge-end-near-range"),rn&&Re(Le,Ge)),Object(A.a)(Oe,"".concat(ue,"-today"),Re(ke,We)),Object(A.a)(Oe,"".concat(ue,"-selected"),Re(Ne,We)),Oe}return Ke}function te(K){for(var ue=K.prefixCls,ge=K.disabledDate,me=K.onSelect,Ae=K.rowNum,we=K.colNum,Re=K.prefixColumn,De=K.rowClassName,ke=K.baseDate,Ne=K.getCellClassName,Ke=K.getCellText,We=K.getCellNode,Oe=K.getCellDate,Ue=K.titleCell,Le=K.headerCells,Ge=P.useContext(h),Be=Ge.onDateMouseEnter,Qe=Ge.onDateMouseLeave,at="".concat(ue,"-cell"),bt=[],Ot=0;Ot<Ae;Ot+=1){for(var gt=[],yt=void 0,xt=function(an){var An=Ot*we+an,$t=Oe(ke,An),hn=ge&&ge($t);an===0&&(yt=$t,Re&>.push(Re(yt))),gt.push(P.createElement("td",{key:an,title:Ue&&Ue($t),className:C()(at,Object(I.a)(Object(A.a)({},"".concat(at,"-disabled"),hn),Ne($t))),onClick:function(){hn||me($t)},onMouseEnter:function(){!hn&&Be&&Be($t)},onMouseLeave:function(){!hn&&Qe&&Qe($t)}},We?We($t):P.createElement("div",{className:"".concat(at,"-inner")},Ke($t))))},Tt=0;Tt<we;Tt+=1)xt(Tt);bt.push(P.createElement("tr",{key:Ot,className:De&&De(yt)},gt))}return P.createElement("div",{className:"".concat(ue,"-body")},P.createElement("table",{className:"".concat(ue,"-content")},Le&&P.createElement("thead",null,P.createElement("tr",null,Le)),P.createElement("tbody",null,bt)))}function Y(K){var ue=K.prefixCls,ge=K.generateConfig,me=K.prefixColumn,Ae=K.locale,we=K.rowCount,Re=K.viewDate,De=K.value,ke=K.dateRender,Ne=P.useContext(et),Ke=Ne.rangedValue,We=Ne.hoverRangedValue,Oe=Xe(Ae.locale,ge,Re),Ue="".concat(ue,"-cell"),Le=ge.locale.getWeekFirstDay(Ae.locale),Ge=ge.getNow(),Be=[],Qe=Ae.shortWeekDays||(ge.locale.getShortWeekDays?ge.locale.getShortWeekDays(Ae.locale):[]);me&&Be.push(P.createElement("th",{key:"empty","aria-label":"empty cell"}));for(var at=0;at<$;at+=1)Be.push(P.createElement("th",{key:at},Qe[(at+Le)%$]));var bt=st({cellPrefixCls:Ue,today:Ge,value:De,generateConfig:ge,rangedValue:me?null:Ke,hoverRangedValue:me?null:We,isSameCell:function(yt,xt){return Ce(ge,yt,xt)},isInView:function(yt){return pe(ge,yt,Re)},offsetCell:function(yt,xt){return ge.addDate(yt,xt)}}),Ot=ke?function(gt){return ke(gt,Ge)}:void 0;return P.createElement(te,Object.assign({},K,{rowNum:we,colNum:$,baseDate:Oe,getCellNode:Ot,getCellText:ge.getDate,getCellClassName:bt,getCellDate:ge.addDate,titleCell:function(yt){return ge.locale.format(Ae.locale,yt,"YYYY-MM-DD")},headerCells:Be}))}var X=Y;function Z(K){var ue=K.prefixCls,ge=K.generateConfig,me=K.locale,Ae=K.viewDate,we=K.onNextMonth,Re=K.onPrevMonth,De=K.onNextYear,ke=K.onPrevYear,Ne=K.onYearClick,Ke=K.onMonthClick,We=P.useContext(h),Oe=We.hideHeader;if(Oe)return null;var Ue="".concat(ue,"-header"),Le=me.shortMonths||(ge.locale.getShortMonths?ge.locale.getShortMonths(me.locale):[]),Ge=ge.getMonth(Ae),Be=P.createElement("button",{type:"button",key:"year",onClick:Ne,tabIndex:-1,className:"".concat(ue,"-year-btn")},ge.locale.format(me.locale,Ae,me.yearFormat)),Qe=P.createElement("button",{type:"button",key:"month",onClick:Ke,tabIndex:-1,className:"".concat(ue,"-month-btn")},me.monthFormat?ge.locale.format(me.locale,Ae,me.monthFormat):Le[Ge]),at=me.monthBeforeYear?[Qe,Be]:[Be,Qe];return P.createElement(n,Object.assign({},K,{prefixCls:Ue,onSuperPrev:ke,onPrev:Re,onNext:we,onSuperNext:De}),at)}var ne=Z,J=6;function Q(K){var ue=K.prefixCls,ge=K.panelName,me=ge===void 0?"date":ge,Ae=K.keyboardConfig,we=K.active,Re=K.operationRef,De=K.generateConfig,ke=K.value,Ne=K.viewDate,Ke=K.onViewDateChange,We=K.onPanelChange,Oe=K.onSelect,Ue="".concat(ue,"-").concat(me,"-panel");Re.current={onKeyDown:function(Qe){return _(Qe,Object(I.a)({onLeftRight:function(bt){Oe(De.addDate(ke||Ne,bt),"key")},onCtrlLeftRight:function(bt){Oe(De.addYear(ke||Ne,bt),"key")},onUpDown:function(bt){Oe(De.addDate(ke||Ne,bt*$),"key")},onPageUpDown:function(bt){Oe(De.addMonth(ke||Ne,bt),"key")}},Ae))}};var Le=function(Qe){var at=De.addYear(Ne,Qe);Ke(at),We(null,at)},Ge=function(Qe){var at=De.addMonth(Ne,Qe);Ke(at),We(null,at)};return P.createElement("div",{className:C()(Ue,Object(A.a)({},"".concat(Ue,"-active"),we))},P.createElement(ne,Object.assign({},K,{prefixCls:ue,value:ke,viewDate:Ne,onPrevYear:function(){Le(-1)},onNextYear:function(){Le(1)},onPrevMonth:function(){Ge(-1)},onNextMonth:function(){Ge(1)},onMonthClick:function(){We("month",Ne)},onYearClick:function(){We("year",Ne)}})),P.createElement(X,Object.assign({},K,{onSelect:function(Qe){return Oe(Qe,"mouse")},prefixCls:ue,value:ke,viewDate:Ne,rowCount:J})))}var ie=Q;function oe(K,ue,ge){if(!ge)return ue;var me=ue;return me=K.setHour(me,K.getHour(ge)),me=K.setMinute(me,K.getMinute(ge)),me=K.setSecond(me,K.getSecond(ge)),me}var be=ee("date","time");function Te(K){var ue=K.prefixCls,ge=K.operationRef,me=K.generateConfig,Ae=K.value,we=K.defaultValue,Re=K.disabledTime,De=K.showTime,ke=K.onSelect,Ne="".concat(ue,"-datetime-panel"),Ke=P.useState(null),We=Object(H.a)(Ke,2),Oe=We[0],Ue=We[1],Le=P.useRef({}),Ge=P.useRef({}),Be=Object(o.a)(De)==="object"?Object(I.a)({},De):{};function Qe(gt){var yt=be.indexOf(Oe)+gt,xt=be[yt]||null;return xt}var at=function(yt){Ge.current.onBlur&&Ge.current.onBlur(yt),Ue(null)};ge.current={onKeyDown:function(yt){if(yt.which===r.a.TAB){var xt=Qe(yt.shiftKey?-1:1);return Ue(xt),xt&&yt.preventDefault(),!0}if(Oe){var Tt=Oe==="date"?Le:Ge;return Tt.current&&Tt.current.onKeyDown&&Tt.current.onKeyDown(yt),!0}return[r.a.LEFT,r.a.RIGHT,r.a.UP,r.a.DOWN].includes(yt.which)?(Ue("date"),!0):!1},onBlur:at,onClose:at};var bt=function(yt,xt){var Tt=yt;xt==="date"&&!Ae&&Be.defaultValue?(Tt=me.setHour(Tt,me.getHour(Be.defaultValue)),Tt=me.setMinute(Tt,me.getMinute(Be.defaultValue)),Tt=me.setSecond(Tt,me.getSecond(Be.defaultValue))):xt==="time"&&!Ae&&we&&(Tt=me.setYear(Tt,me.getYear(we)),Tt=me.setMonth(Tt,me.getMonth(we)),Tt=me.setDate(Tt,me.getDate(we))),ke&&ke(Tt,"mouse")},Ot=Re?Re(Ae||null):{};return P.createElement("div",{className:C()(Ne,Object(A.a)({},"".concat(Ne,"-active"),Oe))},P.createElement(ie,Object.assign({},K,{operationRef:Le,active:Oe==="date",onSelect:function(yt){bt(oe(me,yt,De&&Object(o.a)(De)==="object"?De.defaultValue:null),"date")}})),P.createElement(U,Object.assign({},K,{format:void 0},Be,Ot,{defaultValue:void 0,operationRef:Ge,active:Oe==="time",onSelect:function(yt){bt(yt,"time")}})))}var Ie=Te;function Je(K){var ue=K.prefixCls,ge=K.generateConfig,me=K.locale,Ae=K.value,we="".concat(ue,"-cell"),Re=function(Ke){return P.createElement("td",{key:"week",className:C()(we,"".concat(we,"-week"))},ge.locale.getWeek(me.locale,Ke))},De="".concat(ue,"-week-panel-row"),ke=function(Ke){return C()(De,Object(A.a)({},"".concat(De,"-selected"),He(ge,me.locale,Ae,Ke)))};return P.createElement(ie,Object.assign({},K,{panelName:"week",prefixColumn:Re,rowClassName:ke,keyboardConfig:{onLeftRight:null}}))}var ht=Je;function lt(K){var ue=K.prefixCls,ge=K.generateConfig,me=K.locale,Ae=K.viewDate,we=K.onNextYear,Re=K.onPrevYear,De=K.onYearClick,ke=P.useContext(h),Ne=ke.hideHeader;if(Ne)return null;var Ke="".concat(ue,"-header");return P.createElement(n,Object.assign({},K,{prefixCls:Ke,onSuperPrev:Re,onSuperNext:we}),P.createElement("button",{type:"button",onClick:De,className:"".concat(ue,"-year-btn")},ge.locale.format(me.locale,Ae,me.yearFormat)))}var Rt=lt,vt=3,ut=4;function Ht(K){var ue=K.prefixCls,ge=K.locale,me=K.value,Ae=K.viewDate,we=K.generateConfig,Re=K.monthCellRender,De=P.useContext(et),ke=De.rangedValue,Ne=De.hoverRangedValue,Ke="".concat(ue,"-cell"),We=st({cellPrefixCls:Ke,value:me,generateConfig:we,rangedValue:ke,hoverRangedValue:Ne,isSameCell:function(Be,Qe){return pe(we,Be,Qe)},isInView:function(){return!0},offsetCell:function(Be,Qe){return we.addMonth(Be,Qe)}}),Oe=ge.shortMonths||(we.locale.getShortMonths?we.locale.getShortMonths(ge.locale):[]),Ue=we.setMonth(Ae,0),Le=Re?function(Ge){return Re(Ge,ge)}:void 0;return P.createElement(te,Object.assign({},K,{rowNum:ut,colNum:vt,baseDate:Ue,getCellNode:Le,getCellText:function(Be){return ge.monthFormat?we.locale.format(ge.locale,Be,ge.monthFormat):Oe[we.getMonth(Be)]},getCellClassName:We,getCellDate:we.addMonth,titleCell:function(Be){return we.locale.format(ge.locale,Be,"YYYY-MM")}}))}var Pt=Ht;function Ut(K){var ue=K.prefixCls,ge=K.operationRef,me=K.onViewDateChange,Ae=K.generateConfig,we=K.value,Re=K.viewDate,De=K.onPanelChange,ke=K.onSelect,Ne="".concat(ue,"-month-panel");ge.current={onKeyDown:function(Oe){return _(Oe,{onLeftRight:function(Le){ke(Ae.addMonth(we||Re,Le),"key")},onCtrlLeftRight:function(Le){ke(Ae.addYear(we||Re,Le),"key")},onUpDown:function(Le){ke(Ae.addMonth(we||Re,Le*vt),"key")},onEnter:function(){De("date",we||Re)}})}};var Ke=function(Oe){var Ue=Ae.addYear(Re,Oe);me(Ue),De(null,Ue)};return P.createElement("div",{className:Ne},P.createElement(Rt,Object.assign({},K,{prefixCls:ue,onPrevYear:function(){Ke(-1)},onNextYear:function(){Ke(1)},onYearClick:function(){De("year",Re)}})),P.createElement(Pt,Object.assign({},K,{prefixCls:ue,onSelect:function(Oe){ke(Oe,"mouse"),De("date",Oe)}})))}var Kt=Ut;function It(K){var ue=K.prefixCls,ge=K.generateConfig,me=K.locale,Ae=K.viewDate,we=K.onNextYear,Re=K.onPrevYear,De=K.onYearClick,ke=P.useContext(h),Ne=ke.hideHeader;if(Ne)return null;var Ke="".concat(ue,"-header");return P.createElement(n,Object.assign({},K,{prefixCls:Ke,onSuperPrev:Re,onSuperNext:we}),P.createElement("button",{type:"button",onClick:De,className:"".concat(ue,"-year-btn")},ge.locale.format(me.locale,Ae,me.yearFormat)))}var mn=It,Bn=4,Qt=1;function Ve(K){var ue=K.prefixCls,ge=K.locale,me=K.value,Ae=K.viewDate,we=K.generateConfig,Re=P.useContext(et),De=Re.rangedValue,ke=Re.hoverRangedValue,Ne="".concat(ue,"-cell"),Ke=st({cellPrefixCls:Ne,value:me,generateConfig:we,rangedValue:De,hoverRangedValue:ke,isSameCell:function(Ue,Le){return fe(we,Ue,Le)},isInView:function(){return!0},offsetCell:function(Ue,Le){return we.addMonth(Ue,Le*3)}}),We=we.setDate(we.setMonth(Ae,0),1);return P.createElement(te,Object.assign({},K,{rowNum:Qt,colNum:Bn,baseDate:We,getCellText:function(Ue){return we.locale.format(ge.locale,Ue,ge.quarterFormat||"[Q]Q")},getCellClassName:Ke,getCellDate:function(Ue,Le){return we.addMonth(Ue,Le*3)},titleCell:function(Ue){return we.locale.format(ge.locale,Ue,"YYYY-[Q]Q")}}))}var tt=Ve;function nt(K){var ue=K.prefixCls,ge=K.operationRef,me=K.onViewDateChange,Ae=K.generateConfig,we=K.value,Re=K.viewDate,De=K.onPanelChange,ke=K.onSelect,Ne="".concat(ue,"-quarter-panel");ge.current={onKeyDown:function(Oe){return _(Oe,{onLeftRight:function(Le){ke(Ae.addMonth(we||Re,Le*3),"key")},onCtrlLeftRight:function(Le){ke(Ae.addYear(we||Re,Le),"key")},onUpDown:function(Le){ke(Ae.addYear(we||Re,Le),"key")}})}};var Ke=function(Oe){var Ue=Ae.addYear(Re,Oe);me(Ue),De(null,Ue)};return P.createElement("div",{className:Ne},P.createElement(mn,Object.assign({},K,{prefixCls:ue,onPrevYear:function(){Ke(-1)},onNextYear:function(){Ke(1)},onYearClick:function(){De("year",Re)}})),P.createElement(tt,Object.assign({},K,{prefixCls:ue,onSelect:function(Oe){ke(Oe,"mouse")}})))}var Se=nt;function it(K){var ue=K.prefixCls,ge=K.generateConfig,me=K.viewDate,Ae=K.onPrevDecade,we=K.onNextDecade,Re=K.onDecadeClick,De=P.useContext(h),ke=De.hideHeader;if(ke)return null;var Ne="".concat(ue,"-header"),Ke=ge.getYear(me),We=Math.floor(Ke/Ze)*Ze,Oe=We+Ze-1;return P.createElement(n,Object.assign({},K,{prefixCls:Ne,onSuperPrev:Ae,onSuperNext:we}),P.createElement("button",{type:"button",onClick:Re,className:"".concat(ue,"-decade-btn")},We,"-",Oe))}var ct=it,ft=3,pt=4;function qe(K){var ue=K.prefixCls,ge=K.value,me=K.viewDate,Ae=K.locale,we=K.generateConfig,Re=P.useContext(et),De=Re.rangedValue,ke=Re.hoverRangedValue,Ne="".concat(ue,"-cell"),Ke=we.getYear(me),We=Math.floor(Ke/Ze)*Ze,Oe=We+Ze-1,Ue=we.setYear(me,We-Math.ceil((ft*pt-Ze)/2)),Le=function(Qe){var at=we.getYear(Qe);return We<=at&&at<=Oe},Ge=st({cellPrefixCls:Ne,value:ge,generateConfig:we,rangedValue:De,hoverRangedValue:ke,isSameCell:function(Qe,at){return q(we,Qe,at)},isInView:Le,offsetCell:function(Qe,at){return we.addYear(Qe,at)}});return P.createElement(te,Object.assign({},K,{rowNum:pt,colNum:ft,baseDate:Ue,getCellText:we.getYear,getCellClassName:Ge,getCellDate:we.addYear,titleCell:function(Qe){return we.locale.format(Ae.locale,Qe,"YYYY")}}))}var ot=qe,Ze=10;function St(K){var ue=K.prefixCls,ge=K.operationRef,me=K.onViewDateChange,Ae=K.generateConfig,we=K.value,Re=K.viewDate,De=K.sourceMode,ke=K.onSelect,Ne=K.onPanelChange,Ke="".concat(ue,"-year-panel");ge.current={onKeyDown:function(Ue){return _(Ue,{onLeftRight:function(Ge){ke(Ae.addYear(we||Re,Ge),"key")},onCtrlLeftRight:function(Ge){ke(Ae.addYear(we||Re,Ge*Ze),"key")},onUpDown:function(Ge){ke(Ae.addYear(we||Re,Ge*ft),"key")},onEnter:function(){Ne(De==="date"?"date":"month",we||Re)}})}};var We=function(Ue){var Le=Ae.addYear(Re,Ue*10);me(Le),Ne(null,Le)};return P.createElement("div",{className:Ke},P.createElement(ct,Object.assign({},K,{prefixCls:ue,onPrevDecade:function(){We(-1)},onNextDecade:function(){We(1)},onDecadeClick:function(){Ne("decade",Re)}})),P.createElement(ot,Object.assign({},K,{prefixCls:ue,onSelect:function(Ue){Ne(De==="date"?"date":"month",Ue),ke(Ue,"mouse")}})))}var dt=St;function Mt(K){var ue=K.prefixCls,ge=K.generateConfig,me=K.viewDate,Ae=K.onPrevDecades,we=K.onNextDecades,Re=P.useContext(h),De=Re.hideHeader;if(De)return null;var ke="".concat(ue,"-header"),Ne=ge.getYear(me),Ke=Math.floor(Ne/kt)*kt,We=Ke+kt-1;return P.createElement(n,Object.assign({},K,{prefixCls:ke,onSuperPrev:Ae,onSuperNext:we}),Ke,"-",We)}var Et=Mt,Bt=3,zt=4;function Zt(K){var ue=$e-1,ge=K.prefixCls,me=K.viewDate,Ae=K.generateConfig,we=K.disabledDate,Re="".concat(ge,"-cell"),De=Ae.getYear(me),ke=Math.floor(De/$e)*$e,Ne=Math.floor(De/kt)*kt,Ke=Ne+kt-1,We=Ae.setYear(me,Ne-Math.ceil((Bt*zt*$e-kt)/2)),Oe=function(Le){var Ge,Be=we&&we(Le),Qe=Ae.getYear(Le),at=Qe+ue;return Ge={},Object(A.a)(Ge,"".concat(Re,"-disabled"),Be),Object(A.a)(Ge,"".concat(Re,"-in-view"),Ne<=Qe&&at<=Ke),Object(A.a)(Ge,"".concat(Re,"-selected"),Qe===ke),Ge};return P.createElement(te,Object.assign({},K,{rowNum:zt,colNum:Bt,baseDate:We,getCellText:function(Le){var Ge=Ae.getYear(Le);return"".concat(Ge,"-").concat(Ge+ue)},getCellClassName:Oe,getCellDate:function(Le,Ge){return Ae.addYear(Le,Ge*$e)}}))}var gn=Zt,$e=10,kt=$e*10;function Yt(K){var ue=K.prefixCls,ge=K.onViewDateChange,me=K.generateConfig,Ae=K.viewDate,we=K.operationRef,Re=K.onSelect,De=K.onPanelChange,ke="".concat(ue,"-decade-panel");we.current={onKeyDown:function(Oe){return _(Oe,{onLeftRight:function(Le){Re(me.addYear(Ae,Le*$e),"key")},onCtrlLeftRight:function(Le){Re(me.addYear(Ae,Le*kt),"key")},onUpDown:function(Le){Re(me.addYear(Ae,Le*$e*Bt),"key")},onEnter:function(){De("year",Ae)}})}};var Ne=function(Oe){var Ue=me.addYear(Ae,Oe*kt);ge(Ue),De(null,Ue)},Ke=function(Oe){Re(Oe,"mouse"),De("year",Oe)};return P.createElement("div",{className:ke},P.createElement(Et,Object.assign({},K,{prefixCls:ue,onPrevDecades:function(){Ne(-1)},onNextDecades:function(){Ne(1)}})),P.createElement(gn,Object.assign({},K,{prefixCls:ue,onSelect:Ke})))}var Cn=Yt;function Wt(K,ue,ge){return ge?P.createElement("div",{className:"".concat(K,"-footer-extra")},ge(ue)):null}function Gt(K){var ue=K.prefixCls,ge=K.rangeList,me=ge===void 0?[]:ge,Ae=K.components,we=Ae===void 0?{}:Ae,Re=K.needConfirmButton,De=K.onNow,ke=K.onOk,Ne=K.okDisabled,Ke=K.showNow,We=K.locale,Oe,Ue;if(me.length){var Le=we.rangeItem||"span";Oe=P.createElement(P.Fragment,null,me.map(function(Be){var Qe=Be.label,at=Be.onClick,bt=Be.onMouseEnter,Ot=Be.onMouseLeave;return P.createElement("li",{key:Qe,className:"".concat(ue,"-preset")},P.createElement(Le,{onClick:at,onMouseEnter:bt,onMouseLeave:Ot},Qe))}))}if(Re){var Ge=we.button||"button";De&&!Oe&&Ke!==!1&&(Oe=P.createElement("li",{className:"".concat(ue,"-now")},P.createElement("a",{className:"".concat(ue,"-now-btn"),onClick:De},We.now))),Ue=Re&&P.createElement("li",{className:"".concat(ue,"-ok")},P.createElement(Ge,{disabled:Ne,onClick:ke},We.ok))}return!Oe&&!Ue?null:P.createElement("ul",{className:"".concat(ue,"-ranges")},Oe,Ue)}function vn(K){var ue,ge=K.prefixCls,me=ge===void 0?"rc-picker":ge,Ae=K.className,we=K.style,Re=K.locale,De=K.generateConfig,ke=K.value,Ne=K.defaultValue,Ke=K.pickerValue,We=K.defaultPickerValue,Oe=K.disabledDate,Ue=K.mode,Le=K.picker,Ge=Le===void 0?"date":Le,Be=K.tabIndex,Qe=Be===void 0?0:Be,at=K.showNow,bt=K.showTime,Ot=K.showToday,gt=K.renderExtraFooter,yt=K.hideHeader,xt=K.onSelect,Tt=K.onChange,rn=K.onPanelChange,an=K.onMouseDown,An=K.onPickerValueChange,$t=K.onOk,hn=K.components,dn=K.direction,Vn=K.hourStep,Yn=Vn===void 0?1:Vn,Xn=K.minuteStep,Jn=Xn===void 0?1:Xn,Qn=K.secondStep,jn=Qn===void 0?1:Qn,ar=Ge==="date"&&!!bt||Ge==="time",Hn=24%Yn===0,sr=60%Jn===0,Nt=60%jn===0,Ft=P.useContext(h),Xt=Ft.operationRef,Rn=Ft.panelRef,yn=Ft.onSelect,fn=Ft.hideRanges,On=Ft.defaultOpenValue,In=P.useContext(et),Tn=In.inRange,or=In.panelPosition,Fn=In.rangedValue,lr=In.hoverRangedValue,_n=P.useRef({}),Wn=P.useRef(!0),vr=Object(f.a)(null,{value:ke,defaultValue:Ne,postState:function(mt){return!mt&&On&&Ge==="time"?On:mt}}),Dn=Object(H.a)(vr,2),Ln=Dn[0],dr=Dn[1],Pn=Object(f.a)(null,{value:Ke,defaultValue:We||Ln,postState:function(mt){return mt||De.getNow()}}),Gn=Object(H.a)(Pn,2),bn=Gn[0],pn=Gn[1],En=function(mt){pn(mt),An&&An(mt)},Zn=function(mt){var Dt=O[Ge];return Dt?Dt(mt):mt},un=Object(f.a)(function(){return Ge==="time"?"time":Zn("date")},{value:Ue}),Kn=Object(H.a)(un,2),sn=Kn[0],fr=Kn[1];P.useEffect(function(){fr(Ge)},[Ge]);var tr=P.useState(function(){return sn}),wt=Object(H.a)(tr,2),yr=wt[0],Mn=wt[1],jt=function(mt,Dt){var Nn=Zn(mt||sn);Mn(sn),fr(Nn),rn&&(sn!==Nn||je(De,bn,bn))&&rn(Dt,Nn)},xn=function(mt,Dt){var Nn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;(sn===Ge||Nn)&&(dr(mt),xt&&xt(mt),yn&&yn(mt,Dt),Tt&&!je(De,mt,Ln)&&Tt(mt))},qn=function(mt){return _n.current&&_n.current.onKeyDown?([r.a.LEFT,r.a.RIGHT,r.a.UP,r.a.DOWN,r.a.PAGE_UP,r.a.PAGE_DOWN,r.a.ENTER].includes(mt.which)&&mt.preventDefault(),_n.current.onKeyDown(mt)):(Object(g.a)(!1,"Panel not correct handle keyDown event. Please help to fire issue about this."),!1)},Jt=function(mt){_n.current&&_n.current.onBlur&&_n.current.onBlur(mt)};Xt&&or!=="right"&&(Xt.current={onKeyDown:qn,onClose:function(){_n.current&&_n.current.onClose&&_n.current.onClose()}}),P.useEffect(function(){ke&&!Wn.current&&pn(ke)},[ke]),P.useEffect(function(){Wn.current=!1},[]);var cn,wn=Object(I.a)(Object(I.a)({},K),{},{operationRef:_n,prefixCls:me,viewDate:bn,value:Ln,onViewDateChange:En,sourceMode:yr,onPanelChange:jt,disabledDate:sn!=="decade"?Oe:void 0});delete wn.onChange,delete wn.onSelect;switch(sn){case"decade":cn=P.createElement(Cn,Object.assign({},wn,{onSelect:function(mt,Dt){En(mt),xn(mt,Dt)}}));break;case"year":cn=P.createElement(dt,Object.assign({},wn,{onSelect:function(mt,Dt){En(mt),xn(mt,Dt)}}));break;case"month":cn=P.createElement(Kt,Object.assign({},wn,{onSelect:function(mt,Dt){En(mt),xn(mt,Dt)}}));break;case"quarter":cn=P.createElement(Se,Object.assign({},wn,{onSelect:function(mt,Dt){En(mt),xn(mt,Dt)}}));break;case"week":cn=P.createElement(ht,Object.assign({},wn,{onSelect:function(mt,Dt){En(mt),xn(mt,Dt)}}));break;case"time":delete wn.showTime,cn=P.createElement(U,Object.assign({},wn,Object(o.a)(bt)==="object"?bt:null,{onSelect:function(mt,Dt){En(mt),xn(mt,Dt)}}));break;default:bt?cn=P.createElement(Ie,Object.assign({},wn,{onSelect:function(mt,Dt){En(mt),xn(mt,Dt)}})):cn=P.createElement(ie,Object.assign({},wn,{onSelect:function(mt,Dt){En(mt),xn(mt,Dt)}}))}var ur,pr,$n=function(){var mt=De.getNow(),Dt=Ee(De.getHour(mt),De.getMinute(mt),De.getSecond(mt),Hn?Yn:1,sr?Jn:1,Nt?jn:1),Nn=ve(De,mt,Dt[0],Dt[1],Dt[2]);xn(Nn,"submit")};fn||(ur=Wt(me,sn,gt),pr=Gt({prefixCls:me,components:hn,needConfirmButton:ar,okDisabled:!Ln||Oe&&Oe(Ln),locale:Re,showNow:at,onNow:ar&&$n,onOk:function(){Ln&&(xn(Ln,"submit",!0),$t&&$t(Ln))}}));var mr;if(Ot&&sn==="date"&&Ge==="date"&&!bt){var cr=De.getNow(),en="".concat(me,"-today-btn"),kn=Oe&&Oe(cr);mr=P.createElement("a",{className:C()(en,kn&&"".concat(en,"-disabled")),"aria-disabled":kn,onClick:function(){kn||xn(cr,"mouse",!0)}},Re.today)}return P.createElement(h.Provider,{value:Object(I.a)(Object(I.a)({},Ft),{},{hideHeader:"hideHeader"in K?yt:Ft.hideHeader,hidePrevBtn:Tn&&or==="right",hideNextBtn:Tn&&or==="left"})},P.createElement("div",{tabIndex:Qe,className:C()("".concat(me,"-panel"),Ae,(ue={},Object(A.a)(ue,"".concat(me,"-panel-has-range"),Fn&&Fn[0]&&Fn[1]),Object(A.a)(ue,"".concat(me,"-panel-has-range-hover"),lr&&lr[0]&&lr[1]),Object(A.a)(ue,"".concat(me,"-panel-rtl"),dn==="rtl"),ue)),style:we,onKeyDown:qn,onBlur:Jt,onMouseDown:an,ref:Rn},cn,ur||pr||mr?P.createElement("div",{className:"".concat(me,"-footer")},ur,pr,mr):null))}var ln=vn,qt=j("uciX"),nn={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}};function ir(K){var ue,ge=K.prefixCls,me=K.popupElement,Ae=K.popupStyle,we=K.visible,Re=K.dropdownClassName,De=K.dropdownAlign,ke=K.transitionName,Ne=K.getPopupContainer,Ke=K.children,We=K.range,Oe=K.popupPlacement,Ue=K.direction,Le="".concat(ge,"-dropdown"),Ge=function(){return Oe!==void 0?Oe:Ue==="rtl"?"bottomRight":"bottomLeft"};return P.createElement(qt.a,{showAction:[],hideAction:[],popupPlacement:Ge(),builtinPlacements:nn,prefixCls:Le,popupTransitionName:ke,popup:me,popupAlign:De,popupVisible:we,popupClassName:C()(Re,(ue={},Object(A.a)(ue,"".concat(Le,"-range"),We),Object(A.a)(ue,"".concat(Le,"-rtl"),Ue==="rtl"),ue)),popupStyle:Ae,getPopupContainer:Ne},Ke)}var Yr=ir;function kr(K){var ue=K.open,ge=K.value,me=K.isClickOutside,Ae=K.triggerOpen,we=K.forwardKeyDown,Re=K.blurToCancel,De=K.onSubmit,ke=K.onCancel,Ne=K.onFocus,Ke=K.onBlur,We=Object(P.useState)(!1),Oe=Object(H.a)(We,2),Ue=Oe[0],Le=Oe[1],Ge=Object(P.useState)(!1),Be=Object(H.a)(Ge,2),Qe=Be[0],at=Be[1],bt=Object(P.useRef)(!1),Ot=Object(P.useRef)(!1),gt={onMouseDown:function(){Le(!0),Ae(!0)},onKeyDown:function(xt){switch(xt.which){case r.a.ENTER:{ue?De()!==!1&&Le(!0):Ae(!0),xt.preventDefault();return}case r.a.TAB:{Ue&&ue&&!xt.shiftKey?(Le(!1),xt.preventDefault()):!Ue&&ue&&(!we(xt)&&xt.shiftKey&&(Le(!0),xt.preventDefault()));return}case r.a.ESC:{Le(!0),ke();return}}!ue&&![r.a.SHIFT].includes(xt.which)?Ae(!0):Ue||we(xt)},onFocus:function(xt){Le(!0),at(!0),Ne&&Ne(xt)},onBlur:function(xt){if(bt.current||!me(document.activeElement)){bt.current=!1;return}Re?setTimeout(function(){me(document.activeElement)&&ke()},0):ue&&(Ae(!1),Ot.current&&De()),at(!1),Ke&&Ke(xt)}};return Object(P.useEffect)(function(){Ot.current=!1},[ue]),Object(P.useEffect)(function(){Ot.current=!0},[ge]),Object(P.useEffect)(function(){return c(function(yt){var xt=yt.target;ue&&(me(xt)?Qe||Ae(!1):(bt.current=!0,requestAnimationFrame(function(){bt.current=!1})))})}),[gt,{focused:Qe,typing:Ue}]}function Nr(K){var ue=K.valueTexts,ge=K.onTextChange,me=P.useState(""),Ae=Object(H.a)(me,2),we=Ae[0],Re=Ae[1],De=P.useRef([]);De.current=ue;function ke(Ke){Re(Ke),ge(Ke)}function Ne(){Re(De.current[0])}return P.useEffect(function(){ue.every(function(Ke){return Ke!==we})&&Ne()},[ue.join("||")]),[we,ke,Ne]}var Ai=j("Gytx"),Ri=j.n(Ai);function Sr(K,ue){var ge=ue.formatList,me=ue.generateConfig,Ae=ue.locale;return Object(v.a)(function(){if(!K)return[[""],""];for(var we="",Re=[],De=0;De<ge.length;De+=1){var ke=ge[De],Ne=me.locale.format(Ae.locale,K,ke);Re.push(Ne),De===0&&(we=Ne)}return[Re,we]},[K,ge],function(we,Re){return we[0]!==Re[0]||!Ri()(we[1],Re[1])})}function Ur(K,ue){var ge=ue.formatList,me=ue.generateConfig,Ae=ue.locale,we=Object(P.useState)(null),Re=Object(H.a)(we,2),De=Re[0],ke=Re[1],Ne=Object(P.useRef)(null);function Ke(Be){var Qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(cancelAnimationFrame(Ne.current),Qe){ke(Be);return}Ne.current=requestAnimationFrame(function(){ke(Be)})}var We=Sr(De,{formatList:ge,generateConfig:me,locale:Ae}),Oe=Object(H.a)(We,2),Ue=Oe[1];function Le(Be){Ke(Be)}function Ge(){var Be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Ke(null,Be)}return Object(P.useEffect)(function(){Ge(!0)},[K]),Object(P.useEffect)(function(){return function(){return cancelAnimationFrame(Ne.current)}},[]),[Ue,Le,Ge]}function Oi(K){var ue,ge=K.prefixCls,me=ge===void 0?"rc-picker":ge,Ae=K.id,we=K.tabIndex,Re=K.style,De=K.className,ke=K.dropdownClassName,Ne=K.dropdownAlign,Ke=K.popupStyle,We=K.transitionName,Oe=K.generateConfig,Ue=K.locale,Le=K.inputReadOnly,Ge=K.allowClear,Be=K.autoFocus,Qe=K.showTime,at=K.picker,bt=at===void 0?"date":at,Ot=K.format,gt=K.use12Hours,yt=K.value,xt=K.defaultValue,Tt=K.open,rn=K.defaultOpen,an=K.defaultOpenValue,An=K.suffixIcon,$t=K.clearIcon,hn=K.disabled,dn=K.disabledDate,Vn=K.placeholder,Yn=K.getPopupContainer,Xn=K.pickerRef,Jn=K.panelRender,Qn=K.onChange,jn=K.onOpenChange,ar=K.onFocus,Hn=K.onBlur,sr=K.onMouseDown,Nt=K.onMouseUp,Ft=K.onMouseEnter,Xt=K.onMouseLeave,Rn=K.onContextMenu,yn=K.onClick,fn=K.direction,On=K.autoComplete,In=On===void 0?"off":On,Tn=P.useRef(null),or=bt==="date"&&!!Qe||bt==="time",Fn=re(p(Ot,bt,Qe,gt)),lr=P.useRef(null),_n=P.useRef(null),Wn=Object(f.a)(null,{value:yt,defaultValue:xt}),vr=Object(H.a)(Wn,2),Dn=vr[0],Ln=vr[1],dr=P.useState(Dn),Pn=Object(H.a)(dr,2),Gn=Pn[0],bn=Pn[1],pn=P.useRef(null),En=Object(f.a)(!1,{value:Tt,defaultValue:rn,postState:function(Lt){return hn?!1:Lt},onChange:function(Lt){jn&&jn(Lt),!Lt&&pn.current&&pn.current.onClose&&pn.current.onClose()}}),Zn=Object(H.a)(En,2),un=Zn[0],Kn=Zn[1],sn=Sr(Gn,{formatList:Fn,generateConfig:Oe,locale:Ue}),fr=Object(H.a)(sn,2),tr=fr[0],wt=fr[1],yr=Nr({valueTexts:tr,onTextChange:function(Lt){var hr=Oe.locale.parse(Ue.locale,Lt,Fn);hr&&(!dn||!dn(hr))&&bn(hr)}}),Mn=Object(H.a)(yr,3),jt=Mn[0],xn=Mn[1],qn=Mn[2],Jt=function(Lt){bn(Lt),Ln(Lt),Qn&&!je(Oe,Dn,Lt)&&Qn(Lt,Lt?Oe.locale.format(Ue.locale,Lt,Fn[0]):"")},cn=function(Lt){if(hn&&Lt)return;Kn(Lt)},wn=function(Lt){return un&&pn.current&&pn.current.onKeyDown?pn.current.onKeyDown(Lt):(Object(g.a)(!1,"Picker not correct forward KeyDown operation. Please help to fire issue about this."),!1)},ur=function(){Nt&&Nt.apply(void 0,arguments),Tn.current&&(Tn.current.focus(),cn(!0))},pr=kr({blurToCancel:or,open:un,value:jt,triggerOpen:cn,forwardKeyDown:wn,isClickOutside:function(Lt){return!k([lr.current,_n.current],Lt)},onSubmit:function(){return dn&&dn(Gn)?!1:(Jt(Gn),cn(!1),qn(),!0)},onCancel:function(){cn(!1),bn(Dn),qn()},onFocus:ar,onBlur:Hn}),$n=Object(H.a)(pr,2),mr=$n[0],cr=$n[1],en=cr.focused,kn=cr.typing;P.useEffect(function(){un||(bn(Dn),!tr.length||tr[0]===""?xn(""):wt!==jt&&qn())},[un,tr]),P.useEffect(function(){un||qn()},[bt]),P.useEffect(function(){bn(Dn)},[Dn]),Xn&&(Xn.current={focus:function(){Tn.current&&Tn.current.focus()},blur:function(){Tn.current&&Tn.current.blur()}});var Vt=Object(I.a)(Object(I.a)({},K),{},{className:void 0,style:void 0,pickerValue:void 0,onPickerValueChange:void 0}),mt=P.createElement(ln,Object.assign({},Vt,{generateConfig:Oe,className:C()(Object(A.a)({},"".concat(me,"-panel-focused"),!kn)),value:Gn,locale:Ue,tabIndex:-1,onChange:bn,direction:fn}));Jn&&(mt=Jn(mt));var Dt=P.createElement("div",{className:"".concat(me,"-panel-container"),onMouseDown:function(Lt){Lt.preventDefault()}},mt),Nn;An&&(Nn=P.createElement("span",{className:"".concat(me,"-suffix")},An));var Cr;Ge&&Dn&&!hn&&(Cr=P.createElement("span",{onMouseDown:function(Lt){Lt.preventDefault(),Lt.stopPropagation()},onMouseUp:function(Lt){Lt.preventDefault(),Lt.stopPropagation(),Jt(null),cn(!1)},className:"".concat(me,"-clear")},$t||P.createElement("span",{className:"".concat(me,"-clear-btn")})));var Br=function(Lt,hr){(hr==="submit"||hr!=="key"&&!or)&&(Jt(Lt),cn(!1))},Ar=fn==="rtl"?"bottomRight":"bottomLeft",Rr=Ur(jt,{formatList:Fn,generateConfig:Oe,locale:Ue}),_r=Object(H.a)(Rr,3),Or=_r[0],Ir=_r[1],Sn=_r[2];return P.createElement(h.Provider,{value:{operationRef:pn,hideHeader:bt==="time",panelRef:lr,onSelect:Br,open:un,defaultOpenValue:an,onDateMouseEnter:Ir,onDateMouseLeave:Sn}},P.createElement(Yr,{visible:un,popupElement:Dt,popupStyle:Ke,prefixCls:me,dropdownClassName:ke,dropdownAlign:Ne,getPopupContainer:Yn,transitionName:We,popupPlacement:Ar,direction:fn},P.createElement("div",{className:C()(me,De,(ue={},Object(A.a)(ue,"".concat(me,"-disabled"),hn),Object(A.a)(ue,"".concat(me,"-focused"),en),Object(A.a)(ue,"".concat(me,"-rtl"),fn==="rtl"),ue)),style:Re,onMouseDown:sr,onMouseUp:ur,onMouseEnter:Ft,onMouseLeave:Xt,onContextMenu:Rn,onClick:yn},P.createElement("div",{className:C()("".concat(me,"-input"),Object(A.a)({},"".concat(me,"-input-placeholder"),!!Or)),ref:_n},P.createElement("input",Object.assign({id:Ae,tabIndex:we,disabled:hn,readOnly:Le||!kn,value:Or||jt,onChange:function(Lt){xn(Lt.target.value)},autoFocus:Be,placeholder:Vn,ref:Tn,title:jt},mr,{size:u(bt,Fn[0])},_e(K),{autoComplete:In})),Nn,Cr))))}var Ii=function(K){Object(M.a)(ge,K);var ue=Object(z.a)(ge);function ge(){var me;return Object(ce.a)(this,ge),me=ue.apply(this,arguments),me.pickerRef=P.createRef(),me.focus=function(){me.pickerRef.current&&me.pickerRef.current.focus()},me.blur=function(){me.pickerRef.current&&me.pickerRef.current.blur()},me}return Object(W.a)(ge,[{key:"render",value:function(){return P.createElement(Oi,Object.assign({},this.props,{pickerRef:this.pickerRef}))}}]),ge}(P.Component),Di=Ii;function Li(K,ue,ge){var me=K.picker,Ae=K.locale,we=K.selectedValue,Re=K.disabledDate,De=K.disabled,ke=K.generateConfig,Ne=se(we,0),Ke=se(we,1);function We(Be){var Qe=ke.getYear(Be),at=ke.locale.getWeek(Ae.locale,Be);return Qe*100+at}function Oe(Be){var Qe=ke.getYear(Be),at=ke.getMonth(Be);return Qe*100+at}function Ue(Be){var Qe=ke.getYear(Be),at=ae(ke,Be);return Qe*10+at}var Le=P.useCallback(function(Be){if(Re&&Re(Be))return!0;if(De[1]&&Ke)return!Ce(ke,Be,Ke)&&ke.isAfter(Be,Ke);if(ue&&Ke)switch(me){case"quarter":return Ue(Be)>Ue(Ke);case"month":return Oe(Be)>Oe(Ke);case"week":return We(Be)>We(Ke);default:return!Ce(ke,Be,Ke)&&ke.isAfter(Be,Ke)}return!1},[Re,De[1],Ke,ue]),Ge=P.useCallback(function(Be){if(Re&&Re(Be))return!0;if(De[0]&&Ne)return!Ce(ke,Be,Ke)&&ke.isAfter(Ne,Be);if(ge&&Ne)switch(me){case"quarter":return Ue(Be)<Ue(Ne);case"month":return Oe(Be)<Oe(Ne);case"week":return We(Be)<We(Ne);default:return!Ce(ke,Be,Ne)&&ke.isAfter(Ne,Be)}return!1},[Re,De[0],Ne,ge]);return[Le,Ge]}function Pi(K,ue,ge,me){var Ae=ze(K,ge,me,1);function we(Re){return Re(K,ue)?"same":Re(Ae,ue)?"closing":"far"}switch(ge){case"year":return we(function(Re,De){return xe(me,Re,De)});case"quarter":case"month":return we(function(Re,De){return q(me,Re,De)});default:return we(function(Re,De){return pe(me,Re,De)})}}function Mi(K,ue,ge,me){var Ae=se(K,0),we=se(K,1);if(ue===0)return Ae;if(Ae&&we){var Re=Pi(Ae,we,ge,me);switch(Re){case"same":return Ae;case"closing":return Ae;default:return ze(we,ge,me,-1)}}return Ae}function ki(K){var ue=K.values,ge=K.picker,me=K.defaultDates,Ae=K.generateConfig,we=P.useState(function(){return[se(me,0),se(me,1)]}),Re=Object(H.a)(we,2),De=Re[0],ke=Re[1],Ne=P.useState(null),Ke=Object(H.a)(Ne,2),We=Ke[0],Oe=Ke[1],Ue=se(ue,0),Le=se(ue,1);function Ge(Qe){return De[Qe]?De[Qe]:se(We,Qe)||Mi(ue,Qe,ge,Ae)||Ue||Le||Ae.getNow()}function Be(Qe,at){if(Qe){var bt=ye(We,Qe,at);ke(ye(De,null,at)||[null,null]);var Ot=(at+1)%2;se(ue,Ot)||(bt=ye(bt,Qe,Ot)),Oe(bt)}else(Ue||Le)&&Oe(null)}return[Ge,Be]}function Xr(K,ue){return K&&K[0]&&K[1]&&ue.isAfter(K[0],K[1])?[K[1],K[0]]:K}function Jr(K,ue,ge,me){return K||me&&me[ue]?!0:!!ge[(ue+1)%2]}function Ni(K){var ue,ge,me,Ae=K.prefixCls,we=Ae===void 0?"rc-picker":Ae,Re=K.id,De=K.style,ke=K.className,Ne=K.popupStyle,Ke=K.dropdownClassName,We=K.transitionName,Oe=K.dropdownAlign,Ue=K.getPopupContainer,Le=K.generateConfig,Ge=K.locale,Be=K.placeholder,Qe=K.autoFocus,at=K.disabled,bt=K.format,Ot=K.picker,gt=Ot===void 0?"date":Ot,yt=K.showTime,xt=K.use12Hours,Tt=K.separator,rn=Tt===void 0?"~":Tt,an=K.value,An=K.defaultValue,$t=K.defaultPickerValue,hn=K.open,dn=K.defaultOpen,Vn=K.disabledDate,Yn=K.disabledTime,Xn=K.dateRender,Jn=K.panelRender,Qn=K.ranges,jn=K.allowEmpty,ar=K.allowClear,Hn=K.suffixIcon,sr=K.clearIcon,Nt=K.pickerRef,Ft=K.inputReadOnly,Xt=K.mode,Rn=K.renderExtraFooter,yn=K.onChange,fn=K.onOpenChange,On=K.onPanelChange,In=K.onCalendarChange,Tn=K.onFocus,or=K.onBlur,Fn=K.onOk,lr=K.components,_n=K.order,Wn=K.direction,vr=K.activePickerIndex,Dn=K.autoComplete,Ln=Dn===void 0?"off":Dn,dr=gt==="date"&&!!yt||gt==="time",Pn=Object(P.useRef)({}),Gn=Object(P.useRef)(null),bn=Object(P.useRef)(null),pn=Object(P.useRef)(null),En=Object(P.useRef)(null),Zn=Object(P.useRef)(null),un=Object(P.useRef)(null),Kn=Object(P.useRef)(null),sn=re(p(bt,gt,yt,xt)),fr=Object(f.a)(0,{value:vr}),tr=Object(H.a)(fr,2),wt=tr[0],yr=tr[1],Mn=Object(P.useRef)(null),jt=P.useMemo(function(){return Array.isArray(at)?at:[at||!1,at||!1]},[at]),xn=Object(f.a)(null,{value:an,defaultValue:An,postState:function(rt){return gt==="time"&&!_n?rt:Xr(rt,Le)}}),qn=Object(H.a)(xn,2),Jt=qn[0],cn=qn[1],wn=ki({values:Jt,picker:gt,defaultDates:$t,generateConfig:Le}),ur=Object(H.a)(wn,2),pr=ur[0],$n=ur[1],mr=Object(f.a)(Jt,{postState:function(rt){var _t=rt;if(jt[0]&&jt[1])return _t;for(var At=0;At<2;At+=1)jt[At]&&!se(_t,At)&&!se(jn,At)&&(_t=ye(_t,Le.getNow(),At));return _t}}),cr=Object(H.a)(mr,2),en=cr[0],kn=cr[1],Vt=Object(f.a)([gt,gt],{value:Xt}),mt=Object(H.a)(Vt,2),Dt=mt[0],Nn=mt[1];Object(P.useEffect)(function(){Nn([gt,gt])},[gt]);var Cr=function(rt,_t){Nn(rt),On&&On(_t,rt)},Br=Li({picker:gt,selectedValue:en,locale:Ge,disabled:jt,disabledDate:Vn,generateConfig:Le},Pn.current[1],Pn.current[0]),Ar=Object(H.a)(Br,2),Rr=Ar[0],_r=Ar[1],Or=Object(f.a)(!1,{value:hn,defaultValue:dn,postState:function(rt){return jt[wt]?!1:rt},onChange:function(rt){fn&&fn(rt),!rt&&Mn.current&&Mn.current.onClose&&Mn.current.onClose()}}),Ir=Object(H.a)(Or,2),Sn=Ir[0],on=Ir[1],Lt=Sn&&wt===0,hr=Sn&&wt===1,Fi=Object(P.useState)(0),Qr=Object(H.a)(Fi,2),ji=Qr[0],Hi=Qr[1];Object(P.useEffect)(function(){!Sn&&Gn.current&&Hi(Gn.current.offsetWidth)},[Sn]);var Zr=P.useRef();function br(Ct,rt){if(Ct)clearTimeout(Zr.current),Pn.current[rt]=!0,yr(rt),on(Ct),Sn||$n(null,rt);else if(wt===rt){on(Ct);var _t=Pn.current;Zr.current=setTimeout(function(){_t===Pn.current&&(Pn.current={})})}}function Fr(Ct){br(!0,Ct),setTimeout(function(){var rt=[un,Kn][Ct];rt.current&&rt.current.focus()},0)}function Tr(Ct,rt){var _t=Ct,At=se(_t,0),tn=se(_t,1);At&&tn&&Le.isAfter(At,tn)&&(gt==="week"&&!He(Le,Ge.locale,At,tn)||gt==="quarter"&&!fe(Le,At,tn)||gt!=="week"&>!=="quarter"&>!=="time"&&!Ce(Le,At,tn)?(rt===0?(_t=[At,null],tn=null):(At=null,_t=[null,tn]),Pn.current=Object(A.a)({},rt,!0)):(gt!=="time"||_n!==!1)&&(_t=Xr(_t,Le))),kn(_t);var gr=_t&&_t[0]?Le.locale.format(Ge.locale,_t[0],sn[0]):"",nr=_t&&_t[1]?Le.locale.format(Ge.locale,_t[1],sn[0]):"";if(In){var zn={range:rt===0?"start":"end"};In(_t,[gr,nr],zn)}var er=Jr(At,0,jt,jn),rr=Jr(tn,1,jt,jn),wr=_t===null||er&&rr;wr&&(cn(_t),yn&&(!je(Le,se(Jt,0),At)||!je(Le,se(Jt,1),tn))&&yn(_t,[gr,nr]));var Un=null;rt===0&&!jt[1]?Un=1:rt===1&&!jt[0]&&(Un=0),Un!==null&&Un!==wt&&(!Pn.current[Un]||!se(_t,Un))&&se(_t,rt)?Fr(Un):br(!1,rt)}var Wi=function(rt){return Sn&&Mn.current&&Mn.current.onKeyDown?Mn.current.onKeyDown(rt):(Object(g.a)(!1,"Picker not correct forward KeyDown operation. Please help to fire issue about this."),!1)},qr={formatList:sn,generateConfig:Le,locale:Ge},Gi=Sr(se(en,0),qr),$r=Object(H.a)(Gi,2),Dr=$r[0],Ki=$r[1],zi=Sr(se(en,1),qr),ei=Object(H.a)(zi,2),Lr=ei[0],Vi=ei[1],ti=function(rt,_t){var At=Le.locale.parse(Ge.locale,rt,sn),tn=_t===0?Rr:_r;At&&!tn(At)&&(kn(ye(en,At,_t)),$n(At,_t))},Yi=Nr({valueTexts:Dr,onTextChange:function(rt){return ti(rt,0)}}),jr=Object(H.a)(Yi,3),Pr=jr[0],ni=jr[1],ri=jr[2],Xi=Nr({valueTexts:Lr,onTextChange:function(rt){return ti(rt,1)}}),Hr=Object(H.a)(Xi,3),Mr=Hr[0],ii=Hr[1],ai=Hr[2],Ji=Object(P.useState)(null),si=Object(H.a)(Ji,2),Qi=si[0],oi=si[1],Zi=Object(P.useState)(null),li=Object(H.a)(Zi,2),Er=li[0],ui=li[1],qi=Ur(Pr,{formatList:sn,generateConfig:Le,locale:Ge}),Wr=Object(H.a)(qi,3),ci=Wr[0],$i=Wr[1],hi=Wr[2],ea=Ur(Mr,{formatList:sn,generateConfig:Le,locale:Ge}),Gr=Object(H.a)(ea,3),di=Gr[0],ta=Gr[1],fi=Gr[2],na=function(rt){ui(ye(en,rt,wt)),wt===0?$i(rt):ta(rt)},ra=function(){ui(ye(en,null,wt)),wt===0?hi():fi()},pi=function(rt,_t){return{blurToCancel:dr,forwardKeyDown:Wi,onBlur:or,isClickOutside:function(tn){return!k([bn.current,pn.current,En.current],tn)},onFocus:function(tn){yr(rt),Tn&&Tn(tn)},triggerOpen:function(tn){br(tn,rt)},onSubmit:function(){Tr(en,rt),_t()},onCancel:function(){br(!1,rt),kn(Jt),_t()}}},ia=kr(Object(I.a)(Object(I.a)({},pi(0,ri)),{},{open:Lt,value:Pr})),mi=Object(H.a)(ia,2),aa=mi[0],gi=mi[1],vi=gi.focused,yi=gi.typing,sa=kr(Object(I.a)(Object(I.a)({},pi(1,ai)),{},{open:hr,value:Mr})),_i=Object(H.a)(sa,2),oa=_i[0],bi=_i[1],Ei=bi.focused,xi=bi.typing,la=function(rt){!Sn&&!un.current.contains(rt.target)&&!Kn.current.contains(rt.target)&&(jt[0]?jt[1]||Fr(1):Fr(0))},ua=function(rt){Sn&&(vi||Ei)&&!un.current.contains(rt.target)&&!Kn.current.contains(rt.target)&&rt.preventDefault()},ca=Jt&&Jt[0]?Le.locale.format(Ge.locale,Jt[0],"YYYYMMDDHHmmss"):"",ha=Jt&&Jt[1]?Le.locale.format(Ge.locale,Jt[1],"YYYYMMDDHHmmss"):"";Object(P.useEffect)(function(){Sn||(kn(Jt),!Dr.length||Dr[0]===""?ni(""):Ki!==Pr&&ri(),!Lr.length||Lr[0]===""?ii(""):Vi!==Mr&&ai())},[Sn,Dr,Lr]),Object(P.useEffect)(function(){kn(Jt)},[ca,ha]),Nt&&(Nt.current={focus:function(){un.current&&un.current.focus()},blur:function(){un.current&&un.current.blur(),Kn.current&&Kn.current.blur()}});var da=Object.keys(Qn||{}),fa=da.map(function(Ct){var rt=Qn[Ct],_t=typeof rt=="function"?rt():rt;return{label:Ct,onClick:function(){Tr(_t,null),br(!1,wt)},onMouseEnter:function(){oi(_t)},onMouseLeave:function(){oi(null)}}});function Kr(){var Ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_t=null;Sn&&Er&&Er[0]&&Er[1]&&Le.isAfter(Er[1],Er[0])&&(_t=Er);var At=yt;if(yt&&Object(o.a)(yt)==="object"&&yt.defaultValue){var tn=yt.defaultValue;At=Object(I.a)(Object(I.a)({},yt),{},{defaultValue:se(tn,wt)||void 0})}var gr=null;return Xn&&(gr=function(zn,er){return Xn(zn,er,{range:wt?"end":"start"})}),P.createElement(et.Provider,{value:{inRange:!0,panelPosition:Ct,rangedValue:Qi||en,hoverRangedValue:_t}},P.createElement(ln,Object.assign({},K,rt,{dateRender:gr,showTime:At,mode:Dt[wt],generateConfig:Le,style:void 0,direction:Wn,disabledDate:wt===0?Rr:_r,disabledTime:function(zn){return Yn?Yn(zn,wt===0?"start":"end"):!1},className:C()(Object(A.a)({},"".concat(we,"-panel-focused"),wt===0?!yi:!xi)),value:se(en,wt),locale:Ge,tabIndex:-1,onPanelChange:function(zn,er){Cr(ye(Dt,er,wt),ye(en,zn,wt));var rr=zn;Ct==="right"&&Dt[wt]===er&&(rr=ze(rr,er,Le,-1)),$n(rr,wt)},onOk:null,onSelect:void 0,onChange:void 0,defaultValue:void 0,defaultPickerValue:void 0})))}var xr=0,Ti=0;wt&&pn.current&&Zn.current&&bn.current&&(xr=pn.current.offsetWidth+Zn.current.offsetWidth,bn.current.offsetWidth&&xr>bn.current.offsetWidth&&(Ti=xr));var pa=Wn==="rtl"?{right:xr}:{left:xr};function ma(){var Ct,rt=Wt(we,Dt[wt],Rn),_t=Gt({prefixCls:we,components:lr,needConfirmButton:dr,okDisabled:!se(en,wt)||Vn&&Vn(en[wt]),locale:Ge,rangeList:fa,onOk:function(){se(en,wt)&&(Tr(en,wt),Fn&&Fn(en))}});if(gt!=="time"&&!yt){var At=pr(wt),tn=ze(At,gt,Le),gr=Dt[wt],nr=gr===gt,zn=Kr(nr?"left":!1,{pickerValue:At,onPickerValueChange:function(Un){$n(Un,wt)}}),er=Kr("right",{pickerValue:tn,onPickerValueChange:function(Un){$n(ze(Un,gt,Le,-1),wt)}});Wn==="rtl"?Ct=P.createElement(P.Fragment,null,er,nr&&zn):Ct=P.createElement(P.Fragment,null,zn,nr&&er)}else Ct=Kr();var rr=P.createElement(P.Fragment,null,P.createElement("div",{className:"".concat(we,"-panels")},Ct),(rt||_t)&&P.createElement("div",{className:"".concat(we,"-footer")},rt,_t));return Jn&&(rr=Jn(rr)),P.createElement("div",{className:"".concat(we,"-panel-container"),style:{marginLeft:Ti},ref:bn,onMouseDown:function(Un){Un.preventDefault()}},rr)}var ga=P.createElement("div",{className:C()("".concat(we,"-range-wrapper"),"".concat(we,"-").concat(gt,"-range-wrapper")),style:{minWidth:ji}},P.createElement("div",{className:"".concat(we,"-range-arrow"),style:pa}),ma()),wi;Hn&&(wi=P.createElement("span",{className:"".concat(we,"-suffix")},Hn));var Si;ar&&(se(Jt,0)&&!jt[0]||se(Jt,1)&&!jt[1])&&(Si=P.createElement("span",{onMouseDown:function(rt){rt.preventDefault(),rt.stopPropagation()},onMouseUp:function(rt){rt.preventDefault(),rt.stopPropagation();var _t=Jt;jt[0]||(_t=ye(_t,null,0)),jt[1]||(_t=ye(_t,null,1)),Tr(_t,null),br(!1,wt)},className:"".concat(we,"-clear")},sr||P.createElement("span",{className:"".concat(we,"-clear-btn")})));var Ci={size:u(gt,sn[0])},zr=0,Vr=0;pn.current&&En.current&&Zn.current&&(wt===0?Vr=pn.current.offsetWidth:(zr=xr,Vr=En.current.offsetWidth));var va=Wn==="rtl"?{right:zr}:{left:zr},ya=function(rt,_t){var At=ye(en,rt,wt);_t==="submit"||_t!=="key"&&!dr?(Tr(At,wt),wt===0?hi():fi()):kn(At)};return P.createElement(h.Provider,{value:{operationRef:Mn,hideHeader:gt==="time",onDateMouseEnter:na,onDateMouseLeave:ra,hideRanges:!0,onSelect:ya,open:Sn}},P.createElement(Yr,{visible:Sn,popupElement:ga,popupStyle:Ne,prefixCls:we,dropdownClassName:Ke,dropdownAlign:Oe,getPopupContainer:Ue,transitionName:We,range:!0,direction:Wn},P.createElement("div",Object.assign({ref:Gn,className:C()(we,"".concat(we,"-range"),ke,(ue={},Object(A.a)(ue,"".concat(we,"-disabled"),jt[0]&&jt[1]),Object(A.a)(ue,"".concat(we,"-focused"),wt===0?vi:Ei),Object(A.a)(ue,"".concat(we,"-rtl"),Wn==="rtl"),ue)),style:De,onClick:la,onMouseDown:ua},_e(K)),P.createElement("div",{className:C()("".concat(we,"-input"),(ge={},Object(A.a)(ge,"".concat(we,"-input-active"),wt===0),Object(A.a)(ge,"".concat(we,"-input-placeholder"),!!ci),ge)),ref:pn},P.createElement("input",Object.assign({id:Re,disabled:jt[0],readOnly:Ft||!yi,value:ci||Pr,onChange:function(rt){ni(rt.target.value)},autoFocus:Qe,placeholder:se(Be,0)||"",ref:un},aa,Ci,{autoComplete:Ln}))),P.createElement("div",{className:"".concat(we,"-range-separator"),ref:Zn},rn),P.createElement("div",{className:C()("".concat(we,"-input"),(me={},Object(A.a)(me,"".concat(we,"-input-active"),wt===1),Object(A.a)(me,"".concat(we,"-input-placeholder"),!!di),me)),ref:En},P.createElement("input",Object.assign({disabled:jt[1],readOnly:Ft||!xi,value:di||Mr,onChange:function(rt){ii(rt.target.value)},placeholder:se(Be,1)||"",ref:Kn},oa,Ci,{autoComplete:Ln}))),P.createElement("div",{className:"".concat(we,"-active-bar"),style:Object(I.a)(Object(I.a)({},va),{},{width:Vr,position:"absolute"})}),wi,Si)))}var Ui=function(K){Object(M.a)(ge,K);var ue=Object(z.a)(ge);function ge(){var me;return Object(ce.a)(this,ge),me=ue.apply(this,arguments),me.pickerRef=P.createRef(),me.focus=function(){me.pickerRef.current&&me.pickerRef.current.focus()},me.blur=function(){me.pickerRef.current&&me.pickerRef.current.blur()},me}return Object(W.a)(ge,[{key:"render",value:function(){return P.createElement(Ni,Object.assign({},this.props,{pickerRef:this.pickerRef}))}}]),ge}(P.Component),Bi=Ui,_a=he.b=Di},p5ED:function(Pe,he,j){"use strict";var ce=j("+L6B"),W=j("2/Rp"),M=j("5Dmo"),z=j("3S7+"),A=j("k1fw"),I=j("9og8"),H=j("tJVT"),P=j("WmNS"),e=j.n(P),C=j("q1tI"),g=j.n(C),f=j("vHTk"),o=j.n(f),r=j("yEEn"),a=j("ZW9T"),h=j("1vsH"),s=j("V0Rq"),i=j("m3rI");he.a=function(n){var t,b,v,E,w,x,_,p=n.editOffice,u=p===void 0?"view":p,l=n.data,m=n.theme,c=n.type,T=n.filename,N=n.monacoEditor,D=n.className,y=n.style,O=n.close,k=n.onClose,R=n.hasMask,B=n.disabledDownload,V=Object(C.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),ee=Object(H.a)(V,2),re=ee[0],_e=ee[1],se=Object(C.useState)(""),ye=Object(H.a)(se,2),ve=ye[0],Ee=ye[1],le=Object(C.useState)(),F=Object(H.a)(le,2),d=F[0],S=F[1],L=window.ENV==="build"?"/react/build":"",G=i.a.PROXY_SERVER||location.origin,U,$=1024*1024,de=10*$,xe=Object(C.useRef)();(t=l)!==null&&t!==void 0&&t.startsWith("/api")&&c!=="txt"&&(l=(i.a.API_SERVER||location.origin)+l),c==="office"&&(U=Object(h.T)(l).filesize,U>de&&(c="other")),T&&N&&(N.filename=T),Object(C.useEffect)(function(){var pe,Ce,Me=(pe=document.cookie)===null||pe===void 0||((Ce=pe.replace(/\s/g,""))===null||Ce===void 0)?void 0:Ce.split(";");Me==null||Me.map(function(He){var je=He.split("=");je[0]==="_educoder_session"&&Ee(je[1])})},[]),Object(C.useEffect)(function(){c==="office"&&q()},[c,l]);var q=function(){var pe=Object(I.a)(e.a.mark(function Ce(){var Me,He,je;return e.a.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return console.log("data:",l),Me=l,l.startsWith("http")||(Me=location.origin+Me),He=new URL(Me).pathname.split("/").pop(),Xe.next=6,Object(s.V)({attachment_id:He});case 6:je=Xe.sent,S(je);case 8:case"end":return Xe.stop()}},Ce)}));return function(){return pe.apply(this,arguments)}}(),ae=function(){if(l.startsWith("http")||l.startsWith("blob:")){fe();return}Object(h.z)(T||"educoder",l,T)},fe=function(){Object(h.x)(T||"educoder",decodeURIComponent(l))};return g.a.createElement("div",{style:Object(A.a)({},y||{}),className:"".concat(R&&o.a.bgBlack," ").concat(c?o.a.wrp:"hide")},O&&g.a.createElement("div",{className:o.a.close,ref:xe},!B&&g.a.createElement(z.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return xe.current}},g.a.createElement("span",{onClick:fe},g.a.createElement("i",{className:"icon-quxiaozhiding"}))),g.a.createElement(z.a,{title:"\u5173\u95ED",getPopupContainer:function(){return xe.current}},g.a.createElement("span",{className:"",onClick:k},g.a.createElement("i",{className:"icon-guanbi1"})))),g.a.createElement("div",{className:"".concat(o.a[D]," ").concat(D," ").concat(o.a.monaco," ").concat(c==="txt"?"show":"hide")},c==="txt"&&g.a.createElement(a.b,N)),c==="audio"&&g.a.createElement("audio",{src:"".concat(((b=l)===null||b===void 0?void 0:b.indexOf("http://"))>-1||((v=l)===null||v===void 0?void 0:v.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(l),autoPlay:!0}),c==="video"&&g.a.createElement(g.a.Fragment,null,((E=l)===null||E===void 0?void 0:E.indexOf("http"))>-1?g.a.createElement("video",{controls:!0,src:"".concat(l),autoPlay:!0}):g.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(l),autoPlay:!0})),c==="office"&&d&&g.a.createElement("iframe",{src:"".concat(L,"/office.html?key=").concat(d.key,"&url=").concat(G+d.url,"&callbackUrl=").concat(G+d.callbackUrl,"&fileType=").concat(d.fileType,"&title=").concat(d.title,"&model=").concat(u,"&officeServer=").concat(i.a.OFFICE_SERVER,"&disabledDownload=").concat(!!B)}),c==="html"&&g.a.createElement("iframe",{src:l+"&disposition=inline"}),c==="pdf"&&g.a.createElement("iframe",{src:"".concat(L,"/js/pdfview/index.html?url=").concat(l,"&disabledDownload=").concat(!!B)}),c==="image"&&g.a.createElement("img",{src:"".concat(((w=l)===null||w===void 0?void 0:w.indexOf("http://"))>-1||((x=l)===null||x===void 0?void 0:x.indexOf("https://"))>-1||(_=l)!==null&&_!==void 0&&_.startsWith("/api")?"":"data:image/png;base64,").concat(l)}),c==="other"&&g.a.createElement("div",null,g.a.createElement(W.a,{type:"primary",size:"large",onClick:ae},g.a.createElement(r.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),c==="download"&&g.a.createElement(W.a,{type:"primary",size:"large",onClick:ae},g.a.createElement(r.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},pmY6:function(Pe,he,j){"use strict";j.d(he,"h",function(){return C}),j.d(he,"g",function(){return f}),j.d(he,"f",function(){return o}),j.d(he,"e",function(){return r}),j.d(he,"i",function(){return a}),j.d(he,"b",function(){return h}),j.d(he,"a",function(){return s}),j.d(he,"d",function(){return i}),j.d(he,"c",function(){return n});var ce=j("C/vA"),W=j("JYp7");const M=!1;let z=null;function A(t){z=t}if(M){const t="__is_disposable_tracked__";A(new class{trackDisposable(b){const v=new Error("Potentially leaked disposable").stack;setTimeout(()=>{b[t]||console.log(v)},3e3)}setParent(b,v){if(b&&b!==s.None)try{b[t]=!0}catch(E){}}markAsDisposed(b){if(b&&b!==s.None)try{b[t]=!0}catch(v){}}markAsSingleton(b){}})}function I(t){return z==null||z.trackDisposable(t),t}function H(t){z==null||z.markAsDisposed(t)}function P(t,b){z==null||z.setParent(t,b)}function e(t,b){if(!z)return;for(const v of t)z.setParent(v,b)}function C(t){return z==null||z.markAsSingleton(t),t}class g extends Error{constructor(t){super(`Encountered errors while disposing of store. Errors: [${t.join(", ")}]`);this.errors=t}}function f(t){return typeof t.dispose=="function"&&t.dispose.length===0}function o(t){if(W.a.is(t)){let b=[];for(const v of t)if(v)try{v.dispose()}catch(E){b.push(E)}if(b.length===1)throw b[0];if(b.length>1)throw new g(b);return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function r(...t){const b=a(()=>o(t));return e(t,b),b}function a(t){const b=I({dispose:Object(ce.a)(()=>{H(b),t()})});return b}class h{constructor(){this._toDispose=new Set,this._isDisposed=!1,I(this)}dispose(){if(this._isDisposed)return;H(this),this._isDisposed=!0,this.clear()}clear(){try{o(this._toDispose.values())}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return P(t,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(t),t}}h.DISABLE_DISPOSED_WARNING=!1;class s{constructor(){this._store=new h,I(this),P(this._store,this)}dispose(){H(this),this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}}s.None=Object.freeze({dispose(){}});class i{constructor(){this._isDisposed=!1,I(this)}get value(){return this._isDisposed?void 0:this._value}set value(t){var b;if(this._isDisposed||t===this._value)return;(b=this._value)===null||b===void 0||b.dispose(),t&&P(t,this),this._value=t}clear(){this.value=void 0}dispose(){var t;this._isDisposed=!0,H(this),(t=this._value)===null||t===void 0||t.dispose(),this._value=void 0}clearAndLeak(){const t=this._value;return this._value=void 0,t&&P(t,null),t}}class n{constructor(t){this.object=t}dispose(){}}},psGv:function(Pe,he,j){var ce,W;(function(){var M;(function(){"use strict";var H=[,,function(g){function f(a){this.__parent=a,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=[]}f.prototype.clone_empty=function(){var a=new f(this.__parent);return a.set_indent(this.__indent_count,this.__alignment_count),a},f.prototype.item=function(a){return a<0?this.__items[this.__items.length+a]:this.__items[a]},f.prototype.has_match=function(a){for(var h=this.__items.length-1;h>=0;h--)if(this.__items[h].match(a))return!0;return!1},f.prototype.set_indent=function(a,h){this.is_empty()&&(this.__indent_count=a||0,this.__alignment_count=h||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},f.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)},f.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},f.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var a=this.__parent.current_line;return a.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),a.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),a.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,a.__items[0]===" "&&(a.__items.splice(0,1),a.__character_count-=1),!0}return!1},f.prototype.is_empty=function(){return this.__items.length===0},f.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},f.prototype.push=function(a){this.__items.push(a);var h=a.lastIndexOf(`
|
|
`);h!==-1?this.__character_count=a.length-h:this.__character_count+=a.length},f.prototype.pop=function(){var a=null;return this.is_empty()||(a=this.__items.pop(),this.__character_count-=a.length),a},f.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},f.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},f.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},f.prototype.toString=function(){var a="";return this.is_empty()?this.__parent.indent_empty_lines&&(a=this.__parent.get_indent_string(this.__indent_count)):(a=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),a+=this.__items.join("")),a};function o(a,h){this.__cache=[""],this.__indent_size=a.indent_size,this.__indent_string=a.indent_char,a.indent_with_tabs||(this.__indent_string=new Array(a.indent_size+1).join(a.indent_char)),h=h||"",a.indent_level>0&&(h=new Array(a.indent_level+1).join(this.__indent_string)),this.__base_string=h,this.__base_string_length=h.length}o.prototype.get_indent_size=function(a,h){var s=this.__base_string_length;return h=h||0,a<0&&(s=0),s+=a*this.__indent_size,s+=h,s},o.prototype.get_indent_string=function(a,h){var s=this.__base_string;return h=h||0,a<0&&(a=0,s=""),h+=a*this.__indent_size,this.__ensure_cache(h),s+=this.__cache[h],s},o.prototype.__ensure_cache=function(a){for(;a>=this.__cache.length;)this.__add_column()},o.prototype.__add_column=function(){var a=this.__cache.length,h=0,s="";this.__indent_size&&a>=this.__indent_size&&(h=Math.floor(a/this.__indent_size),a-=h*this.__indent_size,s=new Array(h+1).join(this.__indent_string)),a&&(s+=new Array(a+1).join(" ")),this.__cache.push(s)};function r(a,h){this.__indent_cache=new o(a,h),this.raw=!1,this._end_with_newline=a.end_with_newline,this.indent_size=a.indent_size,this.wrap_line_length=a.wrap_line_length,this.indent_empty_lines=a.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new f(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}r.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},r.prototype.get_line_number=function(){return this.__lines.length},r.prototype.get_indent_string=function(a,h){return this.__indent_cache.get_indent_string(a,h)},r.prototype.get_indent_size=function(a,h){return this.__indent_cache.get_indent_size(a,h)},r.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},r.prototype.add_new_line=function(a){return this.is_empty()||!a&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},r.prototype.get_code=function(a){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 s=this.__lines.join(`
|
|
`);return a!==`
|
|
`&&(s=s.replace(/[\n]/g,a)),s},r.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},r.prototype.set_indent=function(a,h){return a=a||0,h=h||0,this.next_line.set_indent(a,h),this.__lines.length>1?(this.current_line.set_indent(a,h),!0):(this.current_line.set_indent(),!1)},r.prototype.add_raw_token=function(a){for(var h=0;h<a.newlines;h++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(a.whitespace_before),this.current_line.push(a.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},r.prototype.add_token=function(a){this.__add_space_before_token(),this.current_line.push(a),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},r.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(" "))},r.prototype.remove_indent=function(a){for(var h=this.__lines.length;a<h;)this.__lines[a]._remove_indent(),a++;this.current_line._remove_wrap_indent()},r.prototype.trim=function(a){for(a=a===void 0?!1:a,this.current_line.trim();a&&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},r.prototype.just_added_newline=function(){return this.current_line.is_empty()},r.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},r.prototype.ensure_empty_line_above=function(a,h){for(var s=this.__lines.length-2;s>=0;){var i=this.__lines[s];if(i.is_empty())break;if(i.item(0).indexOf(a)!==0&&i.item(-1)!==h){this.__lines.splice(s+1,0,new f(this)),this.previous_line=this.__lines[this.__lines.length-2];break}s--}},g.exports.Output=r},function(g){function f(o,r,a,h){this.type=o,this.text=r,this.comments_before=null,this.newlines=a||0,this.whitespace_before=h||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}g.exports.Token=f},,,function(g){function f(a,h){this.raw_options=o(a,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"])}f.prototype._get_array=function(a,h){var s=this.raw_options[a],i=h||[];return typeof s=="object"?s!==null&&typeof s.concat=="function"&&(i=s.concat()):typeof s=="string"&&(i=s.split(/[^a-zA-Z0-9_\/\-]+/)),i},f.prototype._get_boolean=function(a,h){var s=this.raw_options[a],i=s===void 0?!!h:!!s;return i},f.prototype._get_characters=function(a,h){var s=this.raw_options[a],i=h||"";return typeof s=="string"&&(i=s.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),i},f.prototype._get_number=function(a,h){var s=this.raw_options[a];h=parseInt(h,10),isNaN(h)&&(h=0);var i=parseInt(s,10);return isNaN(i)&&(i=h),i},f.prototype._get_selection=function(a,h,s){var i=this._get_selection_list(a,h,s);if(i.length!==1)throw new Error("Invalid Option Value: The option '"+a+`' can only be one of the following values:
|
|
`+h+`
|
|
You passed in: '`+this.raw_options[a]+"'");return i[0]},f.prototype._get_selection_list=function(a,h,s){if(!h||h.length===0)throw new Error("Selection list cannot be empty.");if(s=s||[h[0]],!this._is_valid_selection(s,h))throw new Error("Invalid Default Value!");var i=this._get_array(a,s);if(!this._is_valid_selection(i,h))throw new Error("Invalid Option Value: The option '"+a+`' can contain only the following values:
|
|
`+h+`
|
|
You passed in: '`+this.raw_options[a]+"'");return i},f.prototype._is_valid_selection=function(a,h){return a.length&&h.length&&!a.some(function(s){return h.indexOf(s)===-1})};function o(a,h){var s={};a=r(a);var i;for(i in a)i!==h&&(s[i]=a[i]);if(h&&a[h])for(i in a[h])s[i]=a[h][i];return s}function r(a){var h={},s;for(s in a){var i=s.replace(/-/g,"_");h[i]=a[s]}return h}g.exports.Options=f,g.exports.normalizeOpts=r,g.exports.mergeOpts=o},,function(g){var f=RegExp.prototype.hasOwnProperty("sticky");function o(r){this.__input=r||"",this.__input_length=this.__input.length,this.__position=0}o.prototype.restart=function(){this.__position=0},o.prototype.back=function(){this.__position>0&&(this.__position-=1)},o.prototype.hasNext=function(){return this.__position<this.__input_length},o.prototype.next=function(){var r=null;return this.hasNext()&&(r=this.__input.charAt(this.__position),this.__position+=1),r},o.prototype.peek=function(r){var a=null;return r=r||0,r+=this.__position,r>=0&&r<this.__input_length&&(a=this.__input.charAt(r)),a},o.prototype.__match=function(r,a){r.lastIndex=a;var h=r.exec(this.__input);return h&&!(f&&r.sticky)&&(h.index!==a&&(h=null)),h},o.prototype.test=function(r,a){return a=a||0,a+=this.__position,a>=0&&a<this.__input_length?!!this.__match(r,a):!1},o.prototype.testChar=function(r,a){var h=this.peek(a);return r.lastIndex=0,h!==null&&r.test(h)},o.prototype.match=function(r){var a=this.__match(r,this.__position);return a?this.__position+=a[0].length:a=null,a},o.prototype.read=function(r,a,h){var s="",i;return r&&(i=this.match(r),i&&(s+=i[0])),a&&(i||!r)&&(s+=this.readUntil(a,h)),s},o.prototype.readUntil=function(r,a){var h="",s=this.__position;r.lastIndex=this.__position;var i=r.exec(this.__input);return i?(s=i.index,a&&(s+=i[0].length)):s=this.__input_length,h=this.__input.substring(this.__position,s),this.__position=s,h},o.prototype.readUntilAfter=function(r){return this.readUntil(r,!0)},o.prototype.get_regexp=function(r,a){var h=null,s="g";return a&&f&&(s="y"),typeof r=="string"&&r!==""?h=new RegExp(r,s):r&&(h=new RegExp(r.source,s)),h},o.prototype.get_literal_regexp=function(r){return RegExp(r.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},o.prototype.peekUntilAfter=function(r){var a=this.__position,h=this.readUntilAfter(r);return this.__position=a,h},o.prototype.lookBack=function(r){var a=this.__position-1;return a>=r.length&&this.__input.substring(a-r.length,a).toLowerCase()===r},g.exports.InputScanner=o},function(g,f,o){var r=o(8).InputScanner,a=o(3).Token,h=o(10).TokenStream,s=o(11).WhitespacePattern,i={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},n=function(t,b){this._input=new r(t),this._options=b||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new s(this._input)};n.prototype.tokenize=function(){this._input.restart(),this.__tokens=new h,this._reset();for(var t,b=new a(i.START,""),v=null,E=[],w=new h;b.type!==i.EOF;){for(t=this._get_next_token(b,v);this._is_comment(t);)w.add(t),t=this._get_next_token(b,v);w.isEmpty()||(t.comments_before=w,w=new h),t.parent=v,this._is_opening(t)?(E.push(v),v=t):v&&this._is_closing(t,v)&&(t.opened=v,v.closed=t,v=E.pop(),t.parent=v),t.previous=b,b.next=t,this.__tokens.add(t),b=t}return this.__tokens},n.prototype._is_first_token=function(){return this.__tokens.isEmpty()},n.prototype._reset=function(){},n.prototype._get_next_token=function(t,b){this._readWhitespace();var v=this._input.read(/.+/g);return v?this._create_token(i.RAW,v):this._create_token(i.EOF,"")},n.prototype._is_comment=function(t){return!1},n.prototype._is_opening=function(t){return!1},n.prototype._is_closing=function(t,b){return!1},n.prototype._create_token=function(t,b){var v=new a(t,b,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return v},n.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},g.exports.Tokenizer=n,g.exports.TOKEN=i},function(g){function f(o){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=o}f.prototype.restart=function(){this.__position=0},f.prototype.isEmpty=function(){return this.__tokens_length===0},f.prototype.hasNext=function(){return this.__position<this.__tokens_length},f.prototype.next=function(){var o=null;return this.hasNext()&&(o=this.__tokens[this.__position],this.__position+=1),o},f.prototype.peek=function(o){var r=null;return o=o||0,o+=this.__position,o>=0&&o<this.__tokens_length&&(r=this.__tokens[o]),r},f.prototype.add=function(o){this.__parent_token&&(o.parent=this.__parent_token),this.__tokens.push(o),this.__tokens_length+=1},g.exports.TokenStream=f},function(g,f,o){var r=o(12).Pattern;function a(h,s){r.call(this,h,s),s?this._line_regexp=this._input.get_regexp(s._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}a.prototype=new r,a.prototype.__set_whitespace_patterns=function(h,s){h+="\\t ",s+="\\n\\r",this._match_pattern=this._input.get_regexp("["+h+s+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+s+"]")},a.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 s=this.__split(this._newline_regexp,h);this.newline_count=s.length-1,this.whitespace_before_token=s[this.newline_count]}return h},a.prototype.matching=function(h,s){var i=this._create();return i.__set_whitespace_patterns(h,s),i._update(),i},a.prototype._create=function(){return new a(this._input,this)},a.prototype.__split=function(h,s){h.lastIndex=0;for(var i=0,n=[],t=h.exec(s);t;)n.push(s.substring(i,t.index)),i=t.index+t[0].length,t=h.exec(s);return i<s.length?n.push(s.substring(i,s.length)):n.push(""),n},g.exports.WhitespacePattern=a},function(g){function f(o,r){this._input=o,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,r&&(this._starting_pattern=this._input.get_regexp(r._starting_pattern,!0),this._match_pattern=this._input.get_regexp(r._match_pattern,!0),this._until_pattern=this._input.get_regexp(r._until_pattern),this._until_after=r._until_after)}f.prototype.read=function(){var o=this._input.read(this._starting_pattern);return(!this._starting_pattern||o)&&(o+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),o},f.prototype.read_match=function(){return this._input.match(this._match_pattern)},f.prototype.until_after=function(o){var r=this._create();return r._until_after=!0,r._until_pattern=this._input.get_regexp(o),r._update(),r},f.prototype.until=function(o){var r=this._create();return r._until_after=!1,r._until_pattern=this._input.get_regexp(o),r._update(),r},f.prototype.starting_with=function(o){var r=this._create();return r._starting_pattern=this._input.get_regexp(o,!0),r._update(),r},f.prototype.matching=function(o){var r=this._create();return r._match_pattern=this._input.get_regexp(o,!0),r._update(),r},f.prototype._create=function(){return new f(this._input,this)},f.prototype._update=function(){},g.exports.Pattern=f},function(g){function f(o,r){o=typeof o=="string"?o:o.source,r=typeof r=="string"?r:r.source,this.__directives_block_pattern=new RegExp(o+/ beautify( \w+[:]\w+)+ /.source+r,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(o+/\sbeautify\signore:end\s/.source+r,"g")}f.prototype.get_directives=function(o){if(!o.match(this.__directives_block_pattern))return null;var r={};this.__directive_pattern.lastIndex=0;for(var a=this.__directive_pattern.exec(o);a;)r[a[1]]=a[2],a=this.__directive_pattern.exec(o);return r},f.prototype.readIgnored=function(o){return o.readUntilAfter(this.__directives_end_ignore_pattern)},g.exports.Directives=f},function(g,f,o){var r=o(12).Pattern,a={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function h(s,i){r.call(this,s,i),this.__template_pattern=null,this._disabled=Object.assign({},a),this._excluded=Object.assign({},a),i&&(this.__template_pattern=this._input.get_regexp(i.__template_pattern),this._excluded=Object.assign(this._excluded,i._excluded),this._disabled=Object.assign(this._disabled,i._disabled));var n=new r(s);this.__patterns={handlebars_comment:n.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:n.starting_with(/{{{/).until_after(/}}}/),handlebars:n.starting_with(/{{/).until_after(/}}/),php:n.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:n.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:n.starting_with(/{%/).until_after(/%}/),django_value:n.starting_with(/{{/).until_after(/}}/),django_comment:n.starting_with(/{#/).until_after(/#}/),smarty:n.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:n.starting_with(/{\*/).until_after(/\*}/),smarty_literal:n.starting_with(/{literal}/).until_after(/{\/literal}/)}}h.prototype=new r,h.prototype._create=function(){return new h(this._input,this)},h.prototype._update=function(){this.__set_templated_pattern()},h.prototype.disable=function(s){var i=this._create();return i._disabled[s]=!0,i._update(),i},h.prototype.read_options=function(s){var i=this._create();for(var n in a)i._disabled[n]=s.templating.indexOf(n)===-1;return i._update(),i},h.prototype.exclude=function(s){var i=this._create();return i._excluded[s]=!0,i._update(),i},h.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 i=this._read_template();i;)this._match_pattern?i+=this._input.read(this._match_pattern):i+=this._input.readUntil(this.__template_pattern),s+=i,i=this._read_template();return this._until_after&&(s+=this._input.readUntilAfter(this._until_pattern)),s},h.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("|")+")")},h.prototype._read_template=function(){var s="",i=this._input.peek();if(i==="<"){var n=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&n==="?"&&(s=s||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&n==="%"&&(s=s||this.__patterns.erb.read())}else i==="{"&&(!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},g.exports.TemplatablePattern=h},,,,function(g,f,o){var r=o(19).Beautifier,a=o(20).Options;function h(s,i,n,t){var b=new r(s,i,n,t);return b.beautify()}g.exports=h,g.exports.defaultOptions=function(){return new a}},function(g,f,o){var r=o(20).Options,a=o(2).Output,h=o(21).Tokenizer,s=o(21).TOKEN,i=/\r\n|[\r\n]/,n=/\r\n|[\r\n]/g,t=function(m,c){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=m.max_preserve_newlines,this.preserve_newlines=m.preserve_newlines,this._output=new a(m,c)};t.prototype.current_line_has_match=function(m){return this._output.current_line.has_match(m)},t.prototype.set_space_before_token=function(m,c){this._output.space_before_token=m,this._output.non_breaking_space=c},t.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},t.prototype.add_raw_token=function(m){this._output.add_raw_token(m)},t.prototype.print_preserved_newlines=function(m){var c=0;m.type!==s.TEXT&&m.previous.type!==s.TEXT&&(c=m.newlines?1:0),this.preserve_newlines&&(c=m.newlines<this.max_preserve_newlines+1?m.newlines:this.max_preserve_newlines+1);for(var T=0;T<c;T++)this.print_newline(T>0);return c!==0},t.prototype.traverse_whitespace=function(m){return m.whitespace_before||m.newlines?(this.print_preserved_newlines(m)||(this._output.space_before_token=!0),!0):!1},t.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},t.prototype.print_newline=function(m){this._output.add_new_line(m)},t.prototype.print_token=function(m){m.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(m.text))},t.prototype.indent=function(){this.indent_level++},t.prototype.get_full_indent=function(m){return m=this.indent_level+(m||0),m<1?"":this._output.get_indent_string(m)};var b=function(m){for(var c=null,T=m.next;T.type!==s.EOF&&m.closed!==T;){if(T.type===s.ATTRIBUTE&&T.text==="type"){T.next&&T.next.type===s.EQUALS&&T.next.next&&T.next.next.type===s.VALUE&&(c=T.next.next.text);break}T=T.next}return c},v=function(m,c){var T=null,N=null;return c.closed?(m==="script"?T="text/javascript":m==="style"&&(T="text/css"),T=b(c)||T,T.search("text/css")>-1?N="css":T.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?N="javascript":T.search(/(text|application|dojo)\/(x-)?(html)/)>-1?N="html":T.search(/test\/null/)>-1&&(N="null"),N):null};function E(m,c){return c.indexOf(m)!==-1}function w(m,c,T){this.parent=m||null,this.tag=c?c.tag_name:"",this.indent_level=T||0,this.parser_token=c||null}function x(m){this._printer=m,this._current_frame=null}x.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},x.prototype.record_tag=function(m){var c=new w(this._current_frame,m,this._printer.indent_level);this._current_frame=c},x.prototype._try_pop_frame=function(m){var c=null;return m&&(c=m.parser_token,this._printer.indent_level=m.indent_level,this._current_frame=m.parent),c},x.prototype._get_frame=function(m,c){for(var T=this._current_frame;T&&!(m.indexOf(T.tag)!==-1);){if(c&&c.indexOf(T.tag)!==-1){T=null;break}T=T.parent}return T},x.prototype.try_pop=function(m,c){var T=this._get_frame([m],c);return this._try_pop_frame(T)},x.prototype.indent_to_tag=function(m){var c=this._get_frame(m);c&&(this._printer.indent_level=c.indent_level)};function _(m,c,T,N){this._source_text=m||"",c=c||{},this._js_beautify=T,this._css_beautify=N,this._tag_stack=null;var D=new r(c,"html");this._options=D,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"}_.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var m=this._source_text,c=this._options.eol;this._options.eol==="auto"&&(c=`
|
|
`,m&&i.test(m)&&(c=m.match(i)[0])),m=m.replace(n,`
|
|
`);var T=m.match(/^[\t ]*/)[0],N={text:"",type:""},D=new p,y=new t(this._options,T),O=new h(m,this._options).tokenize();this._tag_stack=new x(y);for(var k=null,R=O.next();R.type!==s.EOF;)R.type===s.TAG_OPEN||R.type===s.COMMENT?(k=this._handle_tag_open(y,R,D,N),D=k):R.type===s.ATTRIBUTE||R.type===s.EQUALS||R.type===s.VALUE||R.type===s.TEXT&&!D.tag_complete?k=this._handle_inside_tag(y,R,D,O):R.type===s.TAG_CLOSE?k=this._handle_tag_close(y,R,D):R.type===s.TEXT?k=this._handle_text(y,R,D):y.add_raw_token(R),N=k,R=O.next();var B=y._output.get_code(c);return B},_.prototype._handle_tag_close=function(m,c,T){var N={text:c.text,type:c.type};return m.alignment_size=0,T.tag_complete=!0,m.set_space_before_token(c.newlines||c.whitespace_before!=="",!0),T.is_unformatted?m.add_raw_token(c):(T.tag_start_char==="<"&&(m.set_space_before_token(c.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&T.has_wrapped_attrs&&m.print_newline(!1)),m.print_token(c)),T.indent_content&&!(T.is_unformatted||T.is_content_unformatted)&&(m.indent(),T.indent_content=!1),!T.is_inline_element&&!(T.is_unformatted||T.is_content_unformatted)&&m.set_wrap_point(),N},_.prototype._handle_inside_tag=function(m,c,T,N){var D=T.has_wrapped_attrs,y={text:c.text,type:c.type};if(m.set_space_before_token(c.newlines||c.whitespace_before!=="",!0),T.is_unformatted)m.add_raw_token(c);else if(T.tag_start_char==="{"&&c.type===s.TEXT)m.print_preserved_newlines(c)?(c.newlines=0,m.add_raw_token(c)):m.print_token(c);else{if(c.type===s.ATTRIBUTE?(m.set_space_before_token(!0),T.attr_count+=1):(c.type===s.EQUALS||c.type===s.VALUE&&c.previous.type===s.EQUALS)&&m.set_space_before_token(!1),c.type===s.ATTRIBUTE&&T.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(m.traverse_whitespace(c),D=D||c.newlines!==0),this._is_wrap_attributes_force)){var O=T.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&T.attr_count===1){var k=!0,R=0,B;do{if(B=N.peek(R),B.type===s.ATTRIBUTE){k=!1;break}R+=1}while(R<4&&B.type!==s.EOF&&B.type!==s.TAG_CLOSE);O=!k}O&&(m.print_newline(!1),D=!0)}m.print_token(c),D=D||m.previous_token_wrapped(),T.has_wrapped_attrs=D}return y},_.prototype._handle_text=function(m,c,T){var N={text:c.text,type:"TK_CONTENT"};return T.custom_beautifier_name?this._print_custom_beatifier_text(m,c,T):T.is_unformatted||T.is_content_unformatted?m.add_raw_token(c):(m.traverse_whitespace(c),m.print_token(c)),N},_.prototype._print_custom_beatifier_text=function(m,c,T){var N=this;if(c.text!==""){var D=c.text,y,O=1,k="",R="";T.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?y=this._js_beautify:T.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?y=this._css_beautify:T.custom_beautifier_name==="html"&&(y=function(se,ye){var ve=new _(se,ye,N._js_beautify,N._css_beautify);return ve.beautify()}),this._options.indent_scripts==="keep"?O=0:this._options.indent_scripts==="separate"&&(O=-m.indent_level);var B=m.get_full_indent(O);if(D=D.replace(/\n[ \t]*$/,""),T.custom_beautifier_name!=="html"&&D[0]==="<"&&D.match(/^(<!--|<!\[CDATA\[)/)){var V=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(D);if(!V){m.add_raw_token(c);return}k=B+V[1]+`
|
|
`,D=V[4],V[5]&&(R=B+V[5]),D=D.replace(/\n[ \t]*$/,""),(V[2]||V[3].indexOf(`
|
|
`)!==-1)&&(V=V[3].match(/[ \t]+$/),V&&(c.whitespace_before=V[0]))}if(D)if(y){var ee=function(){this.eol=`
|
|
`};ee.prototype=this._options.raw_options;var re=new ee;D=y(B+D,re)}else{var _e=c.whitespace_before;_e&&(D=D.replace(new RegExp(`
|
|
(`+_e+")?","g"),`
|
|
`)),D=B+D.replace(/\n/g,`
|
|
`+B)}k&&(D?D=k+D+`
|
|
`+R:D=k+R),m.print_newline(!1),D&&(c.text=D,c.whitespace_before="",c.newlines=0,m.add_raw_token(c),m.print_newline(!0))}},_.prototype._handle_tag_open=function(m,c,T,N){var D=this._get_tag_open_token(c);return(T.is_unformatted||T.is_content_unformatted)&&!T.is_empty_element&&c.type===s.TAG_OPEN&&c.text.indexOf("</")===0?(m.add_raw_token(c),D.start_tag_token=this._tag_stack.try_pop(D.tag_name)):(m.traverse_whitespace(c),this._set_tag_position(m,c,D,T,N),D.is_inline_element||m.set_wrap_point(),m.print_token(c)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(D.alignment_size=c.text.length+1),!D.tag_complete&&!D.is_unformatted&&(m.alignment_size=D.alignment_size),D};var p=function(m,c){if(this.parent=m||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="",!c)this.tag_complete=!0;else{var T;this.tag_start_char=c.text[0],this.text=c.text,this.tag_start_char==="<"?(T=c.text.match(/^<([^\s>]*)/),this.tag_check=T?T[1]:""):(T=c.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=T?T[1]:"",(c.text.startsWith("{{#>")||c.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&c.next!==null?this.tag_check=c.next.text.split(" ")[0]:this.tag_check=c.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),c.type===s.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||c.closed&&c.closed.text==="/>";var N=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(N=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(N)))}};_.prototype._get_tag_open_token=function(m){var c=new p(this._tag_stack.get_parser_token(),m);return c.alignment_size=this._options.wrap_attributes_indent_size,c.is_end_tag=c.is_end_tag||E(c.tag_check,this._options.void_elements),c.is_empty_element=c.tag_complete||c.is_start_tag&&c.is_end_tag,c.is_unformatted=!c.tag_complete&&E(c.tag_check,this._options.unformatted),c.is_content_unformatted=!c.is_empty_element&&E(c.tag_check,this._options.content_unformatted),c.is_inline_element=E(c.tag_name,this._options.inline)||c.tag_name.includes("-")||c.tag_start_char==="{",c},_.prototype._set_tag_position=function(m,c,T,N,D){if(T.is_empty_element||(T.is_end_tag?T.start_tag_token=this._tag_stack.try_pop(T.tag_name):(this._do_optional_end_element(T)&&(T.is_inline_element||m.print_newline(!1)),this._tag_stack.record_tag(T),(T.tag_name==="script"||T.tag_name==="style")&&!(T.is_unformatted||T.is_content_unformatted)&&(T.custom_beautifier_name=v(T.tag_check,c)))),E(T.tag_check,this._options.extra_liners)&&(m.print_newline(!1),m._output.just_added_blankline()||m.print_newline(!0)),T.is_empty_element){if(T.tag_start_char==="{"&&T.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),T.indent_content=!0;var y=m.current_line_has_match(/{{#if/);y||m.print_newline(!1)}T.tag_name==="!--"&&D.type===s.TAG_CLOSE&&N.is_end_tag&&T.text.indexOf(`
|
|
`)===-1||(T.is_inline_element||T.is_unformatted||m.print_newline(!1),this._calcluate_parent_multiline(m,T))}else if(T.is_end_tag){var O=!1;O=T.start_tag_token&&T.start_tag_token.multiline_content,O=O||!T.is_inline_element&&!(N.is_inline_element||N.is_unformatted)&&!(D.type===s.TAG_CLOSE&&T.start_tag_token===N)&&D.type!=="TK_CONTENT",(T.is_content_unformatted||T.is_unformatted)&&(O=!1),O&&m.print_newline(!1)}else T.indent_content=!T.custom_beautifier_name,T.tag_start_char==="<"&&(T.tag_name==="html"?T.indent_content=this._options.indent_inner_html:T.tag_name==="head"?T.indent_content=this._options.indent_head_inner_html:T.tag_name==="body"&&(T.indent_content=this._options.indent_body_inner_html)),!(T.is_inline_element||T.is_unformatted)&&(D.type!=="TK_CONTENT"||T.is_content_unformatted)&&m.print_newline(!1),this._calcluate_parent_multiline(m,T)},_.prototype._calcluate_parent_multiline=function(m,c){c.parent&&m._output.just_added_newline()&&!((c.is_inline_element||c.is_unformatted)&&c.parent.is_inline_element)&&(c.parent.multiline_content=!0)};var u=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],l=["a","audio","del","ins","map","noscript","video"];_.prototype._do_optional_end_element=function(m){var c=null;if(m.is_empty_element||!m.is_start_tag||!m.parent)return;if(m.tag_name==="body")c=c||this._tag_stack.try_pop("head");else if(m.tag_name==="li")c=c||this._tag_stack.try_pop("li",["ol","ul"]);else if(m.tag_name==="dd"||m.tag_name==="dt")c=c||this._tag_stack.try_pop("dt",["dl"]),c=c||this._tag_stack.try_pop("dd",["dl"]);else if(m.parent.tag_name==="p"&&u.indexOf(m.tag_name)!==-1){var T=m.parent.parent;(!T||l.indexOf(T.tag_name)===-1)&&(c=c||this._tag_stack.try_pop("p"))}else m.tag_name==="rp"||m.tag_name==="rt"?(c=c||this._tag_stack.try_pop("rt",["ruby","rtc"]),c=c||this._tag_stack.try_pop("rp",["ruby","rtc"])):m.tag_name==="optgroup"?c=c||this._tag_stack.try_pop("optgroup",["select"]):m.tag_name==="option"?c=c||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):m.tag_name==="colgroup"?c=c||this._tag_stack.try_pop("caption",["table"]):m.tag_name==="thead"?(c=c||this._tag_stack.try_pop("caption",["table"]),c=c||this._tag_stack.try_pop("colgroup",["table"])):m.tag_name==="tbody"||m.tag_name==="tfoot"?(c=c||this._tag_stack.try_pop("caption",["table"]),c=c||this._tag_stack.try_pop("colgroup",["table"]),c=c||this._tag_stack.try_pop("thead",["table"]),c=c||this._tag_stack.try_pop("tbody",["table"])):m.tag_name==="tr"?(c=c||this._tag_stack.try_pop("caption",["table"]),c=c||this._tag_stack.try_pop("colgroup",["table"]),c=c||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(m.tag_name==="th"||m.tag_name==="td")&&(c=c||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),c=c||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return m.parent=this._tag_stack.get_parser_token(),c},g.exports.Beautifier=_},function(g,f,o){var r=o(6).Options;function a(h){r.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"])}a.prototype=new r,g.exports.Options=a},function(g,f,o){var r=o(9).Tokenizer,a=o(9).TOKEN,h=o(13).Directives,s=o(14).TemplatablePattern,i=o(12).Pattern,n={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:a.START,RAW:a.RAW,EOF:a.EOF},t=new h(/<\!--/,/-->/),b=function(v,E){r.call(this,v,E),this._current_tag_name="";var w=new s(this._input).read_options(this._options),x=new i(this._input);if(this.__patterns={word:w.until(/[\n\r\t <]/),single_quote:w.until_after(/'/),double_quote:w.until_after(/"/),attribute:w.until(/[\n\r\t =>]|\/>/),element_name:w.until(/[\n\r\t >\/]/),handlebars_comment:x.starting_with(/{{!--/).until_after(/--}}/),handlebars:x.starting_with(/{{/).until_after(/}}/),handlebars_open:x.until(/[\n\r\t }]/),handlebars_raw_close:x.until(/}}/),comment:x.starting_with(/<!--/).until_after(/-->/),cdata:x.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:x.starting_with(/<!\[/).until_after(/]>/),processing:x.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var _=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=x.matching(_).until_after(_)}};b.prototype=new r,b.prototype._is_comment=function(v){return!1},b.prototype._is_opening=function(v){return v.type===n.TAG_OPEN},b.prototype._is_closing=function(v,E){return v.type===n.TAG_CLOSE&&E&&((v.text===">"||v.text==="/>")&&E.text[0]==="<"||v.text==="}}"&&E.text[0]==="{"&&E.text[1]==="{")},b.prototype._reset=function(){this._current_tag_name=""},b.prototype._get_next_token=function(v,E){var w=null;this._readWhitespace();var x=this._input.peek();return x===null?this._create_token(n.EOF,""):(w=w||this._read_open_handlebars(x,E),w=w||this._read_attribute(x,v,E),w=w||this._read_close(x,E),w=w||this._read_raw_content(x,v,E),w=w||this._read_content_word(x),w=w||this._read_comment_or_cdata(x),w=w||this._read_processing(x),w=w||this._read_open(x,E),w=w||this._create_token(n.UNKNOWN,this._input.next()),w)},b.prototype._read_comment_or_cdata=function(v){var E=null,w=null,x=null;if(v==="<"){var _=this._input.peek(1);_==="!"&&(w=this.__patterns.comment.read(),w?(x=t.get_directives(w),x&&x.ignore==="start"&&(w+=t.readIgnored(this._input))):w=this.__patterns.cdata.read()),w&&(E=this._create_token(n.COMMENT,w),E.directives=x)}return E},b.prototype._read_processing=function(v){var E=null,w=null,x=null;if(v==="<"){var _=this._input.peek(1);(_==="!"||_==="?")&&(w=this.__patterns.conditional_comment.read(),w=w||this.__patterns.processing.read()),w&&(E=this._create_token(n.COMMENT,w),E.directives=x)}return E},b.prototype._read_open=function(v,E){var w=null,x=null;return E||v==="<"&&(w=this._input.next(),this._input.peek()==="/"&&(w+=this._input.next()),w+=this.__patterns.element_name.read(),x=this._create_token(n.TAG_OPEN,w)),x},b.prototype._read_open_handlebars=function(v,E){var w=null,x=null;return E||this._options.indent_handlebars&&v==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(w=this.__patterns.handlebars_comment.read(),w=w||this.__patterns.handlebars.read(),x=this._create_token(n.COMMENT,w)):(w=this.__patterns.handlebars_open.read(),x=this._create_token(n.TAG_OPEN,w))),x},b.prototype._read_close=function(v,E){var w=null,x=null;return E&&(E.text[0]==="<"&&(v===">"||v==="/"&&this._input.peek(1)===">")?(w=this._input.next(),v==="/"&&(w+=this._input.next()),x=this._create_token(n.TAG_CLOSE,w)):E.text[0]==="{"&&v==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),x=this._create_token(n.TAG_CLOSE,"}}"))),x},b.prototype._read_attribute=function(v,E,w){var x=null,_="";if(w&&w.text[0]==="<")if(v==="=")x=this._create_token(n.EQUALS,this._input.next());else if(v==='"'||v==="'"){var p=this._input.next();v==='"'?p+=this.__patterns.double_quote.read():p+=this.__patterns.single_quote.read(),x=this._create_token(n.VALUE,p)}else _=this.__patterns.attribute.read(),_&&(E.type===n.EQUALS?x=this._create_token(n.VALUE,_):x=this._create_token(n.ATTRIBUTE,_));return x},b.prototype._is_content_unformatted=function(v){return this._options.void_elements.indexOf(v)===-1&&(this._options.content_unformatted.indexOf(v)!==-1||this._options.unformatted.indexOf(v)!==-1)},b.prototype._read_raw_content=function(v,E,w){var x="";if(w&&w.text[0]==="{")x=this.__patterns.handlebars_raw_close.read();else if(E.type===n.TAG_CLOSE&&E.opened.text[0]==="<"&&E.text[0]!=="/"){var _=E.opened.text.substr(1).toLowerCase();if(_==="script"||_==="style"){var p=this._read_comment_or_cdata(v);if(p)return p.type=n.TEXT,p;x=this._input.readUntil(new RegExp("</"+_+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(_)&&(x=this._input.readUntil(new RegExp("</"+_+"[\\n\\r\\t ]*?>","ig")))}return x?this._create_token(n.TEXT,x):null},b.prototype._read_content_word=function(v){var E="";if(this._options.unformatted_content_delimiter&&(v===this._options.unformatted_content_delimiter[0]&&(E=this.__patterns.unformatted_content_delimiter.read())),E||(E=this.__patterns.word.read()),E)return this._create_token(n.TEXT,E)},g.exports.Tokenizer=b,g.exports.TOKEN=n}],P={};function e(g){var f=P[g];if(f!==void 0)return f.exports;var o=P[g]={exports:{}};return H[g](o,o.exports,e),o.exports}var C=e(18);M=C})();var z=M;if(!0)!(ce=[j,j("6UM0"),j("TXwP")],W=function(H){var P=j("6UM0"),e=j("TXwP");return{html_beautify:function(C,g){return z(C,g,P.js_beautify,e.css_beautify)}}}.apply(he,ce),W!==void 0&&(Pe.exports=W));else var A,I})()},"rAM+":function(Pe,he,j){"use strict";j.d(he,"a",function(){return W});var ce=j("Qw5x");function W(M,z){var A;if(typeof Symbol=="undefined"||M[Symbol.iterator]==null){if(Array.isArray(M)||(A=Object(ce.a)(M))||z&&M&&typeof M.length=="number"){A&&(M=A);var I=0,H=function(){};return{s:H,n:function(){return I>=M.length?{done:!0}:{done:!1,value:M[I++]}},e:function(f){throw f},f:H}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var P=!0,e=!1,C;return{s:function(){A=M[Symbol.iterator]()},n:function(){var f=A.next();return P=f.done,f},e:function(f){e=!0,C=f},f:function(){try{!P&&A.return!=null&&A.return()}finally{if(e)throw C}}}}},rUJ1:function(Pe,he){const j=/[&<>"']/,ce=/[&<>"']/g,W=/[<>"']|&(?!#?\w+;)/,M=/[<>"']|&(?!#?\w+;)/g,z={"&":"&","<":"<",">":">",'"':""","'":"'"},A=x=>z[x];function I(x,_){if(_){if(j.test(x))return x.replace(ce,A)}else if(W.test(x))return x.replace(M,A);return x}const H=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function P(x){return x.replace(H,(_,p)=>(p=p.toLowerCase(),p==="colon"?":":p.charAt(0)==="#"?p.charAt(1)==="x"?String.fromCharCode(parseInt(p.substring(2),16)):String.fromCharCode(+p.substring(1)):""))}const e=/(^|[^\[])\^/g;function C(x,_){x=x.source||x,_=_||"";const p={replace:(u,l)=>(l=l.source||l,l=l.replace(e,"$1"),x=x.replace(u,l),p),getRegex:()=>new RegExp(x,_)};return p}const g=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function o(x,_,p){if(x){let u;try{u=decodeURIComponent(P(p)).replace(g,"").toLowerCase()}catch(l){return null}if(u.indexOf("javascript:")===0||u.indexOf("vbscript:")===0||u.indexOf("data:")===0)return null}_&&!f.test(p)&&(p=i(_,p));try{p=encodeURI(p).replace(/%25/g,"%")}catch(u){return null}return p}const r={},a=/^[^:]+:\/*[^/]*$/,h=/^([^:]+:)[\s\S]*$/,s=/^([^:]+:\/*[^/]*)[\s\S]*$/;function i(x,_){r[" "+x]||(a.test(x)?r[" "+x]=x+"/":r[" "+x]=v(x,"/",!0)),x=r[" "+x];const p=x.indexOf(":")===-1;return _.substring(0,2)==="//"?p?_:x.replace(h,"$1")+_:_.charAt(0)==="/"?p?_:x.replace(s,"$1")+_:x+_}const n={exec:function(){}};function t(x){let _=1,p,u;for(;_<arguments.length;_++){p=arguments[_];for(u in p)Object.prototype.hasOwnProperty.call(p,u)&&(x[u]=p[u])}return x}function b(x,_){const p=x.replace(/\|/g,(m,c,T)=>{let N=!1,D=c;for(;--D>=0&&T[D]==="\\";)N=!N;return N?"|":" |"}),u=p.split(/ \|/);let l=0;if(u.length>_)u.splice(_);else for(;u.length<_;)u.push("");for(;l<u.length;l++)u[l]=u[l].trim().replace(/\\\|/g,"|");return u}function v(x,_,p){const u=x.length;if(u===0)return"";let l=0;for(;l<u;){const m=x.charAt(u-l-1);if(m===_&&!p)l++;else if(m!==_&&p)l++;else break}return x.substr(0,u-l)}function E(x,_){if(x.indexOf(_[1])===-1)return-1;const p=x.length;let u=0,l=0;for(;l<p;l++)if(x[l]==="\\")l++;else if(x[l]===_[0])u++;else if(x[l]===_[1]&&(u--,u<0))return l;return-1}function w(x){x&&x.sanitize&&!x.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}Pe.exports={escape:I,unescape:P,edit:C,cleanUrl:o,resolveUrl:i,noopTest:n,merge:t,splitCells:b,rtrim:v,findClosingBracket:E,checkSanitizeDeprecation:w}},sD8h:function(Pe,he,j){Pe.exports={Onerow:"Onerow___zSAj_",MultiLine:"MultiLine___2NSHM",Bg:"Bg___1Je4N",DivDownPlay:"DivDownPlay___oUPfM",SearchInput:"SearchInput___3D0wg",CoreItem:"CoreItem___1Cdf2",img:"img___16HCP",type:"type___3Gtj4",type_item_active:"type_item_active___1TcZM",type_item:"type_item___3WtHE",list:"list___IR0lm",left:"left___3Sifz",right:"right___36nN7",title:"title___aJppf",des:"des___1ShCI",page:"page___3OeC6",banner_warp:"banner_warp___2I3Mx",center:"center___2QOzz",btn:"btn___3Ytay"}},siWv:function(Pe,he,j){Pe.exports={flex_box_center:"flex_box_center___3IH6S",flex_space_between:"flex_space_between___3AU-S",flex_box_vertical_center:"flex_box_vertical_center___1ykIO",flex_box_center_end:"flex_box_center_end___1aIQB",flex_box_column:"flex_box_column___2A_ra",btn:"btn___23gjd","mediacy-round":"mediacy-round___3vc8E","mediacy-default":"mediacy-default___2zIGi",default:"default___20Yio"}},t9D7:function(Pe,he,j){"use strict";j.d(he,"b",function(){return H}),j.d(he,"g",function(){return e}),j.d(he,"d",function(){return C}),j.d(he,"e",function(){return g}),j.d(he,"a",function(){return f}),j.d(he,"f",function(){return a}),j.d(he,"c",function(){return h});var ce=j("Vhoy"),W=j("MI8n"),M=j("pmY6"),z=j("Cg/j"),A=j("ic2d"),I=j("nEHx");const H=Object(z.c)("themeService");var P;(function(s){function i(n){return n&&typeof n=="object"&&typeof n.id=="string"}s.isThemeColor=i})(P||(P={}));function e(s){return{id:s}}var C;(function(s){function i(w){return w&&typeof w=="object"&&typeof w.id=="string"&&(typeof w.color=="undefined"||P.isThemeColor(w.color))}s.isThemeIcon=i;const n=new RegExp(`^\\$\\((${ce.a.iconNameExpression}(?:${ce.a.iconModifierExpression})?)\\)$`);function t(w){const x=n.exec(w);if(!x)return;let[,_]=x;return{id:_}}s.fromString=t;function b(w,x){let _=w.id;const p=_.lastIndexOf("~");return p!==-1&&(_=_.substring(0,p)),x&&(_=`${_}~${x}`),{id:_}}s.modify=b;function v(w,x){var _,p;return w.id===x.id&&((_=w.color)===null||_===void 0?void 0:_.id)===((p=x.color)===null||p===void 0?void 0:p.id)}s.isEqual=v;function E(w,x){return{id:w.id,color:x?e(x):void 0}}s.asThemeIcon=E,s.asClassNameArray=ce.a.asClassNameArray,s.asClassName=ce.a.asClassName,s.asCSSSelector=ce.a.asCSSSelector})(C||(C={}));function g(s){switch(s){case I.a.DARK:return"vs-dark";case I.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const f={ThemingContribution:"base.contributions.theming"};class o{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new W.b}onColorThemeChange(s){return this.themingParticipants.push(s),this.onThemingParticipantAddedEmitter.fire(s),Object(M.i)(()=>{const i=this.themingParticipants.indexOf(s);this.themingParticipants.splice(i,1)})}getThemingParticipants(){return this.themingParticipants}}let r=new o;A.a.add(f.ThemingContribution,r);function a(s){return r.onColorThemeChange(s)}class h extends M.a{constructor(s){super();this.themeService=s,this.theme=s.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(i=>this.onThemeChange(i)))}onThemeChange(s){this.theme=s,this.updateStyles()}updateStyles(){}}},u57T:function(Pe,he,j){"use strict";j.r(he);var ce=j("14J3"),W=j("BMrR"),M=j("DjyN"),z=j("NUBc"),A=j("jCWc"),I=j("kPKH"),H=j("cWXX"),P=j("/ezw"),e=j("5Dmo"),C=j("3S7+"),g=j("oBTY"),f=j("miYZ"),o=j("tsqr"),r=j("k1fw"),a=j("9og8"),h=j("tJVT"),s=j("WmNS"),i=j.n(s),n=j("q1tI"),t=j.n(n),b=j("9kvl"),v=j("Nf5h"),E=j("sD8h"),w=j.n(E),x=j("BdwD"),_=j("m3rI"),p=j("xKgJ"),u=j("ErOA"),l=j("9Bee"),m=j("Dz72"),c=j("wd/R"),T=j.n(c),N=function(y){var O,k=y.coreCurriculum,R=y.dispatch,B=y.virtualSpaces,V=y.globalSetting,ee=k.CoreSubjects,re=Object(n.useState)({page:1,limit:10}),_e=Object(h.a)(re,2),se=_e[0],ye=_e[1],ve=Object(n.useState)(0),Ee=Object(h.a)(ve,2),le=Ee[0],F=Ee[1],d=Object(b.g)(),S=Object(n.useState)(!0),L=Object(h.a)(S,2),G=L[0],U=L[1],$=Object(n.useState)(!1),de=Object(h.a)($,2),xe=de[0],q=de[1],ae=Object(n.useState)([]),fe=Object(h.a)(ae,2),pe=fe[0],Ce=fe[1],Me=Object(n.useState)(""),He=Object(h.a)(Me,2),je=He[0],Ye=He[1],Xe=Object(n.useState)([{name:"\u5168\u90E8",type:"0"},{name:"\u4E3B\u6559\u6750",type:"1"},{name:"\u5B9E\u8DF5\u6559\u6750",type:"2"}]),ze=Object(h.a)(Xe,2),Fe=ze[0],et=ze[1],st=Object(n.useState)([{name:"All",type:"0"},{name:"Core Textbooks",type:"1"},{name:"Practice Textbooks",type:"2"}]),te=Object(h.a)(st,2),Y=te[0],X=te[1],Z=Object(n.useState)([{name:"\u5168\u90E8",type:"0"},{name:"\u56FD\u5185\u6559\u6750",type:"1"},{name:"\u56FD\u5916\u6559\u6750",type:"2"}]),ne=Object(h.a)(Z,2),J=ne[0],Q=ne[1],ie=Object(n.useState)([{name:"All",type:"0"},{name:"Domestic Textbooks",type:"1"},{name:"International Textbooks",type:"2"}]),oe=Object(h.a)(ie,2),be=oe[0],Te=oe[1],Ie=Object(n.useState)("0"),Je=Object(h.a)(Ie,2),ht=Je[0],lt=Je[1],Rt=Object(n.useState)("1"),vt=Object(h.a)(Rt,2),ut=vt[0],Ht=vt[1];Object(n.useEffect)(function(){Pt()},[]),Object(n.useEffect)(function(){Ut(!0)},[je,ht,ut]),console.log("---",Fe);var Pt=function(){var Ve=Object(a.a)(i.a.mark(function tt(){return i.a.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:U(!0),R({type:"coreCurriculum/getCoreSubjects",payload:{}}),U(!1);case 3:case"end":return Se.stop()}},tt)}));return function(){return Ve.apply(this,arguments)}}(),Ut=function(){var Ve=Object(a.a)(i.a.mark(function tt(){var nt,Se,it,ct,ft=arguments;return i.a.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return nt=ft.length>0&&ft[0]!==void 0?ft[0]:!1,U(!0),qe.next=4,Object(u.a)("/api/core_materials/list.json",{method:"get",params:Object(r.a)(Object(r.a)({},se),{},{source_type:ut,material_type:ht,core_subject_id:je})});case 4:Se=qe.sent,(Se==null?void 0:Se.status)!==-1&&(Ce((Se==null||((it=Se.data)===null||it===void 0)?void 0:it.list)||[]),F(Se==null||((ct=Se.data)===null||ct===void 0)?void 0:ct.count)),U(!1);case 7:case"end":return qe.stop()}},tt)}));return function(){return Ve.apply(this,arguments)}}(),Kt=[{id:"1",name:"\u4E3B\u6559\u6750"},{id:"2",name:"\u5B9E\u8DF5\u6559\u6750"}],It=function(){var Ve=Object(a.a)(i.a.mark(function tt(nt){var Se,it;return i.a.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:if(!(xe!=null&&xe.id)){ft.next=7;break}return ft.next=3,Object(u.a)("/api/core_materials/".concat(xe==null?void 0:xe.id,".json"),{method:"put",body:Object(r.a)(Object(r.a)({},nt),{},{book_type:1})});case 3:Se=ft.sent,(Se==null?void 0:Se.status)==0&&(o.b.success("".concat(xe!=null&&xe.id?"\u7F16\u8F91":"\u6DFB\u52A0","\u6210\u529F")),q(!1),Ut()),ft.next=11;break;case 7:return ft.next=9,Object(u.a)("/api/core_materials.json",{method:"post",body:Object(r.a)(Object(r.a)({},nt),{},{book_type:1})});case 9:it=ft.sent,(it==null?void 0:it.status)==0&&(o.b.success("".concat(xe!=null&&xe.id?"\u7F16\u8F91":"\u6DFB\u52A0","\u6210\u529F")),q(!1),Ut());case 11:case"end":return ft.stop()}},tt)}));return function(nt){return Ve.apply(this,arguments)}}(),mn=function(){q(!0)},Bn=function(tt){se.page=1,se.keyword=tt.trim(),ye(se),Ut()},Qt=[{name:d.formatMessage({id:"recommend.new"}),click:mn,show:!0,buttonShow:!0,img:j("iLsG"),img_active:j("cLbz")}];return t.a.createElement("section",null,t.a.createElement("div",{className:w.a.banner_warp},t.a.createElement(v.a,{dataSource:Qt.filter(function(Ve){return Object(p.w)()?Ve.buttonShow=!0:Ve.buttonShow=!1,Ve.show}),title:d.formatMessage({id:"recommend.Textbook"}),sunTitle:"",bannerImg:j("xrK0"),placeholder:d.formatMessage({id:"recommend.search"}),onChange:Bn})),t.a.createElement("div",{style:{width:1200,margin:"0 auto",background:"#fff",paddingBottom:"10px"}},t.a.createElement("div",{style:{paddingTop:"20px"}},t.a.createElement("div",{className:w.a.type},t.a.createElement("div",{style:{width:50}},"\u8BFE\u7A0B"),t.a.createElement("div",{style:{display:"flex",flexWrap:"wrap"}},(ee==null?void 0:ee.list)&&((O=[{name:"\u5168\u90E8",id:""}].concat(Object(g.a)(ee==null?void 0:ee.list)))===null||O===void 0?void 0:O.map(function(Ve,tt){return t.a.createElement("div",{key:tt,className:je==(Ve==null?void 0:Ve.id)?w.a.type_item_active:w.a.type_item,style:{marginBottom:"10px"},onClick:function(){Ye(Ve==null?void 0:Ve.id)}},Ve==null?void 0:Ve.name)})))),t.a.createElement("div",{className:w.a.type,style:{marginTop:"50px"}},t.a.createElement("div",{style:{width:50}},d.formatMessage({id:"recommend.Type"})),t.a.createElement("div",{style:{display:"flex",flexWrap:"wrap"}},localStorage.getItem("umi_locale")==="zh-CN"?Fe==null?void 0:Fe.map(function(Ve,tt){return t.a.createElement("div",{key:tt,className:ht==(Ve==null?void 0:Ve.type)?w.a.type_item_active:w.a.type_item,onClick:function(){lt(Ve==null?void 0:Ve.type)}},Ve==null?void 0:Ve.name)}):Y==null?void 0:Y.map(function(Ve,tt){return t.a.createElement("div",{key:tt,className:ht==(Ve==null?void 0:Ve.type)?w.a.type_item_active:w.a.type_item,onClick:function(){lt(Ve==null?void 0:Ve.type)}},Ve==null?void 0:Ve.name)}))),t.a.createElement("div",{className:w.a.type,style:{marginTop:"20px"}},t.a.createElement("div",{style:{width:50}},d.formatMessage({id:"recommend.Origin"})),t.a.createElement("div",{style:{display:"flex",flexWrap:"wrap"}},localStorage.getItem("umi_locale")==="zh-CN"?J==null?void 0:J.map(function(Ve,tt){return t.a.createElement("div",{key:tt,className:ut==(Ve==null?void 0:Ve.type)?w.a.type_item_active:w.a.type_item,onClick:function(){Ht(Ve==null?void 0:Ve.type)}},Ve==null?void 0:Ve.name)}):be==null?void 0:be.map(function(Ve,tt){return t.a.createElement("div",{key:tt,className:ut==(Ve==null?void 0:Ve.type)?w.a.type_item_active:w.a.type_item,onClick:function(){Ht(Ve==null?void 0:Ve.type)}},Ve==null?void 0:Ve.name)})))),t.a.createElement(P.a,{className:"mt20",loading:G},!pe.length&&t.a.createElement(x.a,null),pe.map(function(Ve){var tt=Ve.name,nt=Ve.id,Se=Ve.attachment,it=Ve.author,ct=Ve.publisher,ft=Ve.number,pt=Ve.publication_time,qe=Ve.description;return t.a.createElement("div",{key:nt,className:w.a.list,onClick:function(){return b.d.push("/recommend/detail/".concat(nt))}},t.a.createElement("div",{className:w.a.left},t.a.createElement("img",{src:_.a.API_SERVER+(Se==null?void 0:Se.url)})),t.a.createElement("div",{className:w.a.right},t.a.createElement(C.a,{title:tt},t.a.createElement("div",{className:w.a.title},tt)),t.a.createElement("aside",null,t.a.createElement(C.a,{title:"\u4F5C\u8005\uFF1A".concat(it)},t.a.createElement("span",null,"\u4F5C\u8005\uFF1A",it)),t.a.createElement(C.a,{title:"\u51FA\u7248\u793E\uFF1A".concat(ct)},t.a.createElement("span",null,"\u51FA\u7248\u793E\uFF1A",ct))),t.a.createElement("aside",null,t.a.createElement(C.a,{title:"ISBN\uFF1A".concat(ft)},t.a.createElement("span",null,"ISBN\uFF1A",ft)),t.a.createElement(C.a,{title:"\u51FA\u7248\u65F6\u95F4\uFF1A".concat(pt?T()(pt).format("YYYY-MM-DD"):"--")},t.a.createElement("span",null,"\u51FA\u7248\u65F6\u95F4\uFF1A",pt?T()(pt).format("YYYY-MM-DD"):"--"))),t.a.createElement("div",{className:w.a.des},t.a.createElement("div",null,"\u7B80\u4ECB\uFF1A"),t.a.createElement(l.a,{style:{fontSize:"14px"},showTextOnly:!0,showLines:2,value:qe||"\u6682\u65E0"}))))})),pe.length!==0&&t.a.createElement(W.a,{wrap:!1,align:"middle",justify:"space-between",style:{width:1200,margin:"20px auto",padding:"0 20px"}},t.a.createElement(I.a,null,d.formatMessage({id:"quantum.Total"}),"\xA0",t.a.createElement("span",{style:{color:"#165DFF"}},le||0),"\xA0",d.formatMessage({id:"quantum.records"})),t.a.createElement(I.a,null,t.a.createElement(z.a,{showSizeChanger:!1,showQuickJumper:!0,current:se.page,pageSize:se.limit,locale:{jump_to:d.formatMessage({id:"quantum.jump_to"}),page:d.formatMessage({id:"quantum.page"})},onChange:function(tt,nt){se.page=tt,ye(Object(r.a)({},se)),Ut()},total:le||0}))),t.a.createElement(m.a,{visible:xe,title:"\u6559\u6750",onCancel:function(){return q(!1)},onOk:It})))};he.default=Object(b.a)(function(D){var y=D.user,O=D.globalSetting,k=D.coreCurriculum,R=D.virtualSpaces;return{user:y,globalSetting:O,virtualSpaces:R,coreCurriculum:k}})(N)},ulZh:function(Pe,he,j){typeof window!="undefined"&&function(W,M){Pe.exports=M()}(this,function(){return function(ce){var W={};function M(z){if(W[z])return W[z].exports;var A=W[z]={i:z,l:!1,exports:{}};return ce[z].call(A.exports,A,A.exports,M),A.l=!0,A.exports}return M.m=ce,M.c=W,M.d=function(z,A,I){M.o(z,A)||Object.defineProperty(z,A,{enumerable:!0,get:I})},M.r=function(z){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(z,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(z,"__esModule",{value:!0})},M.t=function(z,A){if(A&1&&(z=M(z)),A&8)return z;if(A&4&&typeof z=="object"&&z&&z.__esModule)return z;var I=Object.create(null);if(M.r(I),Object.defineProperty(I,"default",{enumerable:!0,value:z}),A&2&&typeof z!="string")for(var H in z)M.d(I,H,function(P){return z[P]}.bind(null,H));return I},M.n=function(z){var A=z&&z.__esModule?function(){return z.default}:function(){return z};return M.d(A,"a",A),A},M.o=function(z,A){return Object.prototype.hasOwnProperty.call(z,A)},M.p="/dist/",M(M.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(ce,W,M){"use strict";var z=Object.prototype.hasOwnProperty,A="~";function I(){}Object.create&&(I.prototype=Object.create(null),new I().__proto__||(A=!1));function H(g,f,o){this.fn=g,this.context=f,this.once=o||!1}function P(g,f,o,r,a){if(typeof o!="function")throw new TypeError("The listener must be a function");var h=new H(o,r||g,a),s=A?A+f:f;return g._events[s]?g._events[s].fn?g._events[s]=[g._events[s],h]:g._events[s].push(h):(g._events[s]=h,g._eventsCount++),g}function e(g,f){--g._eventsCount===0?g._events=new I:delete g._events[f]}function C(){this._events=new I,this._eventsCount=0}C.prototype.eventNames=function(){var f=[],o,r;if(this._eventsCount===0)return f;for(r in o=this._events)z.call(o,r)&&f.push(A?r.slice(1):r);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(o)):f},C.prototype.listeners=function(f){var o=A?A+f:f,r=this._events[o];if(!r)return[];if(r.fn)return[r.fn];for(var a=0,h=r.length,s=new Array(h);a<h;a++)s[a]=r[a].fn;return s},C.prototype.listenerCount=function(f){var o=A?A+f:f,r=this._events[o];return r?r.fn?1:r.length:0},C.prototype.emit=function(f,o,r,a,h,s){var i=A?A+f:f;if(!this._events[i])return!1;var n=this._events[i],t=arguments.length,b,v;if(n.fn){n.once&&this.removeListener(f,n.fn,void 0,!0);switch(t){case 1:return n.fn.call(n.context),!0;case 2:return n.fn.call(n.context,o),!0;case 3:return n.fn.call(n.context,o,r),!0;case 4:return n.fn.call(n.context,o,r,a),!0;case 5:return n.fn.call(n.context,o,r,a,h),!0;case 6:return n.fn.call(n.context,o,r,a,h,s),!0}for(v=1,b=new Array(t-1);v<t;v++)b[v-1]=arguments[v];n.fn.apply(n.context,b)}else{var E=n.length,w;for(v=0;v<E;v++){n[v].once&&this.removeListener(f,n[v].fn,void 0,!0);switch(t){case 1:n[v].fn.call(n[v].context);break;case 2:n[v].fn.call(n[v].context,o);break;case 3:n[v].fn.call(n[v].context,o,r);break;case 4:n[v].fn.call(n[v].context,o,r,a);break;default:if(!b)for(w=1,b=new Array(t-1);w<t;w++)b[w-1]=arguments[w];n[v].fn.apply(n[v].context,b)}}}return!0},C.prototype.on=function(f,o,r){return P(this,f,o,r,!1)},C.prototype.once=function(f,o,r){return P(this,f,o,r,!0)},C.prototype.removeListener=function(f,o,r,a){var h=A?A+f:f;if(!this._events[h])return this;if(!o)return e(this,h),this;var s=this._events[h];if(s.fn)s.fn===o&&(!a||s.once)&&(!r||s.context===r)&&e(this,h);else{for(var i=0,n=[],t=s.length;i<t;i++)(s[i].fn!==o||a&&!s[i].once||r&&s[i].context!==r)&&n.push(s[i]);n.length?this._events[h]=n.length===1?n[0]:n:e(this,h)}return this},C.prototype.removeAllListeners=function(f){var o;return f?(o=A?A+f:f,this._events[o]&&e(this,o)):(this._events=new I,this._eventsCount=0),this},C.prototype.off=C.prototype.removeListener,C.prototype.addListener=C.prototype.on,C.prefixed=A,C.EventEmitter=C,ce.exports=C},"./node_modules/url-toolkit/src/url-toolkit.js":function(ce,W,M){(function(z){var A=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,I=/^([^\/?#]*)([^]*)$/,H=/(?:\/|^)\.(?=\/)/g,P=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,e={buildAbsoluteURL:function(C,g,f){if(f=f||{},C=C.trim(),g=g.trim(),!g){if(!f.alwaysNormalize)return C;var o=e.parseURL(C);if(!o)throw new Error("Error trying to parse base URL.");return o.path=e.normalizePath(o.path),e.buildURLFromParts(o)}var r=e.parseURL(g);if(!r)throw new Error("Error trying to parse relative URL.");if(r.scheme)return f.alwaysNormalize?(r.path=e.normalizePath(r.path),e.buildURLFromParts(r)):g;var a=e.parseURL(C);if(!a)throw new Error("Error trying to parse base URL.");if(!a.netLoc&&a.path&&a.path[0]!=="/"){var h=I.exec(a.path);a.netLoc=h[1],a.path=h[2]}a.netLoc&&!a.path&&(a.path="/");var s={scheme:a.scheme,netLoc:r.netLoc,path:null,params:r.params,query:r.query,fragment:r.fragment};if(!r.netLoc&&(s.netLoc=a.netLoc,r.path[0]!=="/"))if(!r.path)s.path=a.path,r.params||(s.params=a.params,r.query||(s.query=a.query));else{var i=a.path,n=i.substring(0,i.lastIndexOf("/")+1)+r.path;s.path=e.normalizePath(n)}return s.path===null&&(s.path=f.alwaysNormalize?e.normalizePath(r.path):r.path),e.buildURLFromParts(s)},parseURL:function(C){var g=A.exec(C);return g?{scheme:g[1]||"",netLoc:g[2]||"",path:g[3]||"",params:g[4]||"",query:g[5]||"",fragment:g[6]||""}:null},normalizePath:function(C){for(C=C.split("").reverse().join("").replace(H,"");C.length!==(C=C.replace(P,"")).length;);return C.split("").reverse().join("")},buildURLFromParts:function(C){return C.scheme+C.netLoc+C.path+C.params+C.query+C.fragment}};ce.exports=e})(this)},"./node_modules/webworkify-webpack/index.js":function(ce,W,M){function z(f){var o={};function r(h){if(o[h])return o[h].exports;var s=o[h]={i:h,l:!1,exports:{}};return f[h].call(s.exports,s,s.exports,r),s.l=!0,s.exports}r.m=f,r.c=o,r.i=function(h){return h},r.d=function(h,s,i){r.o(h,s)||Object.defineProperty(h,s,{configurable:!1,enumerable:!0,get:i})},r.r=function(h){Object.defineProperty(h,"__esModule",{value:!0})},r.n=function(h){var s=h&&h.__esModule?function(){return h.default}:function(){return h};return r.d(s,"a",s),s},r.o=function(h,s){return Object.prototype.hasOwnProperty.call(h,s)},r.p="/",r.oe=function(h){throw console.error(h),h};var a=r(r.s=ENTRY_MODULE);return a.default||a}var A="[\\.|\\-|\\+|\\w|/|@]+",I="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+A+").*?\\)";function H(f){return(f+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function P(f){return!isNaN(1*f)}function e(f,o,r){var a={};a[r]=[];var h=o.toString(),s=h.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!s)return a;for(var i=s[1],n=new RegExp("(\\\\n|\\W)"+H(i)+I,"g"),t;t=n.exec(h);){if(t[3]==="dll-reference")continue;a[r].push(t[3])}for(n=new RegExp("\\("+H(i)+'\\("(dll-reference\\s('+A+'))"\\)\\)'+I,"g");t=n.exec(h);)f[t[2]]||(a[r].push(t[1]),f[t[2]]=M(t[1]).m),a[t[2]]=a[t[2]]||[],a[t[2]].push(t[4]);for(var b=Object.keys(a),v=0;v<b.length;v++)for(var E=0;E<a[b[v]].length;E++)P(a[b[v]][E])&&(a[b[v]][E]=1*a[b[v]][E]);return a}function C(f){var o=Object.keys(f);return o.reduce(function(r,a){return r||f[a].length>0},!1)}function g(f,o){for(var r={main:[o]},a={main:[]},h={main:{}};C(r);)for(var s=Object.keys(r),i=0;i<s.length;i++){var n=s[i],t=r[n],b=t.pop();if(h[n]=h[n]||{},h[n][b]||!f[n][b])continue;h[n][b]=!0,a[n]=a[n]||[],a[n].push(b);for(var v=e(f,f[n][b],n),E=Object.keys(v),w=0;w<E.length;w++)r[E[w]]=r[E[w]]||[],r[E[w]]=r[E[w]].concat(v[E[w]])}return a}ce.exports=function(f,o){o=o||{};var r={main:M.m},a=o.all?{main:Object.keys(r.main)}:g(r,f),h="";Object.keys(a).filter(function(b){return b!=="main"}).forEach(function(b){for(var v=0;a[b][v];)v++;a[b].push(v),r[b][v]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",h=h+"var "+b+" = ("+z.toString().replace("ENTRY_MODULE",JSON.stringify(v))+")({"+a[b].map(function(E){return""+JSON.stringify(E)+": "+r[b][E].toString()}).join(",")+`});
|
|
`}),h=h+"new (("+z.toString().replace("ENTRY_MODULE",JSON.stringify(f))+")({"+a.main.map(function(b){return""+JSON.stringify(b)+": "+r.main[b].toString()}).join(",")+"}))(self);";var s=new window.Blob([h],{type:"text/javascript"});if(o.bare)return s;var i=window.URL||window.webkitURL||window.mozURL||window.msURL,n=i.createObjectURL(s),t=new window.Worker(n);return t.objectURL=n,t}},"./src/config.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"hlsDefaultConfig",function(){return w}),M.d(W,"mergeConfig",function(){return _}),M.d(W,"enableStreamingMode",function(){return p});var z=M("./src/controller/abr-controller.ts"),A=M("./src/controller/audio-stream-controller.ts"),I=M("./src/controller/audio-track-controller.ts"),H=M("./src/controller/subtitle-stream-controller.ts"),P=M("./src/controller/subtitle-track-controller.ts"),e=M("./src/controller/buffer-controller.ts"),C=M("./src/controller/timeline-controller.ts"),g=M("./src/controller/cap-level-controller.ts"),f=M("./src/controller/fps-controller.ts"),o=M("./src/controller/eme-controller.ts"),r=M("./src/controller/cmcd-controller.ts"),a=M("./src/utils/xhr-loader.ts"),h=M("./src/utils/fetch-loader.ts"),s=M("./src/utils/cues.ts"),i=M("./src/utils/mediakeys-helper.ts"),n=M("./src/utils/logger.ts");function t(){return t=Object.assign||function(u){for(var l=1;l<arguments.length;l++){var m=arguments[l];for(var c in m)Object.prototype.hasOwnProperty.call(m,c)&&(u[c]=m[c])}return u},t.apply(this,arguments)}function b(u,l){var m=Object.keys(u);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(u);l&&(c=c.filter(function(T){return Object.getOwnPropertyDescriptor(u,T).enumerable})),m.push.apply(m,c)}return m}function v(u){for(var l=1;l<arguments.length;l++){var m=arguments[l]!=null?arguments[l]:{};l%2?b(Object(m),!0).forEach(function(c){E(u,c,m[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(m)):b(Object(m)).forEach(function(c){Object.defineProperty(u,c,Object.getOwnPropertyDescriptor(m,c))})}return u}function E(u,l,m){return l in u?Object.defineProperty(u,l,{value:m,enumerable:!0,configurable:!0,writable:!0}):u[l]=m,u}var w=v(v({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:Infinity,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:a.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:z.default,bufferController:e.default,capLevelController:g.default,fpsController:f.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:i.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},x()),{},{subtitleStreamController:H.SubtitleStreamController,subtitleTrackController:P.default,timelineController:C.TimelineController,audioStreamController:A.default,audioTrackController:I.default,emeController:o.default,cmcdController:r.default});function x(){return{cueHandler:s.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function _(u,l){if((l.liveSyncDurationCount||l.liveMaxLatencyDurationCount)&&(l.liveSyncDuration||l.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(l.liveMaxLatencyDurationCount!==void 0&&(l.liveSyncDurationCount===void 0||l.liveMaxLatencyDurationCount<=l.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(l.liveMaxLatencyDuration!==void 0&&(l.liveSyncDuration===void 0||l.liveMaxLatencyDuration<=l.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return t({},u,l)}function p(u){var l=u.loader;if(l!==h.default&&l!==a.default)n.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),u.progressive=!1;else{var m=Object(h.fetchSupported)();m&&(u.loader=h.default,u.progressive=!0,u.enableSoftwareAES=!0,n.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(ce,W,M){"use strict";M.r(W);var z=M("./src/polyfills/number.ts"),A=M("./src/utils/ewma-bandwidth-estimator.ts"),I=M("./src/events.ts"),H=M("./src/utils/buffer-helper.ts"),P=M("./src/errors.ts"),e=M("./src/types/loader.ts"),C=M("./src/utils/logger.ts");function g(r,a){for(var h=0;h<a.length;h++){var s=a[h];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(r,s.key,s)}}function f(r,a,h){return a&&g(r.prototype,a),h&&g(r,h),r}var o=function(){function r(h){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=h;var s=h.config;this.bwEstimator=new A.default(s.abrEwmaSlowVoD,s.abrEwmaFastVoD,s.abrEwmaDefaultEstimate),this.registerListeners()}var a=r.prototype;return a.registerListeners=function(){var s=this.hls;s.on(I.Events.FRAG_LOADING,this.onFragLoading,this),s.on(I.Events.FRAG_LOADED,this.onFragLoaded,this),s.on(I.Events.FRAG_BUFFERED,this.onFragBuffered,this),s.on(I.Events.LEVEL_LOADED,this.onLevelLoaded,this),s.on(I.Events.ERROR,this.onError,this)},a.unregisterListeners=function(){var s=this.hls;s.off(I.Events.FRAG_LOADING,this.onFragLoading,this),s.off(I.Events.FRAG_LOADED,this.onFragLoaded,this),s.off(I.Events.FRAG_BUFFERED,this.onFragBuffered,this),s.off(I.Events.LEVEL_LOADED,this.onLevelLoaded,this),s.off(I.Events.ERROR,this.onError,this)},a.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},a.onFragLoading=function(s,i){var n=i.frag;if(n.type===e.PlaylistLevelType.MAIN&&!this.timer){var t;this.fragCurrent=n,this.partCurrent=(t=i.part)!=null?t:null,this.timer=self.setInterval(this.onCheck,100)}},a.onLevelLoaded=function(s,i){var n=this.hls.config;i.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD)},a._abandonRulesCheck=function(){var s=this.fragCurrent,i=this.partCurrent,n=this.hls,t=n.autoLevelEnabled,b=n.config,v=n.media;if(!s||!v)return;var E=i?i.stats:s.stats,w=i?i.duration:s.duration;if(E.aborted){C.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!t||v.paused||!v.playbackRate||!v.readyState)return;var x=performance.now()-E.loading.start,_=Math.abs(v.playbackRate);if(x<=500*w/_)return;var p=n.levels,u=n.minAutoLevel,l=p[s.level],m=E.total||Math.max(E.loaded,Math.round(w*l.maxBitrate/8)),c=Math.max(1,E.bwEstimate?E.bwEstimate/8:E.loaded*1e3/x),T=(m-E.loaded)/c,N=v.currentTime,D=(H.BufferHelper.bufferInfo(v,N,b.maxBufferHole).end-N)/_;if(D>=2*w/_||T<=D)return;var y=Number.POSITIVE_INFINITY,O;for(O=s.level-1;O>u;O--){var k=p[O].maxBitrate;if(y=w*k/(8*.8*c),y<D)break}if(y>=T)return;var R=this.bwEstimator.getEstimate();C.logger.warn("Fragment "+s.sn+(i?" part "+i.index:"")+" of level "+s.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+O+`
|
|
Current BW estimate: `+(Object(z.isFiniteNumber)(R)?(R/1024).toFixed(3):"Unknown")+` Kb/s
|
|
Estimated load time for current fragment: `+T.toFixed(3)+` s
|
|
Estimated load time for the next fragment: `+y.toFixed(3)+` s
|
|
Time to underbuffer: `+D.toFixed(3)+" s"),n.nextLoadLevel=O,this.bwEstimator.sample(x,E.loaded),this.clearTimer(),s.loader&&(this.fragCurrent=this.partCurrent=null,s.loader.abort()),n.trigger(I.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:s,part:i,stats:E})},a.onFragLoaded=function(s,i){var n=i.frag,t=i.part;if(n.type===e.PlaylistLevelType.MAIN&&Object(z.isFiniteNumber)(n.sn)){var b=t?t.stats:n.stats,v=t?t.duration:n.duration;if(this.clearTimer(),this.lastLoadedFragLevel=n.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var E=this.hls.levels[n.level],w=(E.loaded?E.loaded.bytes:0)+b.loaded,x=(E.loaded?E.loaded.duration:0)+v;E.loaded={bytes:w,duration:x},E.realBitrate=Math.round(8*w/x)}if(n.bitrateTest){var _={stats:b,frag:n,part:t,id:n.type};this.onFragBuffered(I.Events.FRAG_BUFFERED,_),n.bitrateTest=!1}}},a.onFragBuffered=function(s,i){var n=i.frag,t=i.part,b=t?t.stats:n.stats;if(b.aborted)return;if(n.type!==e.PlaylistLevelType.MAIN||n.sn==="initSegment")return;var v=b.parsing.end-b.loading.start;this.bwEstimator.sample(v,b.loaded),b.bwEstimate=this.bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=v/1e3:this.bitrateTestDelay=0},a.onError=function(s,i){switch(i.details){case P.ErrorDetails.FRAG_LOAD_ERROR:case P.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},a.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},a.getNextABRAutoLevel=function(){var s=this.fragCurrent,i=this.partCurrent,n=this.hls,t=n.maxAutoLevel,b=n.config,v=n.minAutoLevel,E=n.media,w=i?i.duration:s?s.duration:0,x=E?E.currentTime:0,_=E&&E.playbackRate!==0?Math.abs(E.playbackRate):1,p=this.bwEstimator?this.bwEstimator.getEstimate():b.abrEwmaDefaultEstimate,u=(H.BufferHelper.bufferInfo(E,x,b.maxBufferHole).end-x)/_,l=this.findBestLevel(p,v,t,u,b.abrBandWidthFactor,b.abrBandWidthUpFactor);if(l>=0)return l;C.logger.trace((u?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var m=w?Math.min(w,b.maxStarvationDelay):b.maxStarvationDelay,c=b.abrBandWidthFactor,T=b.abrBandWidthUpFactor;if(!u){var N=this.bitrateTestDelay;if(N){var D=w?Math.min(w,b.maxLoadingDelay):b.maxLoadingDelay;m=D-N,C.logger.trace("bitrate test took "+Math.round(1e3*N)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*m)+" ms"),c=T=1}}return l=this.findBestLevel(p,v,t,u+m,c,T),Math.max(l,0)},a.findBestLevel=function(s,i,n,t,b,v){for(var E,w=this.fragCurrent,x=this.partCurrent,_=this.lastLoadedFragLevel,p=this.hls.levels,u=p[_],l=!!(u!=null&&(E=u.details)!==null&&E!==void 0&&E.live),m=u==null?void 0:u.codecSet,c=x?x.duration:w?w.duration:0,T=n;T>=i;T--){var N=p[T];if(!N||m&&N.codecSet!==m)continue;var D=N.details,y=(x?D==null?void 0:D.partTarget:D==null?void 0:D.averagetargetduration)||c,O=void 0;T<=_?O=b*s:O=v*s;var k=p[T].maxBitrate,R=k*y/O;if(C.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+T+"/"+Math.round(O)+"/"+k+"/"+y+"/"+t+"/"+R),O>k&&(!R||l&&!this.bitrateTestDelay||R<t))return T}return-1},f(r,[{key:"nextAutoLevel",get:function(){var s=this._nextAutoLevel,i=this.bwEstimator;if(s!==-1&&(!i||!i.canEstimate()))return s;var n=this.getNextABRAutoLevel();return s!==-1&&(n=Math.min(s,n)),n},set:function(s){this._nextAutoLevel=s}}]),r}();W.default=o},"./src/controller/audio-stream-controller.ts":function(ce,W,M){"use strict";M.r(W);var z=M("./src/polyfills/number.ts"),A=M("./src/controller/base-stream-controller.ts"),I=M("./src/events.ts"),H=M("./src/utils/buffer-helper.ts"),P=M("./src/controller/fragment-tracker.ts"),e=M("./src/types/level.ts"),C=M("./src/types/loader.ts"),g=M("./src/loader/fragment.ts"),f=M("./src/demux/chunk-cache.ts"),o=M("./src/demux/transmuxer-interface.ts"),r=M("./src/types/transmuxer.ts"),a=M("./src/controller/fragment-finders.ts"),h=M("./src/utils/discontinuities.ts"),s=M("./src/errors.ts"),i=M("./src/utils/logger.ts");function n(){return n=Object.assign||function(w){for(var x=1;x<arguments.length;x++){var _=arguments[x];for(var p in _)Object.prototype.hasOwnProperty.call(_,p)&&(w[p]=_[p])}return w},n.apply(this,arguments)}function t(w,x){w.prototype=Object.create(x.prototype),w.prototype.constructor=w,b(w,x)}function b(w,x){return b=Object.setPrototypeOf||function(p,u){return p.__proto__=u,p},b(w,x)}var v=100,E=function(w){t(x,w);function x(p,u){var l;return l=w.call(this,p,u,"[audio-stream-controller]")||this,l.videoBuffer=null,l.videoTrackCC=-1,l.waitingVideoCC=-1,l.audioSwitch=!1,l.trackId=-1,l.waitingData=null,l.mainDetails=null,l.bufferFlushed=!1,l._registerListeners(),l}var _=x.prototype;return _.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},_._registerListeners=function(){var u=this.hls;u.on(I.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.on(I.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.on(I.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.on(I.Events.LEVEL_LOADED,this.onLevelLoaded,this),u.on(I.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),u.on(I.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),u.on(I.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),u.on(I.Events.ERROR,this.onError,this),u.on(I.Events.BUFFER_RESET,this.onBufferReset,this),u.on(I.Events.BUFFER_CREATED,this.onBufferCreated,this),u.on(I.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),u.on(I.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),u.on(I.Events.FRAG_BUFFERED,this.onFragBuffered,this)},_._unregisterListeners=function(){var u=this.hls;u.off(I.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.off(I.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(I.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(I.Events.LEVEL_LOADED,this.onLevelLoaded,this),u.off(I.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),u.off(I.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),u.off(I.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),u.off(I.Events.ERROR,this.onError,this),u.off(I.Events.BUFFER_RESET,this.onBufferReset,this),u.off(I.Events.BUFFER_CREATED,this.onBufferCreated,this),u.off(I.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),u.off(I.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),u.off(I.Events.FRAG_BUFFERED,this.onFragBuffered,this)},_.onInitPtsFound=function(u,l){var m=l.frag,c=l.id,T=l.initPTS;if(c==="main"){var N=m.cc;this.initPTS[m.cc]=T,this.log("InitPTS for cc: "+N+" found from main: "+T),this.videoTrackCC=N,this.state===A.State.WAITING_INIT_PTS&&this.tick()}},_.startLoad=function(u){if(!this.levels){this.startPosition=u,this.state=A.State.STOPPED;return}var l=this.lastCurrentTime;this.stopLoad(),this.setInterval(v),this.fragLoadError=0,l>0&&u===-1?(this.log("Override startPosition with lastCurrentTime @"+l.toFixed(3)),this.state=A.State.IDLE):(this.loadedmetadata=!1,this.state=A.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=u,this.tick()},_.doTick=function(){switch(this.state){case A.State.IDLE:this.doTickIdle();break;case A.State.WAITING_TRACK:{var u,l=this.levels,m=this.trackId,c=l==null||((u=l[m])===null||u===void 0)?void 0:u.details;if(c){if(this.waitForCdnTuneIn(c))break;this.state=A.State.WAITING_INIT_PTS}break}case A.State.FRAG_LOADING_WAITING_RETRY:{var T,N=performance.now(),D=this.retryDate;(!D||N>=D||(T=this.media)!==null&&T!==void 0&&T.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=A.State.IDLE);break}case A.State.WAITING_INIT_PTS:{var y=this.waitingData;if(y){var O=y.frag,k=y.part,R=y.cache,B=y.complete;if(this.initPTS[O.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=A.State.FRAG_LOADING;var V=R.flush(),ee={frag:O,part:k,payload:V,networkDetails:null};this._handleFragmentLoadProgress(ee),B&&w.prototype._handleFragmentLoadComplete.call(this,ee)}else if(this.videoTrackCC!==this.waitingVideoCC)i.logger.log("Waiting fragment cc ("+O.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var re=this.getLoadPosition(),_e=H.BufferHelper.bufferInfo(this.mediaBuffer,re,this.config.maxBufferHole),se=Object(a.fragmentWithinToleranceTest)(_e.end,this.config.maxFragLookUpTolerance,O);se<0&&(i.logger.log("Waiting fragment cc ("+O.cc+") @ "+O.start+" cancelled because another fragment at "+_e.end+" is needed"),this.clearWaitingFragment())}}else this.state=A.State.IDLE}}this.onTickEnd()},_.clearWaitingFragment=function(){var u=this.waitingData;u&&(this.fragmentTracker.removeFragment(u.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=A.State.IDLE)},_.onTickEnd=function(){var u=this.media;if(!u||!u.readyState)return;var l=this.mediaBuffer?this.mediaBuffer:u,m=l.buffered;!this.loadedmetadata&&m.length&&(this.loadedmetadata=!0),this.lastCurrentTime=u.currentTime},_.doTickIdle=function(){var u,l,m=this.hls,c=this.levels,T=this.media,N=this.trackId,D=m.config;if(!c||!c[N])return;if(!T&&(this.startFragRequested||!D.startFragPrefetch))return;var y=c[N],O=y.details;if(!O||O.live&&this.levelLastLoaded!==N||this.waitForCdnTuneIn(O)){this.state=A.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,g.ElementaryStreamTypes.AUDIO,C.PlaylistLevelType.AUDIO));var k=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,C.PlaylistLevelType.AUDIO);if(k===null)return;var R=k.len,B=this.getMaxBufferLength(),V=this.audioSwitch;if(R>=B&&!V)return;if(!V&&this._streamEnded(k,O)){m.trigger(I.Events.BUFFER_EOS,{type:"audio"}),this.state=A.State.ENDED;return}var ee=O.fragments,re=ee[0].start,_e=k.end;if(V){var se=this.getLoadPosition();_e=se,O.PTSKnown&&se<re&&((k.end>re||k.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),T.currentTime=re+.05))}var ye=this.getNextFragment(_e,O);if(!ye){this.bufferFlushed=!0;return}((u=ye.decryptdata)===null||u===void 0?void 0:u.keyFormat)==="identity"&&!((l=ye.decryptdata)!==null&&l!==void 0&&l.key)?this.loadKey(ye,O):this.loadFragment(ye,O,_e)},_.getMaxBufferLength=function(){var u=w.prototype.getMaxBufferLength.call(this),l=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,C.PlaylistLevelType.MAIN);return l===null?u:Math.max(u,l.len)},_.onMediaDetaching=function(){this.videoBuffer=null,w.prototype.onMediaDetaching.call(this)},_.onAudioTracksUpdated=function(u,l){var m=l.audioTracks;this.resetTransmuxer(),this.levels=m.map(function(c){return new e.Level(c)})},_.onAudioTrackSwitching=function(u,l){var m=!!l.url;this.trackId=l.id;var c=this.fragCurrent;c!=null&&c.loader&&c.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),m?this.setInterval(v):this.resetTransmuxer(),m?(this.audioSwitch=!0,this.state=A.State.IDLE):this.state=A.State.STOPPED,this.tick()},_.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},_.onLevelLoaded=function(u,l){this.mainDetails=l.details},_.onAudioTrackLoaded=function(u,l){var m,c=this.levels,T=l.details,N=l.id;if(!c){this.warn("Audio tracks were reset while loading level "+N);return}this.log("Track "+N+" loaded ["+T.startSN+","+T.endSN+"],duration:"+T.totalduration);var D=c[N],y=0;if(T.live||(m=D.details)!==null&&m!==void 0&&m.live){var O=this.mainDetails;if(T.fragments[0]||(T.deltaUpdateFailed=!0),T.deltaUpdateFailed||!O)return;!D.details&&T.hasProgramDateTime&&O.hasProgramDateTime?(Object(h.alignMediaPlaylistByPDT)(T,O),y=T.fragments[0].start):y=this.alignPlaylists(T,D.details)}D.details=T,this.levelLastLoaded=N,!this.startFragRequested&&(this.mainDetails||!T.live)&&this.setStartPosition(D.details,y),this.state===A.State.WAITING_TRACK&&!this.waitForCdnTuneIn(T)&&(this.state=A.State.IDLE),this.tick()},_._handleFragmentLoadProgress=function(u){var l,m=u.frag,c=u.part,T=u.payload,N=this.config,D=this.trackId,y=this.levels;if(!y){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+m.sn+" of level "+m.level+" will not be buffered");return}var O=y[D];console.assert(O,"Audio track is defined on fragment load progress");var k=O.details;console.assert(k,"Audio track details are defined on fragment load progress");var R=N.defaultAudioCodec||O.audioCodec||"mp4a.40.2",B=this.transmuxer;B||(B=this.transmuxer=new o.default(this.hls,C.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var V=this.initPTS[m.cc],ee=(l=m.initSegment)===null||l===void 0?void 0:l.data;if(V!==void 0){var re=!1,_e=c?c.index:-1,se=_e!==-1,ye=new r.ChunkMetadata(m.level,m.sn,m.stats.chunkCount,T.byteLength,_e,se);B.push(T,ee,R,"",m,c,k.totalduration,re,ye,V)}else{i.logger.log("Unknown video PTS for cc "+m.cc+", waiting for video PTS before demuxing audio frag "+m.sn+" of ["+k.startSN+" ,"+k.endSN+"],track "+D);var ve=this.waitingData=this.waitingData||{frag:m,part:c,cache:new f.default,complete:!1},Ee=ve.cache;Ee.push(new Uint8Array(T)),this.waitingVideoCC=this.videoTrackCC,this.state=A.State.WAITING_INIT_PTS}},_._handleFragmentLoadComplete=function(u){if(this.waitingData){this.waitingData.complete=!0;return}w.prototype._handleFragmentLoadComplete.call(this,u)},_.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},_.onBufferCreated=function(u,l){var m=l.tracks.audio;m&&(this.mediaBuffer=m.buffer),l.tracks.video&&(this.videoBuffer=l.tracks.video.buffer)},_.onFragBuffered=function(u,l){var m=l.frag,c=l.part;if(m.type!==C.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(m)){this.warn("Fragment "+m.sn+(c?" p: "+c.index:"")+" of level "+m.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}m.sn!=="initSegment"&&(this.fragPrevious=m,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(I.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(m,c)},_.onError=function(u,l){switch(l.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(C.PlaylistLevelType.AUDIO,l);break;case s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==A.State.ERROR&&this.state!==A.State.STOPPED&&(this.state=l.fatal?A.State.ERROR:A.State.IDLE,this.warn(l.details+" while loading frag, switching to "+this.state+" state"));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if(l.parent==="audio"&&(this.state===A.State.PARSING||this.state===A.State.PARSED)){var m=!0,c=this.getFwdBufferInfo(this.mediaBuffer,C.PlaylistLevelType.AUDIO);c&&c.len>.5&&(m=!this.reduceMaxBufferLength(c.len)),m&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,w.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},_.onBufferFlushed=function(u,l){var m=l.type;m===g.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},_._handleTransmuxComplete=function(u){var l,m="audio",c=this.hls,T=u.remuxResult,N=u.chunkMeta,D=this.getCurrentContext(N);if(!D){this.warn("The loading context changed while buffering fragment "+N.sn+" of level "+N.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(N.level);return}var y=D.frag,O=D.part,k=T.audio,R=T.text,B=T.id3,V=T.initSegment;if(this.fragContextChanged(y))return;if(this.state=A.State.PARSING,this.audioSwitch&&k&&this.completeAudioSwitch(),V!=null&&V.tracks&&(this._bufferInitSegment(V.tracks,y,N),c.trigger(I.Events.FRAG_PARSING_INIT_SEGMENT,{frag:y,id:m,tracks:V.tracks})),k){var ee=k.startPTS,re=k.endPTS,_e=k.startDTS,se=k.endDTS;O&&(O.elementaryStreams[g.ElementaryStreamTypes.AUDIO]={startPTS:ee,endPTS:re,startDTS:_e,endDTS:se}),y.setElementaryStreamInfo(g.ElementaryStreamTypes.AUDIO,ee,re,_e,se),this.bufferFragmentData(k,y,O,N)}if(B!=null&&(l=B.samples)!==null&&l!==void 0&&l.length){var ye=n({frag:y,id:m},B);c.trigger(I.Events.FRAG_PARSING_METADATA,ye)}if(R){var ve=n({frag:y,id:m},R);c.trigger(I.Events.FRAG_PARSING_USERDATA,ve)}},_._bufferInitSegment=function(u,l,m){if(this.state!==A.State.PARSING)return;u.video&&delete u.video;var c=u.audio;if(!c)return;c.levelCodec=c.codec,c.id="audio",this.log("Init audio buffer, container:"+c.container+", codecs[parsed]=["+c.codec+"]"),this.hls.trigger(I.Events.BUFFER_CODECS,u);var T=c.initSegment;if(T!=null&&T.byteLength){var N={type:"audio",frag:l,part:null,chunkMeta:m,parent:l.type,data:T};this.hls.trigger(I.Events.BUFFER_APPENDING,N)}this.tick()},_.loadFragment=function(u,l,m){var c=this.fragmentTracker.getState(u);this.fragCurrent=u,(this.audioSwitch||c===P.FragmentState.NOT_LOADED||c===P.FragmentState.PARTIAL)&&(u.sn==="initSegment"?this._loadInitSegment(u):l.live&&!Object(z.isFiniteNumber)(this.initPTS[u.cc])?(this.log("Waiting for video PTS in continuity counter "+u.cc+" of live stream before loading audio fragment "+u.sn+" of level "+this.trackId),this.state=A.State.WAITING_INIT_PTS):(this.startFragRequested=!0,w.prototype.loadFragment.call(this,u,l,m)))},_.completeAudioSwitch=function(){var u=this.hls,l=this.media,m=this.trackId;l&&(this.log("Switching audio track : flushing all audio"),w.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,u.trigger(I.Events.AUDIO_TRACK_SWITCHED,{id:m})},x}(A.default);W.default=E},"./src/controller/audio-track-controller.ts":function(ce,W,M){"use strict";M.r(W);var z=M("./src/events.ts"),A=M("./src/errors.ts"),I=M("./src/controller/base-playlist-controller.ts"),H=M("./src/types/loader.ts");function P(o,r){for(var a=0;a<r.length;a++){var h=r[a];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(o,h.key,h)}}function e(o,r,a){return r&&P(o.prototype,r),a&&P(o,a),o}function C(o,r){o.prototype=Object.create(r.prototype),o.prototype.constructor=o,g(o,r)}function g(o,r){return g=Object.setPrototypeOf||function(h,s){return h.__proto__=s,h},g(o,r)}var f=function(o){C(r,o);function r(h){var s;return s=o.call(this,h,"[audio-track-controller]")||this,s.tracks=[],s.groupId=null,s.tracksInGroup=[],s.trackId=-1,s.trackName="",s.selectDefaultTrack=!0,s.registerListeners(),s}var a=r.prototype;return a.registerListeners=function(){var s=this.hls;s.on(z.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(z.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.on(z.Events.LEVEL_LOADING,this.onLevelLoading,this),s.on(z.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),s.on(z.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),s.on(z.Events.ERROR,this.onError,this)},a.unregisterListeners=function(){var s=this.hls;s.off(z.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.off(z.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.off(z.Events.LEVEL_LOADING,this.onLevelLoading,this),s.off(z.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),s.off(z.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),s.off(z.Events.ERROR,this.onError,this)},a.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,o.prototype.destroy.call(this)},a.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},a.onManifestParsed=function(s,i){this.tracks=i.audioTracks||[]},a.onAudioTrackLoaded=function(s,i){var n=i.id,t=i.details,b=this.tracksInGroup[n];if(!b){this.warn("Invalid audio track id "+n);return}var v=b.details;b.details=i.details,this.log("audioTrack "+n+" loaded ["+t.startSN+"-"+t.endSN+"]"),n===this.trackId&&(this.retryCount=0,this.playlistLoaded(n,i,v))},a.onLevelLoading=function(s,i){this.switchLevel(i.level)},a.onLevelSwitching=function(s,i){this.switchLevel(i.level)},a.switchLevel=function(s){var i=this.hls.levels[s];if(!(i!=null&&i.audioGroupIds))return;var n=i.audioGroupIds[i.urlId];if(this.groupId!==n){this.groupId=n;var t=this.tracks.filter(function(v){return!n||v.groupId===n});this.selectDefaultTrack&&!t.some(function(v){return v.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=t;var b={audioTracks:t};this.log("Updating audio tracks, "+t.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(z.Events.AUDIO_TRACKS_UPDATED,b),this.selectInitialTrack()}},a.onError=function(s,i){if(o.prototype.onError.call(this,s,i),i.fatal||!i.context)return;i.context.type===H.PlaylistContextType.AUDIO_TRACK&&i.context.id===this.trackId&&i.context.groupId===this.groupId&&this.retryLoadingOrFail(i)},a.setAudioTrack=function(s){var i=this.tracksInGroup;if(s<0||s>=i.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var n=i[this.trackId];this.log("Now switching to audio-track index "+s);var t=i[s],b=t.id,v=t.groupId,E=v===void 0?"":v,w=t.name,x=t.type,_=t.url;if(this.trackId=s,this.trackName=w,this.selectDefaultTrack=!1,this.hls.trigger(z.Events.AUDIO_TRACK_SWITCHING,{id:b,groupId:E,name:w,type:x,url:_}),t.details&&!t.details.live)return;var p=this.switchParams(t.url,n==null?void 0:n.details);this.loadPlaylist(p)},a.selectInitialTrack=function(){var s=this.tracksInGroup;console.assert(s.length,"Initial audio track should be selected when tracks are known");var i=this.trackName,n=this.findTrackId(i)||this.findTrackId();n!==-1?this.setAudioTrack(n):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(z.Events.ERROR,{type:A.ErrorTypes.MEDIA_ERROR,details:A.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},a.findTrackId=function(s){for(var i=this.tracksInGroup,n=0;n<i.length;n++){var t=i[n];if((!this.selectDefaultTrack||t.default)&&(!s||s===t.name))return t.id}return-1},a.loadPlaylist=function(s){var i=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(i)){var n=i.id,t=i.groupId,b=i.url;if(s)try{b=s.addDirectives(b)}catch(v){this.warn("Could not construct new URL with HLS Delivery Directives: "+v)}this.log("loading audio-track playlist for id: "+n),this.clearTimer(),this.hls.trigger(z.Events.AUDIO_TRACK_LOADING,{url:b,id:n,groupId:t,deliveryDirectives:s||null})}},e(r,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(s){this.selectDefaultTrack=!1,this.setAudioTrack(s)}}]),r}(I.default);W.default=f},"./src/controller/base-playlist-controller.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"default",function(){return e});var z=M("./src/polyfills/number.ts"),A=M("./src/types/level.ts"),I=M("./src/controller/level-helper.ts"),H=M("./src/utils/logger.ts"),P=M("./src/errors.ts"),e=function(){function C(f,o){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=H.logger.log.bind(H.logger,o+":"),this.warn=H.logger.warn.bind(H.logger,o+":"),this.hls=f}var g=C.prototype;return g.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},g.onError=function(o,r){r.fatal&&r.type===P.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},g.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},g.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},g.stopLoad=function(){this.canLoad=!1,this.clearTimer()},g.switchParams=function(o,r){var a=r==null?void 0:r.renditionReports;if(a)for(var h=0;h<a.length;h++){var s=a[h],i=""+s.URI;if(i===o.substr(-i.length)){var n=parseInt(s["LAST-MSN"]),t=parseInt(s["LAST-PART"]);if(r&&this.hls.config.lowLatencyMode){var b=Math.min(r.age-r.partTarget,r.targetduration);t!==void 0&&b>r.partTarget&&(t+=1)}if(Object(z.isFiniteNumber)(n))return new A.HlsUrlParameters(n,Object(z.isFiniteNumber)(t)?t:void 0,A.HlsSkip.No)}}},g.loadPlaylist=function(o){},g.shouldLoadTrack=function(o){return this.canLoad&&o&&!!o.url&&(!o.details||o.details.live)},g.playlistLoaded=function(o,r,a){var h=this,s=r.details,i=r.stats,n=i.loading.end?Math.max(0,self.performance.now()-i.loading.end):0;if(s.advancedDateTime=Date.now()-n,s.live||a!=null&&a.live){if(s.reloaded(a),a&&this.log("live playlist "+o+" "+(s.advanced?"REFRESHED "+s.lastPartSn+"-"+s.lastPartIndex:"MISSED")),a&&s.fragments.length>0&&Object(I.mergeDetails)(a,s),!this.canLoad||!s.live)return;var t,b=void 0,v=void 0;if(s.canBlockReload&&s.endSN&&s.advanced){var E=this.hls.config.lowLatencyMode,w=s.lastPartSn,x=s.endSN,_=s.lastPartIndex,p=_!==-1,u=w===x,l=E?0:_;p?(b=u?x+1:w,v=u?l:_+1):b=x+1;var m=s.age,c=m+s.ageHeader,T=Math.min(c-s.partTarget,s.targetduration*1.5);if(T>0){if(a&&T>a.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+a.tuneInGoal+" to: "+T+" with playlist age: "+s.age),T=0;else{var N=Math.floor(T/s.targetduration);if(b+=N,v!==void 0){var D=Math.round(T%s.targetduration/s.partTarget);v+=D}this.log("CDN Tune-in age: "+s.ageHeader+"s last advanced "+m.toFixed(2)+"s goal: "+T+" skip sn "+N+" to part "+v)}s.tuneInGoal=T}if(t=this.getDeliveryDirectives(s,r.deliveryDirectives,b,v),E||!u){this.loadPlaylist(t);return}}else t=this.getDeliveryDirectives(s,r.deliveryDirectives,b,v);var y=Object(I.computeReloadInterval)(s,i);b!==void 0&&s.canBlockReload&&(y-=s.partTarget||1),this.log("reload live playlist "+o+" in "+Math.round(y)+" ms"),this.timer=self.setTimeout(function(){return h.loadPlaylist(t)},y)}else this.clearTimer()},g.getDeliveryDirectives=function(o,r,a,h){var s=Object(A.getSkipValue)(o,a);return r!=null&&r.skip&&o.deltaUpdateFailed&&(a=r.msn,h=r.part,s=A.HlsSkip.No),new A.HlsUrlParameters(a,h,s)},g.retryLoadingOrFail=function(o){var r=this,a=this.hls.config,h=this.retryCount<a.levelLoadingMaxRetry;if(h){var s;if(this.retryCount++,o.details.indexOf("LoadTimeOut")>-1&&(s=o.context)!==null&&s!==void 0&&s.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+o.details+'"'),this.loadPlaylist();else{var i=Math.min(Math.pow(2,this.retryCount)*a.levelLoadingRetryDelay,a.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return r.loadPlaylist()},i),this.warn("retry playlist loading #"+this.retryCount+" in "+i+' ms after "'+o.details+'"')}}else this.warn('cannot recover from error "'+o.details+'"'),this.clearTimer(),o.fatal=!0;return h},C}()},"./src/controller/base-stream-controller.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"State",function(){return x}),M.d(W,"default",function(){return _});var z=M("./src/polyfills/number.ts"),A=M("./src/task-loop.ts"),I=M("./src/controller/fragment-tracker.ts"),H=M("./src/utils/buffer-helper.ts"),P=M("./src/utils/logger.ts"),e=M("./src/events.ts"),C=M("./src/errors.ts"),g=M("./src/types/transmuxer.ts"),f=M("./src/utils/mp4-tools.ts"),o=M("./src/utils/discontinuities.ts"),r=M("./src/controller/fragment-finders.ts"),a=M("./src/controller/level-helper.ts"),h=M("./src/loader/fragment-loader.ts"),s=M("./src/crypt/decrypter.ts"),i=M("./src/utils/time-ranges.ts"),n=M("./src/types/loader.ts");function t(p,u){for(var l=0;l<u.length;l++){var m=u[l];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,m.key,m)}}function b(p,u,l){return u&&t(p.prototype,u),l&&t(p,l),p}function v(p){if(p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p}function E(p,u){p.prototype=Object.create(u.prototype),p.prototype.constructor=p,w(p,u)}function w(p,u){return w=Object.setPrototypeOf||function(m,c){return m.__proto__=c,m},w(p,u)}var x={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},_=function(p){E(u,p);function u(m,c,T){var N;return N=p.call(this)||this,N.hls=void 0,N.fragPrevious=null,N.fragCurrent=null,N.fragmentTracker=void 0,N.transmuxer=null,N._state=x.STOPPED,N.media=void 0,N.mediaBuffer=void 0,N.config=void 0,N.bitrateTest=!1,N.lastCurrentTime=0,N.nextLoadPosition=0,N.startPosition=0,N.loadedmetadata=!1,N.fragLoadError=0,N.retryDate=0,N.levels=null,N.fragmentLoader=void 0,N.levelLastLoaded=null,N.startFragRequested=!1,N.decrypter=void 0,N.initPTS=[],N.onvseeking=null,N.onvended=null,N.logPrefix="",N.log=void 0,N.warn=void 0,N.logPrefix=T,N.log=P.logger.log.bind(P.logger,T+":"),N.warn=P.logger.warn.bind(P.logger,T+":"),N.hls=m,N.fragmentLoader=new h.default(m.config),N.fragmentTracker=c,N.config=m.config,N.decrypter=new s.default(m,m.config),m.on(e.Events.KEY_LOADED,N.onKeyLoaded,v(N)),N}var l=u.prototype;return l.doTick=function(){this.onTickEnd()},l.onTickEnd=function(){},l.startLoad=function(c){},l.stopLoad=function(){this.fragmentLoader.abort();var c=this.fragCurrent;c&&this.fragmentTracker.removeFragment(c),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=x.STOPPED},l._streamEnded=function(c,T){var N=this.fragCurrent,D=this.fragmentTracker;if(!T.live&&N&&N.sn===T.endSN&&!c.nextStart){var y=D.getState(N);return y===I.FragmentState.PARTIAL||y===I.FragmentState.OK}return!1},l.onMediaAttached=function(c,T){var N=this.media=this.mediaBuffer=T.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),N.addEventListener("seeking",this.onvseeking),N.addEventListener("ended",this.onvended);var D=this.config;this.levels&&D.autoStartLoad&&this.state===x.STOPPED&&this.startLoad(D.startPosition)},l.onMediaDetaching=function(){var c=this.media;c!=null&&c.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),c&&(c.removeEventListener("seeking",this.onvseeking),c.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},l.onMediaSeeking=function(){var c=this.config,T=this.fragCurrent,N=this.media,D=this.mediaBuffer,y=this.state,O=N?N.currentTime:0,k=H.BufferHelper.bufferInfo(D||N,O,c.maxBufferHole);if(this.log("media seeking to "+(Object(z.isFiniteNumber)(O)?O.toFixed(3):O)+", state: "+y),y===x.ENDED)this.resetLoadingState();else if(T&&!k.len){var R=c.maxFragLookUpTolerance,B=T.start-R,V=T.start+T.duration+R,ee=O>V;(O<B||ee)&&(ee&&T.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),T.loader.abort()),this.resetLoadingState())}N&&(this.lastCurrentTime=O),!this.loadedmetadata&&!k.len&&(this.nextLoadPosition=this.startPosition=O),this.tickImmediate()},l.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},l.onKeyLoaded=function(c,T){if(this.state!==x.KEY_LOADING||T.frag!==this.fragCurrent||!this.levels)return;this.state=x.IDLE;var N=this.levels[T.frag.level].details;N&&this.loadFragment(T.frag,N,T.frag.start)},l.onHandlerDestroying=function(){this.stopLoad(),p.prototype.onHandlerDestroying.call(this)},l.onHandlerDestroyed=function(){this.state=x.STOPPED,this.hls.off(e.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,p.prototype.onHandlerDestroyed.call(this)},l.loadKey=function(c,T){this.log("Loading key for "+c.sn+" of ["+T.startSN+"-"+T.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+c.level),this.state=x.KEY_LOADING,this.fragCurrent=c,this.hls.trigger(e.Events.KEY_LOADING,{frag:c})},l.loadFragment=function(c,T,N){this._loadFragForPlayback(c,T,N)},l._loadFragForPlayback=function(c,T,N){var D=this,y=function(k){if(D.fragContextChanged(c)){D.warn("Fragment "+c.sn+(k.part?" p: "+k.part.index:"")+" of level "+c.level+" was dropped during download."),D.fragmentTracker.removeFragment(c);return}c.stats.chunkCount++,D._handleFragmentLoadProgress(k)};this._doFragLoad(c,T,N,y).then(function(O){if(!O)return;D.fragLoadError=0;var k=D.state;if(D.fragContextChanged(c)){(k===x.FRAG_LOADING||k===x.BACKTRACKING||!D.fragCurrent&&k===x.PARSING)&&(D.fragmentTracker.removeFragment(c),D.state=x.IDLE);return}if("payload"in O&&(D.log("Loaded fragment "+c.sn+" of level "+c.level),D.hls.trigger(e.Events.FRAG_LOADED,O),D.state===x.BACKTRACKING)){D.fragmentTracker.backtrack(c,O),D.resetFragmentLoading(c);return}D._handleFragmentLoadComplete(O)}).catch(function(O){D.warn(O),D.resetFragmentLoading(c)})},l.flushMainBuffer=function(c,T,N){if(N===void 0&&(N=null),!(c-T))return;var D={startOffset:c,endOffset:T,type:N};this.fragLoadError=0,this.hls.trigger(e.Events.BUFFER_FLUSHING,D)},l._loadInitSegment=function(c){var T=this;this._doFragLoad(c).then(function(N){if(!N||T.fragContextChanged(c)||!T.levels)throw new Error("init load aborted");return N}).then(function(N){var D=T.hls,y=N.payload,O=c.decryptdata;if(y&&y.byteLength>0&&O&&O.key&&O.iv&&O.method==="AES-128"){var k=self.performance.now();return T.decrypter.webCryptoDecrypt(new Uint8Array(y),O.key.buffer,O.iv.buffer).then(function(R){var B=self.performance.now();return D.trigger(e.Events.FRAG_DECRYPTED,{frag:c,payload:R,stats:{tstart:k,tdecrypt:B}}),N.payload=R,N})}return N}).then(function(N){var D=T.fragCurrent,y=T.hls,O=T.levels;if(!O)throw new Error("init load aborted, missing levels");var k=O[c.level].details;console.assert(k,"Level details are defined when init segment is loaded");var R=c.stats;T.state=x.IDLE,T.fragLoadError=0,c.data=new Uint8Array(N.payload),R.parsing.start=R.buffering.start=self.performance.now(),R.parsing.end=R.buffering.end=self.performance.now(),N.frag===D&&y.trigger(e.Events.FRAG_BUFFERED,{stats:R,frag:D,part:null,id:c.type}),T.tick()}).catch(function(N){T.warn(N),T.resetFragmentLoading(c)})},l.fragContextChanged=function(c){var T=this.fragCurrent;return!c||!T||c.level!==T.level||c.sn!==T.sn||c.urlId!==T.urlId},l.fragBufferedComplete=function(c,T){var N=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+c.type+" sn: "+c.sn+(T?" part: "+T.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+c.level+" "+i.default.toString(H.BufferHelper.getBuffered(N))),this.state=x.IDLE,this.tick()},l._handleFragmentLoadComplete=function(c){var T=this.transmuxer;if(!T)return;var N=c.frag,D=c.part,y=c.partsLoaded,O=!y||y.length===0||y.some(function(R){return!R}),k=new g.ChunkMetadata(N.level,N.sn,N.stats.chunkCount+1,0,D?D.index:-1,!O);T.flush(k)},l._handleFragmentLoadProgress=function(c){},l._doFragLoad=function(c,T,N,D){var y=this;if(N===void 0&&(N=null),!this.levels)throw new Error("frag load aborted, missing levels");if(N=Math.max(c.start,N||0),this.config.lowLatencyMode&&T){var O=T.partList;if(O&&D){N>c.end&&T.fragmentHint&&(c=T.fragmentHint);var k=this.getNextPart(O,c,N);if(k>-1){var R=O[k];return this.log("Loading part sn: "+c.sn+" p: "+R.index+" cc: "+c.cc+" of playlist ["+T.startSN+"-"+T.endSN+"] parts [0-"+k+"-"+(O.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+c.level+", target: "+parseFloat(N.toFixed(3))),this.nextLoadPosition=R.start+R.duration,this.state=x.FRAG_LOADING,this.hls.trigger(e.Events.FRAG_LOADING,{frag:c,part:O[k],targetBufferTime:N}),this.doFragPartsLoad(c,O,k,D).catch(function(B){return y.handleFragLoadError(B)})}else if(!c.url||this.loadedEndOfParts(O,N))return Promise.resolve(null)}}return this.log("Loading fragment "+c.sn+" cc: "+c.cc+" "+(T?"of ["+T.startSN+"-"+T.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+c.level+", target: "+parseFloat(N.toFixed(3))),Object(z.isFiniteNumber)(c.sn)&&!this.bitrateTest&&(this.nextLoadPosition=c.start+c.duration),this.state=x.FRAG_LOADING,this.hls.trigger(e.Events.FRAG_LOADING,{frag:c,targetBufferTime:N}),this.fragmentLoader.load(c,D).catch(function(B){return y.handleFragLoadError(B)})},l.doFragPartsLoad=function(c,T,N,D){var y=this;return new Promise(function(O,k){var R=[],B=function V(ee){var re=T[ee];y.fragmentLoader.loadPart(c,re,D).then(function(_e){R[re.index]=_e;var se=_e.part;y.hls.trigger(e.Events.FRAG_LOADED,_e);var ye=T[ee+1];if(ye&&ye.fragment===c)V(ee+1);else return O({frag:c,part:se,partsLoaded:R})}).catch(k)};B(N)})},l.handleFragLoadError=function(c){var T=c.data;return T&&T.details===C.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(T.frag,T.part):this.hls.trigger(e.Events.ERROR,T),null},l._handleTransmuxerFlush=function(c){var T=this.getCurrentContext(c);if(!T||this.state!==x.PARSING){this.fragCurrent||(this.state=x.IDLE);return}var N=T.frag,D=T.part,y=T.level,O=self.performance.now();N.stats.parsing.end=O,D&&(D.stats.parsing.end=O),this.updateLevelTiming(N,D,y,c.partial)},l.getCurrentContext=function(c){var T=this.levels,N=c.level,D=c.sn,y=c.part;if(!T||!T[N])return this.warn("Levels object was unset while buffering fragment "+D+" of level "+N+". The current chunk will not be buffered."),null;var O=T[N],k=y>-1?Object(a.getPartWith)(O,D,y):null,R=k?k.fragment:Object(a.getFragmentWithSN)(O,D,this.fragCurrent);return R?{frag:R,part:k,level:O}:null},l.bufferFragmentData=function(c,T,N,D){if(!c||this.state!==x.PARSING)return;var y=c.data1,O=c.data2,k=y;if(y&&O&&(k=Object(f.appendUint8Array)(y,O)),!k||!k.length)return;var R={type:c.type,frag:T,part:N,chunkMeta:D,parent:T.type,data:k};this.hls.trigger(e.Events.BUFFER_APPENDING,R),c.dropped&&c.independent&&!N&&this.flushBufferGap(T)},l.flushBufferGap=function(c){var T=this.media;if(!T)return;if(!H.BufferHelper.isBuffered(T,T.currentTime)){this.flushMainBuffer(0,c.start);return}var N=T.currentTime,D=H.BufferHelper.bufferInfo(T,N,0),y=c.duration,O=Math.min(this.config.maxFragLookUpTolerance*2,y*.25),k=Math.max(Math.min(c.start-O,D.end-O),N+O);c.start-k>O&&this.flushMainBuffer(k,c.start)},l.getFwdBufferInfo=function(c,T){var N=this.config,D=this.getLoadPosition();if(!Object(z.isFiniteNumber)(D))return null;var y=H.BufferHelper.bufferInfo(c,D,N.maxBufferHole);if(y.len===0&&y.nextStart!==void 0){var O=this.fragmentTracker.getBufferedFrag(D,T);if(O&&y.nextStart<O.end)return H.BufferHelper.bufferInfo(c,D,Math.max(y.nextStart,N.maxBufferHole))}return y},l.getMaxBufferLength=function(c){var T=this.config,N;return c?N=Math.max(8*T.maxBufferSize/c,T.maxBufferLength):N=T.maxBufferLength,Math.min(N,T.maxMaxBufferLength)},l.reduceMaxBufferLength=function(c){var T=this.config,N=c||T.maxBufferLength;return T.maxMaxBufferLength>=N?(T.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+T.maxMaxBufferLength+"s"),!0):!1},l.getNextFragment=function(c,T){var N,D,y=T.fragments,O=y.length;if(!O)return null;var k=this.config,R=y[0].start,B;if(T.live){var V=k.initialLiveManifestSize;if(O<V)return this.warn("Not enough fragments to start playback (have: "+O+", need: "+V+")"),null;!T.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(B=this.getInitialLiveFragment(T,y),this.startPosition=B?this.hls.liveSyncPosition||B.start:c)}else c<=R&&(B=y[0]);if(!B){var ee=k.lowLatencyMode?T.partEnd:T.fragmentEnd;B=this.getFragmentAtPosition(c,ee,T)}return(N=B)!==null&&N!==void 0&&N.initSegment&&!((D=B)!==null&&D!==void 0&&D.initSegment.data)&&!this.bitrateTest&&(B=B.initSegment),B},l.getNextPart=function(c,T,N){for(var D=-1,y=!1,O=!0,k=0,R=c.length;k<R;k++){var B=c[k];if(O=O&&!B.independent,D>-1&&N<B.start)break;var V=B.loaded;!V&&(y||B.independent||O)&&B.fragment===T&&(D=k),y=V}return D},l.loadedEndOfParts=function(c,T){var N=c[c.length-1];return N&&T>N.start&&N.loaded},l.getInitialLiveFragment=function(c,T){var N=this.fragPrevious,D=null;if(N){if(c.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+N.programDateTime),D=Object(r.findFragmentByPDT)(T,N.endProgramDateTime,this.config.maxFragLookUpTolerance)),!D){var y=N.sn+1;if(y>=c.startSN&&y<=c.endSN){var O=T[y-c.startSN];N.cc===O.cc&&(D=O,this.log("Live playlist, switching playlist, load frag with next SN: "+D.sn))}D||(D=Object(r.findFragWithCC)(T,N.cc),D&&this.log("Live playlist, switching playlist, load frag with same CC: "+D.sn))}}else{var k=this.hls.liveSyncPosition;k!==null&&(D=this.getFragmentAtPosition(k,this.bitrateTest?c.fragmentEnd:c.edge,c))}return D},l.getFragmentAtPosition=function(c,T,N){var D=this.config,y=this.fragPrevious,O=N.fragments,k=N.endSN,R=N.fragmentHint,B=D.maxFragLookUpTolerance,V=!!(D.lowLatencyMode&&N.partList&&R);V&&R&&!this.bitrateTest&&(O=O.concat(R),k=R.sn);var ee;if(c<T){var re=c>T-B?0:B;ee=Object(r.findFragmentByPTS)(y,O,c,re)}else ee=O[O.length-1];if(ee){var _e=ee.sn-N.startSN,se=y&&ee.level===y.level,ye=O[_e+1],ve=this.fragmentTracker.getState(ee);if(ve===I.FragmentState.BACKTRACKED){ee=null;for(var Ee=_e;O[Ee]&&this.fragmentTracker.getState(O[Ee])===I.FragmentState.BACKTRACKED;)y?ee=O[Ee--]:ee=O[--Ee];ee||(ee=ye)}else y&&ee.sn===y.sn&&!V&&(se&&(ee.sn<k&&this.fragmentTracker.getState(ye)!==I.FragmentState.OK?(this.log("SN "+ee.sn+" just loaded, load next one: "+ye.sn),ee=ye):ee=null))}return ee},l.synchronizeToLiveEdge=function(c){var T=this.config,N=this.media;if(!N)return;var D=this.hls.liveSyncPosition,y=N.currentTime,O=c.fragments[0].start,k=c.edge,R=y>=O-T.maxFragLookUpTolerance&&y<=k;if(D!==null&&N.duration>D&&(y<D||!R)){var B=T.liveMaxLatencyDuration!==void 0?T.liveMaxLatencyDuration:T.liveMaxLatencyDurationCount*c.targetduration;(!R&&N.readyState<4||y<k-B)&&(this.loadedmetadata||(this.nextLoadPosition=D),N.readyState&&(this.warn("Playback: "+y.toFixed(3)+" is located too far from the end of live sliding playlist: "+k+", reset currentTime to : "+D.toFixed(3)),N.currentTime=D))}},l.alignPlaylists=function(c,T){var N=this.levels,D=this.levelLastLoaded,y=this.fragPrevious,O=D!==null?N[D]:null,k=c.fragments.length;if(!k)return this.warn("No fragments in live playlist"),0;var R=c.fragments[0].start,B=!T,V=c.alignedSliding&&Object(z.isFiniteNumber)(R);if(B||!V&&!R){Object(o.alignStream)(y,O,c);var ee=c.fragments[0].start;return this.log("Live playlist sliding: "+ee.toFixed(2)+" start-sn: "+(T?T.startSN:"na")+"->"+c.startSN+" prev-sn: "+(y?y.sn:"na")+" fragments: "+k),ee}return R},l.waitForCdnTuneIn=function(c){var T=3;return c.live&&c.canBlockReload&&c.tuneInGoal>Math.max(c.partHoldBack,c.partTarget*T)},l.setStartPosition=function(c,T){var N=this.startPosition;if(N<T&&(N=-1),N===-1||this.lastCurrentTime===-1){var D=c.startTimeOffset;Object(z.isFiniteNumber)(D)?(N=T+D,D<0&&(N+=c.totalduration),N=Math.min(Math.max(T,N),T+c.totalduration),this.log("Start time offset "+D+" found in playlist, adjust startPosition to "+N),this.startPosition=N):c.live?N=this.hls.liveSyncPosition||T:this.startPosition=N=0,this.lastCurrentTime=N}this.nextLoadPosition=N},l.getLoadPosition=function(){var c=this.media,T=0;return this.loadedmetadata&&c?T=c.currentTime:this.nextLoadPosition&&(T=this.nextLoadPosition),T},l.handleFragLoadAborted=function(c,T){this.transmuxer&&c.sn!=="initSegment"&&c.stats.aborted&&(this.warn("Fragment "+c.sn+(T?" part"+T.index:"")+" of level "+c.level+" was aborted"),this.resetFragmentLoading(c))},l.resetFragmentLoading=function(c){(!this.fragCurrent||!this.fragContextChanged(c))&&(this.state=x.IDLE)},l.onFragmentOrKeyLoadError=function(c,T){if(T.fatal)return;var N=T.frag;if(!N||N.type!==c)return;var D=this.fragCurrent;console.assert(D&&N.sn===D.sn&&N.level===D.level&&N.urlId===D.urlId,"Frag load error must match current frag to retry");var y=this.config;if(this.fragLoadError+1<=y.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(N.level))return;var O=Math.min(Math.pow(2,this.fragLoadError)*y.fragLoadingRetryDelay,y.fragLoadingMaxRetryTimeout);this.warn("Fragment "+N.sn+" of "+c+" "+N.level+" failed to load, retrying in "+O+"ms"),this.retryDate=self.performance.now()+O,this.fragLoadError++,this.state=x.FRAG_LOADING_WAITING_RETRY}else T.levelRetry?(c===n.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=x.IDLE):(P.logger.error(T.details+" reaches max retry, redispatch as fatal ..."),T.fatal=!0,this.hls.stopLoad(),this.state=x.ERROR)},l.afterBufferFlushed=function(c,T,N){if(!c)return;var D=H.BufferHelper.getBuffered(c);this.fragmentTracker.detectEvictedFragments(T,D,N),this.state===x.ENDED&&this.resetLoadingState()},l.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=x.IDLE},l.resetLiveStartWhenNotLoaded=function(c){if(!this.loadedmetadata){this.startFragRequested=!1;var T=this.levels?this.levels[c].details:null;if(T!=null&&T.live)return this.startPosition=-1,this.setStartPosition(T,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},l.updateLevelTiming=function(c,T,N,D){var y=this,O=N.details;console.assert(!!O,"level.details must be defined");var k=Object.keys(c.elementaryStreams).reduce(function(R,B){var V=c.elementaryStreams[B];if(V){var ee=V.endPTS-V.startPTS;if(ee<=0)return y.warn("Could not parse fragment "+c.sn+" "+B+" duration reliably ("+ee+") resetting transmuxer to fallback to playlist timing"),y.resetTransmuxer(),R||!1;var re=D?0:Object(a.updateFragPTSDTS)(O,c,V.startPTS,V.endPTS,V.startDTS,V.endDTS);return y.hls.trigger(e.Events.LEVEL_PTS_UPDATED,{details:O,level:N,drift:re,type:B,frag:c,start:V.startPTS,end:V.endPTS}),!0}return R},!1);k?(this.state=x.PARSED,this.hls.trigger(e.Events.FRAG_PARSED,{frag:c,part:T})):this.resetLoadingState()},l.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},b(u,[{key:"state",get:function(){return this._state},set:function(c){var T=this._state;T!==c&&(this._state=c,this.log(T+"->"+c))}}]),u}(A.default)},"./src/controller/buffer-controller.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"default",function(){return r});var z=M("./src/polyfills/number.ts"),A=M("./src/events.ts"),I=M("./src/utils/logger.ts"),H=M("./src/errors.ts"),P=M("./src/utils/buffer-helper.ts"),e=M("./src/utils/mediasource-helper.ts"),C=M("./src/loader/fragment.ts"),g=M("./src/controller/buffer-operation-queue.ts"),f=Object(e.getMediaSource)(),o=/([ha]vc.)(?:\.[^.,]+)+/,r=function(){function a(s){var i=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var n=i.hls,t=i.media,b=i.mediaSource;I.logger.log("[buffer-controller]: Media source opened"),t&&(i.updateMediaElementDuration(),n.trigger(A.Events.MEDIA_ATTACHED,{media:t})),b&&b.removeEventListener("sourceopen",i._onMediaSourceOpen),i.checkPendingTracks()},this._onMediaSourceClose=function(){I.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){I.logger.log("[buffer-controller]: Media source ended")},this.hls=s,this._initSourceBuffer(),this.registerListeners()}var h=a.prototype;return h.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},h.destroy=function(){this.unregisterListeners(),this.details=null},h.registerListeners=function(){var i=this.hls;i.on(A.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.on(A.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.on(A.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(A.Events.BUFFER_RESET,this.onBufferReset,this),i.on(A.Events.BUFFER_APPENDING,this.onBufferAppending,this),i.on(A.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.on(A.Events.BUFFER_EOS,this.onBufferEos,this),i.on(A.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),i.on(A.Events.LEVEL_UPDATED,this.onLevelUpdated,this),i.on(A.Events.FRAG_PARSED,this.onFragParsed,this),i.on(A.Events.FRAG_CHANGED,this.onFragChanged,this)},h.unregisterListeners=function(){var i=this.hls;i.off(A.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.off(A.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.off(A.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(A.Events.BUFFER_RESET,this.onBufferReset,this),i.off(A.Events.BUFFER_APPENDING,this.onBufferAppending,this),i.off(A.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.off(A.Events.BUFFER_EOS,this.onBufferEos,this),i.off(A.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),i.off(A.Events.LEVEL_UPDATED,this.onLevelUpdated,this),i.off(A.Events.FRAG_PARSED,this.onFragParsed,this),i.off(A.Events.FRAG_CHANGED,this.onFragChanged,this)},h._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new g.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},h.onManifestParsed=function(i,n){var t=2;(n.audio&&!n.video||!n.altAudio)&&(t=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=t,this.details=null,I.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},h.onMediaAttaching=function(i,n){var t=this.media=n.media;if(t&&f){var b=this.mediaSource=new f;b.addEventListener("sourceopen",this._onMediaSourceOpen),b.addEventListener("sourceended",this._onMediaSourceEnded),b.addEventListener("sourceclose",this._onMediaSourceClose),t.src=self.URL.createObjectURL(b),this._objectUrl=t.src}},h.onMediaDetaching=function(){var i=this.media,n=this.mediaSource,t=this._objectUrl;if(n){if(I.logger.log("[buffer-controller]: media source detaching"),n.readyState==="open")try{n.endOfStream()}catch(b){I.logger.warn("[buffer-controller]: onMediaDetaching: "+b.message+" while calling endOfStream")}this.onBufferReset(),n.removeEventListener("sourceopen",this._onMediaSourceOpen),n.removeEventListener("sourceended",this._onMediaSourceEnded),n.removeEventListener("sourceclose",this._onMediaSourceClose),i&&(t&&self.URL.revokeObjectURL(t),i.src===t?(i.removeAttribute("src"),i.load()):I.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(A.Events.MEDIA_DETACHED,void 0)},h.onBufferReset=function(){var i=this;this.getSourceBufferTypes().forEach(function(n){var t=i.sourceBuffer[n];try{t&&(i.removeBufferListeners(n),i.mediaSource&&i.mediaSource.removeSourceBuffer(t),i.sourceBuffer[n]=void 0)}catch(b){I.logger.warn("[buffer-controller]: Failed to reset the "+n+" buffer",b)}}),this._initSourceBuffer()},h.onBufferCodecs=function(i,n){var t=this,b=this.getSourceBufferTypes().length;if(Object.keys(n).forEach(function(v){if(b){var E=t.tracks[v];if(E&&typeof E.buffer.changeType=="function"){var w=n[v],x=w.codec,_=w.levelCodec,p=w.container,u=(E.levelCodec||E.codec).replace(o,"$1"),l=(_||x).replace(o,"$1");if(u!==l){var m=p+";codecs="+(_||x);t.appendChangeType(v,m)}}}else t.pendingTracks[v]=n[v]}),b)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},h.appendChangeType=function(i,n){var t=this,b=this.operationQueue,v={execute:function(){var w=t.sourceBuffer[i];w&&(I.logger.log("[buffer-controller]: changing "+i+" sourceBuffer type to "+n),w.changeType(n)),b.shiftAndExecuteNext(i)},onStart:function(){},onComplete:function(){},onError:function(w){I.logger.warn("[buffer-controller]: Failed to change "+i+" SourceBuffer type",w)}};b.append(v,i)},h.onBufferAppending=function(i,n){var t=this,b=this.hls,v=this.operationQueue,E=this.tracks,w=n.data,x=n.type,_=n.frag,p=n.part,u=n.chunkMeta,l=u.buffering[x],m=self.performance.now();l.start=m;var c=_.stats.buffering,T=p?p.stats.buffering:null;c.start===0&&(c.start=m),T&&T.start===0&&(T.start=m);var N=E.audio,D=x==="audio"&&u.id===1&&(N==null?void 0:N.container)==="audio/mpeg",y={execute:function(){if(l.executeStart=self.performance.now(),D){var k=t.sourceBuffer[x];if(k){var R=_.start-k.timestampOffset;Math.abs(R)>=.1&&(I.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+_.start+" (delta: "+R+") sn: "+_.sn+")"),k.timestampOffset=_.start)}}t.appendExecutor(w,x)},onStart:function(){},onComplete:function(){var k=self.performance.now();l.executeEnd=l.end=k,c.first===0&&(c.first=k),T&&T.first===0&&(T.first=k);var R=t.sourceBuffer,B={};for(var V in R)B[V]=P.BufferHelper.getBuffered(R[V]);t.appendError=0,t.hls.trigger(A.Events.BUFFER_APPENDED,{type:x,frag:_,part:p,chunkMeta:u,parent:_.type,timeRanges:B})},onError:function(k){I.logger.error("[buffer-controller]: Error encountered while trying to append to the "+x+" SourceBuffer",k);var R={type:H.ErrorTypes.MEDIA_ERROR,parent:_.type,details:H.ErrorDetails.BUFFER_APPEND_ERROR,err:k,fatal:!1};k.code===DOMException.QUOTA_EXCEEDED_ERR?R.details=H.ErrorDetails.BUFFER_FULL_ERROR:(t.appendError++,R.details=H.ErrorDetails.BUFFER_APPEND_ERROR,t.appendError>b.config.appendErrorMaxRetry&&(I.logger.error("[buffer-controller]: Failed "+b.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),R.fatal=!0)),b.trigger(A.Events.ERROR,R)}};v.append(y,x)},h.onBufferFlushing=function(i,n){var t=this,b=this.operationQueue,v=function(w){return{execute:t.removeExecutor.bind(t,w,n.startOffset,n.endOffset),onStart:function(){},onComplete:function(){t.hls.trigger(A.Events.BUFFER_FLUSHED,{type:w})},onError:function(_){I.logger.warn("[buffer-controller]: Failed to remove from "+w+" SourceBuffer",_)}}};n.type?b.append(v(n.type),n.type):this.getSourceBufferTypes().forEach(function(E){b.append(v(E),E)})},h.onFragParsed=function(i,n){var t=this,b=n.frag,v=n.part,E=[],w=v?v.elementaryStreams:b.elementaryStreams;w[C.ElementaryStreamTypes.AUDIOVIDEO]?E.push("audiovideo"):(w[C.ElementaryStreamTypes.AUDIO]&&E.push("audio"),w[C.ElementaryStreamTypes.VIDEO]&&E.push("video"));var x=function(){var p=self.performance.now();b.stats.buffering.end=p,v&&(v.stats.buffering.end=p);var u=v?v.stats:b.stats;t.hls.trigger(A.Events.FRAG_BUFFERED,{frag:b,part:v,stats:u,id:b.type})};E.length===0&&I.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+b.type+" level: "+b.level+" sn: "+b.sn),this.blockBuffers(x,E)},h.onFragChanged=function(i,n){this.flushBackBuffer()},h.onBufferEos=function(i,n){var t=this,b=this.getSourceBufferTypes().reduce(function(v,E){var w=t.sourceBuffer[E];return(!n.type||n.type===E)&&(w&&!w.ended&&(w.ended=!0,I.logger.log("[buffer-controller]: "+E+" sourceBuffer now EOS"))),v&&!!(!w||w.ended)},!0);b&&this.blockBuffers(function(){var v=t.mediaSource;if(!v||v.readyState!=="open")return;v.endOfStream()})},h.onLevelUpdated=function(i,n){var t=n.details;if(!t.fragments.length)return;this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},h.flushBackBuffer=function(){var i=this.hls,n=this.details,t=this.media,b=this.sourceBuffer;if(!t||n===null)return;var v=this.getSourceBufferTypes();if(!v.length)return;var E=n.live&&i.config.liveBackBufferLength!==null?i.config.liveBackBufferLength:i.config.backBufferLength;if(!Object(z.isFiniteNumber)(E)||E<0)return;var w=t.currentTime,x=n.levelTargetDuration,_=Math.max(E,x),p=Math.floor(w/x)*x-_;v.forEach(function(u){var l=b[u];if(l){var m=P.BufferHelper.getBuffered(l);m.length>0&&p>m.start(0)&&(i.trigger(A.Events.BACK_BUFFER_REACHED,{bufferEnd:p}),n.live&&i.trigger(A.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:p}),i.trigger(A.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:p,type:u}))}})},h.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var i=this.details,n=this.hls,t=this.media,b=this.mediaSource,v=i.fragments[0].start+i.totalduration,E=t.duration,w=Object(z.isFiniteNumber)(b.duration)?b.duration:0;i.live&&n.config.liveDurationInfinity?(I.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),b.duration=Infinity,this.updateSeekableRange(i)):(v>w&&v>E||!Object(z.isFiniteNumber)(E))&&(I.logger.log("[buffer-controller]: Updating Media Source duration to "+v.toFixed(3)),b.duration=v)},h.updateSeekableRange=function(i){var n=this.mediaSource,t=i.fragments,b=t.length;if(b&&i.live&&n!==null&&n!==void 0&&n.setLiveSeekableRange){var v=Math.max(0,t[0].start),E=Math.max(v,v+i.totalduration);n.setLiveSeekableRange(v,E)}},h.checkPendingTracks=function(){var i=this.bufferCodecEventsExpected,n=this.operationQueue,t=this.pendingTracks,b=Object.keys(t).length;if(b&&!i||b===2){this.createSourceBuffers(t),this.pendingTracks={};var v=this.getSourceBufferTypes();if(v.length===0){this.hls.trigger(A.Events.ERROR,{type:H.ErrorTypes.MEDIA_ERROR,details:H.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}v.forEach(function(E){n.executeNext(E)})}},h.createSourceBuffers=function(i){var n=this.sourceBuffer,t=this.mediaSource;if(!t)throw Error("createSourceBuffers called when mediaSource was null");var b=0;for(var v in i)if(!n[v]){var E=i[v];if(!E)throw Error("source buffer exists for track "+v+", however track does not");var w=E.levelCodec||E.codec,x=E.container+";codecs="+w;I.logger.log("[buffer-controller]: creating sourceBuffer("+x+")");try{var _=n[v]=t.addSourceBuffer(x),p=v;this.addBufferListener(p,"updatestart",this._onSBUpdateStart),this.addBufferListener(p,"updateend",this._onSBUpdateEnd),this.addBufferListener(p,"error",this._onSBUpdateError),this.tracks[v]={buffer:_,codec:w,container:E.container,levelCodec:E.levelCodec,id:E.id},b++}catch(u){I.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+u.message),this.hls.trigger(A.Events.ERROR,{type:H.ErrorTypes.MEDIA_ERROR,details:H.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:u,mimeType:x})}}b&&this.hls.trigger(A.Events.BUFFER_CREATED,{tracks:this.tracks})},h._onSBUpdateStart=function(i){var n=this.operationQueue,t=n.current(i);t.onStart()},h._onSBUpdateEnd=function(i){var n=this.operationQueue,t=n.current(i);t.onComplete(),n.shiftAndExecuteNext(i)},h._onSBUpdateError=function(i,n){I.logger.error("[buffer-controller]: "+i+" SourceBuffer error",n),this.hls.trigger(A.Events.ERROR,{type:H.ErrorTypes.MEDIA_ERROR,details:H.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var t=this.operationQueue.current(i);t&&t.onError(n)},h.removeExecutor=function(i,n,t){var b=this.media,v=this.mediaSource,E=this.operationQueue,w=this.sourceBuffer,x=w[i];if(!b||!v||!x){I.logger.warn("[buffer-controller]: Attempting to remove from the "+i+" SourceBuffer, but it does not exist"),E.shiftAndExecuteNext(i);return}var _=Object(z.isFiniteNumber)(b.duration)?b.duration:Infinity,p=Object(z.isFiniteNumber)(v.duration)?v.duration:Infinity,u=Math.max(0,n),l=Math.min(t,_,p);l>u?(I.logger.log("[buffer-controller]: Removing ["+u+","+l+"] from the "+i+" SourceBuffer"),console.assert(!x.updating,i+" sourceBuffer must not be updating"),x.remove(u,l)):E.shiftAndExecuteNext(i)},h.appendExecutor=function(i,n){var t=this.operationQueue,b=this.sourceBuffer,v=b[n];if(!v){I.logger.warn("[buffer-controller]: Attempting to append to the "+n+" SourceBuffer, but it does not exist"),t.shiftAndExecuteNext(n);return}v.ended=!1,console.assert(!v.updating,n+" sourceBuffer must not be updating"),v.appendBuffer(i)},h.blockBuffers=function(i,n){var t=this;if(n===void 0&&(n=this.getSourceBufferTypes()),!n.length){I.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(i);return}var b=this.operationQueue,v=n.map(function(E){return b.appendBlocker(E)});Promise.all(v).then(function(){i(),n.forEach(function(E){var w=t.sourceBuffer[E];(!w||!w.updating)&&b.shiftAndExecuteNext(E)})})},h.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},h.addBufferListener=function(i,n,t){var b=this.sourceBuffer[i];if(!b)return;var v=t.bind(this,i);this.listeners[i].push({event:n,listener:v}),b.addEventListener(n,v)},h.removeBufferListeners=function(i){var n=this.sourceBuffer[i];if(!n)return;this.listeners[i].forEach(function(t){n.removeEventListener(t.event,t.listener)})},a}()},"./src/controller/buffer-operation-queue.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"default",function(){return A});var z=M("./src/utils/logger.ts"),A=function(){function I(P){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=P}var H=I.prototype;return H.append=function(e,C){var g=this.queues[C];g.push(e),g.length===1&&this.buffers[C]&&this.executeNext(C)},H.insertAbort=function(e,C){var g=this.queues[C];g.unshift(e),this.executeNext(C)},H.appendBlocker=function(e){var C,g=new Promise(function(o){C=o}),f={execute:C,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(f,e),g},H.executeNext=function(e){var C=this.buffers,g=this.queues,f=C[e],o=g[e];if(o.length){var r=o[0];try{r.execute()}catch(a){z.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),r.onError(a),(!f||!f.updating)&&(o.shift(),this.executeNext(e))}}},H.shiftAndExecuteNext=function(e){this.queues[e].shift(),this.executeNext(e)},H.current=function(e){return this.queues[e][0]},I}()},"./src/controller/cap-level-controller.ts":function(ce,W,M){"use strict";M.r(W);var z=M("./src/events.ts");function A(P,e){for(var C=0;C<e.length;C++){var g=e[C];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(P,g.key,g)}}function I(P,e,C){return e&&A(P.prototype,e),C&&A(P,C),P}var H=function(){function P(C){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=C,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var e=P.prototype;return e.setStreamController=function(g){this.streamController=g},e.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},e.registerListeners=function(){var g=this.hls;g.on(z.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),g.on(z.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),g.on(z.Events.MANIFEST_PARSED,this.onManifestParsed,this),g.on(z.Events.BUFFER_CODECS,this.onBufferCodecs,this),g.on(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},e.unregisterListener=function(){var g=this.hls;g.off(z.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),g.off(z.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),g.off(z.Events.MANIFEST_PARSED,this.onManifestParsed,this),g.off(z.Events.BUFFER_CODECS,this.onBufferCodecs,this),g.off(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},e.onFpsDropLevelCapping=function(g,f){P.isLevelAllowed(f.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(f.droppedLevel)},e.onMediaAttaching=function(g,f){this.media=f.media instanceof HTMLVideoElement?f.media:null},e.onManifestParsed=function(g,f){var o=this.hls;this.restrictedLevels=[],this.firstLevel=f.firstLevel,o.config.capLevelToPlayerSize&&f.video&&this.startCapping()},e.onBufferCodecs=function(g,f){var o=this.hls;o.config.capLevelToPlayerSize&&f.video&&this.startCapping()},e.onMediaDetaching=function(){this.stopCapping()},e.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var g=this.hls.levels;if(g.length){var f=this.hls;f.autoLevelCapping=this.getMaxLevel(g.length-1),f.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=f.autoLevelCapping}}},e.getMaxLevel=function(g){var f=this,o=this.hls.levels;if(!o.length)return-1;var r=o.filter(function(a,h){return P.isLevelAllowed(h,f.restrictedLevels)&&h<=g});return this.clientRect=null,P.getMaxLevelByMediaSize(r,this.mediaWidth,this.mediaHeight)},e.startCapping=function(){if(this.timer)return;this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize()},e.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},e.getDimensions=function(){if(this.clientRect)return this.clientRect;var g=this.media,f={width:0,height:0};if(g){var o=g.getBoundingClientRect();f.width=o.width,f.height=o.height,!f.width&&!f.height&&(f.width=o.right-o.left||g.width||0,f.height=o.bottom-o.top||g.height||0)}return this.clientRect=f,f},P.isLevelAllowed=function(g,f){return f===void 0&&(f=[]),f.indexOf(g)===-1},P.getMaxLevelByMediaSize=function(g,f,o){if(!g||!g.length)return-1;for(var r=function(n,t){return t?n.width!==t.width||n.height!==t.height:!0},a=g.length-1,h=0;h<g.length;h+=1){var s=g[h];if((s.width>=f||s.height>=o)&&r(s,g[h+1])){a=h;break}}return a},I(P,[{key:"mediaWidth",get:function(){return this.getDimensions().width*P.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*P.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var g=1;try{g=self.devicePixelRatio}catch(f){}return g}}]),P}();W.default=H},"./src/controller/cmcd-controller.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"default",function(){return r});var z=M("./src/events.ts"),A=M("./src/types/cmcd.ts"),I=M("./src/utils/buffer-helper.ts"),H=M("./src/utils/logger.ts");function P(a,h){for(var s=0;s<h.length;s++){var i=h[s];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(a,i.key,i)}}function e(a,h,s){return h&&P(a.prototype,h),s&&P(a,s),a}function C(a,h){var s=typeof Symbol!="undefined"&&a[Symbol.iterator]||a["@@iterator"];if(s)return(s=s.call(a)).next.bind(s);if(Array.isArray(a)||(s=g(a))||h&&a&&typeof a.length=="number"){s&&(a=s);var i=0;return function(){return i>=a.length?{done:!0}:{done:!1,value:a[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g(a,h){if(!a)return;if(typeof a=="string")return f(a,h);var s=Object.prototype.toString.call(a).slice(8,-1);if(s==="Object"&&a.constructor&&(s=a.constructor.name),s==="Map"||s==="Set")return Array.from(a);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return f(a,h)}function f(a,h){(h==null||h>a.length)&&(h=a.length);for(var s=0,i=new Array(h);s<h;s++)i[s]=a[s];return i}function o(){return o=Object.assign||function(a){for(var h=1;h<arguments.length;h++){var s=arguments[h];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(a[i]=s[i])}return a},o.apply(this,arguments)}var r=function(){function a(s){var i=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(){i.initialized&&(i.starved=!0),i.buffering=!0},this.onPlaying=function(){i.initialized||(i.initialized=!0),i.buffering=!1},this.applyPlaylistData=function(b){try{i.apply(b,{ot:A.CMCDObjectType.MANIFEST,su:!i.initialized})}catch(v){H.logger.warn("Could not generate manifest CMCD data.",v)}},this.applyFragmentData=function(b){try{var v=b.frag,E=i.hls.levels[v.level],w=i.getObjectType(v),x={d:v.duration*1e3,ot:w};(w===A.CMCDObjectType.VIDEO||w===A.CMCDObjectType.AUDIO||w==A.CMCDObjectType.MUXED)&&(x.br=E.bitrate/1e3,x.tb=i.getTopBandwidth(w),x.bl=i.getBufferLength(w)),i.apply(b,x)}catch(_){H.logger.warn("Could not generate segment CMCD data.",_)}},this.hls=s;var n=this.config=s.config,t=n.cmcd;t!=null&&(n.pLoader=this.createPlaylistLoader(),n.fLoader=this.createFragmentLoader(),this.sid=t.sessionId||a.uuid(),this.cid=t.contentId,this.useHeaders=t.useHeaders===!0,this.registerListeners())}var h=a.prototype;return h.registerListeners=function(){var i=this.hls;i.on(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.on(z.Events.MEDIA_DETACHED,this.onMediaDetached,this),i.on(z.Events.BUFFER_CREATED,this.onBufferCreated,this)},h.unregisterListeners=function(){var i=this.hls;i.off(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.off(z.Events.MEDIA_DETACHED,this.onMediaDetached,this),i.off(z.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},h.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},h.onMediaAttached=function(i,n){this.media=n.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},h.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},h.onBufferCreated=function(i,n){var t,b;this.audioBuffer=(t=n.tracks.audio)===null||t===void 0?void 0:t.buffer,this.videoBuffer=(b=n.tracks.video)===null||b===void 0?void 0:b.buffer},h.createData=function(){var i;return{v:A.CMCDVersion,sf:A.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(i=this.media)===null||i===void 0?void 0:i.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},h.apply=function(i,n){n===void 0&&(n={}),o(n,this.createData());var t=n.ot===A.CMCDObjectType.INIT||n.ot===A.CMCDObjectType.VIDEO||n.ot===A.CMCDObjectType.MUXED;if(this.starved&&t&&(n.bs=!0,n.su=!0,this.starved=!1),n.su==null&&(n.su=this.buffering),this.useHeaders){var b=a.toHeaders(n);if(!Object.keys(b).length)return;i.headers||(i.headers={}),o(i.headers,b)}else{var v=a.toQuery(n);if(!v)return;i.url=a.appendQueryToUri(i.url,v)}},h.getObjectType=function(i){var n=i.type;return n==="subtitle"?A.CMCDObjectType.TIMED_TEXT:i.sn==="initSegment"?A.CMCDObjectType.INIT:n==="audio"?A.CMCDObjectType.AUDIO:n==="main"?this.hls.audioTracks.length?A.CMCDObjectType.VIDEO:A.CMCDObjectType.MUXED:void 0},h.getTopBandwidth=function(i){for(var n=0,t=i===A.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,b=C(t),v;!(v=b()).done;){var E=v.value;E.bitrate>n&&(n=E.bitrate)}return n>0?n:NaN},h.getBufferLength=function(i){var n=this.hls.media,t=i===A.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!t||!n)return NaN;var b=I.BufferHelper.bufferInfo(t,n.currentTime,this.config.maxBufferHole);return b.len*1e3},h.createPlaylistLoader=function(){var i=this.config.pLoader,n=this.applyPlaylistData,t=i||this.config.loader;return function(){function b(E){this.loader=void 0,this.loader=new t(E)}var v=b.prototype;return v.destroy=function(){this.loader.destroy()},v.abort=function(){this.loader.abort()},v.load=function(w,x,_){n(w),this.loader.load(w,x,_)},e(b,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),b}()},h.createFragmentLoader=function(){var i=this.config.fLoader,n=this.applyFragmentData,t=i||this.config.loader;return function(){function b(E){this.loader=void 0,this.loader=new t(E)}var v=b.prototype;return v.destroy=function(){this.loader.destroy()},v.abort=function(){this.loader.abort()},v.load=function(w,x,_){n(w),this.loader.load(w,x,_)},e(b,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),b}()},a.uuid=function(){var i=URL.createObjectURL(new Blob),n=i.toString();return URL.revokeObjectURL(i),n.substr(n.lastIndexOf("/")+1)},a.serialize=function(i){for(var n=[],t=function(D){return!Number.isNaN(D)&&D!=null&&D!==""&&D!==!1},b=function(D){return Math.round(D)},v=function(D){return b(D/100)*100},E=function(D){return encodeURIComponent(D)},w={br:b,d:b,bl:v,dl:v,mtp:v,nor:E,rtp:v,tb:b},x=Object.keys(i||{}).sort(),_=C(x),p;!(p=_()).done;){var u=p.value,l=i[u];if(!t(l))continue;if(u==="v"&&l===1)continue;if(u=="pr"&&l===1)continue;var m=w[u];m&&(l=m(l));var c=typeof l,T=void 0;u==="ot"||u==="sf"||u==="st"?T=u+"="+l:c==="boolean"?T=u:c==="number"?T=u+"="+l:T=u+"="+JSON.stringify(l),n.push(T)}return n.join(",")},a.toHeaders=function(i){for(var n=Object.keys(i),t={},b=["Object","Request","Session","Status"],v=[{},{},{},{}],E={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},w=0,x=n;w<x.length;w++){var _=x[w],p=E[_]!=null?E[_]:1;v[p][_]=i[_]}for(var u=0;u<v.length;u++){var l=a.serialize(v[u]);l&&(t["CMCD-"+b[u]]=l)}return t},a.toQuery=function(i){return"CMCD="+encodeURIComponent(a.serialize(i))},a.appendQueryToUri=function(i,n){if(!n)return i;var t=i.includes("?")?"&":"?";return""+i+t+n},a}()},"./src/controller/eme-controller.ts":function(ce,W,M){"use strict";M.r(W);var z=M("./src/events.ts"),A=M("./src/errors.ts"),I=M("./src/utils/logger.ts"),H=M("./src/utils/mediakeys-helper.ts");function P(r,a){for(var h=0;h<a.length;h++){var s=a[h];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(r,s.key,s)}}function e(r,a,h){return a&&P(r.prototype,a),h&&P(r,h),r}var C=3,g=function(a,h,s){var i={audioCapabilities:[],videoCapabilities:[]};return a.forEach(function(n){i.audioCapabilities.push({contentType:'audio/mp4; codecs="'+n+'"',robustness:s.audioRobustness||""})}),h.forEach(function(n){i.videoCapabilities.push({contentType:'video/mp4; codecs="'+n+'"',robustness:s.videoRobustness||""})}),[i]},f=function(a,h,s,i){switch(a){case H.KeySystems.WIDEVINE:return g(h,s,i);default:throw new Error("Unknown key-system: "+a)}},o=function(){function r(h){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=h,this._config=h.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var a=r.prototype;return a.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},a._registerListeners=function(){this.hls.on(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(z.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(z.Events.MANIFEST_PARSED,this.onManifestParsed,this)},a._unregisterListeners=function(){this.hls.off(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(z.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(z.Events.MANIFEST_PARSED,this.onManifestParsed,this)},a.getLicenseServerUrl=function(s){switch(s){case H.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+s+'"')},a._attemptKeySystemAccess=function(s,i,n){var t=this,b=f(s,i,n,this._drmSystemOptions);I.logger.log("Requesting encrypted media key-system access");var v=this.requestMediaKeySystemAccess(s,b);this.mediaKeysPromise=v.then(function(E){return t._onMediaKeySystemAccessObtained(s,E)}),v.catch(function(E){I.logger.error('Failed to obtain key-system "'+s+'" access:',E)})},a._onMediaKeySystemAccessObtained=function(s,i){var n=this;I.logger.log('Access for key-system "'+s+'" obtained');var t={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:i,mediaKeySystemDomain:s};this._mediaKeysList.push(t);var b=Promise.resolve().then(function(){return i.createMediaKeys()}).then(function(v){return t.mediaKeys=v,I.logger.log('Media-keys created for key-system "'+s+'"'),n._onMediaKeysCreated(),v});return b.catch(function(v){I.logger.error("Failed to create media-keys:",v)}),b},a._onMediaKeysCreated=function(){var s=this;this._mediaKeysList.forEach(function(i){i.mediaKeysSession||(i.mediaKeysSession=i.mediaKeys.createSession(),s._onNewMediaKeySession(i.mediaKeysSession))})},a._onNewMediaKeySession=function(s){var i=this;I.logger.log("New key-system session "+s.sessionId),s.addEventListener("message",function(n){i._onKeySessionMessage(s,n.message)},!1)},a._onKeySessionMessage=function(s,i){I.logger.log("Got EME message event, creating license request"),this._requestLicense(i,function(n){I.logger.log("Received license data (length: "+(n&&n.byteLength)+"), updating key-session"),s.update(n)})},a.onMediaEncrypted=function(s){var i=this;if(I.logger.log('Media is encrypted using "'+s.initDataType+'" init data type'),!this.mediaKeysPromise){I.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(z.Events.ERROR,{type:A.ErrorTypes.KEY_SYSTEM_ERROR,details:A.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var n=function(b){if(!i._media)return;i._attemptSetMediaKeys(b),i._generateRequestWithPreferredKeySession(s.initDataType,s.initData)};this.mediaKeysPromise.then(n).catch(n)},a._attemptSetMediaKeys=function(s){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var i=this._mediaKeysList[0];if(!i||!i.mediaKeys){I.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(z.Events.ERROR,{type:A.ErrorTypes.KEY_SYSTEM_ERROR,details:A.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}I.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(i.mediaKeys),this._hasSetMediaKeys=!0}},a._generateRequestWithPreferredKeySession=function(s,i){var n=this,t=this._mediaKeysList[0];if(!t){I.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(z.Events.ERROR,{type:A.ErrorTypes.KEY_SYSTEM_ERROR,details:A.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(t.mediaKeysSessionInitialized){I.logger.warn("Key-Session already initialized but requested again");return}var b=t.mediaKeysSession;if(!b){I.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(z.Events.ERROR,{type:A.ErrorTypes.KEY_SYSTEM_ERROR,details:A.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!i){I.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(z.Events.ERROR,{type:A.ErrorTypes.KEY_SYSTEM_ERROR,details:A.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}I.logger.log('Generating key-session request for "'+s+'" init data type'),t.mediaKeysSessionInitialized=!0,b.generateRequest(s,i).then(function(){I.logger.debug("Key-session generation succeeded")}).catch(function(v){I.logger.error("Error generating key-session request:",v),n.hls.trigger(z.Events.ERROR,{type:A.ErrorTypes.KEY_SYSTEM_ERROR,details:A.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},a._createLicenseXhr=function(s,i,n){var t=new XMLHttpRequest;t.responseType="arraybuffer",t.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,t,s,i,n);var b=this._licenseXhrSetup;if(b)try{b.call(this.hls,t,s),b=void 0}catch(v){I.logger.error(v)}try{t.readyState||t.open("POST",s,!0),b&&b.call(this.hls,t,s)}catch(v){throw new Error("issue setting up KeySystem license XHR "+v)}return t},a._onLicenseRequestReadyStageChange=function(s,i,n,t){switch(s.readyState){case 4:if(s.status===200){this._requestLicenseFailureCount=0,I.logger.log("License request succeeded");var b=s.response,v=this._licenseResponseCallback;if(v)try{b=v.call(this.hls,s,i)}catch(w){I.logger.error(w)}t(b)}else{if(I.logger.error("License Request XHR failed ("+i+"). Status: "+s.status+" ("+s.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>C){this.hls.trigger(z.Events.ERROR,{type:A.ErrorTypes.KEY_SYSTEM_ERROR,details:A.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var E=C-this._requestLicenseFailureCount+1;I.logger.warn("Retrying license request, "+E+" attempts left"),this._requestLicense(n,t)}break}},a._generateLicenseRequestChallenge=function(s,i){switch(s.mediaKeySystemDomain){case H.KeySystems.WIDEVINE:return i}throw new Error("unsupported key-system: "+s.mediaKeySystemDomain)},a._requestLicense=function(s,i){I.logger.log("Requesting content license for key-system");var n=this._mediaKeysList[0];if(!n){I.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(z.Events.ERROR,{type:A.ErrorTypes.KEY_SYSTEM_ERROR,details:A.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var t=this.getLicenseServerUrl(n.mediaKeySystemDomain),b=this._createLicenseXhr(t,s,i);I.logger.log("Sending license request to URL: "+t);var v=this._generateLicenseRequestChallenge(n,s);b.send(v)}catch(E){I.logger.error("Failure requesting DRM license: "+E),this.hls.trigger(z.Events.ERROR,{type:A.ErrorTypes.KEY_SYSTEM_ERROR,details:A.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},a.onMediaAttached=function(s,i){if(!this._emeEnabled)return;var n=i.media;this._media=n,n.addEventListener("encrypted",this._onMediaEncrypted)},a.onMediaDetached=function(){var s=this._media,i=this._mediaKeysList;if(!s)return;s.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(i.map(function(n){if(n.mediaKeysSession)return n.mediaKeysSession.close().catch(function(){})})).then(function(){return s.setMediaKeys(null)}).catch(function(){})},a.onManifestParsed=function(s,i){if(!this._emeEnabled)return;var n=i.levels.map(function(b){return b.audioCodec}).filter(function(b){return!!b}),t=i.levels.map(function(b){return b.videoCodec}).filter(function(b){return!!b});this._attemptKeySystemAccess(H.KeySystems.WIDEVINE,n,t)},e(r,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),r}();W.default=o},"./src/controller/fps-controller.ts":function(ce,W,M){"use strict";M.r(W);var z=M("./src/events.ts"),A=M("./src/utils/logger.ts"),I=function(){function H(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}var P=H.prototype;return P.setStreamController=function(C){this.streamController=C},P.registerListeners=function(){this.hls.on(z.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},P.unregisterListeners=function(){this.hls.off(z.Events.MEDIA_ATTACHING,this.onMediaAttaching)},P.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},P.onMediaAttaching=function(C,g){var f=this.hls.config;if(f.capLevelOnFPSDrop){var o=g.media instanceof self.HTMLVideoElement?g.media:null;this.media=o,o&&typeof o.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),f.fpsDroppedMonitoringPeriod)}},P.checkFPS=function(C,g,f){var o=performance.now();if(g){if(this.lastTime){var r=o-this.lastTime,a=f-this.lastDroppedFrames,h=g-this.lastDecodedFrames,s=1e3*a/r,i=this.hls;if(i.trigger(z.Events.FPS_DROP,{currentDropped:a,currentDecoded:h,totalDroppedFrames:f}),s>0&&a>i.config.fpsDroppedMonitoringThreshold*h){var n=i.currentLevel;A.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+n),n>0&&(i.autoLevelCapping===-1||i.autoLevelCapping>=n)&&(n=n-1,i.trigger(z.Events.FPS_DROP_LEVEL_CAPPING,{level:n,droppedLevel:i.currentLevel}),i.autoLevelCapping=n,this.streamController.nextLevelSwitch())}}this.lastTime=o,this.lastDroppedFrames=f,this.lastDecodedFrames=g}},P.checkFPSInterval=function(){var C=this.media;if(C)if(this.isVideoPlaybackQualityAvailable){var g=C.getVideoPlaybackQuality();this.checkFPS(C,g.totalVideoFrames,g.droppedVideoFrames)}else this.checkFPS(C,C.webkitDecodedFrameCount,C.webkitDroppedFrameCount)},H}();W.default=I},"./src/controller/fragment-finders.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"findFragmentByPDT",function(){return I}),M.d(W,"findFragmentByPTS",function(){return H}),M.d(W,"fragmentWithinToleranceTest",function(){return P}),M.d(W,"pdtWithinToleranceTest",function(){return e}),M.d(W,"findFragWithCC",function(){return C});var z=M("./src/polyfills/number.ts"),A=M("./src/utils/binary-search.ts");function I(g,f,o){if(f===null||!Array.isArray(g)||!g.length||!Object(z.isFiniteNumber)(f))return null;var r=g[0].programDateTime;if(f<(r||0))return null;var a=g[g.length-1].endProgramDateTime;if(f>=(a||0))return null;o=o||0;for(var h=0;h<g.length;++h){var s=g[h];if(e(f,o,s))return s}return null}function H(g,f,o,r){o===void 0&&(o=0),r===void 0&&(r=0);var a=null;if(g?a=f[g.sn-f[0].sn+1]||null:o===0&&f[0].start===0&&(a=f[0]),a&&P(o,r,a)===0)return a;var h=A.default.search(f,P.bind(null,o,r));return h||a}function P(g,f,o){g===void 0&&(g=0),f===void 0&&(f=0);var r=Math.min(f,o.duration+(o.deltaPTS?o.deltaPTS:0));return o.start+o.duration-r<=g?1:o.start-r>g&&o.start?-1:0}function e(g,f,o){var r=Math.min(f,o.duration+(o.deltaPTS?o.deltaPTS:0))*1e3,a=o.endProgramDateTime||0;return a-r>g}function C(g,f){return A.default.search(g,function(o){return o.cc<f?1:o.cc>f?-1:0})}},"./src/controller/fragment-tracker.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"FragmentState",function(){return I}),M.d(W,"FragmentTracker",function(){return H});var z=M("./src/events.ts"),A=M("./src/types/loader.ts"),I;(function(C){C.NOT_LOADED="NOT_LOADED",C.BACKTRACKED="BACKTRACKED",C.APPENDING="APPENDING",C.PARTIAL="PARTIAL",C.OK="OK"})(I||(I={}));var H=function(){function C(f){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=f,this._registerListeners()}var g=C.prototype;return g._registerListeners=function(){var o=this.hls;o.on(z.Events.BUFFER_APPENDED,this.onBufferAppended,this),o.on(z.Events.FRAG_BUFFERED,this.onFragBuffered,this),o.on(z.Events.FRAG_LOADED,this.onFragLoaded,this)},g._unregisterListeners=function(){var o=this.hls;o.off(z.Events.BUFFER_APPENDED,this.onBufferAppended,this),o.off(z.Events.FRAG_BUFFERED,this.onFragBuffered,this),o.off(z.Events.FRAG_LOADED,this.onFragLoaded,this)},g.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},g.getAppendedFrag=function(o,r){if(r===A.PlaylistLevelType.MAIN){var a=this.activeFragment,h=this.activeParts;if(!a)return null;if(h)for(var s=h.length;s--;){var i=h[s],n=i?i.end:a.appendedPTS;if(i.start<=o&&n!==void 0&&o<=n)return s>9&&(this.activeParts=h.slice(s-9)),i}else if(a.start<=o&&a.appendedPTS!==void 0&&o<=a.appendedPTS)return a}return this.getBufferedFrag(o,r)},g.getBufferedFrag=function(o,r){for(var a=this.fragments,h=Object.keys(a),s=h.length;s--;){var i=a[h[s]];if((i==null?void 0:i.body.type)===r&&i.buffered){var n=i.body;if(n.start<=o&&o<=n.end)return n}}return null},g.detectEvictedFragments=function(o,r,a){var h=this;Object.keys(this.fragments).forEach(function(s){var i=h.fragments[s];if(!i)return;if(!i.buffered){i.body.type===a&&h.removeFragment(i.body);return}var n=i.range[o];if(!n)return;n.time.some(function(t){var b=!h.isTimeBuffered(t.startPTS,t.endPTS,r);return b&&h.removeFragment(i.body),b})})},g.detectPartialFragments=function(o){var r=this,a=this.timeRanges,h=o.frag,s=o.part;if(!a||h.sn==="initSegment")return;var i=e(h),n=this.fragments[i];if(!n)return;Object.keys(a).forEach(function(t){var b=h.elementaryStreams[t];if(!b)return;var v=a[t],E=s!==null||b.partial===!0;n.range[t]=r.getBufferedTimes(h,s,E,v)}),n.backtrack=n.loaded=null,Object.keys(n.range).length?n.buffered=!0:this.removeFragment(n.body)},g.fragBuffered=function(o){var r=e(o),a=this.fragments[r];a&&(a.backtrack=a.loaded=null,a.buffered=!0)},g.getBufferedTimes=function(o,r,a,h){for(var s={time:[],partial:a},i=r?r.start:o.start,n=r?r.end:o.end,t=o.minEndPTS||n,b=o.maxStartPTS||i,v=0;v<h.length;v++){var E=h.start(v)-this.bufferPadding,w=h.end(v)+this.bufferPadding;if(b>=E&&t<=w){s.time.push({startPTS:Math.max(i,h.start(v)),endPTS:Math.min(n,h.end(v))});break}else if(i<w&&n>E)s.partial=!0,s.time.push({startPTS:Math.max(i,h.start(v)),endPTS:Math.min(n,h.end(v))});else if(n<=E)break}return s},g.getPartialFragment=function(o){var r=null,a,h,s,i=0,n=this.bufferPadding,t=this.fragments;return Object.keys(t).forEach(function(b){var v=t[b];if(!v)return;P(v)&&(h=v.body.start-n,s=v.body.end+n,o>=h&&o<=s&&(a=Math.min(o-h,s-o),i<=a&&(r=v.body,i=a)))}),r},g.getState=function(o){var r=e(o),a=this.fragments[r];return a?a.buffered?P(a)?I.PARTIAL:I.OK:a.backtrack?I.BACKTRACKED:I.APPENDING:I.NOT_LOADED},g.backtrack=function(o,r){var a=e(o),h=this.fragments[a];if(!h||h.backtrack)return null;var s=h.backtrack=r||h.loaded;return h.loaded=null,s},g.getBacktrackData=function(o){var r=e(o),a=this.fragments[r];if(a){var h,s=a.backtrack;if(s!=null&&(h=s.payload)!==null&&h!==void 0&&h.byteLength)return s;this.removeFragment(o)}return null},g.isTimeBuffered=function(o,r,a){for(var h,s,i=0;i<a.length;i++){if(h=a.start(i)-this.bufferPadding,s=a.end(i)+this.bufferPadding,o>=h&&r<=s)return!0;if(r<=h)return!1}return!1},g.onFragLoaded=function(o,r){var a=r.frag,h=r.part;if(a.sn==="initSegment"||a.bitrateTest||h)return;var s=e(a);this.fragments[s]={body:a,loaded:r,backtrack:null,buffered:!1,range:Object.create(null)}},g.onBufferAppended=function(o,r){var a=this,h=r.frag,s=r.part,i=r.timeRanges;if(h.type===A.PlaylistLevelType.MAIN)if(this.activeFragment=h,s){var n=this.activeParts;n||(this.activeParts=n=[]),n.push(s)}else this.activeParts=null;this.timeRanges=i,Object.keys(i).forEach(function(t){var b=i[t];if(a.detectEvictedFragments(t,b),!s)for(var v=0;v<b.length;v++)h.appendedPTS=Math.max(b.end(v),h.appendedPTS||0)})},g.onFragBuffered=function(o,r){this.detectPartialFragments(r)},g.hasFragment=function(o){var r=e(o);return!!this.fragments[r]},g.removeFragmentsInRange=function(o,r,a){var h=this;Object.keys(this.fragments).forEach(function(s){var i=h.fragments[s];if(!i)return;if(i.buffered){var n=i.body;n.type===a&&n.start<r&&n.end>o&&h.removeFragment(n)}})},g.removeFragment=function(o){var r=e(o);o.stats.loaded=0,o.clearElementaryStreamInfo(),delete this.fragments[r]},g.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},C}();function P(C){var g,f;return C.buffered&&(((g=C.range.video)===null||g===void 0?void 0:g.partial)||((f=C.range.audio)===null||f===void 0?void 0:f.partial))}function e(C){return C.type+"_"+C.level+"_"+C.urlId+"_"+C.sn}},"./src/controller/gap-controller.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"STALL_MINIMUM_DURATION_MS",function(){return P}),M.d(W,"MAX_START_GAP_JUMP",function(){return e}),M.d(W,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return C}),M.d(W,"SKIP_BUFFER_RANGE_START",function(){return g}),M.d(W,"default",function(){return f});var z=M("./src/utils/buffer-helper.ts"),A=M("./src/errors.ts"),I=M("./src/events.ts"),H=M("./src/utils/logger.ts"),P=250,e=2,C=.1,g=.05,f=function(){function o(a,h,s,i){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=a,this.media=h,this.fragmentTracker=s,this.hls=i}var r=o.prototype;return r.destroy=function(){this.hls=this.fragmentTracker=this.media=null},r.poll=function(h){var s=this.config,i=this.media,n=this.stalled,t=i.currentTime,b=i.seeking,v=this.seeking&&!b,E=!this.seeking&&b;if(this.seeking=b,t!==h){if(this.moved=!0,n!==null){if(this.stallReported){var w=self.performance.now()-n;H.logger.warn("playback not stuck anymore @"+t+", after "+Math.round(w)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((E||v)&&(this.stalled=null),i.paused||i.ended||i.playbackRate===0||!z.BufferHelper.getBuffered(i).length)return;var x=z.BufferHelper.bufferInfo(i,t,0),_=x.len>0,p=x.nextStart||0;if(!_&&!p)return;if(b){var u=x.len>e,l=!p||p-t>e&&!this.fragmentTracker.getPartialFragment(t);if(u||l)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var m,c=Math.max(p,x.start||0)-t,T=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,N=T==null||((m=T.details)===null||m===void 0)?void 0:m.live,D=N?T.details.targetduration*2:e;if(c>0&&c<=D){this._trySkipBufferHole(null);return}}var y=self.performance.now();if(n===null){this.stalled=y;return}var O=y-n;!b&&O>=P&&this._reportStall(x.len);var k=z.BufferHelper.bufferInfo(i,t,s.maxBufferHole);this._tryFixBufferStall(k,O)},r._tryFixBufferStall=function(h,s){var i=this.config,n=this.fragmentTracker,t=this.media,b=t.currentTime,v=n.getPartialFragment(b);if(v){var E=this._trySkipBufferHole(v);if(E)return}h.len>i.maxBufferHole&&s>i.highBufferWatchdogPeriod*1e3&&(H.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},r._reportStall=function(h){var s=this.hls,i=this.media,n=this.stallReported;n||(this.stallReported=!0,H.logger.warn("Playback stalling at @"+i.currentTime+" due to low buffer (buffer="+h+")"),s.trigger(I.Events.ERROR,{type:A.ErrorTypes.MEDIA_ERROR,details:A.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:h}))},r._trySkipBufferHole=function(h){for(var s=this.config,i=this.hls,n=this.media,t=n.currentTime,b=0,v=z.BufferHelper.getBuffered(n),E=0;E<v.length;E++){var w=v.start(E);if(t+s.maxBufferHole>=b&&t<w){var x=Math.max(w+g,n.currentTime+C);return H.logger.warn("skipping hole, adjusting currentTime from "+t+" to "+x),this.moved=!0,this.stalled=null,n.currentTime=x,h&&i.trigger(I.Events.ERROR,{type:A.ErrorTypes.MEDIA_ERROR,details:A.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+t+" to "+x,frag:h}),x}b=v.end(E)}return 0},r._tryNudgeBuffer=function(){var h=this.config,s=this.hls,i=this.media,n=i.currentTime,t=(this.nudgeRetry||0)+1;if(this.nudgeRetry=t,t<h.nudgeMaxRetry){var b=n+t*h.nudgeOffset;H.logger.warn("Nudging 'currentTime' from "+n+" to "+b),i.currentTime=b,s.trigger(I.Events.ERROR,{type:A.ErrorTypes.MEDIA_ERROR,details:A.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else H.logger.error("Playhead still not moving while enough data buffered @"+n+" after "+h.nudgeMaxRetry+" nudges"),s.trigger(I.Events.ERROR,{type:A.ErrorTypes.MEDIA_ERROR,details:A.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},o}()},"./src/controller/id3-track-controller.ts":function(ce,W,M){"use strict";M.r(W);var z=M("./src/events.ts"),A=M("./src/utils/texttrack-utils.ts"),I=M("./src/demux/id3.ts"),H=.25,P=function(){function e(g){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=g,this._registerListeners()}var C=e.prototype;return C.destroy=function(){this._unregisterListeners()},C._registerListeners=function(){var f=this.hls;f.on(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),f.on(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this),f.on(z.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),f.on(z.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},C._unregisterListeners=function(){var f=this.hls;f.off(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),f.off(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this),f.off(z.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),f.off(z.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},C.onMediaAttached=function(f,o){this.media=o.media},C.onMediaDetaching=function(){if(!this.id3Track)return;Object(A.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},C.getID3Track=function(f){if(!this.media)return;for(var o=0;o<f.length;o++){var r=f[o];if(r.kind==="metadata"&&r.label==="id3")return Object(A.sendAddTrackEvent)(r,this.media),r}return this.media.addTextTrack("metadata","id3")},C.onFragParsingMetadata=function(f,o){if(!this.media)return;var r=o.frag,a=o.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var h=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,s=0;s<a.length;s++){var i=I.getID3Frames(a[s].data);if(i){var n=a[s].pts,t=s<a.length-1?a[s+1].pts:r.end,b=t-n;b<=0&&(t=n+H);for(var v=0;v<i.length;v++){var E=i[v];if(!I.isTimeStampFrame(E)){var w=new h(n,t,"");w.value=E,this.id3Track.addCue(w)}}}}},C.onBufferFlushing=function(f,o){var r=o.startOffset,a=o.endOffset,h=o.type;if(!h||h==="audio"){var s=this.id3Track;s&&Object(A.removeCuesInRange)(s,r,a)}},e}();W.default=P},"./src/controller/latency-controller.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"default",function(){return e});var z=M("./src/errors.ts"),A=M("./src/events.ts"),I=M("./src/utils/logger.ts");function H(C,g){for(var f=0;f<g.length;f++){var o=g[f];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(C,o.key,o)}}function P(C,g,f){return g&&H(C.prototype,g),f&&H(C,f),C}var e=function(){function C(f){var o=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 o.timeupdate()},this.hls=f,this.config=f.config,this.registerListeners()}var g=C.prototype;return g.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},g.registerListeners=function(){this.hls.on(A.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(A.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(A.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(A.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(A.Events.ERROR,this.onError,this)},g.unregisterListeners=function(){this.hls.off(A.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(A.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(A.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(A.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(A.Events.ERROR,this.onError)},g.onMediaAttached=function(o,r){this.media=r.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},g.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},g.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},g.onLevelUpdated=function(o,r){var a=r.details;this.levelDetails=a,a.advanced&&this.timeupdate(),!a.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},g.onError=function(o,r){if(r.details!==z.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,I.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},g.timeupdate=function(){var o=this.media,r=this.levelDetails;if(!o||!r)return;this.currentTime=o.currentTime;var a=this.computeLatency();if(a===null)return;this._latency=a;var h=this.config,s=h.lowLatencyMode,i=h.maxLiveSyncPlaybackRate;if(!s||i===1)return;var n=this.targetLatency;if(n===null)return;var t=a-n,b=Math.min(this.maxLatency,n+r.targetduration),v=t<b;if(r.live&&v&&t>.05&&this.forwardBufferLength>1){var E=Math.min(2,Math.max(1,i)),w=Math.round(2/(1+Math.exp(-.75*t-this.edgeStalled))*20)/20;o.playbackRate=Math.min(E,Math.max(1,w))}else o.playbackRate!==1&&o.playbackRate!==0&&(o.playbackRate=1)},g.estimateLiveEdge=function(){var o=this.levelDetails;return o===null?null:o.edge+o.age},g.computeLatency=function(){var o=this.estimateLiveEdge();return o===null?null:o-this.currentTime},P(C,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var o=this.config,r=this.levelDetails;return o.liveMaxLatencyDuration!==void 0?o.liveMaxLatencyDuration:r?o.liveMaxLatencyDurationCount*r.targetduration:0}},{key:"targetLatency",get:function(){var o=this.levelDetails;if(o===null)return null;var r=o.holdBack,a=o.partHoldBack,h=o.targetduration,s=this.config,i=s.liveSyncDuration,n=s.liveSyncDurationCount,t=s.lowLatencyMode,b=this.hls.userConfig,v=t&&a||r;(b.liveSyncDuration||b.liveSyncDurationCount||v===0)&&(v=i!==void 0?i:n*h);var E=h,w=1;return v+Math.min(this.stallCount*w,E)}},{key:"liveSyncPosition",get:function(){var o=this.estimateLiveEdge(),r=this.targetLatency,a=this.levelDetails;if(o===null||r===null||a===null)return null;var h=a.edge,s=o-r-this.edgeStalled,i=h-a.totalduration,n=h-(this.config.lowLatencyMode&&a.partTarget||a.targetduration);return Math.min(Math.max(i,s),n)}},{key:"drift",get:function(){var o=this.levelDetails;return o===null?1:o.drift}},{key:"edgeStalled",get:function(){var o=this.levelDetails;if(o===null)return 0;var r=(this.config.lowLatencyMode&&o.partTarget||o.targetduration)*3;return Math.max(o.age-r,0)}},{key:"forwardBufferLength",get:function(){var o=this.media,r=this.levelDetails;if(!o||!r)return 0;var a=o.buffered.length;return a?o.buffered.end(a-1):r.edge-this.currentTime}}]),C}()},"./src/controller/level-controller.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"default",function(){return s});var z=M("./src/types/level.ts"),A=M("./src/events.ts"),I=M("./src/errors.ts"),H=M("./src/utils/codecs.ts"),P=M("./src/controller/level-helper.ts"),e=M("./src/controller/base-playlist-controller.ts"),C=M("./src/types/loader.ts");function g(){return g=Object.assign||function(i){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var b in t)Object.prototype.hasOwnProperty.call(t,b)&&(i[b]=t[b])}return i},g.apply(this,arguments)}function f(i,n){for(var t=0;t<n.length;t++){var b=n[t];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(i,b.key,b)}}function o(i,n,t){return n&&f(i.prototype,n),t&&f(i,t),i}function r(i,n){i.prototype=Object.create(n.prototype),i.prototype.constructor=i,a(i,n)}function a(i,n){return a=Object.setPrototypeOf||function(b,v){return b.__proto__=v,b},a(i,n)}var h=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),s=function(i){r(n,i);function n(b){var v;return v=i.call(this,b,"[level-controller]")||this,v._levels=[],v._firstLevel=-1,v._startLevel=void 0,v.currentLevelIndex=-1,v.manualLevelIndex=-1,v.onParsedComplete=void 0,v._registerListeners(),v}var t=n.prototype;return t._registerListeners=function(){var v=this.hls;v.on(A.Events.MANIFEST_LOADED,this.onManifestLoaded,this),v.on(A.Events.LEVEL_LOADED,this.onLevelLoaded,this),v.on(A.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),v.on(A.Events.FRAG_LOADED,this.onFragLoaded,this),v.on(A.Events.ERROR,this.onError,this)},t._unregisterListeners=function(){var v=this.hls;v.off(A.Events.MANIFEST_LOADED,this.onManifestLoaded,this),v.off(A.Events.LEVEL_LOADED,this.onLevelLoaded,this),v.off(A.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),v.off(A.Events.FRAG_LOADED,this.onFragLoaded,this),v.off(A.Events.ERROR,this.onError,this)},t.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,i.prototype.destroy.call(this)},t.startLoad=function(){var v=this._levels;v.forEach(function(E){E.loadError=0}),i.prototype.startLoad.call(this)},t.onManifestLoaded=function(v,E){var w=[],x=[],_=[],p,u={},l,m=!1,c=!1,T=!1;if(E.levels.forEach(function(O){var k=O.attrs;m=m||!!(O.width&&O.height),c=c||!!O.videoCodec,T=T||!!O.audioCodec,h&&O.audioCodec&&O.audioCodec.indexOf("mp4a.40.34")!==-1&&(O.audioCodec=void 0);var R=O.bitrate+"-"+O.attrs.RESOLUTION+"-"+O.attrs.CODECS;l=u[R],l?l.url.push(O.url):(l=new z.Level(O),u[R]=l,w.push(l)),k&&(k.AUDIO&&Object(P.addGroupId)(l,"audio",k.AUDIO),k.SUBTITLES&&Object(P.addGroupId)(l,"text",k.SUBTITLES))}),(m||c)&&T&&(w=w.filter(function(O){var k=O.videoCodec,R=O.width,B=O.height;return!!k||!!(R&&B)})),w=w.filter(function(O){var k=O.audioCodec,R=O.videoCodec;return(!k||Object(H.isCodecSupportedInMp4)(k,"audio"))&&(!R||Object(H.isCodecSupportedInMp4)(R,"video"))}),E.audioTracks&&(x=E.audioTracks.filter(function(O){return!O.audioCodec||Object(H.isCodecSupportedInMp4)(O.audioCodec,"audio")}),Object(P.assignTrackIdsByGroup)(x)),E.subtitles&&(_=E.subtitles,Object(P.assignTrackIdsByGroup)(_)),w.length>0){p=w[0].bitrate,w.sort(function(O,k){return O.bitrate-k.bitrate}),this._levels=w;for(var N=0;N<w.length;N++)if(w[N].bitrate===p){this._firstLevel=N,this.log("manifest loaded, "+w.length+" level(s) found, first bitrate: "+p);break}var D=T&&!c,y={levels:w,audioTracks:x,subtitleTracks:_,firstLevel:this._firstLevel,stats:E.stats,audio:T,video:c,altAudio:!D&&x.some(function(O){return!!O.url})};this.hls.trigger(A.Events.MANIFEST_PARSED,y),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(A.Events.ERROR,{type:I.ErrorTypes.MEDIA_ERROR,details:I.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:E.url,reason:"no level with compatible codecs found in manifest"})},t.onError=function(v,E){if(i.prototype.onError.call(this,v,E),E.fatal)return;var w=E.context,x=this._levels[this.currentLevelIndex];if(w&&(w.type===C.PlaylistContextType.AUDIO_TRACK&&x.audioGroupIds&&w.groupId===x.audioGroupIds[x.urlId]||w.type===C.PlaylistContextType.SUBTITLE_TRACK&&x.textGroupIds&&w.groupId===x.textGroupIds[x.urlId])){this.redundantFailover(this.currentLevelIndex);return}var _=!1,p=!0,u;switch(E.details){case I.ErrorDetails.FRAG_LOAD_ERROR:case I.ErrorDetails.FRAG_LOAD_TIMEOUT:case I.ErrorDetails.KEY_LOAD_ERROR:case I.ErrorDetails.KEY_LOAD_TIMEOUT:if(E.frag){var l=this._levels[E.frag.level];l?(l.fragmentError++,l.fragmentError>this.hls.config.fragLoadingMaxRetry&&(u=E.frag.level)):u=E.frag.level}break;case I.ErrorDetails.LEVEL_LOAD_ERROR:case I.ErrorDetails.LEVEL_LOAD_TIMEOUT:w&&(w.deliveryDirectives&&(p=!1),u=w.level),_=!0;break;case I.ErrorDetails.REMUX_ALLOC_ERROR:u=E.level,_=!0;break}u!==void 0&&this.recoverLevel(E,u,_,p)},t.recoverLevel=function(v,E,w,x){var _=v.details,p=this._levels[E];if(p.loadError++,w){var u=this.retryLoadingOrFail(v);if(u)v.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(x){var l=p.url.length;if(l>1&&p.loadError<l)v.levelRetry=!0,this.redundantFailover(E);else if(this.manualLevelIndex===-1){var m=E===0?this._levels.length-1:E-1;this.currentLevelIndex!==m&&this._levels[m].loadError===0&&(this.warn(_+": switch to "+m),v.levelRetry=!0,this.hls.nextAutoLevel=m)}}},t.redundantFailover=function(v){var E=this._levels[v],w=E.url.length;if(w>1){var x=(E.urlId+1)%w;this.warn("Switching to redundant URL-id "+x),this._levels.forEach(function(_){_.urlId=x}),this.level=v}},t.onFragLoaded=function(v,E){var w=E.frag;if(w!==void 0&&w.type===C.PlaylistLevelType.MAIN){var x=this._levels[w.level];x!==void 0&&(x.fragmentError=0,x.loadError=0)}},t.onLevelLoaded=function(v,E){var w,x=E.level,_=E.details,p=this._levels[x];if(!p){var u;this.warn("Invalid level index "+x),(u=E.deliveryDirectives)!==null&&u!==void 0&&u.skip&&(_.deltaUpdateFailed=!0);return}x===this.currentLevelIndex?(p.fragmentError===0&&(p.loadError=0,this.retryCount=0),this.playlistLoaded(x,E,p.details)):(w=E.deliveryDirectives)!==null&&w!==void 0&&w.skip&&(_.deltaUpdateFailed=!0)},t.onAudioTrackSwitched=function(v,E){var w=this.hls.levels[this.currentLevelIndex];if(!w)return;if(w.audioGroupIds){for(var x=-1,_=this.hls.audioTracks[E.id].groupId,p=0;p<w.audioGroupIds.length;p++)if(w.audioGroupIds[p]===_){x=p;break}x!==w.urlId&&(w.urlId=x,this.startLoad())}},t.loadPlaylist=function(v){var E=this.currentLevelIndex,w=this._levels[E];if(this.canLoad&&w&&w.url.length>0){var x=w.urlId,_=w.url[x];if(v)try{_=v.addDirectives(_)}catch(p){this.warn("Could not construct new URL with HLS Delivery Directives: "+p)}this.log("Attempt loading level index "+E+(v?" at sn "+v.msn+" part "+v.part:"")+" with URL-id "+x+" "+_),this.clearTimer(),this.hls.trigger(A.Events.LEVEL_LOADING,{url:_,level:E,id:x,deliveryDirectives:v||null})}},t.removeLevel=function(v,E){var w=function(p,u){return u!==E},x=this._levels.filter(function(_,p){return p!==v?!0:_.url.length>1&&E!==void 0?(_.url=_.url.filter(w),_.audioGroupIds&&(_.audioGroupIds=_.audioGroupIds.filter(w)),_.textGroupIds&&(_.textGroupIds=_.textGroupIds.filter(w)),_.urlId=0,!0):!1}).map(function(_,p){var u=_.details;return u!=null&&u.fragments&&u.fragments.forEach(function(l){l.level=p}),_});this._levels=x,this.hls.trigger(A.Events.LEVELS_UPDATED,{levels:x})},o(n,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(v){var E,w=this._levels;if(w.length===0)return;if(this.currentLevelIndex===v&&(E=w[v])!==null&&E!==void 0&&E.details)return;if(v<0||v>=w.length){var x=v<0;if(this.hls.trigger(A.Events.ERROR,{type:I.ErrorTypes.OTHER_ERROR,details:I.ErrorDetails.LEVEL_SWITCH_ERROR,level:v,fatal:x,reason:"invalid level idx"}),x)return;v=Math.min(v,w.length-1)}this.clearTimer();var _=this.currentLevelIndex,p=w[_],u=w[v];this.log("switching to level "+v+" from "+_),this.currentLevelIndex=v;var l=g({},u,{level:v,maxBitrate:u.maxBitrate,uri:u.uri,urlId:u.urlId});delete l._urlId,this.hls.trigger(A.Events.LEVEL_SWITCHING,l);var m=u.details;if(!m||m.live){var c=this.switchParams(u.uri,p==null?void 0:p.details);this.loadPlaylist(c)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(v){this.manualLevelIndex=v,this._startLevel===void 0&&(this._startLevel=v),v!==-1&&(this.level=v)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(v){this._firstLevel=v}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var v=this.hls.config.startLevel;return v!==void 0?v:this._firstLevel}else return this._startLevel},set:function(v){this._startLevel=v}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(v){this.level=v,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=v)}}]),n}(e.default)},"./src/controller/level-helper.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"addGroupId",function(){return I}),M.d(W,"assignTrackIdsByGroup",function(){return H}),M.d(W,"updatePTS",function(){return P}),M.d(W,"updateFragPTSDTS",function(){return C}),M.d(W,"mergeDetails",function(){return g}),M.d(W,"mapPartIntersection",function(){return f}),M.d(W,"mapFragmentIntersection",function(){return o}),M.d(W,"adjustSliding",function(){return r}),M.d(W,"addSliding",function(){return a}),M.d(W,"computeReloadInterval",function(){return h}),M.d(W,"getFragmentWithSN",function(){return s}),M.d(W,"getPartWith",function(){return i});var z=M("./src/polyfills/number.ts"),A=M("./src/utils/logger.ts");function I(n,t,b){switch(t){case"audio":n.audioGroupIds||(n.audioGroupIds=[]),n.audioGroupIds.push(b);break;case"text":n.textGroupIds||(n.textGroupIds=[]),n.textGroupIds.push(b);break}}function H(n){var t={};n.forEach(function(b){var v=b.groupId||"";b.id=t[v]=t[v]||0,t[v]++})}function P(n,t,b){var v=n[t],E=n[b];e(v,E)}function e(n,t){var b=t.startPTS;if(Object(z.isFiniteNumber)(b)){var v=0,E;t.sn>n.sn?(v=b-n.start,E=n):(v=n.start-b,E=t),E.duration!==v&&(E.duration=v)}else if(t.sn>n.sn){var w=n.cc===t.cc;w&&n.minEndPTS?t.start=n.start+(n.minEndPTS-n.start):t.start=n.start+n.duration}else t.start=Math.max(n.start-t.duration,0)}function C(n,t,b,v,E,w){var x=v-b;x<=0&&(A.logger.warn("Fragment should have a positive duration",t),v=b+t.duration,w=E+t.duration);var _=b,p=v,u=t.startPTS,l=t.endPTS;if(Object(z.isFiniteNumber)(u)){var m=Math.abs(u-b);Object(z.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(m,t.deltaPTS):t.deltaPTS=m,_=Math.max(b,u),b=Math.min(b,u),E=Math.min(E,t.startDTS),p=Math.min(v,l),v=Math.max(v,l),w=Math.max(w,t.endDTS)}t.duration=v-b;var c=b-t.start;t.appendedPTS=v,t.start=t.startPTS=b,t.maxStartPTS=_,t.startDTS=E,t.endPTS=v,t.minEndPTS=p,t.endDTS=w;var T=t.sn;if(!n||T<n.startSN||T>n.endSN)return 0;var N,D=T-n.startSN,y=n.fragments;for(y[D]=t,N=D;N>0;N--)e(y[N],y[N-1]);for(N=D;N<y.length-1;N++)e(y[N],y[N+1]);return n.fragmentHint&&e(y[y.length-1],n.fragmentHint),n.PTSKnown=n.alignedSliding=!0,c}function g(n,t){for(var b=null,v=n.fragments,E=v.length-1;E>=0;E--){var w=v[E].initSegment;if(w){b=w;break}}n.fragmentHint&&delete n.fragmentHint.endPTS;var x=0,_;if(o(n,t,function(N,D){N.relurl&&(x=N.cc-D.cc),Object(z.isFiniteNumber)(N.startPTS)&&Object(z.isFiniteNumber)(N.endPTS)&&(D.start=D.startPTS=N.startPTS,D.startDTS=N.startDTS,D.appendedPTS=N.appendedPTS,D.maxStartPTS=N.maxStartPTS,D.endPTS=N.endPTS,D.endDTS=N.endDTS,D.minEndPTS=N.minEndPTS,D.duration=N.endPTS-N.startPTS,D.duration&&(_=D),t.PTSKnown=t.alignedSliding=!0),D.elementaryStreams=N.elementaryStreams,D.loader=N.loader,D.stats=N.stats,D.urlId=N.urlId,N.initSegment&&(D.initSegment=N.initSegment,b=N.initSegment)}),b){var p=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments;p.forEach(function(N){var D;(!N.initSegment||N.initSegment.relurl===((D=b)===null||D===void 0?void 0:D.relurl))&&(N.initSegment=b)})}if(t.skippedSegments&&(t.deltaUpdateFailed=t.fragments.some(function(N){return!N}),t.deltaUpdateFailed)){A.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var u=t.skippedSegments;u--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}var l=t.fragments;if(x){A.logger.warn("discontinuity sliding from playlist, take drift into account");for(var m=0;m<l.length;m++)l[m].cc+=x}t.skippedSegments&&(t.startCC=t.fragments[0].cc),f(n.partList,t.partList,function(N,D){D.elementaryStreams=N.elementaryStreams,D.stats=N.stats}),_?C(t,_,_.startPTS,_.endPTS,_.startDTS,_.endDTS):r(n,t),l.length&&(t.totalduration=t.edge-l[0].start),t.driftStartTime=n.driftStartTime,t.driftStart=n.driftStart;var c=t.advancedDateTime;if(t.advanced&&c){var T=t.edge;t.driftStart||(t.driftStartTime=c,t.driftStart=T),t.driftEndTime=c,t.driftEnd=T}else t.driftEndTime=n.driftEndTime,t.driftEnd=n.driftEnd,t.advancedDateTime=n.advancedDateTime}function f(n,t,b){if(n&&t)for(var v=0,E=0,w=n.length;E<=w;E++){var x=n[E],_=t[E+v];x&&_&&x.index===_.index&&x.fragment.sn===_.fragment.sn?b(x,_):v--}}function o(n,t,b){for(var v=t.skippedSegments,E=Math.max(n.startSN,t.startSN)-t.startSN,w=(n.fragmentHint?1:0)+(v?t.endSN:Math.min(n.endSN,t.endSN))-t.startSN,x=t.startSN-n.startSN,_=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,p=n.fragmentHint?n.fragments.concat(n.fragmentHint):n.fragments,u=E;u<=w;u++){var l=p[x+u],m=_[u];v&&!m&&u<v&&(m=t.fragments[u]=l),l&&m&&b(l,m)}}function r(n,t){var b=t.startSN+t.skippedSegments-n.startSN,v=n.fragments;if(b<0||b>=v.length)return;a(t,v[b].start)}function a(n,t){if(t){for(var b=n.fragments,v=n.skippedSegments;v<b.length;v++)b[v].start+=t;n.fragmentHint&&(n.fragmentHint.start+=t)}}function h(n,t){var b=1e3*n.levelTargetDuration,v=b/2,E=n.age,w=E>0&&E<b*3,x=t.loading.end-t.loading.start,_,p=n.availabilityDelay;if(n.updated===!1)if(w){var u=333*n.misses;_=Math.max(Math.min(v,x*2),u),n.availabilityDelay=(n.availabilityDelay||0)+_}else _=v;else w?(p=Math.min(p||b/2,E),n.availabilityDelay=p,_=p+b-E):_=b-x;return Math.round(_)}function s(n,t,b){if(!n||!n.details)return null;var v=n.details,E=v.fragments[t-v.startSN];return E||(E=v.fragmentHint,E&&E.sn===t?E:t<v.startSN&&b&&b.sn===t?b:null)}function i(n,t,b){if(!n||!n.details)return null;var v=n.details.partList;if(v)for(var E=v.length;E--;){var w=v[E];if(w.index===b&&w.fragment.sn===t)return w}return null}},"./src/controller/stream-controller.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"default",function(){return v});var z=M("./src/polyfills/number.ts"),A=M("./src/controller/base-stream-controller.ts"),I=M("./src/is-supported.ts"),H=M("./src/events.ts"),P=M("./src/utils/buffer-helper.ts"),e=M("./src/controller/fragment-tracker.ts"),C=M("./src/types/loader.ts"),g=M("./src/loader/fragment.ts"),f=M("./src/demux/transmuxer-interface.ts"),o=M("./src/types/transmuxer.ts"),r=M("./src/controller/gap-controller.ts"),a=M("./src/errors.ts"),h=M("./src/utils/logger.ts");function s(E,w){for(var x=0;x<w.length;x++){var _=w[x];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(E,_.key,_)}}function i(E,w,x){return w&&s(E.prototype,w),x&&s(E,x),E}function n(E,w){E.prototype=Object.create(w.prototype),E.prototype.constructor=E,t(E,w)}function t(E,w){return t=Object.setPrototypeOf||function(_,p){return _.__proto__=p,_},t(E,w)}var b=100,v=function(E){n(w,E);function w(_,p){var u;return u=E.call(this,_,p,"[stream-controller]")||this,u.audioCodecSwap=!1,u.gapController=null,u.level=-1,u._forceStartLoad=!1,u.altAudio=!1,u.audioOnly=!1,u.fragPlaying=null,u.onvplaying=null,u.onvseeked=null,u.fragLastKbps=0,u.stalled=!1,u.couldBacktrack=!1,u.audioCodecSwitch=!1,u.videoBuffer=null,u._registerListeners(),u}var x=w.prototype;return x._registerListeners=function(){var p=this.hls;p.on(H.Events.MEDIA_ATTACHED,this.onMediaAttached,this),p.on(H.Events.MEDIA_DETACHING,this.onMediaDetaching,this),p.on(H.Events.MANIFEST_LOADING,this.onManifestLoading,this),p.on(H.Events.MANIFEST_PARSED,this.onManifestParsed,this),p.on(H.Events.LEVEL_LOADING,this.onLevelLoading,this),p.on(H.Events.LEVEL_LOADED,this.onLevelLoaded,this),p.on(H.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),p.on(H.Events.ERROR,this.onError,this),p.on(H.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),p.on(H.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),p.on(H.Events.BUFFER_CREATED,this.onBufferCreated,this),p.on(H.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),p.on(H.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),p.on(H.Events.FRAG_BUFFERED,this.onFragBuffered,this)},x._unregisterListeners=function(){var p=this.hls;p.off(H.Events.MEDIA_ATTACHED,this.onMediaAttached,this),p.off(H.Events.MEDIA_DETACHING,this.onMediaDetaching,this),p.off(H.Events.MANIFEST_LOADING,this.onManifestLoading,this),p.off(H.Events.MANIFEST_PARSED,this.onManifestParsed,this),p.off(H.Events.LEVEL_LOADED,this.onLevelLoaded,this),p.off(H.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),p.off(H.Events.ERROR,this.onError,this),p.off(H.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),p.off(H.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),p.off(H.Events.BUFFER_CREATED,this.onBufferCreated,this),p.off(H.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),p.off(H.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),p.off(H.Events.FRAG_BUFFERED,this.onFragBuffered,this)},x.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},x.startLoad=function(p){if(this.levels){var u=this.lastCurrentTime,l=this.hls;if(this.stopLoad(),this.setInterval(b),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var m=l.startLevel;m===-1&&(l.config.testBandwidth?(m=0,this.bitrateTest=!0):m=l.nextAutoLevel),this.level=l.nextLoadLevel=m,this.loadedmetadata=!1}u>0&&p===-1&&(this.log("Override startPosition with lastCurrentTime @"+u.toFixed(3)),p=u),this.state=A.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=p,this.tick()}else this._forceStartLoad=!0,this.state=A.State.STOPPED},x.stopLoad=function(){this._forceStartLoad=!1,E.prototype.stopLoad.call(this)},x.doTick=function(){switch(this.state){case A.State.IDLE:this.doTickIdle();break;case A.State.WAITING_LEVEL:{var p,u=this.levels,l=this.level,m=u==null||((p=u[l])===null||p===void 0)?void 0:p.details;if(m&&(!m.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(m))break;this.state=A.State.IDLE;break}break}case A.State.FRAG_LOADING_WAITING_RETRY:{var c,T=self.performance.now(),N=this.retryDate;(!N||T>=N||(c=this.media)!==null&&c!==void 0&&c.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=A.State.IDLE)}break;default:break}this.onTickEnd()},x.onTickEnd=function(){E.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},x.doTickIdle=function(){var p,u,l=this.hls,m=this.levelLastLoaded,c=this.levels,T=this.media,N=l.config,D=l.nextLoadLevel;if(m===null||!T&&(this.startFragRequested||!N.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!c||!c[D])return;var y=c[D];this.level=l.nextLoadLevel=D;var O=y.details;if(!O||this.state===A.State.WAITING_LEVEL||O.live&&this.levelLastLoaded!==D){this.state=A.State.WAITING_LEVEL;return}var k=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:T,C.PlaylistLevelType.MAIN);if(k===null)return;var R=k.len,B=this.getMaxBufferLength(y.maxBitrate);if(R>=B)return;if(this._streamEnded(k,O)){var V={};this.altAudio&&(V.type="video"),this.hls.trigger(H.Events.BUFFER_EOS,V),this.state=A.State.ENDED;return}var ee=k.end,re=this.getNextFragment(ee,O);if(this.couldBacktrack&&!this.fragPrevious&&re&&re.sn!=="initSegment"){var _e=re.sn-O.startSN;_e>1&&(re=O.fragments[_e-1],this.fragmentTracker.removeFragment(re))}if(re&&this.fragmentTracker.getState(re)===e.FragmentState.OK&&this.nextLoadPosition>ee){var se=this.audioOnly&&!this.altAudio?g.ElementaryStreamTypes.AUDIO:g.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(T,se,C.PlaylistLevelType.MAIN),re=this.getNextFragment(this.nextLoadPosition,O)}if(!re)return;re.initSegment&&!re.initSegment.data&&!this.bitrateTest&&(re=re.initSegment),((p=re.decryptdata)===null||p===void 0?void 0:p.keyFormat)==="identity"&&!((u=re.decryptdata)!==null&&u!==void 0&&u.key)?this.loadKey(re,O):this.loadFragment(re,O,ee)},x.loadFragment=function(p,u,l){var m,c=this.fragmentTracker.getState(p);if(this.fragCurrent=p,c===e.FragmentState.BACKTRACKED){var T=this.fragmentTracker.getBacktrackData(p);if(T){this._handleFragmentLoadProgress(T),this._handleFragmentLoadComplete(T);return}else c=e.FragmentState.NOT_LOADED}c===e.FragmentState.NOT_LOADED||c===e.FragmentState.PARTIAL?p.sn==="initSegment"?this._loadInitSegment(p):this.bitrateTest?(p.bitrateTest=!0,this.log("Fragment "+p.sn+" of level "+p.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(p)):(this.startFragRequested=!0,E.prototype.loadFragment.call(this,p,u,l)):c===e.FragmentState.APPENDING?this.reduceMaxBufferLength(p.duration)&&this.fragmentTracker.removeFragment(p):((m=this.media)===null||m===void 0?void 0:m.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},x.getAppendedFrag=function(p){var u=this.fragmentTracker.getAppendedFrag(p,C.PlaylistLevelType.MAIN);return u&&"fragment"in u?u.fragment:u},x.getBufferedFrag=function(p){return this.fragmentTracker.getBufferedFrag(p,C.PlaylistLevelType.MAIN)},x.followingBufferedFrag=function(p){return p?this.getBufferedFrag(p.end+.5):null},x.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},x.nextLevelSwitch=function(){var p=this.levels,u=this.media;if(u!=null&&u.readyState){var l,m=this.getAppendedFrag(u.currentTime);if(m&&m.start>1&&this.flushMainBuffer(0,m.start-1),!u.paused&&p){var c=this.hls.nextLoadLevel,T=p[c],N=this.fragLastKbps;N&&this.fragCurrent?l=this.fragCurrent.duration*T.maxBitrate/(1e3*N)+1:l=0}else l=0;var D=this.getBufferedFrag(u.currentTime+l);if(D){var y=this.followingBufferedFrag(D);if(y){this.abortCurrentFrag();var O=y.maxStartPTS?y.maxStartPTS:y.start,k=y.duration,R=Math.max(D.end,O+Math.min(Math.max(k-this.config.maxFragLookUpTolerance,k*.5),k*.75));this.flushMainBuffer(R,Number.POSITIVE_INFINITY)}}}},x.abortCurrentFrag=function(){var p=this.fragCurrent;this.fragCurrent=null,p!=null&&p.loader&&p.loader.abort(),this.state===A.State.KEY_LOADING&&(this.state=A.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},x.flushMainBuffer=function(p,u){E.prototype.flushMainBuffer.call(this,p,u,this.altAudio?"video":null)},x.onMediaAttached=function(p,u){E.prototype.onMediaAttached.call(this,p,u);var l=u.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),l.addEventListener("playing",this.onvplaying),l.addEventListener("seeked",this.onvseeked),this.gapController=new r.default(this.config,l,this.fragmentTracker,this.hls)},x.onMediaDetaching=function(){var p=this.media;p&&(p.removeEventListener("playing",this.onvplaying),p.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),E.prototype.onMediaDetaching.call(this)},x.onMediaPlaying=function(){this.tick()},x.onMediaSeeked=function(){var p=this.media,u=p?p.currentTime:null;Object(z.isFiniteNumber)(u)&&this.log("Media seeked to "+u.toFixed(3)),this.tick()},x.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(H.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},x.onManifestParsed=function(p,u){var l=!1,m=!1,c;u.levels.forEach(function(T){c=T.audioCodec,c&&(c.indexOf("mp4a.40.2")!==-1&&(l=!0),c.indexOf("mp4a.40.5")!==-1&&(m=!0))}),this.audioCodecSwitch=l&&m&&!Object(I.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=u.levels,this.startFragRequested=!1},x.onLevelLoading=function(p,u){var l=this.levels;if(!l||this.state!==A.State.IDLE)return;var m=l[u.level];(!m.details||m.details.live&&this.levelLastLoaded!==u.level||this.waitForCdnTuneIn(m.details))&&(this.state=A.State.WAITING_LEVEL)},x.onLevelLoaded=function(p,u){var l,m=this.levels,c=u.level,T=u.details,N=T.totalduration;if(!m){this.warn("Levels were reset while loading level "+c);return}this.log("Level "+c+" loaded ["+T.startSN+","+T.endSN+"], cc ["+T.startCC+", "+T.endCC+"] duration:"+N);var D=this.fragCurrent;D&&(this.state===A.State.FRAG_LOADING||this.state===A.State.FRAG_LOADING_WAITING_RETRY)&&(D.level!==u.level&&D.loader&&(this.state=A.State.IDLE,D.loader.abort()));var y=m[c],O=0;if(T.live||(l=y.details)!==null&&l!==void 0&&l.live){if(T.fragments[0]||(T.deltaUpdateFailed=!0),T.deltaUpdateFailed)return;O=this.alignPlaylists(T,y.details)}if(y.details=T,this.levelLastLoaded=c,this.hls.trigger(H.Events.LEVEL_UPDATED,{details:T,level:c}),this.state===A.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(T))return;this.state=A.State.IDLE}this.startFragRequested?T.live&&this.synchronizeToLiveEdge(T):this.setStartPosition(T,O),this.tick()},x._handleFragmentLoadProgress=function(p){var u,l=p.frag,m=p.part,c=p.payload,T=this.levels;if(!T){this.warn("Levels were reset while fragment load was in progress. Fragment "+l.sn+" of level "+l.level+" will not be buffered");return}var N=T[l.level],D=N.details;if(!D){this.warn("Dropping fragment "+l.sn+" of level "+l.level+" after level details were reset");return}var y=N.videoCodec,O=D.PTSKnown||!D.live,k=(u=l.initSegment)===null||u===void 0?void 0:u.data,R=this._getAudioCodec(N),B=this.transmuxer=this.transmuxer||new f.default(this.hls,C.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),V=m?m.index:-1,ee=V!==-1,re=new o.ChunkMetadata(l.level,l.sn,l.stats.chunkCount,c.byteLength,V,ee),_e=this.initPTS[l.cc];B.push(c,k,R,y,l,m,D.totalduration,O,re,_e)},x.onAudioTrackSwitching=function(p,u){var l=this.altAudio,m=!!u.url,c=u.id;if(!m){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var T=this.fragCurrent;T!=null&&T.loader&&(this.log("Switching to main audio track, cancel main fragment load"),T.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var N=this.hls;l&&N.trigger(H.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),N.trigger(H.Events.AUDIO_TRACK_SWITCHED,{id:c})}},x.onAudioTrackSwitched=function(p,u){var l=u.id,m=!!this.hls.audioTracks[l].url;if(m){var c=this.videoBuffer;c&&this.mediaBuffer!==c&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=c)}this.altAudio=m,this.tick()},x.onBufferCreated=function(p,u){var l=u.tracks,m,c,T=!1;for(var N in l){var D=l[N];if(D.id==="main"){if(c=N,m=D,N==="video"){var y=l[N];y&&(this.videoBuffer=y.buffer)}}else T=!0}T&&m?(this.log("Alternate track found, use "+c+".buffered to schedule main fragment loading"),this.mediaBuffer=m.buffer):this.mediaBuffer=this.media},x.onFragBuffered=function(p,u){var l=u.frag,m=u.part;if(l&&l.type!==C.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(l)){this.warn("Fragment "+l.sn+(m?" p: "+m.index:"")+" of level "+l.level+" finished buffering, but was aborted. state: "+this.state),this.state===A.State.PARSED&&(this.state=A.State.IDLE);return}var c=m?m.stats:l.stats;this.fragLastKbps=Math.round(8*c.total/(c.buffering.end-c.loading.first)),l.sn!=="initSegment"&&(this.fragPrevious=l),this.fragBufferedComplete(l,m)},x.onError=function(p,u){switch(u.details){case a.ErrorDetails.FRAG_LOAD_ERROR:case a.ErrorDetails.FRAG_LOAD_TIMEOUT:case a.ErrorDetails.KEY_LOAD_ERROR:case a.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(C.PlaylistLevelType.MAIN,u);break;case a.ErrorDetails.LEVEL_LOAD_ERROR:case a.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==A.State.ERROR&&(u.fatal?(this.warn(""+u.details),this.state=A.State.ERROR):!u.levelRetry&&this.state===A.State.WAITING_LEVEL&&(this.state=A.State.IDLE));break;case a.ErrorDetails.BUFFER_FULL_ERROR:if(u.parent==="main"&&(this.state===A.State.PARSING||this.state===A.State.PARSED)){var l=!0,m=this.getFwdBufferInfo(this.media,C.PlaylistLevelType.MAIN);m&&m.len>.5&&(l=!this.reduceMaxBufferLength(m.len)),l&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},x.checkBuffer=function(){var p=this.media,u=this.gapController;if(!p||!u||!p.readyState)return;var l=P.BufferHelper.getBuffered(p);!this.loadedmetadata&&l.length?(this.loadedmetadata=!0,this.seekToStartPos()):u.poll(this.lastCurrentTime),this.lastCurrentTime=p.currentTime},x.onFragLoadEmergencyAborted=function(){this.state=A.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},x.onBufferFlushed=function(p,u){var l=u.type;if(l!==g.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var m=(l===g.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(m,l,C.PlaylistLevelType.MAIN)}},x.onLevelsUpdated=function(p,u){this.levels=u.levels},x.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},x.seekToStartPos=function(){var p=this.media,u=p.currentTime,l=this.startPosition;if(l>=0&&u<l){if(p.seeking){h.logger.log("could not seek to "+l+", already seeking at "+u);return}var m=P.BufferHelper.getBuffered(p),c=m.length?m.start(0):0,T=c-l;T>0&&(T<this.config.maxBufferHole||T<this.config.maxFragLookUpTolerance)&&(h.logger.log("adjusting start position by "+T+" to match buffer start"),l+=T,this.startPosition=l),this.log("seek to target start position "+l+" from current time "+u),p.currentTime=l}},x._getAudioCodec=function(p){var u=this.config.defaultAudioCodec||p.audioCodec;return this.audioCodecSwap&&u&&(this.log("Swapping audio codec"),u.indexOf("mp4a.40.5")!==-1?u="mp4a.40.2":u="mp4a.40.5"),u},x._loadBitrateTestFrag=function(p){var u=this;this._doFragLoad(p).then(function(l){var m=u.hls;if(!l||m.nextLoadLevel||u.fragContextChanged(p))return;u.fragLoadError=0,u.state=A.State.IDLE,u.startFragRequested=!1,u.bitrateTest=!1;var c=p.stats;c.parsing.start=c.parsing.end=c.buffering.start=c.buffering.end=self.performance.now(),m.trigger(H.Events.FRAG_LOADED,l)})},x._handleTransmuxComplete=function(p){var u,l="main",m=this.hls,c=p.remuxResult,T=p.chunkMeta,N=this.getCurrentContext(T);if(!N){this.warn("The loading context changed while buffering fragment "+T.sn+" of level "+T.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(T.level);return}var D=N.frag,y=N.part,O=N.level,k=c.video,R=c.text,B=c.id3,V=c.initSegment,ee=this.altAudio?void 0:c.audio;if(this.fragContextChanged(D))return;if(this.state=A.State.PARSING,V){V.tracks&&(this._bufferInitSegment(O,V.tracks,D,T),m.trigger(H.Events.FRAG_PARSING_INIT_SEGMENT,{frag:D,id:l,tracks:V.tracks}));var re=V.initPTS,_e=V.timescale;Object(z.isFiniteNumber)(re)&&(this.initPTS[D.cc]=re,m.trigger(H.Events.INIT_PTS_FOUND,{frag:D,id:l,initPTS:re,timescale:_e}))}if(k&&c.independent!==!1){if(O.details){var se=k.startPTS,ye=k.endPTS,ve=k.startDTS,Ee=k.endDTS;if(y)y.elementaryStreams[k.type]={startPTS:se,endPTS:ye,startDTS:ve,endDTS:Ee};else if(k.firstKeyFrame&&k.independent&&(this.couldBacktrack=!0),k.dropped&&k.independent){var le=this.getLoadPosition()+this.config.maxBufferHole;if(le<se){this.backtrack(D);return}D.setElementaryStreamInfo(k.type,D.start,ye,D.start,Ee,!0)}D.setElementaryStreamInfo(k.type,se,ye,ve,Ee),this.bufferFragmentData(k,D,y,T)}}else if(c.independent===!1){this.backtrack(D);return}if(ee){var F=ee.startPTS,d=ee.endPTS,S=ee.startDTS,L=ee.endDTS;y&&(y.elementaryStreams[g.ElementaryStreamTypes.AUDIO]={startPTS:F,endPTS:d,startDTS:S,endDTS:L}),D.setElementaryStreamInfo(g.ElementaryStreamTypes.AUDIO,F,d,S,L),this.bufferFragmentData(ee,D,y,T)}if(B!=null&&(u=B.samples)!==null&&u!==void 0&&u.length){var G={frag:D,id:l,samples:B.samples};m.trigger(H.Events.FRAG_PARSING_METADATA,G)}if(R){var U={frag:D,id:l,samples:R.samples};m.trigger(H.Events.FRAG_PARSING_USERDATA,U)}},x._bufferInitSegment=function(p,u,l,m){var c=this;if(this.state!==A.State.PARSING)return;this.audioOnly=!!u.audio&&!u.video,this.altAudio&&!this.audioOnly&&delete u.audio;var T=u.audio,N=u.video,D=u.audiovideo;if(T){var y=p.audioCodec,O=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(y&&(y.indexOf("mp4a.40.5")!==-1?y="mp4a.40.2":y="mp4a.40.5"),T.metadata.channelCount!==1&&O.indexOf("firefox")===-1&&(y="mp4a.40.5")),O.indexOf("android")!==-1&&T.container!=="audio/mpeg"&&(y="mp4a.40.2",this.log("Android: force audio codec to "+y)),p.audioCodec&&p.audioCodec!==y&&this.log('Swapping manifest audio codec "'+p.audioCodec+'" for "'+y+'"'),T.levelCodec=y,T.id="main",this.log("Init audio buffer, container:"+T.container+", codecs[selected/level/parsed]=["+(y||"")+"/"+(p.audioCodec||"")+"/"+T.codec+"]")}N&&(N.levelCodec=p.videoCodec,N.id="main",this.log("Init video buffer, container:"+N.container+", codecs[level/parsed]=["+(p.videoCodec||"")+"/"+N.codec+"]")),D&&this.log("Init audiovideo buffer, container:"+D.container+", codecs[level/parsed]=["+(p.attrs.CODECS||"")+"/"+D.codec+"]"),this.hls.trigger(H.Events.BUFFER_CODECS,u),Object.keys(u).forEach(function(k){var R=u[k],B=R.initSegment;B!=null&&B.byteLength&&c.hls.trigger(H.Events.BUFFER_APPENDING,{type:k,data:B,frag:l,part:null,chunkMeta:m,parent:l.type})}),this.tick()},x.backtrack=function(p){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(p);var u=this.fragmentTracker.backtrack(p);this.fragPrevious=null,this.nextLoadPosition=p.start,u?this.resetFragmentLoading(p):this.state=A.State.BACKTRACKING},x.checkFragmentChanged=function(){var p=this.media,u=null;if(p&&p.readyState>1&&p.seeking===!1){var l=p.currentTime;if(P.BufferHelper.isBuffered(p,l)?u=this.getAppendedFrag(l):P.BufferHelper.isBuffered(p,l+.1)&&(u=this.getAppendedFrag(l+.1)),u){var m=this.fragPlaying,c=u.level;(!m||u.sn!==m.sn||m.level!==c||u.urlId!==m.urlId)&&(this.hls.trigger(H.Events.FRAG_CHANGED,{frag:u}),(!m||m.level!==c)&&this.hls.trigger(H.Events.LEVEL_SWITCHED,{level:c}),this.fragPlaying=u)}}},i(w,[{key:"nextLevel",get:function(){var p=this.nextBufferedFrag;return p?p.level:-1}},{key:"currentLevel",get:function(){var p=this.media;if(p){var u=this.getAppendedFrag(p.currentTime);if(u)return u.level}return-1}},{key:"nextBufferedFrag",get:function(){var p=this.media;if(p){var u=this.getAppendedFrag(p.currentTime);return this.followingBufferedFrag(u)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),w}(A.default)},"./src/controller/subtitle-stream-controller.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"SubtitleStreamController",function(){return n});var z=M("./src/events.ts"),A=M("./src/utils/logger.ts"),I=M("./src/utils/buffer-helper.ts"),H=M("./src/controller/fragment-finders.ts"),P=M("./src/utils/discontinuities.ts"),e=M("./src/controller/level-helper.ts"),C=M("./src/controller/fragment-tracker.ts"),g=M("./src/controller/base-stream-controller.ts"),f=M("./src/types/loader.ts"),o=M("./src/types/level.ts");function r(t,b){for(var v=0;v<b.length;v++){var E=b[v];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(t,E.key,E)}}function a(t,b,v){return b&&r(t.prototype,b),v&&r(t,v),t}function h(t,b){t.prototype=Object.create(b.prototype),t.prototype.constructor=t,s(t,b)}function s(t,b){return s=Object.setPrototypeOf||function(E,w){return E.__proto__=w,E},s(t,b)}var i=500,n=function(t){h(b,t);function b(E,w){var x;return x=t.call(this,E,w,"[subtitle-stream-controller]")||this,x.levels=[],x.currentTrackId=-1,x.tracksBuffered=[],x.mainDetails=null,x._registerListeners(),x}var v=b.prototype;return v.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},v._registerListeners=function(){var w=this.hls;w.on(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),w.on(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this),w.on(z.Events.MANIFEST_LOADING,this.onManifestLoading,this),w.on(z.Events.LEVEL_LOADED,this.onLevelLoaded,this),w.on(z.Events.ERROR,this.onError,this),w.on(z.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),w.on(z.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),w.on(z.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),w.on(z.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),w.on(z.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},v._unregisterListeners=function(){var w=this.hls;w.off(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),w.off(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this),w.off(z.Events.MANIFEST_LOADING,this.onManifestLoading,this),w.off(z.Events.LEVEL_LOADED,this.onLevelLoaded,this),w.off(z.Events.ERROR,this.onError,this),w.off(z.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),w.off(z.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),w.off(z.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),w.off(z.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),w.off(z.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},v.startLoad=function(){this.stopLoad(),this.state=g.State.IDLE,this.setInterval(i),this.tick()},v.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},v.onLevelLoaded=function(w,x){this.mainDetails=x.details},v.onSubtitleFragProcessed=function(w,x){var _=x.frag,p=x.success;if(this.fragPrevious=_,this.state=g.State.IDLE,!p)return;var u=this.tracksBuffered[this.currentTrackId];if(!u)return;for(var l,m=_.start,c=0;c<u.length;c++)if(m>=u[c].start&&m<=u[c].end){l=u[c];break}var T=_.start+_.duration;l?l.end=T:(l={start:m,end:T},u.push(l)),this.fragmentTracker.fragBuffered(_)},v.onBufferFlushing=function(w,x){var _=x.startOffset,p=x.endOffset;if(_===0&&p!==Number.POSITIVE_INFINITY){var u=this.currentTrackId,l=this.levels;if(!l.length||!l[u]||!l[u].details)return;var m=l[u].details,c=m.targetduration,T=p-c;if(T<=0)return;x.endOffsetSubtitles=Math.max(0,T),this.tracksBuffered.forEach(function(N){for(var D=0;D<N.length;){if(N[D].end<=T){N.shift();continue}else if(N[D].start<T)N[D].start=T;else break;D++}}),this.fragmentTracker.removeFragmentsInRange(_,T,f.PlaylistLevelType.SUBTITLE)}},v.onError=function(w,x){var _,p=x.frag;if(!p||p.type!==f.PlaylistLevelType.SUBTITLE)return;(_=this.fragCurrent)!==null&&_!==void 0&&_.loader&&this.fragCurrent.loader.abort(),this.state=g.State.IDLE},v.onSubtitleTracksUpdated=function(w,x){var _=this,p=x.subtitleTracks;this.tracksBuffered=[],this.levels=p.map(function(u){return new o.Level(u)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(u){_.tracksBuffered[u.id]=[]}),this.mediaBuffer=null},v.onSubtitleTrackSwitch=function(w,x){if(this.currentTrackId=x.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var _=this.levels[this.currentTrackId];_!=null&&_.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,_&&this.setInterval(i)},v.onSubtitleTrackLoaded=function(w,x){var _,p=x.details,u=x.id,l=this.currentTrackId,m=this.levels;if(!m.length)return;var c=m[l];if(u>=m.length||u!==l||!c)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,p.live||(_=c.details)!==null&&_!==void 0&&_.live){var T=this.mainDetails;if(p.deltaUpdateFailed||!T)return;var N=T.fragments[0];if(!c.details)p.hasProgramDateTime&&T.hasProgramDateTime?Object(P.alignMediaPlaylistByPDT)(p,T):N&&Object(e.addSliding)(p,N.start);else{var D=this.alignPlaylists(p,c.details);D===0&&N&&Object(e.addSliding)(p,N.start)}}if(c.details=p,this.levelLastLoaded=u,this.tick(),p.live&&!this.fragCurrent&&this.media&&this.state===g.State.IDLE){var y=Object(H.findFragmentByPTS)(null,p.fragments,this.media.currentTime,0);y||(this.warn("Subtitle playlist not aligned with playback"),c.details=void 0)}},v._handleFragmentLoadComplete=function(w){var x=w.frag,_=w.payload,p=x.decryptdata,u=this.hls;if(this.fragContextChanged(x))return;if(_&&_.byteLength>0&&p&&p.key&&p.iv&&p.method==="AES-128"){var l=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(_),p.key.buffer,p.iv.buffer).then(function(m){var c=performance.now();u.trigger(z.Events.FRAG_DECRYPTED,{frag:x,payload:m,stats:{tstart:l,tdecrypt:c}})})}},v.doTick=function(){if(!this.media){this.state=g.State.IDLE;return}if(this.state===g.State.IDLE){var w,x=this.currentTrackId,_=this.levels;if(!_.length||!_[x]||!_[x].details)return;var p=_[x].details,u=p.targetduration,l=this.config,m=this.media,c=I.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,m.currentTime-u,l.maxBufferHole),T=c.end,N=c.len,D=this.getMaxBufferLength()+u;if(N>D)return;console.assert(p,"Subtitle track details are defined on idle subtitle stream controller tick");var y=p.fragments,O=y.length,k=p.edge,R,B=this.fragPrevious;if(T<k){var V=l.maxFragLookUpTolerance;B&&p.hasProgramDateTime&&(R=Object(H.findFragmentByPDT)(y,B.endProgramDateTime,V)),R||(R=Object(H.findFragmentByPTS)(B,y,T,V),!R&&B&&B.start<y[0].start&&(R=y[0]))}else R=y[O-1];(w=R)!==null&&w!==void 0&&w.encrypted?(A.logger.log("Loading key for "+R.sn),this.state=g.State.KEY_LOADING,this.hls.trigger(z.Events.KEY_LOADING,{frag:R})):R&&this.fragmentTracker.getState(R)===C.FragmentState.NOT_LOADED&&this.loadFragment(R,p,T)}},v.loadFragment=function(w,x,_){this.fragCurrent=w,t.prototype.loadFragment.call(this,w,x,_)},a(b,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),b}(g.default)},"./src/controller/subtitle-track-controller.ts":function(ce,W,M){"use strict";M.r(W);var z=M("./src/events.ts"),A=M("./src/utils/texttrack-utils.ts"),I=M("./src/controller/base-playlist-controller.ts"),H=M("./src/types/loader.ts");function P(r,a){for(var h=0;h<a.length;h++){var s=a[h];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(r,s.key,s)}}function e(r,a,h){return a&&P(r.prototype,a),h&&P(r,h),r}function C(r,a){r.prototype=Object.create(a.prototype),r.prototype.constructor=r,g(r,a)}function g(r,a){return g=Object.setPrototypeOf||function(s,i){return s.__proto__=i,s},g(r,a)}var f=function(r){C(a,r);function a(s){var i;return i=r.call(this,s,"[subtitle-track-controller]")||this,i.media=null,i.tracks=[],i.groupId=null,i.tracksInGroup=[],i.trackId=-1,i.selectDefaultTrack=!0,i.queuedDefaultTrack=-1,i.trackChangeListener=function(){return i.onTextTracksChanged()},i.asyncPollTrackChange=function(){return i.pollTrackChange(0)},i.useTextTrackPolling=!1,i.subtitlePollingInterval=-1,i.subtitleDisplay=!0,i.registerListeners(),i}var h=a.prototype;return h.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,r.prototype.destroy.call(this)},h.registerListeners=function(){var i=this.hls;i.on(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.on(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.on(z.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.on(z.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(z.Events.LEVEL_LOADING,this.onLevelLoading,this),i.on(z.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),i.on(z.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),i.on(z.Events.ERROR,this.onError,this)},h.unregisterListeners=function(){var i=this.hls;i.off(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.off(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.off(z.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.off(z.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(z.Events.LEVEL_LOADING,this.onLevelLoading,this),i.off(z.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),i.off(z.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),i.off(z.Events.ERROR,this.onError,this)},h.onMediaAttached=function(i,n){if(this.media=n.media,!this.media)return;this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},h.pollTrackChange=function(i){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,i)},h.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 i=o(this.media.textTracks);i.forEach(function(n){Object(A.clearCurrentCues)(n)}),this.subtitleTrack=-1,this.media=null},h.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},h.onManifestParsed=function(i,n){this.tracks=n.subtitleTracks},h.onSubtitleTrackLoaded=function(i,n){var t=n.id,b=n.details,v=this.trackId,E=this.tracksInGroup[v];if(!E){this.warn("Invalid subtitle track id "+t);return}var w=E.details;E.details=n.details,this.log("subtitle track "+t+" loaded ["+b.startSN+"-"+b.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,n,w))},h.onLevelLoading=function(i,n){this.switchLevel(n.level)},h.onLevelSwitching=function(i,n){this.switchLevel(n.level)},h.switchLevel=function(i){var n=this.hls.levels[i];if(!(n!=null&&n.textGroupIds))return;var t=n.textGroupIds[n.urlId];if(this.groupId!==t){var b=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,v=this.tracks.filter(function(x){return!t||x.groupId===t});this.tracksInGroup=v;var E=this.findTrackId(b==null?void 0:b.name)||this.findTrackId();this.groupId=t;var w={subtitleTracks:v};this.log("Updating subtitle tracks, "+v.length+' track(s) found in "'+t+'" group-id'),this.hls.trigger(z.Events.SUBTITLE_TRACKS_UPDATED,w),E!==-1&&this.setSubtitleTrack(E,b)}},h.findTrackId=function(i){for(var n=this.tracksInGroup,t=0;t<n.length;t++){var b=n[t];if((!this.selectDefaultTrack||b.default)&&(!i||i===b.name))return b.id}return-1},h.onError=function(i,n){if(r.prototype.onError.call(this,i,n),n.fatal||!n.context)return;n.context.type===H.PlaylistContextType.SUBTITLE_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},h.loadPlaylist=function(i){var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var t=n.id,b=n.groupId,v=n.url;if(i)try{v=i.addDirectives(v)}catch(E){this.warn("Could not construct new URL with HLS Delivery Directives: "+E)}this.log("Loading subtitle playlist for id "+t),this.hls.trigger(z.Events.SUBTITLE_TRACK_LOADING,{url:v,id:t,groupId:b,deliveryDirectives:i||null})}},h.toggleTrackModes=function(i){var n=this,t=this.media,b=this.subtitleDisplay,v=this.trackId;if(!t)return;var E=o(t.textTracks),w=E.filter(function(p){return p.groupId===n.groupId});if(i===-1)[].slice.call(E).forEach(function(p){p.mode="disabled"});else{var x=w[v];x&&(x.mode="disabled")}var _=w[i];_&&(_.mode=b?"showing":"hidden")},h.setSubtitleTrack=function(i,n){var t,b=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=i;return}if(this.trackId!==i&&this.toggleTrackModes(i),this.trackId===i&&(i===-1||(t=b[i])!==null&&t!==void 0&&t.details)||i<-1||i>=b.length)return;this.clearTimer();var v=b[i];if(this.log("Switching to subtitle track "+i),this.trackId=i,v){var E=v.id,w=v.groupId,x=w===void 0?"":w,_=v.name,p=v.type,u=v.url;this.hls.trigger(z.Events.SUBTITLE_TRACK_SWITCH,{id:E,groupId:x,name:_,type:p,url:u});var l=this.switchParams(v.url,n==null?void 0:n.details);this.loadPlaylist(l)}else this.hls.trigger(z.Events.SUBTITLE_TRACK_SWITCH,{id:i})},h.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var i=-1,n=o(this.media.textTracks),t=0;t<n.length;t++)if(n[t].mode==="hidden")i=t;else if(n[t].mode==="showing"){i=t;break}this.subtitleTrack!==i&&(this.subtitleTrack=i)},e(a,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(i){this.selectDefaultTrack=!1;var n=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(i,n)}}]),a}(I.default);function o(r){for(var a=[],h=0;h<r.length;h++){var s=r[h];s.kind==="subtitles"&&s.label&&a.push(r[h])}return a}W.default=f},"./src/controller/timeline-controller.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"TimelineController",function(){return o});var z=M("./src/polyfills/number.ts"),A=M("./src/events.ts"),I=M("./src/utils/cea-608-parser.ts"),H=M("./src/utils/output-filter.ts"),P=M("./src/utils/webvtt-parser.ts"),e=M("./src/utils/texttrack-utils.ts"),C=M("./src/utils/imsc1-ttml-parser.ts"),g=M("./src/types/loader.ts"),f=M("./src/utils/logger.ts"),o=function(){function s(n){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=h(),this.captionsProperties=void 0,this.hls=n,this.config=n.config,this.Cues=n.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var t=new H.default(this,"textTrack1"),b=new H.default(this,"textTrack2"),v=new H.default(this,"textTrack3"),E=new H.default(this,"textTrack4");this.cea608Parser1=new I.default(1,t,b),this.cea608Parser2=new I.default(3,v,E)}n.on(A.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(A.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(A.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(A.Events.MANIFEST_LOADED,this.onManifestLoaded,this),n.on(A.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),n.on(A.Events.FRAG_LOADING,this.onFragLoading,this),n.on(A.Events.FRAG_LOADED,this.onFragLoaded,this),n.on(A.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),n.on(A.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),n.on(A.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),n.on(A.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),n.on(A.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var i=s.prototype;return i.destroy=function(){var t=this.hls;t.off(A.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(A.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(A.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(A.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(A.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.off(A.Events.FRAG_LOADING,this.onFragLoading,this),t.off(A.Events.FRAG_LOADED,this.onFragLoaded,this),t.off(A.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.off(A.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),t.off(A.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.off(A.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.off(A.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},i.addCues=function(t,b,v,E,w){for(var x=!1,_=w.length;_--;){var p=w[_],u=a(p[0],p[1],b,v);if(u>=0&&(p[0]=Math.min(p[0],b),p[1]=Math.max(p[1],v),x=!0,u/(v-b)>.5))return}if(x||w.push([b,v]),this.config.renderTextTracksNatively){var l=this.captionsTracks[t];this.Cues.newCue(l,b,v,E)}else{var m=this.Cues.newCue(null,b,v,E);this.hls.trigger(A.Events.CUES_PARSED,{type:"captions",cues:m,track:t})}},i.onInitPtsFound=function(t,b){var v=this,E=b.frag,w=b.id,x=b.initPTS,_=b.timescale,p=this.unparsedVttFrags;w==="main"&&(this.initPTS[E.cc]=x,this.timescale[E.cc]=_),p.length&&(this.unparsedVttFrags=[],p.forEach(function(u){v.onFragLoaded(A.Events.FRAG_LOADED,u)}))},i.getExistingTrack=function(t){var b=this.media;if(b)for(var v=0;v<b.textTracks.length;v++){var E=b.textTracks[v];if(E[t])return E}return null},i.createCaptionsTrack=function(t){this.config.renderTextTracksNatively?this.createNativeTrack(t):this.createNonNativeTrack(t)},i.createNativeTrack=function(t){if(this.captionsTracks[t])return;var b=this.captionsProperties,v=this.captionsTracks,E=this.media,w=b[t],x=w.label,_=w.languageCode,p=this.getExistingTrack(t);if(p)v[t]=p,Object(e.clearCurrentCues)(v[t]),Object(e.sendAddTrackEvent)(v[t],E);else{var u=this.createTextTrack("captions",x,_);u&&(u[t]=!0,v[t]=u)}},i.createNonNativeTrack=function(t){if(this.nonNativeCaptionsTracks[t])return;var b=this.captionsProperties[t];if(!b)return;var v=b.label,E={_id:t,label:v,kind:"captions",default:b.media?!!b.media.default:!1,closedCaptions:b.media};this.nonNativeCaptionsTracks[t]=E,this.hls.trigger(A.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[E]})},i.createTextTrack=function(t,b,v){var E=this.media;return E?E.addTextTrack(t,b,v):void 0},i.onMediaAttaching=function(t,b){this.media=b.media,this._cleanTracks()},i.onMediaDetaching=function(){var t=this.captionsTracks;Object.keys(t).forEach(function(b){Object(e.clearCurrentCues)(t[b]),delete t[b]}),this.nonNativeCaptionsTracks={}},i.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=h(),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())},i._cleanTracks=function(){var t=this.media;if(!t)return;var b=t.textTracks;if(b)for(var v=0;v<b.length;v++)Object(e.clearCurrentCues)(b[v])},i.onSubtitleTracksUpdated=function(t,b){var v=this;this.textTracks=[];var E=b.subtitleTracks||[],w=E.some(function(u){return u.textCodec===C.IMSC1_CODEC});if(this.config.enableWebVTT||w&&this.config.enableIMSC1){var x=this.tracks&&E&&this.tracks.length===E.length;if(this.tracks=E||[],this.config.renderTextTracksNatively){var _=this.media?this.media.textTracks:[];this.tracks.forEach(function(u,l){var m;if(l<_.length){for(var c=null,T=0;T<_.length;T++)if(r(_[T],u)){c=_[T];break}c&&(m=c)}m?Object(e.clearCurrentCues)(m):(m=v.createTextTrack("subtitles",u.name,u.lang),m&&(m.mode="disabled")),m&&(m.groupId=u.groupId,v.textTracks.push(m))})}else if(!x&&this.tracks&&this.tracks.length){var p=this.tracks.map(function(u){return{label:u.name,kind:u.type.toLowerCase(),default:u.default,subtitleTrack:u}});this.hls.trigger(A.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:p})}}},i.onManifestLoaded=function(t,b){var v=this;this.config.enableCEA708Captions&&b.captions&&b.captions.forEach(function(E){var w=/(?:CC|SERVICE)([1-4])/.exec(E.instreamId);if(!w)return;var x="textTrack"+w[1],_=v.captionsProperties[x];if(!_)return;_.label=E.name,E.lang&&(_.languageCode=E.lang),_.media=E})},i.onFragLoading=function(t,b){var v=this.cea608Parser1,E=this.cea608Parser2,w=this.lastSn,x=this.lastPartIndex;if(!this.enabled||!(v&&E))return;if(b.frag.type===g.PlaylistLevelType.MAIN){var _,p,u=b.frag.sn,l=(_=b==null||((p=b.part)===null||p===void 0)?void 0:p.index)!=null?_:-1;u===w+1||u===w&&l===x+1||(v.reset(),E.reset()),this.lastSn=u,this.lastPartIndex=l}},i.onFragLoaded=function(t,b){var v=b.frag,E=b.payload,w=this.initPTS,x=this.unparsedVttFrags;if(v.type===g.PlaylistLevelType.SUBTITLE)if(E.byteLength){if(!Object(z.isFiniteNumber)(w[v.cc])){x.push(b),w.length&&this.hls.trigger(A.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:v,error:new Error("Missing initial subtitle PTS")});return}var _=v.decryptdata;if(_==null||_.key==null||_.method!=="AES-128"){var p=this.tracks[v.level],u=this.vttCCs;u[v.cc]||(u[v.cc]={start:v.start,prevCC:this.prevCC,new:!0},this.prevCC=v.cc),p&&p.textCodec===C.IMSC1_CODEC?this._parseIMSC1(v,E):this._parseVTTs(v,E,u)}}else this.hls.trigger(A.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:v,error:new Error("Empty subtitle payload")})},i._parseIMSC1=function(t,b){var v=this,E=this.hls;Object(C.parseIMSC1)(b,this.initPTS[t.cc],this.timescale[t.cc],function(w){v._appendCues(w,t.level),E.trigger(A.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(w){f.logger.log("Failed to parse IMSC1: "+w),E.trigger(A.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:w})})},i._parseVTTs=function(t,b,v){var E=this,w=this.hls;Object(P.parseWebVTT)(b,this.initPTS[t.cc],this.timescale[t.cc],v,t.cc,t.start,function(x){E._appendCues(x,t.level),w.trigger(A.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(x){E._fallbackToIMSC1(t,b),f.logger.log("Failed to parse VTT cue: "+x),w.trigger(A.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:x})})},i._fallbackToIMSC1=function(t,b){var v=this,E=this.tracks[t.level];E.textCodec||Object(C.parseIMSC1)(b,this.initPTS[t.cc],this.timescale[t.cc],function(){E.textCodec=C.IMSC1_CODEC,v._parseIMSC1(t,b)},function(){E.textCodec="wvtt"})},i._appendCues=function(t,b){var v=this.hls;if(this.config.renderTextTracksNatively){var E=this.textTracks[b];if(E.mode==="disabled")return;t.forEach(function(_){return Object(e.addCueToTrack)(E,_)})}else{var w=this.tracks[b],x=w.default?"default":"subtitles"+b;v.trigger(A.Events.CUES_PARSED,{type:"subtitles",cues:t,track:x})}},i.onFragDecrypted=function(t,b){var v=b.frag;if(v.type===g.PlaylistLevelType.SUBTITLE){if(!Object(z.isFiniteNumber)(this.initPTS[v.cc])){this.unparsedVttFrags.push(b);return}this.onFragLoaded(A.Events.FRAG_LOADED,b)}},i.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},i.onFragParsingUserdata=function(t,b){var v=this.cea608Parser1,E=this.cea608Parser2;if(!this.enabled||!(v&&E))return;for(var w=0;w<b.samples.length;w++){var x=b.samples[w].bytes;if(x){var _=this.extractCea608Data(x);v.addData(b.samples[w].pts,_[0]),E.addData(b.samples[w].pts,_[1])}}},i.onBufferFlushing=function(t,b){var v=b.startOffset,E=b.endOffset,w=b.endOffsetSubtitles,x=b.type,_=this.media;if(!_||_.currentTime<E)return;if(!x||x==="video"){var p=this.captionsTracks;Object.keys(p).forEach(function(l){return Object(e.removeCuesInRange)(p[l],v,E)})}if(this.config.renderTextTracksNatively&&(v===0&&w!==void 0)){var u=this.textTracks;Object.keys(u).forEach(function(l){return Object(e.removeCuesInRange)(u[l],v,w)})}},i.extractCea608Data=function(t){for(var b=t[0]&31,v=2,E=[[],[]],w=0;w<b;w++){var x=t[v++],_=127&t[v++],p=127&t[v++],u=(4&x)!==0,l=3&x;if(_===0&&p===0)continue;u&&((l===0||l===1)&&(E[l].push(_),E[l].push(p)))}return E},s}();function r(s,i){return s&&s.label===i.name&&!(s.textTrack1||s.textTrack2)}function a(s,i,n,t){return Math.min(i,t)-Math.max(s,n)}function h(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"default",function(){return z});var z=function(){function A(H,P){this.subtle=void 0,this.aesIV=void 0,this.subtle=H,this.aesIV=P}var I=A.prototype;return I.decrypt=function(P,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,P)},A}()},"./src/crypt/aes-decryptor.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"removePadding",function(){return A}),M.d(W,"default",function(){return I});var z=M("./src/utils/typed-array.ts");function A(H){var P=H.byteLength,e=P&&new DataView(H.buffer).getUint8(P-1);return e?Object(z.sliceUint8)(H,0,P-e):H}var I=function(){function H(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var P=H.prototype;return P.uint8ArrayToUint32Array_=function(C){for(var g=new DataView(C),f=new Uint32Array(4),o=0;o<4;o++)f[o]=g.getUint32(o*4);return f},P.initTable=function(){var C=this.sBox,g=this.invSBox,f=this.subMix,o=f[0],r=f[1],a=f[2],h=f[3],s=this.invSubMix,i=s[0],n=s[1],t=s[2],b=s[3],v=new Uint32Array(256),E=0,w=0,x=0;for(x=0;x<256;x++)x<128?v[x]=x<<1:v[x]=x<<1^283;for(x=0;x<256;x++){var _=w^w<<1^w<<2^w<<3^w<<4;_=_>>>8^_&255^99,C[E]=_,g[_]=E;var p=v[E],u=v[p],l=v[u],m=v[_]*257^_*16843008;o[E]=m<<24|m>>>8,r[E]=m<<16|m>>>16,a[E]=m<<8|m>>>24,h[E]=m,m=l*16843009^u*65537^p*257^E*16843008,i[_]=m<<24|m>>>8,n[_]=m<<16|m>>>16,t[_]=m<<8|m>>>24,b[_]=m,E?(E=p^v[v[v[l^p]]],w^=v[v[w]]):E=w=1}},P.expandKey=function(C){for(var g=this.uint8ArrayToUint32Array_(C),f=!0,o=0;o<g.length&&f;)f=g[o]===this.key[o],o++;if(f)return;this.key=g;var r=this.keySize=g.length;if(r!==4&&r!==6&&r!==8)throw new Error("Invalid aes key size="+r);var a=this.ksRows=(r+6+1)*4,h,s,i=this.keySchedule=new Uint32Array(a),n=this.invKeySchedule=new Uint32Array(a),t=this.sBox,b=this.rcon,v=this.invSubMix,E=v[0],w=v[1],x=v[2],_=v[3],p,u;for(h=0;h<a;h++){if(h<r){p=i[h]=g[h];continue}u=p,h%r===0?(u=u<<8|u>>>24,u=t[u>>>24]<<24|t[u>>>16&255]<<16|t[u>>>8&255]<<8|t[u&255],u^=b[h/r|0]<<24):r>6&&h%r===4&&(u=t[u>>>24]<<24|t[u>>>16&255]<<16|t[u>>>8&255]<<8|t[u&255]),i[h]=p=(i[h-r]^u)>>>0}for(s=0;s<a;s++)h=a-s,s&3?u=i[h]:u=i[h-4],s<4||h<=4?n[s]=u:n[s]=E[t[u>>>24]]^w[t[u>>>16&255]]^x[t[u>>>8&255]]^_[t[u&255]],n[s]=n[s]>>>0},P.networkToHostOrderSwap=function(C){return C<<24|(C&65280)<<8|(C&16711680)>>8|C>>>24},P.decrypt=function(C,g,f){for(var o=this.keySize+6,r=this.invKeySchedule,a=this.invSBox,h=this.invSubMix,s=h[0],i=h[1],n=h[2],t=h[3],b=this.uint8ArrayToUint32Array_(f),v=b[0],E=b[1],w=b[2],x=b[3],_=new Int32Array(C),p=new Int32Array(_.length),u,l,m,c,T,N,D,y,O,k,R,B,V,ee,re=this.networkToHostOrderSwap;g<_.length;){for(O=re(_[g]),k=re(_[g+1]),R=re(_[g+2]),B=re(_[g+3]),T=O^r[0],N=B^r[1],D=R^r[2],y=k^r[3],V=4,ee=1;ee<o;ee++)u=s[T>>>24]^i[N>>16&255]^n[D>>8&255]^t[y&255]^r[V],l=s[N>>>24]^i[D>>16&255]^n[y>>8&255]^t[T&255]^r[V+1],m=s[D>>>24]^i[y>>16&255]^n[T>>8&255]^t[N&255]^r[V+2],c=s[y>>>24]^i[T>>16&255]^n[N>>8&255]^t[D&255]^r[V+3],T=u,N=l,D=m,y=c,V=V+4;u=a[T>>>24]<<24^a[N>>16&255]<<16^a[D>>8&255]<<8^a[y&255]^r[V],l=a[N>>>24]<<24^a[D>>16&255]<<16^a[y>>8&255]<<8^a[T&255]^r[V+1],m=a[D>>>24]<<24^a[y>>16&255]<<16^a[T>>8&255]<<8^a[N&255]^r[V+2],c=a[y>>>24]<<24^a[T>>16&255]<<16^a[N>>8&255]<<8^a[D&255]^r[V+3],p[g]=re(u^v),p[g+1]=re(c^E),p[g+2]=re(m^w),p[g+3]=re(l^x),v=O,E=k,w=R,x=B,g=g+4}return p.buffer},H}()},"./src/crypt/decrypter.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"default",function(){return g});var z=M("./src/crypt/aes-crypto.ts"),A=M("./src/crypt/fast-aes-key.ts"),I=M("./src/crypt/aes-decryptor.ts"),H=M("./src/utils/logger.ts"),P=M("./src/utils/mp4-tools.ts"),e=M("./src/utils/typed-array.ts"),C=16,g=function(){function f(r,a,h){var s=h===void 0?{}:h,i=s.removePKCS7Padding,n=i===void 0?!0:i;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=r,this.config=a,this.removePKCS7Padding=n,n)try{var t=self.crypto;t&&(this.subtle=t.subtle||t.webkitSubtle)}catch(b){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var o=f.prototype;return o.destroy=function(){this.observer=null},o.isSync=function(){return this.config.enableSoftwareAES},o.flush=function(){var a=this.currentResult;if(!a){this.reset();return}var h=new Uint8Array(a);return this.reset(),this.removePKCS7Padding?Object(I.removePadding)(h):h},o.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},o.decrypt=function(a,h,s,i){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(a),h,s);var n=this.flush();n&&i(n.buffer)}else this.webCryptoDecrypt(new Uint8Array(a),h,s).then(i)},o.softwareDecrypt=function(a,h,s){var i=this.currentIV,n=this.currentResult,t=this.remainderData;this.logOnce("JS AES decrypt"),t&&(a=Object(P.appendUint8Array)(t,a),this.remainderData=null);var b=this.getValidChunk(a);if(!b.length)return null;i&&(s=i);var v=this.softwareDecrypter;v||(v=this.softwareDecrypter=new I.default),v.expandKey(h);var E=n;return this.currentResult=v.decrypt(b.buffer,0,s),this.currentIV=Object(e.sliceUint8)(b,-16).buffer,E||null},o.webCryptoDecrypt=function(a,h,s){var i=this,n=this.subtle;return(this.key!==h||!this.fastAesKey)&&(this.key=h,this.fastAesKey=new A.default(n,h)),this.fastAesKey.expandKey().then(function(t){if(!n)return Promise.reject(new Error("web crypto not initialized"));var b=new z.default(n,s);return b.decrypt(a.buffer,t)}).catch(function(t){return i.onWebCryptoError(t,a,h,s)})},o.onWebCryptoError=function(a,h,s,i){return H.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",a),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(h,s,i)},o.getValidChunk=function(a){var h=a,s=a.length-a.length%C;return s!==a.length&&(h=Object(e.sliceUint8)(a,0,s),this.remainderData=Object(e.sliceUint8)(a,s)),h},o.logOnce=function(a){if(!this.logEnabled)return;H.logger.log("[decrypter.ts]: "+a),this.logEnabled=!1},f}()},"./src/crypt/fast-aes-key.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"default",function(){return z});var z=function(){function A(H,P){this.subtle=void 0,this.key=void 0,this.subtle=H,this.key=P}var I=A.prototype;return I.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},A}()},"./src/demux/aacdemuxer.ts":function(ce,W,M){"use strict";M.r(W);var z=M("./src/demux/base-audio-demuxer.ts"),A=M("./src/demux/adts.ts"),I=M("./src/utils/logger.ts"),H=M("./src/demux/id3.ts");function P(g,f){g.prototype=Object.create(f.prototype),g.prototype.constructor=g,e(g,f)}function e(g,f){return e=Object.setPrototypeOf||function(r,a){return r.__proto__=a,r},e(g,f)}var C=function(g){P(f,g);function f(r,a){var h;return h=g.call(this)||this,h.observer=void 0,h.config=void 0,h.observer=r,h.config=a,h}var o=f.prototype;return o.resetInitSegment=function(a,h,s){g.prototype.resetInitSegment.call(this,a,h,s),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:a,duration:s,inputTimeScale:9e4,dropped:0}},f.probe=function(a){if(!a)return!1;for(var h=H.getID3Data(a,0)||[],s=h.length,i=a.length;s<i;s++)if(A.probe(a,s))return I.logger.log("ADTS sync word found !"),!0;return!1},o.canParse=function(a,h){return A.canParse(a,h)},o.appendFrame=function(a,h,s){A.initTrackConfig(a,this.observer,h,s,a.manifestCodec);var i=A.appendFrame(a,h,s,this.initPTS,this.frameIndex);if(i&&i.missing===0)return i},f}(z.default);C.minProbeByteLength=9,W.default=C},"./src/demux/adts.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"getAudioConfig",function(){return H}),M.d(W,"isHeaderPattern",function(){return P}),M.d(W,"getHeaderLength",function(){return e}),M.d(W,"getFullFrameLength",function(){return C}),M.d(W,"canGetFrameLength",function(){return g}),M.d(W,"isHeader",function(){return f}),M.d(W,"canParse",function(){return o}),M.d(W,"probe",function(){return r}),M.d(W,"initTrackConfig",function(){return a}),M.d(W,"getFrameDuration",function(){return h}),M.d(W,"parseFrameHeader",function(){return s}),M.d(W,"appendFrame",function(){return i});var z=M("./src/utils/logger.ts"),A=M("./src/errors.ts"),I=M("./src/events.ts");function H(n,t,b,v){var E,w,x,_,p=navigator.userAgent.toLowerCase(),u=v,l=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];E=((t[b+2]&192)>>>6)+1;var m=(t[b+2]&60)>>>2;if(m>l.length-1){n.trigger(I.Events.ERROR,{type:A.ErrorTypes.MEDIA_ERROR,details:A.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+m});return}return x=(t[b+2]&1)<<2,x|=(t[b+3]&192)>>>6,z.logger.log("manifest codec:"+v+", ADTS type:"+E+", samplingIndex:"+m),/firefox/i.test(p)?m>=6?(E=5,_=new Array(4),w=m-3):(E=2,_=new Array(2),w=m):p.indexOf("android")!==-1?(E=2,_=new Array(2),w=m):(E=5,_=new Array(4),v&&(v.indexOf("mp4a.40.29")!==-1||v.indexOf("mp4a.40.5")!==-1)||!v&&m>=6?w=m-3:((v&&v.indexOf("mp4a.40.2")!==-1&&(m>=6&&x===1||/vivaldi/i.test(p))||!v&&x===1)&&(E=2,_=new Array(2)),w=m)),_[0]=E<<3,_[0]|=(m&14)>>1,_[1]|=(m&1)<<7,_[1]|=x<<3,E===5&&(_[1]|=(w&14)>>1,_[2]=(w&1)<<7,_[2]|=2<<2,_[3]=0),{config:_,samplerate:l[m],channelCount:x,codec:"mp4a.40."+E,manifestCodec:u}}function P(n,t){return n[t]===255&&(n[t+1]&246)===240}function e(n,t){return n[t+1]&1?7:9}function C(n,t){return(n[t+3]&3)<<11|n[t+4]<<3|(n[t+5]&224)>>>5}function g(n,t){return t+5<n.length}function f(n,t){return t+1<n.length&&P(n,t)}function o(n,t){return g(n,t)&&P(n,t)&&C(n,t)<=n.length-t}function r(n,t){if(f(n,t)){var b=e(n,t);if(t+b>=n.length)return!1;var v=C(n,t);if(v<=b)return!1;var E=t+v;return E===n.length||f(n,E)}return!1}function a(n,t,b,v,E){if(!n.samplerate){var w=H(t,b,v,E);if(!w)return;n.config=w.config,n.samplerate=w.samplerate,n.channelCount=w.channelCount,n.codec=w.codec,n.manifestCodec=w.manifestCodec,z.logger.log("parsed codec:"+n.codec+", rate:"+w.samplerate+", channels:"+w.channelCount)}}function h(n){return 1024*9e4/n}function s(n,t,b,v,E){var w=e(n,t),x=C(n,t);if(x-=w,x>0){var _=b+v*E;return{headerLength:w,frameLength:x,stamp:_}}}function i(n,t,b,v,E){var w=h(n.samplerate),x=s(t,b,v,E,w);if(x){var _=x.frameLength,p=x.headerLength,u=x.stamp,l=p+_,m=Math.max(0,b+l-t.length),c;m?(c=new Uint8Array(l-p),c.set(t.subarray(b+p,t.length),0)):c=t.subarray(b+p,b+l);var T={unit:c,pts:u};return m||n.samples.push(T),{sample:T,length:l,missing:m}}}},"./src/demux/base-audio-demuxer.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"initPTSFn",function(){return C});var z=M("./src/polyfills/number.ts"),A=M("./src/demux/id3.ts"),I=M("./src/demux/dummy-demuxed-track.ts"),H=M("./src/utils/mp4-tools.ts"),P=M("./src/utils/typed-array.ts"),e=function(){function g(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var f=g.prototype;return f.resetInitSegment=function(r,a,h){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},f.resetTimeStamp=function(){},f.resetContiguity=function(){},f.canParse=function(r,a){return!1},f.appendFrame=function(r,a,h){},f.demux=function(r,a){this.cachedData&&(r=Object(H.appendUint8Array)(this.cachedData,r),this.cachedData=null);var h=A.getID3Data(r,0),s=h?h.length:0,i,n,t=this._audioTrack,b=this._id3Track,v=h?A.getTimeStamp(h):void 0,E=r.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=C(v,a)),h&&h.length>0&&b.samples.push({pts:this.initPTS,dts:this.initPTS,data:h}),n=this.initPTS;s<E;){if(this.canParse(r,s)){var w=this.appendFrame(t,r,s);w?(this.frameIndex++,n=w.sample.pts,s+=w.length,i=s):s=E}else A.canParse(r,s)?(h=A.getID3Data(r,s),b.samples.push({pts:n,dts:n,data:h}),s+=h.length,i=s):s++;if(s===E&&i!==E){var x=Object(P.sliceUint8)(r,i);this.cachedData?this.cachedData=Object(H.appendUint8Array)(this.cachedData,x):this.cachedData=x}}return{audioTrack:t,avcTrack:Object(I.dummyTrack)(),id3Track:b,textTrack:Object(I.dummyTrack)()}},f.demuxSampleAes=function(r,a,h){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},f.flush=function(r){var a=this.cachedData;return a&&(this.cachedData=null,this.demux(a,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(I.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(I.dummyTrack)()}},f.destroy=function(){},g}(),C=function(f,o){return Object(z.isFiniteNumber)(f)?f*90:o*9e4};W.default=e},"./src/demux/chunk-cache.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"default",function(){return z});var z=function(){function I(){this.chunks=[],this.dataLength=0}var H=I.prototype;return H.push=function(e){this.chunks.push(e),this.dataLength+=e.length},H.flush=function(){var e=this.chunks,C=this.dataLength,g;if(e.length)e.length===1?g=e[0]:g=A(e,C);else return new Uint8Array(0);return this.reset(),g},H.reset=function(){this.chunks.length=0,this.dataLength=0},I}();function A(I,H){for(var P=new Uint8Array(H),e=0,C=0;C<I.length;C++){var g=I[C];P.set(g,e),e+=g.length}return P}},"./src/demux/dummy-demuxed-track.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"dummyTrack",function(){return z});function z(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(ce,W,M){"use strict";M.r(W);var z=M("./src/utils/logger.ts"),A=function(){function I(P){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=P,this.bytesAvailable=P.byteLength,this.word=0,this.bitsAvailable=0}var H=I.prototype;return H.loadWord=function(){var e=this.data,C=this.bytesAvailable,g=e.byteLength-C,f=new Uint8Array(4),o=Math.min(4,C);if(o===0)throw new Error("no bytes available");f.set(e.subarray(g,g+o)),this.word=new DataView(f.buffer).getUint32(0),this.bitsAvailable=o*8,this.bytesAvailable-=o},H.skipBits=function(e){var C;this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,C=e>>3,e-=C>>3,this.bytesAvailable-=C,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},H.readBits=function(e){var C=Math.min(this.bitsAvailable,e),g=this.word>>>32-C;return e>32&&z.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=C,this.bitsAvailable>0?this.word<<=C:this.bytesAvailable>0&&this.loadWord(),C=e-C,C>0&&this.bitsAvailable?g<<C|this.readBits(C):g},H.skipLZ=function(){var e;for(e=0;e<this.bitsAvailable;++e)if((this.word&2147483648>>>e)!==0)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},H.skipUEG=function(){this.skipBits(1+this.skipLZ())},H.skipEG=function(){this.skipBits(1+this.skipLZ())},H.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},H.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},H.readBoolean=function(){return this.readBits(1)===1},H.readUByte=function(){return this.readBits(8)},H.readUShort=function(){return this.readBits(16)},H.readUInt=function(){return this.readBits(32)},H.skipScalingList=function(e){for(var C=8,g=8,f,o=0;o<e;o++)g!==0&&(f=this.readEG(),g=(C+f+256)%256),C=g===0?C:g},H.readSPS=function(){var e=0,C=0,g=0,f=0,o,r,a,h=this.readUByte.bind(this),s=this.readBits.bind(this),i=this.readUEG.bind(this),n=this.readBoolean.bind(this),t=this.skipBits.bind(this),b=this.skipEG.bind(this),v=this.skipUEG.bind(this),E=this.skipScalingList.bind(this);h();var w=h();if(s(5),t(3),h(),v(),w===100||w===110||w===122||w===244||w===44||w===83||w===86||w===118||w===128){var x=i();if(x===3&&t(1),v(),v(),t(1),n())for(r=x!==3?8:12,a=0;a<r;a++)n()&&(a<6?E(16):E(64))}v();var _=i();if(_===0)i();else if(_===1)for(t(1),b(),b(),o=i(),a=0;a<o;a++)b();v(),t(1);var p=i(),u=i(),l=s(1);l===0&&t(1),t(1),n()&&(e=i(),C=i(),g=i(),f=i());var m=[1,1];if(n()&&n()){var c=h();switch(c){case 1:m=[1,1];break;case 2:m=[12,11];break;case 3:m=[10,11];break;case 4:m=[16,11];break;case 5:m=[40,33];break;case 6:m=[24,11];break;case 7:m=[20,11];break;case 8:m=[32,11];break;case 9:m=[80,33];break;case 10:m=[18,11];break;case 11:m=[15,11];break;case 12:m=[64,33];break;case 13:m=[160,99];break;case 14:m=[4,3];break;case 15:m=[3,2];break;case 16:m=[2,1];break;case 255:{m=[h()<<8|h(),h()<<8|h()];break}}}return{width:Math.ceil((p+1)*16-e*2-C*2),height:(2-l)*(u+1)*16-(l?2:4)*(g+f),pixelRatio:m}},H.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},I}();W.default=A},"./src/demux/id3.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"isHeader",function(){return z}),M.d(W,"isFooter",function(){return A}),M.d(W,"getID3Data",function(){return I}),M.d(W,"canParse",function(){return P}),M.d(W,"getTimeStamp",function(){return e}),M.d(W,"isTimeStampFrame",function(){return C}),M.d(W,"getID3Frames",function(){return f}),M.d(W,"decodeFrame",function(){return o}),M.d(W,"utf8ArrayToStr",function(){return i}),M.d(W,"testables",function(){return n});var z=function(E,w){return w+10<=E.length&&(E[w]===73&&E[w+1]===68&&E[w+2]===51&&(E[w+3]<255&&E[w+4]<255&&(E[w+6]<128&&E[w+7]<128&&E[w+8]<128&&E[w+9]<128)))},A=function(E,w){return w+10<=E.length&&(E[w]===51&&E[w+1]===68&&E[w+2]===73&&(E[w+3]<255&&E[w+4]<255&&(E[w+6]<128&&E[w+7]<128&&E[w+8]<128&&E[w+9]<128)))},I=function(E,w){for(var x=w,_=0;z(E,w);){_+=10;var p=H(E,w+6);_+=p,A(E,w+10)&&(_+=10),w+=_}return _>0?E.subarray(x,x+_):void 0},H=function(E,w){var x=0;return x=(E[w]&127)<<21,x|=(E[w+1]&127)<<14,x|=(E[w+2]&127)<<7,x|=E[w+3]&127,x},P=function(E,w){return z(E,w)&&H(E,w+6)+10<=E.length-w},e=function(E){for(var w=f(E),x=0;x<w.length;x++){var _=w[x];if(C(_))return s(_)}return},C=function(E){return E&&E.key==="PRIV"&&E.info==="com.apple.streaming.transportStreamTimestamp"},g=function(E){var w=String.fromCharCode(E[0],E[1],E[2],E[3]),x=H(E,4),_=10;return{type:w,size:x,data:E.subarray(_,_+x)}},f=function(E){for(var w=0,x=[];z(E,w);){var _=H(E,w+6);w+=10;for(var p=w+_;w+8<p;){var u=g(E.subarray(w)),l=o(u);l&&x.push(l),w+=u.size+10}A(E,w)&&(w+=10)}return x},o=function(E){return E.type==="PRIV"?r(E):E.type[0]==="W"?h(E):a(E)},r=function(E){if(E.size<2)return;var w=i(E.data,!0),x=new Uint8Array(E.data.subarray(w.length+1));return{key:E.type,info:w,data:x.buffer}},a=function(E){if(E.size<2)return;if(E.type==="TXXX"){var w=1,x=i(E.data.subarray(w),!0);w+=x.length+1;var _=i(E.data.subarray(w));return{key:E.type,info:x,data:_}}var p=i(E.data.subarray(1));return{key:E.type,data:p}},h=function(E){if(E.type==="WXXX"){if(E.size<2)return;var w=1,x=i(E.data.subarray(w),!0);w+=x.length+1;var _=i(E.data.subarray(w));return{key:E.type,info:x,data:_}}var p=i(E.data);return{key:E.type,data:p}},s=function(E){if(E.data.byteLength===8){var w=new Uint8Array(E.data),x=w[3]&1,_=(w[4]<<23)+(w[5]<<15)+(w[6]<<7)+w[7];return _/=45,x&&(_+=4772185884e-2),Math.round(_)}return},i=function(E,w){w===void 0&&(w=!1);var x=b();if(x){var _=x.decode(E);if(w){var p=_.indexOf("\0");return p!==-1?_.substring(0,p):_}return _.replace(/\0/g,"")}for(var u=E.length,l,m,c,T="",N=0;N<u;){if(l=E[N++],l===0&&w)return T;if(l===0||l===3)continue;switch(l>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:T+=String.fromCharCode(l);break;case 12:case 13:m=E[N++],T+=String.fromCharCode((l&31)<<6|m&63);break;case 14:m=E[N++],c=E[N++],T+=String.fromCharCode((l&15)<<12|(m&63)<<6|(c&63)<<0);break;default:}}return T},n={decodeTextFrame:a},t;function b(){return!t&&typeof self.TextDecoder!="undefined"&&(t=new self.TextDecoder("utf-8")),t}},"./src/demux/mp3demuxer.ts":function(ce,W,M){"use strict";M.r(W);var z=M("./src/demux/base-audio-demuxer.ts"),A=M("./src/demux/id3.ts"),I=M("./src/utils/logger.ts"),H=M("./src/demux/mpegaudio.ts");function P(g,f){g.prototype=Object.create(f.prototype),g.prototype.constructor=g,e(g,f)}function e(g,f){return e=Object.setPrototypeOf||function(r,a){return r.__proto__=a,r},e(g,f)}var C=function(g){P(f,g);function f(){return g.apply(this,arguments)||this}var o=f.prototype;return o.resetInitSegment=function(a,h,s){g.prototype.resetInitSegment.call(this,a,h,s),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:a,duration:s,inputTimeScale:9e4,dropped:0}},f.probe=function(a){if(!a)return!1;for(var h=A.getID3Data(a,0)||[],s=h.length,i=a.length;s<i;s++)if(H.probe(a,s))return I.logger.log("MPEG Audio sync word found !"),!0;return!1},o.canParse=function(a,h){return H.canParse(a,h)},o.appendFrame=function(a,h,s){return this.initPTS===null?void 0:H.appendFrame(a,h,s,this.initPTS,this.frameIndex)},f}(z.default);C.minProbeByteLength=4,W.default=C},"./src/demux/mp4demuxer.ts":function(ce,W,M){"use strict";M.r(W);var z=M("./src/utils/mp4-tools.ts"),A=M("./src/demux/dummy-demuxed-track.ts"),I=function(){function H(e,C){this.remainderData=null,this.config=void 0,this.config=C}var P=H.prototype;return P.resetTimeStamp=function(){},P.resetInitSegment=function(){},P.resetContiguity=function(){},H.probe=function(C){return Object(z.findBox)({data:C,start:0,end:Math.min(C.length,16384)},["moof"]).length>0},P.demux=function(C){var g=C,f=Object(A.dummyTrack)();if(this.config.progressive){this.remainderData&&(g=Object(z.appendUint8Array)(this.remainderData,C));var o=Object(z.segmentValidRange)(g);this.remainderData=o.remainder,f.samples=o.valid||new Uint8Array}else f.samples=g;return{audioTrack:Object(A.dummyTrack)(),avcTrack:f,id3Track:Object(A.dummyTrack)(),textTrack:Object(A.dummyTrack)()}},P.flush=function(){var C=Object(A.dummyTrack)();return C.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(A.dummyTrack)(),avcTrack:C,id3Track:Object(A.dummyTrack)(),textTrack:Object(A.dummyTrack)()}},P.demuxSampleAes=function(C,g,f){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},P.destroy=function(){},H}();I.minProbeByteLength=1024,W.default=I},"./src/demux/mpegaudio.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"appendFrame",function(){return e}),M.d(W,"parseHeader",function(){return C}),M.d(W,"isHeaderPattern",function(){return g}),M.d(W,"isHeader",function(){return f}),M.d(W,"canParse",function(){return o}),M.d(W,"probe",function(){return r});var z=null,A=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],I=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],H=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],P=[0,1,1,4];function e(a,h,s,i,n){if(s+24>h.length)return;var t=C(h,s);if(t&&s+t.frameLength<=h.length){var b=t.samplesPerFrame*9e4/t.sampleRate,v=i+n*b,E={unit:h.subarray(s,s+t.frameLength),pts:v,dts:v};return a.config=[],a.channelCount=t.channelCount,a.samplerate=t.sampleRate,a.samples.push(E),{sample:E,length:t.frameLength,missing:0}}}function C(a,h){var s=a[h+1]>>3&3,i=a[h+1]>>1&3,n=a[h+2]>>4&15,t=a[h+2]>>2&3;if(s!==1&&n!==0&&n!==15&&t!==3){var b=a[h+2]>>1&1,v=a[h+3]>>6,E=s===3?3-i:i===3?3:4,w=A[E*14+n-1]*1e3,x=s===3?0:s===2?1:2,_=I[x*3+t],p=v===3?1:2,u=H[s][i],l=P[i],m=u*8*l,c=Math.floor(u*w/_+b)*l;if(z===null){var T=navigator.userAgent||"",N=T.match(/Chrome\/(\d+)/i);z=N?parseInt(N[1]):0}var D=!!z&&z<=87;return D&&i===2&&w>=224e3&&v===0&&(a[h+3]=a[h+3]|128),{sampleRate:_,channelCount:p,frameLength:c,samplesPerFrame:m}}}function g(a,h){return a[h]===255&&(a[h+1]&224)===224&&(a[h+1]&6)!==0}function f(a,h){return h+1<a.length&&g(a,h)}function o(a,h){var s=4;return g(a,h)&&s<=a.length-h}function r(a,h){if(h+1<a.length&&g(a,h)){var s=4,i=C(a,h),n=s;i!=null&&i.frameLength&&(n=i.frameLength);var t=h+n;return t===a.length||f(a,t)}return!1}},"./src/demux/sample-aes.ts":function(ce,W,M){"use strict";M.r(W);var z=M("./src/crypt/decrypter.ts"),A=M("./src/demux/tsdemuxer.ts"),I=function(){function H(e,C,g){this.keyData=void 0,this.decrypter=void 0,this.keyData=g,this.decrypter=new z.default(e,C,{removePKCS7Padding:!1})}var P=H.prototype;return P.decryptBuffer=function(C,g){this.decrypter.decrypt(C,this.keyData.key.buffer,this.keyData.iv.buffer,g)},P.decryptAacSample=function(C,g,f,o){var r=C[g].unit,a=r.subarray(16,r.length-r.length%16),h=a.buffer.slice(a.byteOffset,a.byteOffset+a.length),s=this;this.decryptBuffer(h,function(i){var n=new Uint8Array(i);r.set(n,16),o||s.decryptAacSamples(C,g+1,f)})},P.decryptAacSamples=function(C,g,f){for(;;g++){if(g>=C.length){f();return}if(C[g].unit.length<32)continue;var o=this.decrypter.isSync();if(this.decryptAacSample(C,g,f,o),!o)return}},P.getAvcEncryptedData=function(C){for(var g=Math.floor((C.length-48)/160)*16+16,f=new Int8Array(g),o=0,r=32;r<=C.length-16;r+=160,o+=16)f.set(C.subarray(r,r+16),o);return f},P.getAvcDecryptedUnit=function(C,g){for(var f=new Uint8Array(g),o=0,r=32;r<=C.length-16;r+=160,o+=16)C.set(f.subarray(o,o+16),r);return C},P.decryptAvcSample=function(C,g,f,o,r,a){var h=Object(A.discardEPB)(r.data),s=this.getAvcEncryptedData(h),i=this;this.decryptBuffer(s.buffer,function(n){r.data=i.getAvcDecryptedUnit(h,n),a||i.decryptAvcSamples(C,g,f+1,o)})},P.decryptAvcSamples=function(C,g,f,o){if(C instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;g++,f=0){if(g>=C.length){o();return}for(var r=C[g].units;!(f>=r.length);f++){var a=r[f];if(a.data.length<=48||a.type!==1&&a.type!==5)continue;var h=this.decrypter.isSync();if(this.decryptAvcSample(C,g,f,o,a,h),!h)return}}},H}();W.default=I},"./src/demux/transmuxer-interface.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"default",function(){return r});var z=M("./node_modules/webworkify-webpack/index.js"),A=M.n(z),I=M("./src/events.ts"),H=M("./src/demux/transmuxer.ts"),P=M("./src/utils/logger.ts"),e=M("./src/errors.ts"),C=M("./src/utils/mediasource-helper.ts"),g=M("./node_modules/eventemitter3/index.js"),f=M.n(g),o=Object(C.getMediaSource)()||{isTypeSupported:function(){return!1}},r=function(){function a(s,i,n,t){var b=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=s,this.id=i,this.onTransmuxComplete=n,this.onFlush=t;var v=s.config,E=function(u,l){l=l||{},l.frag=b.frag,l.id=b.id,s.trigger(u,l)};this.observer=new g.EventEmitter,this.observer.on(I.Events.FRAG_DECRYPTED,E),this.observer.on(I.Events.ERROR,E);var w={mp4:o.isTypeSupported("video/mp4"),mpeg:o.isTypeSupported("audio/mpeg"),mp3:o.isTypeSupported('audio/mp4; codecs="mp3"')},x=navigator.vendor;if(v.enableWorker&&typeof Worker!="undefined"){P.logger.log("demuxing in webworker");var _;try{_=this.worker=z("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),_.addEventListener("message",this.onwmsg),_.onerror=function(p){s.trigger(I.Events.ERROR,{type:e.ErrorTypes.OTHER_ERROR,details:e.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(p.message+" ("+p.filename+":"+p.lineno+")")})},_.postMessage({cmd:"init",typeSupported:w,vendor:x,id:i,config:JSON.stringify(v)})}catch(p){P.logger.warn("Error in worker:",p),P.logger.error("Error while initializing DemuxerWorker, fallback to inline"),_&&self.URL.revokeObjectURL(_.objectURL),this.transmuxer=new H.default(this.observer,w,v,x,i),this.worker=null}}else this.transmuxer=new H.default(this.observer,w,v,x,i)}var h=a.prototype;return h.destroy=function(){var i=this.worker;if(i)i.removeEventListener("message",this.onwmsg),i.terminate(),this.worker=null;else{var n=this.transmuxer;n&&(n.destroy(),this.transmuxer=null)}var t=this.observer;t&&t.removeAllListeners(),this.observer=null},h.push=function(i,n,t,b,v,E,w,x,_,p){var u=this;_.transmuxing.start=self.performance.now();var l=this.transmuxer,m=this.worker,c=E?E.start:v.start,T=v.decryptdata,N=this.frag,D=!(N&&v.cc===N.cc),y=!(N&&_.level===N.level),O=N?_.sn-N.sn:-1,k=this.part?_.part-this.part.index:1,R=!y&&(O===1||O===0&&k===1),B=self.performance.now();(y||O||v.stats.parsing.start===0)&&(v.stats.parsing.start=B),E&&(k||!R)&&(E.stats.parsing.start=B);var V=new H.TransmuxState(D,R,x,y,c);if(!R||D){P.logger.log("[transmuxer-interface, "+v.type+"]: Starting new transmux session for sn: "+_.sn+" p: "+_.part+" level: "+_.level+" id: "+_.id+`
|
|
discontinuity: `+D+`
|
|
trackSwitch: `+y+`
|
|
contiguous: `+R+`
|
|
accurateTimeOffset: `+x+`
|
|
timeOffset: `+c);var ee=new H.TransmuxConfig(t,b,n,w,p);this.configureTransmuxer(ee)}if(this.frag=v,this.part=E,m)m.postMessage({cmd:"demux",data:i,decryptdata:T,chunkMeta:_,state:V},i instanceof ArrayBuffer?[i]:[]);else if(l){var re=l.push(i,T,_,V);Object(H.isPromise)(re)?re.then(function(_e){u.handleTransmuxComplete(_e)}):this.handleTransmuxComplete(re)}},h.flush=function(i){var n=this;i.transmuxing.start=self.performance.now();var t=this.transmuxer,b=this.worker;if(b)b.postMessage({cmd:"flush",chunkMeta:i});else if(t){var v=t.flush(i);Object(H.isPromise)(v)?v.then(function(E){n.handleFlushResult(E,i)}):this.handleFlushResult(v,i)}},h.handleFlushResult=function(i,n){var t=this;i.forEach(function(b){t.handleTransmuxComplete(b)}),this.onFlush(n)},h.onWorkerMessage=function(i){var n=i.data,t=this.hls;switch(n.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(n.data);break}case"flush":{this.onFlush(n.data);break}default:{n.data=n.data||{},n.data.frag=this.frag,n.data.id=this.id,t.trigger(n.event,n.data);break}}},h.configureTransmuxer=function(i){var n=this.worker,t=this.transmuxer;n?n.postMessage({cmd:"configure",config:i}):t&&t.configure(i)},h.handleTransmuxComplete=function(i){i.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(i)},a}()},"./src/demux/transmuxer-worker.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"default",function(){return e});var z=M("./src/demux/transmuxer.ts"),A=M("./src/events.ts"),I=M("./src/utils/logger.ts"),H=M("./node_modules/eventemitter3/index.js"),P=M.n(H);function e(r){var a=new H.EventEmitter,h=function(i,n){r.postMessage({event:i,data:n})};a.on(A.Events.FRAG_DECRYPTED,h),a.on(A.Events.ERROR,h),r.addEventListener("message",function(s){var i=s.data;switch(i.cmd){case"init":{var n=JSON.parse(i.config);r.transmuxer=new z.default(a,i.typeSupported,n,i.vendor,i.id),Object(I.enableLogs)(n.debug),h("init",null);break}case"configure":{r.transmuxer.configure(i.config);break}case"demux":{var t=r.transmuxer.push(i.data,i.decryptdata,i.chunkMeta,i.state);Object(z.isPromise)(t)?t.then(function(E){C(r,E)}):C(r,t);break}case"flush":{var b=i.chunkMeta,v=r.transmuxer.flush(b);Object(z.isPromise)(v)?v.then(function(E){f(r,E,b)}):f(r,v,b);break}default:break}})}function C(r,a){if(o(a.remuxResult))return;var h=[],s=a.remuxResult,i=s.audio,n=s.video;i&&g(h,i),n&&g(h,n),r.postMessage({event:"transmuxComplete",data:a},h)}function g(r,a){a.data1&&r.push(a.data1.buffer),a.data2&&r.push(a.data2.buffer)}function f(r,a,h){a.forEach(function(s){C(r,s)}),r.postMessage({event:"flush",data:h})}function o(r){return!r.audio&&!r.video&&!r.text&&!r.id3&&!r.initSegment}},"./src/demux/transmuxer.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"default",function(){return n}),M.d(W,"isPromise",function(){return v}),M.d(W,"TransmuxConfig",function(){return E}),M.d(W,"TransmuxState",function(){return w});var z=M("./src/events.ts"),A=M("./src/errors.ts"),I=M("./src/crypt/decrypter.ts"),H=M("./src/demux/aacdemuxer.ts"),P=M("./src/demux/mp4demuxer.ts"),e=M("./src/demux/tsdemuxer.ts"),C=M("./src/demux/mp3demuxer.ts"),g=M("./src/remux/mp4-remuxer.ts"),f=M("./src/remux/passthrough-remuxer.ts"),o=M("./src/demux/chunk-cache.ts"),r=M("./src/utils/mp4-tools.ts"),a=M("./src/utils/logger.ts"),h;try{h=self.performance.now.bind(self.performance)}catch(x){a.logger.debug("Unable to use Performance API on this environment"),h=self.Date.now}var s=[{demux:e.default,remux:g.default},{demux:P.default,remux:f.default},{demux:H.default,remux:g.default},{demux:C.default,remux:g.default}],i=1024;s.forEach(function(x){var _=x.demux;i=Math.max(i,_.minProbeByteLength)});var n=function(){function x(p,u,l,m,c){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new o.default,this.observer=p,this.typeSupported=u,this.config=l,this.vendor=m,this.id=c}var _=x.prototype;return _.configure=function(u){this.transmuxConfig=u,this.decrypter&&this.decrypter.reset()},_.push=function(u,l,m,c){var T=this,N=m.transmuxing;N.executeStart=h();var D=new Uint8Array(u),y=this.cache,O=this.config,k=this.currentTransmuxState,R=this.transmuxConfig;c&&(this.currentTransmuxState=c);var B=t(D,l);if(B&&B.method==="AES-128"){var V=this.getDecrypter();if(O.enableSoftwareAES){var ee=V.softwareDecrypt(D,B.key.buffer,B.iv.buffer);if(!ee)return N.executeEnd=h(),b(m);D=new Uint8Array(ee)}else return this.decryptionPromise=V.webCryptoDecrypt(D,B.key.buffer,B.iv.buffer).then(function(de){var xe=T.push(de,null,m);return T.decryptionPromise=null,xe}),this.decryptionPromise}var re=c||k,_e=re.contiguous,se=re.discontinuity,ye=re.trackSwitch,ve=re.accurateTimeOffset,Ee=re.timeOffset,le=R.audioCodec,F=R.videoCodec,d=R.defaultInitPts,S=R.duration,L=R.initSegmentData;if((se||ye)&&this.resetInitSegment(L,le,F,S),se&&this.resetInitialTimestamp(d),_e||this.resetContiguity(),this.needsProbing(D,se,ye)){if(y.dataLength){var G=y.flush();D=Object(r.appendUint8Array)(G,D)}this.configureTransmuxer(D,R)}var U=this.transmux(D,B,Ee,ve,m),$=this.currentTransmuxState;return $.contiguous=!0,$.discontinuity=!1,$.trackSwitch=!1,N.executeEnd=h(),U},_.flush=function(u){var l=this,m=u.transmuxing;m.executeStart=h();var c=this.decrypter,T=this.cache,N=this.currentTransmuxState,D=this.decryptionPromise;if(D)return D.then(function(){return l.flush(u)});var y=[],O=N.timeOffset;if(c){var k=c.flush();k&&y.push(this.push(k,null,u))}var R=T.dataLength;T.reset();var B=this.demuxer,V=this.remuxer;if(!B||!V)return R>=i&&this.observer.emit(z.Events.ERROR,z.Events.ERROR,{type:A.ErrorTypes.MEDIA_ERROR,details:A.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),m.executeEnd=h(),[b(u)];var ee=B.flush(O);return v(ee)?ee.then(function(re){return l.flushRemux(y,re,u),y}):(this.flushRemux(y,ee,u),y)},_.flushRemux=function(u,l,m){var c=l.audioTrack,T=l.avcTrack,N=l.id3Track,D=l.textTrack,y=this.currentTransmuxState,O=y.accurateTimeOffset,k=y.timeOffset;a.logger.log("[transmuxer.ts]: Flushed fragment "+m.sn+(m.part>-1?" p: "+m.part:"")+" of level "+m.level);var R=this.remuxer.remux(c,T,N,D,k,O,!0,this.id);u.push({remuxResult:R,chunkMeta:m}),m.transmuxing.executeEnd=h()},_.resetInitialTimestamp=function(u){var l=this.demuxer,m=this.remuxer;if(!l||!m)return;l.resetTimeStamp(u),m.resetTimeStamp(u)},_.resetContiguity=function(){var u=this.demuxer,l=this.remuxer;if(!u||!l)return;u.resetContiguity(),l.resetNextTimestamp()},_.resetInitSegment=function(u,l,m,c){var T=this.demuxer,N=this.remuxer;if(!T||!N)return;T.resetInitSegment(l,m,c),N.resetInitSegment(u,l,m)},_.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},_.transmux=function(u,l,m,c,T){var N;return l&&l.method==="SAMPLE-AES"?N=this.transmuxSampleAes(u,l,m,c,T):N=this.transmuxUnencrypted(u,m,c,T),N},_.transmuxUnencrypted=function(u,l,m,c){var T=this.demuxer.demux(u,l,!1,!this.config.progressive),N=T.audioTrack,D=T.avcTrack,y=T.id3Track,O=T.textTrack,k=this.remuxer.remux(N,D,y,O,l,m,!1,this.id);return{remuxResult:k,chunkMeta:c}},_.transmuxSampleAes=function(u,l,m,c,T){var N=this;return this.demuxer.demuxSampleAes(u,l,m).then(function(D){var y=N.remuxer.remux(D.audioTrack,D.avcTrack,D.id3Track,D.textTrack,m,c,!1,N.id);return{remuxResult:y,chunkMeta:T}})},_.configureTransmuxer=function(u,l){for(var m=this.config,c=this.observer,T=this.typeSupported,N=this.vendor,D=l.audioCodec,y=l.defaultInitPts,O=l.duration,k=l.initSegmentData,R=l.videoCodec,B,V=0,ee=s.length;V<ee;V++)if(s[V].demux.probe(u)){B=s[V];break}B||(a.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),B={demux:P.default,remux:f.default});var re=this.demuxer,_e=this.remuxer,se=B.remux,ye=B.demux;(!_e||!(_e instanceof se))&&(this.remuxer=new se(c,m,T,N)),(!re||!(re instanceof ye))&&(this.demuxer=new ye(c,m,T),this.probe=ye.probe),this.resetInitSegment(k,D,R,O),this.resetInitialTimestamp(y)},_.needsProbing=function(u,l,m){return!this.demuxer||!this.remuxer||l||m},_.getDecrypter=function(){var u=this.decrypter;return u||(u=this.decrypter=new I.default(this.observer,this.config)),u},x}();function t(x,_){var p=null;return x.byteLength>0&&_!=null&&_.key!=null&&_.iv!==null&&_.method!=null&&(p=_),p}var b=function(_){return{remuxResult:{},chunkMeta:_}};function v(x){return"then"in x&&x.then instanceof Function}var E=function(_,p,u,l,m){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=_,this.videoCodec=p,this.initSegmentData=u,this.duration=l,this.defaultInitPts=m},w=function(_,p,u,l,m){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=_,this.contiguous=p,this.accurateTimeOffset=u,this.trackSwitch=l,this.timeOffset=m}},"./src/demux/tsdemuxer.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"discardEPB",function(){return b});var z=M("./src/demux/adts.ts"),A=M("./src/demux/mpegaudio.ts"),I=M("./src/demux/exp-golomb.ts"),H=M("./src/demux/id3.ts"),P=M("./src/demux/sample-aes.ts"),e=M("./src/events.ts"),C=M("./src/utils/mp4-tools.ts"),g=M("./src/utils/logger.ts"),f=M("./src/errors.ts"),o={video:1,audio:2,id3:3,text:4},r=function(){function v(w,x,_){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=w,this.config=x,this.typeSupported=_}v.probe=function(x){var _=v.syncOffset(x);return _<0?!1:(_&&g.logger.warn("MPEG2-TS detected but first sync word found @ offset "+_+", junk ahead ?"),!0)},v.syncOffset=function(x){for(var _=Math.min(1e3,x.length-3*188),p=0;p<_;){if(x[p]===71&&x[p+188]===71&&x[p+2*188]===71)return p;p++}return-1},v.createTrack=function(x,_){return{container:x==="video"||x==="audio"?"video/mp2t":void 0,type:x,id:o[x],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:x==="audio"?_:void 0}};var E=v.prototype;return E.resetInitSegment=function(x,_,p){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=v.createTrack("video",p),this._audioTrack=v.createTrack("audio",p),this._id3Track=v.createTrack("id3",p),this._txtTrack=v.createTrack("text",p),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=x,this.videoCodec=_,this._duration=p},E.resetTimeStamp=function(){},E.resetContiguity=function(){var x=this._audioTrack,_=this._avcTrack,p=this._id3Track;x&&(x.pesData=null),_&&(_.pesData=null),p&&(p.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},E.demux=function(x,_,p,u){p===void 0&&(p=!1),u===void 0&&(u=!1),p||(this.sampleAes=null);var l,m=this._avcTrack,c=this._audioTrack,T=this._id3Track,N=m.pid,D=m.pesData,y=c.pid,O=T.pid,k=c.pesData,R=T.pesData,B=!1,V=this.pmtParsed,ee=this._pmtId,re=x.length;if(this.remainderData&&(x=Object(C.appendUint8Array)(this.remainderData,x),re=x.length,this.remainderData=null),re<188&&!u)return this.remainderData=x,{audioTrack:c,avcTrack:m,id3Track:T,textTrack:this._txtTrack};var _e=Math.max(0,v.syncOffset(x));re-=(re+_e)%188,re<x.byteLength&&!u&&(this.remainderData=new Uint8Array(x.buffer,re,x.buffer.byteLength-re));for(var se=_e;se<re;se+=188)if(x[se]===71){var ye=!!(x[se+1]&64),ve=((x[se+1]&31)<<8)+x[se+2],Ee=(x[se+3]&48)>>4,le=void 0;if(Ee>1){if(le=se+5+x[se+4],le===se+188)continue}else le=se+4;switch(ve){case N:ye&&(D&&(l=i(D))&&this.parseAVCPES(l,!1),D={data:[],size:0}),D&&(D.data.push(x.subarray(le,se+188)),D.size+=se+188-le);break;case y:ye&&(k&&(l=i(k))&&(c.isAAC?this.parseAACPES(l):this.parseMPEGPES(l)),k={data:[],size:0}),k&&(k.data.push(x.subarray(le,se+188)),k.size+=se+188-le);break;case O:ye&&(R&&(l=i(R))&&this.parseID3PES(l),R={data:[],size:0}),R&&(R.data.push(x.subarray(le,se+188)),R.size+=se+188-le);break;case 0:ye&&(le+=x[le]+1),ee=this._pmtId=h(x,le);break;case ee:{ye&&(le+=x[le]+1);var F=s(x,le,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,p);N=F.avc,N>0&&(m.pid=N),y=F.audio,y>0&&(c.pid=y,c.isAAC=F.isAAC),O=F.id3,O>0&&(T.pid=O),B&&!V&&(g.logger.log("reparse from beginning"),B=!1,se=_e-188),V=this.pmtParsed=!0;break}case 17:case 8191:break;default:B=!0;break}}else this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});m.pesData=D,c.pesData=k,T.pesData=R;var d={audioTrack:c,avcTrack:m,id3Track:T,textTrack:this._txtTrack};return u&&this.extractRemainingSamples(d),d},E.flush=function(){var x=this.remainderData;this.remainderData=null;var _;return x?_=this.demux(x,-1,!1,!0):_={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(_),this.sampleAes?this.decrypt(_,this.sampleAes):_},E.extractRemainingSamples=function(x){var _=x.audioTrack,p=x.avcTrack,u=x.id3Track,l=p.pesData,m=_.pesData,c=u.pesData,T;l&&(T=i(l))?(this.parseAVCPES(T,!0),p.pesData=null):p.pesData=l,m&&(T=i(m))?(_.isAAC?this.parseAACPES(T):this.parseMPEGPES(T),_.pesData=null):(m!=null&&m.size&&g.logger.log("last AAC PES packet truncated,might overlap between fragments"),_.pesData=m),c&&(T=i(c))?(this.parseID3PES(T),u.pesData=null):u.pesData=c},E.demuxSampleAes=function(x,_,p){var u=this.demux(x,p,!0,!this.config.progressive),l=this.sampleAes=new P.default(this.observer,this.config,_);return this.decrypt(u,l)},E.decrypt=function(x,_){return new Promise(function(p){var u=x.audioTrack,l=x.avcTrack;u.samples&&u.isAAC?_.decryptAacSamples(u.samples,0,function(){l.samples?_.decryptAvcSamples(l.samples,0,0,function(){p(x)}):p(x)}):l.samples&&_.decryptAvcSamples(l.samples,0,0,function(){p(x)})})},E.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},E.parseAVCPES=function(x,_){var p=this,u=this._avcTrack,l=this.parseAVCNALu(x.data),m=!1,c=this.avcSample,T,N=!1;x.data=null,c&&l.length&&!u.audFound&&(n(c,u),c=this.avcSample=a(!1,x.pts,x.dts,"")),l.forEach(function(D){switch(D.type){case 1:{T=!0,c||(c=p.avcSample=a(!0,x.pts,x.dts,"")),m&&(c.debug+="NDR "),c.frame=!0;var y=D.data;if(N&&y.length>4){var O=new I.default(y).readSliceType();(O===2||O===4||O===7||O===9)&&(c.key=!0)}break}case 5:T=!0,c||(c=p.avcSample=a(!0,x.pts,x.dts,"")),m&&(c.debug+="IDR "),c.key=!0,c.frame=!0;break;case 6:{T=!0,m&&c&&(c.debug+="SEI ");var k=new I.default(b(D.data));k.readUByte();for(var R=0,B=0,V=!1,ee=0;!V&&k.bytesAvailable>1;){R=0;do ee=k.readUByte(),R+=ee;while(ee===255);B=0;do ee=k.readUByte(),B+=ee;while(ee===255);if(R===4&&k.bytesAvailable!==0){V=!0;var re=k.readUByte();if(re===181){var _e=k.readUShort();if(_e===49){var se=k.readUInt();if(se===1195456820){var ye=k.readUByte();if(ye===3){for(var ve=k.readUByte(),Ee=k.readUByte(),le=31&ve,F=[ve,Ee],d=0;d<le;d++)F.push(k.readUByte()),F.push(k.readUByte()),F.push(k.readUByte());t(p._txtTrack.samples,{type:3,pts:x.pts,bytes:F})}}}}}else if(R===5&&k.bytesAvailable!==0){if(V=!0,B>16){for(var S=[],L=0;L<16;L++)S.push(k.readUByte().toString(16)),(L===3||L===5||L===7||L===9)&&S.push("-");for(var G=B-16,U=new Uint8Array(G),$=0;$<G;$++)U[$]=k.readUByte();t(p._txtTrack.samples,{pts:x.pts,payloadType:R,uuid:S.join(""),userData:Object(H.utf8ArrayToStr)(U),userDataBytes:U})}}else if(B<k.bytesAvailable)for(var de=0;de<B;de++)k.readUByte()}break}case 7:if(T=!0,N=!0,m&&c&&(c.debug+="SPS "),!u.sps){var xe=new I.default(D.data),q=xe.readSPS();u.width=q.width,u.height=q.height,u.pixelRatio=q.pixelRatio,u.sps=[D.data],u.duration=p._duration;for(var ae=D.data.subarray(1,4),fe="avc1.",pe=0;pe<3;pe++){var Ce=ae[pe].toString(16);Ce.length<2&&(Ce="0"+Ce),fe+=Ce}u.codec=fe}break;case 8:T=!0,m&&c&&(c.debug+="PPS "),u.pps||(u.pps=[D.data]);break;case 9:T=!1,u.audFound=!0,c&&n(c,u),c=p.avcSample=a(!1,x.pts,x.dts,m?"AUD ":"");break;case 12:T=!1;break;default:T=!1,c&&(c.debug+="unknown NAL "+D.type+" ");break}if(c&&T){var Me=c.units;Me.push(D)}}),_&&c&&(n(c,u),this.avcSample=null)},E.getLastNalUnit=function(){var x,_=this.avcSample,p;if(!_||_.units.length===0){var u=this._avcTrack.samples;_=u[u.length-1]}if((x=_)!==null&&x!==void 0&&x.units){var l=_.units;p=l[l.length-1]}return p},E.parseAVCNALu=function(x){var _=x.byteLength,p=this._avcTrack,u=p.naluState||0,l=u,m=[],c=0,T,N,D,y=-1,O=0;for(u===-1&&(y=0,O=x[0]&31,u=0,c=1);c<_;){if(T=x[c++],!u){u=T?0:1;continue}if(u===1){u=T?0:2;continue}if(!T)u=3;else if(T===1){if(y>=0){var k={data:x.subarray(y,c-u-1),type:O};m.push(k)}else{var R=this.getLastNalUnit();if(R&&(l&&c<=4-l&&(R.state&&(R.data=R.data.subarray(0,R.data.byteLength-l))),N=c-u-1,N>0)){var B=new Uint8Array(R.data.byteLength+N);B.set(R.data,0),B.set(x.subarray(0,N),R.data.byteLength),R.data=B,R.state=0}}c<_?(D=x[c]&31,y=c,O=D,u=0):u=-1}else u=0}if(y>=0&&u>=0){var V={data:x.subarray(y,_),type:O,state:u};m.push(V)}if(m.length===0){var ee=this.getLastNalUnit();if(ee){var re=new Uint8Array(ee.data.byteLength+x.byteLength);re.set(ee.data,0),re.set(x,ee.data.byteLength),ee.data=re}}return p.naluState=u,m},E.parseAACPES=function(x){var _=0,p=this._audioTrack,u=this.aacOverFlow,l=x.data;if(u){this.aacOverFlow=null;var m=u.sample.unit.byteLength,c=Math.min(u.missing,m),T=m-c;u.sample.unit.set(l.subarray(0,c),T),p.samples.push(u.sample),_=u.missing}var N,D;for(N=_,D=l.length;N<D-1&&!z.isHeader(l,N);N++);if(N!==_){var y,O;if(N<D-1?(y="AAC PES did not start with ADTS header,offset:"+N,O=!1):(y="no ADTS header found in AAC PES",O=!0),g.logger.warn("parsing error:"+y),this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.FRAG_PARSING_ERROR,fatal:O,reason:y}),O)return}z.initTrackConfig(p,this.observer,l,N,this.audioCodec);var k;if(x.pts!==void 0)k=x.pts;else if(u){var R=z.getFrameDuration(p.samplerate);k=u.sample.pts+R}else{g.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var B=0;N<D;)if(z.isHeader(l,N)){if(N+5<D){var V=z.appendFrame(p,l,N,k,B);if(V)if(V.missing)this.aacOverFlow=V;else{N+=V.length,B++;continue}}break}else N++},E.parseMPEGPES=function(x){var _=x.data,p=_.length,u=0,l=0,m=x.pts;if(m===void 0){g.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;l<p;)if(A.isHeader(_,l)){var c=A.appendFrame(this._audioTrack,_,l,m,u);if(c)l+=c.length,u++;else break}else l++},E.parseID3PES=function(x){if(x.pts===void 0){g.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(x)},v}();r.minProbeByteLength=188;function a(v,E,w,x){return{key:v,frame:!1,pts:E,dts:w,units:[],debug:x,length:0}}function h(v,E){return(v[E+10]&31)<<8|v[E+11]}function s(v,E,w,x){var _={audio:-1,avc:-1,id3:-1,isAAC:!0},p=(v[E+1]&15)<<8|v[E+2],u=E+3+p-4,l=(v[E+10]&15)<<8|v[E+11];for(E+=12+l;E<u;){var m=(v[E+1]&31)<<8|v[E+2];switch(v[E]){case 207:if(!x){g.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:_.audio===-1&&(_.audio=m);break;case 21:_.id3===-1&&(_.id3=m);break;case 219:if(!x){g.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:_.avc===-1&&(_.avc=m);break;case 3:case 4:w?_.audio===-1&&(_.audio=m,_.isAAC=!1):g.logger.log("MPEG audio found, not supported in this browser");break;case 36:g.logger.warn("Unsupported HEVC stream type found");break;default:break}E+=((v[E+3]&15)<<8|v[E+4])+5}return _}function i(v){var E=0,w,x,_,p,u,l=v.data;if(!v||v.size===0)return null;for(;l[0].length<19&&l.length>1;){var m=new Uint8Array(l[0].length+l[1].length);m.set(l[0]),m.set(l[1],l[0].length),l[0]=m,l.splice(1,1)}w=l[0];var c=(w[0]<<16)+(w[1]<<8)+w[2];if(c===1){if(x=(w[4]<<8)+w[5],x&&x>v.size-6)return null;var T=w[7];T&192&&(p=(w[9]&14)*536870912+(w[10]&255)*4194304+(w[11]&254)*16384+(w[12]&255)*128+(w[13]&254)/2,T&64?(u=(w[14]&14)*536870912+(w[15]&255)*4194304+(w[16]&254)*16384+(w[17]&255)*128+(w[18]&254)/2,p-u>60*9e4&&(g.logger.warn(Math.round((p-u)/9e4)+"s delta between PTS and DTS, align them"),p=u)):u=p),_=w[8];var N=_+9;if(v.size<=N)return null;v.size-=N;for(var D=new Uint8Array(v.size),y=0,O=l.length;y<O;y++){w=l[y];var k=w.byteLength;if(N)if(N>k){N-=k;continue}else w=w.subarray(N),k-=N,N=0;D.set(w,E),E+=k}return x&&(x-=_+3),{data:D,pts:p,dts:u,len:x}}return null}function n(v,E){if(v.units.length&&v.frame){if(v.pts===void 0){var w=E.samples,x=w.length;if(x){var _=w[x-1];v.pts=_.pts,v.dts=_.dts}else{E.dropped++;return}}E.samples.push(v)}v.debug.length&&g.logger.log(v.pts+"/"+v.dts+":"+v.debug)}function t(v,E){var w=v.length;if(w>0){if(E.pts>=v[w-1].pts)v.push(E);else for(var x=w-1;x>=0;x--)if(E.pts<v[x].pts){v.splice(x,0,E);break}}else v.push(E)}function b(v){for(var E=v.byteLength,w=[],x=1;x<E-2;)v[x]===0&&v[x+1]===0&&v[x+2]===3?(w.push(x+2),x+=2):x++;if(w.length===0)return v;var _=E-w.length,p=new Uint8Array(_),u=0;for(x=0;x<_;u++,x++)u===w[0]&&(u++,w.shift()),p[x]=v[u];return p}W.default=r},"./src/errors.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"ErrorTypes",function(){return z}),M.d(W,"ErrorDetails",function(){return A});var z;(function(I){I.NETWORK_ERROR="networkError",I.MEDIA_ERROR="mediaError",I.KEY_SYSTEM_ERROR="keySystemError",I.MUX_ERROR="muxError",I.OTHER_ERROR="otherError"})(z||(z={}));var A;(function(I){I.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",I.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",I.KEY_SYSTEM_NO_SESSION="keySystemNoSession",I.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",I.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",I.MANIFEST_LOAD_ERROR="manifestLoadError",I.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",I.MANIFEST_PARSING_ERROR="manifestParsingError",I.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",I.LEVEL_EMPTY_ERROR="levelEmptyError",I.LEVEL_LOAD_ERROR="levelLoadError",I.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",I.LEVEL_SWITCH_ERROR="levelSwitchError",I.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",I.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",I.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",I.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",I.FRAG_LOAD_ERROR="fragLoadError",I.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",I.FRAG_DECRYPT_ERROR="fragDecryptError",I.FRAG_PARSING_ERROR="fragParsingError",I.REMUX_ALLOC_ERROR="remuxAllocError",I.KEY_LOAD_ERROR="keyLoadError",I.KEY_LOAD_TIMEOUT="keyLoadTimeOut",I.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",I.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",I.BUFFER_APPEND_ERROR="bufferAppendError",I.BUFFER_APPENDING_ERROR="bufferAppendingError",I.BUFFER_STALLED_ERROR="bufferStalledError",I.BUFFER_FULL_ERROR="bufferFullError",I.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",I.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",I.INTERNAL_EXCEPTION="internalException",I.INTERNAL_ABORTED="aborted",I.UNKNOWN="unknown"})(A||(A={}))},"./src/events.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"Events",function(){return z});var z;(function(A){A.MEDIA_ATTACHING="hlsMediaAttaching",A.MEDIA_ATTACHED="hlsMediaAttached",A.MEDIA_DETACHING="hlsMediaDetaching",A.MEDIA_DETACHED="hlsMediaDetached",A.BUFFER_RESET="hlsBufferReset",A.BUFFER_CODECS="hlsBufferCodecs",A.BUFFER_CREATED="hlsBufferCreated",A.BUFFER_APPENDING="hlsBufferAppending",A.BUFFER_APPENDED="hlsBufferAppended",A.BUFFER_EOS="hlsBufferEos",A.BUFFER_FLUSHING="hlsBufferFlushing",A.BUFFER_FLUSHED="hlsBufferFlushed",A.MANIFEST_LOADING="hlsManifestLoading",A.MANIFEST_LOADED="hlsManifestLoaded",A.MANIFEST_PARSED="hlsManifestParsed",A.LEVEL_SWITCHING="hlsLevelSwitching",A.LEVEL_SWITCHED="hlsLevelSwitched",A.LEVEL_LOADING="hlsLevelLoading",A.LEVEL_LOADED="hlsLevelLoaded",A.LEVEL_UPDATED="hlsLevelUpdated",A.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",A.LEVELS_UPDATED="hlsLevelsUpdated",A.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",A.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",A.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",A.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",A.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",A.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",A.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",A.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",A.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",A.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",A.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",A.CUES_PARSED="hlsCuesParsed",A.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",A.INIT_PTS_FOUND="hlsInitPtsFound",A.FRAG_LOADING="hlsFragLoading",A.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",A.FRAG_LOADED="hlsFragLoaded",A.FRAG_DECRYPTED="hlsFragDecrypted",A.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",A.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",A.FRAG_PARSING_METADATA="hlsFragParsingMetadata",A.FRAG_PARSED="hlsFragParsed",A.FRAG_BUFFERED="hlsFragBuffered",A.FRAG_CHANGED="hlsFragChanged",A.FPS_DROP="hlsFpsDrop",A.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",A.ERROR="hlsError",A.DESTROYING="hlsDestroying",A.KEY_LOADING="hlsKeyLoading",A.KEY_LOADED="hlsKeyLoaded",A.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",A.BACK_BUFFER_REACHED="hlsBackBufferReached"})(z||(z={}))},"./src/hls.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"default",function(){return v});var z=M("./node_modules/url-toolkit/src/url-toolkit.js"),A=M.n(z),I=M("./src/loader/playlist-loader.ts"),H=M("./src/loader/key-loader.ts"),P=M("./src/controller/id3-track-controller.ts"),e=M("./src/controller/latency-controller.ts"),C=M("./src/controller/level-controller.ts"),g=M("./src/controller/fragment-tracker.ts"),f=M("./src/controller/stream-controller.ts"),o=M("./src/is-supported.ts"),r=M("./src/utils/logger.ts"),a=M("./src/config.ts"),h=M("./node_modules/eventemitter3/index.js"),s=M.n(h),i=M("./src/events.ts"),n=M("./src/errors.ts");function t(E,w){for(var x=0;x<w.length;x++){var _=w[x];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(E,_.key,_)}}function b(E,w,x){return w&&t(E.prototype,w),x&&t(E,x),E}var v=function(){E.isSupported=function(){return Object(o.isSupported)()};function E(x){x===void 0&&(x={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new h.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var _=this.config=Object(a.mergeConfig)(E.DefaultConfig,x);this.userConfig=x,Object(r.enableLogs)(_.debug),this._autoLevelCapping=-1,_.progressive&&Object(a.enableStreamingMode)(_);var p=_.abrController,u=_.bufferController,l=_.capLevelController,m=_.fpsController,c=this.abrController=new p(this),T=this.bufferController=new u(this),N=this.capLevelController=new l(this),D=new m(this),y=new I.default(this),O=new H.default(this),k=new P.default(this),R=this.levelController=new C.default(this),B=new g.FragmentTracker(this),V=this.streamController=new f.default(this,B);N.setStreamController(V),D.setStreamController(V);var ee=[R,V];this.networkControllers=ee;var re=[y,O,c,T,N,D,k,B];this.audioTrackController=this.createController(_.audioTrackController,null,ee),this.createController(_.audioStreamController,B,ee),this.subtitleTrackController=this.createController(_.subtitleTrackController,null,ee),this.createController(_.subtitleStreamController,B,ee),this.createController(_.timelineController,null,re),this.emeController=this.createController(_.emeController,null,re),this.cmcdController=this.createController(_.cmcdController,null,re),this.latencyController=this.createController(e.default,null,re),this.coreComponents=re}var w=E.prototype;return w.createController=function(_,p,u){if(_){var l=p?new _(this,p):new _(this);return u&&u.push(l),l}return null},w.on=function(_,p,u){u===void 0&&(u=this),this._emitter.on(_,p,u)},w.once=function(_,p,u){u===void 0&&(u=this),this._emitter.once(_,p,u)},w.removeAllListeners=function(_){this._emitter.removeAllListeners(_)},w.off=function(_,p,u,l){u===void 0&&(u=this),this._emitter.off(_,p,u,l)},w.listeners=function(_){return this._emitter.listeners(_)},w.emit=function(_,p,u){return this._emitter.emit(_,p,u)},w.trigger=function(_,p){if(this.config.debug)return this.emit(_,_,p);try{return this.emit(_,_,p)}catch(u){r.logger.error("An internal error happened while handling event "+_+'. Error message: "'+u.message+'". Here is a stacktrace:',u),this.trigger(i.Events.ERROR,{type:n.ErrorTypes.OTHER_ERROR,details:n.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:_,error:u})}return!1},w.listenerCount=function(_){return this._emitter.listenerCount(_)},w.destroy=function(){r.logger.log("destroy"),this.trigger(i.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(_){return _.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(_){return _.destroy()}),this.coreComponents.length=0},w.attachMedia=function(_){r.logger.log("attachMedia"),this._media=_,this.trigger(i.Events.MEDIA_ATTACHING,{media:_})},w.detachMedia=function(){r.logger.log("detachMedia"),this.trigger(i.Events.MEDIA_DETACHING,void 0),this._media=null},w.loadSource=function(_){this.stopLoad();var p=this.media,u=this.url,l=this.url=z.buildAbsoluteURL(self.location.href,_,{alwaysNormalize:!0});r.logger.log("loadSource:"+l),p&&u&&u!==l&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(p)),this.trigger(i.Events.MANIFEST_LOADING,{url:_})},w.startLoad=function(_){_===void 0&&(_=-1),r.logger.log("startLoad("+_+")"),this.networkControllers.forEach(function(p){p.startLoad(_)})},w.stopLoad=function(){r.logger.log("stopLoad"),this.networkControllers.forEach(function(_){_.stopLoad()})},w.swapAudioCodec=function(){r.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},w.recoverMediaError=function(){r.logger.log("recoverMediaError");var _=this._media;this.detachMedia(),_&&this.attachMedia(_)},w.removeLevel=function(_,p){p===void 0&&(p=0),this.levelController.removeLevel(_,p)},b(E,[{key:"levels",get:function(){var _=this.levelController.levels;return _||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(_){r.logger.log("set currentLevel:"+_),this.loadLevel=_,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(_){r.logger.log("set nextLevel:"+_),this.levelController.manualLevel=_,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(_){r.logger.log("set loadLevel:"+_),this.levelController.manualLevel=_}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(_){this.levelController.nextLoadLevel=_}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(_){r.logger.log("set firstLevel:"+_),this.levelController.firstLevel=_}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(_){r.logger.log("set startLevel:"+_),_!==-1&&(_=Math.max(_,this.minAutoLevel)),this.levelController.startLevel=_}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(_){var p=!!_;p!==this.config.capLevelToPlayerSize&&(p?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=p)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(_){this._autoLevelCapping!==_&&(r.logger.log("set autoLevelCapping:"+_),this._autoLevelCapping=_)}},{key:"bandwidthEstimate",get:function(){var _=this.abrController.bwEstimator;return _?_.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var _=this.levels,p=this.config.minAutoBitrate;if(!_)return 0;for(var u=_.length,l=0;l<u;l++)if(_[l].maxBitrate>p)return l;return 0}},{key:"maxAutoLevel",get:function(){var _=this.levels,p=this.autoLevelCapping,u;return p===-1&&_&&_.length?u=_.length-1:u=p,u}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(_){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,_)}},{key:"audioTracks",get:function(){var _=this.audioTrackController;return _?_.audioTracks:[]}},{key:"audioTrack",get:function(){var _=this.audioTrackController;return _?_.audioTrack:-1},set:function(_){var p=this.audioTrackController;p&&(p.audioTrack=_)}},{key:"subtitleTracks",get:function(){var _=this.subtitleTrackController;return _?_.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var _=this.subtitleTrackController;return _?_.subtitleTrack:-1},set:function(_){var p=this.subtitleTrackController;p&&(p.subtitleTrack=_)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var _=this.subtitleTrackController;return _?_.subtitleDisplay:!1},set:function(_){var p=this.subtitleTrackController;p&&(p.subtitleDisplay=_)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(_){this.config.lowLatencyMode=_}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return i.Events}},{key:"ErrorTypes",get:function(){return n.ErrorTypes}},{key:"ErrorDetails",get:function(){return n.ErrorDetails}},{key:"DefaultConfig",get:function(){return E.defaultConfig?E.defaultConfig:a.hlsDefaultConfig},set:function(_){E.defaultConfig=_}}]),E}();v.defaultConfig=void 0},"./src/is-supported.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"isSupported",function(){return I}),M.d(W,"changeTypeSupported",function(){return H});var z=M("./src/utils/mediasource-helper.ts");function A(){return self.SourceBuffer||self.WebKitSourceBuffer}function I(){var P=Object(z.getMediaSource)();if(!P)return!1;var e=A(),C=P&&typeof P.isTypeSupported=="function"&&P.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),g=!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function";return!!C&&!!g}function H(){var P,e=A();return typeof(e==null||((P=e.prototype)===null||P===void 0)?void 0:P.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"default",function(){return r}),M.d(W,"LoadError",function(){return h});var z=M("./src/polyfills/number.ts"),A=M("./src/errors.ts");function I(s,i){s.prototype=Object.create(i.prototype),s.prototype.constructor=s,g(s,i)}function H(s){var i=typeof Map=="function"?new Map:void 0;return H=function(t){if(t===null||!C(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof i!="undefined"){if(i.has(t))return i.get(t);i.set(t,b)}function b(){return P(t,arguments,f(this).constructor)}return b.prototype=Object.create(t.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),g(b,t)},H(s)}function P(s,i,n){return e()?P=Reflect.construct:P=function(b,v,E){var w=[null];w.push.apply(w,v);var x=Function.bind.apply(b,w),_=new x;return E&&g(_,E.prototype),_},P.apply(null,arguments)}function e(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(s){return!1}}function C(s){return Function.toString.call(s).indexOf("[native code]")!==-1}function g(s,i){return g=Object.setPrototypeOf||function(t,b){return t.__proto__=b,t},g(s,i)}function f(s){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},f(s)}var o=Math.pow(2,17),r=function(){function s(n){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=n}var i=s.prototype;return i.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},i.abort=function(){this.loader&&this.loader.abort()},i.load=function(t,b){var v=this,E=t.url;if(!E)return Promise.reject(new h({type:A.ErrorTypes.NETWORK_ERROR,details:A.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(E?"part list":"url")));this.abort();var w=this.config,x=w.fLoader,_=w.loader;return new Promise(function(p,u){v.loader&&v.loader.destroy();var l=v.loader=t.loader=x?new x(w):new _(w),m=a(t),c={timeout:w.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:w.fragLoadingMaxRetryTimeout,highWaterMark:o};t.stats=l.stats,l.load(m,c,{onSuccess:function(N,D,y,O){v.resetLoader(t,l),p({frag:t,part:null,payload:N.data,networkDetails:O})},onError:function(N,D,y){v.resetLoader(t,l),u(new h({type:A.ErrorTypes.NETWORK_ERROR,details:A.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:N,networkDetails:y}))},onAbort:function(N,D,y){v.resetLoader(t,l),u(new h({type:A.ErrorTypes.NETWORK_ERROR,details:A.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:y}))},onTimeout:function(N,D,y){v.resetLoader(t,l),u(new h({type:A.ErrorTypes.NETWORK_ERROR,details:A.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:y}))},onProgress:function(N,D,y,O){b&&b({frag:t,part:null,payload:y,networkDetails:O})}})})},i.loadPart=function(t,b,v){var E=this;this.abort();var w=this.config,x=w.fLoader,_=w.loader;return new Promise(function(p,u){E.loader&&E.loader.destroy();var l=E.loader=t.loader=x?new x(w):new _(w),m=a(t,b),c={timeout:w.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:w.fragLoadingMaxRetryTimeout,highWaterMark:o};b.stats=l.stats,l.load(m,c,{onSuccess:function(N,D,y,O){E.resetLoader(t,l),E.updateStatsFromPart(t,b);var k={frag:t,part:b,payload:N.data,networkDetails:O};v(k),p(k)},onError:function(N,D,y){E.resetLoader(t,l),u(new h({type:A.ErrorTypes.NETWORK_ERROR,details:A.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:b,response:N,networkDetails:y}))},onAbort:function(N,D,y){t.stats.aborted=b.stats.aborted,E.resetLoader(t,l),u(new h({type:A.ErrorTypes.NETWORK_ERROR,details:A.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:b,networkDetails:y}))},onTimeout:function(N,D,y){E.resetLoader(t,l),u(new h({type:A.ErrorTypes.NETWORK_ERROR,details:A.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:b,networkDetails:y}))}})})},i.updateStatsFromPart=function(t,b){var v=t.stats,E=b.stats,w=E.total;if(v.loaded+=E.loaded,w){var x=Math.round(t.duration/b.duration),_=Math.min(Math.round(v.loaded/w),x),p=x-_,u=p*Math.round(v.loaded/_);v.total=v.loaded+u}else v.total=Math.max(v.loaded,v.total);var l=v.loading,m=E.loading;l.start?l.first+=m.first-m.start:(l.start=m.start,l.first=m.first),l.end=m.end},i.resetLoader=function(t,b){t.loader=null,this.loader===b&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),b.destroy()},s}();function a(s,i){i===void 0&&(i=null);var n=i||s,t={frag:s,part:i,responseType:"arraybuffer",url:n.url,headers:{},rangeStart:0,rangeEnd:0},b=n.byteRangeStartOffset,v=n.byteRangeEndOffset;return Object(z.isFiniteNumber)(b)&&Object(z.isFiniteNumber)(v)&&(t.rangeStart=b,t.rangeEnd=v),t}var h=function(s){I(i,s);function i(n){for(var t,b=arguments.length,v=new Array(b>1?b-1:0),E=1;E<b;E++)v[E-1]=arguments[E];return t=s.call.apply(s,[this].concat(v))||this,t.data=void 0,t.data=n,t}return i}(H(Error))},"./src/loader/fragment.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"ElementaryStreamTypes",function(){return r}),M.d(W,"BaseSegment",function(){return a}),M.d(W,"Fragment",function(){return h}),M.d(W,"Part",function(){return s});var z=M("./src/polyfills/number.ts"),A=M("./node_modules/url-toolkit/src/url-toolkit.js"),I=M.n(A),H=M("./src/utils/logger.ts"),P=M("./src/loader/level-key.ts"),e=M("./src/loader/load-stats.ts");function C(i,n){i.prototype=Object.create(n.prototype),i.prototype.constructor=i,g(i,n)}function g(i,n){return g=Object.setPrototypeOf||function(b,v){return b.__proto__=v,b},g(i,n)}function f(i,n){for(var t=0;t<n.length;t++){var b=n[t];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(i,b.key,b)}}function o(i,n,t){return n&&f(i.prototype,n),t&&f(i,t),i}var r;(function(i){i.AUDIO="audio",i.VIDEO="video",i.AUDIOVIDEO="audiovideo"})(r||(r={}));var a=function(){function i(t){var b;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(b={},b[r.AUDIO]=null,b[r.VIDEO]=null,b[r.AUDIOVIDEO]=null,b),this.baseurl=t}var n=i.prototype;return n.setByteRange=function(b,v){var E=b.split("@",2),w=[];E.length===1?w[0]=v?v.byteRangeEndOffset:0:w[0]=parseInt(E[1]),w[1]=parseInt(E[0])+w[0],this._byteRange=w},o(i,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(A.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(b){this._url=b}}]),i}(),h=function(i){C(n,i);function n(b,v){var E;return E=i.call(this,v)||this,E._decryptdata=null,E.rawProgramDateTime=null,E.programDateTime=null,E.tagList=[],E.duration=0,E.sn=0,E.levelkey=void 0,E.type=void 0,E.loader=null,E.level=-1,E.cc=0,E.startPTS=void 0,E.endPTS=void 0,E.appendedPTS=void 0,E.startDTS=void 0,E.endDTS=void 0,E.start=0,E.deltaPTS=void 0,E.maxStartPTS=void 0,E.minEndPTS=void 0,E.stats=new e.LoadStats,E.urlId=0,E.data=void 0,E.bitrateTest=!1,E.title=null,E.initSegment=null,E.type=b,E}var t=n.prototype;return t.createInitializationVector=function(v){for(var E=new Uint8Array(16),w=12;w<16;w++)E[w]=v>>8*(15-w)&255;return E},t.setDecryptDataFromLevelKey=function(v,E){var w=v;return(v==null?void 0:v.method)==="AES-128"&&v.uri&&!v.iv&&(w=P.LevelKey.fromURI(v.uri),w.method=v.method,w.iv=this.createInitializationVector(E),w.keyFormat="identity"),w},t.setElementaryStreamInfo=function(v,E,w,x,_,p){p===void 0&&(p=!1);var u=this.elementaryStreams,l=u[v];if(!l){u[v]={startPTS:E,endPTS:w,startDTS:x,endDTS:_,partial:p};return}l.startPTS=Math.min(l.startPTS,E),l.endPTS=Math.max(l.endPTS,w),l.startDTS=Math.min(l.startDTS,x),l.endDTS=Math.max(l.endDTS,_)},t.clearElementaryStreamInfo=function(){var v=this.elementaryStreams;v[r.AUDIO]=null,v[r.VIDEO]=null,v[r.AUDIOVIDEO]=null},o(n,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var v=this.sn;typeof v!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&H.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),v=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,v)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(z.isFiniteNumber)(this.programDateTime))return null;var v=Object(z.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+v*1e3}},{key:"encrypted",get:function(){var v;return!!((v=this.decryptdata)!==null&&v!==void 0&&v.keyFormat&&this.decryptdata.uri)}}]),n}(a),s=function(i){C(n,i);function n(t,b,v,E,w){var x;x=i.call(this,v)||this,x.fragOffset=0,x.duration=0,x.gap=!1,x.independent=!1,x.relurl=void 0,x.fragment=void 0,x.index=void 0,x.stats=new e.LoadStats,x.duration=t.decimalFloatingPoint("DURATION"),x.gap=t.bool("GAP"),x.independent=t.bool("INDEPENDENT"),x.relurl=t.enumeratedString("URI"),x.fragment=b,x.index=E;var _=t.enumeratedString("BYTERANGE");return _&&x.setByteRange(_,w),w&&(x.fragOffset=w.fragOffset+w.duration),x}return o(n,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var b=this.elementaryStreams;return!!(b.audio||b.video||b.audiovideo)}}]),n}(a)},"./src/loader/key-loader.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"default",function(){return H});var z=M("./src/events.ts"),A=M("./src/errors.ts"),I=M("./src/utils/logger.ts"),H=function(){function P(C){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=C,this._registerListeners()}var e=P.prototype;return e._registerListeners=function(){this.hls.on(z.Events.KEY_LOADING,this.onKeyLoading,this)},e._unregisterListeners=function(){this.hls.off(z.Events.KEY_LOADING,this.onKeyLoading)},e.destroy=function(){this._unregisterListeners();for(var g in this.loaders){var f=this.loaders[g];f&&f.destroy()}this.loaders={}},e.onKeyLoading=function(g,f){var o=f.frag,r=o.type,a=this.loaders[r];if(!o.decryptdata){I.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var h=o.decryptdata.uri;if(h!==this.decrypturl||this.decryptkey===null){var s=this.hls.config;if(a&&(I.logger.warn("abort previous key loader for type:"+r),a.abort()),!h){I.logger.warn("key uri is falsy");return}var i=s.loader,n=o.loader=this.loaders[r]=new i(s);this.decrypturl=h,this.decryptkey=null;var t={url:h,frag:o,responseType:"arraybuffer"},b={timeout:s.fragLoadingTimeOut,maxRetry:0,retryDelay:s.fragLoadingRetryDelay,maxRetryDelay:s.fragLoadingMaxRetryTimeout,highWaterMark:0},v={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};n.load(t,b,v)}else this.decryptkey&&(o.decryptdata.key=this.decryptkey,this.hls.trigger(z.Events.KEY_LOADED,{frag:o}))},e.loadsuccess=function(g,f,o){var r=o.frag;if(!r.decryptdata){I.logger.error("after key load, decryptdata unset");return}this.decryptkey=r.decryptdata.key=new Uint8Array(g.data),r.loader=null,delete this.loaders[r.type],this.hls.trigger(z.Events.KEY_LOADED,{frag:r})},e.loaderror=function(g,f){var o=f.frag,r=o.loader;r&&r.abort(),delete this.loaders[o.type],this.hls.trigger(z.Events.ERROR,{type:A.ErrorTypes.NETWORK_ERROR,details:A.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:o,response:g})},e.loadtimeout=function(g,f){var o=f.frag,r=o.loader;r&&r.abort(),delete this.loaders[o.type],this.hls.trigger(z.Events.ERROR,{type:A.ErrorTypes.NETWORK_ERROR,details:A.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:o})},P}()},"./src/loader/level-details.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"LevelDetails",function(){return P});var z=M("./src/polyfills/number.ts");function A(e,C){for(var g=0;g<C.length;g++){var f=C[g];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(e,f.key,f)}}function I(e,C,g){return C&&A(e.prototype,C),g&&A(e,g),e}var H=10,P=function(){function e(g){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=g}var C=e.prototype;return C.reloaded=function(f){if(!f){this.advanced=!0,this.updated=!0;return}var o=this.lastPartSn-f.lastPartSn,r=this.lastPartIndex-f.lastPartIndex;this.updated=this.endSN!==f.endSN||!!r||!!o,this.advanced=this.endSN>f.endSN||o>0||o===0&&r>0,this.updated||this.advanced?this.misses=Math.floor(f.misses*.6):this.misses=f.misses+1,this.availabilityDelay=f.availabilityDelay},I(e,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(z.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||H}},{key:"drift",get:function(){var f=this.driftEndTime-this.driftStartTime;if(f>0){var o=this.driftEnd-this.driftStart;return o*1e3/f}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var f;return(f=this.partList)!==null&&f!==void 0&&f.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var f;return(f=this.fragments)!==null&&f!==void 0&&f.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 f;return(f=this.partList)!==null&&f!==void 0&&f.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var f;return(f=this.partList)!==null&&f!==void 0&&f.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),e}()},"./src/loader/level-key.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"LevelKey",function(){return P});var z=M("./node_modules/url-toolkit/src/url-toolkit.js"),A=M.n(z);function I(e,C){for(var g=0;g<C.length;g++){var f=C[g];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(e,f.key,f)}}function H(e,C,g){return C&&I(e.prototype,C),g&&I(e,g),e}var P=function(){e.fromURL=function(g,f){return new e(g,f)},e.fromURI=function(g){return new e(g)};function e(C,g){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,g?this._uri=Object(z.buildAbsoluteURL)(C,g,{alwaysNormalize:!0}):this._uri=C}return H(e,[{key:"uri",get:function(){return this._uri}}]),e}()},"./src/loader/load-stats.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"LoadStats",function(){return z});var z=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"default",function(){return n});var z=M("./src/polyfills/number.ts"),A=M("./node_modules/url-toolkit/src/url-toolkit.js"),I=M.n(A),H=M("./src/loader/fragment.ts"),P=M("./src/loader/level-details.ts"),e=M("./src/loader/level-key.ts"),C=M("./src/utils/attr-list.ts"),g=M("./src/utils/logger.ts"),f=M("./src/utils/codecs.ts"),o=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,r=/#EXT-X-MEDIA:(.*)/g,a=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),h=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),s=/\.(mp4|m4s|m4v|m4a)$/i;function i(w){var x,_;return s.test((x=(_=A.parseURL(w))===null||_===void 0?void 0:_.path)!=null?x:"")}var n=function(){function w(){}return w.findGroup=function(_,p){for(var u=0;u<_.length;u++){var l=_[u];if(l.id===p)return l}},w.convertAVC1ToAVCOTI=function(_){var p=_.split(".");if(p.length>2){var u=p.shift()+".";return u+=parseInt(p.shift()).toString(16),u+=("000"+parseInt(p.shift()).toString(16)).substr(-4),u}return _},w.resolve=function(_,p){return A.buildAbsoluteURL(p,_,{alwaysNormalize:!0})},w.parseMasterPlaylist=function(_,p){var u=[],l={},m=!1;o.lastIndex=0;for(var c;(c=o.exec(_))!=null;)if(c[1]){var T=new C.AttrList(c[1]),N={attrs:T,bitrate:T.decimalInteger("AVERAGE-BANDWIDTH")||T.decimalInteger("BANDWIDTH"),name:T.NAME,url:w.resolve(c[2],p)},D=T.decimalResolution("RESOLUTION");D&&(N.width=D.width,N.height=D.height),t((T.CODECS||"").split(/[ ,]+/).filter(function(O){return O}),N),N.videoCodec&&N.videoCodec.indexOf("avc1")!==-1&&(N.videoCodec=w.convertAVC1ToAVCOTI(N.videoCodec)),u.push(N)}else if(c[3]){var y=new C.AttrList(c[3]);y["DATA-ID"]&&(m=!0,l[y["DATA-ID"]]=y)}return{levels:u,sessionData:m?l:null}},w.parseMasterPlaylistMedia=function(_,p,u,l){l===void 0&&(l=[]);var m,c=[],T=0;for(r.lastIndex=0;(m=r.exec(_))!==null;){var N=new C.AttrList(m[1]);if(N.TYPE===u){var D={attrs:N,bitrate:0,id:T++,groupId:N["GROUP-ID"],instreamId:N["INSTREAM-ID"],name:N.NAME||N.LANGUAGE||"",type:u,default:N.bool("DEFAULT"),autoselect:N.bool("AUTOSELECT"),forced:N.bool("FORCED"),lang:N.LANGUAGE,url:N.URI?w.resolve(N.URI,p):""};if(l.length){var y=w.findGroup(l,D.groupId)||l[0];b(D,y,"audioCodec"),b(D,y,"textCodec")}c.push(D)}}return c},w.parseLevelPlaylist=function(_,p,u,l,m){var c=new P.LevelDetails(p),T=c.fragments,N=null,D=0,y=0,O=0,k=0,R=null,B=new H.Fragment(l,p),V,ee,re,_e=-1,se=!1;for(a.lastIndex=0,c.m3u8=_;(V=a.exec(_))!==null;){se&&(se=!1,B=new H.Fragment(l,p),B.start=O,B.sn=D,B.cc=k,B.level=u,N&&(B.initSegment=N,B.rawProgramDateTime=N.rawProgramDateTime));var ye=V[1];if(ye){B.duration=parseFloat(ye);var ve=(" "+V[2]).slice(1);B.title=ve||null,B.tagList.push(ve?["INF",ye,ve]:["INF",ye])}else if(V[3])Object(z.isFiniteNumber)(B.duration)&&(B.start=O,re&&(B.levelkey=re),B.sn=D,B.level=u,B.cc=k,B.urlId=m,T.push(B),B.relurl=(" "+V[3]).slice(1),E(B,R),R=B,O+=B.duration,D++,y=0,se=!0);else if(V[4]){var Ee=(" "+V[4]).slice(1);R?B.setByteRange(Ee,R):B.setByteRange(Ee)}else if(V[5])B.rawProgramDateTime=(" "+V[5]).slice(1),B.tagList.push(["PROGRAM-DATE-TIME",B.rawProgramDateTime]),_e===-1&&(_e=T.length);else{if(V=V[0].match(h),!V){g.logger.warn("No matches on slow regex match for level playlist!");continue}for(ee=1;ee<V.length&&!(typeof V[ee]!="undefined");ee++);var le=(" "+V[ee]).slice(1),F=(" "+V[ee+1]).slice(1),d=V[ee+2]?(" "+V[ee+2]).slice(1):"";switch(le){case"PLAYLIST-TYPE":c.type=F.toUpperCase();break;case"MEDIA-SEQUENCE":D=c.startSN=parseInt(F);break;case"SKIP":{var S=new C.AttrList(F),L=S.decimalInteger("SKIPPED-SEGMENTS");if(Object(z.isFiniteNumber)(L)){c.skippedSegments=L;for(var G=L;G--;)T.unshift(null);D+=L}var U=S.enumeratedString("RECENTLY-REMOVED-DATERANGES");U&&(c.recentlyRemovedDateranges=U.split(" "));break}case"TARGETDURATION":c.targetduration=parseFloat(F);break;case"VERSION":c.version=parseInt(F);break;case"EXTM3U":break;case"ENDLIST":c.live=!1;break;case"#":(F||d)&&B.tagList.push(d?[F,d]:[F]);break;case"DIS":k++;case"GAP":B.tagList.push([le]);break;case"BITRATE":B.tagList.push([le,F]);break;case"DISCONTINUITY-SEQ":k=parseInt(F);break;case"KEY":{var $,de=new C.AttrList(F),xe=de.enumeratedString("METHOD"),q=de.URI,ae=de.hexadecimalInteger("IV"),fe=de.enumeratedString("KEYFORMATVERSIONS"),pe=de.enumeratedString("KEYID"),Ce=($=de.enumeratedString("KEYFORMAT"))!=null?$:"identity",Me=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(Me.indexOf(Ce)>-1){g.logger.warn("Keyformat "+Ce+" is not supported from the manifest");continue}else if(Ce!=="identity")continue;xe&&(re=e.LevelKey.fromURL(p,q),q&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(xe)>=0&&(re.method=xe,re.keyFormat=Ce,pe&&(re.keyID=pe),fe&&(re.keyFormatVersions=fe),re.iv=ae));break}case"START":{var He=new C.AttrList(F),je=He.decimalFloatingPoint("TIME-OFFSET");Object(z.isFiniteNumber)(je)&&(c.startTimeOffset=je);break}case"MAP":{var Ye=new C.AttrList(F);B.relurl=Ye.URI,Ye.BYTERANGE&&B.setByteRange(Ye.BYTERANGE),B.level=u,B.sn="initSegment",re&&(B.levelkey=re),B.initSegment=null,N=B,se=!0;break}case"SERVER-CONTROL":{var Xe=new C.AttrList(F);c.canBlockReload=Xe.bool("CAN-BLOCK-RELOAD"),c.canSkipUntil=Xe.optionalFloat("CAN-SKIP-UNTIL",0),c.canSkipDateRanges=c.canSkipUntil>0&&Xe.bool("CAN-SKIP-DATERANGES"),c.partHoldBack=Xe.optionalFloat("PART-HOLD-BACK",0),c.holdBack=Xe.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var ze=new C.AttrList(F);c.partTarget=ze.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Fe=c.partList;Fe||(Fe=c.partList=[]);var et=y>0?Fe[Fe.length-1]:void 0,st=y++,te=new H.Part(new C.AttrList(F),B,p,st,et);Fe.push(te),B.duration+=te.duration;break}case"PRELOAD-HINT":{var Y=new C.AttrList(F);c.preloadHint=Y;break}case"RENDITION-REPORT":{var X=new C.AttrList(F);c.renditionReports=c.renditionReports||[],c.renditionReports.push(X);break}default:g.logger.warn("line parsed but not handled: "+V);break}}}R&&!R.relurl?(T.pop(),O-=R.duration,c.partList&&(c.fragmentHint=R)):c.partList&&(E(B,R),B.cc=k,c.fragmentHint=B);var Z=T.length,ne=T[0],J=T[Z-1];if(O+=c.skippedSegments*c.targetduration,O>0&&Z&&J){c.averagetargetduration=O/Z;var Q=J.sn;c.endSN=Q!=="initSegment"?Q:0,ne&&(c.startCC=ne.cc,ne.initSegment||c.fragments.every(function(ie){return ie.relurl&&i(ie.relurl)})&&(g.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),B=new H.Fragment(l,p),B.relurl=J.relurl,B.level=u,B.sn="initSegment",ne.initSegment=B,c.needSidxRanges=!0))}else c.endSN=0,c.startCC=0;return c.fragmentHint&&(O+=c.fragmentHint.duration),c.totalduration=O,c.endCC=k,_e>0&&v(T,_e),c},w}();function t(w,x){["video","audio","text"].forEach(function(_){var p=w.filter(function(l){return Object(f.isCodecType)(l,_)});if(p.length){var u=p.filter(function(l){return l.lastIndexOf("avc1",0)===0||l.lastIndexOf("mp4a",0)===0});x[_+"Codec"]=u.length>0?u[0]:p[0],w=w.filter(function(l){return p.indexOf(l)===-1})}}),x.unknownCodecs=w}function b(w,x,_){var p=x[_];p&&(w[_]=p)}function v(w,x){for(var _=w[x],p=x;p--;){var u=w[p];if(!u)return;u.programDateTime=_.programDateTime-u.duration*1e3,_=u}}function E(w,x){w.rawProgramDateTime?w.programDateTime=Date.parse(w.rawProgramDateTime):x!=null&&x.programDateTime&&(w.programDateTime=x.endProgramDateTime),Object(z.isFiniteNumber)(w.programDateTime)||(w.programDateTime=null,w.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(ce,W,M){"use strict";M.r(W);var z=M("./src/polyfills/number.ts"),A=M("./src/events.ts"),I=M("./src/errors.ts"),H=M("./src/utils/logger.ts"),P=M("./src/utils/mp4-tools.ts"),e=M("./src/loader/m3u8-parser.ts"),C=M("./src/types/loader.ts"),g=M("./src/utils/attr-list.ts");function f(a){var h=a.type;switch(h){case C.PlaylistContextType.AUDIO_TRACK:return C.PlaylistLevelType.AUDIO;case C.PlaylistContextType.SUBTITLE_TRACK:return C.PlaylistLevelType.SUBTITLE;default:return C.PlaylistLevelType.MAIN}}function o(a,h){var s=a.url;return(s===void 0||s.indexOf("data:")===0)&&(s=h.url),s}var r=function(){function a(s){this.hls=void 0,this.loaders=Object.create(null),this.hls=s,this.registerListeners()}var h=a.prototype;return h.registerListeners=function(){var i=this.hls;i.on(A.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.on(A.Events.LEVEL_LOADING,this.onLevelLoading,this),i.on(A.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),i.on(A.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},h.unregisterListeners=function(){var i=this.hls;i.off(A.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.off(A.Events.LEVEL_LOADING,this.onLevelLoading,this),i.off(A.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),i.off(A.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},h.createInternalLoader=function(i){var n=this.hls.config,t=n.pLoader,b=n.loader,v=t||b,E=new v(n);return i.loader=E,this.loaders[i.type]=E,E},h.getInternalLoader=function(i){return this.loaders[i.type]},h.resetInternalLoader=function(i){this.loaders[i]&&delete this.loaders[i]},h.destroyInternalLoaders=function(){for(var i in this.loaders){var n=this.loaders[i];n&&n.destroy(),this.resetInternalLoader(i)}},h.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},h.onManifestLoading=function(i,n){var t=n.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:C.PlaylistContextType.MANIFEST,url:t,deliveryDirectives:null})},h.onLevelLoading=function(i,n){var t=n.id,b=n.level,v=n.url,E=n.deliveryDirectives;this.load({id:t,groupId:null,level:b,responseType:"text",type:C.PlaylistContextType.LEVEL,url:v,deliveryDirectives:E})},h.onAudioTrackLoading=function(i,n){var t=n.id,b=n.groupId,v=n.url,E=n.deliveryDirectives;this.load({id:t,groupId:b,level:null,responseType:"text",type:C.PlaylistContextType.AUDIO_TRACK,url:v,deliveryDirectives:E})},h.onSubtitleTrackLoading=function(i,n){var t=n.id,b=n.groupId,v=n.url,E=n.deliveryDirectives;this.load({id:t,groupId:b,level:null,responseType:"text",type:C.PlaylistContextType.SUBTITLE_TRACK,url:v,deliveryDirectives:E})},h.load=function(i){var n,t=this.hls.config,b=this.getInternalLoader(i);if(b){var v=b.context;if(v&&v.url===i.url){H.logger.trace("[playlist-loader]: playlist request ongoing");return}H.logger.log("[playlist-loader]: aborting previous loader for type: "+i.type),b.abort()}var E,w,x,_;switch(i.type){case C.PlaylistContextType.MANIFEST:E=t.manifestLoadingMaxRetry,w=t.manifestLoadingTimeOut,x=t.manifestLoadingRetryDelay,_=t.manifestLoadingMaxRetryTimeout;break;case C.PlaylistContextType.LEVEL:case C.PlaylistContextType.AUDIO_TRACK:case C.PlaylistContextType.SUBTITLE_TRACK:E=0,w=t.levelLoadingTimeOut;break;default:E=t.levelLoadingMaxRetry,w=t.levelLoadingTimeOut,x=t.levelLoadingRetryDelay,_=t.levelLoadingMaxRetryTimeout;break}if(b=this.createInternalLoader(i),(n=i.deliveryDirectives)!==null&&n!==void 0&&n.part){var p;if(i.type===C.PlaylistContextType.LEVEL&&i.level!==null?p=this.hls.levels[i.level].details:i.type===C.PlaylistContextType.AUDIO_TRACK&&i.id!==null?p=this.hls.audioTracks[i.id].details:i.type===C.PlaylistContextType.SUBTITLE_TRACK&&i.id!==null&&(p=this.hls.subtitleTracks[i.id].details),p){var u=p.partTarget,l=p.targetduration;u&&l&&(w=Math.min(Math.max(u*3,l*.8)*1e3,w))}}var m={timeout:w,maxRetry:E,retryDelay:x,maxRetryDelay:_,highWaterMark:0},c={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};b.load(i,m,c)},h.loadsuccess=function(i,n,t,b){if(b===void 0&&(b=null),t.isSidxRequest){this.handleSidxRequest(i,t),this.handlePlaylistLoaded(i,n,t,b);return}this.resetInternalLoader(t.type);var v=i.data;if(v.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(i,t,"no EXTM3U delimiter",b);return}n.parsing.start=performance.now(),v.indexOf("#EXTINF:")>0||v.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(i,n,t,b):this.handleMasterPlaylist(i,n,t,b)},h.loaderror=function(i,n,t){t===void 0&&(t=null),this.handleNetworkError(n,t,!1,i)},h.loadtimeout=function(i,n,t){t===void 0&&(t=null),this.handleNetworkError(n,t,!0)},h.handleMasterPlaylist=function(i,n,t,b){var v=this.hls,E=i.data,w=o(i,t),x=e.default.parseMasterPlaylist(E,w),_=x.levels,p=x.sessionData;if(!_.length){this.handleManifestParsingError(i,t,"no level found in manifest",b);return}var u=_.map(function(D){return{id:D.attrs.AUDIO,audioCodec:D.audioCodec}}),l=_.map(function(D){return{id:D.attrs.SUBTITLES,textCodec:D.textCodec}}),m=e.default.parseMasterPlaylistMedia(E,w,"AUDIO",u),c=e.default.parseMasterPlaylistMedia(E,w,"SUBTITLES",l),T=e.default.parseMasterPlaylistMedia(E,w,"CLOSED-CAPTIONS");if(m.length){var N=m.some(function(D){return!D.url});!N&&_[0].audioCodec&&!_[0].attrs.AUDIO&&(H.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),m.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new g.AttrList({}),bitrate:0,url:""}))}v.trigger(A.Events.MANIFEST_LOADED,{levels:_,audioTracks:m,subtitles:c,captions:T,url:w,stats:n,networkDetails:b,sessionData:p})},h.handleTrackOrLevelPlaylist=function(i,n,t,b){var v=this.hls,E=t.id,w=t.level,x=t.type,_=o(i,t),p=Object(z.isFiniteNumber)(E)?E:0,u=Object(z.isFiniteNumber)(w)?w:p,l=f(t),m=e.default.parseLevelPlaylist(i.data,_,u,l,p);if(!m.fragments.length){v.trigger(A.Events.ERROR,{type:I.ErrorTypes.NETWORK_ERROR,details:I.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:_,reason:"no fragments found in level",level:typeof t.level=="number"?t.level:void 0});return}if(x===C.PlaylistContextType.MANIFEST){var c={attrs:new g.AttrList({}),bitrate:0,details:m,name:"",url:_};v.trigger(A.Events.MANIFEST_LOADED,{levels:[c],audioTracks:[],url:_,stats:n,networkDetails:b,sessionData:null})}if(n.parsing.end=performance.now(),m.needSidxRanges){var T,N=(T=m.fragments[0].initSegment)===null||T===void 0?void 0:T.url;this.load({url:N,isSidxRequest:!0,type:x,level:w,levelDetails:m,id:E,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}t.levelDetails=m,this.handlePlaylistLoaded(i,n,t,b)},h.handleSidxRequest=function(i,n){var t=Object(P.parseSegmentIndex)(new Uint8Array(i.data));if(!t)return;var b=t.references,v=n.levelDetails;b.forEach(function(E,w){var x=E.info,_=v.fragments[w];_.byteRange.length===0&&_.setByteRange(String(1+x.end-x.start)+"@"+String(x.start)),_.initSegment&&_.initSegment.setByteRange(String(t.moovEndOffset)+"@0")})},h.handleManifestParsingError=function(i,n,t,b){this.hls.trigger(A.Events.ERROR,{type:I.ErrorTypes.NETWORK_ERROR,details:I.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:n.type===C.PlaylistContextType.MANIFEST,url:i.url,reason:t,response:i,context:n,networkDetails:b})},h.handleNetworkError=function(i,n,t,b){t===void 0&&(t=!1),H.logger.warn("[playlist-loader]: A network "+(t?"timeout":"error")+" occurred while loading "+i.type+" level: "+i.level+" id: "+i.id+' group-id: "'+i.groupId+'"');var v=I.ErrorDetails.UNKNOWN,E=!1,w=this.getInternalLoader(i);switch(i.type){case C.PlaylistContextType.MANIFEST:v=t?I.ErrorDetails.MANIFEST_LOAD_TIMEOUT:I.ErrorDetails.MANIFEST_LOAD_ERROR,E=!0;break;case C.PlaylistContextType.LEVEL:v=t?I.ErrorDetails.LEVEL_LOAD_TIMEOUT:I.ErrorDetails.LEVEL_LOAD_ERROR,E=!1;break;case C.PlaylistContextType.AUDIO_TRACK:v=t?I.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:I.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,E=!1;break;case C.PlaylistContextType.SUBTITLE_TRACK:v=t?I.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:I.ErrorDetails.SUBTITLE_LOAD_ERROR,E=!1;break}w&&this.resetInternalLoader(i.type);var x={type:I.ErrorTypes.NETWORK_ERROR,details:v,fatal:E,url:i.url,loader:w,context:i,networkDetails:n};b&&(x.response=b),this.hls.trigger(A.Events.ERROR,x)},h.handlePlaylistLoaded=function(i,n,t,b){var v=t.type,E=t.level,w=t.id,x=t.groupId,_=t.loader,p=t.levelDetails,u=t.deliveryDirectives;if(!(p!=null&&p.targetduration)){this.handleManifestParsingError(i,t,"invalid target duration",b);return}if(!_)return;p.live&&(_.getCacheAge&&(p.ageHeader=_.getCacheAge()||0),(!_.getCacheAge||isNaN(p.ageHeader))&&(p.ageHeader=0));switch(v){case C.PlaylistContextType.MANIFEST:case C.PlaylistContextType.LEVEL:this.hls.trigger(A.Events.LEVEL_LOADED,{details:p,level:E||0,id:w||0,stats:n,networkDetails:b,deliveryDirectives:u});break;case C.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(A.Events.AUDIO_TRACK_LOADED,{details:p,id:w||0,groupId:x||"",stats:n,networkDetails:b,deliveryDirectives:u});break;case C.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(A.Events.SUBTITLE_TRACK_LOADED,{details:p,id:w||0,groupId:x||"",stats:n,networkDetails:b,deliveryDirectives:u});break}},a}();W.default=r},"./src/polyfills/number.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"isFiniteNumber",function(){return z}),M.d(W,"MAX_SAFE_INTEGER",function(){return A});var z=Number.isFinite||function(I){return typeof I=="number"&&isFinite(I)},A=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(ce,W,M){"use strict";M.r(W);var z=function(){function A(){}return A.getSilentFrame=function(H,P){switch(H){case"mp4a.40.2":if(P===1)return new Uint8Array([0,200,0,128,35,128]);if(P===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(P===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(P===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(P===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(P===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(P===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(P===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(P===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},A}();W.default=z},"./src/remux/mp4-generator.ts":function(ce,W,M){"use strict";M.r(W);var z=Math.pow(2,32)-1,A=function(){function I(){}return I.init=function(){I.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var P;for(P in I.types)I.types.hasOwnProperty(P)&&(I.types[P]=[P.charCodeAt(0),P.charCodeAt(1),P.charCodeAt(2),P.charCodeAt(3)]);var e=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),C=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);I.HDLR_TYPES={video:e,audio:C};var g=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),f=new Uint8Array([0,0,0,0,0,0,0,0]);I.STTS=I.STSC=I.STCO=f,I.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),I.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),I.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),I.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),r=new Uint8Array([97,118,99,49]),a=new Uint8Array([0,0,0,1]);I.FTYP=I.box(I.types.ftyp,o,a,o,r),I.DINF=I.box(I.types.dinf,I.box(I.types.dref,g))},I.box=function(P){for(var e=8,C=arguments.length,g=new Array(C>1?C-1:0),f=1;f<C;f++)g[f-1]=arguments[f];for(var o=g.length,r=o;o--;)e+=g[o].byteLength;var a=new Uint8Array(e);for(a[0]=e>>24&255,a[1]=e>>16&255,a[2]=e>>8&255,a[3]=e&255,a.set(P,4),o=0,e=8;o<r;o++)a.set(g[o],e),e+=g[o].byteLength;return a},I.hdlr=function(P){return I.box(I.types.hdlr,I.HDLR_TYPES[P])},I.mdat=function(P){return I.box(I.types.mdat,P)},I.mdhd=function(P,e){e*=P;var C=Math.floor(e/(z+1)),g=Math.floor(e%(z+1));return I.box(I.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,P>>24&255,P>>16&255,P>>8&255,P&255,C>>24,C>>16&255,C>>8&255,C&255,g>>24,g>>16&255,g>>8&255,g&255,85,196,0,0]))},I.mdia=function(P){return I.box(I.types.mdia,I.mdhd(P.timescale,P.duration),I.hdlr(P.type),I.minf(P))},I.mfhd=function(P){return I.box(I.types.mfhd,new Uint8Array([0,0,0,0,P>>24,P>>16&255,P>>8&255,P&255]))},I.minf=function(P){return P.type==="audio"?I.box(I.types.minf,I.box(I.types.smhd,I.SMHD),I.DINF,I.stbl(P)):I.box(I.types.minf,I.box(I.types.vmhd,I.VMHD),I.DINF,I.stbl(P))},I.moof=function(P,e,C){return I.box(I.types.moof,I.mfhd(P),I.traf(C,e))},I.moov=function(P){for(var e=P.length,C=[];e--;)C[e]=I.trak(P[e]);return I.box.apply(null,[I.types.moov,I.mvhd(P[0].timescale,P[0].duration)].concat(C).concat(I.mvex(P)))},I.mvex=function(P){for(var e=P.length,C=[];e--;)C[e]=I.trex(P[e]);return I.box.apply(null,[I.types.mvex].concat(C))},I.mvhd=function(P,e){e*=P;var C=Math.floor(e/(z+1)),g=Math.floor(e%(z+1)),f=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,P>>24&255,P>>16&255,P>>8&255,P&255,C>>24,C>>16&255,C>>8&255,C&255,g>>24,g>>16&255,g>>8&255,g&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return I.box(I.types.mvhd,f)},I.sdtp=function(P){var e=P.samples||[],C=new Uint8Array(4+e.length),g,f;for(g=0;g<e.length;g++)f=e[g].flags,C[g+4]=f.dependsOn<<4|f.isDependedOn<<2|f.hasRedundancy;return I.box(I.types.sdtp,C)},I.stbl=function(P){return I.box(I.types.stbl,I.stsd(P),I.box(I.types.stts,I.STTS),I.box(I.types.stsc,I.STSC),I.box(I.types.stsz,I.STSZ),I.box(I.types.stco,I.STCO))},I.avc1=function(P){var e=[],C=[],g,f,o;for(g=0;g<P.sps.length;g++)f=P.sps[g],o=f.byteLength,e.push(o>>>8&255),e.push(o&255),e=e.concat(Array.prototype.slice.call(f));for(g=0;g<P.pps.length;g++)f=P.pps[g],o=f.byteLength,C.push(o>>>8&255),C.push(o&255),C=C.concat(Array.prototype.slice.call(f));var r=I.box(I.types.avcC,new Uint8Array([1,e[3],e[4],e[5],252|3,224|P.sps.length].concat(e).concat([P.pps.length]).concat(C))),a=P.width,h=P.height,s=P.pixelRatio[0],i=P.pixelRatio[1];return I.box(I.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,a>>8&255,a&255,h>>8&255,h&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),r,I.box(I.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),I.box(I.types.pasp,new Uint8Array([s>>24,s>>16&255,s>>8&255,s&255,i>>24,i>>16&255,i>>8&255,i&255])))},I.esds=function(P){var e=P.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(P.config).concat([6,1,2]))},I.mp4a=function(P){var e=P.samplerate;return I.box(I.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,P.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]),I.box(I.types.esds,I.esds(P)))},I.mp3=function(P){var e=P.samplerate;return I.box(I.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,P.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]))},I.stsd=function(P){return P.type==="audio"?!P.isAAC&&P.codec==="mp3"?I.box(I.types.stsd,I.STSD,I.mp3(P)):I.box(I.types.stsd,I.STSD,I.mp4a(P)):I.box(I.types.stsd,I.STSD,I.avc1(P))},I.tkhd=function(P){var e=P.id,C=P.duration*P.timescale,g=P.width,f=P.height,o=Math.floor(C/(z+1)),r=Math.floor(C%(z+1));return I.box(I.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,0,0,0,0,o>>24,o>>16&255,o>>8&255,o&255,r>>24,r>>16&255,r>>8&255,r&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,g>>8&255,g&255,0,0,f>>8&255,f&255,0,0]))},I.traf=function(P,e){var C=I.sdtp(P),g=P.id,f=Math.floor(e/(z+1)),o=Math.floor(e%(z+1));return I.box(I.types.traf,I.box(I.types.tfhd,new Uint8Array([0,0,0,0,g>>24,g>>16&255,g>>8&255,g&255])),I.box(I.types.tfdt,new Uint8Array([1,0,0,0,f>>24,f>>16&255,f>>8&255,f&255,o>>24,o>>16&255,o>>8&255,o&255])),I.trun(P,C.length+16+20+8+16+8+8),C)},I.trak=function(P){return P.duration=P.duration||4294967295,I.box(I.types.trak,I.tkhd(P),I.mdia(P))},I.trex=function(P){var e=P.id;return I.box(I.types.trex,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,e&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},I.trun=function(P,e){var C=P.samples||[],g=C.length,f=12+16*g,o=new Uint8Array(f),r,a,h,s,i,n;for(e+=8+f,o.set([0,0,15,1,g>>>24&255,g>>>16&255,g>>>8&255,g&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255],0),r=0;r<g;r++)a=C[r],h=a.duration,s=a.size,i=a.flags,n=a.cts,o.set([h>>>24&255,h>>>16&255,h>>>8&255,h&255,s>>>24&255,s>>>16&255,s>>>8&255,s&255,i.isLeading<<2|i.dependsOn,i.isDependedOn<<6|i.hasRedundancy<<4|i.paddingValue<<1|i.isNonSync,i.degradPrio&240<<8,i.degradPrio&15,n>>>24&255,n>>>16&255,n>>>8&255,n&255],12+16*r);return I.box(I.types.trun,o)},I.initSegment=function(P){I.types||I.init();var e=I.moov(P),C=new Uint8Array(I.FTYP.byteLength+e.byteLength);return C.set(I.FTYP),C.set(e,I.FTYP.byteLength),C},I}();A.types=void 0,A.HDLR_TYPES=void 0,A.STTS=void 0,A.STSC=void 0,A.STCO=void 0,A.STSZ=void 0,A.VMHD=void 0,A.SMHD=void 0,A.STSD=void 0,A.FTYP=void 0,A.DINF=void 0,W.default=A},"./src/remux/mp4-remuxer.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"default",function(){return n}),M.d(W,"normalizePts",function(){return t});var z=M("./src/polyfills/number.ts"),A=M("./src/remux/aac-helper.ts"),I=M("./src/remux/mp4-generator.ts"),H=M("./src/events.ts"),P=M("./src/errors.ts"),e=M("./src/utils/logger.ts"),C=M("./src/types/loader.ts"),g=M("./src/utils/timescale-conversion.ts");function f(){return f=Object.assign||function(w){for(var x=1;x<arguments.length;x++){var _=arguments[x];for(var p in _)Object.prototype.hasOwnProperty.call(_,p)&&(w[p]=_[p])}return w},f.apply(this,arguments)}var o=10*1e3,r=1024,a=1152,h=null,s=null,i=!1,n=function(){function w(_,p,u,l){if(l===void 0&&(l=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=_,this.config=p,this.typeSupported=u,this.ISGenerated=!1,h===null){var m=navigator.userAgent||"",c=m.match(/Chrome\/(\d+)/i);h=c?parseInt(c[1]):0}if(s===null){var T=navigator.userAgent.match(/Safari\/(\d+)/i);s=T?parseInt(T[1]):0}i=!!h&&h<75||!!s&&s<600}var x=w.prototype;return x.destroy=function(){},x.resetTimeStamp=function(p){e.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=p},x.resetNextTimestamp=function(){e.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},x.resetInitSegment=function(){e.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},x.getVideoStartPts=function(p){var u=!1,l=p.reduce(function(m,c){var T=c.pts-m;return T<-4294967296?(u=!0,t(m,c.pts)):T>0?m:c.pts},p[0].pts);return u&&e.logger.debug("PTS rollover detected"),l},x.remux=function(p,u,l,m,c,T,N,D){var y,O,k,R,B,V,ee=c,re=c,_e=p.pid>-1,se=u.pid>-1,ye=u.samples.length,ve=p.samples.length>0,Ee=ye>1,le=(!_e||ve)&&(!se||Ee)||this.ISGenerated||N;if(le){this.ISGenerated||(k=this.generateIS(p,u,c));var F=this.isVideoContiguous,d=-1;if(Ee&&(d=b(u.samples),!F&&this.config.forceKeyFrameOnDiscontinuity))if(V=!0,d>0){e.logger.warn("[mp4-remuxer]: Dropped "+d+" out of "+ye+" video samples due to a missing keyframe");var S=this.getVideoStartPts(u.samples);u.samples=u.samples.slice(d),u.dropped+=d,re+=(u.samples[0].pts-S)/(u.timescale||9e4)}else d===-1&&(e.logger.warn("[mp4-remuxer]: No keyframe found out of "+ye+" video samples"),V=!1);if(this.ISGenerated){if(ve&&Ee){var L=this.getVideoStartPts(u.samples),G=t(p.samples[0].pts,L)-L,U=G/u.inputTimeScale;ee+=Math.max(0,U),re+=Math.max(0,-U)}if(ve){if(p.samplerate||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),k=this.generateIS(p,u,c)),O=this.remuxAudio(p,ee,this.isAudioContiguous,T,se||Ee||D===C.PlaylistLevelType.AUDIO?re:void 0),Ee){var $=O?O.endPTS-O.startPTS:0;u.inputTimeScale||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),k=this.generateIS(p,u,c)),y=this.remuxVideo(u,re,F,$)}}else Ee&&(y=this.remuxVideo(u,re,F,0));y&&(y.firstKeyFrame=d,y.independent=d!==-1)}}return this.ISGenerated&&(l.samples.length&&(B=this.remuxID3(l,c)),m.samples.length&&(R=this.remuxText(m,c))),{audio:O,video:y,initSegment:k,independent:V,text:R,id3:B}},x.generateIS=function(p,u,l){var m=p.samples,c=u.samples,T=this.typeSupported,N={},D=!Object(z.isFiniteNumber)(this._initPTS),y="audio/mp4",O,k,R;if(D&&(O=k=Infinity),p.config&&m.length&&(p.timescale=p.samplerate,p.isAAC||(T.mpeg?(y="audio/mpeg",p.codec=""):T.mp3&&(p.codec="mp3")),N.audio={id:"audio",container:y,codec:p.codec,initSegment:!p.isAAC&&T.mpeg?new Uint8Array(0):I.default.initSegment([p]),metadata:{channelCount:p.channelCount}},D&&(R=p.inputTimeScale,O=k=m[0].pts-Math.round(R*l))),u.sps&&u.pps&&c.length&&(u.timescale=u.inputTimeScale,N.video={id:"main",container:"video/mp4",codec:u.codec,initSegment:I.default.initSegment([u]),metadata:{width:u.width,height:u.height}},D)){R=u.inputTimeScale;var B=this.getVideoStartPts(c),V=Math.round(R*l);k=Math.min(k,t(c[0].dts,B)-V),O=Math.min(O,B-V)}if(Object.keys(N).length)return this.ISGenerated=!0,D&&(this._initPTS=O,this._initDTS=k),{tracks:N,initPTS:O,timescale:R}},x.remuxVideo=function(p,u,l,m){var c=p.inputTimeScale,T=p.samples,N=[],D=T.length,y=this._initPTS,O=this.nextAvcDts,k=8,R,B,V,ee=Number.POSITIVE_INFINITY,re=Number.NEGATIVE_INFINITY,_e=0,se=!1;if(!l||O===null){var ye=u*c,ve=T[0].pts-t(T[0].dts,T[0].pts);O=ye-ve}for(var Ee=0;Ee<D;Ee++){var le=T[Ee];if(le.pts=t(le.pts-y,O),le.dts=t(le.dts-y,O),le.dts>le.pts){var F=9e4*.2;_e=Math.max(Math.min(_e,le.pts-le.dts),-1*F)}le.dts<T[Ee>0?Ee-1:Ee].dts&&(se=!0)}se&&T.sort(function(Rt,vt){var ut=Rt.dts-vt.dts,Ht=Rt.pts-vt.pts;return ut||Ht}),B=T[0].dts,V=T[T.length-1].dts;var d=Math.round((V-B)/(D-1));if(_e<0){if(_e<d*-2){e.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(g.toMsFromMpegTsClock)(-d,!0)+" ms");for(var S=_e,L=0;L<D;L++)T[L].dts=S=Math.max(S,T[L].pts-d),T[L].pts=Math.max(S,T[L].pts)}else{e.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(g.toMsFromMpegTsClock)(_e,!0)+" ms to overcome this issue");for(var G=0;G<D;G++)T[G].dts=T[G].dts+_e}B=T[0].dts}if(l){var U=B-O,$=U>d,de=U<-1;if($||de){$?e.logger.warn("AVC: "+Object(g.toMsFromMpegTsClock)(U,!0)+" ms ("+U+"dts) hole between fragments detected, filling it"):e.logger.warn("AVC: "+Object(g.toMsFromMpegTsClock)(-U,!0)+" ms ("+U+"dts) overlapping between fragments detected"),B=O;var xe=T[0].pts-U;T[0].dts=B,T[0].pts=xe,e.logger.log("Video: First PTS/DTS adjusted: "+Object(g.toMsFromMpegTsClock)(xe,!0)+"/"+Object(g.toMsFromMpegTsClock)(B,!0)+", delta: "+Object(g.toMsFromMpegTsClock)(U,!0)+" ms")}}i&&(B=Math.max(0,B));for(var q=0,ae=0,fe=0;fe<D;fe++){for(var pe=T[fe],Ce=pe.units,Me=Ce.length,He=0,je=0;je<Me;je++)He+=Ce[je].data.length;ae+=He,q+=Me,pe.length=He,pe.dts=Math.max(pe.dts,B),pe.pts=Math.max(pe.pts,pe.dts,0),ee=Math.min(pe.pts,ee),re=Math.max(pe.pts,re)}V=T[D-1].dts;var Ye=ae+4*q+8,Xe;try{Xe=new Uint8Array(Ye)}catch(Rt){this.observer.emit(H.Events.ERROR,H.Events.ERROR,{type:P.ErrorTypes.MUX_ERROR,details:P.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Ye,reason:"fail allocating video mdat "+Ye});return}var ze=new DataView(Xe.buffer);ze.setUint32(0,Ye),Xe.set(I.default.types.mdat,4);for(var Fe=0;Fe<D;Fe++){for(var et=T[Fe],st=et.units,te=0,Y=0,X=st.length;Y<X;Y++){var Z=st[Y],ne=Z.data,J=Z.data.byteLength;ze.setUint32(k,J),k+=4,Xe.set(ne,k),k+=J,te+=4+J}if(Fe<D-1)R=T[Fe+1].dts-et.dts;else{var Q=this.config,ie=et.dts-T[Fe>0?Fe-1:Fe].dts;if(Q.stretchShortVideoTrack&&this.nextAudioPts!==null){var oe=Math.floor(Q.maxBufferHole*c),be=(m?ee+m*c:this.nextAudioPts)-et.pts;be>oe?(R=be-ie,R<0&&(R=ie),e.logger.log("[mp4-remuxer]: It is approximately "+be/90+" ms to the next segment; using duration "+R/90+" ms for the last video frame.")):R=ie}else R=ie}var Te=Math.round(et.pts-et.dts);N.push(new v(et.key,R,te,Te))}if(N.length&&h&&h<70){var Ie=N[0].flags;Ie.dependsOn=2,Ie.isNonSync=0}console.assert(R!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=O=V+R,this.isVideoContiguous=!0;var Je=I.default.moof(p.sequenceNumber++,B,f({},p,{samples:N})),ht="video",lt={data1:Je,data2:Xe,startPTS:ee/c,endPTS:(re+R)/c,startDTS:B/c,endDTS:O/c,type:ht,hasAudio:!1,hasVideo:!0,nb:N.length,dropped:p.dropped};return p.samples=[],p.dropped=0,console.assert(Xe.length,"MDAT length must not be zero"),lt},x.remuxAudio=function(p,u,l,m,c){var T=p.inputTimeScale,N=p.samplerate?p.samplerate:T,D=T/N,y=p.isAAC?r:a,O=y*D,k=this._initPTS,R=!p.isAAC&&this.typeSupported.mpeg,B=[],V=p.samples,ee=R?0:8,re=this.nextAudioPts||-1,_e=u*T;if(this.isAudioContiguous=l=l||V.length&&re>0&&(m&&Math.abs(_e-re)<9e3||Math.abs(t(V[0].pts-k,_e)-re)<20*O),V.forEach(function(ne){ne.pts=t(ne.pts-k,_e)}),!l||re<0){if(V=V.filter(function(ne){return ne.pts>=0}),!V.length)return;c===0?re=0:m?re=Math.max(0,_e):re=V[0].pts}if(p.isAAC)for(var se=c!==void 0,ye=this.config.maxAudioFramesDrift,ve=0,Ee=re;ve<V.length;ve++){var le=V[ve],F=le.pts,d=F-Ee,S=Math.abs(1e3*d/T);if(d<=-ye*O&&se)ve===0&&(e.logger.warn("Audio frame @ "+(F/T).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*d/T)+" ms."),this.nextAudioPts=re=Ee=F);else if(d>=ye*O&&S<o&&se){var L=Math.round(d/O);Ee=F-L*O,Ee<0&&(L--,Ee+=O),ve===0&&(this.nextAudioPts=re=Ee),e.logger.warn("[mp4-remuxer]: Injecting "+L+" audio frame @ "+(Ee/T).toFixed(3)+"s due to "+Math.round(1e3*d/T)+" ms gap.");for(var G=0;G<L;G++){var U=Math.max(Ee,0),$=A.default.getSilentFrame(p.manifestCodec||p.codec,p.channelCount);$||(e.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),$=le.unit.subarray()),V.splice(ve,0,{unit:$,pts:U}),Ee+=O,ve++}}le.pts=Ee,Ee+=O}for(var de=null,xe=null,q,ae=0,fe=V.length;fe--;)ae+=V[fe].unit.byteLength;for(var pe=0,Ce=V.length;pe<Ce;pe++){var Me=V[pe],He=Me.unit,je=Me.pts;if(xe!==null){var Ye=B[pe-1];Ye.duration=Math.round((je-xe)/D)}else if(l&&p.isAAC&&(je=re),de=je,ae>0){ae+=ee;try{q=new Uint8Array(ae)}catch(ne){this.observer.emit(H.Events.ERROR,H.Events.ERROR,{type:P.ErrorTypes.MUX_ERROR,details:P.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ae,reason:"fail allocating audio mdat "+ae});return}if(!R){var Xe=new DataView(q.buffer);Xe.setUint32(0,ae),q.set(I.default.types.mdat,4)}}else return;q.set(He,ee);var ze=He.byteLength;ee+=ze,B.push(new v(!0,y,ze,0)),xe=je}var Fe=B.length;if(!Fe)return;var et=B[B.length-1];this.nextAudioPts=re=xe+D*et.duration;var st=R?new Uint8Array(0):I.default.moof(p.sequenceNumber++,de/D,f({},p,{samples:B}));p.samples=[];var te=de/T,Y=re/T,X="audio",Z={data1:st,data2:q,startPTS:te,endPTS:Y,startDTS:te,endDTS:Y,type:X,hasAudio:!0,hasVideo:!1,nb:Fe};return this.isAudioContiguous=!0,console.assert(q.length,"MDAT length must not be zero"),Z},x.remuxEmptyAudio=function(p,u,l,m){var c=p.inputTimeScale,T=p.samplerate?p.samplerate:c,N=c/T,D=this.nextAudioPts,y=(D!==null?D:m.startDTS*c)+this._initDTS,O=m.endDTS*c+this._initDTS,k=N*r,R=Math.ceil((O-y)/k),B=A.default.getSilentFrame(p.manifestCodec||p.codec,p.channelCount);if(e.logger.warn("[mp4-remuxer]: remux empty Audio"),!B){e.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var V=[],ee=0;ee<R;ee++){var re=y+ee*k;V.push({unit:B,pts:re,dts:re})}return p.samples=V,this.remuxAudio(p,u,l,!1)},x.remuxID3=function(p,u){var l=p.samples.length;if(!l)return;for(var m=p.inputTimeScale,c=this._initPTS,T=this._initDTS,N=0;N<l;N++){var D=p.samples[N];D.pts=t(D.pts-c,u*m)/m,D.dts=t(D.dts-T,u*m)/m}var y=p.samples;return p.samples=[],{samples:y}},x.remuxText=function(p,u){var l=p.samples.length;if(!l)return;for(var m=p.inputTimeScale,c=this._initPTS,T=0;T<l;T++){var N=p.samples[T];N.pts=t(N.pts-c,u*m)/m}p.samples.sort(function(y,O){return y.pts-O.pts});var D=p.samples;return p.samples=[],{samples:D}},w}();function t(w,x){var _;if(x===null)return w;for(x<w?_=-8589934592:_=8589934592;Math.abs(w-x)>4294967296;)w+=_;return w}function b(w){for(var x=0;x<w.length;x++)if(w[x].key)return x;return-1}var v=function(x,_,p,u){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=_,this.size=p,this.cts=u,this.flags=new E(x)},E=function(x){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=x?2:1,this.isNonSync=x?0:1}},"./src/remux/passthrough-remuxer.ts":function(ce,W,M){"use strict";M.r(W);var z=M("./src/polyfills/number.ts"),A=M("./src/utils/mp4-tools.ts"),I=M("./src/loader/fragment.ts"),H=M("./src/utils/logger.ts"),P=function(){function g(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var f=g.prototype;return f.destroy=function(){},f.resetTimeStamp=function(r){this.initPTS=r,this.lastEndDTS=null},f.resetNextTimestamp=function(){this.lastEndDTS=null},f.resetInitSegment=function(r,a,h){this.audioCodec=a,this.videoCodec=h,this.generateInitSegment(r),this.emitInitSegment=!0},f.generateInitSegment=function(r){var a=this.audioCodec,h=this.videoCodec;if(!r||!r.byteLength){this.initTracks=void 0,this.initData=void 0;return}var s=this.initData=Object(A.parseInitSegment)(r);a||(a=C(s.audio,I.ElementaryStreamTypes.AUDIO)),h||(h=C(s.video,I.ElementaryStreamTypes.VIDEO));var i={};s.audio&&s.video?i.audiovideo={container:"video/mp4",codec:a+","+h,initSegment:r,id:"main"}:s.audio?i.audio={container:"audio/mp4",codec:a,initSegment:r,id:"audio"}:s.video?i.video={container:"video/mp4",codec:h,initSegment:r,id:"main"}:H.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=i},f.remux=function(r,a,h,s,i){var n=this.initPTS,t=this.lastEndDTS,b={audio:void 0,video:void 0,text:s,id3:h,initSegment:void 0};Object(z.isFiniteNumber)(t)||(t=this.lastEndDTS=i||0);var v=a.samples;if(!v||!v.length)return b;var E={initPTS:void 0,timescale:1},w=this.initData;if((!w||!w.length)&&(this.generateInitSegment(v),w=this.initData),!w||!w.length)return H.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),b;this.emitInitSegment&&(E.tracks=this.initTracks,this.emitInitSegment=!1),Object(z.isFiniteNumber)(n)||(this.initPTS=E.initPTS=n=e(w,v,t));var x=Object(A.getDuration)(v,w),_=t,p=x+_;Object(A.offsetStartDTS)(w,v,n),x>0?this.lastEndDTS=p:(H.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var u=!!w.audio,l=!!w.video,m="";u&&(m+="audio"),l&&(m+="video");var c={data1:v,startPTS:_,startDTS:_,endPTS:p,endDTS:p,type:m,hasAudio:u,hasVideo:l,nb:1,dropped:0};return b.audio=c.type==="audio"?c:void 0,b.video=c.type!=="audio"?c:void 0,b.text=s,b.id3=h,b.initSegment=E,b},g}(),e=function(f,o,r){return Object(A.getStartDTS)(f,o)-r};function C(g,f){var o=g==null?void 0:g.codec;return o&&o.length>4?o:o==="hvc1"?"hvc1.1.c.L120.90":o==="av01"?"av01.0.04M.08":o==="avc1"||f===I.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}W.default=P},"./src/task-loop.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"default",function(){return z});var z=function(){function A(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var I=A.prototype;return I.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},I.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},I.onHandlerDestroyed=function(){},I.hasInterval=function(){return!!this._tickInterval},I.hasNextTick=function(){return!!this._tickTimer},I.setInterval=function(P){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,P),!0)},I.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},I.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},I.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},I.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},I.doTick=function(){},A}()},"./src/types/cmcd.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"CMCDVersion",function(){return z}),M.d(W,"CMCDObjectType",function(){return A}),M.d(W,"CMCDStreamingFormat",function(){return I}),M.d(W,"CMCDStreamType",function(){return H});var z=1,A;(function(P){P.MANIFEST="m",P.AUDIO="a",P.VIDEO="v",P.MUXED="av",P.INIT="i",P.CAPTION="c",P.TIMED_TEXT="tt",P.KEY="k",P.OTHER="o"})(A||(A={}));var I;(function(P){P.DASH="d",P.HLS="h",P.SMOOTH="s",P.OTHER="o"})(I||(I={}));var H;(function(P){P.VOD="v",P.LIVE="l"})(H||(H={}))},"./src/types/level.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"HlsSkip",function(){return I}),M.d(W,"getSkipValue",function(){return H}),M.d(W,"HlsUrlParameters",function(){return P}),M.d(W,"Level",function(){return e});function z(C,g){for(var f=0;f<g.length;f++){var o=g[f];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(C,o.key,o)}}function A(C,g,f){return g&&z(C.prototype,g),f&&z(C,f),C}var I;(function(C){C.No="",C.Yes="YES",C.v2="v2"})(I||(I={}));function H(C,g){var f=C.canSkipUntil,o=C.canSkipDateRanges,r=C.endSN,a=g!==void 0?g-r:0;return f&&a<f?o?I.v2:I.Yes:I.No}var P=function(){function C(f,o,r){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=f,this.part=o,this.skip=r}var g=C.prototype;return g.addDirectives=function(o){var r=new self.URL(o);return this.msn!==void 0&&r.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&r.searchParams.set("_HLS_part",this.part.toString()),this.skip&&r.searchParams.set("_HLS_skip",this.skip),r.toString()},C}(),e=function(){function C(g){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[g.url],this.attrs=g.attrs,this.bitrate=g.bitrate,g.details&&(this.details=g.details),this.id=g.id||0,this.name=g.name,this.width=g.width||0,this.height=g.height||0,this.audioCodec=g.audioCodec,this.videoCodec=g.videoCodec,this.unknownCodecs=g.unknownCodecs,this.codecSet=[g.videoCodec,g.audioCodec].filter(function(f){return f}).join(",").replace(/\.[^.,]+/g,"")}return A(C,[{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(f){var o=f%this.url.length;this._urlId!==o&&(this.details=void 0,this._urlId=o)}}]),C}()},"./src/types/loader.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"PlaylistContextType",function(){return z}),M.d(W,"PlaylistLevelType",function(){return A});var z;(function(I){I.MANIFEST="manifest",I.LEVEL="level",I.AUDIO_TRACK="audioTrack",I.SUBTITLE_TRACK="subtitleTrack"})(z||(z={}));var A;(function(I){I.MAIN="main",I.AUDIO="audio",I.SUBTITLE="subtitle"})(A||(A={}))},"./src/types/transmuxer.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"ChunkMetadata",function(){return z});var z=function(H,P,e,C,g,f){C===void 0&&(C=0),g===void 0&&(g=-1),f===void 0&&(f=!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=A(),this.buffering={audio:A(),video:A(),audiovideo:A()},this.level=H,this.sn=P,this.id=e,this.size=C,this.part=g,this.partial=f};function A(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"AttrList",function(){return I});var z=/^(\d+)x(\d+)$/,A=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,I=function(){function H(e){typeof e=="string"&&(e=H.parseAttrList(e));for(var C in e)e.hasOwnProperty(C)&&(this[C]=e[C])}var P=H.prototype;return P.decimalInteger=function(C){var g=parseInt(this[C],10);return g>Number.MAX_SAFE_INTEGER?Infinity:g},P.hexadecimalInteger=function(C){if(this[C]){var g=(this[C]||"0x").slice(2);g=(g.length&1?"0":"")+g;for(var f=new Uint8Array(g.length/2),o=0;o<g.length/2;o++)f[o]=parseInt(g.slice(o*2,o*2+2),16);return f}else return null},P.hexadecimalIntegerAsNumber=function(C){var g=parseInt(this[C],16);return g>Number.MAX_SAFE_INTEGER?Infinity:g},P.decimalFloatingPoint=function(C){return parseFloat(this[C])},P.optionalFloat=function(C,g){var f=this[C];return f?parseFloat(f):g},P.enumeratedString=function(C){return this[C]},P.bool=function(C){return this[C]==="YES"},P.decimalResolution=function(C){var g=z.exec(this[C]);return g===null?void 0:{width:parseInt(g[1],10),height:parseInt(g[2],10)}},H.parseAttrList=function(C){var g,f={},o='"';for(A.lastIndex=0;(g=A.exec(C))!==null;){var r=g[2];r.indexOf(o)===0&&r.lastIndexOf(o)===r.length-1&&(r=r.slice(1,-1)),f[g[1]]=r}return f},H}()},"./src/utils/binary-search.ts":function(ce,W,M){"use strict";M.r(W);var z={search:function(I,H){for(var P=0,e=I.length-1,C=null,g=null;P<=e;){C=(P+e)/2|0,g=I[C];var f=H(g);if(f>0)P=C+1;else if(f<0)e=C-1;else return g}return null}};W.default=z},"./src/utils/buffer-helper.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"BufferHelper",function(){return I});var z=M("./src/utils/logger.ts"),A={length:0,start:function(){return 0},end:function(){return 0}},I=function(){function H(){}return H.isBuffered=function(e,C){try{if(e){for(var g=H.getBuffered(e),f=0;f<g.length;f++)if(C>=g.start(f)&&C<=g.end(f))return!0}}catch(o){}return!1},H.bufferInfo=function(e,C,g){try{if(e){var f=H.getBuffered(e),o=[],r;for(r=0;r<f.length;r++)o.push({start:f.start(r),end:f.end(r)});return this.bufferedInfo(o,C,g)}}catch(a){}return{len:0,start:C,end:C,nextStart:void 0}},H.bufferedInfo=function(e,C,g){C=Math.max(0,C),e.sort(function(E,w){var x=E.start-w.start;return x||w.end-E.end});var f=[];if(g)for(var o=0;o<e.length;o++){var r=f.length;if(r){var a=f[r-1].end;e[o].start-a<g?e[o].end>a&&(f[r-1].end=e[o].end):f.push(e[o])}else f.push(e[o])}else f=e;for(var h=0,s,i=C,n=C,t=0;t<f.length;t++){var b=f[t].start,v=f[t].end;if(C+g>=b&&C<v)i=b,n=v,h=n-C;else if(C+g<b){s=b;break}}return{len:h,start:i||0,end:n||0,nextStart:s}},H.getBuffered=function(e){try{return e.buffered}catch(C){return z.logger.log("failed to get media.buffered",C),A}},H}()},"./src/utils/cea-608-parser.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"Row",function(){return n}),M.d(W,"CaptionScreen",function(){return t});var z=M("./src/utils/logger.ts"),A={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},I=function(p){var u=p;return A.hasOwnProperty(p)&&(u=A[p]),String.fromCharCode(u)},H=15,P=100,e={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},C={17:2,18:4,21:6,22:8,23:10,19:13,20:15},g={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},f={25:2,26:4,29:6,30:8,31:10,27:13,28:15},o=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],r;(function(_){_[_.ERROR=0]="ERROR",_[_.TEXT=1]="TEXT",_[_.WARNING=2]="WARNING",_[_.INFO=2]="INFO",_[_.DEBUG=3]="DEBUG",_[_.DATA=3]="DATA"})(r||(r={}));var a=function(){function _(){this.time=null,this.verboseLevel=r.ERROR}var p=_.prototype;return p.log=function(l,m){this.verboseLevel>=l&&z.logger.log(this.time+" ["+l+"] "+m)},_}(),h=function(p){for(var u=[],l=0;l<p.length;l++)u.push(p[l].toString(16));return u},s=function(){function _(u,l,m,c,T){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=u||"white",this.underline=l||!1,this.italics=m||!1,this.background=c||"black",this.flash=T||!1}var p=_.prototype;return p.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},p.setStyles=function(l){for(var m=["foreground","underline","italics","background","flash"],c=0;c<m.length;c++){var T=m[c];l.hasOwnProperty(T)&&(this[T]=l[T])}},p.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},p.equals=function(l){return this.foreground===l.foreground&&this.underline===l.underline&&this.italics===l.italics&&this.background===l.background&&this.flash===l.flash},p.copy=function(l){this.foreground=l.foreground,this.underline=l.underline,this.italics=l.italics,this.background=l.background,this.flash=l.flash},p.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},_}(),i=function(){function _(u,l,m,c,T,N){this.uchar=void 0,this.penState=void 0,this.uchar=u||" ",this.penState=new s(l,m,c,T,N)}var p=_.prototype;return p.reset=function(){this.uchar=" ",this.penState.reset()},p.setChar=function(l,m){this.uchar=l,this.penState.copy(m)},p.setPenState=function(l){this.penState.copy(l)},p.equals=function(l){return this.uchar===l.uchar&&this.penState.equals(l.penState)},p.copy=function(l){this.uchar=l.uchar,this.penState.copy(l.penState)},p.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},_}(),n=function(){function _(u){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var l=0;l<P;l++)this.chars.push(new i);this.logger=u,this.pos=0,this.currPenState=new s}var p=_.prototype;return p.equals=function(l){for(var m=!0,c=0;c<P;c++)if(!this.chars[c].equals(l.chars[c])){m=!1;break}return m},p.copy=function(l){for(var m=0;m<P;m++)this.chars[m].copy(l.chars[m])},p.isEmpty=function(){for(var l=!0,m=0;m<P;m++)if(!this.chars[m].isEmpty()){l=!1;break}return l},p.setCursor=function(l){this.pos!==l&&(this.pos=l),this.pos<0?(this.logger.log(r.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>P&&(this.logger.log(r.DEBUG,"Too large cursor position "+this.pos),this.pos=P)},p.moveCursor=function(l){var m=this.pos+l;if(l>1)for(var c=this.pos+1;c<m+1;c++)this.chars[c].setPenState(this.currPenState);this.setCursor(m)},p.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},p.insertChar=function(l){l>=144&&this.backSpace();var m=I(l);if(this.pos>=P){this.logger.log(r.ERROR,"Cannot insert "+l.toString(16)+" ("+m+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(m,this.currPenState),this.moveCursor(1)},p.clearFromPos=function(l){var m;for(m=l;m<P;m++)this.chars[m].reset()},p.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},p.clearToEndOfRow=function(){this.clearFromPos(this.pos)},p.getTextString=function(){for(var l=[],m=!0,c=0;c<P;c++){var T=this.chars[c].uchar;T!==" "&&(m=!1),l.push(T)}return m?"":l.join("")},p.setPenStyles=function(l){this.currPenState.setStyles(l);var m=this.chars[this.pos];m.setPenState(this.currPenState)},_}(),t=function(){function _(u){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var l=0;l<H;l++)this.rows.push(new n(u));this.logger=u,this.currRow=H-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var p=_.prototype;return p.reset=function(){for(var l=0;l<H;l++)this.rows[l].clear();this.currRow=H-1},p.equals=function(l){for(var m=!0,c=0;c<H;c++)if(!this.rows[c].equals(l.rows[c])){m=!1;break}return m},p.copy=function(l){for(var m=0;m<H;m++)this.rows[m].copy(l.rows[m])},p.isEmpty=function(){for(var l=!0,m=0;m<H;m++)if(!this.rows[m].isEmpty()){l=!1;break}return l},p.backSpace=function(){var l=this.rows[this.currRow];l.backSpace()},p.clearToEndOfRow=function(){var l=this.rows[this.currRow];l.clearToEndOfRow()},p.insertChar=function(l){var m=this.rows[this.currRow];m.insertChar(l)},p.setPen=function(l){var m=this.rows[this.currRow];m.setPenStyles(l)},p.moveCursor=function(l){var m=this.rows[this.currRow];m.moveCursor(l)},p.setCursor=function(l){this.logger.log(r.INFO,"setCursor: "+l);var m=this.rows[this.currRow];m.setCursor(l)},p.setPAC=function(l){this.logger.log(r.INFO,"pacData = "+JSON.stringify(l));var m=l.row-1;if(this.nrRollUpRows&&m<this.nrRollUpRows-1&&(m=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==m){for(var c=0;c<H;c++)this.rows[c].clear();var T=this.currRow+1-this.nrRollUpRows,N=this.lastOutputScreen;if(N){var D=N.rows[T].cueStartTime,y=this.logger.time;if(D&&y!==null&&D<y)for(var O=0;O<this.nrRollUpRows;O++)this.rows[m-this.nrRollUpRows+O+1].copy(N.rows[T+O])}}this.currRow=m;var k=this.rows[this.currRow];if(l.indent!==null){var R=l.indent,B=Math.max(R-1,0);k.setCursor(l.indent),l.color=k.chars[B].penState.foreground}var V={foreground:l.color,underline:l.underline,italics:l.italics,background:"black",flash:!1};this.setPen(V)},p.setBkgData=function(l){this.logger.log(r.INFO,"bkgData = "+JSON.stringify(l)),this.backSpace(),this.setPen(l),this.insertChar(32)},p.setRollUpRows=function(l){this.nrRollUpRows=l},p.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(r.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(r.TEXT,this.getDisplayText());var l=this.currRow+1-this.nrRollUpRows,m=this.rows.splice(l,1)[0];m.clear(),this.rows.splice(this.currRow,0,m),this.logger.log(r.INFO,"Rolling up")},p.getDisplayText=function(l){l=l||!1;for(var m=[],c="",T=-1,N=0;N<H;N++){var D=this.rows[N].getTextString();D&&(T=N+1,l?m.push("Row "+T+": '"+D+"'"):m.push(D.trim()))}return m.length>0&&(l?c="["+m.join(" | ")+"]":c=m.join(`
|
|
`)),c},p.getTextAndFormat=function(){return this.rows},_}(),b=function(){function _(u,l,m){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=u,this.outputFilter=l,this.mode=null,this.verbose=0,this.displayedMemory=new t(m),this.nonDisplayedMemory=new t(m),this.lastOutputScreen=new t(m),this.currRollUpRow=this.displayedMemory.rows[H-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=m}var p=_.prototype;return p.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[H-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},p.getHandler=function(){return this.outputFilter},p.setHandler=function(l){this.outputFilter=l},p.setPAC=function(l){this.writeScreen.setPAC(l)},p.setBkgData=function(l){this.writeScreen.setBkgData(l)},p.setMode=function(l){if(l===this.mode)return;this.mode=l,this.logger.log(r.INFO,"MODE="+l),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=l},p.insertChars=function(l){for(var m=0;m<l.length;m++)this.writeScreen.insertChar(l[m]);var c=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(r.INFO,c+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(r.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},p.ccRCL=function(){this.logger.log(r.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},p.ccBS=function(){if(this.logger.log(r.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},p.ccAOF=function(){},p.ccAON=function(){},p.ccDER=function(){this.logger.log(r.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},p.ccRU=function(l){this.logger.log(r.INFO,"RU("+l+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(l)},p.ccFON=function(){this.logger.log(r.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},p.ccRDC=function(){this.logger.log(r.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},p.ccTR=function(){this.logger.log(r.INFO,"TR"),this.setMode("MODE_TEXT")},p.ccRTD=function(){this.logger.log(r.INFO,"RTD"),this.setMode("MODE_TEXT")},p.ccEDM=function(){this.logger.log(r.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},p.ccCR=function(){this.logger.log(r.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},p.ccENM=function(){this.logger.log(r.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},p.ccEOC=function(){if(this.logger.log(r.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var l=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=l,this.writeScreen=this.nonDisplayedMemory,this.logger.log(r.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},p.ccTO=function(l){this.logger.log(r.INFO,"TO("+l+") - Tab Offset"),this.writeScreen.moveCursor(l)},p.ccMIDROW=function(l){var m={flash:!1};if(m.underline=l%2===1,m.italics=l>=46,m.italics)m.foreground="white";else{var c=Math.floor(l/2)-16,T=["white","green","blue","cyan","red","yellow","magenta"];m.foreground=T[c]}this.logger.log(r.INFO,"MIDROW: "+JSON.stringify(m)),this.writeScreen.setPen(m)},p.outputDataUpdate=function(l){l===void 0&&(l=!1);var m=this.logger.time;if(m===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=m:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,m,this.lastOutputScreen),l&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:m),this.lastOutputScreen.copy(this.displayedMemory))},p.cueSplitAtTime=function(l){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,l,this.displayedMemory),this.cueStartTime=l))},_}(),v=function(){function _(u,l,m){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var c=new a;this.channels=[null,new b(u,l,c),new b(u+1,m,c)],this.cmdHistory=x(),this.logger=c}var p=_.prototype;return p.getHandler=function(l){return this.channels[l].getHandler()},p.setHandler=function(l,m){this.channels[l].setHandler(m)},p.addData=function(l,m){var c,T,N,D=!1;this.logger.time=l;for(var y=0;y<m.length;y+=2){if(T=m[y]&127,N=m[y+1]&127,T===0&&N===0)continue;if(this.logger.log(r.DATA,"["+h([m[y],m[y+1]])+"] -> ("+h([T,N])+")"),c=this.parseCmd(T,N),c||(c=this.parseMidrow(T,N)),c||(c=this.parsePAC(T,N)),c||(c=this.parseBackgroundAttributes(T,N)),!c&&(D=this.parseChars(T,N),D)){var O=this.currentChannel;if(O&&O>0){var k=this.channels[O];k.insertChars(D)}else this.logger.log(r.WARNING,"No channel found yet. TEXT-MODE?")}!c&&!D&&this.logger.log(r.WARNING,"Couldn't parse cleaned data "+h([T,N])+" orig: "+h([m[y],m[y+1]]))}},p.parseCmd=function(l,m){var c=this.cmdHistory,T=(l===20||l===28||l===21||l===29)&&m>=32&&m<=47,N=(l===23||l===31)&&m>=33&&m<=35;if(!(T||N))return!1;if(w(l,m,c))return E(null,null,c),this.logger.log(r.DEBUG,"Repeated command ("+h([l,m])+") is dropped"),!0;var D=l===20||l===21||l===23?1:2,y=this.channels[D];return l===20||l===21||l===28||l===29?m===32?y.ccRCL():m===33?y.ccBS():m===34?y.ccAOF():m===35?y.ccAON():m===36?y.ccDER():m===37?y.ccRU(2):m===38?y.ccRU(3):m===39?y.ccRU(4):m===40?y.ccFON():m===41?y.ccRDC():m===42?y.ccTR():m===43?y.ccRTD():m===44?y.ccEDM():m===45?y.ccCR():m===46?y.ccENM():m===47&&y.ccEOC():y.ccTO(m-32),E(l,m,c),this.currentChannel=D,!0},p.parseMidrow=function(l,m){var c=0;if((l===17||l===25)&&m>=32&&m<=47){if(l===17?c=1:c=2,c!==this.currentChannel)return this.logger.log(r.ERROR,"Mismatch channel in midrow parsing"),!1;var T=this.channels[c];return T?(T.ccMIDROW(m),this.logger.log(r.DEBUG,"MIDROW ("+h([l,m])+")"),!0):!1}return!1},p.parsePAC=function(l,m){var c,T=this.cmdHistory,N=(l>=17&&l<=23||l>=25&&l<=31)&&m>=64&&m<=127,D=(l===16||l===24)&&m>=64&&m<=95;if(!(N||D))return!1;if(w(l,m,T))return E(null,null,T),!0;var y=l<=23?1:2;m>=64&&m<=95?c=y===1?e[l]:g[l]:c=y===1?C[l]:f[l];var O=this.channels[y];return O?(O.setPAC(this.interpretPAC(c,m)),E(l,m,T),this.currentChannel=y,!0):!1},p.interpretPAC=function(l,m){var c,T={color:null,italics:!1,indent:null,underline:!1,row:l};return m>95?c=m-96:c=m-64,T.underline=(c&1)===1,c<=13?T.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(c/2)]:c<=15?(T.italics=!0,T.color="white"):T.indent=Math.floor((c-16)/2)*4,T},p.parseChars=function(l,m){var c,T=null,N=null;if(l>=25?(c=2,N=l-8):(c=1,N=l),N>=17&&N<=19){var D;N===17?D=m+80:N===18?D=m+112:D=m+144,this.logger.log(r.INFO,"Special char '"+I(D)+"' in channel "+c),T=[D]}else l>=32&&l<=127&&(T=m===0?[l]:[l,m]);if(T){var y=h(T);this.logger.log(r.DEBUG,"Char codes = "+y.join(",")),E(l,m,this.cmdHistory)}return T},p.parseBackgroundAttributes=function(l,m){var c=(l===16||l===24)&&m>=32&&m<=47,T=(l===23||l===31)&&m>=45&&m<=47;if(!(c||T))return!1;var N,D={};l===16||l===24?(N=Math.floor((m-32)/2),D.background=o[N],m%2===1&&(D.background=D.background+"_semi")):m===45?D.background="transparent":(D.foreground="black",m===47&&(D.underline=!0));var y=l<=23?1:2,O=this.channels[y];return O.setBkgData(D),E(l,m,this.cmdHistory),!0},p.reset=function(){for(var l=0;l<Object.keys(this.channels).length;l++){var m=this.channels[l];m&&m.reset()}this.cmdHistory=x()},p.cueSplitAtTime=function(l){for(var m=0;m<this.channels.length;m++){var c=this.channels[m];c&&c.cueSplitAtTime(l)}},_}();function E(_,p,u){u.a=_,u.b=p}function w(_,p,u){return u.a===_&&u.b===p}function x(){return{a:null,b:null}}W.default=v},"./src/utils/codecs.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"isCodecType",function(){return A}),M.d(W,"isCodecSupportedInMp4",function(){return I});var z={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function A(H,P){var e=z[P];return!!e&&e[H.slice(0,4)]===!0}function I(H,P){return MediaSource.isTypeSupported((P||"video")+'/mp4;codecs="'+H+'"')}},"./src/utils/cues.ts":function(ce,W,M){"use strict";M.r(W);var z=M("./src/utils/vttparser.ts"),A=M("./src/utils/webvtt-parser.ts"),I=M("./src/utils/texttrack-utils.ts"),H=/\s/,P={newCue:function(C,g,f,o){for(var r=[],a,h,s,i,n,t=self.VTTCue||self.TextTrackCue,b=0;b<o.rows.length;b++)if(a=o.rows[b],s=!0,i=0,n="",!a.isEmpty()){for(var v=0;v<a.chars.length;v++)H.test(a.chars[v].uchar)&&s?i++:(n+=a.chars[v].uchar,s=!1);a.cueStartTime=g,g===f&&(f+=1e-4),i>=16?i--:i++;var E=Object(z.fixLineBreaks)(n.trim()),w=Object(A.generateCueId)(g,f,E);(!C||!C.cues||!C.cues.getCueById(w))&&(h=new t(g,f,E),h.id=w,h.line=b+1,h.align="left",h.position=10+Math.min(80,Math.floor(i*8/32)*10),r.push(h))}return C&&r.length&&(r.sort(function(x,_){return x.line==="auto"||_.line==="auto"?0:x.line>8&&_.line>8?_.line-x.line:x.line-_.line}),r.forEach(function(x){return Object(I.addCueToTrack)(C,x)})),r}};W.default=P},"./src/utils/discontinuities.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"findFirstFragWithCC",function(){return H}),M.d(W,"shouldAlignOnDiscontinuities",function(){return P}),M.d(W,"findDiscontinuousReferenceFrag",function(){return e}),M.d(W,"adjustSlidingStart",function(){return g}),M.d(W,"alignStream",function(){return f}),M.d(W,"alignPDT",function(){return r}),M.d(W,"alignFragmentByPDTDelta",function(){return a}),M.d(W,"alignMediaPlaylistByPDT",function(){return h});var z=M("./src/polyfills/number.ts"),A=M("./src/utils/logger.ts"),I=M("./src/controller/level-helper.ts");function H(s,i){for(var n=null,t=0,b=s.length;t<b;t++){var v=s[t];if(v&&v.cc===i){n=v;break}}return n}function P(s,i,n){return!!(i.details&&(n.endCC>n.startCC||s&&s.cc<n.startCC))}function e(s,i){var n=s.fragments,t=i.fragments;if(!t.length||!n.length){A.logger.log("No fragments to align");return}var b=H(n,t[0].cc);if(!b||b&&!b.startPTS){A.logger.log("No frag in previous level to align on");return}return b}function C(s,i){if(s){var n=s.start+i;s.start=s.startPTS=n,s.endPTS=n+s.duration}}function g(s,i){for(var n=i.fragments,t=0,b=n.length;t<b;t++)C(n[t],s);i.fragmentHint&&C(i.fragmentHint,s),i.alignedSliding=!0}function f(s,i,n){if(!i)return;o(s,n,i),!n.alignedSliding&&i.details&&r(n,i.details),!n.alignedSliding&&i.details&&!n.skippedSegments&&Object(I.adjustSliding)(i.details,n)}function o(s,i,n){if(P(s,n,i)){var t=e(n.details,i);t&&Object(z.isFiniteNumber)(t.start)&&(A.logger.log("Adjusting PTS using last level due to CC increase within current level "+i.url),g(t.start,i))}}function r(s,i){if(!i.fragments.length||!s.hasProgramDateTime||!i.hasProgramDateTime)return;var n=i.fragments[0].programDateTime,t=s.fragments[0].programDateTime,b=(t-n)/1e3+i.fragments[0].start;b&&Object(z.isFiniteNumber)(b)&&(A.logger.log("Adjusting PTS using programDateTime delta "+(t-n)+"ms, sliding:"+b.toFixed(3)+" "+s.url+" "),g(b,s))}function a(s,i){var n=s.programDateTime;if(!n)return;var t=(n-i)/1e3;s.start=s.startPTS=t,s.endPTS=t+s.duration}function h(s,i){if(!i.fragments.length||!s.hasProgramDateTime||!i.hasProgramDateTime)return;var n=i.fragments[0].programDateTime,t=i.fragments[0].start,b=n-t*1e3;s.fragments.forEach(function(v){a(v,b)}),s.fragmentHint&&a(s.fragmentHint,b),s.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(ce,W,M){"use strict";M.r(W);var z=M("./src/utils/ewma.ts"),A=function(){function I(P,e,C){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=C,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new z.default(P),this.fast_=new z.default(e)}var H=I.prototype;return H.update=function(e,C){var g=this.slow_,f=this.fast_;this.slow_.halfLife!==e&&(this.slow_=new z.default(e,g.getEstimate(),g.getTotalWeight())),this.fast_.halfLife!==C&&(this.fast_=new z.default(C,f.getEstimate(),f.getTotalWeight()))},H.sample=function(e,C){e=Math.max(e,this.minDelayMs_);var g=8*C,f=e/1e3,o=g/f;this.fast_.sample(f,o),this.slow_.sample(f,o)},H.canEstimate=function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_},H.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},H.destroy=function(){},I}();W.default=A},"./src/utils/ewma.ts":function(ce,W,M){"use strict";M.r(W);var z=function(){function A(H,P,e){P===void 0&&(P=0),e===void 0&&(e=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=H,this.alpha_=H?Math.exp(Math.log(.5)/H):0,this.estimate_=P,this.totalWeight_=e}var I=A.prototype;return I.sample=function(P,e){var C=Math.pow(this.alpha_,P);this.estimate_=e*(1-C)+C*this.estimate_,this.totalWeight_+=P},I.getTotalWeight=function(){return this.totalWeight_},I.getEstimate=function(){if(this.alpha_){var P=1-Math.pow(this.alpha_,this.totalWeight_);if(P)return this.estimate_/P}return this.estimate_},A}();W.default=z},"./src/utils/fetch-loader.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"fetchSupported",function(){return a});var z=M("./src/polyfills/number.ts"),A=M("./src/loader/load-stats.ts"),I=M("./src/demux/chunk-cache.ts");function H(t,b){t.prototype=Object.create(b.prototype),t.prototype.constructor=t,f(t,b)}function P(t){var b=typeof Map=="function"?new Map:void 0;return P=function(E){if(E===null||!g(E))return E;if(typeof E!="function")throw new TypeError("Super expression must either be null or a function");if(typeof b!="undefined"){if(b.has(E))return b.get(E);b.set(E,w)}function w(){return e(E,arguments,o(this).constructor)}return w.prototype=Object.create(E.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),f(w,E)},P(t)}function e(t,b,v){return C()?e=Reflect.construct:e=function(w,x,_){var p=[null];p.push.apply(p,x);var u=Function.bind.apply(w,p),l=new u;return _&&f(l,_.prototype),l},e.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(t){return!1}}function g(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function f(t,b){return f=Object.setPrototypeOf||function(E,w){return E.__proto__=w,E},f(t,b)}function o(t){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)},o(t)}function r(){return r=Object.assign||function(t){for(var b=1;b<arguments.length;b++){var v=arguments[b];for(var E in v)Object.prototype.hasOwnProperty.call(v,E)&&(t[E]=v[E])}return t},r.apply(this,arguments)}function a(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(t){}return!1}var h=function(){function t(v){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=v.fetchSetup||i,this.controller=new self.AbortController,this.stats=new A.LoadStats}var b=t.prototype;return b.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},b.abortInternal=function(){var E=this.response;(!E||!E.ok)&&(this.stats.aborted=!0,this.controller.abort())},b.abort=function(){var E;this.abortInternal(),(E=this.callbacks)!==null&&E!==void 0&&E.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},b.load=function(E,w,x){var _=this,p=this.stats;if(p.loading.start)throw new Error("Loader can only be used once.");p.loading.start=self.performance.now();var u=s(E,this.controller.signal),l=x.onProgress,m=E.responseType==="arraybuffer",c=m?"byteLength":"length";this.context=E,this.config=w,this.callbacks=x,this.request=this.fetchSetup(E,u),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){_.abortInternal(),x.onTimeout(p,E,_.response)},w.timeout),self.fetch(this.request).then(function(T){if(_.response=_.loader=T,!T.ok){var N=T.status,D=T.statusText;throw new n(D||"fetch, bad network response",N,T)}return p.loading.first=Math.max(self.performance.now(),p.loading.start),p.total=parseInt(T.headers.get("Content-Length")||"0"),l&&Object(z.isFiniteNumber)(w.highWaterMark)?_.loadProgressively(T,p,E,w.highWaterMark,l):m?T.arrayBuffer():T.text()}).then(function(T){var N=_.response;self.clearTimeout(_.requestTimeout),p.loading.end=Math.max(self.performance.now(),p.loading.first),p.loaded=p.total=T[c];var D={url:N.url,data:T};l&&!Object(z.isFiniteNumber)(w.highWaterMark)&&l(p,E,T,N),x.onSuccess(D,p,E,N)}).catch(function(T){if(self.clearTimeout(_.requestTimeout),p.aborted)return;var N=T.code||0;x.onError({code:N,text:T.message},E,T.details)})},b.getCacheAge=function(){var E=null;if(this.response){var w=this.response.headers.get("age");E=w?parseFloat(w):null}return E},b.loadProgressively=function(E,w,x,_,p){_===void 0&&(_=0);var u=new I.default,l=E.body.getReader(),m=function c(){return l.read().then(function(T){if(T.done)return u.dataLength&&p(w,x,u.flush(),E),Promise.resolve(new ArrayBuffer(0));var N=T.value,D=N.length;return w.loaded+=D,D<_||u.dataLength?(u.push(N),u.dataLength>=_&&p(w,x,u.flush(),E)):p(w,x,N,E),c()}).catch(function(){return Promise.reject()})};return m()},t}();function s(t,b){var v={method:"GET",mode:"cors",credentials:"same-origin",signal:b,headers:new self.Headers(r({},t.headers))};return t.rangeEnd&&v.headers.set("Range","bytes="+t.rangeStart+"-"+String(t.rangeEnd-1)),v}function i(t,b){return new self.Request(t.url,b)}var n=function(t){H(b,t);function b(v,E,w){var x;return x=t.call(this,v)||this,x.code=void 0,x.details=void 0,x.code=E,x.details=w,x}return b}(P(Error));W.default=h},"./src/utils/imsc1-ttml-parser.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"IMSC1_CODEC",function(){return g}),M.d(W,"parseIMSC1",function(){return a});var z=M("./src/utils/mp4-tools.ts"),A=M("./src/utils/vttparser.ts"),I=M("./src/utils/vttcue.ts"),H=M("./src/demux/id3.ts"),P=M("./src/utils/timescale-conversion.ts"),e=M("./src/utils/webvtt-parser.ts");function C(){return C=Object.assign||function(_){for(var p=1;p<arguments.length;p++){var u=arguments[p];for(var l in u)Object.prototype.hasOwnProperty.call(u,l)&&(_[l]=u[l])}return _},C.apply(this,arguments)}var g="stpp.ttml.im1t",f=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,o=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,r={left:"start",center:"center",right:"end",start:"start",end:"end"};function a(_,p,u,l,m){var c=Object(z.findBox)(new Uint8Array(_),["mdat"]);if(c.length===0){m(new Error("Could not parse IMSC1 mdat"));return}var T=c[0],N=Object(H.utf8ArrayToStr)(new Uint8Array(_,T.start,T.end-T.start)),D=Object(P.toTimescaleFromScale)(p,1,u);try{l(h(N,D))}catch(y){m(y)}}function h(_,p){var u=new DOMParser,l=u.parseFromString(_,"text/xml"),m=l.getElementsByTagName("tt")[0];if(!m)throw new Error("Invalid ttml");var c={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},T=Object.keys(c).reduce(function(k,R){return k[R]=m.getAttribute("ttp:"+R)||c[R],k},{}),N=m.getAttribute("xml:space")!=="preserve",D=i(s(m,"styling","style")),y=i(s(m,"layout","region")),O=s(m,"body","[begin]");return[].map.call(O,function(k){var R=n(k,N);if(!R||!k.hasAttribute("begin"))return null;var B=E(k.getAttribute("begin"),T),V=E(k.getAttribute("dur"),T),ee=E(k.getAttribute("end"),T);if(B===null)throw v(k);if(ee===null){if(V===null)throw v(k);ee=B+V}var re=new I.default(B-p,ee-p,R);re.id=Object(e.generateCueId)(re.startTime,re.endTime,re.text);var _e=y[k.getAttribute("region")],se=D[k.getAttribute("style")];re.position=10,re.size=80;var ye=t(_e,se),ve=ye.textAlign;if(ve){var Ee=r[ve];Ee&&(re.lineAlign=Ee),re.align=ve}return C(re,ye),re}).filter(function(k){return k!==null})}function s(_,p,u){var l=_.getElementsByTagName(p)[0];return l?[].slice.call(l.querySelectorAll(u)):[]}function i(_){return _.reduce(function(p,u){var l=u.getAttribute("xml:id");return l&&(p[l]=u),p},{})}function n(_,p){return[].slice.call(_.childNodes).reduce(function(u,l,m){var c;return l.nodeName==="br"&&m?u+`
|
|
`:(c=l.childNodes)!==null&&c!==void 0&&c.length?n(l,p):p?u+l.textContent.trim().replace(/\s+/g," "):u+l.textContent},"")}function t(_,p){var u="http://www.w3.org/ns/ttml#styling",l=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return l.reduce(function(m,c){var T=b(p,u,c)||b(_,u,c);return T&&(m[c]=T),m},{})}function b(_,p,u){return _.hasAttributeNS(p,u)?_.getAttributeNS(p,u):null}function v(_){return new Error("Could not parse ttml timestamp "+_)}function E(_,p){if(!_)return null;var u=Object(A.parseTimeStamp)(_);return u===null&&(f.test(_)?u=w(_,p):o.test(_)&&(u=x(_,p))),u}function w(_,p){var u=f.exec(_),l=(u[4]|0)+(u[5]|0)/p.subFrameRate;return(u[1]|0)*3600+(u[2]|0)*60+(u[3]|0)+l/p.frameRate}function x(_,p){var u=o.exec(_),l=Number(u[1]),m=u[2];switch(m){case"h":return l*3600;case"m":return l*60;case"ms":return l*1e3;case"f":return l/p.frameRate;case"t":return l/p.tickRate}return l}},"./src/utils/logger.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"enableLogs",function(){return e}),M.d(W,"logger",function(){return C});var z=function(){},A={trace:z,debug:z,log:z,warn:z,info:z,error:z},I=A;function H(g){var f=self.console[g];return f?f.bind(self.console,"["+g+"] >"):z}function P(g){for(var f=arguments.length,o=new Array(f>1?f-1:0),r=1;r<f;r++)o[r-1]=arguments[r];o.forEach(function(a){I[a]=g[a]?g[a].bind(g):H(a)})}function e(g){if(self.console&&g===!0||typeof g=="object"){P(g,"debug","log","info","warn","error");try{I.log()}catch(f){I=A}}else I=A}var C=I},"./src/utils/mediakeys-helper.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"KeySystems",function(){return z}),M.d(W,"requestMediaKeySystemAccess",function(){return A});var z;(function(I){I.WIDEVINE="com.widevine.alpha",I.PLAYREADY="com.microsoft.playready"})(z||(z={}));var A=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"getMediaSource",function(){return z});function z(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"bin2str",function(){return P}),M.d(W,"readUint16",function(){return e}),M.d(W,"readUint32",function(){return C}),M.d(W,"writeUint32",function(){return g}),M.d(W,"findBox",function(){return f}),M.d(W,"parseSegmentIndex",function(){return o}),M.d(W,"parseInitSegment",function(){return r}),M.d(W,"getStartDTS",function(){return a}),M.d(W,"getDuration",function(){return h}),M.d(W,"computeRawDurationFromSamples",function(){return s}),M.d(W,"offsetStartDTS",function(){return i}),M.d(W,"segmentValidRange",function(){return n}),M.d(W,"appendUint8Array",function(){return t});var z=M("./src/utils/typed-array.ts"),A=M("./src/loader/fragment.ts"),I=Math.pow(2,32)-1,H=[].push;function P(b){return String.fromCharCode.apply(null,b)}function e(b,v){"data"in b&&(v+=b.start,b=b.data);var E=b[v]<<8|b[v+1];return E<0?65536+E:E}function C(b,v){"data"in b&&(v+=b.start,b=b.data);var E=b[v]<<24|b[v+1]<<16|b[v+2]<<8|b[v+3];return E<0?4294967296+E:E}function g(b,v,E){"data"in b&&(v+=b.start,b=b.data),b[v]=E>>24,b[v+1]=E>>16&255,b[v+2]=E>>8&255,b[v+3]=E&255}function f(b,v){var E=[];if(!v.length)return E;var w,x,_;"data"in b?(w=b.data,x=b.start,_=b.end):(w=b,x=0,_=w.byteLength);for(var p=x;p<_;){var u=C(w,p),l=P(w.subarray(p+4,p+8)),m=u>1?p+u:_;if(l===v[0])if(v.length===1)E.push({data:w,start:p+8,end:m});else{var c=f({data:w,start:p+8,end:m},v.slice(1));c.length&&H.apply(E,c)}p=m}return E}function o(b){var v=f(b,["moov"]),E=v[0],w=E?E.end:null,x=f(b,["sidx"]);if(!x||!x[0])return null;var _=[],p=x[0],u=p.data[0],l=u===0?8:16,m=C(p,l);l+=4;var c=0,T=0;u===0?l+=8:l+=16,l+=2;var N=p.end+T,D=e(p,l);l+=2;for(var y=0;y<D;y++){var O=l,k=C(p,O);O+=4;var R=k&2147483647,B=(k&2147483648)>>>31;if(B===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var V=C(p,O);O+=4,_.push({referenceSize:R,subsegmentDuration:V,info:{duration:V/m,start:N,end:N+R-1}}),N+=R,O+=4,l=O}return{earliestPresentationTime:c,timescale:m,version:u,referencesCount:D,references:_,moovEndOffset:w}}function r(b){for(var v=[],E=f(b,["moov","trak"]),w=0;w<E.length;w++){var x=E[w],_=f(x,["tkhd"])[0];if(_){var p=_.data[_.start],u=p===0?12:20,l=C(_,u),m=f(x,["mdia","mdhd"])[0];if(m){p=m.data[m.start],u=p===0?12:20;var c=C(m,u),T=f(x,["mdia","hdlr"])[0];if(T){var N=P(T.data.subarray(T.start+8,T.start+12)),D={soun:A.ElementaryStreamTypes.AUDIO,vide:A.ElementaryStreamTypes.VIDEO}[N];if(D){var y=f(x,["mdia","minf","stbl","stsd"])[0],O=void 0;y&&(O=P(y.data.subarray(y.start+12,y.start+16))),v[l]={timescale:c,type:D},v[D]={timescale:c,id:l,codec:O}}}}}}var k=f(b,["moov","mvex","trex"]);return k.forEach(function(R){var B=C(R,4),V=v[B];V&&(V.default={duration:C(R,12),flags:C(R,20)})}),v}function a(b,v){return f(v,["moof","traf"]).reduce(function(E,w){var x=f(w,["tfdt"])[0],_=x.data[x.start],p=f(w,["tfhd"]).reduce(function(u,l){var m=C(l,4),c=b[m];if(c){var T=C(x,4);_===1&&(T*=Math.pow(2,32),T+=C(x,8));var N=c.timescale||9e4,D=T/N;if(isFinite(D)&&(u===null||D<u))return D}return u},null);return p!==null&&isFinite(p)&&(E===null||p<E)?p:E},null)||0}function h(b,v){for(var E=0,w=0,x=0,_=f(b,["moof","traf"]),p=0;p<_.length;p++){var u=_[p],l=f(u,["tfhd"])[0],m=C(l,4),c=v[m];if(!c)continue;var T=c.default,N=C(l,0)|(T==null?void 0:T.flags),D=T==null?void 0:T.duration;N&8&&(N&2?D=C(l,12):D=C(l,8));for(var y=c.timescale||9e4,O=f(u,["trun"]),k=0;k<O.length;k++){if(D){var R=C(O[k],4);E=D*R}else E=s(O[k]);c.type===A.ElementaryStreamTypes.VIDEO?w+=E/y:c.type===A.ElementaryStreamTypes.AUDIO&&(x+=E/y)}}if(w===0&&x===0){var B=o(b);if(B!=null&&B.references)return B.references.reduce(function(V,ee){return V+ee.info.duration||0},0)}return w||x}function s(b){var v=C(b,0),E=8;v&1&&(E+=4),v&4&&(E+=4);for(var w=0,x=C(b,4),_=0;_<x;_++){if(v&256){var p=C(b,E);w+=p,E+=4}v&512&&(E+=4),v&1024&&(E+=4),v&2048&&(E+=4)}return w}function i(b,v,E){f(v,["moof","traf"]).forEach(function(w){f(w,["tfhd"]).forEach(function(x){var _=C(x,4),p=b[_];if(!p)return;var u=p.timescale||9e4;f(w,["tfdt"]).forEach(function(l){var m=l.data[l.start],c=C(l,4);if(m===0)g(l,4,c-E*u);else{c*=Math.pow(2,32),c+=C(l,8),c-=E*u,c=Math.max(c,0);var T=Math.floor(c/(I+1)),N=Math.floor(c%(I+1));g(l,4,T),g(l,8,N)}})})})}function n(b){var v={valid:null,remainder:null},E=f(b,["moof"]);if(E){if(E.length<2)return v.remainder=b,v}else return v;var w=E[E.length-1];return v.valid=Object(z.sliceUint8)(b,0,w.start-8),v.remainder=Object(z.sliceUint8)(b,w.start-8),v}function t(b,v){var E=new Uint8Array(b.length+v.length);return E.set(b),E.set(v,b.length),E}},"./src/utils/output-filter.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"default",function(){return z});var z=function(){function A(H,P){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=H,this.trackName=P}var I=A.prototype;return I.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},I.newCue=function(P,e,C){(this.startTime===null||this.startTime>P)&&(this.startTime=P),this.endTime=e,this.screen=C,this.timelineController.createCaptionsTrack(this.trackName)},I.reset=function(){this.cueRanges=[]},A}()},"./src/utils/texttrack-utils.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"sendAddTrackEvent",function(){return A}),M.d(W,"addCueToTrack",function(){return I}),M.d(W,"clearCurrentCues",function(){return H}),M.d(W,"removeCuesInRange",function(){return P}),M.d(W,"getCuesInRange",function(){return C});var z=M("./src/utils/logger.ts");function A(g,f){var o;try{o=new Event("addtrack")}catch(r){o=document.createEvent("Event"),o.initEvent("addtrack",!1,!1)}o.track=g,f.dispatchEvent(o)}function I(g,f){var o=g.mode;if(o==="disabled"&&(g.mode="hidden"),g.cues&&!g.cues.getCueById(f.id))try{if(g.addCue(f),!g.cues.getCueById(f.id))throw new Error("addCue is failed for: "+f)}catch(a){z.logger.debug("[texttrack-utils]: "+a);var r=new self.TextTrackCue(f.startTime,f.endTime,f.text);r.id=f.id,g.addCue(r)}o==="disabled"&&(g.mode=o)}function H(g){var f=g.mode;if(f==="disabled"&&(g.mode="hidden"),g.cues)for(var o=g.cues.length;o--;)g.removeCue(g.cues[o]);f==="disabled"&&(g.mode=f)}function P(g,f,o){var r=g.mode;if(r==="disabled"&&(g.mode="hidden"),g.cues&&g.cues.length>0)for(var a=C(g.cues,f,o),h=0;h<a.length;h++)g.removeCue(a[h]);r==="disabled"&&(g.mode=r)}function e(g,f){if(f<g[0].startTime)return 0;var o=g.length-1;if(f>g[o].endTime)return-1;for(var r=0,a=o;r<=a;){var h=Math.floor((a+r)/2);if(f<g[h].startTime)a=h-1;else if(f>g[h].startTime&&r<o)r=h+1;else return h}return g[r].startTime-f<f-g[a].startTime?r:a}function C(g,f,o){var r=[],a=e(g,f);if(a>-1)for(var h=a,s=g.length;h<s;h++){var i=g[h];if(i.startTime>=f&&i.endTime<=o)r.push(i);else if(i.startTime>o)return r}return r}},"./src/utils/time-ranges.ts":function(ce,W,M){"use strict";M.r(W);var z={toString:function(I){for(var H="",P=I.length,e=0;e<P;e++)H+="["+I.start(e).toFixed(3)+","+I.end(e).toFixed(3)+"]";return H}};W.default=z},"./src/utils/timescale-conversion.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"toTimescaleFromBase",function(){return A}),M.d(W,"toTimescaleFromScale",function(){return I}),M.d(W,"toMsFromMpegTsClock",function(){return H}),M.d(W,"toMpegTsClockFromTimescale",function(){return P});var z=9e4;function A(e,C,g,f){g===void 0&&(g=1),f===void 0&&(f=!1);var o=e*C*g;return f?Math.round(o):o}function I(e,C,g,f){return g===void 0&&(g=1),f===void 0&&(f=!1),A(e,C,1/g,f)}function H(e,C){return C===void 0&&(C=!1),A(e,1e3,1/z,C)}function P(e,C){return C===void 0&&(C=1),A(e,z,1/C)}},"./src/utils/typed-array.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"sliceUint8",function(){return z});function z(A,I,H){return Uint8Array.prototype.slice?A.slice(I,H):new Uint8Array(Array.prototype.slice.call(A,I,H))}},"./src/utils/vttcue.ts":function(ce,W,M){"use strict";M.r(W),W.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var z=["","lr","rl"],A=["start","middle","end","left","right"];function I(g,f){if(typeof f!="string")return!1;if(!Array.isArray(g))return!1;var o=f.toLowerCase();return~g.indexOf(o)?o:!1}function H(g){return I(z,g)}function P(g){return I(A,g)}function e(g){for(var f=arguments.length,o=new Array(f>1?f-1:0),r=1;r<f;r++)o[r-1]=arguments[r];for(var a=1;a<arguments.length;a++){var h=arguments[a];for(var s in h)g[s]=h[s]}return g}function C(g,f,o){var r=this,a={enumerable:!0};r.hasBeenReset=!1;var h="",s=!1,i=g,n=f,t=o,b=null,v="",E=!0,w="auto",x="start",_=50,p="middle",u=50,l="middle";Object.defineProperty(r,"id",e({},a,{get:function(){return h},set:function(c){h=""+c}})),Object.defineProperty(r,"pauseOnExit",e({},a,{get:function(){return s},set:function(c){s=!!c}})),Object.defineProperty(r,"startTime",e({},a,{get:function(){return i},set:function(c){if(typeof c!="number")throw new TypeError("Start time must be set to a number.");i=c,this.hasBeenReset=!0}})),Object.defineProperty(r,"endTime",e({},a,{get:function(){return n},set:function(c){if(typeof c!="number")throw new TypeError("End time must be set to a number.");n=c,this.hasBeenReset=!0}})),Object.defineProperty(r,"text",e({},a,{get:function(){return t},set:function(c){t=""+c,this.hasBeenReset=!0}})),Object.defineProperty(r,"region",e({},a,{get:function(){return b},set:function(c){b=c,this.hasBeenReset=!0}})),Object.defineProperty(r,"vertical",e({},a,{get:function(){return v},set:function(c){var T=H(c);if(T===!1)throw new SyntaxError("An invalid or illegal string was specified.");v=T,this.hasBeenReset=!0}})),Object.defineProperty(r,"snapToLines",e({},a,{get:function(){return E},set:function(c){E=!!c,this.hasBeenReset=!0}})),Object.defineProperty(r,"line",e({},a,{get:function(){return w},set:function(c){if(typeof c!="number"&&c!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");w=c,this.hasBeenReset=!0}})),Object.defineProperty(r,"lineAlign",e({},a,{get:function(){return x},set:function(c){var T=P(c);if(!T)throw new SyntaxError("An invalid or illegal string was specified.");x=T,this.hasBeenReset=!0}})),Object.defineProperty(r,"position",e({},a,{get:function(){return _},set:function(c){if(c<0||c>100)throw new Error("Position must be between 0 and 100.");_=c,this.hasBeenReset=!0}})),Object.defineProperty(r,"positionAlign",e({},a,{get:function(){return p},set:function(c){var T=P(c);if(!T)throw new SyntaxError("An invalid or illegal string was specified.");p=T,this.hasBeenReset=!0}})),Object.defineProperty(r,"size",e({},a,{get:function(){return u},set:function(c){if(c<0||c>100)throw new Error("Size must be between 0 and 100.");u=c,this.hasBeenReset=!0}})),Object.defineProperty(r,"align",e({},a,{get:function(){return l},set:function(c){var T=P(c);if(!T)throw new SyntaxError("An invalid or illegal string was specified.");l=T,this.hasBeenReset=!0}})),r.displayState=void 0}return C.prototype.getCueAsHTML=function(){var g=self.WebVTT;return g.convertCueToDOMTree(self,this.text)},C}()},"./src/utils/vttparser.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"parseTimeStamp",function(){return I}),M.d(W,"fixLineBreaks",function(){return f}),M.d(W,"VTTParser",function(){return o});var z=M("./src/utils/vttcue.ts"),A=function(){function r(){}var a=r.prototype;return a.decode=function(s,i){if(!s)return"";if(typeof s!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(s))},r}();function I(r){function a(s,i,n,t){return(s|0)*3600+(i|0)*60+(n|0)+parseFloat(t||0)}var h=r.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return h?parseFloat(h[2])>59?a(h[2],h[3],0,h[4]):a(h[1],h[2],h[3],h[4]):null}var H=function(){function r(){this.values=Object.create(null)}var a=r.prototype;return a.set=function(s,i){!this.get(s)&&i!==""&&(this.values[s]=i)},a.get=function(s,i,n){return n?this.has(s)?this.values[s]:i[n]:this.has(s)?this.values[s]:i},a.has=function(s){return s in this.values},a.alt=function(s,i,n){for(var t=0;t<n.length;++t)if(i===n[t]){this.set(s,i);break}},a.integer=function(s,i){/^-?\d+$/.test(i)&&this.set(s,parseInt(i,10))},a.percent=function(s,i){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(i)){var n=parseFloat(i);if(n>=0&&n<=100)return this.set(s,n),!0}return!1},r}();function P(r,a,h,s){var i=s?r.split(s):[r];for(var n in i){if(typeof i[n]!="string")continue;var t=i[n].split(h);if(t.length!==2)continue;var b=t[0],v=t[1];a(b,v)}}var e=new z.default(0,0,""),C=e.align==="middle"?"middle":"center";function g(r,a,h){var s=r;function i(){var b=I(r);if(b===null)throw new Error("Malformed timestamp: "+s);return r=r.replace(/^[^\sa-zA-Z-]+/,""),b}function n(b,v){var E=new H;P(b,function(_,p){var u;switch(_){case"region":for(var l=h.length-1;l>=0;l--)if(h[l].id===p){E.set(_,h[l].region);break}break;case"vertical":E.alt(_,p,["rl","lr"]);break;case"line":u=p.split(","),E.integer(_,u[0]),E.percent(_,u[0])&&E.set("snapToLines",!1),E.alt(_,u[0],["auto"]),u.length===2&&E.alt("lineAlign",u[1],["start",C,"end"]);break;case"position":u=p.split(","),E.percent(_,u[0]),u.length===2&&E.alt("positionAlign",u[1],["start",C,"end","line-left","line-right","auto"]);break;case"size":E.percent(_,p);break;case"align":E.alt(_,p,["start",C,"end","left","right"]);break}},/:/,/\s/),v.region=E.get("region",null),v.vertical=E.get("vertical","");var w=E.get("line","auto");w==="auto"&&e.line===-1&&(w=-1),v.line=w,v.lineAlign=E.get("lineAlign","start"),v.snapToLines=E.get("snapToLines",!0),v.size=E.get("size",100),v.align=E.get("align",C);var x=E.get("position","auto");x==="auto"&&e.position===50&&(x=v.align==="start"||v.align==="left"?0:v.align==="end"||v.align==="right"?100:50),v.position=x}function t(){r=r.replace(/^\s+/,"")}if(t(),a.startTime=i(),t(),r.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+s);r=r.substr(3),t(),a.endTime=i(),t(),n(r,a)}function f(r){return r.replace(/<br(?: \/)?>/gi,`
|
|
`)}var o=function(){function r(){this.state="INITIAL",this.buffer="",this.decoder=new A,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var a=r.prototype;return a.parse=function(s){var i=this;s&&(i.buffer+=i.decoder.decode(s,{stream:!0}));function n(){var x=i.buffer,_=0;for(x=f(x);_<x.length&&x[_]!=="\r"&&x[_]!==`
|
|
`;)++_;var p=x.substr(0,_);return x[_]==="\r"&&++_,x[_]===`
|
|
`&&++_,i.buffer=x.substr(_),p}function t(x){P(x,function(_,p){},/:/)}try{var b="";if(i.state==="INITIAL"){if(!/\r\n|\n/.test(i.buffer))return this;b=n();var v=b.match(/^()?WEBVTT([ \t].*)?$/);if(!v||!v[0])throw new Error("Malformed WebVTT signature.");i.state="HEADER"}for(var E=!1;i.buffer;){if(!/\r\n|\n/.test(i.buffer))return this;E?E=!1:b=n();switch(i.state){case"HEADER":/:/.test(b)?t(b):b||(i.state="ID");continue;case"NOTE":b||(i.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(b)){i.state="NOTE";break}if(!b)continue;if(i.cue=new z.default(0,0,""),i.state="CUE",b.indexOf("-->")===-1){i.cue.id=b;continue}case"CUE":if(!i.cue){i.state="BADCUE";continue}try{g(b,i.cue,i.regionList)}catch(x){i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":{var w=b.indexOf("-->")!==-1;if(!b||w&&(E=!0)){i.oncue&&i.cue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}if(i.cue===null)continue;i.cue.text&&(i.cue.text+=`
|
|
`),i.cue.text+=b}continue;case"BADCUE":b||(i.state="ID")}}}catch(x){i.state==="CUETEXT"&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state=i.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},a.flush=function(){var s=this;try{if((s.cue||s.state==="HEADER")&&(s.buffer+=`
|
|
|
|
`,s.parse()),s.state==="INITIAL"||s.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(i){s.onparsingerror&&s.onparsingerror(i)}return s.onflush&&s.onflush(),this},r}()},"./src/utils/webvtt-parser.ts":function(ce,W,M){"use strict";M.r(W),M.d(W,"generateCueId",function(){return o}),M.d(W,"parseWebVTT",function(){return a});var z=M("./src/polyfills/number.ts"),A=M("./src/utils/vttparser.ts"),I=M("./src/demux/id3.ts"),H=M("./src/utils/timescale-conversion.ts"),P=M("./src/remux/mp4-remuxer.ts"),e=/\r\n|\n\r|\n|\r/g,C=function(s,i,n){return n===void 0&&(n=0),s.substr(n,i.length)===i},g=function(s){var i=parseInt(s.substr(-3)),n=parseInt(s.substr(-6,2)),t=parseInt(s.substr(-9,2)),b=s.length>9?parseInt(s.substr(0,s.indexOf(":"))):0;if(!Object(z.isFiniteNumber)(i)||!Object(z.isFiniteNumber)(n)||!Object(z.isFiniteNumber)(t)||!Object(z.isFiniteNumber)(b))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+s);return i+=1e3*n,i+=60*1e3*t,i+=60*60*1e3*b,i},f=function(s){for(var i=5381,n=s.length;n;)i=i*33^s.charCodeAt(--n);return(i>>>0).toString()};function o(h,s,i){return f(h.toString())+f(s.toString())+f(i)}var r=function(s,i,n){var t=s[i],b=s[t.prevCC];if(!b||!b.new&&t.new){s.ccOffset=s.presentationOffset=t.start,t.new=!1;return}for(;(v=b)!==null&&v!==void 0&&v.new;){var v;s.ccOffset+=t.start-b.start,t.new=!1,t=b,b=s[t.prevCC]}s.presentationOffset=n};function a(h,s,i,n,t,b,v,E){var w=new A.VTTParser,x=Object(I.utf8ArrayToStr)(new Uint8Array(h)).trim().replace(e,`
|
|
`).split(`
|
|
`),_=[],p=Object(H.toMpegTsClockFromTimescale)(s,i),u="00:00.000",l=0,m=0,c,T=!0,N=!1;w.oncue=function(D){var y=n[t],O=n.ccOffset,k=(l-p)/9e4;if(y!=null&&y.new&&(m!==void 0?O=n.ccOffset=y.start:r(n,t,k)),k&&(O=k-n.presentationOffset),N){var R=D.endTime-D.startTime,B=Object(P.normalizePts)((D.startTime+O-m)*9e4,b*9e4)/9e4;D.startTime=B,D.endTime=B+R}var V=D.text.trim();D.text=decodeURIComponent(encodeURIComponent(V)),D.id||(D.id=o(D.startTime,D.endTime,V)),D.endTime>0&&_.push(D)},w.onparsingerror=function(D){c=D},w.onflush=function(){if(c){E(c);return}v(_)},x.forEach(function(D){if(T)if(C(D,"X-TIMESTAMP-MAP=")){T=!1,N=!0,D.substr(16).split(",").forEach(function(y){C(y,"LOCAL:")?u=y.substr(6):C(y,"MPEGTS:")&&(l=parseInt(y.substr(7)))});try{m=g(u)/1e3}catch(y){N=!1,c=y}return}else D===""&&(T=!1);w.parse(D+`
|
|
`)}),w.flush()}},"./src/utils/xhr-loader.ts":function(ce,W,M){"use strict";M.r(W);var z=M("./src/utils/logger.ts"),A=M("./src/loader/load-stats.ts"),I=/^age:\s*[\d.]+\s*$/m,H=function(){function P(C){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=C?C.xhrSetup:null,this.stats=new A.LoadStats,this.retryDelay=0}var e=P.prototype;return e.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},e.abortInternal=function(){var g=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),g&&(g.onreadystatechange=null,g.onprogress=null,g.readyState!==4&&(this.stats.aborted=!0,g.abort()))},e.abort=function(){var g;this.abortInternal(),(g=this.callbacks)!==null&&g!==void 0&&g.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},e.load=function(g,f,o){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=g,this.config=f,this.callbacks=o,this.retryDelay=f.retryDelay,this.loadInternal()},e.loadInternal=function(){var g=this.config,f=this.context;if(!g)return;var o=this.loader=new self.XMLHttpRequest,r=this.stats;r.loading.first=0,r.loaded=0;var a=this.xhrSetup;try{if(a)try{a(o,f.url)}catch(i){o.open("GET",f.url,!0),a(o,f.url)}o.readyState||o.open("GET",f.url,!0);var h=this.context.headers;if(h)for(var s in h)o.setRequestHeader(s,h[s])}catch(i){this.callbacks.onError({code:o.status,text:i.message},f,o);return}f.rangeEnd&&o.setRequestHeader("Range","bytes="+f.rangeStart+"-"+(f.rangeEnd-1)),o.onreadystatechange=this.readystatechange.bind(this),o.onprogress=this.loadprogress.bind(this),o.responseType=f.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),g.timeout),o.send()},e.readystatechange=function(){var g=this.context,f=this.loader,o=this.stats;if(!g||!f)return;var r=f.readyState,a=this.config;if(o.aborted)return;if(r>=2)if(self.clearTimeout(this.requestTimeout),o.loading.first===0&&(o.loading.first=Math.max(self.performance.now(),o.loading.start)),r===4){f.onreadystatechange=null,f.onprogress=null;var h=f.status;if(h>=200&&h<300){o.loading.end=Math.max(self.performance.now(),o.loading.first);var s,i;if(g.responseType==="arraybuffer"?(s=f.response,i=s.byteLength):(s=f.responseText,i=s.length),o.loaded=o.total=i,!this.callbacks)return;var n=this.callbacks.onProgress;if(n&&n(o,g,s,f),!this.callbacks)return;var t={url:f.responseURL,data:s};this.callbacks.onSuccess(t,o,g,f)}else o.retry>=a.maxRetry||h>=400&&h<499?(z.logger.error(h+" while loading "+g.url),this.callbacks.onError({code:h,text:f.statusText},g,f)):(z.logger.warn(h+" while loading "+g.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,a.maxRetryDelay),o.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.timeout)},e.loadtimeout=function(){z.logger.warn("timeout while loading "+this.context.url);var g=this.callbacks;g&&(this.abortInternal(),g.onTimeout(this.stats,this.context,this.loader))},e.loadprogress=function(g){var f=this.stats;f.loaded=g.loaded,g.lengthComputable&&(f.total=g.total)},e.getCacheAge=function(){var g=null;if(this.loader&&I.test(this.loader.getAllResponseHeaders())){var f=this.loader.getResponseHeader("age");g=f?parseFloat(f):null}return g},P}();W.default=H}}).default})},vHTk:function(Pe,he,j){Pe.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},xiVL:function(Pe,he){Pe.exports="data:image/png;base64,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"},xrK0:function(Pe,he,j){Pe.exports=j.p+"static/jctj.677552b9.jpg"},z4EP:function(Pe,he){Pe.exports="data:image/png;base64,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"}}]);
|