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.
403 lines
1.1 MiB
403 lines
1.1 MiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[280,5,7,10,14],{"+GGh":function(Ke,ce){Ke.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJgAAAA4CAYAAAAB3jHPAAAAAXNSR0IArs4c6QAAIABJREFUeF7VXQm4VVXZfvc+5yKzMqiAgpggqGihoBI4Zz+iQA7VX2Fa+GeFmjnmjAZmDlnmDGaDY5KzJmmWAiKIoCihmAN/ySTDvRcF4e691v+s4VvrW2vvcwFB8r/lcy/n7LP32nu9+/3e7/2+tU+CLfwjpaw0NmJfIcRBSYK+Uoq+QNIdEu0AtJMSLaSUABJzZPWn+iUlEiRQb6l37MvsfbOdfs+9qf5htnav6ffsvoP9+mPSsej4+iM0Jr5vPR4aIF0o9po6ziccPx1GnbWQZvzqNfef/rd9j7+uXhPmIqn36XN6H+rf+n/+dTV+2o/6kNq/39YfT72m3le7Vj/Cnq76tx4TGx9tS2Olz5RByc/EZgBNSlm3enU+TAiMkhJHSshtHULchKkrok5WnUY8SQxwNNf2hAmMRWD5ARMG9H4tWAxQ/XHoPQ5kt4cAVBZrHgF2Mw/kePwBYC2ozUDo+OoTFosMr24y7eTpCbY3SzzBZvLN9TMAor/55DMAWYAawHkwanAkBkgejAROvy8POPOe+r/+DL8R2N+14LNZAJNStmpoEGcikWdLKTvpiTbjt0zkJ5z4J5hgDjhiEY01zwyOXAL2spNtZ8GAx5wtAdgxEk14xJh6v3qGOdvFLGlhwW4SN/4YyHRw4lkGWn8DEPsyINkhqG2ILYhBPBNZkEjzOQNcYiILngCYFoAJ387MhQZm8Lq5ERzg1DW078cMZdjPMxyBrTlu+kQAU2GwYXV+shS4HJA7xUwQhjB+J9vwVRIiOZB8fCSgxmGxVriii2+ugmeamD1jINn9EbtE4GiWcdm5hGHa7LOMMQtA4myjgMNkgLmHolDpmMO8Xgh9jOk8Y9kw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uI8N/XGDrxJUCyxjB5bKGdUe6BGZvjswYvrrA3YWza8V+anyzz5HIJuZMX4xGQ7IUOrA57W9I6SnObcn1kB1X21ES7HW/pdnVJe+c7fchqp56Frd/L2CHUV/wxTNED4aLnpjbbgOj67X3rs7YaeFYYfWmoL1KzgnWUKRJhUxh2hqtXJJswi1tn082qcKoC+YrF4kzI5GwhTatPmbCn9Y/mlLxnRdiKs8TAlmB1OKJcl60ycFIVwLxEYbYo7F3csZPtPKc4q3PPzOJLz7jeKa6q5mHQCfvIjCVPzGSUZqy+Bah8nzGg4vAZ9IluHdxs9FE2C2CeGWTdikUYJmR+YiKTL0lg29AyiA7jMsNIcFO9O8j+yNWNDFq2AolAEyxKYUzpFrMwg1gzCmeyWo+5dNmlLYAHX9VCvhfvnbflo9jzYiHUM5H1x+w4wkyRHHuzDWfaoKOWNyFv9LRvvQ23CMD4cFX4XLEE+8lcDIHEHlLKPkDaXUrZDkjaSSlaGJ4jozNkmbJw6r6ElAGPVweIGXmo5fZGWTHbuevMniAjM+jnonbnuMmwpExEwAn6vwrmKhP2hcdXhv1cpKvCLzEtbrP14LLpR/o/JBqhquSiLD0AAAAASUVORK5CYII="},"+ua5":function(Ke,ce,F){},"/OCd":function(Ke,ce,F){"use strict";F.r(ce);var ee=F("+L6B"),P=F("2/Rp"),R=F("5NDa"),U=F("5rEg"),A=F("5Dmo"),I=F("3S7+"),W=F("Znn+"),j=F("ZTPi"),e=F("2qtc"),C=F("kLXV"),f=F("14J3"),h=F("BMrR"),l=F("jCWc"),i=F("kPKH"),s=F("sPJy"),u=F("bE4q"),o=F("/zsF"),a=F("PArb"),n=F("miYZ"),t=F("tsqr"),_=F("9og8"),p=F("k1fw"),v=F("oBTY"),x=F("y8nQ"),T=F("Vl3Y"),b=F("tJVT"),d=F("PpiC"),g=F("WmNS"),c=F.n(g),y=F("q1tI"),r=F.n(y),w=F("Ty5D"),D=F("55Ip"),L=F("9kvl"),S=F("tgas"),M=F("jb+D"),H=F("OaEy"),O=F("2fM7"),K=F("sRBo"),Y=F("kaz8"),ie=F("9Bee"),re=F("TH5o"),Te=F.n(re),_e=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],we=function(Ie,Be){var Je=Ie.problemset,ze=Ie.globalSetting,ut=Ie.loading,et=Ie.dispatch,Ze=Ie.showAnswerTip,Ve=Ze===void 0?!0:Ze,Le=Ie.onRef,dt=Le===void 0?function(){}:Le,Ae=Ie.editData,Ne=Ie.editKey,pe=Ie.callback,he=Object(d.a)(Ie,["problemset","globalSetting","loading","dispatch","showAnswerTip","onRef","editData","editKey","callback"]),de=Object(y.useState)([]),z=Object(b.a)(de,2),J=z[0],Q=z[1],te=Object(y.useState)(),be=Object(b.a)(te,2),Oe=be[0],Pe=be[1],tt=Object(y.useState)([]),ct=Object(b.a)(tt,2),qe=ct[0],gt=ct[1],bt=Object(y.useState)(""),at=Object(b.a)(bt,2),Et=at[0],pt=at[1],yt=Object(y.useState)(0),$e=Object(b.a)(yt,2),ft=$e[0],Dt=$e[1],Ct=Object(y.useState)(!0),nt=Object(b.a)(Ct,2),Tt=nt[0],ot=nt[1],ht=Object(y.useState)(!1),Ot=Object(b.a)(ht,2),Jt=Ot[0],on=Ot[1],$t=Object(w.i)(),On=Object(y.useState)(""),Un=Object(b.a)(On,2),Qt=Un[0],mn=Un[1],Tn=Object(y.useState)(""),Ft=Object(b.a)(Tn,2),_t=Ft[0],st=Ft[1];Object(y.useEffect)(function(){var Mt,jt,Rt,N,m,E,k,G;if(!(Ae!=null&&(Mt=Ae.question)!==null&&Mt!==void 0&&Mt.question_title)){Q([{disabled:!1,value:""},{disabled:!1,value:""},{disabled:!1,value:""},{disabled:!1,value:""}]),ot(!0),pt(""),on(!1);return}mn(Ae==null||((jt=Ae.question)===null||jt===void 0)?void 0:jt.max_choices),st(Ae==null||((Rt=Ae.question)===null||Rt===void 0)?void 0:Rt.min_choices),pt(Ae==null||((N=Ae.question)===null||N===void 0)?void 0:N.question_title),ot(!!(Ae!=null&&(m=Ae.question)!==null&&m!==void 0&&m.is_necessary)),Q(Ae==null||((E=Ae.question)===null||E===void 0)?void 0:E.answers.map(function(B){return{value:B.answer_text,disabled:B.answer_text==="\u5176\u5B83"}})),on(!!(Ae!=null&&(k=Ae.question)!==null&&k!==void 0&&(G=k.answers)!==null&&G!==void 0&&G.find(function(B){return B.answer_text==="\u5176\u5B83"})))},[Ae]),Object(y.useImperativeHandle)(Be,function(){return{onSave:Lt}});var Lt=function(){var Mt=Object(_.a)(c.a.mark(function jt(Rt){var N,m,E,k,G;return c.a.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:if(!(Qt&&!_t||!Qt&&_t)){le.next=3;break}return t.b.info('\u53EF\u9009\uFF1A\u6700\u5C0F\u548C\u6700\u5927\u9650\u5236\u987B\u540C\u65F6\u4E3A\u6570\u503C\u6216\u8005\u201C--"'),le.abrupt("return");case 3:if(!(_t>Qt)){le.next=6;break}return t.b.info("\u53EF\u9009\u7684\u6700\u5927\u9650\u5236\u4E0D\u80FD\u5C0F\u4E8E\u6700\u5C0F\u9650\u5236"),le.abrupt("return");case 6:if(Et){le.next=9;break}return t.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u76EE"),le.abrupt("return",!1);case 9:if(m=J.findIndex(function(ke){return!ke.value}),!(m>-1)){le.next=13;break}return t.b.info("\u8BF7\u5148\u8F93\u5165 ".concat(_e[m]," \u9009\u9879\u7684\u5185\u5BB9")),le.abrupt("return",!1);case 13:if(k={question_title:Et,question_type:2,insert_id:Ae.insert_id,is_necessary:Math.ceil(Tt),max_choices:Qt,min_choices:_t,question_answers:J.map(function(ke){return ke.value})},!((N=Ae.question)!==null&&N!==void 0&&N.id)){le.next=20;break}return le.next=17,Object(S.w)(Object(p.a)({pollsId:Ae.question.id},k));case 17:E=le.sent,le.next=23;break;case 20:return le.next=22,Object(S.c)(Object(p.a)({exercise_bank_id:$t.topicId},k));case 22:E=le.sent;case 23:if(!(E.status===0)){le.next=30;break}return t.b.success("\u4FDD\u5B58\u6210\u529F"),pe("edit",-1),le.next=28,et({type:"polls/getExerciseBanks",payload:Object(p.a)({},$t)});case 28:G=le.sent,Rt&&(k.answers=k.question_answers.map(function(ke){return{answer_text:ke}}),pe("addContinue",Object(p.a)({type:2,insert_id:Ae.question.id,key:Ae.key,question_type:1},k),G.questions));case 30:case"end":return le.stop()}},jt)}));return function(Rt){return Mt.apply(this,arguments)}}(),Wt=function(){var jt,Rt,N,m;return r.a.createElement("aside",null,r.a.createElement("div",{className:Te.a.questionType},r.a.createElement("div",null,r.a.createElement("span",{className:"font16"},"\u7B2C",Ae.key,"\u9898"),r.a.createElement("span",{className:"font16 c-light-black ml10"},"\u591A\u9009\u9898"),r.a.createElement("span",{className:"tag-grey-eae ml10 mr10"},(Ae==null||((jt=Ae.question)===null||jt===void 0)?void 0:jt.is_necessary)===0?"\u9009\u7B54":"\u5FC5\u7B54"),"\u53EF\u9009",Ae==null||((Rt=Ae.question)===null||Rt===void 0)?void 0:Rt.min_choices,"-",Ae==null||((N=Ae.question)===null||N===void 0)?void 0:N.max_choices,"\u9879")),r.a.createElement("div",{className:"mt5"},r.a.createElement(ie.a,{value:Ae.question.question_title})),r.a.createElement("div",{className:Te.a.questionChoices},Ae==null||((m=Ae.question.answers)===null||m===void 0)?void 0:m.map(function(E,k){return r.a.createElement(h.a,null,r.a.createElement(i.a,null,r.a.createElement(Y.a,{key:k,disabled:!0},r.a.createElement("span",{className:"c-black font14"},E.answer_text))))})))},Zt=function(){return r.a.createElement("aside",null,r.a.createElement("div",{className:Te.a.questionType},r.a.createElement("div",null,r.a.createElement("span",{className:"font16 c-blue"},"\u591A\u9009\u9898")," ",r.a.createElement(Y.a,{checked:!!Tt,className:"ml10",onChange:function(Rt){return ot(Rt.target.checked)}},"\u5FC5\u7B54"))),r.a.createElement("p",{className:Te.a.titleWrap},r.a.createElement(U.a.TextArea,{autoSize:{maxRows:5},rows:1,value:Et,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE",onChange:function(Rt){return pt(Rt.target.value)}})),J.map(function(jt,Rt){return r.a.createElement(h.a,{className:Te.a.choiceWrap,key:Rt,gutter:[12,12]},r.a.createElement(i.a,null,r.a.createElement("span",{className:"font16"},"\u9009\u9879")),r.a.createElement(i.a,{className:Te.a.editorWrap,flex:"1"},r.a.createElement(U.a.TextArea,{autoSize:{maxRows:5},value:J[Rt].value,rows:1,disabled:!!jt.disabled,onChange:function(m){J[Rt].value=m.target.value,Q(Object(v.a)(J))}})),r.a.createElement(i.a,null,Rt>1&&r.a.createElement(I.a,{title:"\u5220\u9664"},r.a.createElement("i",{className:"".concat(Te.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){Q(J.filter(function(m,E){return E!==Rt})),jt.disabled&&on(!1)}}))))}),r.a.createElement(h.a,{gutter:[12,12]},r.a.createElement(i.a,null,"\u53EF\u9009"),r.a.createElement(i.a,null,r.a.createElement(O.a,{value:_t||"",style:{width:120},onChange:function(Rt){return st(Rt)}},r.a.createElement(O.a.Option,{value:""},"--"),J.map(function(jt,Rt){return r.a.createElement(O.a.Option,{value:String(Rt+2)},Rt+2)})),r.a.createElement("span",{className:"ml10 mr10"},"~"),r.a.createElement(O.a,{style:{width:120},value:Qt||"",onChange:function(Rt){return mn(Rt)}},r.a.createElement(O.a.Option,{value:""},"--"),J.map(function(jt,Rt){return r.a.createElement(O.a.Option,{value:String(Rt+2)},Rt+2)})))),r.a.createElement(h.a,{gutter:[12,12]},r.a.createElement(i.a,{flex:"1"},r.a.createElement(P.a,{type:"default",onClick:function(){J.find(function(Rt){return Rt.value==="\u5176\u5B83"})?Q([].concat(Object(v.a)(J.filter(function(Rt){return Rt.value!=="\u5176\u5B83"})),[{value:""},{value:"\u5176\u5B83",disabled:!0}])):Q([].concat(Object(v.a)(J),[{value:""}]))}},"\u65B0\u589E\u9009\u9879"),!Jt&&r.a.createElement(P.a,{type:"default",className:"ml20",onClick:function(){Q([].concat(Object(v.a)(J),[{disabled:!0,value:"\u5176\u5B83"}])),on(!0)}},"\u65B0\u589E\u5176\u5B83\u9009\u9879")),r.a.createElement(i.a,{className:"tl"},r.a.createElement(P.a,{type:"default",onClick:function(){var Rt;(Rt=Ae.question)!==null&&Rt!==void 0&&Rt.id?pe("edit",-1):pe("del",Ae.key)}},"\u53D6\u6D88"),r.a.createElement(P.a,{className:"ml20",type:"primary",onClick:function(){return Lt()}},"\u4FDD\u5B58"),r.a.createElement(P.a,{className:"ml20",type:"primary",onClick:function(){return Lt(!0)}},"\u4FDD\u5B58\u5E76\u7EE7\u7EED"))))};return r.a.createElement("section",{className:Te.a.wrap},Ne!==Ae.key&&Wt(),Ne===Ae.key&&Zt())},Ce=Object(L.a)(function(Ee){var Ie=Ee.problemset,Be=Ee.loading,Je=Ee.globalSetting;return{problemset:Ie,globalSetting:Je,loading:Be.effects}},null,null,{forwardRef:!0})(Object(y.forwardRef)(we)),Re=F("7Kak"),ue=F("9yH6"),q=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Fe=function(Ie,Be){var Je=Ie.problemset,ze=Ie.globalSetting,ut=Ie.loading,et=Ie.dispatch,Ze=Ie.onRef,Ve=Ze===void 0?function(){}:Ze,Le=Ie.editData,dt=Ie.editKey,Ae=Ie.callback,Ne=Ie.showAnswerTip,pe=Ne===void 0?!0:Ne,he=Object(d.a)(Ie,["problemset","globalSetting","loading","dispatch","onRef","editData","editKey","callback","showAnswerTip"]),de=Object(y.useState)([]),z=Object(b.a)(de,2),J=z[0],Q=z[1],te=Object(y.useState)(),be=Object(b.a)(te,2),Oe=be[0],Pe=be[1],tt=Object(y.useState)([]),ct=Object(b.a)(tt,2),qe=ct[0],gt=ct[1],bt=Object(y.useState)(""),at=Object(b.a)(bt,2),Et=at[0],pt=at[1],yt=Object(y.useState)(0),$e=Object(b.a)(yt,2),ft=$e[0],Dt=$e[1],Ct=Object(y.useState)(!1),nt=Object(b.a)(Ct,2),Tt=nt[0],ot=nt[1],ht=Object(y.useState)(!1),Ot=Object(b.a)(ht,2),Jt=Ot[0],on=Ot[1],$t=Object(w.i)();Object(y.useEffect)(function(){var Ft,_t,st,Lt,Wt,Zt;if(!(Le!=null&&(Ft=Le.question)!==null&&Ft!==void 0&&Ft.question_title)){Q([{disabled:!1,value:""},{disabled:!1,value:""},{disabled:!1,value:""},{disabled:!1,value:""}]),ot(!1),pt(""),on(!1);return}pt(Le==null||((_t=Le.question)===null||_t===void 0)?void 0:_t.question_title),ot(!!(Le!=null&&(st=Le.question)!==null&&st!==void 0&&st.is_necessary)),Q(Le==null||((Lt=Le.question)===null||Lt===void 0)?void 0:Lt.answers.map(function(Mt){return{value:Mt.answer_text,disabled:Mt.answer_text==="\u5176\u5B83"}})),on(!!(Le!=null&&(Wt=Le.question)!==null&&Wt!==void 0&&(Zt=Wt.answers)!==null&&Zt!==void 0&&Zt.find(function(Mt){return Mt.answer_text==="\u5176\u5B83"})))},[Le]),Object(y.useImperativeHandle)(Be,function(){return{onSave:On}});var On=function(){var Ft=Object(_.a)(c.a.mark(function _t(st){var Lt,Wt,Zt,Mt,jt;return c.a.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(Et){N.next=3;break}return t.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u76EE"),N.abrupt("return",!1);case 3:if(Wt=J.findIndex(function(m){return!m.value}),!(Wt>-1)){N.next=7;break}return t.b.info("\u8BF7\u5148\u8F93\u5165 ".concat(q[Wt]," \u9009\u9879\u7684\u5185\u5BB9")),N.abrupt("return",!1);case 7:if(Mt={question_title:Et,question_type:1,insert_id:Le.insert_id,is_necessary:Math.ceil(Tt),question_answers:J.map(function(m){return m.value})},!((Lt=Le.question)!==null&&Lt!==void 0&&Lt.id)){N.next=14;break}return N.next=11,Object(S.w)(Object(p.a)({pollsId:Le.question.id},Mt));case 11:Zt=N.sent,N.next=17;break;case 14:return N.next=16,Object(S.c)(Object(p.a)({exercise_bank_id:$t.topicId},Mt));case 16:Zt=N.sent;case 17:if(!(Zt.status===0)){N.next=24;break}return t.b.success("\u4FDD\u5B58\u6210\u529F"),Ae("edit",-1),N.next=22,et({type:"polls/getExerciseBanks",payload:Object(p.a)({},$t)});case 22:jt=N.sent,st&&(Mt.answers=Mt.question_answers.map(function(m){return{answer_text:m}}),Ae("addContinue",Object(p.a)({type:1,insert_id:Le.question.id,key:Le.key,question_type:1},Mt),jt.questions));case 24:case"end":return N.stop()}},_t)}));return function(st){return Ft.apply(this,arguments)}}(),Un=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu current",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-xiangshangyi current",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiangxiayi current",id:"down"},{name:"\u6DFB\u52A0",icon:"iconfont c-green ml30 icon-tianjia current",id:"add"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjidaibeijing current",id:"edit"}],Qt=function(){var Ft=Object(_.a)(c.a.mark(function _t(st){var Lt,Wt;return c.a.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:Mt.t0=st.id,Mt.next=Mt.t0==="del"?3:Mt.t0==="up"||Mt.t0==="down"?5:Mt.t0==="edit"?9:Mt.t0==="add"?11:13;break;case 3:return C.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk:function(){return Object(_.a)(c.a.mark(function Rt(){var N;return c.a.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.next=2,Object(S.e)({pollsId:Le==null||((N=Le.question)===null||N===void 0)?void 0:N.id});case 2:et({type:"polls/getExerciseBanks",payload:Object(p.a)({},$t)});case 3:case"end":return E.stop()}},Rt)}))()}}),Mt.abrupt("break",13);case 5:return Mt.next=7,Object(S.i)({pollsId:Le==null||((Lt=Le.question)===null||Lt===void 0)?void 0:Lt.id,opr:st.id});case 7:return et({type:"polls/getExerciseBanks",payload:Object(p.a)({},$t)}),Mt.abrupt("break",13);case 9:return Ae("edit",Le.key),Mt.abrupt("break",13);case 11:return Ae("add",{type:1,key:Le.key,insert_id:Le==null||((Wt=Le.question)===null||Wt===void 0)?void 0:Wt.id,question_type:1}),Mt.abrupt("break",13);case 13:case"end":return Mt.stop()}},_t)}));return function(st){return Ft.apply(this,arguments)}}(),mn=function(){var _t,st;return r.a.createElement("aside",null,r.a.createElement("div",{className:Te.a.questionType},r.a.createElement("div",null,r.a.createElement("span",{className:"font16"},"\u7B2C",Le.key,"\u9898"),r.a.createElement("span",{className:"font16 c-light-black ml10"},"\u5355\u9009\u9898"),r.a.createElement("span",{className:"tag-grey-eae ml10"},(Le==null||((_t=Le.question)===null||_t===void 0)?void 0:_t.is_necessary)===0?"\u9009\u7B54":"\u5FC5\u7B54"))),r.a.createElement("div",{className:"mt5"},r.a.createElement(ie.a,{value:Le.question.question_title})),r.a.createElement("div",{className:Te.a.questionChoices},Le==null||((st=Le.question.answers)===null||st===void 0)?void 0:st.map(function(Lt,Wt){return r.a.createElement(h.a,null,r.a.createElement(i.a,null,r.a.createElement(ue.a,{key:Wt,disabled:!0})),r.a.createElement(i.a,{flex:"1"},r.a.createElement("span",{className:"c-black font14"},Lt.answer_text)))})))},Tn=function(){return r.a.createElement("aside",null,r.a.createElement("div",{className:Te.a.questionType},r.a.createElement("div",null,r.a.createElement("span",{className:"font16 c-blue"},"\u5355\u9009\u9898")," ",r.a.createElement(Y.a,{checked:!!Tt,className:"ml10",onChange:function(st){return ot(st.target.checked)}},"\u5FC5\u7B54"))),r.a.createElement("p",{className:Te.a.titleWrap},r.a.createElement(U.a.TextArea,{autoSize:{maxRows:5},rows:1,value:Et,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE",onChange:function(st){return pt(st.target.value)}})),J.map(function(_t,st){return r.a.createElement(h.a,{className:Te.a.choiceWrap,key:st,gutter:[12,12]},r.a.createElement(i.a,null,r.a.createElement("span",{className:"font16"},"\u9009\u9879")),r.a.createElement(i.a,{className:Te.a.editorWrap,flex:"1"},r.a.createElement(U.a.TextArea,{autoSize:{maxRows:5},value:J[st].value,rows:1,disabled:J[st].value==="\u5176\u5B83",onChange:function(Wt){J[st].value=Wt.target.value,Q(Object(v.a)(J))}})),r.a.createElement(i.a,null,st>1&&r.a.createElement(I.a,{title:"\u5220\u9664"},r.a.createElement("i",{className:"".concat(Te.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){Q(J.filter(function(Wt,Zt){return Zt!==st})),_t.disabled&&on(!1)}}))))}),r.a.createElement(h.a,{gutter:[12,12]},r.a.createElement(i.a,{flex:"1"},r.a.createElement(P.a,{type:"default",onClick:function(){J.find(function(st){return st.value==="\u5176\u5B83"})?Q([].concat(Object(v.a)(J.filter(function(st){return st.value!=="\u5176\u5B83"})),[{value:""},{value:"\u5176\u5B83",disabled:!0}])):Q([].concat(Object(v.a)(J),[{value:""}])),\u65B0\u589E\u9009\u9879}}),!Jt&&r.a.createElement(P.a,{type:"default",className:"ml20",onClick:function(){Q([].concat(Object(v.a)(J),[{disabled:!0,value:"\u5176\u5B83"}])),on(!0)}},"\u65B0\u589E\u5176\u5B83\u9009\u9879")),r.a.createElement(i.a,{className:"tl"},r.a.createElement(P.a,{type:"default",onClick:function(){var st;(st=Le.question)!==null&&st!==void 0&&st.id?Ae("edit",-1):Ae("del",Le.key)}},"\u53D6\u6D88"),r.a.createElement(P.a,{className:"ml20",type:"primary",onClick:function(){return On()}},"\u4FDD\u5B58"),r.a.createElement(P.a,{className:"ml20",type:"primary",onClick:function(){return On(!0)}},"\u4FDD\u5B58\u5E76\u7EE7\u7EED"))))};return r.a.createElement("section",{className:Te.a.wrap},dt!==Le.key&&mn(),dt===Le.key&&Tn())},We=Object(L.a)(function(Ee){var Ie=Ee.problemset,Be=Ee.loading,Je=Ee.globalSetting;return{problemset:Ie,globalSetting:Je,loading:Be.effects}},null,null,{forwardRef:!0})(Object(y.forwardRef)(Fe)),He=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Ge=function(Ie,Be){var Je=Ie.problemset,ze=Ie.globalSetting,ut=Ie.loading,et=Ie.dispatch,Ze=Ie.onRef,Ve=Ze===void 0?function(){}:Ze,Le=Ie.editData,dt=Ie.showAnswerTip,Ae=dt===void 0?!0:dt,Ne=Ie.editKey,pe=Ie.callback,he=Object(d.a)(Ie,["problemset","globalSetting","loading","dispatch","onRef","editData","showAnswerTip","editKey","callback"]),de=Object(y.useState)(""),z=Object(b.a)(de,2),J=z[0],Q=z[1],te=Object(y.useState)(!0),be=Object(b.a)(te,2),Oe=be[0],Pe=be[1],tt=Object(w.i)();Object(y.useEffect)(function(){var Et,pt,yt;if(!(Le!=null&&(Et=Le.question)!==null&&Et!==void 0&&Et.question_title)){Pe(!0),Q("");return}Q(Le==null||((pt=Le.question)===null||pt===void 0)?void 0:pt.question_title),Pe(!!(Le!=null&&(yt=Le.question)!==null&&yt!==void 0&&yt.is_necessary))},[Le]),Object(y.useImperativeHandle)(Be,function(){return{onSave:ct}});var ct=function(){var Et=Object(_.a)(c.a.mark(function pt(yt){var $e,ft,Dt,Ct;return c.a.wrap(function(Tt){for(;;)switch(Tt.prev=Tt.next){case 0:if(J){Tt.next=3;break}return t.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u76EE"),Tt.abrupt("return",!1);case 3:if(Dt={question_title:J,question_type:3,insert_id:Le.insert_id,is_necessary:Math.ceil(Oe)},!(($e=Le.question)!==null&&$e!==void 0&&$e.id)){Tt.next=10;break}return Tt.next=7,Object(S.w)(Object(p.a)({pollsId:Le.question.id},Dt));case 7:ft=Tt.sent,Tt.next=13;break;case 10:return Tt.next=12,Object(S.c)(Object(p.a)({exercise_bank_id:tt.topicId},Dt));case 12:ft=Tt.sent;case 13:if(!(ft.status===0)){Tt.next=20;break}return t.b.success("\u4FDD\u5B58\u6210\u529F"),pe("edit",-1),Tt.next=18,et({type:"polls/getExerciseBanks",payload:Object(p.a)({},tt)});case 18:Ct=Tt.sent,yt&&pe("addContinue",Object(p.a)({type:3,insert_id:Le.question.id,key:Le.key,question_type:1},Dt),Ct.questions);case 20:case"end":return Tt.stop()}},pt)}));return function(yt){return Et.apply(this,arguments)}}(),qe=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu current",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-xiangshangyi current",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiangxiayi current",id:"down"},{name:"\u6DFB\u52A0",icon:"iconfont c-green ml30 icon-tianjia current",id:"add"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjidaibeijing current",id:"edit"}],gt=function(){var Et=Object(_.a)(c.a.mark(function pt(yt){var $e,ft;return c.a.wrap(function(Ct){for(;;)switch(Ct.prev=Ct.next){case 0:Ct.t0=yt.id,Ct.next=Ct.t0==="del"?3:Ct.t0==="up"||Ct.t0==="down"?5:Ct.t0==="edit"?9:Ct.t0==="add"?11:13;break;case 3:return C.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk:function(){return Object(_.a)(c.a.mark(function Tt(){var ot;return c.a.wrap(function(Ot){for(;;)switch(Ot.prev=Ot.next){case 0:return Ot.next=2,Object(S.e)({pollsId:Le==null||((ot=Le.question)===null||ot===void 0)?void 0:ot.id});case 2:et({type:"polls/getExerciseBanks",payload:Object(p.a)({},tt)});case 3:case"end":return Ot.stop()}},Tt)}))()}}),Ct.abrupt("break",13);case 5:return Ct.next=7,Object(S.i)({pollsId:Le==null||(($e=Le.question)===null||$e===void 0)?void 0:$e.id,opr:yt.id});case 7:return et({type:"polls/getExerciseBanks",payload:Object(p.a)({},tt)}),Ct.abrupt("break",13);case 9:return pe("edit",Le.key),Ct.abrupt("break",13);case 11:return pe("add",{type:3,key:Le.key,insert_id:Le==null||((ft=Le.question)===null||ft===void 0)?void 0:ft.id,question_type:3}),Ct.abrupt("break",13);case 13:case"end":return Ct.stop()}},pt)}));return function(yt){return Et.apply(this,arguments)}}(),bt=function(){var pt,yt;return r.a.createElement("aside",null,r.a.createElement("div",{className:Te.a.questionType},r.a.createElement("div",null,r.a.createElement("span",{className:"font16"},"\u7B2C",Le.key,"\u9898"),r.a.createElement("span",{className:"font16 c-light-black ml10"},"\u4E3B\u89C2\u9898"),r.a.createElement("span",{className:"tag-grey-eae ml10 mr10"},(Le==null||((pt=Le.question)===null||pt===void 0)?void 0:pt.is_necessary)===0?"\u9009\u7B54":"\u5FC5\u7B54"))),r.a.createElement("div",{className:"mt5"},r.a.createElement(ie.a,{value:Le.question.question_title}),r.a.createElement("div",{className:"mt15"},r.a.createElement(U.a.TextArea,{placeholder:"\u5728\u6B64\u586B\u5165\u7B54\u6848",rows:5,disabled:!0}))),r.a.createElement("div",{className:Te.a.questionChoices},Le==null||((yt=Le.question.answers)===null||yt===void 0)?void 0:yt.map(function($e,ft){return r.a.createElement(h.a,null,r.a.createElement(i.a,null,r.a.createElement(Y.a,{key:ft,disabled:!0},r.a.createElement("span",{className:"c-black font14"},$e.answer_text))))})))},at=function(){return r.a.createElement("aside",null,r.a.createElement("div",{className:Te.a.questionType},r.a.createElement("div",null,r.a.createElement("span",{className:"font16 c-blue"},"\u4E3B\u89C2\u9898")," ",r.a.createElement(Y.a,{checked:!!Oe,className:"ml10",onChange:function(yt){return Pe(yt.target.checked)}},"\u5FC5\u7B54"))),r.a.createElement("p",{className:Te.a.titleWrap},r.a.createElement(U.a.TextArea,{autoSize:{maxRows:5},rows:1,value:J,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE",onChange:function(yt){return Q(yt.target.value)}})),Ae?r.a.createElement("p",{className:Te.a.titleWrap},r.a.createElement("span",{className:Te.a.required},"*"),r.a.createElement("span",{className:Te.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",r.a.createElement("span",{className:Te.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))):null,r.a.createElement(h.a,{gutter:[12,12]},r.a.createElement(i.a,{flex:"1"}),r.a.createElement(i.a,{className:"tl"},r.a.createElement(P.a,{type:"default",onClick:function(){var yt;(yt=Le.question)!==null&&yt!==void 0&&yt.id?pe("edit",-1):pe("del",Le.key)}},"\u53D6\u6D88"),r.a.createElement(P.a,{className:"ml20",type:"primary",onClick:function(){return ct()}},"\u4FDD\u5B58"),r.a.createElement(P.a,{className:"ml20",type:"primary",onClick:function(){return ct(!0)}},"\u4FDD\u5B58\u5E76\u7EE7\u7EED"))))};return r.a.createElement("section",{className:Te.a.wrap},Ne!==Le.key&&bt(),Ne===Le.key&&at())},it=Object(L.a)(function(Ee){var Ie=Ee.problemset,Be=Ee.loading,Je=Ee.globalSetting;return{problemset:Ie,globalSetting:Je,loading:Be.effects}},null,null,{forwardRef:!0})(Object(y.forwardRef)(Ge)),De=F("BdwD"),Ue=F("yk+Y"),Xe=F.n(Ue),$=F("fJjg"),me=function(Ie){var Be,Je,ze,ut,et,Ze,Ve,Le,dt,Ae,Ne,pe,he,de,z,J,Q,te=Ie.polls,be=Ie.globalSetting,Oe=Ie.loading,Pe=Ie.user,tt=Ie.dispatch,ct=Object(d.a)(Ie,["polls","globalSetting","loading","user","dispatch"]),qe=Object(w.i)(),gt=Pe.userInfo,bt=T.a.useForm(),at=Object(b.a)(bt,1),Et=at[0],pt=Object(y.useState)([]),yt=Object(b.a)(pt,2),$e=yt[0],ft=yt[1],Dt=Object(y.useState)(!1),Ct=Object(b.a)(Dt,2),nt=Ct[0],Tt=Ct[1],ot=Object(y.useState)(-1),ht=Object(b.a)(ot,2),Ot=ht[0],Jt=ht[1],on=[{name:"\u5355\u9009\u9898",id:1},{name:"\u591A\u9009\u9898",id:2},{name:"\u4E3B\u89C2\u9898",id:3}],$t=Object(y.useRef)();Object(y.useEffect)(function(){var Ft;if((Ft=te.exerciseBanks)!==null&&Ft!==void 0&&Ft.questions){var _t,st,Lt,Wt,Zt;ft(Object(v.a)((_t=te.exerciseBanks)===null||_t===void 0?void 0:_t.questions)),Et.setFieldsValue({exercise_name:(st=te.exerciseBanks)===null||st===void 0||((Lt=st.poll)===null||Lt===void 0)?void 0:Lt.name,exercise_description:(Wt=te.exerciseBanks)===null||Wt===void 0||((Zt=Wt.poll)===null||Zt===void 0)?void 0:Zt.description})}},[te.exerciseBanks]),Object(y.useEffect)(function(){tt({type:"polls/getExerciseBanks",payload:Object(p.a)({},qe)})},[qe.categoryId]);var On=function(){var Ft=Object(_.a)(c.a.mark(function _t(){var st;return c.a.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return Wt.next=2,Et.validateFields();case 2:return st=Et.getFieldValue(),st.is_md=!0,st.topicId=qe.topicId,Tt(!1),Wt.next=8,Object(S.v)(Object(p.a)({},st));case 8:tt({type:"polls/getExerciseBanks",payload:Object(p.a)({},qe)});case 9:case"end":return Wt.stop()}},_t)}));return function(){return Ft.apply(this,arguments)}}(),Un=function(){var Ft=Object(_.a)(c.a.mark(function _t(st){var Lt;return c.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:if(Lt=$t==null?void 0:$t.current,!(Ot!==-1)){Zt.next=4;break}return t.b.error("\u4E0D\u80FD\u540C\u65F6\u7F16\u8F91\u4E24\u9898"),Zt.abrupt("return");case 4:Jt($e.length+1),ft([].concat(Object(v.a)($e),[{question:{question_type:st}}]));case 6:case"end":return Zt.stop()}},_t)}));return function(st){return Ft.apply(this,arguments)}}(),Qt=function(){tt({type:"userDetail/setActionTabs",payload:{key:"UserDetail-SendToClass",params:{object_id:[qe.topicId],object_type:"poll"}}})},mn=function(_t,st,Lt){switch(_t){case"edit":Jt(st);break;case"add":if(Ot!=-1){t.b.error("\u4E0D\u80FD\u540C\u65F6\u7F16\u8F91\u4E24\u9898");return}$e.splice((st==null?void 0:st.key)+1,0,{insert_id:st==null?void 0:st.insert_id,question:Object(p.a)({},st)}).slice(),ft(Object(v.a)($e)),Jt((st==null?void 0:st.key)+1);break;case"addContinue":Lt.splice(st==null?void 0:st.key,0,{insert_id:st==null?void 0:st.insert_id,question:Object(p.a)({},st)}).slice(),ft(Object(v.a)(Lt)),Jt((st==null?void 0:st.key)+1);break;case"del":$e.splice(st-1,1),ft(Object(v.a)($e)),Jt(-1);break}},Tn=function(){return $e==null?void 0:$e.map(function(_t,st){var Lt;if(_t.key=st+1,_t.len=$e.length,_t.question.question_type===1)return r.a.createElement("aside",null,r.a.createElement(We,{ref:$t,editKey:Ot,callback:mn,editData:_t}),r.a.createElement(a.a,null));if(_t.question.question_type===2)return r.a.createElement("aside",null,r.a.createElement(Ce,{ref:$t,editKey:Ot,callback:mn,editData:_t}),r.a.createElement(a.a,null));if(((Lt=_t.question)===null||Lt===void 0?void 0:Lt.question_type)===3)return r.a.createElement("aside",null,r.a.createElement(it,{ref:$t,editKey:Ot,callback:mn,editData:_t}),r.a.createElement(a.a,null))})};return r.a.createElement("section",{className:"edu-container"},r.a.createElement("section",{className:"animated fadeIn"},r.a.createElement("aside",{className:"mt10"},gt&&r.a.createElement(u.a,{separator:">"},r.a.createElement(u.a.Item,null,r.a.createElement(D.a,{to:"/users/".concat(gt.login,"/topics/personal")},"\u6211\u7684\u8BFE\u5802\u8D44\u6E90")),r.a.createElement(u.a.Item,null,"\u8BE6\u60C5"))),r.a.createElement("aside",{className:[Xe.a.title,"mt20"].join(" ")},r.a.createElement(h.a,{style:{width:"100%"}},r.a.createElement(i.a,{flex:"1"},r.a.createElement("strong",{className:"font20 ml5"},(Be=te.exerciseBanks)===null||Be===void 0||((Je=Be.poll)===null||Je===void 0)?void 0:Je.name)),r.a.createElement(i.a,null)))),r.a.createElement("section",{className:[Xe.a.bg,"pl30","pr30","pb30","mt20","relative"].join(" ")},r.a.createElement("div",{className:Xe.a.export},((ze=te.exerciseBanks)===null||ze===void 0?void 0:ze.authorize)&&r.a.createElement(r.a.Fragment,null,r.a.createElement("a",{onClick:function(_t){_t.preventDefault(),C.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664?",onOk:function(){var st=Object(_.a)(c.a.mark(function Wt(){var Zt;return c.a.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:return jt.next=2,Object(M.g)({object_type:"normal",object_id:[qe.topicId]});case 2:Zt=jt.sent,Zt.status===0&&L.d.push("/users/".concat(qe.username,"/topics/personal"));case 4:case"end":return jt.stop()}},Wt)}));function Lt(){return st.apply(this,arguments)}return Lt}()})}},"\u5220\u9664"),r.a.createElement(D.a,{to:"/users/".concat(gt.login,"/topics/").concat(qe.topicId,"/").concat(qe.topictype,"/poll/edit")},"\u7F16\u8F91")),r.a.createElement("a",{onClick:function(_t){_t.preventDefault(),Qt()}},"\u53D1\u9001")),r.a.createElement(j.a,{className:Xe.a.tabs},r.a.createElement(j.a.TabPane,{tab:r.a.createElement("span",{className:"font16 pt10 pb12"},"\u5185\u5BB9\u8BE6\u60C5"),key:"1"},r.a.createElement("div",{className:"c-light-black"},(ut=te.exerciseBanks)===null||ut===void 0||((et=ut.poll)===null||et===void 0)?void 0:et.description))),!nt&&r.a.createElement("aside",null,r.a.createElement("div",{className:Xe.a.containerDesc},r.a.createElement("div",null,(Ze=te.exerciseBanks)===null||Ze===void 0||((Ve=Ze.poll)===null||Ve===void 0)?void 0:Ve.name),r.a.createElement("div",null,r.a.createElement(I.a,{title:"\u7F16\u8F91"},r.a.createElement("span",{onClick:function(){return Tt(!0)},className:"iconfont c-green ml30 icon-bianjidaibeijing"})))),r.a.createElement("div",{className:"c-light-black"},(Le=te.exerciseBanks)===null||Le===void 0||((dt=Le.poll)===null||dt===void 0)?void 0:dt.description)),nt&&r.a.createElement(T.a,{layout:"vertical",form:Et},r.a.createElement(T.a.Item,{name:"exercise_name",label:"\u95EE\u5377\u6807\u9898\uFF1A",rules:[{required:!0,message:"\u8BF7\u586B\u5199\u95EE\u5377\u6807\u9898"}]},r.a.createElement(U.a,{maxLength:60,placeholder:"\u95EE\u5377\u6807\u9898\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"})),r.a.createElement(T.a.Item,{label:"\u95EE\u5377\u987B\u77E5\uFF1A",name:"exercise_description"},r.a.createElement(U.a.TextArea,{rows:6,placeholder:"\u8BF7\u5728\u6B64\u8F93\u5165\u672C\u6B21\u95EE\u5377\u7B54\u9898\u7684\u76F8\u5173\u8BF4\u660E\uFF0C\u6700\u5927\u9650\u5236100\u4E2A\u5B57\u7B26"})),r.a.createElement(T.a.Item,{className:"tr"},r.a.createElement(P.a,{type:"primary",onClick:function(){On()}},"\u4FDD\u5B58")))),$e!=""&&r.a.createElement("section",{className:"mt20"},r.a.createElement(h.a,null,r.a.createElement(i.a,{flex:1},r.a.createElement("span",{className:"c-light-black mr20"},"\u5355\u9009\u9898 ",(Ae=te.exerciseBanks)===null||Ae===void 0||((Ne=Ae.question_types)===null||Ne===void 0)?void 0:Ne.q_singles," \u9898"),r.a.createElement("span",{className:"c-light-black mr20"},"\u591A\u9009\u9898 ",(pe=te.exerciseBanks)===null||pe===void 0||((he=pe.question_types)===null||he===void 0)?void 0:he.q_doubles," \u9898"),r.a.createElement("span",{className:"c-light-black"},"\u4E3B\u89C2\u9898 ",(de=te.exerciseBanks)===null||de===void 0||((z=de.question_types)===null||z===void 0)?void 0:z.q_mains," \u9898")),r.a.createElement(i.a,{className:"c-light-black"},"\u5408\u8BA1"," ",r.a.createElement("span",{className:"c-orange"},(J=te.exerciseBanks)===null||J===void 0||((Q=J.question_types)===null||Q===void 0)?void 0:Q.q_counts)," ","\u9898"))),r.a.createElement("section",{className:[Xe.a.bg,"pt30","pl20","pr20","pb20","mt20"].join(" ")},$e!=""&&Tn(),$e==""&&r.a.createElement(De.a,null)),r.a.createElement($.a,null))},xe=ce.default=Object(L.a)(function(Ee){var Ie=Ee.polls,Be=Ee.loading,Je=Ee.user,ze=Ee.globalSetting;return{polls:Ie,globalSetting:ze,user:Je,loading:Be.effects}})(me)},"/cxE":function(Ke,ce,F){"use strict";F.d(ce,"f",function(){return R}),F.d(ce,"g",function(){return U}),F.d(ce,"h",function(){return A}),F.d(ce,"e",function(){return W}),F.d(ce,"b",function(){return j}),F.d(ce,"c",function(){return e}),F.d(ce,"d",function(){return C}),F.d(ce,"a",function(){return f});class ee{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(h){setTimeout(()=>{throw h.stack?new Error(h.message+`
|
|
|
|
`+h.stack):h},0)}}emit(h){this.listeners.forEach(l=>{l(h)})}onUnexpectedError(h){this.unexpectedErrorHandler(h),this.emit(h)}onUnexpectedExternalError(h){this.unexpectedErrorHandler(h)}}const P=new ee;function R(h){W(h)||P.onUnexpectedError(h);return}function U(h){W(h)||P.onUnexpectedExternalError(h);return}function A(h){if(h instanceof Error){let{name:l,message:i}=h;const s=h.stacktrace||h.stack;return{$isError:!0,name:l,message:i,stack:s}}return h}const I="Canceled";function W(h){return h instanceof Error&&h.name===I&&h.message===I}function j(){const h=new Error(I);return h.name=h.message,h}function e(h){return h?new Error(`Illegal argument: ${h}`):new Error("Illegal argument")}function C(h){return h?new Error(`Illegal state: ${h}`):new Error("Illegal state")}class f extends Error{constructor(h){super("NotSupported");h&&(this.message=h)}}},"24hK":function(Ke,ce,F){"use strict";F.d(ce,"a",function(){return P});class ee{constructor(R){this.element=R,this.next=ee.Undefined,this.prev=ee.Undefined}}ee.Undefined=new ee(void 0);class P{constructor(){this._first=ee.Undefined,this._last=ee.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===ee.Undefined}clear(){let R=this._first;for(;R!==ee.Undefined;){const U=R.next;R.prev=ee.Undefined,R.next=ee.Undefined,R=U}this._first=ee.Undefined,this._last=ee.Undefined,this._size=0}unshift(R){return this._insert(R,!1)}push(R){return this._insert(R,!0)}_insert(R,U){const A=new ee(R);if(this._first===ee.Undefined)this._first=A,this._last=A;else if(U){const W=this._last;this._last=A,A.prev=W,W.next=A}else{const W=this._first;this._first=A,A.next=W,W.prev=A}this._size+=1;let I=!1;return()=>{I||(I=!0,this._remove(A))}}shift(){if(this._first===ee.Undefined)return;{const R=this._first.element;return this._remove(this._first),R}}pop(){if(this._last===ee.Undefined)return;{const R=this._last.element;return this._remove(this._last),R}}_remove(R){if(R.prev!==ee.Undefined&&R.next!==ee.Undefined){const U=R.prev;U.next=R.next,R.next.prev=U}else R.prev===ee.Undefined&&R.next===ee.Undefined?(this._first=ee.Undefined,this._last=ee.Undefined):R.next===ee.Undefined?(this._last=this._last.prev,this._last.next=ee.Undefined):R.prev===ee.Undefined&&(this._first=this._first.next,this._first.prev=ee.Undefined);this._size-=1}*[Symbol.iterator](){let R=this._first;for(;R!==ee.Undefined;)yield R.element,R=R.next}}},"3/fG":function(Ke,ce,F){"use strict";F.d(ce,"a",function(){return P});function ee(R,U){let A;return U.length===0?A=R:A=R.replace(/\{(\d+)\}/g,function(I,W){const j=W[0];return typeof U[j]!="undefined"?U[j]:I}),A}function P(R,U,...A){return ee(U,A)}},"55Ip":function(Ke,ce,F){"use strict";F.d(ce,"a",function(){return n});var ee=F("Ty5D"),P=F("dI71"),R=F("q1tI"),U=F.n(R),A=F("YS25"),I=F("17x9"),W=F.n(I),j=F("wx14"),e=F("zLVn"),C=F("9R94"),f=function(d){Object(P.a)(g,d);function g(){for(var y,r=arguments.length,w=new Array(r),D=0;D<r;D++)w[D]=arguments[D];return y=d.call.apply(d,[this].concat(w))||this,y.history=Object(A.a)(y.props),y}var c=g.prototype;return c.render=function(){return U.a.createElement(ee.c,{history:this.history,children:this.props.children})},g}(U.a.Component),h=function(d){Object(P.a)(g,d);function g(){for(var y,r=arguments.length,w=new Array(r),D=0;D<r;D++)w[D]=arguments[D];return y=d.call.apply(d,[this].concat(w))||this,y.history=Object(A.b)(y.props),y}var c=g.prototype;return c.render=function(){return U.a.createElement(ee.c,{history:this.history,children:this.props.children})},g}(U.a.Component),l=function(g,c){return typeof g=="function"?g(c):g},i=function(g,c){return typeof g=="string"?Object(A.c)(g,null,null,c):g},s=function(g){return g},u=U.a.forwardRef;typeof u=="undefined"&&(u=s);function o(d){return!!(d.metaKey||d.altKey||d.ctrlKey||d.shiftKey)}var a=u(function(d,g){var c=d.innerRef,y=d.navigate,r=d.onClick,w=Object(e.a)(d,["innerRef","navigate","onClick"]),D=w.target,L=Object(j.a)({},w,{onClick:function(M){try{r&&r(M)}catch(H){throw M.preventDefault(),H}!M.defaultPrevented&&M.button===0&&(!D||D==="_self")&&!o(M)&&(M.preventDefault(),y())}});return s!==u?L.ref=g||c:L.ref=c,U.a.createElement("a",L)}),n=u(function(d,g){var c=d.component,y=c===void 0?a:c,r=d.replace,w=d.to,D=d.innerRef,L=Object(e.a)(d,["component","replace","to","innerRef"]);return U.a.createElement(ee.e.Consumer,null,function(S){S||Object(C.a)(!1);var M=S.history,H=i(l(w,S.location),S.location),O=H?M.createHref(H):"",K=Object(j.a)({},L,{href:O,navigate:function(){var ie=l(w,S.location),re=r?M.replace:M.push;re(ie)}});return s!==u?K.ref=g||D:K.innerRef=D,U.a.createElement(y,K)})});if(!1)var t,_;var p=function(g){return g},v=U.a.forwardRef;typeof v=="undefined"&&(v=p);function x(){for(var d=arguments.length,g=new Array(d),c=0;c<d;c++)g[c]=arguments[c];return g.filter(function(y){return y}).join(" ")}var T=v(function(d,g){var c=d["aria-current"],y=c===void 0?"page":c,r=d.activeClassName,w=r===void 0?"active":r,D=d.activeStyle,L=d.className,S=d.exact,M=d.isActive,H=d.location,O=d.sensitive,K=d.strict,Y=d.style,ie=d.to,re=d.innerRef,Te=Object(e.a)(d,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return U.a.createElement(ee.e.Consumer,null,function(_e){_e||Object(C.a)(!1);var we=H||_e.location,Ce=i(l(ie,we),we),Re=Ce.pathname,ue=Re&&Re.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),q=ue?Object(ee.f)(we.pathname,{path:ue,exact:S,sensitive:O,strict:K}):null,Fe=!!(M?M(q,we):q),We=Fe?x(L,w):L,He=Fe?Object(j.a)({},Y,{},D):Y,Ge=Object(j.a)({"aria-current":Fe&&y||null,className:We,style:He,to:Ce},Te);return p!==v?Ge.ref=g||re:Ge.innerRef=re,U.a.createElement(n,Ge)})});if(!1)var b},"5VLF":function(Ke,ce,F){"use strict";var ee,P;function R(U,A,I){var W=function(j,e){return U.js_beautify(j,e)};return W.js=U.js_beautify,W.css=A.css_beautify,W.html=I.html_beautify,W.js_beautify=U.js_beautify,W.css_beautify=A.css_beautify,W.html_beautify=I.html_beautify,W}!(ee=[F("6UM0"),F("TXwP"),F("psGv")],P=function(U,A,I){return R(U,A,I)}.apply(ce,ee),P!==void 0&&(Ke.exports=P))},"5Y4S":function(Ke,ce,F){"use strict";F.d(ce,"a",function(){return R});var ee=F("MNsG");const P=ee.b.performance&&typeof ee.b.performance.now=="function";class R{constructor(U){this._highResolution=P&&U,this._startTime=this._now(),this._stopTime=-1}static create(U=!0){return new R(U)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?ee.b.performance.now():Date.now()}}},"6UM0":function(Ke,ce,F){var ee,P;(function(){var R;(function(){"use strict";var A=[function(e,C,f){var h=f(1).Beautifier,l=f(5).Options;function i(s,u){var o=new h(s,u);return o.beautify()}e.exports=i,e.exports.defaultOptions=function(){return new l}},function(e,C,f){var h=f(2).Output,l=f(3).Token,i=f(4),s=f(5).Options,u=f(7).Tokenizer,o=f(7).line_starters,a=f(7).positionable_operators,n=f(7).TOKEN;function t(O,K){return K.indexOf(O)!==-1}function _(O){return O.replace(/^\s+/g,"")}function p(O){for(var K={},Y=0;Y<O.length;Y++)K[O[Y].replace(/-/g,"_")]=O[Y];return K}function v(O,K){return O&&O.type===n.RESERVED&&O.text===K}function x(O,K){return O&&O.type===n.RESERVED&&t(O.text,K)}var T=["case","return","do","if","throw","else","await","break","continue","async"],b=["before-newline","after-newline","preserve-newline"],d=p(b),g=[d.before_newline,d.preserve_newline],c={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function y(O,K){if(K.multiline_frame||K.mode===c.ForInitializer||K.mode===c.Conditional)return;O.remove_indent(K.start_line_index)}function r(O){O=O.replace(i.allLineBreaks,`
|
|
`);for(var K=[],Y=O.indexOf(`
|
|
`);Y!==-1;)K.push(O.substring(0,Y)),O=O.substring(Y+1),Y=O.indexOf(`
|
|
`);return O.length&&K.push(O),K}function w(O){return O===c.ArrayLiteral}function D(O){return t(O,[c.Expression,c.ForInitializer,c.Conditional])}function L(O,K){for(var Y=0;Y<O.length;Y++){var ie=O[Y].trim();if(ie.charAt(0)!==K)return!1}return!0}function S(O,K){for(var Y=0,ie=O.length,re;Y<ie;Y++)if(re=O[Y],re&&re.indexOf(K)!==0)return!1;return!0}function M(O,K){K=K||{},this._source_text=O||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new s(K)}M.prototype.create_flags=function(O,K){var Y=0;O&&(Y=O.indentation_level,!this._output.just_added_newline()&&O.line_indent_level>Y&&(Y=O.line_indent_level));var ie={mode:K,parent:O,last_token:O?O.last_token:new l(n.START_BLOCK,""),last_word:O?O.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:Y,alignment:0,line_indent_level:O?O.line_indent_level:Y,start_line_index:this._output.get_line_number(),ternary_depth:0};return ie},M.prototype._reset=function(O){var K=O.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new h(this._options,K),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(c.BlockStatement);var Y=new u(O,this._options);return this._tokens=Y.tokenize(),O},M.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var O,K=this._reset(this._source_text),Y=this._options.eol;this._options.eol==="auto"&&(Y=`
|
|
`,K&&i.lineBreak.test(K||"")&&(Y=K.match(i.lineBreak)[0]));for(var ie=this._tokens.next();ie;)this.handle_token(ie),this._last_last_text=this._flags.last_token.text,this._flags.last_token=ie,ie=this._tokens.next();return O=this._output.get_code(Y),O},M.prototype.handle_token=function(O,K){O.type===n.START_EXPR?this.handle_start_expr(O):O.type===n.END_EXPR?this.handle_end_expr(O):O.type===n.START_BLOCK?this.handle_start_block(O):O.type===n.END_BLOCK?this.handle_end_block(O):O.type===n.WORD?this.handle_word(O):O.type===n.RESERVED?this.handle_word(O):O.type===n.SEMICOLON?this.handle_semicolon(O):O.type===n.STRING?this.handle_string(O):O.type===n.EQUALS?this.handle_equals(O):O.type===n.OPERATOR?this.handle_operator(O):O.type===n.COMMA?this.handle_comma(O):O.type===n.BLOCK_COMMENT?this.handle_block_comment(O,K):O.type===n.COMMENT?this.handle_comment(O,K):O.type===n.DOT?this.handle_dot(O):O.type===n.EOF?this.handle_eof(O):O.type===n.UNKNOWN?this.handle_unknown(O,K):this.handle_unknown(O,K)},M.prototype.handle_whitespace_and_comments=function(O,K){var Y=O.newlines,ie=this._options.keep_array_indentation&&w(this._flags.mode);if(O.comments_before)for(var re=O.comments_before.next();re;)this.handle_whitespace_and_comments(re,K),this.handle_token(re,K),re=O.comments_before.next();if(ie)for(var Te=0;Te<Y;Te+=1)this.print_newline(Te>0,K);else if(this._options.max_preserve_newlines&&Y>this._options.max_preserve_newlines&&(Y=this._options.max_preserve_newlines),this._options.preserve_newlines&&Y>1){this.print_newline(!1,K);for(var _e=1;_e<Y;_e+=1)this.print_newline(!0,K)}};var H=["async","break","continue","return","throw","yield"];M.prototype.allow_wrap_or_preserved_newline=function(O,K){if(K=K===void 0?!1:K,this._output.just_added_newline())return;var Y=this._options.preserve_newlines&&O.newlines||K,ie=t(this._flags.last_token.text,a)||t(O.text,a);if(ie){var re=t(this._flags.last_token.text,a)&&t(this._options.operator_position,g)||t(O.text,a);Y=Y&&re}if(Y)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(x(this._flags.last_token,H))return;this._output.set_wrap_point()}},M.prototype.print_newline=function(O,K){if(!K&&(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 Y=this._tokens.peek();this._flags.mode===c.Statement&&!(this._flags.if_block&&v(Y,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(O)&&(this._flags.multiline_frame=!0)},M.prototype.print_token_line_indentation=function(O){this._output.just_added_newline()&&(this._options.keep_array_indentation&&O.newlines&&(O.text==="["||w(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(O.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))},M.prototype.print_token=function(O){if(this._output.raw){this._output.add_raw_token(O);return}if(this._options.comma_first&&O.previous&&O.previous.type===n.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var K=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(K),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(O),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(O),this._output.non_breaking_space=!0,this._output.add_token(O.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},M.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},M.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))},M.prototype.set_mode=function(O){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,O),this._flags=this.create_flags(this._previous_flags,O),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},M.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===c.Statement&&y(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},M.prototype.start_of_object_property=function(){return this._flags.parent.mode===c.ObjectLiteral&&this._flags.mode===c.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||x(this._flags.last_token,["get","set"]))},M.prototype.start_of_statement=function(O){var K=!1;return K=K||x(this._flags.last_token,["var","let","const"])&&O.type===n.WORD,K=K||v(this._flags.last_token,"do"),K=K||!(this._flags.parent.mode===c.ObjectLiteral&&this._flags.mode===c.Statement)&&x(this._flags.last_token,H)&&!O.newlines,K=K||v(this._flags.last_token,"else")&&!(v(O,"if")&&!O.comments_before),K=K||this._flags.last_token.type===n.END_EXPR&&(this._previous_flags.mode===c.ForInitializer||this._previous_flags.mode===c.Conditional),K=K||this._flags.last_token.type===n.WORD&&this._flags.mode===c.BlockStatement&&!this._flags.in_case&&!(O.text==="--"||O.text==="++")&&this._last_last_text!=="function"&&O.type!==n.WORD&&O.type!==n.RESERVED,K=K||this._flags.mode===c.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||x(this._flags.last_token,["get","set"])),K?(this.set_mode(c.Statement),this.indent(),this.handle_whitespace_and_comments(O,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(O,x(O,["do","for","if","while"])),!0):!1},M.prototype.handle_start_expr=function(O){this.start_of_statement(O)||this.handle_whitespace_and_comments(O);var K=c.Expression;if(O.text==="["){if(this._flags.last_token.type===n.WORD||this._flags.last_token.text===")"){x(this._flags.last_token,o)&&(this._output.space_before_token=!0),this.print_token(O),this.set_mode(K),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}K=c.ArrayLiteral,w(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),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,K=c.ForInitializer):t(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,K=c.Conditional):t(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&O.whitespace_before===""?this._output.space_before_token=!1:(t(this._flags.last_token.text,o)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===n.EQUALS||this._flags.last_token.type===n.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(O);else if(this._flags.last_token.type===n.WORD){this._output.space_before_token=!1;var Y=this._tokens.peek(-3);if(this._options.space_after_named_function&&Y){var ie=this._tokens.peek(-4);x(Y,["async","function"])||Y.text==="*"&&x(ie,["async","function"])?this._output.space_before_token=!0:this._flags.mode===c.ObjectLiteral?(Y.text==="{"||Y.text===","||Y.text==="*"&&(ie.text==="{"||ie.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(O);(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===c.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(O,O.newlines),this.print_token(O),this.set_mode(K),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},M.prototype.handle_end_expr=function(O){for(;this._flags.mode===c.Statement;)this.restore_mode();this.handle_whitespace_and_comments(O),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(O,O.text==="]"&&w(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(O),this.restore_mode(),y(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===c.Conditional&&(this._previous_flags.mode=c.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},M.prototype.handle_start_block=function(O){this.handle_whitespace_and_comments(O);var K=this._tokens.peek(),Y=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===n.END_EXPR?(this.set_mode(c.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(c.BlockStatement):Y&&(t(Y.text,[":",","])&&t(K.type,[n.STRING,n.WORD,n.RESERVED])||t(K.text,["get","set","..."])&&t(Y.type,[n.WORD,n.RESERVED]))?t(this._last_last_text,["class","interface"])&&!t(Y.text,[":",","])?this.set_mode(c.BlockStatement):this.set_mode(c.ObjectLiteral):this._flags.last_token.type===n.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(c.BlockStatement):t(this._flags.last_token.type,[n.EQUALS,n.START_EXPR,n.COMMA,n.OPERATOR])||x(this._flags.last_token,["return","throw","import","default"])?this.set_mode(c.ObjectLiteral):this.set_mode(c.BlockStatement),this._flags.last_token&&(x(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var ie=!K.comments_before&&K.text==="}",re=ie&&this._flags.last_word==="function"&&this._flags.last_token.type===n.END_EXPR;if(this._options.brace_preserve_inline){var Te=0,_e=null;this._flags.inline_frame=!0;do if(Te+=1,_e=this._tokens.peek(Te-1),_e.newlines){this._flags.inline_frame=!1;break}while(_e.type!==n.EOF&&!(_e.type===n.END_BLOCK&&_e.opened===O))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&O.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==n.OPERATOR&&(re||this._flags.last_token.type===n.EQUALS||x(this._flags.last_token,T)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(w(this._previous_flags.mode)&&(this._flags.last_token.type===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(O),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(O),this.indent(),!ie&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},M.prototype.handle_end_block=function(O){for(this.handle_whitespace_and_comments(O);this._flags.mode===c.Statement;)this.restore_mode();var K=this._flags.last_token.type===n.START_BLOCK;this._flags.inline_frame&&!K?this._output.space_before_token=!0:this._options.brace_style==="expand"?K||this.print_newline():K||(w(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(O)},M.prototype.handle_word=function(O){if(O.type===n.RESERVED){if(t(O.text,["set","get"])&&this._flags.mode!==c.ObjectLiteral)O.type=n.WORD;else if(O.text==="import"&&t(this._tokens.peek().text,["(","."]))O.type=n.WORD;else if(t(O.text,["as","from"])&&!this._flags.import_block)O.type=n.WORD;else if(this._flags.mode===c.ObjectLiteral){var K=this._tokens.peek();K.text===":"&&(O.type=n.WORD)}}if(this.start_of_statement(O)?x(this._flags.last_token,["var","let","const"])&&O.type===n.WORD&&(this._flags.declaration_statement=!0):O.newlines&&!D(this._flags.mode)&&(this._flags.last_token.type!==n.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==n.EQUALS&&(this._options.preserve_newlines||!x(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(O),this.print_newline()):this.handle_whitespace_and_comments(O),this._flags.do_block&&!this._flags.do_while)if(v(O,"while")){this._output.space_before_token=!0,this.print_token(O),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&&v(O,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===c.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&x(O,["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(O),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(O)),v(O,"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()&&!O.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===n.RESERVED||this._flags.last_token.type===n.WORD?x(this._flags.last_token,["get","set","new","export"])||x(this._flags.last_token,H)?this._output.space_before_token=!0:v(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&&(D(this._flags.mode)||w(this._flags.mode))||this.print_newline(),this.print_token(O),this._flags.last_word=O.text;return}var Y="NONE";if(this._flags.last_token.type===n.END_BLOCK?this._previous_flags.inline_frame?Y="SPACE":x(O,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&O.newlines?Y="NEWLINE":(Y="SPACE",this._output.space_before_token=!0):Y="NEWLINE":this._flags.last_token.type===n.SEMICOLON&&this._flags.mode===c.BlockStatement?Y="NEWLINE":this._flags.last_token.type===n.SEMICOLON&&D(this._flags.mode)?Y="SPACE":this._flags.last_token.type===n.STRING?Y="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===c.ObjectLiteral&&t(this._last_last_text,["{",","]))?Y="SPACE":this._flags.last_token.type===n.START_BLOCK?this._flags.inline_frame?Y="SPACE":Y="NEWLINE":this._flags.last_token.type===n.END_EXPR&&(this._output.space_before_token=!0,Y="NEWLINE"),x(O,o)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?Y="SPACE":Y="NEWLINE"),x(O,["else","catch","finally"]))if((!(this._flags.last_token.type===n.END_BLOCK&&this._previous_flags.mode===c.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&O.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var ie=this._output.current_line;ie.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else Y==="NEWLINE"?x(this._flags.last_token,T)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&x(O,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==n.END_EXPR?(this._flags.last_token.type!==n.START_EXPR||!x(O,["var","let","const"]))&&this._flags.last_token.text!==":"&&(v(O,"if")&&v(O.previous,"else")?this._output.space_before_token=!0:this.print_newline()):x(O,o)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&w(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():Y==="SPACE"&&(this._output.space_before_token=!0);O.previous&&(O.previous.type===n.WORD||O.previous.type===n.RESERVED)&&(this._output.space_before_token=!0),this.print_token(O),this._flags.last_word=O.text,O.type===n.RESERVED&&(O.text==="do"?this._flags.do_block=!0:O.text==="if"?this._flags.if_block=!0:O.text==="import"?this._flags.import_block=!0:this._flags.import_block&&v(O,"from")&&(this._flags.import_block=!1))},M.prototype.handle_semicolon=function(O){this.start_of_statement(O)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(O);for(var K=this._tokens.peek();this._flags.mode===c.Statement&&!(this._flags.if_block&&v(K,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(O)},M.prototype.handle_string=function(O){O.text.startsWith("`")&&O.newlines===0&&O.whitespace_before===""&&(O.previous.text===")"||this._flags.last_token.type===n.WORD)||(this.start_of_statement(O)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(O),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(O):O.text.startsWith("`")&&this._flags.last_token.type===n.END_EXPR&&(O.previous.text==="]"||O.previous.text===")")&&O.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(O)},M.prototype.handle_equals=function(O){this.start_of_statement(O)||this.handle_whitespace_and_comments(O),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(O),this._output.space_before_token=!0},M.prototype.handle_comma=function(O){this.handle_whitespace_and_comments(O,!0),this.print_token(O),this._output.space_before_token=!0,this._flags.declaration_statement?(D(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(O)):this._flags.mode===c.ObjectLiteral||this._flags.mode===c.Statement&&this._flags.parent.mode===c.ObjectLiteral?(this._flags.mode===c.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(O)},M.prototype.handle_operator=function(O){var K=O.text==="*"&&(x(this._flags.last_token,["function","yield"])||t(this._flags.last_token.type,[n.START_BLOCK,n.COMMA,n.END_BLOCK,n.SEMICOLON])),Y=t(O.text,["-","+"])&&(t(this._flags.last_token.type,[n.START_BLOCK,n.START_EXPR,n.EQUALS,n.OPERATOR])||t(this._flags.last_token.text,o)||this._flags.last_token.text===",");if(!this.start_of_statement(O)){var ie=!K;this.handle_whitespace_and_comments(O,ie)}if(O.text==="*"&&this._flags.last_token.type===n.DOT){this.print_token(O);return}if(O.text==="::"){this.print_token(O);return}if(this._flags.last_token.type===n.OPERATOR&&t(this._options.operator_position,g)&&this.allow_wrap_or_preserved_newline(O),O.text===":"&&this._flags.in_case){this.print_token(O),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,Te=!0,_e=!1;if(O.text===":"?this._flags.ternary_depth===0?re=!1:(this._flags.ternary_depth-=1,_e=!0):O.text==="?"&&(this._flags.ternary_depth+=1),!Y&&!K&&this._options.preserve_newlines&&t(O.text,a)){var we=O.text===":",Ce=we&&_e,Re=we&&!_e;switch(this._options.operator_position){case d.before_newline:this._output.space_before_token=!Re,this.print_token(O),(!we||Ce)&&this.allow_wrap_or_preserved_newline(O),this._output.space_before_token=!0;return;case d.after_newline:this._output.space_before_token=!0,!we||Ce?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(O):this._output.space_before_token=!1,this.print_token(O),this._output.space_before_token=!0;return;case d.preserve_newline:Re||this.allow_wrap_or_preserved_newline(O),re=!(this._output.just_added_newline()||Re),this._output.space_before_token=re,this.print_token(O),this._output.space_before_token=!0;return}}if(K){this.allow_wrap_or_preserved_newline(O),re=!1;var ue=this._tokens.peek();Te=ue&&t(ue.type,[n.WORD,n.RESERVED])}else if(O.text==="...")this.allow_wrap_or_preserved_newline(O),re=this._flags.last_token.type===n.START_BLOCK,Te=!1;else if(t(O.text,["--","++","!","~"])||Y){if((this._flags.last_token.type===n.COMMA||this._flags.last_token.type===n.START_EXPR)&&this.allow_wrap_or_preserved_newline(O),re=!1,Te=!1,O.newlines&&(O.text==="--"||O.text==="++"||O.text==="~")){var q=x(this._flags.last_token,T)&&O.newlines;q&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(q,!0)}this._flags.last_token.text===";"&&D(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==="]"&&(O.text==="--"||O.text==="++")):this._flags.last_token.type===n.OPERATOR&&(re=t(O.text,["--","-","++","+"])&&t(this._flags.last_token.text,["--","-","++","+"]),t(O.text,["+","-"])&&t(this._flags.last_token.text,["--","++"])&&(Te=!0)),(this._flags.mode===c.BlockStatement&&!this._flags.inline_frame||this._flags.mode===c.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(O),this._output.space_before_token=Te},M.prototype.handle_block_comment=function(O,K){if(this._output.raw){this._output.add_raw_token(O),O.directives&&O.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(O.directives){this.print_newline(!1,K),this.print_token(O),O.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!i.newline.test(O.text)&&!O.newlines){this._output.space_before_token=!0,this.print_token(O),this._output.space_before_token=!0;return}else this.print_block_commment(O,K)},M.prototype.print_block_commment=function(O,K){var Y=r(O.text),ie,re=!1,Te=!1,_e=O.whitespace_before,we=_e.length;if(this.print_newline(!1,K),this.print_token_line_indentation(O),this._output.add_token(Y[0]),this.print_newline(!1,K),Y.length>1){for(Y=Y.slice(1),re=L(Y,"*"),Te=S(Y,_e),re&&(this._flags.alignment=1),ie=0;ie<Y.length;ie++)re?(this.print_token_line_indentation(O),this._output.add_token(_(Y[ie]))):Te&&Y[ie]?(this.print_token_line_indentation(O),this._output.add_token(Y[ie].substring(we))):(this._output.current_line.set_indent(-1),this._output.add_token(Y[ie])),this.print_newline(!1,K);this._flags.alignment=0}},M.prototype.handle_comment=function(O,K){O.newlines?this.print_newline(!1,K):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(O),this.print_newline(!1,K)},M.prototype.handle_dot=function(O){this.start_of_statement(O)||this.handle_whitespace_and_comments(O,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),x(this._flags.last_token,T)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(O,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(O)},M.prototype.handle_unknown=function(O,K){this.print_token(O),O.text[O.text.length-1]===`
|
|
`&&this.print_newline(!1,K)},M.prototype.handle_eof=function(O){for(;this._flags.mode===c.Statement;)this.restore_mode();this.handle_whitespace_and_comments(O)},e.exports.Beautifier=M},function(e){function C(l){this.__parent=l,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 l=new C(this.__parent);return l.set_indent(this.__indent_count,this.__alignment_count),l},C.prototype.item=function(l){return l<0?this.__items[this.__items.length+l]:this.__items[l]},C.prototype.has_match=function(l){for(var i=this.__items.length-1;i>=0;i--)if(this.__items[i].match(l))return!0;return!1},C.prototype.set_indent=function(l,i){this.is_empty()&&(this.__indent_count=l||0,this.__alignment_count=i||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 l=this.__parent.current_line;return l.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),l.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),l.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,l.__items[0]===" "&&(l.__items.splice(0,1),l.__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(l){this.__items.push(l);var i=l.lastIndexOf(`
|
|
`);i!==-1?this.__character_count=l.length-i:this.__character_count+=l.length},C.prototype.pop=function(){var l=null;return this.is_empty()||(l=this.__items.pop(),this.__character_count-=l.length),l},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 l="";return this.is_empty()?this.__parent.indent_empty_lines&&(l=this.__parent.get_indent_string(this.__indent_count)):(l=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),l+=this.__items.join("")),l};function f(l,i){this.__cache=[""],this.__indent_size=l.indent_size,this.__indent_string=l.indent_char,l.indent_with_tabs||(this.__indent_string=new Array(l.indent_size+1).join(l.indent_char)),i=i||"",l.indent_level>0&&(i=new Array(l.indent_level+1).join(this.__indent_string)),this.__base_string=i,this.__base_string_length=i.length}f.prototype.get_indent_size=function(l,i){var s=this.__base_string_length;return i=i||0,l<0&&(s=0),s+=l*this.__indent_size,s+=i,s},f.prototype.get_indent_string=function(l,i){var s=this.__base_string;return i=i||0,l<0&&(l=0,s=""),i+=l*this.__indent_size,this.__ensure_cache(i),s+=this.__cache[i],s},f.prototype.__ensure_cache=function(l){for(;l>=this.__cache.length;)this.__add_column()},f.prototype.__add_column=function(){var l=this.__cache.length,i=0,s="";this.__indent_size&&l>=this.__indent_size&&(i=Math.floor(l/this.__indent_size),l-=i*this.__indent_size,s=new Array(i+1).join(this.__indent_string)),l&&(s+=new Array(l+1).join(" ")),this.__cache.push(s)};function h(l,i){this.__indent_cache=new f(l,i),this.raw=!1,this._end_with_newline=l.end_with_newline,this.indent_size=l.indent_size,this.wrap_line_length=l.wrap_line_length,this.indent_empty_lines=l.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()}h.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},h.prototype.get_line_number=function(){return this.__lines.length},h.prototype.get_indent_string=function(l,i){return this.__indent_cache.get_indent_string(l,i)},h.prototype.get_indent_size=function(l,i){return this.__indent_cache.get_indent_size(l,i)},h.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},h.prototype.add_new_line=function(l){return this.is_empty()||!l&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},h.prototype.get_code=function(l){this.trim(!0);var i=this.current_line.pop();i&&(i[i.length-1]===`
|
|
`&&(i=i.replace(/\n+$/g,"")),this.current_line.push(i)),this._end_with_newline&&this.__add_outputline();var s=this.__lines.join(`
|
|
`);return l!==`
|
|
`&&(s=s.replace(/[\n]/g,l)),s},h.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},h.prototype.set_indent=function(l,i){return l=l||0,i=i||0,this.next_line.set_indent(l,i),this.__lines.length>1?(this.current_line.set_indent(l,i),!0):(this.current_line.set_indent(),!1)},h.prototype.add_raw_token=function(l){for(var i=0;i<l.newlines;i++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(l.whitespace_before),this.current_line.push(l.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},h.prototype.add_token=function(l){this.__add_space_before_token(),this.current_line.push(l),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},h.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(" "))},h.prototype.remove_indent=function(l){for(var i=this.__lines.length;l<i;)this.__lines[l]._remove_indent(),l++;this.current_line._remove_wrap_indent()},h.prototype.trim=function(l){for(l=l===void 0?!1:l,this.current_line.trim();l&&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},h.prototype.just_added_newline=function(){return this.current_line.is_empty()},h.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},h.prototype.ensure_empty_line_above=function(l,i){for(var s=this.__lines.length-2;s>=0;){var u=this.__lines[s];if(u.is_empty())break;if(u.item(0).indexOf(l)!==0&&u.item(-1)!==i){this.__lines.splice(s+1,0,new C(this)),this.previous_line=this.__lines[this.__lines.length-2];break}s--}},e.exports.Output=h},function(e){function C(f,h,l,i){this.type=f,this.text=h,this.comments_before=null,this.newlines=l||0,this.whitespace_before=i||"",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 f="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",h="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",l="\\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",i="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",s="(?:\\\\u[0-9a-fA-F]{4}|["+f+l+"])",u="(?:\\\\u[0-9a-fA-F]{4}|["+h+l+i+"])*";C.identifier=new RegExp(s+u,"g"),C.identifierStart=new RegExp(s),C.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+h+l+i+"])+");var o=/[\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,f){var h=f(6).Options,l=["before-newline","after-newline","preserve-newline"];function i(s){h.call(this,s,"js");var u=this.raw_options.brace_style||null;u==="expand-strict"?this.raw_options.brace_style="expand":u==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var o=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var a=0;a<o.length;a++)o[a]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=o[a];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",l),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}i.prototype=new h,e.exports.Options=i},function(e){function C(l,i){this.raw_options=f(l,i),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(l,i){var s=this.raw_options[l],u=i||[];return typeof s=="object"?s!==null&&typeof s.concat=="function"&&(u=s.concat()):typeof s=="string"&&(u=s.split(/[^a-zA-Z0-9_\/\-]+/)),u},C.prototype._get_boolean=function(l,i){var s=this.raw_options[l],u=s===void 0?!!i:!!s;return u},C.prototype._get_characters=function(l,i){var s=this.raw_options[l],u=i||"";return typeof s=="string"&&(u=s.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),u},C.prototype._get_number=function(l,i){var s=this.raw_options[l];i=parseInt(i,10),isNaN(i)&&(i=0);var u=parseInt(s,10);return isNaN(u)&&(u=i),u},C.prototype._get_selection=function(l,i,s){var u=this._get_selection_list(l,i,s);if(u.length!==1)throw new Error("Invalid Option Value: The option '"+l+`' can only be one of the following values:
|
|
`+i+`
|
|
You passed in: '`+this.raw_options[l]+"'");return u[0]},C.prototype._get_selection_list=function(l,i,s){if(!i||i.length===0)throw new Error("Selection list cannot be empty.");if(s=s||[i[0]],!this._is_valid_selection(s,i))throw new Error("Invalid Default Value!");var u=this._get_array(l,s);if(!this._is_valid_selection(u,i))throw new Error("Invalid Option Value: The option '"+l+`' can contain only the following values:
|
|
`+i+`
|
|
You passed in: '`+this.raw_options[l]+"'");return u},C.prototype._is_valid_selection=function(l,i){return l.length&&i.length&&!l.some(function(s){return i.indexOf(s)===-1})};function f(l,i){var s={};l=h(l);var u;for(u in l)u!==i&&(s[u]=l[u]);if(i&&l[i])for(u in l[i])s[u]=l[i][u];return s}function h(l){var i={},s;for(s in l){var u=s.replace(/-/g,"_");i[u]=l[s]}return i}e.exports.Options=C,e.exports.normalizeOpts=h,e.exports.mergeOpts=f},function(e,C,f){var h=f(8).InputScanner,l=f(9).Tokenizer,i=f(9).TOKEN,s=f(13).Directives,u=f(4),o=f(12).Pattern,a=f(14).TemplatablePattern;function n(L,S){return S.indexOf(L)!==-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:i.START,RAW:i.RAW,EOF:i.EOF},_=new s(/\/\*/,/\*\//),p=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,v=/[0-9]/,x=/[^\d\.]/,T=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),b=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";b=b.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),b="\\?\\.(?!\\d) "+b,b=b.replace(/ /g,"|");var d=new RegExp(b),g="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),c=g.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),y=new RegExp("^(?:"+c.join("|")+")$"),r,w=function(L,S){l.call(this,L,S),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var M=new o(this._input),H=new a(this._input).read_options(this._options);this.__patterns={template:H,identifier:H.starting_with(u.identifier).matching(u.identifierMatch),number:M.matching(p),punct:M.matching(d),comment:M.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:M.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:M.matching(/<!--/),html_comment_end:M.matching(/-->/),include:M.starting_with(/#include/).until_after(u.lineBreak),shebang:M.starting_with(/#!/).until_after(u.lineBreak),xml:M.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:H.until(/['\\\n\r\u2028\u2029]/),double_quote:H.until(/["\\\n\r\u2028\u2029]/),template_text:H.until(/[`\\$]/),template_expression:H.until(/[`}\\]/)}};w.prototype=new l,w.prototype._is_comment=function(L){return L.type===t.COMMENT||L.type===t.BLOCK_COMMENT||L.type===t.UNKNOWN},w.prototype._is_opening=function(L){return L.type===t.START_BLOCK||L.type===t.START_EXPR},w.prototype._is_closing=function(L,S){return(L.type===t.END_BLOCK||L.type===t.END_EXPR)&&S&&(L.text==="]"&&S.text==="["||L.text===")"&&S.text==="("||L.text==="}"&&S.text==="{")},w.prototype._reset=function(){r=!1},w.prototype._get_next_token=function(L,S){var M=null;this._readWhitespace();var H=this._input.peek();return H===null?this._create_token(t.EOF,""):(M=M||this._read_non_javascript(H),M=M||this._read_string(H),M=M||this._read_word(L),M=M||this._read_singles(H),M=M||this._read_comment(H),M=M||this._read_regexp(H,L),M=M||this._read_xml(H,L),M=M||this._read_punctuation(),M=M||this._create_token(t.UNKNOWN,this._input.next()),M)},w.prototype._read_word=function(L){var S;if(S=this.__patterns.identifier.read(),S!=="")return S=S.replace(u.allLineBreaks,`
|
|
`),!(L.type===t.DOT||L.type===t.RESERVED&&(L.text==="set"||L.text==="get"))&&y.test(S)?(S==="in"||S==="of")&&(L.type===t.WORD||L.type===t.STRING)?this._create_token(t.OPERATOR,S):this._create_token(t.RESERVED,S):this._create_token(t.WORD,S);if(S=this.__patterns.number.read(),S!=="")return this._create_token(t.WORD,S)},w.prototype._read_singles=function(L){var S=null;return L==="("||L==="["?S=this._create_token(t.START_EXPR,L):L===")"||L==="]"?S=this._create_token(t.END_EXPR,L):L==="{"?S=this._create_token(t.START_BLOCK,L):L==="}"?S=this._create_token(t.END_BLOCK,L):L===";"?S=this._create_token(t.SEMICOLON,L):L==="."&&x.test(this._input.peek(1))?S=this._create_token(t.DOT,L):L===","&&(S=this._create_token(t.COMMA,L)),S&&this._input.next(),S},w.prototype._read_punctuation=function(){var L=this.__patterns.punct.read();if(L!=="")return L==="="?this._create_token(t.EQUALS,L):L==="?."?this._create_token(t.DOT,L):this._create_token(t.OPERATOR,L)},w.prototype._read_non_javascript=function(L){var S="";if(L==="#"){if(this._is_first_token()&&(S=this.__patterns.shebang.read(),S))return this._create_token(t.UNKNOWN,S.trim()+`
|
|
`);if(S=this.__patterns.include.read(),S)return this._create_token(t.UNKNOWN,S.trim()+`
|
|
`);L=this._input.next();var M="#";if(this._input.hasNext()&&this._input.testChar(v)){do L=this._input.next(),M+=L;while(this._input.hasNext()&&L!=="#"&&L!=="=");return L==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(M+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(M+="{}",this._input.next(),this._input.next())),this._create_token(t.WORD,M)}this._input.back()}else if(L==="<"&&this._is_first_token()){if(S=this.__patterns.html_comment_start.read(),S){for(;this._input.hasNext()&&!this._input.testChar(u.newline);)S+=this._input.next();return r=!0,this._create_token(t.COMMENT,S)}}else if(r&&L==="-"&&(S=this.__patterns.html_comment_end.read(),S))return r=!1,this._create_token(t.COMMENT,S);return null},w.prototype._read_comment=function(L){var S=null;if(L==="/"){var M="";if(this._input.peek(1)==="*"){M=this.__patterns.block_comment.read();var H=_.get_directives(M);H&&H.ignore==="start"&&(M+=_.readIgnored(this._input)),M=M.replace(u.allLineBreaks,`
|
|
`),S=this._create_token(t.BLOCK_COMMENT,M),S.directives=H}else this._input.peek(1)==="/"&&(M=this.__patterns.comment.read(),S=this._create_token(t.COMMENT,M))}return S},w.prototype._read_string=function(L){if(L==="`"||L==="'"||L==='"'){var S=this._input.next();return this.has_char_escapes=!1,L==="`"?S+=this._read_string_recursive("`",!0,"${"):S+=this._read_string_recursive(L),this.has_char_escapes&&this._options.unescape_strings&&(S=D(S)),this._input.peek()===L&&(S+=this._input.next()),S=S.replace(u.allLineBreaks,`
|
|
`),this._create_token(t.STRING,S)}return null},w.prototype._allow_regexp_or_xml=function(L){return L.type===t.RESERVED&&n(L.text,["return","case","throw","else","do","typeof","yield"])||L.type===t.END_EXPR&&L.text===")"&&L.opened.previous.type===t.RESERVED&&n(L.opened.previous.text,["if","while","for"])||n(L.type,[t.COMMENT,t.START_EXPR,t.START_BLOCK,t.START,t.END_BLOCK,t.OPERATOR,t.EQUALS,t.EOF,t.SEMICOLON,t.COMMA])},w.prototype._read_regexp=function(L,S){if(L==="/"&&this._allow_regexp_or_xml(S)){for(var M=this._input.next(),H=!1,O=!1;this._input.hasNext()&&(H||O||this._input.peek()!==L)&&!this._input.testChar(u.newline);)M+=this._input.peek(),H?H=!1:(H=this._input.peek()==="\\",this._input.peek()==="["?O=!0:this._input.peek()==="]"&&(O=!1)),this._input.next();return this._input.peek()===L&&(M+=this._input.next(),M+=this._input.read(u.identifier)),this._create_token(t.STRING,M)}return null},w.prototype._read_xml=function(L,S){if(this._options.e4x&&L==="<"&&this._allow_regexp_or_xml(S)){var M="",H=this.__patterns.xml.read_match();if(H){for(var O=H[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),K=O.indexOf("{")===0,Y=0;H;){var ie=!!H[1],re=H[2],Te=!!H[H.length-1]||re.slice(0,8)==="![CDATA[";if(!Te&&(re===O||K&&re.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(ie?--Y:++Y),M+=H[0],Y<=0)break;H=this.__patterns.xml.read_match()}return H||(M+=this._input.match(/[\s\S]*/g)[0]),M=M.replace(u.allLineBreaks,`
|
|
`),this._create_token(t.STRING,M)}}return null};function D(L){for(var S="",M=0,H=new h(L),O=null;H.hasNext();)if(O=H.match(/([\s]|[^\\]|\\\\)+/g),O&&(S+=O[0]),H.peek()==="\\"){if(H.next(),H.peek()==="x")O=H.match(/x([0-9A-Fa-f]{2})/g);else if(H.peek()==="u")O=H.match(/u([0-9A-Fa-f]{4})/g);else{S+="\\",H.hasNext()&&(S+=H.next());continue}if(!O)return L;if(M=parseInt(O[1],16),M>126&&M<=255&&O[0].indexOf("x")===0)return L;if(M>=0&&M<32){S+="\\"+O[0];continue}else M===34||M===39||M===92?S+="\\"+String.fromCharCode(M):S+=String.fromCharCode(M)}return S}w.prototype._read_string_recursive=function(L,S,M){var H,O;L==="'"?O=this.__patterns.single_quote:L==='"'?O=this.__patterns.double_quote:L==="`"?O=this.__patterns.template_text:L==="}"&&(O=this.__patterns.template_expression);for(var K=O.read(),Y="";this._input.hasNext();){if(Y=this._input.next(),Y===L||!S&&u.newline.test(Y)){this._input.back();break}else Y==="\\"&&this._input.hasNext()?(H=this._input.peek(),H==="x"||H==="u"?this.has_char_escapes=!0:H==="\r"&&this._input.peek(1)===`
|
|
`&&this._input.next(),Y+=this._input.next()):M&&(M==="${"&&Y==="$"&&this._input.peek()==="{"&&(Y+=this._input.next()),M===Y&&(L==="`"?Y+=this._read_string_recursive("}",S,"`"):Y+=this._read_string_recursive("`",S,"${"),this._input.hasNext()&&(Y+=this._input.next())));Y+=O.read(),K+=Y}return K},e.exports.Tokenizer=w,e.exports.TOKEN=t,e.exports.positionable_operators=T.slice(),e.exports.line_starters=g.slice()},function(e){var C=RegExp.prototype.hasOwnProperty("sticky");function f(h){this.__input=h||"",this.__input_length=this.__input.length,this.__position=0}f.prototype.restart=function(){this.__position=0},f.prototype.back=function(){this.__position>0&&(this.__position-=1)},f.prototype.hasNext=function(){return this.__position<this.__input_length},f.prototype.next=function(){var h=null;return this.hasNext()&&(h=this.__input.charAt(this.__position),this.__position+=1),h},f.prototype.peek=function(h){var l=null;return h=h||0,h+=this.__position,h>=0&&h<this.__input_length&&(l=this.__input.charAt(h)),l},f.prototype.__match=function(h,l){h.lastIndex=l;var i=h.exec(this.__input);return i&&!(C&&h.sticky)&&(i.index!==l&&(i=null)),i},f.prototype.test=function(h,l){return l=l||0,l+=this.__position,l>=0&&l<this.__input_length?!!this.__match(h,l):!1},f.prototype.testChar=function(h,l){var i=this.peek(l);return h.lastIndex=0,i!==null&&h.test(i)},f.prototype.match=function(h){var l=this.__match(h,this.__position);return l?this.__position+=l[0].length:l=null,l},f.prototype.read=function(h,l,i){var s="",u;return h&&(u=this.match(h),u&&(s+=u[0])),l&&(u||!h)&&(s+=this.readUntil(l,i)),s},f.prototype.readUntil=function(h,l){var i="",s=this.__position;h.lastIndex=this.__position;var u=h.exec(this.__input);return u?(s=u.index,l&&(s+=u[0].length)):s=this.__input_length,i=this.__input.substring(this.__position,s),this.__position=s,i},f.prototype.readUntilAfter=function(h){return this.readUntil(h,!0)},f.prototype.get_regexp=function(h,l){var i=null,s="g";return l&&C&&(s="y"),typeof h=="string"&&h!==""?i=new RegExp(h,s):h&&(i=new RegExp(h.source,s)),i},f.prototype.get_literal_regexp=function(h){return RegExp(h.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},f.prototype.peekUntilAfter=function(h){var l=this.__position,i=this.readUntilAfter(h);return this.__position=l,i},f.prototype.lookBack=function(h){var l=this.__position-1;return l>=h.length&&this.__input.substring(l-h.length,l).toLowerCase()===h},e.exports.InputScanner=f},function(e,C,f){var h=f(8).InputScanner,l=f(3).Token,i=f(10).TokenStream,s=f(11).WhitespacePattern,u={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},o=function(a,n){this._input=new h(a),this._options=n||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new s(this._input)};o.prototype.tokenize=function(){this._input.restart(),this.__tokens=new i,this._reset();for(var a,n=new l(u.START,""),t=null,_=[],p=new i;n.type!==u.EOF;){for(a=this._get_next_token(n,t);this._is_comment(a);)p.add(a),a=this._get_next_token(n,t);p.isEmpty()||(a.comments_before=p,p=new i),a.parent=t,this._is_opening(a)?(_.push(t),t=a):t&&this._is_closing(a,t)&&(a.opened=t,t.closed=a,t=_.pop(),a.parent=t),a.previous=n,n.next=a,this.__tokens.add(a),n=a}return this.__tokens},o.prototype._is_first_token=function(){return this.__tokens.isEmpty()},o.prototype._reset=function(){},o.prototype._get_next_token=function(a,n){this._readWhitespace();var t=this._input.read(/.+/g);return t?this._create_token(u.RAW,t):this._create_token(u.EOF,"")},o.prototype._is_comment=function(a){return!1},o.prototype._is_opening=function(a){return!1},o.prototype._is_closing=function(a,n){return!1},o.prototype._create_token=function(a,n){var t=new l(a,n,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return t},o.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},e.exports.Tokenizer=o,e.exports.TOKEN=u},function(e){function C(f){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=f}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 f=null;return this.hasNext()&&(f=this.__tokens[this.__position],this.__position+=1),f},C.prototype.peek=function(f){var h=null;return f=f||0,f+=this.__position,f>=0&&f<this.__tokens_length&&(h=this.__tokens[f]),h},C.prototype.add=function(f){this.__parent_token&&(f.parent=this.__parent_token),this.__tokens.push(f),this.__tokens_length+=1},e.exports.TokenStream=C},function(e,C,f){var h=f(12).Pattern;function l(i,s){h.call(this,i,s),s?this._line_regexp=this._input.get_regexp(s._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}l.prototype=new h,l.prototype.__set_whitespace_patterns=function(i,s){i+="\\t ",s+="\\n\\r",this._match_pattern=this._input.get_regexp("["+i+s+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+s+"]")},l.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var i=this._input.read(this._match_pattern);if(i===" ")this.whitespace_before_token=" ";else if(i){var s=this.__split(this._newline_regexp,i);this.newline_count=s.length-1,this.whitespace_before_token=s[this.newline_count]}return i},l.prototype.matching=function(i,s){var u=this._create();return u.__set_whitespace_patterns(i,s),u._update(),u},l.prototype._create=function(){return new l(this._input,this)},l.prototype.__split=function(i,s){i.lastIndex=0;for(var u=0,o=[],a=i.exec(s);a;)o.push(s.substring(u,a.index)),u=a.index+a[0].length,a=i.exec(s);return u<s.length?o.push(s.substring(u,s.length)):o.push(""),o},e.exports.WhitespacePattern=l},function(e){function C(f,h){this._input=f,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,h&&(this._starting_pattern=this._input.get_regexp(h._starting_pattern,!0),this._match_pattern=this._input.get_regexp(h._match_pattern,!0),this._until_pattern=this._input.get_regexp(h._until_pattern),this._until_after=h._until_after)}C.prototype.read=function(){var f=this._input.read(this._starting_pattern);return(!this._starting_pattern||f)&&(f+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),f},C.prototype.read_match=function(){return this._input.match(this._match_pattern)},C.prototype.until_after=function(f){var h=this._create();return h._until_after=!0,h._until_pattern=this._input.get_regexp(f),h._update(),h},C.prototype.until=function(f){var h=this._create();return h._until_after=!1,h._until_pattern=this._input.get_regexp(f),h._update(),h},C.prototype.starting_with=function(f){var h=this._create();return h._starting_pattern=this._input.get_regexp(f,!0),h._update(),h},C.prototype.matching=function(f){var h=this._create();return h._match_pattern=this._input.get_regexp(f,!0),h._update(),h},C.prototype._create=function(){return new C(this._input,this)},C.prototype._update=function(){},e.exports.Pattern=C},function(e){function C(f,h){f=typeof f=="string"?f:f.source,h=typeof h=="string"?h:h.source,this.__directives_block_pattern=new RegExp(f+/ beautify( \w+[:]\w+)+ /.source+h,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(f+/\sbeautify\signore:end\s/.source+h,"g")}C.prototype.get_directives=function(f){if(!f.match(this.__directives_block_pattern))return null;var h={};this.__directive_pattern.lastIndex=0;for(var l=this.__directive_pattern.exec(f);l;)h[l[1]]=l[2],l=this.__directive_pattern.exec(f);return h},C.prototype.readIgnored=function(f){return f.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=C},function(e,C,f){var h=f(12).Pattern,l={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function i(s,u){h.call(this,s,u),this.__template_pattern=null,this._disabled=Object.assign({},l),this._excluded=Object.assign({},l),u&&(this.__template_pattern=this._input.get_regexp(u.__template_pattern),this._excluded=Object.assign(this._excluded,u._excluded),this._disabled=Object.assign(this._disabled,u._disabled));var o=new h(s);this.__patterns={handlebars_comment:o.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:o.starting_with(/{{{/).until_after(/}}}/),handlebars:o.starting_with(/{{/).until_after(/}}/),php:o.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:o.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:o.starting_with(/{%/).until_after(/%}/),django_value:o.starting_with(/{{/).until_after(/}}/),django_comment:o.starting_with(/{#/).until_after(/#}/),smarty:o.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:o.starting_with(/{\*/).until_after(/\*}/),smarty_literal:o.starting_with(/{literal}/).until_after(/{\/literal}/)}}i.prototype=new h,i.prototype._create=function(){return new i(this._input,this)},i.prototype._update=function(){this.__set_templated_pattern()},i.prototype.disable=function(s){var u=this._create();return u._disabled[s]=!0,u._update(),u},i.prototype.read_options=function(s){var u=this._create();for(var o in l)u._disabled[o]=s.templating.indexOf(o)===-1;return u._update(),u},i.prototype.exclude=function(s){var u=this._create();return u._excluded[s]=!0,u._update(),u},i.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 u=this._read_template();u;)this._match_pattern?u+=this._input.read(this._match_pattern):u+=this._input.readUntil(this.__template_pattern),s+=u,u=this._read_template();return this._until_after&&(s+=this._input.readUntilAfter(this._until_pattern)),s},i.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("|")+")")},i.prototype._read_template=function(){var s="",u=this._input.peek();if(u==="<"){var o=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&o==="?"&&(s=s||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&o==="%"&&(s=s||this.__patterns.erb.read())}else u==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(s=s||this.__patterns.handlebars_comment.read(),s=s||this.__patterns.handlebars_unescaped.read(),s=s||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(s=s||this.__patterns.django_value.read()),this._excluded.django||(s=s||this.__patterns.django_comment.read(),s=s||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(s=s||this.__patterns.smarty_comment.read(),s=s||this.__patterns.smarty_literal.read(),s=s||this.__patterns.smarty.read()));return s},e.exports.TemplatablePattern=i}],I={};function W(e){var C=I[e];if(C!==void 0)return C.exports;var f=I[e]={exports:{}};return A[e](f,f.exports,W),f.exports}var j=W(0);R=j})();var U=R;!(ee=[],P=function(){return{js_beautify:U}}.apply(ce,ee),P!==void 0&&(Ke.exports=P))})()},"6nfa":function(Ke,ce,F){Ke.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(Ke,ce,F){"use strict";F.d(ce,"f",function(){return ee}),F.d(ce,"l",function(){return P}),F.d(ce,"k",function(){return R}),F.d(ce,"j",function(){return U}),F.d(ce,"g",function(){return A}),F.d(ce,"m",function(){return I}),F.d(ce,"h",function(){return W}),F.d(ce,"n",function(){return j}),F.d(ce,"c",function(){return e}),F.d(ce,"a",function(){return C}),F.d(ce,"i",function(){return f}),F.d(ce,"o",function(){return h}),F.d(ce,"e",function(){return s}),F.d(ce,"d",function(){return u}),F.d(ce,"p",function(){return o}),F.d(ce,"b",function(){return a});function ee(n){return Array.isArray(n)}function P(n){return typeof n=="string"}function R(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)&&!(n instanceof RegExp)&&!(n instanceof Date)}function U(n){return typeof n=="number"&&!isNaN(n)}function A(n){return n===!0||n===!1}function I(n){return typeof n=="undefined"}function W(n){return!j(n)}function j(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(j(n))throw new Error("Assertion Failed: argument is undefined or null");return n}function f(n){return typeof n=="function"}function h(n,t){const _=Math.min(n.length,t.length);for(let p=0;p<_;p++)l(n[p],t[p])}function l(n,t){if(P(t)){if(typeof n!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(f(t)){try{if(n instanceof t)return}catch(_){}if(!j(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 i(n){let t=[],_=Object.getPrototypeOf(n);for(;Object.prototype!==_;)t=t.concat(Object.getOwnPropertyNames(_)),_=Object.getPrototypeOf(_);return t}function s(n){const t=[];for(const _ of i(n))typeof n[_]=="function"&&t.push(_);return t}function u(n,t){const _=v=>function(){const x=Array.prototype.slice.call(arguments,0);return t(v,x)};let p={};for(const v of n)p[v]=_(v);return p}function o(n){return n===null?void 0:n}function a(n,t="Unreachable"){throw new Error(t)}},"8HAY":function(Ke,ce,F){"use strict";F.d(ce,"a",function(){return A}),F.d(ce,"b",function(){return I}),F.d(ce,"d",function(){return W}),F.d(ce,"e",function(){return j}),F.d(ce,"c",function(){return e});var ee=F("MI8n"),P=F("pmY6"),R=F("3/fG"),U=function(C,f,h,l){function i(s){return s instanceof h?s:new h(function(u){u(s)})}return new(h||(h=Promise))(function(s,u){function o(t){try{n(l.next(t))}catch(_){u(_)}}function a(t){try{n(l.throw(t))}catch(_){u(_)}}function n(t){t.done?s(t.value):i(t.value).then(o,a)}n((l=l.apply(C,f||[])).next())})};class A extends P.a{constructor(C,f="",h="",l=!0,i){super();this._onDidChange=this._register(new ee.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=C,this._label=f,this._cssClass=h,this._enabled=l,this._actionCallback=i}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,f){return U(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(C))})}}class I extends P.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new ee.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new ee.b),this.onDidRun=this._onDidRun.event}run(C,f){return U(this,void 0,void 0,function*(){if(!C.enabled)return;this._onBeforeRun.fire({action:C});let h;try{yield this.runAction(C,f)}catch(l){h=l}this._onDidRun.fire({action:C,error:h})})}runAction(C,f){return U(this,void 0,void 0,function*(){yield C.run(f)})}}class W extends A{constructor(C){super(W.ID,C,C?"separator text":"separator");this.checked=!1,this.enabled=!1}}W.ID="vs.actions.separator";class j{constructor(C,f,h,l){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=C,this.label=f,this.class=l,this._actions=h}get actions(){return this._actions}dispose(){}run(){return U(this,void 0,void 0,function*(){})}}class e extends A{constructor(){super(e.ID,R.a("submenu.empty","(empty)"),void 0,!1)}}e.ID="vs.actions.empty"},"8WcF":function(Ke,ce,F){Ke.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(Ke,ce,F){Ke.exports={button:"button___1wy9m"}},"8mKB":function(Ke,ce,F){"use strict";var ee=F("rePB"),P=F("1OyB"),R=F("vuIU"),U=F("Ji7U"),A=F("md7G"),I=F("foSv"),W=F("q1tI"),j=F.n(W),e=F("m+aA"),C=F("TSYQ"),f=F.n(C),h=F("4IlW");function l(d){var g=d.pageXOffset,c="scrollLeft";if(typeof g!="number"){var y=d.document;g=y.documentElement[c],typeof g!="number"&&(g=y.body[c])}return g}function i(d){var g,c,y=d.ownerDocument,r=y.body,w=y&&y.documentElement,D=d.getBoundingClientRect();return g=D.left,c=D.top,g-=w.clientLeft||r.clientLeft||0,c-=w.clientTop||r.clientTop||0,{left:g,top:c}}function s(d){var g=i(d),c=d.ownerDocument,y=c.defaultView||c.parentWindow;return g.left+=l(y),g.left}function u(d){var g=o();return function(){var y=Object(I.a)(d),r;if(g){var w=Object(I.a)(this).constructor;r=Reflect.construct(y,arguments,w)}else r=y.apply(this,arguments);return Object(A.a)(this,r)}}function o(){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(d){return!1}}var a=function(d){Object(U.a)(c,d);var g=u(c);function c(){var y;return Object(P.a)(this,c),y=g.apply(this,arguments),y.onHover=function(r){var w=y.props,D=w.onHover,L=w.index;D(r,L)},y.onClick=function(r){var w=y.props,D=w.onClick,L=w.index;D(r,L)},y.onKeyDown=function(r){var w=y.props,D=w.onClick,L=w.index;r.keyCode===13&&D(r,L)},y}return Object(R.a)(c,[{key:"getClassName",value:function(){var r=this.props,w=r.prefixCls,D=r.index,L=r.value,S=r.allowHalf,M=r.focused,H=D+1,O=w;return L===0&&D===0&&M?O+=" ".concat(w,"-focused"):S&&L+.5>=H&&L<H?(O+=" ".concat(w,"-half ").concat(w,"-active"),M&&(O+=" ".concat(w,"-focused"))):(O+=H<=L?" ".concat(w,"-full"):" ".concat(w,"-zero"),H===L&&M&&(O+=" ".concat(w,"-focused"))),O}},{key:"render",value:function(){var r=this.onHover,w=this.onClick,D=this.onKeyDown,L=this.props,S=L.disabled,M=L.prefixCls,H=L.character,O=L.characterRender,K=L.index,Y=L.count,ie=L.value,re=typeof H=="function"?H(this.props):H,Te=j.a.createElement("li",{className:this.getClassName()},j.a.createElement("div",{onClick:S?null:w,onKeyDown:S?null:D,onMouseMove:S?null:r,role:"radio","aria-checked":ie>K?"true":"false","aria-posinset":K+1,"aria-setsize":Y,tabIndex:S?-1:0},j.a.createElement("div",{className:"".concat(M,"-first")},re),j.a.createElement("div",{className:"".concat(M,"-second")},re)));return O&&(Te=O(Te,this.props)),Te}}]),c}(j.a.Component);function n(d,g){var c=Object.keys(d);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(d);g&&(y=y.filter(function(r){return Object.getOwnPropertyDescriptor(d,r).enumerable})),c.push.apply(c,y)}return c}function t(d){for(var g=1;g<arguments.length;g++){var c=arguments[g]!=null?arguments[g]:{};g%2?n(Object(c),!0).forEach(function(y){Object(ee.a)(d,y,c[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(c)):n(Object(c)).forEach(function(y){Object.defineProperty(d,y,Object.getOwnPropertyDescriptor(c,y))})}return d}function _(d){var g=p();return function(){var y=Object(I.a)(d),r;if(g){var w=Object(I.a)(this).constructor;r=Reflect.construct(y,arguments,w)}else r=y.apply(this,arguments);return Object(A.a)(this,r)}}function p(){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(d){return!1}}function v(){}var x=function(d){Object(U.a)(c,d);var g=_(c);function c(y){var r;Object(P.a)(this,c),r=g.call(this,y),r.onHover=function(D,L){var S=r.props.onHoverChange,M=r.getStarValue(L,D.pageX),H=r.state.cleanedValue;M!==H&&r.setState({hoverValue:M,cleanedValue:null}),S(M)},r.onMouseLeave=function(){var D=r.props.onHoverChange;r.setState({hoverValue:void 0,cleanedValue:null}),D(void 0)},r.onClick=function(D,L){var S=r.props.allowClear,M=r.state.value,H=r.getStarValue(L,D.pageX),O=!1;S&&(O=H===M),r.onMouseLeave(),r.changeValue(O?0:H),r.setState({cleanedValue:O?H:null})},r.onFocus=function(){var D=r.props.onFocus;r.setState({focused:!0}),D&&D()},r.onBlur=function(){var D=r.props.onBlur;r.setState({focused:!1}),D&&D()},r.onKeyDown=function(D){var L=D.keyCode,S=r.props,M=S.count,H=S.allowHalf,O=S.onKeyDown,K=S.direction,Y=K==="rtl",ie=r.state.value;L===h.a.RIGHT&&ie<M&&!Y?(H?ie+=.5:ie+=1,r.changeValue(ie),D.preventDefault()):L===h.a.LEFT&&ie>0&&!Y||L===h.a.RIGHT&&ie>0&&Y?(H?ie-=.5:ie-=1,r.changeValue(ie),D.preventDefault()):L===h.a.LEFT&&ie<M&&Y&&(H?ie+=.5:ie+=1,r.changeValue(ie),D.preventDefault()),O&&O(D)},r.saveRef=function(D){return function(L){r.stars[D]=L}},r.saveRate=function(D){r.rate=D};var w=y.value;return w===void 0&&(w=y.defaultValue),r.stars={},r.state={value:w,focused:!1,cleanedValue:null},r}return Object(R.a)(c,[{key:"componentDidMount",value:function(){var r=this.props,w=r.autoFocus,D=r.disabled;w&&!D&&this.focus()}},{key:"getStarDOM",value:function(r){return Object(e.a)(this.stars[r])}},{key:"getStarValue",value:function(r,w){var D=this.props,L=D.allowHalf,S=D.direction,M=S==="rtl",H=r+1;if(L){var O=this.getStarDOM(r),K=s(O),Y=O.clientWidth;(M&&w-K>Y/2||!M&&w-K<Y/2)&&(H-=.5)}return H}},{key:"focus",value:function(){var r=this.props.disabled;r||this.rate.focus()}},{key:"blur",value:function(){var r=this.props.disabled;r||this.rate.blur()}},{key:"changeValue",value:function(r){var w=this.props.onChange;"value"in this.props||this.setState({value:r}),w(r)}},{key:"render",value:function(){for(var r=this.props,w=r.count,D=r.allowHalf,L=r.style,S=r.prefixCls,M=r.disabled,H=r.className,O=r.character,K=r.characterRender,Y=r.tabIndex,ie=r.direction,re=this.state,Te=re.value,_e=re.hoverValue,we=re.focused,Ce=[],Re=M?"".concat(S,"-disabled"):"",ue=0;ue<w;ue+=1)Ce.push(j.a.createElement(a,{ref:this.saveRef(ue),index:ue,count:w,disabled:M,prefixCls:"".concat(S,"-star"),allowHalf:D,value:_e===void 0?Te:_e,onClick:this.onClick,onHover:this.onHover,key:ue,character:O,characterRender:K,focused:we}));var q=f()(S,Re,H,Object(ee.a)({},"".concat(S,"-rtl"),ie==="rtl"));return j.a.createElement("ul",{className:q,style:L,onMouseLeave:M?null:this.onMouseLeave,tabIndex:M?-1:Y,onFocus:M?null:this.onFocus,onBlur:M?null:this.onBlur,onKeyDown:M?null:this.onKeyDown,ref:this.saveRate,role:"radiogroup"},Ce)}}],[{key:"getDerivedStateFromProps",value:function(r,w){return"value"in r&&r.value!==void 0?t(t({},w),{},{value:r.value}):w}}]),c}(j.a.Component);x.defaultProps={defaultValue:0,count:5,allowHalf:!1,allowClear:!0,style:{},prefixCls:"rc-rate",onChange:v,character:"\u2605",onHoverChange:v,tabIndex:0,direction:"ltr"};var T=x,b=ce.a=T},"9Bee":function(Ke,ce,F){"use strict";var ee=F("DYRE"),P=F("zeV3"),R=F("+L6B"),U=F("2/Rp"),A=F("k1fw"),I=F("9og8"),W=F("tJVT"),j=F("WmNS"),e=F.n(j),C=F("q1tI"),f=F.n(C),h=F("vg9a"),l=F("DlQD"),i=F.n(l),s=F("rUJ1");function u(N,m){var E=N.match(/^(\s+)(?:```)/);if(E===null)return m;var k=E[1];return m.split(`
|
|
`).map(function(G){var B=G.match(/^\s+/);if(B===null)return G;var le=Object(W.a)(B,1),ke=le[0];return ke.length>=k.length?G.slice(k.length):G}).join(`
|
|
`)}var o=[],a=["<ul>"],n=new i.a.Renderer,t=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function _(){o.length=0,a=["<ul>"]}var p={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function v(N,m,E,k){if(m>=N.length||N[m].level<=E)return m;var G=N[m];k.push("<li><a href='#"+G.anchor+"'>"+G.text+"</a>"),m++;var B=[];return m=v(N,m,G.level,B),B.length>0&&(k.push("<ul>"),B.forEach(function(le){k.push(le)}),k.push("</ul>")),k.push("</li>"),m=v(N,m,E,k),m}function x(){return v(o,0,0,a),a.push("</ul>"),a.join("")}var T={heading:function(m){var E=t.exec(m);if(E)return{type:"heading",raw:E[0],depth:E[1].length,text:E[2]}},fences:function(m){var E=this.rules.block.fences.exec(m);if(E){var k=E[0],G=u(k,E[3]||""),B=E[2]?E[2].trim():E[2];if(["latex","katex","math"].indexOf(B)>=0){var le=g(),ke=G;G=le,c[le]={type:"block",expression:ke}}return{type:"code",raw:k,lang:B,text:G}}}},b=/(?:\${2})([^\n`]+?)(?:\${2})/gi,d=0,g=function(){return"__special_katext_id_".concat(d++,"__")},c={};function y(){return c}function r(){d=0,c={}}function w(N){return N=N.replace(b,function(m,E){var k=g();return c[k]={type:"inline",expression:E},k}),N}var D=n.listitem;n.listitem=function(N){return D(w(N))};var L=n.paragraph;n.paragraph=function(N){return L(w(N))};var S=n.tablecell;n.tablecell=function(N,m){return S(w(N),m)},n.code=function(N,m,E){var k=(m||"").match(/\S*/)[0];return k?["latex","katex","math"].indexOf(k)>=0?"<p class='editormd-tex'>".concat(N,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(m,'">').concat(E?N:Object(s.escape)(N,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(E?N:Object(s.escape)(N,!0))+"</code></pre>"},n.heading=function(N,m,E){var k=this.options.headerPrefix+E.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return o.push({anchor:k,level:m,text:N}),"<h"+m+' id="'+k+'">'+N+"</h"+m+">"},i.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),i.a.use({tokenizer:T,renderer:n});var M=i.a,H=F("SJMd"),O=F("ulZh"),K=F.n(O),Y=F("m3rI"),ie=F("Oy/b"),re=F("p5ED"),Te=F("ErOA");/*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** */var _e=function(N,m){return(_e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,k){E.__proto__=k}||function(E,k){for(var G in k)Object.prototype.hasOwnProperty.call(k,G)&&(E[G]=k[G])})(N,m)};function we(N,m){function E(){this.constructor=N}_e(N,m),N.prototype=m===null?Object.create(m):(E.prototype=m.prototype,new E)}function Ce(N,m,E,k){return new(E||(E=Promise))(function(G,B){function le(vt){try{lt(k.next(vt))}catch(je){B(je)}}function ke(vt){try{lt(k.throw(vt))}catch(je){B(je)}}function lt(vt){var je;vt.done?G(vt.value):(je=vt.value,je instanceof E?je:new E(function(At){At(je)})).then(le,ke)}lt((k=k.apply(N,m||[])).next())})}function Re(N,m){var E,k,G,B,le={label:0,sent:function(){if(1&G[0])throw G[1];return G[1]},trys:[],ops:[]};return B={next:ke(0),throw:ke(1),return:ke(2)},typeof Symbol=="function"&&(B[Symbol.iterator]=function(){return this}),B;function ke(lt){return function(vt){return function(je){if(E)throw new TypeError("Generator is already executing.");for(;le;)try{if(E=1,k&&(G=2&je[0]?k.return:je[0]?k.throw||((G=k.return)&&G.call(k),0):k.next)&&!(G=G.call(k,je[1])).done)return G;switch(k=0,G&&(je=[2&je[0],G.value]),je[0]){case 0:case 1:G=je;break;case 4:return le.label++,{value:je[1],done:!1};case 5:le.label++,k=je[1],je=[0];continue;case 7:je=le.ops.pop(),le.trys.pop();continue;default:if(!(G=le.trys,(G=G.length>0&&G[G.length-1])||je[0]!==6&&je[0]!==2)){le=0;continue}if(je[0]===3&&(!G||je[1]>G[0]&&je[1]<G[3])){le.label=je[1];break}if(je[0]===6&&le.label<G[1]){le.label=G[1],G=je;break}if(G&&le.label<G[2]){le.label=G[2],le.ops.push(je);break}G[2]&&le.ops.pop(),le.trys.pop();continue}je=m.call(N,le)}catch(At){je=[6,At],k=0}finally{E=G=0}if(5&je[0])throw je[1];return{value:je[0]?je[1]:void 0,done:!0}}([lt,vt])}}}function ue(){for(var N=0,m=0,E=arguments.length;m<E;m++)N+=arguments[m].length;var k=Array(N),G=0;for(m=0;m<E;m++)for(var B=arguments[m],le=0,ke=B.length;le<ke;le++,G++)k[G]=B[le];return k}var q=function(){function N(){}return N.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},N.setAttributes=function(m,E){for(var k=0,G=E;k<G.length;k++){var B=G[k],le=B[0],ke=B[1];m.setAttribute(le,ke)}},N.createRect=function(m,E,k){var G=document.createElementNS("http://www.w3.org/2000/svg","rect");return G.setAttribute("width",m.toString()),G.setAttribute("height",E.toString()),k&&N.setAttributes(G,k),G},N.createLine=function(m,E,k,G,B){var le=document.createElementNS("http://www.w3.org/2000/svg","line");return le.setAttribute("x1",m.toString()),le.setAttribute("y1",E.toString()),le.setAttribute("x2",k.toString()),le.setAttribute("y2",G.toString()),B&&N.setAttributes(le,B),le},N.createPolygon=function(m,E){var k=document.createElementNS("http://www.w3.org/2000/svg","polygon");return k.setAttribute("points",m),E&&N.setAttributes(k,E),k},N.createCircle=function(m,E){var k=document.createElementNS("http://www.w3.org/2000/svg","circle");return k.setAttribute("cx",(m/2).toString()),k.setAttribute("cy",(m/2).toString()),k.setAttribute("r",m.toString()),E&&N.setAttributes(k,E),k},N.createEllipse=function(m,E,k){var G=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return G.setAttribute("cx",(m/2).toString()),G.setAttribute("cy",(E/2).toString()),G.setAttribute("rx",(m/2).toString()),G.setAttribute("ry",(E/2).toString()),k&&N.setAttributes(G,k),G},N.createGroup=function(m){var E=document.createElementNS("http://www.w3.org/2000/svg","g");return m&&N.setAttributes(E,m),E},N.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},N.createMarker=function(m,E,k,G,B,le,ke){var lt=document.createElementNS("http://www.w3.org/2000/svg","marker");return N.setAttributes(lt,[["id",m],["orient",E],["markerWidth",k.toString()],["markerHeight",G.toString()],["refX",B.toString()],["refY",le.toString()]]),lt.appendChild(ke),lt},N.createText=function(m){var E=document.createElementNS("http://www.w3.org/2000/svg","text");return E.setAttribute("x","0"),E.setAttribute("y","0"),m&&N.setAttributes(E,m),E},N.createTSpan=function(m,E){var k=document.createElementNS("http://www.w3.org/2000/svg","tspan");return k.textContent=m,E&&N.setAttributes(k,E),k},N.createImage=function(m){var E=document.createElementNS("http://www.w3.org/2000/svg","image");return m&&N.setAttributes(E,m),E},N.createPoint=function(m,E){var k=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return k.x=m,k.y=E,k},N.createPath=function(m,E){var k=document.createElementNS("http://www.w3.org/2000/svg","path");return k.setAttribute("d",m),E&&N.setAttributes(k,E),k},N}(),Fe=function(){function N(){}return N.addKey=function(m){N.key=m},Object.defineProperty(N,"isLicensed",{get:function(){return!!N.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(N.key)},enumerable:!1,configurable:!0}),N}(),We=function(){function N(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return N.prototype.rasterize=function(m,E,k){var G=this;return new Promise(function(B){var le=k!==void 0?k:document.createElement("canvas");m===null&&(G.markersOnly=!0,G.naturalSize=!1);var ke=document.createElementNS("http://www.w3.org/2000/svg","svg");ke.setAttribute("xmlns","http://www.w3.org/2000/svg"),ke.setAttribute("width",E.width.baseVal.valueAsString),ke.setAttribute("height",E.height.baseVal.valueAsString),ke.setAttribute("viewBox","0 0 "+E.viewBox.baseVal.width.toString()+" "+E.viewBox.baseVal.height.toString()),ke.innerHTML=E.innerHTML,G.naturalSize===!0?(ke.width.baseVal.value=m.naturalWidth,ke.height.baseVal.value=m.naturalHeight):G.width!==void 0&&G.height!==void 0&&(ke.width.baseVal.value=G.width,ke.height.baseVal.value=G.height),le.width=ke.width.baseVal.value,le.height=ke.height.baseVal.value;var lt=ke.outerHTML,vt=le.getContext("2d");G.markersOnly!==!0&&vt.drawImage(m,0,0,le.width,le.height);var je=window.URL,At=new Image(le.width,le.height);At.setAttribute("crossOrigin","anonymous");var en=new Blob([lt],{type:"image/svg+xml"}),un=je.createObjectURL(en);At.onload=function(){vt.drawImage(At,0,0),je.revokeObjectURL(un);var Bn=le.toDataURL(G.imageType,G.imageQuality);B(Bn)},At.src=un})},N}(),He=function(){},Ge=function(){function N(m){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+m+"_"}return Object.defineProperty(N.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(N.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(N.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),N.prototype.addClass=function(m){return this.styleSheet===void 0&&this.addStyleSheet(),m.name=""+this.classNamePrefix+m.localName,this.classes.push(m),this.styleSheet.sheet.insertRule("."+m.name+" {"+m.style+"}",this.styleSheet.sheet.cssRules.length),m},N.prototype.addRule=function(m){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(m),this.styleSheet.sheet.insertRule(m.selector+" {"+m.style+"}",this.styleSheet.sheet.cssRules.length)},N.prototype.addStyleSheet=function(){var m;this.styleSheet=document.createElement("style"),((m=this.styleSheetRoot)!==null&&m!==void 0?m:document.head).appendChild(this.styleSheet),this.addRule(new it("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new it("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new it("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new De("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new De("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},N.prototype.removeStyleSheet=function(){var m;this.styleSheet&&(((m=this.styleSheetRoot)!==null&&m!==void 0?m:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},N}(),it=function(N,m){this.selector=N,this.style=m},De=function(N,m){this.localName=N,this.style=m},Ue=function(){function N(m,E,k,G,B){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=m,this.displayMode=E,this.markerItems=k,this.uiStyleSettings=G,this.styles=B,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return N.prototype.show=function(m){var E=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=m,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var k=document.createElement("div");k.className=this.toolbarBlockStyleClass.name,k.style.whiteSpace="nowrap",this.uiContainer.appendChild(k),this.addActionButton(k,'<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(k,'<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(k,'<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(k,'<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(k,'<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(k,'<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(k,'<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(k,'<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(B){var le=document.createElement("div");le.className=""+E.toolbarButtonStyleClass.name,le.setAttribute("data-type-name",B.typeName),le.innerHTML=B.icon,le.addEventListener("click",function(){E.markerToolbarButtonClicked(le,B)}),E.buttons.push(le),E.markerButtons.push(le)}),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()},N.prototype.addButtonClickListener=function(m){this.buttonClickListeners.push(m)},N.prototype.removeButtonClickListener=function(m){this.buttonClickListeners.indexOf(m)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(m),1)},N.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},N.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var m=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var E=0;E<this.markerButtons.length;E++)E<m||E===m&&this.markerButtons.length-1===m?this.markerButtonBlock.appendChild(this.markerButtons[E]):(E===m&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[E]))}},N.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")},N.prototype.resetButtonStyles=function(){var m=this;this.buttons.forEach(function(E){E.className=E.className.replace(m.uiStyleSettings.toolbarButtonStyleColorsClassName?m.uiStyleSettings.toolbarButtonStyleColorsClassName:m.toolbarButtonStyleColorsClass.name,"").trim(),E.className=E.className.replace(m.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?m.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:m.toolbarActiveButtonStyleColorsClass.name,"").trim(),E.className+=" "+(m.uiStyleSettings.toolbarButtonStyleColorsClassName?m.uiStyleSettings.toolbarButtonStyleColorsClassName:m.toolbarButtonStyleColorsClass.name)})},N.prototype.addActionButton=function(m,E,k){var G=this,B=document.createElement("div");switch(B.className=""+this.toolbarButtonStyleClass.name,B.innerHTML=E,B.setAttribute("data-action",k),B.addEventListener("click",function(){G.actionToolbarButtonClicked(B,k)}),k){case"select":B.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":B.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":B.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":B.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":B.style.fill=this.uiStyleSettings.closeButtonColor}m.appendChild(B),this.buttons.push(B)},N.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new De("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 De("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new De("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new De("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 De("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var m=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new De("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*m)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*m)+`px;
|
|
padding: `+m+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new De("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new De("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new it("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new it("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},N.prototype.markerToolbarButtonClicked=function(m,E){this.setActiveButton(m),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(k){return k("marker",E)}),this.markerButtonOverflowBlock.style.display="none"},N.prototype.actionToolbarButtonClicked=function(m,E){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(k){return k("action",E)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},N.prototype.setActiveButton=function(m){this.resetButtonStyles(),m.className=m.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),m.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},N.prototype.setActiveMarkerButton=function(m){var E=this.markerButtons.find(function(k){return k.getAttribute("data-type-name")===m});E&&this.setActiveButton(E)},N.prototype.setCurrentMarker=function(m){var E=this;this.currentMarker=m,this.buttons.filter(function(k){return/delete|notes/.test(k.getAttribute("data-action"))}).forEach(function(k){E.currentMarker===void 0?(k.style.fillOpacity="0.4",k.style.pointerEvents="none"):(k.style.fillOpacity="1",k.style.pointerEvents="all")})},N}(),Xe=function(){function N(m,E,k,G){this.panels=[],this.panelButtons=[],this.markerjsContainer=m,this.displayMode=E,this.uiStyleSettings=k,this.styles=G,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return N.prototype.addStyles=function(){var m;this.toolboxStyleClass=this.styles.addClass(new De("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 De("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var E=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new De("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new De("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new De("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 De("toolbox-panel-row_colors",`
|
|
background-color: `+((m=this.uiStyleSettings.toolboxBackgroundColor)!==null&&m!==void 0?m:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new De("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*E)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*E)+`px;
|
|
padding: `+E+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new De("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new De("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new it("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new it("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},N.prototype.show=function(m){var E;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=m,this.uiContainer.className=this.toolboxStyleClass.name+" "+((E=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&E!==void 0?E:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},N.prototype.setPanelButtons=function(m){var E,k,G=this;this.panels=m,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((E=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&E!==void 0?E:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((k=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&k!==void 0?k:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(B){var le;B.uiStyleSettings=G.uiStyleSettings;var ke=document.createElement("div");ke.className=G.toolboxButtonStyleClass.name+" "+((le=G.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&le!==void 0?le:G.toolboxButtonStyleColorsClass.name),ke.innerHTML=B.icon,ke.title=B.title,ke.addEventListener("click",function(){G.panelButtonClick(B)}),G.panelButtons.push(ke),G.buttonRow.appendChild(ke)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},N.prototype.panelButtonClick=function(m){var E=this,k=-1;if(m!==this.activePanel){k=this.panels.indexOf(m),this.panelRow.innerHTML="";var G=m.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=m}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){E.displayMode==="inline"?E.panelRow.style.display="none":E.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(B,le){var ke,lt;B.className=E.toolboxButtonStyleClass.name+" "+(le===k?""+((ke=E.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&ke!==void 0?ke:E.toolboxActiveButtonStyleColorsClass.name):""+((lt=E.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&<!==void 0?lt:E.toolboxButtonStyleColorsClass.name))})},N}(),$=function(N,m){this.title=N,this.icon=m},me=function(N){function m(E,k,G,B){var le=N.call(this,E,B||'<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 le.colors=[],le.addTransparent=!1,le.colorBoxes=[],le.colors=k,le.currentColor=G,le.setCurrentColor=le.setCurrentColor.bind(le),le.getColorBox=le.getColorBox.bind(le),le}return we(m,N),m.prototype.getUi=function(){var E=this,k=document.createElement("div");return k.style.overflow="hidden",k.style.whiteSpace="nowrap",this.colors.forEach(function(G){var B=E.getColorBox(G);k.appendChild(B),E.colorBoxes.push(B)}),k},m.prototype.getColorBox=function(E){var k=this,G=this.uiStyleSettings.toolbarHeight/4,B=this.uiStyleSettings.toolbarHeight-G,le=document.createElement("div");le.style.display="inline-block",le.style.boxSizing="content-box",le.style.width=B-2+"px",le.style.height=B-2+"px",le.style.padding="1px",le.style.marginRight="2px",le.style.marginBottom="2px",le.style.borderWidth="2px",le.style.borderStyle="solid",le.style.borderRadius=(B+2)/2+"px",le.style.borderColor=E===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",le.addEventListener("click",function(){k.setCurrentColor(E,le)});var ke=document.createElement("div");return ke.style.display="inline-block",ke.style.width=B-2+"px",ke.style.height=B-2+"px",ke.style.backgroundColor=E,ke.style.borderRadius=B/2+"px",E==="transparent"&&(ke.style.fill=this.uiStyleSettings.toolboxAccentColor,ke.innerHTML=`<svg viewBox="0 0 24 24">
|
|
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
|
</svg>`),le.appendChild(ke),le},m.prototype.setCurrentColor=function(E,k){var G=this;this.currentColor=E,this.colorBoxes.forEach(function(B){B.style.borderColor=B===k?G.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(E)},m}($),xe=function(){function N(m,E,k){this._state="new",this._isSelected=!1,this._container=m,this._overlayContainer=E,this.globalSettings=k,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(N.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),N.prototype.ownsTarget=function(m){return!1},Object.defineProperty(N.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),N.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},N.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},N.prototype.pointerDown=function(m,E){},N.prototype.dblClick=function(m,E){},N.prototype.manipulate=function(m){},N.prototype.pointerUp=function(m){this.stateChanged()},N.prototype.dispose=function(){},N.prototype.addMarkerVisualToContainer=function(m){this.container.childNodes.length>0?this.container.insertBefore(m,this.container.childNodes[0]):this.container.appendChild(m)},N.prototype.getState=function(){return{typeName:N.typeName,state:this.state,notes:this.notes}},N.prototype.restoreState=function(m){this._state=m.state,this.notes=m.notes},N.prototype.scale=function(m,E){},N.prototype.colorChanged=function(m){this.onColorChanged&&this.onColorChanged(m),this.stateChanged()},N.prototype.fillColorChanged=function(m){this.onFillColorChanged&&this.onFillColorChanged(m),this.stateChanged()},N.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var m=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),m.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(m)&&this.onStateChanged(this)}},N.typeName="MarkerBase",N}(),Ee=function(){function N(){this.findGripByVisual=this.findGripByVisual.bind(this)}return N.prototype.findGripByVisual=function(m){return this.topLeft.ownsTarget(m)?this.topLeft:this.topCenter.ownsTarget(m)?this.topCenter:this.topRight.ownsTarget(m)?this.topRight:this.centerLeft.ownsTarget(m)?this.centerLeft:this.centerRight.ownsTarget(m)?this.centerRight:this.bottomLeft.ownsTarget(m)?this.bottomLeft:this.bottomCenter.ownsTarget(m)?this.bottomCenter:this.bottomRight.ownsTarget(m)?this.bottomRight:void 0},N}(),Ie=function(){function N(){this.GRIP_SIZE=10,this.visual=q.createGroup(),this.visual.appendChild(q.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(q.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return N.prototype.ownsTarget=function(m){return m===this.visual||m===this.visual.childNodes[0]||m===this.visual.childNodes[1]},N}(),Be=function(){function N(){}return N.toITransformMatrix=function(m){return{a:m.a,b:m.b,c:m.c,d:m.d,e:m.e,f:m.f}},N.toSVGMatrix=function(m,E){return m.a=E.a,m.b=E.b,m.c=E.c,m.d=E.d,m.e=E.e,m.f=E.f,m},N}(),Je=function(N){function m(E,k,G){var B=N.call(this,E,k,G)||this;return B.left=0,B.top=0,B.width=0,B.height=0,B.defaultSize={x:50,y:20},B.offsetX=0,B.offsetY=0,B.rotationAngle=0,B.CB_DISTANCE=10,B._suppressMarkerCreateEvent=!1,B.container.transform.baseVal.appendItem(q.createTransform()),B.setupControlBox(),B}return we(m,N),Object.defineProperty(m.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"visual",{get:function(){return this._visual},set:function(E){this._visual=E;var k=q.createTransform();this._visual.transform.baseVal.appendItem(k)},enumerable:!1,configurable:!0}),m.prototype.ownsTarget=function(E){return!!N.prototype.ownsTarget.call(this,E)||!!(this.controlGrips.findGripByVisual(E)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(E))},m.prototype.pointerDown=function(E,k){N.prototype.pointerDown.call(this,E,k),this.state==="new"&&(this.left=E.x,this.top=E.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var G=this.unrotatePoint(E);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(k),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(k)){this.activeGrip=this.rotatorGrip;var B=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=B.x-this.width/2,this.top=B.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var le=this.container.transform.baseVal.getItem(0);le.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(le,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},m.prototype.pointerUp=function(E){var k=this.state;N.prototype.pointerUp.call(this,E),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(E),this._state="select",k==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},m.prototype.moveVisual=function(E){this.visual.style.transform="translate("+E.x+"px, "+E.y+"px)"},m.prototype.manipulate=function(E){var k=this.unrotatePoint(E);this.state==="creating"?this.resize(E):this.state==="move"?(this.left=this.manipulationStartLeft+(k.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(k.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(k):this.state==="rotate"&&this.rotate(E)},m.prototype.resize=function(E){var k=this.manipulationStartLeft,G=this.manipulationStartWidth,B=this.manipulationStartTop,le=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:k=this.manipulationStartLeft+E.x-this.manipulationStartX,G=this.manipulationStartWidth+this.manipulationStartLeft-k;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:G=this.manipulationStartWidth+E.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:B=this.manipulationStartTop+E.y-this.manipulationStartY,le=this.manipulationStartHeight+this.manipulationStartTop-B;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:le=this.manipulationStartHeight+E.y-this.manipulationStartY}G>=0?(this.left=k,this.width=G):(this.left=k+G,this.width=-G),le>=0?(this.top=B,this.height=le):(this.top=B+le,this.height=-le),this.setSize()},m.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},m.prototype.rotate=function(E){if(Math.abs(E.x-this.centerX)>.1){var k=Math.sign(E.x-this.centerX);this.rotationAngle=180*Math.atan((E.y-this.centerY)/(E.x-this.centerX))/Math.PI+90*k,this.applyRotation()}},m.prototype.applyRotation=function(){var E=this.container.transform.baseVal.getItem(0);E.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(E,0)},m.prototype.rotatePoint=function(E){if(this.rotationAngle===0)return E;var k=this.container.getCTM(),G=q.createPoint(E.x,E.y);return{x:(G=G.matrixTransform(k)).x,y:G.y}},m.prototype.unrotatePoint=function(E){if(this.rotationAngle===0)return E;var k=this.container.getCTM();k=k.inverse();var G=q.createPoint(E.x,E.y);return{x:(G=G.matrixTransform(k)).x,y:G.y}},m.prototype.select=function(){N.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},m.prototype.deselect=function(){N.prototype.deselect.call(this),this.controlBox.style.display="none"},m.prototype.setupControlBox=function(){this.controlBox=q.createGroup();var E=q.createTransform();E.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(E),this.container.appendChild(this.controlBox),this.controlRect=q.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=q.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 Ee,this.addControlGrips(),this.controlBox.style.display="none"},m.prototype.adjustControlBox=function(){var E=this.controlBox.transform.baseVal.getItem(0);E.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(E,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()},m.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()},m.prototype.createGrip=function(){var E=new Ie;return E.visual.transform.baseVal.appendItem(q.createTransform()),this.controlBox.appendChild(E.visual),E},m.prototype.positionGrips=function(){var E=this.controlGrips.topLeft.GRIP_SIZE,k=-E/2,G=k,B=(this.width+this.CB_DISTANCE)/2-E/2,le=(this.height+this.CB_DISTANCE)/2-E/2,ke=this.height+this.CB_DISTANCE-E/2,lt=this.width+this.CB_DISTANCE-E/2;this.positionGrip(this.controlGrips.topLeft.visual,k,G),this.positionGrip(this.controlGrips.topCenter.visual,B,G),this.positionGrip(this.controlGrips.topRight.visual,lt,G),this.positionGrip(this.controlGrips.centerLeft.visual,k,le),this.positionGrip(this.controlGrips.centerRight.visual,lt,le),this.positionGrip(this.controlGrips.bottomLeft.visual,k,ke),this.positionGrip(this.controlGrips.bottomCenter.visual,B,ke),this.positionGrip(this.controlGrips.bottomRight.visual,lt,ke),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,B,G-3*this.CB_DISTANCE)},m.prototype.positionGrip=function(E,k,G){var B=E.transform.baseVal.getItem(0);B.setTranslate(k,G),E.transform.baseVal.replaceItem(B,0)},m.prototype.hideControlBox=function(){this.controlBox.style.display="none"},m.prototype.showControlBox=function(){this.controlBox.style.display=""},m.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Be.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Be.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},N.prototype.getState.call(this))},m.prototype.restoreState=function(E){N.prototype.restoreState.call(this,E);var k=E;this.left=k.left,this.top=k.top,this.width=k.width,this.height=k.height,this.rotationAngle=k.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Be.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,k.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Be.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,k.containerTransformMatrix))},m.prototype.scale=function(E,k){N.prototype.scale.call(this,E,k);var G=this.rotatePoint({x:this.left,y:this.top}),B=this.unrotatePoint({x:G.x*E,y:G.y*k});this.left=B.x,this.top=B.y,this.width=this.width*E,this.height=this.height*k,this.adjustControlBox()},m}(xe),ze=function(N){function m(E,k,G){var B=N.call(this,E,k,G)||this;return B.fillColor="transparent",B.strokeColor="transparent",B.strokeWidth=0,B.strokeDasharray="",B.opacity=1,B.setStrokeColor=B.setStrokeColor.bind(B),B.setFillColor=B.setFillColor.bind(B),B.setStrokeWidth=B.setStrokeWidth.bind(B),B.setStrokeDasharray=B.setStrokeDasharray.bind(B),B.createVisual=B.createVisual.bind(B),B}return we(m,N),m.prototype.ownsTarget=function(E){return!(!N.prototype.ownsTarget.call(this,E)&&E!==this.visual)},m.prototype.createVisual=function(){this.visual=q.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)},m.prototype.pointerDown=function(E,k){N.prototype.pointerDown.call(this,E,k),this.state==="new"&&(this.createVisual(),this.moveVisual(E),this._state="creating")},m.prototype.manipulate=function(E){N.prototype.manipulate.call(this,E)},m.prototype.resize=function(E){N.prototype.resize.call(this,E),this.setSize()},m.prototype.setSize=function(){N.prototype.setSize.call(this),q.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},m.prototype.pointerUp=function(E){N.prototype.pointerUp.call(this,E),this.setSize()},m.prototype.setStrokeColor=function(E){this.strokeColor=E,this.visual&&q.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(E),this.stateChanged()},m.prototype.setFillColor=function(E){this.fillColor=E,this.visual&&q.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},m.prototype.setStrokeWidth=function(E){this.strokeWidth=E,this.visual&&q.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},m.prototype.setStrokeDasharray=function(E){this.strokeDasharray=E,this.visual&&q.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},m.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},N.prototype.getState.call(this))},m.prototype.restoreState=function(E){var k=E;this.fillColor=k.fillColor,this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.opacity=k.opacity,this.createVisual(),N.prototype.restoreState.call(this,E),this.setSize()},m.prototype.scale=function(E,k){N.prototype.scale.call(this,E,k),this.setSize()},m.title="Rectangle marker",m}(Je),ut=function(N){function m(E,k,G,B){var le=N.call(this,E,B||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return le.widths=[],le.widthBoxes=[],le.widths=k,le.currentWidth=G,le.setCurrentWidth=le.setCurrentWidth.bind(le),le}return we(m,N),m.prototype.getUi=function(){var E=this,k=document.createElement("div");return k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2",this.widths.forEach(function(G){var B=document.createElement("div");B.style.display="flex",B.style.flexGrow="2",B.style.alignItems="center",B.style.justifyContent="space-between",B.style.padding="5px",B.style.borderWidth="2px",B.style.borderStyle="solid",B.style.borderColor=G===E.currentWidth?E.uiStyleSettings.toolboxAccentColor:"transparent",B.addEventListener("click",function(){E.setCurrentWidth(G,B)}),k.appendChild(B);var le=document.createElement("div");le.innerText=G.toString(),le.style.marginRight="5px",B.appendChild(le);var ke=document.createElement("div");ke.style.minHeight="20px",ke.style.flexGrow="2",ke.style.display="flex",ke.style.alignItems="center";var lt=document.createElement("hr");lt.style.minWidth="20px",lt.style.border="0px",lt.style.borderTop=G+"px solid "+E.uiStyleSettings.toolboxColor,lt.style.flexGrow="2",ke.appendChild(lt),B.appendChild(ke),E.widthBoxes.push(B)}),k},m.prototype.setCurrentWidth=function(E,k){var G=this;this.currentWidth=E,this.widthBoxes.forEach(function(B){B.style.borderColor=B===k?G.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},m}($),et=function(N){function m(E,k,G,B){var le=N.call(this,E,B||'<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 le.styles=[],le.styleBoxes=[],le.styles=k,le.currentStyle=G,le.setCurrentStyle=le.setCurrentStyle.bind(le),le}return we(m,N),m.prototype.getUi=function(){var E=this,k=document.createElement("div");return k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2",this.styles.forEach(function(G){var B=document.createElement("div");B.style.display="flex",B.style.alignItems="center",B.style.justifyContent="space-between",B.style.padding="5px",B.style.borderWidth="2px",B.style.borderStyle="solid",B.style.overflow="hidden",B.style.maxWidth=100/E.styles.length-5+"%",B.style.borderColor=G===E.currentStyle?E.uiStyleSettings.toolboxAccentColor:"transparent",B.addEventListener("click",function(){E.setCurrentStyle(G,B)}),k.appendChild(B);var le=document.createElement("div");le.style.minHeight="20px",le.style.flexGrow="2",le.style.overflow="hidden";var ke=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+E.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(G!==""?'stroke-dasharray="'+G+'"':"")+` />
|
|
</svg>`;le.innerHTML=ke,B.appendChild(le),E.styleBoxes.push(B)}),k},m.prototype.setCurrentStyle=function(E,k){var G=this;this.currentStyle=E,this.styleBoxes.forEach(function(B){B.style.borderColor=B===k?G.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},m}($),Ze=function(N){function m(E,k,G){var B=N.call(this,E,k,G)||this;return B.strokeColor=G.defaultColor,B.strokeWidth=G.defaultStrokeWidth,B.strokeDasharray=G.defaultStrokeDasharray,B.strokePanel=new me("Line color",G.defaultColorSet,G.defaultColor),B.strokePanel.onColorChanged=B.setStrokeColor,B.strokeWidthPanel=new ut("Line width",G.defaultStrokeWidths,G.defaultStrokeWidth),B.strokeWidthPanel.onWidthChanged=B.setStrokeWidth,B.strokeStylePanel=new et("Line style",G.defaultStrokeDasharrays,G.defaultStrokeDasharray),B.strokeStylePanel.onStyleChanged=B.setStrokeDasharray,B}return we(m,N),Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var E=N.prototype.getState.call(this);return E.typeName=m.typeName,E},m.typeName="FrameMarker",m.title="Frame marker",m.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',m}(ze),Ve=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},Le=function(N){function m(E,k,G){var B=N.call(this,E,k,G)||this;return B.x1=0,B.y1=0,B.x2=0,B.y2=0,B.defaultLength=50,B.manipulationStartX=0,B.manipulationStartY=0,B.manipulationStartX1=0,B.manipulationStartY1=0,B.manipulationStartX2=0,B.manipulationStartY2=0,B.setupControlBox(),B}return we(m,N),m.prototype.ownsTarget=function(E){return!!N.prototype.ownsTarget.call(this,E)||!(!this.grip1.ownsTarget(E)&&!this.grip2.ownsTarget(E))},m.prototype.pointerDown=function(E,k){N.prototype.pointerDown.call(this,E,k),this.manipulationStartX=E.x,this.manipulationStartY=E.y,this.state==="new"&&(this.x1=E.x,this.y1=E.y,this.x2=E.x,this.y2=E.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(k)?this.activeGrip=this.grip1:this.grip2.ownsTarget(k)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},m.prototype.pointerUp=function(E){var k=this.state;N.prototype.pointerUp.call(this,E),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(E),this._state="select",k==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},m.prototype.adjustVisual=function(){},m.prototype.manipulate=function(E){this.state==="creating"?this.resize(E):this.state==="move"?(this.x1=this.manipulationStartX1+E.x-this.manipulationStartX,this.y1=this.manipulationStartY1+E.y-this.manipulationStartY,this.x2=this.manipulationStartX2+E.x-this.manipulationStartX,this.y2=this.manipulationStartY2+E.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(E)},m.prototype.resize=function(E){switch(this.activeGrip){case this.grip1:this.x1=E.x,this.y1=E.y;break;case this.grip2:case void 0:this.x2=E.x,this.y2=E.y}this.adjustVisual(),this.adjustControlBox()},m.prototype.select=function(){N.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},m.prototype.deselect=function(){N.prototype.deselect.call(this),this.controlBox.style.display="none"},m.prototype.setupControlBox=function(){this.controlBox=q.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},m.prototype.adjustControlBox=function(){this.positionGrips()},m.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},m.prototype.createGrip=function(){var E=new Ie;return E.visual.transform.baseVal.appendItem(q.createTransform()),this.controlBox.appendChild(E.visual),E},m.prototype.positionGrips=function(){var E=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-E/2,this.y1-E/2),this.positionGrip(this.grip2.visual,this.x2-E/2,this.y2-E/2)},m.prototype.positionGrip=function(E,k,G){var B=E.transform.baseVal.getItem(0);B.setTranslate(k,G),E.transform.baseVal.replaceItem(B,0)},m.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},N.prototype.getState.call(this))},m.prototype.restoreState=function(E){N.prototype.restoreState.call(this,E);var k=E;this.x1=k.x1,this.y1=k.y1,this.x2=k.x2,this.y2=k.y2},m.prototype.scale=function(E,k){N.prototype.scale.call(this,E,k),this.x1=this.x1*E,this.y1=this.y1*k,this.x2=this.x2*E,this.y2=this.y2*k,this.adjustVisual(),this.adjustControlBox()},m}(xe),dt=function(N){function m(E,k,G){var B=N.call(this,E,k,G)||this;return B.strokeColor="transparent",B.strokeWidth=0,B.strokeDasharray="",B.setStrokeColor=B.setStrokeColor.bind(B),B.setStrokeWidth=B.setStrokeWidth.bind(B),B.setStrokeDasharray=B.setStrokeDasharray.bind(B),B.strokeColor=G.defaultColor,B.strokeWidth=G.defaultStrokeWidth,B.strokeDasharray=G.defaultStrokeDasharray,B.strokePanel=new me("Line color",G.defaultColorSet,G.defaultColor),B.strokePanel.onColorChanged=B.setStrokeColor,B.strokeWidthPanel=new ut("Line width",G.defaultStrokeWidths,G.defaultStrokeWidth),B.strokeWidthPanel.onWidthChanged=B.setStrokeWidth,B.strokeStylePanel=new et("Line style",G.defaultStrokeDasharrays,G.defaultStrokeDasharray),B.strokeStylePanel.onStyleChanged=B.setStrokeDasharray,B}return we(m,N),m.prototype.ownsTarget=function(E){return!(!N.prototype.ownsTarget.call(this,E)&&E!==this.visual&&E!==this.selectorLine&&E!==this.visibleLine)},m.prototype.createVisual=function(){this.visual=q.createGroup(),this.selectorLine=q.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=q.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)},m.prototype.pointerDown=function(E,k){N.prototype.pointerDown.call(this,E,k),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},m.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()),q.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),q.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),q.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},m.prototype.setStrokeColor=function(E){this.strokeColor=E,this.adjustVisual(),this.colorChanged(E)},m.prototype.setStrokeWidth=function(E){this.strokeWidth=E,this.adjustVisual()},m.prototype.setStrokeDasharray=function(E){this.strokeDasharray=E,this.adjustVisual(),this.stateChanged()},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var E=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},N.prototype.getState.call(this));return E.typeName=m.typeName,E},m.prototype.restoreState=function(E){N.prototype.restoreState.call(this,E);var k=E;this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.createVisual(),this.adjustVisual()},m.typeName="LineMarker",m.title="Line marker",m.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',m}(Le),Ae=function(N){function m(E,k,G,B){var le=N.call(this,E,B||'<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 le.fonts=[],le.fontBoxes=[],le.fonts=k,le.currentFont=G,le.setCurrentFont=le.setCurrentFont.bind(le),le}return we(m,N),m.prototype.getUi=function(){var E=this,k=document.createElement("div");return k.style.overflow="hidden",k.style.flexGrow="2",this.fonts.forEach(function(G){var B=document.createElement("div");B.style.display="inline-block",B.style.alignItems="center",B.style.justifyContent="space-between",B.style.padding="5px",B.style.borderWidth="2px",B.style.borderStyle="solid",B.style.overflow="hidden",B.style.maxWidth=100/E.fonts.length-5+"%",B.style.borderColor=G===E.currentFont?E.uiStyleSettings.toolboxAccentColor:"transparent",B.addEventListener("click",function(){E.setCurrentFont(G,B)}),k.appendChild(B);var le=document.createElement("div");le.style.display="flex",le.style.minHeight="20px",le.style.flexGrow="2",le.style.fontFamily=G,le.style.overflow="hidden";var ke=document.createElement("div");ke.style.whiteSpace="nowrap",ke.style.overflow="hidden",ke.style.textOverflow="ellipsis",ke.innerHTML="The quick brown fox jumps over the lazy dog",le.appendChild(ke),B.appendChild(le),E.fontBoxes.push(B)}),k},m.prototype.setCurrentFont=function(E,k){var G=this;this.currentFont=E,this.fontBoxes.forEach(function(B){B.style.borderColor=B===k?G.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},m}($),Ne=function(N){function m(E,k,G){var B=N.call(this,E,k,G)||this;return B.color="transparent",B.padding=5,B.DEFAULT_TEXT="your text here",B.text=B.DEFAULT_TEXT,B.isMoved=!1,B.color=G.defaultColor,B.fontFamily=G.defaultFontFamily,B.defaultSize={x:100,y:30},B.setColor=B.setColor.bind(B),B.setFont=B.setFont.bind(B),B.renderText=B.renderText.bind(B),B.sizeText=B.sizeText.bind(B),B.textEditDivClicked=B.textEditDivClicked.bind(B),B.showTextEditor=B.showTextEditor.bind(B),B.setSize=B.setSize.bind(B),B.positionTextEditor=B.positionTextEditor.bind(B),B.colorPanel=new me("Color",G.defaultColorSet,G.defaultColor),B.colorPanel.onColorChanged=B.setColor,B.fontFamilyPanel=new Ae("Font",G.defaultFontFamilies,G.defaultFontFamily),B.fontFamilyPanel.onFontChanged=B.setFont,B}return we(m,N),m.prototype.ownsTarget=function(E){if(N.prototype.ownsTarget.call(this,E)||E===this.visual||E===this.textElement||E===this.bgRectangle)return!0;var k=!1;return this.textElement.childNodes.forEach(function(G){G===E&&(k=!0)}),k},m.prototype.createVisual=function(){this.visual=q.createGroup(),this.bgRectangle=q.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=q.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(q.createTransform()),this.textElement.transform.baseVal.appendItem(q.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},m.prototype.pointerDown=function(E,k){N.prototype.pointerDown.call(this,E,k),this.isMoved=!1,this.pointerDownPoint=E,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(E),this._state="creating")},m.prototype.renderText=function(){var E=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(k){E.textElement.appendChild(q.createTSpan(k.trim()===""?" ":k.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},m.prototype.getTextScale=function(){var E=this.textElement.getBBox(),k=1;if(E.width>0&&E.height>0){var G=(1*this.width-this.width*this.padding*2/100)/E.width,B=(1*this.height-this.height*this.padding*2/100)/E.height;k=Math.min(G,B)}return k},m.prototype.getTextPosition=function(E){var k=this.textElement.getBBox(),G=0,B=0;return k.width>0&&k.height>0&&(G=(this.width-k.width*E)/2,B=this.height/2-k.height*E/2),{x:G,y:B}},m.prototype.sizeText=function(){var E=this.textElement.getBBox(),k=this.getTextScale(),G=this.getTextPosition(k);G.y-=E.y*k,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+G.x+"px, "+G.y+"px) scale("+k+", "+k+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(G.x,G.y),this.textElement.transform.baseVal.getItem(1).setScale(k,k))},m.prototype.manipulate=function(E){N.prototype.manipulate.call(this,E),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(E.x-this.pointerDownPoint.x)>5||Math.abs(E.y-this.pointerDownPoint.y)>5)},m.prototype.resize=function(E){N.prototype.resize.call(this,E),this.isMoved=!0,this.setSize(),this.sizeText()},m.prototype.setSize=function(){N.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(q.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),q.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},m.prototype.pointerUp=function(E){var k=this.state;k==="creating"&&(this._suppressMarkerCreateEvent=!0),N.prototype.pointerUp.call(this,E),this.setSize(),(k==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},m.prototype.showTextEditor=function(){var E=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(k){k.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var k=Number.parseFloat(E.textEditor.style.fontSize);E.textEditor.clientWidth>=Number.parseInt(E.textEditor.style.maxWidth)&&k>.9;)k-=.1,E.textEditor.style.fontSize=Math.max(k,.9)+"em"}),this.textEditor.addEventListener("keyup",function(k){k.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(k){if(k.clipboardData){var G=k.clipboardData.getData("text"),B=window.getSelection();if(!B.rangeCount)return!1;B.deleteFromDocument(),B.getRangeAt(0).insertNode(document.createTextNode(G)),k.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){E.textEditDivClicked(E.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},m.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var E=this.getTextScale(),k=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),G=this.textElement.getBBox(),B={x:G.width*E,y:G.height*E};k.x-=B.x/2,k.y-=B.y/2,this.textEditor.style.top=k.y+"px",this.textEditor.style.left=k.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-k.x+"px",this.textEditor.style.fontSize=Math.max(16*E,12)+"px",this.textElement.style.display="none"}},m.prototype.textEditDivClicked=function(E){this.text=E.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},m.prototype.select=function(){N.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},m.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),N.prototype.deselect.call(this)},m.prototype.dblClick=function(E,k){N.prototype.dblClick.call(this,E,k),this.showTextEditor()},m.prototype.setColor=function(E){this.textElement&&q.setAttributes(this.textElement,[["fill",E]]),this.color=E,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(E)},m.prototype.setFont=function(E){this.textElement&&q.setAttributes(this.textElement,[["font-family",E]]),this.fontFamily=E,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},m.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},m.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var E=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},N.prototype.getState.call(this));return E.typeName=m.typeName,E},m.prototype.restoreState=function(E){var k=E;this.color=k.color,this.fontFamily=k.fontFamily,this.padding=k.padding,this.text=k.text,this.createVisual(),N.prototype.restoreState.call(this,E),this.setSize()},m.prototype.scale=function(E,k){N.prototype.scale.call(this,E,k),this.setSize(),this.sizeText(),this.positionTextEditor()},m.typeName="TextMarker",m.title="Text marker",m.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>',m}(Je),pe=function(N){function m(E,k,G){var B=N.call(this,E,k,G)||this;return B.color="transparent",B.lineWidth=3,B.drawing=!1,B.pixelRatio=1,B.color=G.defaultColor,B.lineWidth=G.defaultStrokeWidth,B.pixelRatio=G.freehandPixelRatio,B.setColor=B.setColor.bind(B),B.addCanvas=B.addCanvas.bind(B),B.finishCreation=B.finishCreation.bind(B),B.setLineWidth=B.setLineWidth.bind(B),B.colorPanel=new me("Color",G.defaultColorSet,G.defaultColor),B.colorPanel.onColorChanged=B.setColor,B.lineWidthPanel=new ut("Line width",G.defaultStrokeWidths,G.defaultStrokeWidth),B.lineWidthPanel.onWidthChanged=B.setLineWidth,B}return we(m,N),m.prototype.ownsTarget=function(E){return!(!N.prototype.ownsTarget.call(this,E)&&E!==this.visual&&E!==this.drawingImage)},m.prototype.createVisual=function(){this.visual=q.createGroup(),this.drawingImage=q.createImage(),this.visual.appendChild(this.drawingImage);var E=q.createTransform();this.visual.transform.baseVal.appendItem(E),this.addMarkerVisualToContainer(this.visual)},m.prototype.pointerDown=function(E,k){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(E.x,E.y),this.drawing=!0):N.prototype.pointerDown.call(this,E,k)},m.prototype.manipulate=function(E){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(E.x,E.y),this.canvasContext.stroke()):N.prototype.manipulate.call(this,E)},m.prototype.resize=function(E){N.prototype.resize.call(this,E),q.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),q.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},m.prototype.pointerUp=function(E){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):N.prototype.pointerUp.call(this,E)},m.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)},m.prototype.select=function(){this.state==="creating"&&this.finishCreation(),N.prototype.select.call(this)},m.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),N.prototype.deselect.call(this)},m.prototype.finishCreation=function(){for(var E=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),k=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],G=k[0],B=k[1],le=k[2],ke=k[3],lt=!1,vt=0;vt<this.canvasElement.height;vt++)for(var je=0;je<this.canvasElement.width;je++)E.data[vt*this.canvasElement.width*4+4*je+3]>0&&(lt=!0,vt<B&&(B=vt),je<G&&(G=je),vt>ke&&(ke=vt),je>le&&(le=je));if(lt){this.left=G/this.pixelRatio,this.top=B/this.pixelRatio,this.width=(le-G)/this.pixelRatio,this.height=(ke-B)/this.pixelRatio;var At=document.createElement("canvas");At.width=le-G,At.height=ke-B,At.getContext("2d").putImageData(this.canvasContext.getImageData(G,B,le-G,ke-B),0,0),this.drawingImgUrl=At.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},m.prototype.setDrawingImage=function(){q.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),q.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},m.prototype.setColor=function(E){this.color=E,this.colorChanged(E)},m.prototype.setLineWidth=function(E){this.lineWidth=E},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var E=Object.assign({drawingImgUrl:this.drawingImgUrl},N.prototype.getState.call(this));return E.typeName=m.typeName,E},m.prototype.restoreState=function(E){this.createVisual(),N.prototype.restoreState.call(this,E),this.drawingImgUrl=E.drawingImgUrl,this.setDrawingImage()},m.prototype.scale=function(E,k){N.prototype.scale.call(this,E,k),this.setDrawingImage()},m.typeName="FreehandMarker",m.title="Freehand marker",m.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>',m}(Je),he=function(N){function m(E,k,G){var B=N.call(this,E,G||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return B.typeBoxes=[],B.currentType=k,B.setCurrentType=B.setCurrentType.bind(B),B}return we(m,N),m.prototype.getUi=function(){var E=this,k=document.createElement("div");k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2";for(var G=function(ke){var lt="both";switch(ke){case 0:lt="both";break;case 1:lt="start";break;case 2:lt="end";break;case 3:lt="none"}var vt=document.createElement("div");if(vt.style.display="flex",vt.style.flexGrow="2",vt.style.alignItems="center",vt.style.justifyContent="space-between",vt.style.padding="5px",vt.style.borderWidth="2px",vt.style.borderStyle="solid",vt.style.borderColor=lt===B.currentType?B.uiStyleSettings.toolboxAccentColor:"transparent",vt.addEventListener("click",function(){E.setCurrentType(lt,vt)}),k.appendChild(vt),lt==="both"||lt==="start"){var je=document.createElement("div");je.style.display="flex",je.style.alignItems="center",je.style.minHeight="20px",je.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="`+(B.uiStyleSettings!==void 0?B.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,je.style.marginLeft="5px",vt.appendChild(je)}var At=document.createElement("div");At.style.display="flex",At.style.alignItems="center",At.style.minHeight="20px",At.style.flexGrow="2";var en=document.createElement("hr");if(en.style.minWidth="20px",en.style.border="0px",en.style.borderTop="3px solid "+(B.uiStyleSettings!==void 0?B.uiStyleSettings.toolboxColor:"#eeeeee"),en.style.flexGrow="2",At.appendChild(en),vt.appendChild(At),lt==="both"||lt==="end"){var un=document.createElement("div");un.style.display="flex",un.style.alignItems="center",un.style.minHeight="20px",un.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="`+(B.uiStyleSettings!==void 0?B.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,un.style.marginRight="5px",vt.appendChild(un)}B.typeBoxes.push(vt)},B=this,le=0;le<4;le++)G(le);return k},m.prototype.setCurrentType=function(E,k){var G=this;this.currentType=E,this.typeBoxes.forEach(function(B){B.style.borderColor=B===k?G.uiStyleSettings!==void 0?G.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},m}($),de=function(N){function m(E,k,G){var B=N.call(this,E,k,G)||this;return B.arrowType="end",B.arrowBaseHeight=10,B.arrowBaseWidth=10,B.getArrowPoints=B.getArrowPoints.bind(B),B.setArrowType=B.setArrowType.bind(B),B.arrowTypePanel=new he("Arrow type","end"),B.arrowTypePanel.onArrowTypeChanged=B.setArrowType,B}return we(m,N),m.prototype.ownsTarget=function(E){return!(!N.prototype.ownsTarget.call(this,E)&&E!==this.arrow1&&E!==this.arrow2)},m.prototype.getArrowPoints=function(E,k){var G=this.arrowBaseWidth+2*this.strokeWidth,B=this.arrowBaseHeight+2*this.strokeWidth;return E-G/2+","+(k+B/2)+" "+E+","+(k-B/2)+" "+(E+G/2)+","+(k+B/2)},m.prototype.createTips=function(){this.arrow1=q.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(q.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=q.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(q.createTransform()),this.visual.appendChild(this.arrow2)},m.prototype.pointerDown=function(E,k){N.prototype.pointerDown.call(this,E,k),this.state==="creating"&&this.createTips()},m.prototype.adjustVisual=function(){if(N.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",q.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),q.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var E=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),k=this.arrow1.transform.baseVal.getItem(0);k.setRotate(E,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(k,0);var G=this.arrow2.transform.baseVal.getItem(0);G.setRotate(E+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(G,0)}},m.prototype.setArrowType=function(E){this.arrowType=E,this.adjustVisual(),this.stateChanged()},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var E=Object.assign({arrowType:this.arrowType},N.prototype.getState.call(this));return E.typeName=m.typeName,E},m.prototype.restoreState=function(E){N.prototype.restoreState.call(this,E);var k=E;this.arrowType=k.arrowType,this.createTips(),this.adjustVisual()},m.typeName="ArrowMarker",m.title="Arrow marker",m.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',m}(dt),z=function(N){function m(E,k,G){var B=N.call(this,E,k,G)||this;return B.fillColor=G.defaultFillColor,B.strokeWidth=0,B.fillPanel=new me("Color",G.defaultColorSet,G.defaultFillColor),B.fillPanel.onColorChanged=B.setFillColor,B}return we(m,N),Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var E=N.prototype.getState.call(this);return E.typeName=m.typeName,E},m.typeName="CoverMarker",m.title="Cover marker",m.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',m}(ze),J=function(N){function m(E,k,G,B){var le=N.call(this,E,B||'<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 le.opacities=[],le.opacityBoxes=[],le.opacities=k,le.currentOpacity=G,le.setCurrentOpacity=le.setCurrentOpacity.bind(le),le}return we(m,N),m.prototype.getUi=function(){var E=this,k=document.createElement("div");return k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2",k.style.justifyContent="space-between",this.opacities.forEach(function(G){var B=document.createElement("div");B.style.display="flex",B.style.alignItems="center",B.style.justifyContent="center",B.style.padding="5px",B.style.borderWidth="2px",B.style.borderStyle="solid",B.style.borderColor=G===E.currentOpacity?E.uiStyleSettings.toolboxAccentColor:"transparent",B.addEventListener("click",function(){E.setCurrentOpacity(G,B)}),k.appendChild(B);var le=document.createElement("div");le.innerText=100*G+"%",B.appendChild(le),E.opacityBoxes.push(B)}),k},m.prototype.setCurrentOpacity=function(E,k){var G=this;this.currentOpacity=E,this.opacityBoxes.forEach(function(B){B.style.borderColor=B===k?G.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},m}($),Q=function(N){function m(E,k,G){var B=N.call(this,E,k,G)||this;return B.setOpacity=B.setOpacity.bind(B),B.fillColor=G.defaultHighlightColor,B.strokeWidth=0,B.opacity=G.defaultHighlightOpacity,B.fillPanel=new me("Color",G.defaultColorSet,B.fillColor),B.fillPanel.onColorChanged=B.setFillColor,B.opacityPanel=new J("Opacity",G.defaultOpacitySteps,B.opacity),B.opacityPanel.onOpacityChanged=B.setOpacity,B}return we(m,N),m.prototype.setOpacity=function(E){this.opacity=E,this.visual&&q.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var E=N.prototype.getState.call(this);return E.typeName=m.typeName,E},m.typeName="HighlightMarker",m.title="Highlight marker",m.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>',m}(z),te='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',be=function(N){function m(E,k,G){var B=N.call(this,E,k,G)||this;return B.bgColor="transparent",B.tipPosition={x:0,y:0},B.tipBase1Position={x:0,y:0},B.tipBase2Position={x:0,y:0},B.tipMoving=!1,B.color=G.defaultStrokeColor,B.bgColor=G.defaultFillColor,B.fontFamily=G.defaultFontFamily,B.defaultSize={x:100,y:30},B.setBgColor=B.setBgColor.bind(B),B.getTipPoints=B.getTipPoints.bind(B),B.positionTip=B.positionTip.bind(B),B.setTipPoints=B.setTipPoints.bind(B),B.colorPanel=new me("Text color",G.defaultColorSet,B.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>'),B.colorPanel.onColorChanged=B.setColor,B.bgColorPanel=new me("Fill color",G.defaultColorSet,B.bgColor,te),B.bgColorPanel.onColorChanged=B.setBgColor,B.fontFamilyPanel=new Ae("Font",G.defaultFontFamilies,G.defaultFontFamily),B.fontFamilyPanel.onFontChanged=B.setFont,B.tipGrip=new Ie,B.tipGrip.visual.transform.baseVal.appendItem(q.createTransform()),B.controlBox.appendChild(B.tipGrip.visual),B}return we(m,N),m.prototype.ownsTarget=function(E){return N.prototype.ownsTarget.call(this,E)||this.tipGrip.ownsTarget(E)||this.tip===E},m.prototype.createTip=function(){q.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=q.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},m.prototype.pointerDown=function(E,k){this.state==="new"&&N.prototype.pointerDown.call(this,E,k),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(k)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):N.prototype.pointerDown.call(this,E,k)},m.prototype.pointerUp=function(E){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,N.prototype.pointerUp.call(this,E);else{var k=this.state==="creating";N.prototype.pointerUp.call(this,E),this.setTipPoints(k),this.positionTip()}},m.prototype.manipulate=function(E){if(this.tipMoving){var k=this.unrotatePoint(E);this.tipPosition={x:k.x-this.manipulationStartLeft,y:k.y-this.manipulationStartTop},this.positionTip()}else N.prototype.manipulate.call(this,E)},m.prototype.setBgColor=function(E){this.bgRectangle&&this.tip&&(q.setAttributes(this.bgRectangle,[["fill",E]]),q.setAttributes(this.tip,[["fill",E]])),this.bgColor=E,this.fillColorChanged(E)},m.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},m.prototype.setTipPoints=function(E){E===void 0&&(E=!1);var k=Math.min(this.height/2,15),G=this.height/5;E&&(this.tipPosition={x:k+G/2,y:this.height+20});var B=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?B<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(G=this.width/5,k=Math.min(this.width/2,15),this.tipBase1Position={x:k,y:0},this.tipBase2Position={x:k+G,y:0}):(this.tipBase1Position={x:0,y:k},this.tipBase2Position={x:0,y:k+G}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?B<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(G=this.width/5,k=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-k-G,y:0},this.tipBase2Position={x:this.width-k,y:0}):(this.tipBase1Position={x:this.width,y:k},this.tipBase2Position={x:this.width,y:k+G}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?B<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(G=this.width/5,k=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-k-G,y:this.height},this.tipBase2Position={x:this.width-k,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-k-G},this.tipBase2Position={x:this.width,y:this.height-k}):B<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(G=this.width/5,k=Math.min(this.width/2,15),this.tipBase1Position={x:k,y:this.height},this.tipBase2Position={x:k+G,y:this.height}):(this.tipBase1Position={x:0,y:this.height-k},this.tipBase2Position={x:0,y:this.height-k-G})},m.prototype.resize=function(E){N.prototype.resize.call(this,E),this.positionTip()},m.prototype.positionTip=function(){q.setAttributes(this.tip,[["points",this.getTipPoints()]]);var E=this.tipGrip.visual.transform.baseVal.getItem(0);E.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(E,0)},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),m.prototype.select=function(){this.positionTip(),N.prototype.select.call(this)},m.prototype.getState=function(){var E=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},N.prototype.getState.call(this));return E.typeName=m.typeName,E},m.prototype.restoreState=function(E){var k=E;this.bgColor=k.bgColor,this.tipPosition=k.tipPosition,N.prototype.restoreState.call(this,E),this.createTip(),this.setTipPoints()},m.prototype.scale=function(E,k){N.prototype.scale.call(this,E,k),this.tipPosition={x:this.tipPosition.x*E,y:this.tipPosition.y*k},this.positionTip()},m.typeName="CalloutMarker",m.title="Callout marker",m.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>',m}(Ne),Oe=function(N){function m(E,k,G){var B=N.call(this,E,k,G)||this;return B.fillColor="transparent",B.strokeColor="transparent",B.strokeWidth=0,B.strokeDasharray="",B.opacity=1,B.strokeColor=G.defaultColor,B.strokeWidth=G.defaultStrokeWidth,B.strokeDasharray=G.defaultStrokeDasharray,B.fillColor=G.defaultFillColor,B.setStrokeColor=B.setStrokeColor.bind(B),B.setFillColor=B.setFillColor.bind(B),B.setStrokeWidth=B.setStrokeWidth.bind(B),B.setStrokeDasharray=B.setStrokeDasharray.bind(B),B.setOpacity=B.setOpacity.bind(B),B.createVisual=B.createVisual.bind(B),B.strokePanel=new me("Line color",ue(G.defaultColorSet,["transparent"]),G.defaultColor),B.strokePanel.onColorChanged=B.setStrokeColor,B.fillPanel=new me("Fill color",ue(G.defaultColorSet,["transparent"]),B.fillColor,te),B.fillPanel.onColorChanged=B.setFillColor,B.strokeWidthPanel=new ut("Line width",G.defaultStrokeWidths,G.defaultStrokeWidth),B.strokeWidthPanel.onWidthChanged=B.setStrokeWidth,B.strokeStylePanel=new et("Line style",G.defaultStrokeDasharrays,G.defaultStrokeDasharray),B.strokeStylePanel.onStyleChanged=B.setStrokeDasharray,B.opacityPanel=new J("Opacity",G.defaultOpacitySteps,B.opacity),B.opacityPanel.onOpacityChanged=B.setOpacity,B}return we(m,N),m.prototype.ownsTarget=function(E){return!(!N.prototype.ownsTarget.call(this,E)&&E!==this.visual)},m.prototype.createVisual=function(){this.visual=q.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)},m.prototype.pointerDown=function(E,k){N.prototype.pointerDown.call(this,E,k),this.state==="new"&&(this.createVisual(),this.moveVisual(E),this._state="creating")},m.prototype.manipulate=function(E){N.prototype.manipulate.call(this,E)},m.prototype.resize=function(E){N.prototype.resize.call(this,E),this.setSize()},m.prototype.setSize=function(){N.prototype.setSize.call(this),q.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},m.prototype.pointerUp=function(E){N.prototype.pointerUp.call(this,E),this.setSize()},m.prototype.setStrokeColor=function(E){this.strokeColor=E,this.visual&&q.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(E),this.stateChanged()},m.prototype.setFillColor=function(E){this.fillColor=E,this.visual&&q.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(E),this.stateChanged()},m.prototype.setStrokeWidth=function(E){this.strokeWidth=E,this.visual&&q.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},m.prototype.setStrokeDasharray=function(E){this.strokeDasharray=E,this.visual&&q.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},m.prototype.setOpacity=function(E){this.opacity=E,this.visual&&q.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var E=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},N.prototype.getState.call(this));return E.typeName=m.typeName,E},m.prototype.restoreState=function(E){var k=E;this.fillColor=k.fillColor,this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.opacity=k.opacity,this.createVisual(),N.prototype.restoreState.call(this,E),this.setSize()},m.prototype.scale=function(E,k){N.prototype.scale.call(this,E,k),this.setSize()},m.typeName="EllipseMarker",m.title="Ellipse marker",m.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>',m}(Je),Pe=function(N){function m(E,k,G){return N.call(this,E,k,G)||this}return we(m,N),Object.defineProperty(m.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),m.prototype.ownsTarget=function(E){return!(!N.prototype.ownsTarget.call(this,E)&&E!==this.tip1&&E!==this.tip2)},m.prototype.createTips=function(){this.tip1=q.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(q.createTransform()),this.visual.appendChild(this.tip1),this.tip2=q.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(q.createTransform()),this.visual.appendChild(this.tip2)},m.prototype.pointerDown=function(E,k){N.prototype.pointerDown.call(this,E,k),this.state==="creating"&&this.createTips()},m.prototype.adjustVisual=function(){if(N.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(q.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()]]),q.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 E=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),k=this.tip1.transform.baseVal.getItem(0);k.setRotate(E,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(k,0);var G=this.tip2.transform.baseVal.getItem(0);G.setRotate(E+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(G,0)}},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var E=N.prototype.getState.call(this);return E.typeName=m.typeName,E},m.prototype.restoreState=function(E){N.prototype.restoreState.call(this,E),this.createTips(),this.adjustVisual()},m.typeName="MeasurementMarker",m.title="Measurement marker",m.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>',m}(dt),tt=function(N){function m(E,k,G){var B=N.call(this,E,k,G)||this;return B.strokePanel.colors=G.defaultColorSet,B.fillColor="transparent",B}return we(m,N),Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var E=N.prototype.getState.call(this);return E.typeName=m.typeName,E},m.typeName="EllipseFrameMarker",m.title="Ellipse frame marker",m.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>',m}(Oe),ct=function(){function N(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(N.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),N.prototype.addUndoStep=function(m){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(m)||(this.undoStack.push(m),JSON.stringify(this.lastRedoStep)!==JSON.stringify(m)&&this.redoStack.splice(0,this.redoStack.length))},N.prototype.replaceLastUndoStep=function(m){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=m)},N.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},N.prototype.undo=function(){if(this.undoStack.length>1){var m=this.undoStack.pop();return m!==void 0&&this.redoStack.push(m),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},N.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},N}(),qe=function(N){function m(E,k,G){var B=N.call(this,E,k,G)||this;return B.strokeColor="transparent",B.strokeWidth=0,B.strokeDasharray="",B.curveX=0,B.curveY=0,B.manipulationStartCurveX=0,B.manipulationStartCurveY=0,B.setStrokeColor=B.setStrokeColor.bind(B),B.setStrokeWidth=B.setStrokeWidth.bind(B),B.setStrokeDasharray=B.setStrokeDasharray.bind(B),B.positionGrips=B.positionGrips.bind(B),B.addControlGrips=B.addControlGrips.bind(B),B.adjustVisual=B.adjustVisual.bind(B),B.setupControlBox=B.setupControlBox.bind(B),B.resize=B.resize.bind(B),B.strokeColor=G.defaultColor,B.strokeWidth=G.defaultStrokeWidth,B.strokeDasharray=G.defaultStrokeDasharray,B.strokePanel=new me("Line color",G.defaultColorSet,G.defaultColor),B.strokePanel.onColorChanged=B.setStrokeColor,B.strokeWidthPanel=new ut("Line width",G.defaultStrokeWidths,G.defaultStrokeWidth),B.strokeWidthPanel.onWidthChanged=B.setStrokeWidth,B.strokeStylePanel=new et("Line style",G.defaultStrokeDasharrays,G.defaultStrokeDasharray),B.strokeStylePanel.onStyleChanged=B.setStrokeDasharray,B}return we(m,N),m.prototype.ownsTarget=function(E){return!(!N.prototype.ownsTarget.call(this,E)&&E!==this.visual&&E!==this.selectorCurve&&E!==this.visibleCurve&&!this.curveGrip.ownsTarget(E))},m.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},m.prototype.createVisual=function(){this.visual=q.createGroup(),this.selectorCurve=q.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=q.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)},m.prototype.pointerDown=function(E,k){N.prototype.pointerDown.call(this,E,k),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=E.x,this.curveY=E.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(k)&&(this.activeGrip=this.curveGrip,this._state="resize")},m.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),q.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),q.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),q.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},m.prototype.setupControlBox=function(){N.prototype.setupControlBox.call(this),this.curveControlLine1=q.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=q.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)},m.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,N.prototype.addControlGrips.call(this)},m.prototype.positionGrips=function(){N.prototype.positionGrips.call(this);var E=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-E/2,this.curveY-E/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()))},m.prototype.manipulate=function(E){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+E.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+E.y-this.manipulationStartY),N.prototype.manipulate.call(this,E)},m.prototype.resize=function(E){this.activeGrip===this.curveGrip&&(this.curveX=E.x,this.curveY=E.y),N.prototype.resize.call(this,E),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},m.prototype.setStrokeColor=function(E){this.strokeColor=E,this.adjustVisual(),this.colorChanged(E)},m.prototype.setStrokeWidth=function(E){this.strokeWidth=E,this.adjustVisual()},m.prototype.setStrokeDasharray=function(E){this.strokeDasharray=E,this.adjustVisual()},m.prototype.scale=function(E,k){this.curveX=this.curveX*E,this.curveY=this.curveY*k,N.prototype.scale.call(this,E,k)},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var E=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},N.prototype.getState.call(this));return E.typeName=m.typeName,E},m.prototype.restoreState=function(E){N.prototype.restoreState.call(this,E);var k=E;this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.curveX=k.curveX,this.curveY=k.curveY,this.createVisual(),this.adjustVisual()},m.typeName="CurveMarker",m.title="Curve marker",m.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>',m}(Le),gt=function(){function N(m,E){E===void 0&&(E=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=m,this.cancelable=E}return Object.defineProperty(N.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),N.prototype.preventDefault=function(){this._defaultPrevented=!0},N}(),bt=function(N){function m(E,k,G){var B=N.call(this,E,!1)||this;return B.dataUrl=k,B.state=G,B}return we(m,N),m}(gt),at=function(N){function m(E,k,G){G===void 0&&(G=!1);var B=N.call(this,E,G)||this;return B.marker=k,B}return we(m,N),m}(gt),Et=function(){function N(){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 N.prototype.addEventListener=function(m,E){this[m].push(E)},N.prototype.removeEventListener=function(m,E){var k=this[m].indexOf(E);k>-1&&this[m].splice(k,1)},N}(),pt=function(){function N(m){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ve,this._isOpen=!1,this.undoRedoManager=new ct,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 Et,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=N.instanceCounter++,this.styles=new Ge(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=m,this.targetRoot=document.body,this.width=m.clientWidth,this.height=m.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(N.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ze,pe,de,Ne,tt,Oe,Q,be,Pe,z,dt,qe]},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ze,pe,de,Ne,Oe,Q,be]},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ze,pe,de,Ne,Q]},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(m){var E=this;this._availableMarkerTypes.splice(0),m.forEach(function(k){if(typeof k=="string"){var G=E.ALL_MARKER_TYPES.find(function(B){return B.typeName===k});G!==void 0&&E._availableMarkerTypes.push(G)}else E._availableMarkerTypes.push(k)})},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(m){this._zoomLevel=m,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(N.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),N.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Fe.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},N.prototype.show=function(){var m=this;this.styles.styleSheetRoot===void 0&&He.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=He.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(E){return E(new gt(m))})},N.prototype.render=function(){return Ce(this,void 0,void 0,function(){var m;return Re(this,function(E){switch(E.label){case 0:return this.setCurrentMarker(),(m=new We).naturalSize=this.renderAtNaturalSize,m.imageType=this.renderImageType,m.imageQuality=this.renderImageQuality,m.markersOnly=this.renderMarkersOnly,m.width=this.renderWidth,m.height=this.renderHeight,[4,m.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return E.sent(),[4,m.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,E.sent()]}})})},N.prototype.close=function(m){var E=this;if(m===void 0&&(m=!1),this.isOpen){var k=!1;m||this.eventListeners.beforeclose.forEach(function(G){var B=new gt(E,!0);G(B),B.defaultPrevented&&(k=!0)}),k||(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 gt(E))}),this.detachEvents(),this._isOpen=!1)}},N.prototype.addMarkersToToolbar=function(){for(var m,E=[],k=0;k<arguments.length;k++)E[k]=arguments[k];(m=this._availableMarkerTypes).push.apply(m,E)},N.prototype.addRenderEventListener=function(m){this.addEventListener("render",function(E){m(E.dataUrl,E.state)})},N.prototype.removeRenderEventListener=function(m){},N.prototype.addCloseEventListener=function(m){this.addEventListener("close",function(){m()})},N.prototype.removeCloseEventListener=function(m){},N.prototype.setupResizeObserver=function(){var m=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){m.resize(m.target.clientWidth,m.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return m.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},N.prototype.onPopupTargetResize=function(){var m=1*this.target.clientWidth/this.target.clientHeight,E=this.editorCanvas.clientWidth/m>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*m:this.editorCanvas.clientWidth,k=E<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/m;this.resize(E,k)},N.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},N.prototype.resize=function(m,E){this._isResizing=!0;var k=m/this.imageWidth,G=E/this.imageHeight;this.imageWidth=Math.round(m),this.imageHeight=Math.round(E),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(k,G),this._isResizing=!1},N.prototype.scaleMarkers=function(m,E){var k,G=this;this._currentMarker&&this._currentMarker instanceof Ne?this._currentMarker.scale(m,E):(k=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(B){B!==G._currentMarker&&B.scale(m,E)}),k!==void 0&&this.setCurrentMarker(k)},N.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"},N.prototype.setTopLeft=function(){var m=this.editingTarget.getBoundingClientRect(),E=this.editorCanvas.getBoundingClientRect();this.left=m.left-E.left,this.top=m.top-E.top},N.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)},N.prototype.addDefs=function(){for(var m,E=[],k=0;k<arguments.length;k++)E[k]=arguments[k];this.defs=q.createDefs(),this.addDefsToImage(),(m=this.defs).append.apply(m,E)},N.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},N.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)},N.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},N.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},N.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)},N.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},N.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)},N.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 m=document.createElement("a");m.href="https://markerjs.com/",m.target="_blank",m.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>',m.title="Powered by marker.js",m.style.display="grid",m.style.alignItems="center",m.style.justifyItems="center",m.style.padding="3px",m.style.width="20px",m.style.height="20px",this.logoUI.appendChild(m),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},N.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")},N.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"},N.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},N.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 m=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=m+"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 Ue(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 Xe(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},N.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},N.prototype.removeMarker=function(m){this.markerImage.removeChild(m.container),this.markers.indexOf(m)>-1&&this.markers.splice(this.markers.indexOf(m),1),m.dispose()},N.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())},N.prototype.toolbarButtonClicked=function(m,E){if(m==="marker"&&E!==void 0)this.createNewMarker(E);else if(m==="action")switch(E){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()}},N.prototype.deleteSelectedMarker=function(){var m=this;if(this._currentMarker!==void 0){var E=!1;if(this.eventListeners.markerbeforedelete.forEach(function(G){var B=new at(m,m._currentMarker,!0);G(B),B.defaultPrevented&&(E=!0)}),!E){var k=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 at(m,k))})}}},N.prototype.clear=function(){var m=this,E=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(le){var ke=new at(m,void 0,!0);le(ke),ke.defaultPrevented&&(E=!0)}),!E)){this.setCurrentMarker();for(var k=function(le){var ke=G.markers[le];G.setCurrentMarker(G.markers[le]),G._currentMarker.dispose(),G.markerImage.removeChild(G._currentMarker.container),G.markers.splice(G.markers.indexOf(G._currentMarker),1),G.eventListeners.markerdelete.forEach(function(lt){return lt(new at(m,ke))})},G=this,B=this.markers.length-1;B>=0;B--)k(B);this.addUndoStep()}},Object.defineProperty(N.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),N.prototype.showNotesEditor=function(){var m;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=(m=this._currentMarker.notes)!==null&&m!==void 0?m:"",this.overlayContainer.appendChild(this.notesArea))},N.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)},N.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},N.prototype.addUndoStep=function(){var m=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var E=this.getState(),k=this.undoRedoManager.getLastUndoStep();if(!k||k.width===E.width&&k.height===E.height){var G=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(E),G<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(B){return B(new gt(m))})}else this.undoRedoManager.replaceLastUndoStep(E),this.eventListeners.statechange.forEach(function(B){return B(new gt(m))})}},N.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},N.prototype.undoStep=function(){var m=this,E=this.undoRedoManager.undo();E!==void 0&&(this.restoreState(E),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(k){return k(new gt(m))}))},N.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},N.prototype.redoStep=function(){var m=this,E=this.undoRedoManager.redo();E!==void 0&&(this.restoreState(E),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(k){return k(new gt(m))}))},N.prototype.stepZoom=function(){var m=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=m<this.zoomSteps.length-1?this.zoomSteps[m+1]:this.zoomSteps[0]},N.prototype.panTo=function(m){this.contentDiv.scrollBy({left:this.prevPanPoint.x-m.x,top:this.prevPanPoint.y-m.y}),this.prevPanPoint=m},N.prototype.startRenderAndClose=function(){return Ce(this,void 0,void 0,function(){var m,E,k=this;return Re(this,function(G){switch(G.label){case 0:return[4,this.render()];case 1:return m=G.sent(),E=this.getState(),this.eventListeners.render.forEach(function(B){return B(new bt(k,m,E))}),this.close(!0),[2]}})})},N.prototype.getState=function(m){m===!0&&this.setCurrentMarker();var E={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(k){return E.markers.push(k.getState())}),E},N.prototype.restoreState=function(m){var E=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);m.markers.forEach(function(k){var G=E._availableMarkerTypes.find(function(le){return le.typeName===k.typeName});if(G!==void 0){var B=E.addNewMarker(G);B.restoreState(k),E.markers.push(B)}}),m.width&&m.height&&(m.width!==this.imageWidth||m.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/m.width,this.imageHeight/m.height),this.eventListeners.restorestate.forEach(function(k){return k(new gt(E))})},N.prototype.addNewMarker=function(m){var E=q.createGroup();return this.markerImage.appendChild(E),new m(E,this.overlayContainer,this.settings)},N.prototype.createNewMarker=function(m){var E,k=this;(E=typeof m=="string"?this._availableMarkerTypes.find(function(G){return G.typeName===m}):m)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(E),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(E.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(G){return G(new at(k,k._currentMarker))}))},N.prototype.markerCreated=function(m){var E=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(m),this.setCurrentMarker(m),m instanceof pe&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(pe):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(k){return k(new at(E,E._currentMarker))})},N.prototype.colorChanged=function(m){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=m,this.settings.defaultStrokeColor=m)},N.prototype.fillColorChanged=function(m){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=m)},N.prototype.markerStateChanged=function(m){var E=this;this.eventListeners.markerchange.forEach(function(k){return k(new at(E,m))})},N.prototype.setCurrentMarker=function(m){var E=this;this._currentMarker!==m&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(k){return k(new at(E,E._currentMarker))})),this._currentMarker=m,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(k){return k(new at(E,E._currentMarker))}))},N.prototype.onPointerDown=function(m){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||m.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var E=this.markers.find(function(k){return k.ownsTarget(m.target)});E!==void 0?(this.setCurrentMarker(E),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(m.clientX,m.clientY),m.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:m.clientX,y:m.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(m.clientX,m.clientY))},N.prototype.onDblClick=function(m){if(this._isFocused||this.focus(),this.mode==="select"){var E=this.markers.find(function(k){return k.ownsTarget(m.target)});E!==void 0&&E!==this._currentMarker&&this.setCurrentMarker(E),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(m.clientX,m.clientY),m.target):this.setCurrentMarker()}},N.prototype.onPointerMove=function(m){this.touchPoints!==1&&m.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||m.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(m.clientX,m.clientY)):this.zoomLevel>1&&this.panTo({x:m.clientX,y:m.clientY}))},N.prototype.onPointerUp=function(m){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(m.clientX,m.clientY)),this.isDragging=!1,this.addUndoStep()},N.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},N.prototype.onKeyUp=function(m){this._currentMarker===void 0||this.notesArea!==void 0||m.key!=="Delete"&&m.key!=="Backspace"||this.deleteSelectedMarker()},N.prototype.clientToLocalCoordinates=function(m,E){var k=this.markerImage.getBoundingClientRect();return{x:(m-k.left)/this.zoomLevel,y:(E-k.top)/this.zoomLevel}},N.prototype.onWindowResize=function(){this.positionUI()},N.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var m=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=m+"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()},N.prototype.addLicenseKey=function(m){Fe.addKey(m)},N.prototype.addEventListener=function(m,E){this.eventListeners.addEventListener(m,E)},N.prototype.removeEventListener=function(m,E){this.eventListeners.removeEventListener(m,E)},N.prototype.renderState=function(m){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(m),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(N.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),N.prototype.focus=function(){var m=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(E){return E(new gt(m))}))},N.prototype.blur=function(){var m=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(E){return E(new gt(m))}))},N.instanceCounter=0,N}();/* **********************************
|
|
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 yt=function(N,m){return(yt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,k){E.__proto__=k}||function(E,k){for(var G in k)Object.prototype.hasOwnProperty.call(k,G)&&(E[G]=k[G])})(N,m)};function $e(N,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");function E(){this.constructor=N}yt(N,m),N.prototype=m===null?Object.create(m):(E.prototype=m.prototype,new E)}function ft(N,m,E,k){return new(E||(E=Promise))(function(G,B){function le(vt){try{lt(k.next(vt))}catch(je){B(je)}}function ke(vt){try{lt(k.throw(vt))}catch(je){B(je)}}function lt(vt){var je;vt.done?G(vt.value):(je=vt.value,je instanceof E?je:new E(function(At){At(je)})).then(le,ke)}lt((k=k.apply(N,m||[])).next())})}function Dt(N,m){var E,k,G,B,le={label:0,sent:function(){if(1&G[0])throw G[1];return G[1]},trys:[],ops:[]};return B={next:ke(0),throw:ke(1),return:ke(2)},typeof Symbol=="function"&&(B[Symbol.iterator]=function(){return this}),B;function ke(lt){return function(vt){return function(je){if(E)throw new TypeError("Generator is already executing.");for(;le;)try{if(E=1,k&&(G=2&je[0]?k.return:je[0]?k.throw||((G=k.return)&&G.call(k),0):k.next)&&!(G=G.call(k,je[1])).done)return G;switch(k=0,G&&(je=[2&je[0],G.value]),je[0]){case 0:case 1:G=je;break;case 4:return le.label++,{value:je[1],done:!1};case 5:le.label++,k=je[1],je=[0];continue;case 7:je=le.ops.pop(),le.trys.pop();continue;default:if(!(G=le.trys,(G=G.length>0&&G[G.length-1])||je[0]!==6&&je[0]!==2)){le=0;continue}if(je[0]===3&&(!G||je[1]>G[0]&&je[1]<G[3])){le.label=je[1];break}if(je[0]===6&&le.label<G[1]){le.label=G[1],G=je;break}if(G&&le.label<G[2]){le.label=G[2],le.ops.push(je);break}G[2]&&le.ops.pop(),le.trys.pop();continue}je=m.call(N,le)}catch(At){je=[6,At],k=0}finally{E=G=0}if(5&je[0])throw je[1];return{value:je[0]?je[1]:void 0,done:!0}}([lt,vt])}}}var Ct=function(){function N(){}return N.addKey=function(m){N.key=m},Object.defineProperty(N,"isLicensed",{get:function(){return!!N.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(N.key)},enumerable:!1,configurable:!0}),N}(),nt=function(){function N(){}return N.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},N.setAttributes=function(m,E){for(var k=0,G=E;k<G.length;k++){var B=G[k],le=B[0],ke=B[1];m.setAttribute(le,ke)}},N.createRect=function(m,E,k){var G=document.createElementNS("http://www.w3.org/2000/svg","rect");return G.setAttribute("width",m.toString()),G.setAttribute("height",E.toString()),k&&N.setAttributes(G,k),G},N.createLine=function(m,E,k,G,B){var le=document.createElementNS("http://www.w3.org/2000/svg","line");return le.setAttribute("x1",m.toString()),le.setAttribute("y1",E.toString()),le.setAttribute("x2",k.toString()),le.setAttribute("y2",G.toString()),B&&N.setAttributes(le,B),le},N.createPolygon=function(m,E){var k=document.createElementNS("http://www.w3.org/2000/svg","polygon");return k.setAttribute("points",m),E&&N.setAttributes(k,E),k},N.createCircle=function(m,E){var k=document.createElementNS("http://www.w3.org/2000/svg","circle");return k.setAttribute("cx",(m/2).toString()),k.setAttribute("cy",(m/2).toString()),k.setAttribute("r",m.toString()),E&&N.setAttributes(k,E),k},N.createEllipse=function(m,E,k){var G=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return G.setAttribute("cx",(m/2).toString()),G.setAttribute("cy",(E/2).toString()),G.setAttribute("rx",(m/2).toString()),G.setAttribute("ry",(E/2).toString()),k&&N.setAttributes(G,k),G},N.createGroup=function(m){var E=document.createElementNS("http://www.w3.org/2000/svg","g");return m&&N.setAttributes(E,m),E},N.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},N.createMarker=function(m,E,k,G,B,le,ke){var lt=document.createElementNS("http://www.w3.org/2000/svg","marker");return N.setAttributes(lt,[["id",m],["orient",E],["markerWidth",k.toString()],["markerHeight",G.toString()],["refX",B.toString()],["refY",le.toString()]]),lt.appendChild(ke),lt},N.createText=function(m){var E=document.createElementNS("http://www.w3.org/2000/svg","text");return E.setAttribute("x","0"),E.setAttribute("y","0"),m&&N.setAttributes(E,m),E},N.createTSpan=function(m,E){var k=document.createElementNS("http://www.w3.org/2000/svg","tspan");return k.textContent=m,E&&N.setAttributes(k,E),k},N.createImage=function(m){var E=document.createElementNS("http://www.w3.org/2000/svg","image");return m&&N.setAttributes(E,m),E},N.createPoint=function(m,E){var k=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return k.x=m,k.y=E,k},N.createPath=function(m,E){var k=document.createElementNS("http://www.w3.org/2000/svg","path");return k.setAttribute("d",m),E&&N.setAttributes(k,E),k},N.createElement=function(m,E){var k=document.createElementNS("http://www.w3.org/2000/svg",m);return E&&N.setAttributes(k,E),k},N.getHollowRectanglePath=function(m,E,k,G,B,le,ke,lt){return"M"+m+","+E+"V"+(E+G)+"H"+(m+k)+"V"+E+"H"+B+"V"+le+"H"+(B+ke)+"V"+(le+lt)+"H"+B+"V"+E+"Z"},N}(),Tt=function(){function N(m){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+m+"_"}return Object.defineProperty(N.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(N.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(N.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),N.prototype.addClass=function(m){return this.styleSheet===void 0&&this.addStyleSheet(),m.name=""+this.classNamePrefix+m.localName,this.classes.push(m),this.styleSheet.sheet.insertRule("."+m.name+" {"+m.style+"}",this.styleSheet.sheet.cssRules.length),m},N.prototype.addRule=function(m){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(m),this.styleSheet.sheet.insertRule(m.selector+" {"+m.style+"}",this.styleSheet.sheet.cssRules.length)},N.prototype.addStyleSheet=function(){var m;this.styleSheet=document.createElement("style"),((m=this.styleSheetRoot)!==null&&m!==void 0?m:document.head).appendChild(this.styleSheet),this.addRule(new ot("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new ot("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new ot("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new ht("_fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new ht("_fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},N.prototype.removeStyleSheet=function(){var m;this.styleSheet&&(((m=this.styleSheetRoot)!==null&&m!==void 0?m:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},N}(),ot=function(N,m){this.selector=N,this.style=m},ht=function(N,m){this.localName=N,this.style=m},Ot=function(){function N(){this.blocks=[],this.display=""}return N.prototype.addButtonBlock=function(m){m.className=this.blockClassName,m.buttonClassName=this.buttonClassName,m.buttonColorsClassName=this.buttonColorsClassName,m.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(m)},N.prototype.addElementBlock=function(m){m.className===void 0&&(m.className=this.blockClassName),this.blocks.push(m)},N.prototype.getUI=function(){var m=document.createElement("div");return m.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,m.style.display=this.display,this.blocks.forEach(function(E){return m.appendChild(E.getUI())}),m},N}(),Jt=function(){function N(){}return N.prototype.getUI=function(){var m=document.createElement("div");if(m.className=this.className,this.minWidth!==void 0&&(m.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":m.style.justifyContent="flex-start";break;case"center":m.style.justifyContent="center";break;case"end":m.style.justifyContent="flex-end"}return m.style.whiteSpace="nowrap",m},N}(),on=function(N){function m(){var E=N!==null&&N.apply(this,arguments)||this;return E.buttons=[],E}return $e(m,N),m.prototype.addButton=function(E){E.className=this.buttonClassName,E.colorsClassName=this.buttonColorsClassName,E.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(E)},m.prototype.getUI=function(){var E=N.prototype.getUI.call(this);return this.buttons.forEach(function(k){return E.appendChild(k.getUI())}),E},m}(Jt),$t=function(){function N(m,E){this._isActive=!1,this._isHidden=!1,this._icon=m,this.title=E,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(N.prototype,"icon",{get:function(){return this._icon},set:function(m){this._icon=m,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isActive",{get:function(){return this._isActive},set:function(m){this._isActive=m,this.adjustClassName()},enumerable:!1,configurable:!0}),N.prototype.getUI=function(){var m=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 m.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},N.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,"")))},N.prototype.hide=function(){this._isHidden=!0},N}(),On=function(N){function m(){var E=N!==null&&N.apply(this,arguments)||this;return E.elements=[],E}return $e(m,N),m.prototype.addElement=function(E){this.elements.push(E)},m.prototype.getUI=function(){var E=N.prototype.getUI.call(this);return this.elements.forEach(function(k){return E.appendChild(k)}),E},m}(Jt),Un=function(){function N(m,E){this.horizontal=m,this.vertical=E}return Object.defineProperty(N.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),N.prototype.getVerticalLength=function(m){return m/this.ratio},N.prototype.getHorizontalLength=function(m){return m*this.ratio},N}(),Qt=function(){function N(){}return N.getIcon=function(m,E){if(m>0&&E>0){var k=new Un(m,E),G=k.ratio>=1?20:k.getHorizontalLength(20),B=k.ratio<1?20:k.getVerticalLength(20),le=document.createElementNS("http://www.w3.org/2000/svg","svg");le.setAttribute("xmlns","http://www.w3.org/2000/svg"),le.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(le);var ke=nt.createDefs();le.appendChild(ke);var lt=nt.createElement("clipPath",[["id","text-bg-clip"]]);ke.appendChild(lt);var vt=nt.createPath(nt.getHollowRectanglePath((24-G)/2,(24-B)/2,G,B,(24-G)/2+2,(24-B)/2+2,G-4,B-4));le.appendChild(vt);var je=nt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);je.appendChild(nt.createTSpan(m+":"+E)),le.appendChild(je);var At=je.getBBox();nt.setAttributes(je,[["x",((24-At.width)/2).toString()],["y",((24-At.height)/2-At.y).toString()]]);var en=nt.createPath(nt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(At.width))/2,(24-Math.ceil(At.height))/2,Math.ceil(At.width),Math.ceil(At.height)));return lt.appendChild(en),nt.setAttributes(vt,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(le),le.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>'},N}(),mn=function(N){function m(E,k,G){var B=N.call(this,E,k)||this;return B.isDropdownOpen=!1,B.onClick=B.dropdownButtonClicked,B.dropdownButtons=G,B}return $e(m,N),m.prototype.setupDropdown=function(){var E=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(k){k.className=E.className,k.colorsClassName=E.colorsClassName,E.dropdownBlock.appendChild(k.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},m.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},m.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},m.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},m.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},m.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},m}($t),Tn=function(){function N(m,E){this.GRIP_SIZE=10,this.color=m,this.fillColor=E,this.visual=nt.createGroup(),this.visual.appendChild(nt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(nt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return N.prototype.ownsTarget=function(m){return m===this.visual||m===this.visual.childNodes[0]||m===this.visual.childNodes[1]},N.prototype.setCenter=function(m,E){this.visual.childNodes.forEach(function(k){return nt.setAttributes(k,[["cx",m.toString()],["cy",E.toString()]])})},N}(),Ft=function(){function N(m,E,k,G){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=m,this.canvasHeight=E,this.margin=k,this.container=G,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(N.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(m){this._aspectRatio=m,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(m){this._isGridVisible=m,this.gridContainer&&nt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(m){this._zoomFactor=m,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),N.prototype.open=function(){var m=this;this.cropShadeElement=nt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=nt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var E=0;E<this.numberOfGridLines;E++)this.horizontalGridLines.push(nt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(nt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(k){return m.gridContainer.appendChild(k)}),this.verticalGridLines.forEach(function(k){return m.gridContainer.appendChild(k)}),this.cropRectElement=nt.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Tn(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Tn(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Tn(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Tn(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},N.prototype.setCropRectangle=function(m){this.cropRect=m;var E=Object.assign({},this.cropRect);this.zoomFactor!==1&&(E.width=this.cropRect.width*this.zoomFactor,E.height=this.cropRect.height*this.zoomFactor,E.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-E.width/2,E.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-E.height/2),nt.setAttributes(this.cropRectElement,[["x",E.x.toString()],["y",E.y.toString()],["width",E.width.toString()],["height",E.height.toString()]]);var k=E.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(B,le){var ke=E.y+k*(le+1);nt.setAttributes(B,[["x1",""+E.x],["y1",""+ke],["x2",""+(E.x+E.width)],["y2",""+ke]])});var G=E.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(B,le){var ke=E.x+G*(le+1);nt.setAttributes(B,[["x1",""+ke],["y1",""+E.y],["x2",""+ke],["y2",""+(E.y+E.height)]])}),nt.setAttributes(this.cropShadeElement,[["d",nt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,E.x,E.y,E.width,E.height)]]),this.topLeftGrip.setCenter(E.x,E.y),this.topRightGrip.setCenter(E.x+E.width,E.y),this.bottomLeftGrip.setCenter(E.x,E.y+E.height),this.bottomRightGrip.setCenter(E.x+E.width,E.y+E.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},N.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)},N.prototype.clientToLocalCoordinates=function(m,E){var k=this.container.getBoundingClientRect();return{x:m-k.left+this.margin,y:E-k.top+this.margin}},N.prototype.onPointerDown=function(m){this.container.setPointerCapture(m.pointerId),this.previousPoint=this.clientToLocalCoordinates(m.clientX,m.clientY),this.cropRectElement===m.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(m.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(m.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(m.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(m.target)&&(this.activeGrip=this.bottomRightGrip)},N.prototype.onPointerMove=function(m){if(this.isMoving)this.move(this.clientToLocalCoordinates(m.clientX,m.clientY));else if(this.activeGrip){var E=this.clientToLocalCoordinates(m.clientX,m.clientY);this.resize(E)}m.preventDefault()},N.prototype.onPointerUp=function(m){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(m.pointerId)},N.prototype.move=function(m){var E=m.x-this.previousPoint.x,k=m.y-this.previousPoint.y;this.zoomFactor!==1&&(E=-E/this.zoomFactor,k=-k/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+E),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+k),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=m},N.prototype.resize=function(m){var E=Object.assign({},this.cropRect),k=m.x-this.previousPoint.x,G=m.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:E.x+k<this.margin&&(k=this.margin-E.x),E.x+=k,E.width=this.cropRect.x+this.cropRect.width-E.x;break;case this.bottomRightGrip:case this.topRightGrip:E.width+k>this.canvasWidth*this.zoomFactor&&(k=this.canvasWidth*this.zoomFactor-E.width),E.width+=k}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(E.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(k),E.height=this.aspectRatio.getVerticalLength(E.width)):(E.y+=G,E.height=this.cropRect.y+this.cropRect.height-E.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?E.height=this.aspectRatio.getVerticalLength(E.width):E.height+=G}E.width<10&&(E.x=this.cropRect.x,E.width=10),E.height<10&&(E.y=this.cropRect.y,E.height=10),this.previousPoint=m,E.x>=this.margin&&E.y>=this.margin&&E.x-this.margin+E.width<=this.canvasWidth&&E.y-this.margin+E.height<=this.canvasHeight&&(this.cropRect=E,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},N.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var m=this.cropRect.x+this.cropRect.width/2,E=this.cropRect.y+this.cropRect.height/2,k=this.aspectRatio.getHorizontalLength(this.cropRect.height),G=this.aspectRatio.getVerticalLength(this.cropRect.width);k/this.canvasWidth<G/this.canvasHeight?this.cropRect.width=k:this.cropRect.height=G,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=m-this.cropRect.width/2,this.cropRect.y=E-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)}},N.prototype.getRescaledRect=function(m,E,k,G,B,le){var ke=k/m,lt=G/E;return{x:(B.x-le)*ke+le,y:(B.y-le)*lt+le,width:B.width*ke,height:B.height*lt}},N.prototype.scaleCanvas=function(m,E){var k=this.getRescaledRect(this.canvasWidth,this.canvasHeight,m,E,this.cropRect,this.margin);this.canvasWidth=m,this.canvasHeight=E,this.onCropChange&&this.onCropChange(k),this.setCropRectangle(k)},N}(),_t=function(){function N(m){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=m,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(N.prototype,"angle",{get:function(){return this._angle},set:function(m){this._angle=m,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),N.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},N.prototype.onPointerDown=function(m){this.controlContainer.setPointerCapture(m.pointerId),this.isDragging=!0,this.previousPoint={x:m.clientX,y:m.clientY}},N.prototype.onPointerMove=function(m){this.isDragging&&(this.onAngleChange&&this.onAngleChange((m.clientX-this.previousPoint.x)/5),this.previousPoint.x=m.clientX)},N.prototype.onPointerUp=function(m){this.isDragging&&this.onAngleChange&&this.onAngleChange((m.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(m.pointerId)},N.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var m=this.angleLabelText.getBBox();nt.setAttributes(this.angleLabelElement,[["x",((this.width-m.width)/2).toString()],["y",(this.height/2).toString()]])}},N.prototype.positionScaleShape=function(){if(this.scaleShape){var m=this.scaleShape.transform.baseVal.getItem(0);m.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(m,0)}},N.prototype.getVisual=function(){var m=document.createElementNS("http://www.w3.org/2000/svg","svg");m.setAttribute("xmlns","http://www.w3.org/2000/svg"),m.setAttribute("width",this.width+"px"),m.setAttribute("height",this.height+"px"),m.setAttribute("viewBox","0 0 "+this.width+" "+this.height),m.style.flexShrink="0",document.body.appendChild(m);for(var E="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,k=1;k<=this.width/5+10;k++){var G=k%5==0?this.height/3:this.height/6;E+="h4v"+-G+"h1v"+G}E+="v1H0Z",this.scaleShape=nt.createPath(E);var B=nt.createTransform();this.scaleShape.transform.baseVal.appendItem(B),m.appendChild(this.scaleShape),this.angleLabelElement=nt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=nt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var le=nt.createTSpan("");return le.innerHTML="°",this.angleLabelElement.appendChild(le),m.appendChild(this.angleLabelElement),document.body.removeChild(m),m},N}(),st=function(){function N(){this.naturalSize=!1,this.imageType="image/png"}return N.prototype.rasterize=function(m,E,k,G,B,le,ke){var lt=this;return new Promise(function(vt){var je=document.createElement("canvas");je.width=m.width.baseVal.value-2*G,je.height=m.height.baseVal.value-2*G;var At=1,en=1;lt.naturalSize===!0?(At=E.naturalWidth/(m.width.baseVal.value-2*G)/le,en=E.naturalHeight/(m.height.baseVal.value-2*G)/ke,je.width=E.naturalWidth/le,je.height=E.naturalHeight/ke):lt.width!==void 0&<.height!==void 0&&(At=lt.width/k.width,en=lt.height/k.height,je.width*=At,je.height*=en);var un=je.getContext("2d");un.translate(je.width/2,je.height/2),un.rotate(B*Math.PI/180),un.scale(le,ke),un.translate(-je.width/2,-je.height/2),un.drawImage(E,0,0,je.width,je.height);var Bn=document.createElement("canvas");Bn.width=k.width*At,Bn.height=k.height*en,Bn.getContext("2d").putImageData(un.getImageData((k.x-G)*At,(k.y-G)*en,k.width*At,k.height*en),0,0),vt(Bn.toDataURL(lt.imageType,lt.imageQuality))})},N}(),Lt=function(){function N(m){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=N.instanceCounter++,this.styles=new Tt(this.instanceNo),this.target=m,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(N.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(m){this._zoomToCropEnabled=m,m?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(m){this._isGridVisible=m,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"gridLines",{get:function(){return this._gridLines},set:function(m){this._gridLines=m,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(m){this._rotationAngle=m,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"aspectRatio",{get:function(){var m;return(m=this._aspectRatio)!==null&&m!==void 0?m:this.aspectRatios[0]},set:function(m){this._aspectRatio=m},enumerable:!1,configurable:!0}),N.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},N.prototype.show=function(){this.showUI(),this.open()},N.prototype.close=function(m){m===void 0&&(m=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),m||this.closeEventListeners.forEach(function(E){return E()}),this._isOpen=!1)},N.prototype.addRenderEventListener=function(m){this.renderEventListeners.push(m)},N.prototype.removeRenderEventListener=function(m){this.renderEventListeners.indexOf(m)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(m),1)},N.prototype.addCloseEventListener=function(m){this.closeEventListeners.push(m)},N.prototype.removeCloseEventListener=function(m){this.closeEventListeners.indexOf(m)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(m),1)},N.prototype.setupResizeObserver=function(){var m=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){m.resize(m.target.clientWidth,m.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))},N.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var m=1*this.target.clientWidth/this.target.clientHeight,E=this.contentDiv.clientWidth/m>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*m:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,k=E+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/m;this.resize(E,k)}},N.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},N.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",nt.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},N.prototype.resize=function(m,E){this.imageWidth=Math.round(m),this.imageHeight=Math.round(E),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()},N.prototype.setEditingTarget=function(){var m=document.createElement("canvas");m.width=this.target.naturalWidth,m.height=this.target.naturalHeight,m.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var E=m.toDataURL();nt.setAttributes(this.editingTarget,[["href",E]]),this.setEditingTargetSize()},N.prototype.setTopLeft=function(){var m=this.target.getBoundingClientRect(),E=this.editorCanvas.getBoundingClientRect();this.left=m.left-E.left-this.CANVAS_MARGIN,this.top=m.top-E.top-this.CANVAS_MARGIN},N.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=nt.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=nt.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=nt.createGroup(),this.editingTargetRotationScaleContainer=nt.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var m=nt.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(m);var E=nt.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(E),this.editingTargetContainer=nt.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)},N.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},N.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=nt.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Ft(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()},N.prototype.zoomToCrop=function(){if(this.cropRect){var m=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,E=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=m+"px "+E+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-m+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-E+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},N.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)},N.prototype.cropRectChanged=function(m){this.cropRect=m,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},N.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},N.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"},N.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},N.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 m=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,E=this.target.offsetTop>m+this.CANVAS_MARGIN?this.target.offsetTop-(m+this.CANVAS_MARGIN):0;this.coverDiv.style.top=E+"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},N.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},N.prototype.addTopToolbar=function(){var m=this;this.topToolbar=new Ot,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 E=new on;E.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(E);var k=[];this.aspectRatios.forEach(function(en){var un=new $t(Qt.getIcon(en.horizontal,en.vertical),en.horizontal===0&&en.vertical===0?"FREE":en.horizontal+":"+en.vertical);un.onClick=function(){return m.ratioButtonClicked(en)},k.push(un)}),this.aspectRatioButton=new mn(Qt.getIcon(0,0),"Aspect ratio",k),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,E.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var G=new $t('<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");G.isActive=this.isGridVisible,G.onClick=function(){m.isGridVisible=!m.isGridVisible,G.isActive=m.isGridVisible},E.addButton(G);var B=new $t('<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(B.isActive=this.zoomToCropEnabled,B.onClick=function(){m.zoomToCropEnabled=!m.zoomToCropEnabled,B.isActive=m.zoomToCropEnabled},E.addButton(B),!Ct.isLicensed){var le=new On;this.topToolbar.addElementBlock(le);var ke=document.createElement("div");ke.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var lt=document.createElement("a");lt.style.color="currentColor",lt.href="https://markerjs.com/products/cropro",lt.target="_blank",lt.innerHTML='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',ke.appendChild(lt),le.addElement(ke)}var vt=new on;vt.minWidth=3*this.toolbarHeight+"px",vt.contentAlign="end",this.topToolbar.addButtonBlock(vt);var je=new $t('<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");je.onClick=this.startRenderAndClose,vt.addButton(je),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(je.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var At=new $t('<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");At.onClick=this.close,vt.addButton(At),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(At.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},N.prototype.addBottomToolbar=function(){var m=this;this.bottomToolbar=new Ot,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 E=new on;E.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(E);var k=new $t('<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");k.onClick=this.rotateLeftButtonClicked,E.addButton(k);var G=new $t('<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");G.onClick=this.rotateRightButtonClicked,E.addButton(G);var B=new On;B.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(B),this.straightener=new _t("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(vt){m.rotateBy(vt),m.straightener.angle=m.rotationAngle},B.addElement(this.straightener.getUI());var le=new on;le.minWidth=2*this.toolbarHeight+"px",le.contentAlign="end",this.bottomToolbar.addButtonBlock(le);var ke=new $t('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");ke.onClick=this.flipHorizontallyButtonClicked,le.addButton(ke);var lt=new $t('<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");lt.onClick=this.flipVerticallyButtonClicked,le.addButton(lt)},N.prototype.ratioButtonClicked=function(m){this.aspectRatio=m,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},N.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Qt.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},N.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Un(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},N.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},N.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},N.prototype.restoreState=function(m){if(m){var E=this.cropLayer.getRescaledRect(m.width,m.height,this.imageWidth,this.imageHeight,m.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(E),this.cropRectChanged(E),this.flippedHorizontally=m.flippedHorizontally,this.flippedVertically=m.flippedVertically,this.applyFlip(),this.rotationAngle=m.rotationAngle,this.applyRotation()}},N.prototype.clientToLocalCoordinates=function(m,E){var k=this.cropImage.getBoundingClientRect();return{x:m-k.left,y:E-k.top}},N.prototype.onWindowResize=function(){this.positionUI()},N.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var m=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=m+"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()},N.prototype.rotateLeftButtonClicked=function(){var m=this.rotationAngle-90;this.rotationAngle%90!=0&&(m+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(m)},N.prototype.rotateRightButtonClicked=function(){var m=this.rotationAngle+90;this.rotationAngle%90!=0&&(m-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(m)},N.prototype.rotateTo=function(m){m=(m=m>180?m-360:m)<=-180?m+360:m,this.rotationAngle=m,this.applyRotation()},N.prototype.rotateBy=function(m){this.rotateTo((this.rotationAngle+m)%360)},N.prototype.applyRotation=function(){var m=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var E=this.editingTargetRotationContainer.transform.baseVal.getItem(0);E.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(E,0);var k=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/k.width,this.imageHeight/k.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=m},N.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},N.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},N.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},N.prototype.startRenderAndClose=function(){return ft(this,void 0,void 0,function(){var m,E;return Dt(this,function(k){switch(k.label){case 0:return[4,this.render()];case 1:return m=k.sent(),E=this.getState(),this.renderEventListeners.forEach(function(G){return G(m,E)}),this.close(!0),[2]}})})},N.prototype.render=function(){return ft(this,void 0,void 0,function(){var m;return Dt(this,function(E){switch(E.label){case 0:return(m=new st).naturalSize=this.renderAtNaturalSize,m.imageType=this.renderImageType,m.imageQuality=this.renderImageQuality,m.width=this.renderWidth,m.height=this.renderHeight,this.unzoomFromCrop(),nt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,m.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 E.sent(),[4,m.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,E.sent()]}})})},N.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ht("toolbar",`
|
|
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
height: `+this.toolbarHeight+`px;
|
|
box-sizing: content-box;
|
|
overflow: hidden;
|
|
line-height: 0px;
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new ht("toolbar_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ht("toolbar-block",`
|
|
display: flex;
|
|
align-items: center;
|
|
box-sizing: content-box;
|
|
`));var m=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ht("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.toolbarHeight-2*m)+`px;
|
|
height: `+(this.toolbarHeight-2*m)+`px;
|
|
padding: `+m+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ht("toolbar_button_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ht("toolbar_active_button",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
`)),this.styles.addRule(new ot("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new ot("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new ht("toolbar_dropdown",`
|
|
position: absolute;
|
|
max-width: `+4*this.toolbarHeight+`px;
|
|
z-index: 20;
|
|
white-space: normal;
|
|
box-sizing: content-box;
|
|
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
|
|
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
|
|
line-height: 0px;
|
|
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new ht("toolbar_dropdown_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new ht("toolbar_straightener_block",`
|
|
display: flex;
|
|
overflow: hidden;
|
|
justify-content: center;
|
|
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
|
|
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new ht("toolbar_straightener",`
|
|
display: flex;
|
|
overflow: hidden;
|
|
justify-content: center;
|
|
height: `+(this.toolbarHeight-2*m)+`px;
|
|
padding: `+m+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new ht("toolbar_straightener_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`))},N.instanceCounter=0,N}(),Wt=F("8hTe"),Zt=F.n(Wt),Mt=/<pre[^>]*>/g;function jt(N){var m=document.createElement("div");return m.innerHTML=N,m.childNodes.length===0?"":m.childNodes[0].nodeValue}var Rt=ce.a=function(N){var m=N.value,E=m===void 0?"":m,k=N.edit,G=k===void 0?!1:k,B=N.className,le=N.showTextOnly,ke=N.showLines,lt=N.replaces,vt=N.zoomImg,je=N.hasMask,At=N.style,en=At===void 0?{}:At,un=N.stylesPrev,Bn=un===void 0?{}:un,zn=String(E),Rn=Object(C.useRef)(),jn=Object(C.useRef)(),bi=Object(C.useState)(""),ri=Object(W.a)(bi,2),Jn=ri[0],Vn=ri[1],pi=Object(C.useState)("office"),Qn=Object(W.a)(pi,2),_i=Qn[0],Zn=Qn[1],Ei=function(){var an=new Lt(jn.current);an.displayMode="popup",an.addRenderEventListener(function(){var bn=Object(I.a)(e.a.mark(function qt(In){var fn;return e.a.wrap(function(wn){for(;;)switch(wn.prev=wn.next){case 0:return Rn.current.style.display="none",wn.next=3,Object(Te.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:In}});case 3:fn=wn.sent,fn!=null&&fn.id&<(jn.current.getAttribute("src").replace(Y.a.API_SERVER,""),"/api/attachments/".concat(fn==null?void 0:fn.id,"?type=").concat(fn.content_type));case 5:case"end":return wn.stop()}},qt)}));return function(qt){return bn.apply(this,arguments)}}()),an.show()},Ti=function(){var an=new pt(jn.current);an.settings.displayMode="popup",an.addEventListener("render",function(){var bn=Object(I.a)(e.a.mark(function qt(In){var fn;return e.a.wrap(function(wn){for(;;)switch(wn.prev=wn.next){case 0:if(Rn.current.style.display="none",!jn.current){wn.next=6;break}return wn.next=4,Object(Te.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:In.dataUrl}});case 4:fn=wn.sent,fn!=null&&fn.id&<(jn.current.getAttribute("src").replace(Y.a.API_SERVER,""),"/api/attachments/".concat(fn==null?void 0:fn.id,"?type=").concat(fn.content_type));case 6:case"end":return wn.stop()}},qt)}));return function(qt){return bn.apply(this,arguments)}}()),an.show(),window.markerArea=an},qn=Object(C.useMemo)(function(){Rn.current&&(Rn.current.style.zIndex=-1);try{var yn=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,an=/\"\/api\/attachments\/|\"\/attachments\/download\//g,bn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;zn=zn.replace(yn,"("+Y.a.API_SERVER+"/api/attachments/").replace(an,'"'+Y.a.API_SERVER+"/api/attachments/").replace(bn,'"'+Y.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(ei){}var qt=M(zn),In=y();if(zn.match(/\[TOC\]/)&&(qt=qt.replace("<p>[TOC]</p>",x()),_()),qt=qt.replace(/(__special_katext_id_\d+__)/g,function(ei,wn){var ai=In[wn],wi=ai.type,Si=ai.expression;return Object(ie.renderToString)(jt(Si)||"",{displayMode:wi==="block",throwOnError:!1,output:"html"})}),qt=qt.replace(/▁/g,"\u2581\u2581\u2581"),r(),le){var fn=document.createElement("div");return fn.innerHTML=qt,fn.innerText}return setTimeout(function(){return xi()},500),qt},[zn]),xn=Object(C.useRef)();p.WebkitLineClamp=ke,ke&&(en=Object(A.a)(Object(A.a)({},en),p));function $n(yn){var an=yn.target;if(an.tagName.toUpperCase()==="IMG"){if(vt){var bn=an.getAttribute("src");Vn(bn),Zn("image")}}else if(an.tagName.toUpperCase()==="A"){var qt=an.getAttribute("href");if(qt.indexOf("office")>-1)yn.preventDefault(),Vn(qt),Zn("office");else if(qt.indexOf("application/pdf")>-1)yn.preventDefault(),Vn(qt),Zn("pdf");else if(qt.indexOf("text/html")>-1)yn.preventDefault(),Vn(qt),Zn("html");else if(qt.startsWith("#")){yn.preventDefault();var In=document.getElementById(qt.replace("#",""));In&&In.scrollIntoView(!0)}}}var xi=function(){var an,bn=(an=xn.current)===null||an===void 0?void 0:an.querySelectorAll("video");bn==null||bn.forEach(function(qt){if(qt.oncontextmenu=function(){return!1},qt.src.indexOf(".m3u8")>-1&&!qt.canPlayType("application/vnd.apple.mpegurl")){if(K.a.isSupported()){var In=new K.a;In.loadSource(qt.src),In.attachMedia(qt)}}})};Object(C.useEffect)(function(){if(xn.current&&qn&&(qn.match(Mt)&&window.PR.prettyPrint()),xn.current)return xn.current.addEventListener("click",$n),function(){xn.current.removeEventListener("click",$n),r(),_()}},[qn,xn.current,$n]);var Bi=function(an){if(!G)return;an.target.nodeName==="IMG"?(Rn.current.style.zIndex=1,Rn.current.style.display="flex",Rn.current.style.width=an.target.clientWidth+"px",Rn.current.style.height=an.target.clientHeight+"px",Rn.current.style.top=an.target.offsetTop+"px",Rn.current.style.left=an.target.offsetLeft+"px",jn.current.src=an.target.getAttribute("src")):Rn.current.style.display="none"};return f.a.createElement("div",{style:{position:"relative"}},f.a.createElement("div",{ref:xn,style:Object(A.a)({},en),className:"".concat(B||""," markdown-body ").concat(Zt.a.mdBody),onMouseOver:Bi,dangerouslySetInnerHTML:{__html:qn}}),f.a.createElement("div",{ref:Rn,className:Zt.a.button},f.a.createElement(P.a,null,f.a.createElement(U.a,{onClick:function(){return Ei()}},"\u88C1\u526A"),f.a.createElement(U.a,{onClick:function(){return Ti()}},"\u7F16\u8F91"))),f.a.createElement("img",{ref:jn,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),f.a.createElement(re.a,{close:!0,data:Jn,type:Jn!=null&&Jn.length?_i:"",style:Object(A.a)({},Bn),onClose:function(){return Vn("")}}))}},"9JIy":function(Ke,ce,F){Ke.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(Ke,ce,F){"use strict";F.d(ce,"a",function(){return I});var ee=F("MNnm"),P="rc-util-key";function R(W){if(W.attachTo)return W.attachTo;var j=document.querySelector("head");return j||document.body}function U(W){var j,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(ee.a)())return null;var C=document.createElement("style");if((j=e.csp)===null||j===void 0?void 0:j.nonce){var f;C.nonce=(f=e.csp)===null||f===void 0?void 0:f.nonce}C.innerHTML=W;var h=R(e),l=h.firstChild;return e.prepend&&h.prepend?h.prepend(C):e.prepend&&l?h.insertBefore(C,l):h.appendChild(C),C}var A=new Map;function I(W,j){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},C=R(e);if(!A.has(C)){var f=U("",e),h=f.parentNode;A.set(C,h),h.removeChild(f)}var l=Array.from(A.get(C).children).find(function(a){return a.tagName==="STYLE"&&a[P]===j});if(l){var i,s;if(((i=e.csp)===null||i===void 0?void 0:i.nonce)&&l.nonce!==((s=e.csp)===null||s===void 0?void 0:s.nonce)){var u;l.nonce=(u=e.csp)===null||u===void 0?void 0:u.nonce}return l.innerHTML!==W&&(l.innerHTML=W),l}var o=U(W,e);return o[P]=j,o}},BdwD:function(Ke,ce,F){"use strict";var ee=F("+L6B"),P=F("2/Rp"),R=F("0Owb"),U=F("k1fw"),A=F("q1tI"),I=F.n(A),W=F("FOrL"),j=F.n(W),e=function(f){var h=f.buttonProps,l=h===void 0?{}:h,i=f.styles,s=i===void 0?{}:i,u=f.customText,o=f.ButtonText,a=f.ButtonClick,n=f.Buttonclass,t=f.ButtonTwo;return I.a.createElement("section",{className:"tc animated fadeIn",style:Object(U.a)(Object(U.a)({},{color:"#999",margin:"200px auto"}),s)},I.a.createElement("img",{src:j.a}),I.a.createElement("p",{className:"mt20 font14"},u||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),o&&I.a.createElement(P.a,Object(R.a)({className:n,onClick:a},l),o),t&&t)};ce.a=e},Bq7L:function(Ke,ce){Ke.exports="data:image/png;base64,iVBORw0KGgoAAAANSUh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UCunWqRlv18buunIcumZ5czt46gZSs64BTh7OjBwpJFnZwYU7+cCmTlyzB0028ZrXKcR6Jxe+mdgxxJQtOWIU4CrHzdYPP3Z2Y7fvi5GV+b7MXmWYgcopi0xiM2g+aARvh7kfhP0LUf0GAk5vu2l7qDTPpoSCY0ePUDpTunRVwzrnO6xE/NNFm5KCXcBHTJaLFT5yQWdHkrsOhs7L6co+ucCTKMJR9jRF+cCjMUwK2HW0MD1Tjh6gpVh+hPz2Q5NE+ApyBTrznDo9LbWHe79tHFIigACaXJOH/VUrXB1mMuxTbne1j+nqSltjZY235NX5UFFiGlfJDR69AHV5keOUEEkb+9wVHMac/UTouTm5wBmjEvpMh6oblKRUxnGb14reHzMaoSMNEtAheoac74HDkkRpZae4ZslHepeeb3De4DL6O1load9/JQ1nE1dJKCCNTmTPUmQUPi90kItobXDdxNpYCQe2F/tQXl96J+PUoD30jJwUdDZe7vsehTJ00Za1skpH4O6DO5SMu4CNj0eqTWyfCfwQF0zkFUR3qf3oWj0rjdCHZJqxE0YczF/PRpJ4zJyf+l8b3ayV5jrZ7W/RSQ6ZdkO6QGyfTvL3Giyye0zGx2KRu96gOqQTSaN6ugeKKpTUVQTBjkRgkaXgOroLS3ti4kH+L3hjjICKvS22cFodAmomDSXrKQzeGBPpQc1Nl/yBthvQ6NLQHWGlpY2xsQDFQ0q8qrCm/bZ0egSUDFpKllJZ/AAOYnM8GJS3sexotEloDpDS0sbY+aBAzUelNWFjknpBvnT6BJQMWsqWVFn8EC9G9hdHl5MyjtK+WWjS0B1hlaWNsbUA9mVbtQ2hWb7TKPU7anp8Eb9JaBi2lSyss7ggQjJCZ+90SWgOkMLSxtj5gGOS/zHmJQ7jMyJFsM0Gl0CKmZNJSvqTB4oqPGgJAJyQqfRJaA6UytLW2PmgcoGFfvCj0m10Oj/A9jGm+feuyEMAAAAAElFTkSuQmCC"},"C/vA":function(Ke,ce,F){"use strict";F.d(ce,"a",function(){return ee});function ee(P){const R=this;let U=!1,A;return function(){return U||(U=!0,A=P.apply(R,arguments)),A}}},"Cg/j":function(Ke,ce,F){"use strict";F.d(ce,"b",function(){return ee}),F.d(ce,"a",function(){return P}),F.d(ce,"c",function(){return U}),F.d(ce,"d",function(){return A});var ee;(function(I){I.serviceIds=new Map,I.DI_TARGET="$di$target",I.DI_DEPENDENCIES="$di$dependencies";function W(j){return j[I.DI_DEPENDENCIES]||[]}I.getServiceDependencies=W})(ee||(ee={}));const P=U("instantiationService");function R(I,W,j,e){W[ee.DI_TARGET]===W?W[ee.DI_DEPENDENCIES].push({id:I,index:j,optional:e}):(W[ee.DI_DEPENDENCIES]=[{id:I,index:j,optional:e}],W[ee.DI_TARGET]=W)}function U(I){if(ee.serviceIds.has(I))return ee.serviceIds.get(I);const W=function(j,e,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");R(W,j,C,!1)};return W.toString=()=>I,ee.serviceIds.set(I,W),W}function A(I){return function(W,j,e){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");R(I,W,e,!0)}}},DlQD:function(Ke,ce,F){(function(ee,P){Ke.exports=P()})(this,function(){"use strict";function ee(pe,he){for(var de=0;de<he.length;de++){var z=he[de];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(pe,z.key,z)}}function P(pe,he,de){return he&&ee(pe.prototype,he),de&&ee(pe,de),pe}function R(pe,he){if(!pe)return;if(typeof pe=="string")return U(pe,he);var de=Object.prototype.toString.call(pe).slice(8,-1);if(de==="Object"&&pe.constructor&&(de=pe.constructor.name),de==="Map"||de==="Set")return Array.from(pe);if(de==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(de))return U(pe,he)}function U(pe,he){(he==null||he>pe.length)&&(he=pe.length);for(var de=0,z=new Array(he);de<he;de++)z[de]=pe[de];return z}function A(pe,he){var de;if(typeof Symbol=="undefined"||pe[Symbol.iterator]==null){if(Array.isArray(pe)||(de=R(pe))||he&&pe&&typeof pe.length=="number"){de&&(pe=de);var z=0;return function(){return z>=pe.length?{done:!0}:{done:!1,value:pe[z++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return de=pe[Symbol.iterator](),de.next.bind(de)}function I(pe,he){return he={exports:{}},pe(he,he.exports),he.exports}var W=I(function(pe){function he(){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 de(z){pe.exports.defaults=z}pe.exports={defaults:he(),getDefaults:he,changeDefaults:de}}),j=W.defaults,e=W.getDefaults,C=W.changeDefaults,f=/[&<>"']/,h=/[&<>"']/g,l=/[<>"']|&(?!#?\w+;)/,i=/[<>"']|&(?!#?\w+;)/g,s={"&":"&","<":"<",">":">",'"':""","'":"'"},u=function(he){return s[he]};function o(pe,he){if(he){if(f.test(pe))return pe.replace(h,u)}else if(l.test(pe))return pe.replace(i,u);return pe}var a=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function n(pe){return pe.replace(a,function(he,de){return de=de.toLowerCase(),de==="colon"?":":de.charAt(0)==="#"?de.charAt(1)==="x"?String.fromCharCode(parseInt(de.substring(2),16)):String.fromCharCode(+de.substring(1)):""})}var t=/(^|[^\[])\^/g;function _(pe,he){pe=pe.source||pe,he=he||"";var de={replace:function(J,Q){return Q=Q.source||Q,Q=Q.replace(t,"$1"),pe=pe.replace(J,Q),de},getRegex:function(){return new RegExp(pe,he)}};return de}var p=/[^\w:]/g,v=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function x(pe,he,de){if(pe){var z;try{z=decodeURIComponent(n(de)).replace(p,"").toLowerCase()}catch(J){return null}if(z.indexOf("javascript:")===0||z.indexOf("vbscript:")===0||z.indexOf("data:")===0)return null}he&&!v.test(de)&&(de=c(he,de));try{de=encodeURI(de).replace(/%25/g,"%")}catch(J){return null}return de}var T={},b=/^[^:]+:\/*[^/]*$/,d=/^([^:]+:)[\s\S]*$/,g=/^([^:]+:\/*[^/]*)[\s\S]*$/;function c(pe,he){T[" "+pe]||(b.test(pe)?T[" "+pe]=pe+"/":T[" "+pe]=D(pe,"/",!0)),pe=T[" "+pe];var de=pe.indexOf(":")===-1;return he.substring(0,2)==="//"?de?he:pe.replace(d,"$1")+he:he.charAt(0)==="/"?de?he:pe.replace(g,"$1")+he:pe+he}var y={exec:function(){}};function r(pe){for(var he=1,de,z;he<arguments.length;he++){de=arguments[he];for(z in de)Object.prototype.hasOwnProperty.call(de,z)&&(pe[z]=de[z])}return pe}function w(pe,he){var de=pe.replace(/\|/g,function(Q,te,be){for(var Oe=!1,Pe=te;--Pe>=0&&be[Pe]==="\\";)Oe=!Oe;return Oe?"|":" |"}),z=de.split(/ \|/),J=0;if(z.length>he)z.splice(he);else for(;z.length<he;)z.push("");for(;J<z.length;J++)z[J]=z[J].trim().replace(/\\\|/g,"|");return z}function D(pe,he,de){var z=pe.length;if(z===0)return"";for(var J=0;J<z;){var Q=pe.charAt(z-J-1);if(Q===he&&!de)J++;else if(Q!==he&&de)J++;else break}return pe.substr(0,z-J)}function L(pe,he){if(pe.indexOf(he[1])===-1)return-1;for(var de=pe.length,z=0,J=0;J<de;J++)if(pe[J]==="\\")J++;else if(pe[J]===he[0])z++;else if(pe[J]===he[1]&&(z--,z<0))return J;return-1}function S(pe){pe&&pe.sanitize&&!pe.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 M={escape:o,unescape:n,edit:_,cleanUrl:x,resolveUrl:c,noopTest:y,merge:r,splitCells:w,rtrim:D,findClosingBracket:L,checkSanitizeDeprecation:S},H=W.defaults,O=M.rtrim,K=M.splitCells,Y=M.escape,ie=M.findClosingBracket;function re(pe,he,de){var z=he.href,J=he.title?Y(he.title):null,Q=pe[1].replace(/\\([\[\]])/g,"$1");return pe[0].charAt(0)!=="!"?{type:"link",raw:de,href:z,title:J,text:Q}:{type:"image",raw:de,href:z,title:J,text:Y(Q)}}function Te(pe,he){var de=pe.match(/^(\s+)(?:```)/);if(de===null)return he;var z=de[1];return he.split(`
|
|
`).map(function(J){var Q=J.match(/^\s+/);if(Q===null)return J;var te=Q[0];return te.length>=z.length?J.slice(z.length):J}).join(`
|
|
`)}var _e=function(){function pe(de){this.options=de||H}var he=pe.prototype;return he.space=function(z){var J=this.rules.block.newline.exec(z);if(J)return J[0].length>1?{type:"space",raw:J[0]}:{raw:`
|
|
`}},he.code=function(z,J){var Q=this.rules.block.code.exec(z);if(Q){var te=J[J.length-1];if(te&&te.type==="paragraph")return{raw:Q[0],text:Q[0].trimRight()};var be=Q[0].replace(/^ {4}/gm,"");return{type:"code",raw:Q[0],codeBlockStyle:"indented",text:this.options.pedantic?be:O(be,`
|
|
`)}}},he.fences=function(z){var J=this.rules.block.fences.exec(z);if(J){var Q=J[0],te=Te(Q,J[3]||"");return{type:"code",raw:Q,lang:J[2]?J[2].trim():J[2],text:te}}},he.heading=function(z){var J=this.rules.block.heading.exec(z);if(J)return{type:"heading",raw:J[0],depth:J[1].length,text:J[2]}},he.nptable=function(z){var J=this.rules.block.nptable.exec(z);if(J){var Q={type:"table",header:K(J[1].replace(/^ *| *\| *$/g,"")),align:J[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:J[3]?J[3].replace(/\n$/,"").split(`
|
|
`):[],raw:J[0]};if(Q.header.length===Q.align.length){var te=Q.align.length,be;for(be=0;be<te;be++)/^ *-+: *$/.test(Q.align[be])?Q.align[be]="right":/^ *:-+: *$/.test(Q.align[be])?Q.align[be]="center":/^ *:-+ *$/.test(Q.align[be])?Q.align[be]="left":Q.align[be]=null;for(te=Q.cells.length,be=0;be<te;be++)Q.cells[be]=K(Q.cells[be],Q.header.length);return Q}}},he.hr=function(z){var J=this.rules.block.hr.exec(z);if(J)return{type:"hr",raw:J[0]}},he.blockquote=function(z){var J=this.rules.block.blockquote.exec(z);if(J){var Q=J[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:J[0],text:Q}}},he.list=function(z){var J=this.rules.block.list.exec(z);if(J){for(var Q=J[0],te=J[2],be=te.length>1,Oe=te[te.length-1]===")",Pe={type:"list",raw:Q,ordered:be,start:be?+te.slice(0,-1):"",loose:!1,items:[]},tt=J[0].match(this.rules.block.item),ct=!1,qe,gt,bt,at,Et,pt,yt,$e=tt.length,ft=0;ft<$e;ft++)qe=tt[ft],Q=qe,gt=qe.length,qe=qe.replace(/^ *([*+-]|\d+[.)]) */,""),~qe.indexOf(`
|
|
`)&&(gt-=qe.length,qe=this.options.pedantic?qe.replace(/^ {1,4}/gm,""):qe.replace(new RegExp("^ {1,"+gt+"}","gm"),"")),ft!==$e-1&&(bt=this.rules.block.bullet.exec(tt[ft+1])[0],(be?bt.length===1||!Oe&&bt[bt.length-1]===")":bt.length>1||this.options.smartLists&&bt!==te)&&(at=tt.slice(ft+1).join(`
|
|
`),Pe.raw=Pe.raw.substring(0,Pe.raw.length-at.length),ft=$e-1)),Et=ct||/\n\n(?!\s*$)/.test(qe),ft!==$e-1&&(ct=qe.charAt(qe.length-1)===`
|
|
`,Et||(Et=ct)),Et&&(Pe.loose=!0),pt=/^\[[ xX]\] /.test(qe),yt=void 0,pt&&(yt=qe[1]!==" ",qe=qe.replace(/^\[[ xX]\] +/,"")),Pe.items.push({type:"list_item",raw:Q,task:pt,checked:yt,loose:Et,text:qe});return Pe}},he.html=function(z){var J=this.rules.block.html.exec(z);if(J)return{type:this.options.sanitize?"paragraph":"html",raw:J[0],pre:!this.options.sanitizer&&(J[1]==="pre"||J[1]==="script"||J[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(J[0]):Y(J[0]):J[0]}},he.def=function(z){var J=this.rules.block.def.exec(z);if(J){J[3]&&(J[3]=J[3].substring(1,J[3].length-1));var Q=J[1].toLowerCase().replace(/\s+/g," ");return{tag:Q,raw:J[0],href:J[2],title:J[3]}}},he.table=function(z){var J=this.rules.block.table.exec(z);if(J){var Q={type:"table",header:K(J[1].replace(/^ *| *\| *$/g,"")),align:J[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:J[3]?J[3].replace(/\n$/,"").split(`
|
|
`):[]};if(Q.header.length===Q.align.length){Q.raw=J[0];var te=Q.align.length,be;for(be=0;be<te;be++)/^ *-+: *$/.test(Q.align[be])?Q.align[be]="right":/^ *:-+: *$/.test(Q.align[be])?Q.align[be]="center":/^ *:-+ *$/.test(Q.align[be])?Q.align[be]="left":Q.align[be]=null;for(te=Q.cells.length,be=0;be<te;be++)Q.cells[be]=K(Q.cells[be].replace(/^ *\| *| *\| *$/g,""),Q.header.length);return Q}}},he.lheading=function(z){var J=this.rules.block.lheading.exec(z);if(J)return{type:"heading",raw:J[0],depth:J[2].charAt(0)==="="?1:2,text:J[1]}},he.paragraph=function(z){var J=this.rules.block.paragraph.exec(z);if(J)return{type:"paragraph",raw:J[0],text:J[1].charAt(J[1].length-1)===`
|
|
`?J[1].slice(0,-1):J[1]}},he.text=function(z,J){var Q=this.rules.block.text.exec(z);if(Q){var te=J[J.length-1];return te&&te.type==="text"?{raw:Q[0],text:Q[0]}:{type:"text",raw:Q[0],text:Q[0]}}},he.escape=function(z){var J=this.rules.inline.escape.exec(z);if(J)return{type:"escape",raw:J[0],text:Y(J[1])}},he.tag=function(z,J,Q){var te=this.rules.inline.tag.exec(z);if(te)return!J&&/^<a /i.test(te[0])?J=!0:J&&/^<\/a>/i.test(te[0])&&(J=!1),!Q&&/^<(pre|code|kbd|script)(\s|>)/i.test(te[0])?Q=!0:Q&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(te[0])&&(Q=!1),{type:this.options.sanitize?"text":"html",raw:te[0],inLink:J,inRawBlock:Q,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(te[0]):Y(te[0]):te[0]}},he.link=function(z){var J=this.rules.inline.link.exec(z);if(J){var Q=ie(J[2],"()");if(Q>-1){var te=J[0].indexOf("!")===0?5:4,be=te+J[1].length+Q;J[2]=J[2].substring(0,Q),J[0]=J[0].substring(0,be).trim(),J[3]=""}var Oe=J[2],Pe="";if(this.options.pedantic){var tt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Oe);tt?(Oe=tt[1],Pe=tt[3]):Pe=""}else Pe=J[3]?J[3].slice(1,-1):"";Oe=Oe.trim().replace(/^<([\s\S]*)>$/,"$1");var ct=re(J,{href:Oe&&Oe.replace(this.rules.inline._escapes,"$1"),title:Pe&&Pe.replace(this.rules.inline._escapes,"$1")},J[0]);return ct}},he.reflink=function(z,J){var Q;if((Q=this.rules.inline.reflink.exec(z))||(Q=this.rules.inline.nolink.exec(z))){var te=(Q[2]||Q[1]).replace(/\s+/g," ");if(te=J[te.toLowerCase()],!te||!te.href){var be=Q[0].charAt(0);return{type:"text",raw:be,text:be}}var Oe=re(Q,te,Q[0]);return Oe}},he.strong=function(z,J,Q){Q===void 0&&(Q="");var te=this.rules.inline.strong.start.exec(z);if(te&&(!te[1]||te[1]&&(Q===""||this.rules.inline.punctuation.exec(Q)))){J=J.slice(-1*z.length);var be=te[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;be.lastIndex=0;for(var Oe;(te=be.exec(J))!=null;)if(Oe=this.rules.inline.strong.middle.exec(J.slice(0,te.index+3)),Oe)return{type:"strong",raw:z.slice(0,Oe[0].length),text:z.slice(2,Oe[0].length-2)}}},he.em=function(z,J,Q){Q===void 0&&(Q="");var te=this.rules.inline.em.start.exec(z);if(te&&(!te[1]||te[1]&&(Q===""||this.rules.inline.punctuation.exec(Q)))){J=J.slice(-1*z.length);var be=te[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;be.lastIndex=0;for(var Oe;(te=be.exec(J))!=null;)if(Oe=this.rules.inline.em.middle.exec(J.slice(0,te.index+2)),Oe)return{type:"em",raw:z.slice(0,Oe[0].length),text:z.slice(1,Oe[0].length-1)}}},he.codespan=function(z){var J=this.rules.inline.code.exec(z);if(J){var Q=J[2].replace(/\n/g," "),te=/[^ ]/.test(Q),be=Q.startsWith(" ")&&Q.endsWith(" ");return te&&be&&(Q=Q.substring(1,Q.length-1)),Q=Y(Q,!0),{type:"codespan",raw:J[0],text:Q}}},he.br=function(z){var J=this.rules.inline.br.exec(z);if(J)return{type:"br",raw:J[0]}},he.del=function(z){var J=this.rules.inline.del.exec(z);if(J)return{type:"del",raw:J[0],text:J[1]}},he.autolink=function(z,J){var Q=this.rules.inline.autolink.exec(z);if(Q){var te,be;return Q[2]==="@"?(te=Y(this.options.mangle?J(Q[1]):Q[1]),be="mailto:"+te):(te=Y(Q[1]),be=te),{type:"link",raw:Q[0],text:te,href:be,tokens:[{type:"text",raw:te,text:te}]}}},he.url=function(z,J){var Q;if(Q=this.rules.inline.url.exec(z)){var te,be;if(Q[2]==="@")te=Y(this.options.mangle?J(Q[0]):Q[0]),be="mailto:"+te;else{var Oe;do Oe=Q[0],Q[0]=this.rules.inline._backpedal.exec(Q[0])[0];while(Oe!==Q[0]);te=Y(Q[0]),Q[1]==="www."?be="http://"+te:be=te}return{type:"link",raw:Q[0],text:te,href:be,tokens:[{type:"text",raw:te,text:te}]}}},he.inlineText=function(z,J,Q){var te=this.rules.inline.text.exec(z);if(te){var be;return J?be=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(te[0]):Y(te[0]):te[0]:be=Y(this.options.smartypants?Q(te[0]):te[0]),{type:"text",raw:te[0],text:be}}},pe}(),we=M.noopTest,Ce=M.edit,Re=M.merge,ue={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:we,table:we,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ue._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ue._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ue.def=Ce(ue.def).replace("label",ue._label).replace("title",ue._title).getRegex(),ue.bullet=/(?:[*+-]|\d{1,9}[.)])/,ue.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ue.item=Ce(ue.item,"gm").replace(/bull/g,ue.bullet).getRegex(),ue.list=Ce(ue.list).replace(/bull/g,ue.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ue.def.source+")").getRegex(),ue._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",ue._comment=/<!--(?!-?>)[\s\S]*?-->/,ue.html=Ce(ue.html,"i").replace("comment",ue._comment).replace("tag",ue._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ue.paragraph=Ce(ue._paragraph).replace("hr",ue.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",ue._tag).getRegex(),ue.blockquote=Ce(ue.blockquote).replace("paragraph",ue.paragraph).getRegex(),ue.normal=Re({},ue),ue.gfm=Re({},ue.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*|$)"}),ue.gfm.nptable=Ce(ue.gfm.nptable).replace("hr",ue.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",ue._tag).getRegex(),ue.gfm.table=Ce(ue.gfm.table).replace("hr",ue.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",ue._tag).getRegex(),ue.pedantic=Re({},ue.normal,{html:Ce(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ue._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:we,paragraph:Ce(ue.normal._paragraph).replace("hr",ue.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",ue.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var q={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:we,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:we,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};q._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",q.punctuation=Ce(q.punctuation).replace(/punctuation/g,q._punctuation).getRegex(),q._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",q._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",q.em.start=Ce(q.em.start).replace(/punctuation/g,q._punctuation).getRegex(),q.em.middle=Ce(q.em.middle).replace(/punctuation/g,q._punctuation).replace(/overlapSkip/g,q._overlapSkip).getRegex(),q.em.endAst=Ce(q.em.endAst,"g").replace(/punctuation/g,q._punctuation).getRegex(),q.em.endUnd=Ce(q.em.endUnd,"g").replace(/punctuation/g,q._punctuation).getRegex(),q.strong.start=Ce(q.strong.start).replace(/punctuation/g,q._punctuation).getRegex(),q.strong.middle=Ce(q.strong.middle).replace(/punctuation/g,q._punctuation).replace(/blockSkip/g,q._blockSkip).getRegex(),q.strong.endAst=Ce(q.strong.endAst,"g").replace(/punctuation/g,q._punctuation).getRegex(),q.strong.endUnd=Ce(q.strong.endUnd,"g").replace(/punctuation/g,q._punctuation).getRegex(),q.blockSkip=Ce(q._blockSkip,"g").getRegex(),q.overlapSkip=Ce(q._overlapSkip,"g").getRegex(),q._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,q._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,q._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])?)+(?![-_])/,q.autolink=Ce(q.autolink).replace("scheme",q._scheme).replace("email",q._email).getRegex(),q._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,q.tag=Ce(q.tag).replace("comment",ue._comment).replace("attribute",q._attribute).getRegex(),q._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,q._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,q._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,q.link=Ce(q.link).replace("label",q._label).replace("href",q._href).replace("title",q._title).getRegex(),q.reflink=Ce(q.reflink).replace("label",q._label).getRegex(),q.reflinkSearch=Ce(q.reflinkSearch,"g").replace("reflink",q.reflink).replace("nolink",q.nolink).getRegex(),q.normal=Re({},q),q.pedantic=Re({},q.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:Ce(/^!?\[(label)\]\((.*?)\)/).replace("label",q._label).getRegex(),reflink:Ce(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",q._label).getRegex()}),q.gfm=Re({},q.normal,{escape:Ce(q.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),q.gfm.url=Ce(q.gfm.url,"i").replace("email",q.gfm._extended_email).getRegex(),q.breaks=Re({},q.gfm,{br:Ce(q.br).replace("{2,}","*").getRegex(),text:Ce(q.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Fe={block:ue,inline:q},We=W.defaults,He=Fe.block,Ge=Fe.inline;function it(pe){return pe.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 De(pe){var he="",de,z,J=pe.length;for(de=0;de<J;de++)z=pe.charCodeAt(de),Math.random()>.5&&(z="x"+z.toString(16)),he+="&#"+z+";";return he}var Ue=function(){function pe(de){this.tokens=[],this.tokens.links=Object.create(null),this.options=de||We,this.options.tokenizer=this.options.tokenizer||new _e,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var z={block:He.normal,inline:Ge.normal};this.options.pedantic?(z.block=He.pedantic,z.inline=Ge.pedantic):this.options.gfm&&(z.block=He.gfm,this.options.breaks?z.inline=Ge.breaks:z.inline=Ge.gfm),this.tokenizer.rules=z}pe.lex=function(z,J){var Q=new pe(J);return Q.lex(z)};var he=pe.prototype;return he.lex=function(z){return z=z.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(z,this.tokens,!0),this.inline(this.tokens),this.tokens},he.blockTokens=function(z,J,Q){J===void 0&&(J=[]),Q===void 0&&(Q=!0),z=z.replace(/^ +$/gm,"");for(var te,be,Oe,Pe;z;){if(te=this.tokenizer.space(z)){z=z.substring(te.raw.length),te.type&&J.push(te);continue}if(te=this.tokenizer.code(z,J)){z=z.substring(te.raw.length),te.type?J.push(te):(Pe=J[J.length-1],Pe.raw+=`
|
|
`+te.raw,Pe.text+=`
|
|
`+te.text);continue}if(te=this.tokenizer.fences(z)){z=z.substring(te.raw.length),J.push(te);continue}if(te=this.tokenizer.heading(z)){z=z.substring(te.raw.length),J.push(te);continue}if(te=this.tokenizer.nptable(z)){z=z.substring(te.raw.length),J.push(te);continue}if(te=this.tokenizer.hr(z)){z=z.substring(te.raw.length),J.push(te);continue}if(te=this.tokenizer.blockquote(z)){z=z.substring(te.raw.length),te.tokens=this.blockTokens(te.text,[],Q),J.push(te);continue}if(te=this.tokenizer.list(z)){for(z=z.substring(te.raw.length),Oe=te.items.length,be=0;be<Oe;be++)te.items[be].tokens=this.blockTokens(te.items[be].text,[],!1);J.push(te);continue}if(te=this.tokenizer.html(z)){z=z.substring(te.raw.length),J.push(te);continue}if(Q&&(te=this.tokenizer.def(z))){z=z.substring(te.raw.length),this.tokens.links[te.tag]||(this.tokens.links[te.tag]={href:te.href,title:te.title});continue}if(te=this.tokenizer.table(z)){z=z.substring(te.raw.length),J.push(te);continue}if(te=this.tokenizer.lheading(z)){z=z.substring(te.raw.length),J.push(te);continue}if(Q&&(te=this.tokenizer.paragraph(z))){z=z.substring(te.raw.length),J.push(te);continue}if(te=this.tokenizer.text(z,J)){z=z.substring(te.raw.length),te.type?J.push(te):(Pe=J[J.length-1],Pe.raw+=`
|
|
`+te.raw,Pe.text+=`
|
|
`+te.text);continue}if(z){var tt="Infinite loop on byte: "+z.charCodeAt(0);if(this.options.silent){console.error(tt);break}else throw new Error(tt)}}return J},he.inline=function(z){var J,Q,te,be,Oe,Pe,tt=z.length;for(J=0;J<tt;J++){Pe=z[J];switch(Pe.type){case"paragraph":case"text":case"heading":{Pe.tokens=[],this.inlineTokens(Pe.text,Pe.tokens);break}case"table":{for(Pe.tokens={header:[],cells:[]},be=Pe.header.length,Q=0;Q<be;Q++)Pe.tokens.header[Q]=[],this.inlineTokens(Pe.header[Q],Pe.tokens.header[Q]);for(be=Pe.cells.length,Q=0;Q<be;Q++)for(Oe=Pe.cells[Q],Pe.tokens.cells[Q]=[],te=0;te<Oe.length;te++)Pe.tokens.cells[Q][te]=[],this.inlineTokens(Oe[te],Pe.tokens.cells[Q][te]);break}case"blockquote":{this.inline(Pe.tokens);break}case"list":{for(be=Pe.items.length,Q=0;Q<be;Q++)this.inline(Pe.items[Q].tokens);break}}}return z},he.inlineTokens=function(z,J,Q,te,be){J===void 0&&(J=[]),Q===void 0&&(Q=!1),te===void 0&&(te=!1),be===void 0&&(be="");var Oe,Pe=z,tt;if(this.tokens.links){var ct=Object.keys(this.tokens.links);if(ct.length>0)for(;(tt=this.tokenizer.rules.inline.reflinkSearch.exec(Pe))!=null;)ct.includes(tt[0].slice(tt[0].lastIndexOf("[")+1,-1))&&(Pe=Pe.slice(0,tt.index)+"["+"a".repeat(tt[0].length-2)+"]"+Pe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(tt=this.tokenizer.rules.inline.blockSkip.exec(Pe))!=null;)Pe=Pe.slice(0,tt.index)+"["+"a".repeat(tt[0].length-2)+"]"+Pe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;z;){if(Oe=this.tokenizer.escape(z)){z=z.substring(Oe.raw.length),J.push(Oe);continue}if(Oe=this.tokenizer.tag(z,Q,te)){z=z.substring(Oe.raw.length),Q=Oe.inLink,te=Oe.inRawBlock,J.push(Oe);continue}if(Oe=this.tokenizer.link(z)){z=z.substring(Oe.raw.length),Oe.type==="link"&&(Oe.tokens=this.inlineTokens(Oe.text,[],!0,te)),J.push(Oe);continue}if(Oe=this.tokenizer.reflink(z,this.tokens.links)){z=z.substring(Oe.raw.length),Oe.type==="link"&&(Oe.tokens=this.inlineTokens(Oe.text,[],!0,te)),J.push(Oe);continue}if(Oe=this.tokenizer.strong(z,Pe,be)){z=z.substring(Oe.raw.length),Oe.tokens=this.inlineTokens(Oe.text,[],Q,te),J.push(Oe);continue}if(Oe=this.tokenizer.em(z,Pe,be)){z=z.substring(Oe.raw.length),Oe.tokens=this.inlineTokens(Oe.text,[],Q,te),J.push(Oe);continue}if(Oe=this.tokenizer.codespan(z)){z=z.substring(Oe.raw.length),J.push(Oe);continue}if(Oe=this.tokenizer.br(z)){z=z.substring(Oe.raw.length),J.push(Oe);continue}if(Oe=this.tokenizer.del(z)){z=z.substring(Oe.raw.length),Oe.tokens=this.inlineTokens(Oe.text,[],Q,te),J.push(Oe);continue}if(Oe=this.tokenizer.autolink(z,De)){z=z.substring(Oe.raw.length),J.push(Oe);continue}if(!Q&&(Oe=this.tokenizer.url(z,De))){z=z.substring(Oe.raw.length),J.push(Oe);continue}if(Oe=this.tokenizer.inlineText(z,te,it)){z=z.substring(Oe.raw.length),be=Oe.raw.slice(-1),J.push(Oe);continue}if(z){var qe="Infinite loop on byte: "+z.charCodeAt(0);if(this.options.silent){console.error(qe);break}else throw new Error(qe)}}return J},P(pe,null,[{key:"rules",get:function(){return{block:He,inline:Ge}}}]),pe}(),Xe=W.defaults,$=M.cleanUrl,me=M.escape,xe=function(){function pe(de){this.options=de||Xe}var he=pe.prototype;return he.code=function(z,J,Q){var te=(J||"").match(/\S*/)[0];if(this.options.highlight){var be=this.options.highlight(z,te);be!=null&&be!==z&&(Q=!0,z=be)}return te?'<pre><code class="'+this.options.langPrefix+me(te,!0)+'">'+(Q?z:me(z,!0))+`</code></pre>
|
|
`:"<pre><code>"+(Q?z:me(z,!0))+`</code></pre>
|
|
`},he.blockquote=function(z){return`<blockquote>
|
|
`+z+`</blockquote>
|
|
`},he.html=function(z){return z},he.heading=function(z,J,Q,te){return this.options.headerIds?"<h"+J+' id="'+this.options.headerPrefix+te.slug(Q)+'">'+z+"</h"+J+`>
|
|
`:"<h"+J+">"+z+"</h"+J+`>
|
|
`},he.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},he.list=function(z,J,Q){var te=J?"ol":"ul",be=J&&Q!==1?' start="'+Q+'"':"";return"<"+te+be+`>
|
|
`+z+"</"+te+`>
|
|
`},he.listitem=function(z){return"<li>"+z+`</li>
|
|
`},he.checkbox=function(z){return"<input "+(z?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},he.paragraph=function(z){return"<p>"+z+`</p>
|
|
`},he.table=function(z,J){return J&&(J="<tbody>"+J+"</tbody>"),`<table>
|
|
<thead>
|
|
`+z+`</thead>
|
|
`+J+`</table>
|
|
`},he.tablerow=function(z){return`<tr>
|
|
`+z+`</tr>
|
|
`},he.tablecell=function(z,J){var Q=J.header?"th":"td",te=J.align?"<"+Q+' align="'+J.align+'">':"<"+Q+">";return te+z+"</"+Q+`>
|
|
`},he.strong=function(z){return"<strong>"+z+"</strong>"},he.em=function(z){return"<em>"+z+"</em>"},he.codespan=function(z){return"<code>"+z+"</code>"},he.br=function(){return this.options.xhtml?"<br/>":"<br>"},he.del=function(z){return"<del>"+z+"</del>"},he.link=function(z,J,Q){if(z=$(this.options.sanitize,this.options.baseUrl,z),z===null)return Q;var te='<a href="'+me(z)+'"';return J&&(te+=' title="'+J+'"'),te+=">"+Q+"</a>",te},he.image=function(z,J,Q){if(z=$(this.options.sanitize,this.options.baseUrl,z),z===null)return Q;var te='<img src="'+z+'" alt="'+Q+'"';return J&&(te+=' title="'+J+'"'),te+=this.options.xhtml?"/>":">",te},he.text=function(z){return z},pe}(),Ee=function(){function pe(){}var he=pe.prototype;return he.strong=function(z){return z},he.em=function(z){return z},he.codespan=function(z){return z},he.del=function(z){return z},he.html=function(z){return z},he.text=function(z){return z},he.link=function(z,J,Q){return""+Q},he.image=function(z,J,Q){return""+Q},he.br=function(){return""},pe}(),Ie=function(){function pe(){this.seen={}}var he=pe.prototype;return he.slug=function(z){var J=z.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(J)){var Q=J;do this.seen[Q]++,J=Q+"-"+this.seen[Q];while(this.seen.hasOwnProperty(J))}return this.seen[J]=0,J},pe}(),Be=W.defaults,Je=M.unescape,ze=function(){function pe(de){this.options=de||Be,this.options.renderer=this.options.renderer||new xe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ee,this.slugger=new Ie}pe.parse=function(z,J){var Q=new pe(J);return Q.parse(z)};var he=pe.prototype;return he.parse=function(z,J){J===void 0&&(J=!0);var Q="",te,be,Oe,Pe,tt,ct,qe,gt,bt,at,Et,pt,yt,$e,ft,Dt,Ct,nt,Tt=z.length;for(te=0;te<Tt;te++){at=z[te];switch(at.type){case"space":continue;case"hr":{Q+=this.renderer.hr();continue}case"heading":{Q+=this.renderer.heading(this.parseInline(at.tokens),at.depth,Je(this.parseInline(at.tokens,this.textRenderer)),this.slugger);continue}case"code":{Q+=this.renderer.code(at.text,at.lang,at.escaped);continue}case"table":{for(gt="",qe="",Pe=at.header.length,be=0;be<Pe;be++)qe+=this.renderer.tablecell(this.parseInline(at.tokens.header[be]),{header:!0,align:at.align[be]});for(gt+=this.renderer.tablerow(qe),bt="",Pe=at.cells.length,be=0;be<Pe;be++){for(ct=at.tokens.cells[be],qe="",tt=ct.length,Oe=0;Oe<tt;Oe++)qe+=this.renderer.tablecell(this.parseInline(ct[Oe]),{header:!1,align:at.align[Oe]});bt+=this.renderer.tablerow(qe)}Q+=this.renderer.table(gt,bt);continue}case"blockquote":{bt=this.parse(at.tokens),Q+=this.renderer.blockquote(bt);continue}case"list":{for(Et=at.ordered,pt=at.start,yt=at.loose,Pe=at.items.length,bt="",be=0;be<Pe;be++)ft=at.items[be],Dt=ft.checked,Ct=ft.task,$e="",ft.task&&(nt=this.renderer.checkbox(Dt),yt?ft.tokens.length>0&&ft.tokens[0].type==="text"?(ft.tokens[0].text=nt+" "+ft.tokens[0].text,ft.tokens[0].tokens&&ft.tokens[0].tokens.length>0&&ft.tokens[0].tokens[0].type==="text"&&(ft.tokens[0].tokens[0].text=nt+" "+ft.tokens[0].tokens[0].text)):ft.tokens.unshift({type:"text",text:nt}):$e+=nt),$e+=this.parse(ft.tokens,yt),bt+=this.renderer.listitem($e,Ct,Dt);Q+=this.renderer.list(bt,Et,pt);continue}case"html":{Q+=this.renderer.html(at.text);continue}case"paragraph":{Q+=this.renderer.paragraph(this.parseInline(at.tokens));continue}case"text":{for(bt=at.tokens?this.parseInline(at.tokens):at.text;te+1<Tt&&z[te+1].type==="text";)at=z[++te],bt+=`
|
|
`+(at.tokens?this.parseInline(at.tokens):at.text);Q+=J?this.renderer.paragraph(bt):bt;continue}default:{var ot='Token with "'+at.type+'" type was not found.';if(this.options.silent){console.error(ot);return}else throw new Error(ot)}}}return Q},he.parseInline=function(z,J){J=J||this.renderer;var Q="",te,be,Oe=z.length;for(te=0;te<Oe;te++){be=z[te];switch(be.type){case"escape":{Q+=J.text(be.text);break}case"html":{Q+=J.html(be.text);break}case"link":{Q+=J.link(be.href,be.title,this.parseInline(be.tokens,J));break}case"image":{Q+=J.image(be.href,be.title,be.text);break}case"strong":{Q+=J.strong(this.parseInline(be.tokens,J));break}case"em":{Q+=J.em(this.parseInline(be.tokens,J));break}case"codespan":{Q+=J.codespan(be.text);break}case"br":{Q+=J.br();break}case"del":{Q+=J.del(this.parseInline(be.tokens,J));break}case"text":{Q+=J.text(be.text);break}default:{var Pe='Token with "'+be.type+'" type was not found.';if(this.options.silent){console.error(Pe);return}else throw new Error(Pe)}}}return Q},pe}(),ut=M.merge,et=M.checkSanitizeDeprecation,Ze=M.escape,Ve=W.getDefaults,Le=W.changeDefaults,dt=W.defaults;function Ae(pe,he,de){if(typeof pe=="undefined"||pe===null)throw new Error("marked(): input parameter is undefined or null");if(typeof pe!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(pe)+", string expected");if(typeof he=="function"&&(de=he,he=null),he=ut({},Ae.defaults,he||{}),et(he),de){var z=he.highlight,J;try{J=Ue.lex(pe,he)}catch(Oe){return de(Oe)}var Q=function(Pe){var tt;if(!Pe)try{tt=ze.parse(J,he)}catch(ct){Pe=ct}return he.highlight=z,Pe?de(Pe):de(null,tt)};if(!z||z.length<3)return Q();if(delete he.highlight,!J.length)return Q();var te=0;Ae.walkTokens(J,function(Oe){Oe.type==="code"&&(te++,setTimeout(function(){z(Oe.text,Oe.lang,function(Pe,tt){if(Pe)return Q(Pe);tt!=null&&tt!==Oe.text&&(Oe.text=tt,Oe.escaped=!0),te--,te===0&&Q()})},0))}),te===0&&Q();return}try{var be=Ue.lex(pe,he);return he.walkTokens&&Ae.walkTokens(be,he.walkTokens),ze.parse(be,he)}catch(Oe){if(Oe.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,he.silent)return"<p>An error occurred:</p><pre>"+Ze(Oe.message+"",!0)+"</pre>";throw Oe}}Ae.options=Ae.setOptions=function(pe){return ut(Ae.defaults,pe),Le(Ae.defaults),Ae},Ae.getDefaults=Ve,Ae.defaults=dt,Ae.use=function(pe){var he=ut({},pe);if(pe.renderer&&function(){var z=Ae.defaults.renderer||new xe,J=function(be){var Oe=z[be];z[be]=function(){for(var Pe=arguments.length,tt=new Array(Pe),ct=0;ct<Pe;ct++)tt[ct]=arguments[ct];var qe=pe.renderer[be].apply(z,tt);return qe===!1&&(qe=Oe.apply(z,tt)),qe}};for(var Q in pe.renderer)J(Q);he.renderer=z}(),pe.tokenizer&&function(){var z=Ae.defaults.tokenizer||new _e,J=function(be){var Oe=z[be];z[be]=function(){for(var Pe=arguments.length,tt=new Array(Pe),ct=0;ct<Pe;ct++)tt[ct]=arguments[ct];var qe=pe.tokenizer[be].apply(z,tt);return qe===!1&&(qe=Oe.apply(z,tt)),qe}};for(var Q in pe.tokenizer)J(Q);he.tokenizer=z}(),pe.walkTokens){var de=Ae.defaults.walkTokens;he.walkTokens=function(z){pe.walkTokens(z),de&&de(z)}}Ae.setOptions(he)},Ae.walkTokens=function(pe,he){for(var de=A(pe),z;!(z=de()).done;){var J=z.value;he(J);switch(J.type){case"table":{for(var Q=A(J.tokens.header),te;!(te=Q()).done;){var be=te.value;Ae.walkTokens(be,he)}for(var Oe=A(J.tokens.cells),Pe;!(Pe=Oe()).done;)for(var tt=Pe.value,ct=A(tt),qe;!(qe=ct()).done;){var gt=qe.value;Ae.walkTokens(gt,he)}break}case"list":{Ae.walkTokens(J.items,he);break}default:J.tokens&&Ae.walkTokens(J.tokens,he)}}},Ae.Parser=ze,Ae.parser=ze.parse,Ae.Renderer=xe,Ae.TextRenderer=Ee,Ae.Lexer=Ue,Ae.lexer=Ue.lex,Ae.Tokenizer=_e,Ae.Slugger=Ie,Ae.parse=Ae;var Ne=Ae;return Ne})},FOrL:function(Ke,ce,F){Ke.exports=F.p+"static/nodata.a6b3f948.png"},FWmy:function(Ke,ce,F){"use strict";F.d(ce,"a",function(){return ee});function ee(P,R){if(!P)throw new Error(R?`Assertion failed (${R})`:"Assertion Failed")}},Fhpe:function(Ke,ce,F){Ke.exports={flex_box_center:"flex_box_center___1W7Bl",flex_space_between:"flex_space_between___3S4Sp",flex_box_vertical_center:"flex_box_vertical_center___5mGEA",flex_box_center_end:"flex_box_center_end___1blqp",flex_box_column:"flex_box_column___4i1E0",CustomCss:"CustomCss___3thFA",CustomTipsModalCss:"CustomTipsModalCss___2aNwC",dropdownmenus:"dropdownmenus___19dGk",popupClassNames:"popupClassNames___3LOFQ",selectdown:"selectdown___1_utH"}},JAbv:function(Ke,ce){Ke.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKQAAAA8CAYAAADogBFvAAAAAXNSR0IArs4c6QAADzxJREFUeF7tnQl4VcUVx3/3JSEBARFEFllcQAMJuKDUD7FqtVbFtUqtS6ufS1soxaW1Si0KBaFVWy2ittqqdQ9xpYq4tLgVFWUThYQlJIEkkJXs63u333lzL+/mrfeF9/KSeM/35Xv3zZw5c+bM/83MOTN3ouGQY4EuZAGtC+niqOJYAAeQDgi6lAU0fUayHqCR5gJXEriS/T6TICkZNOMzIN/gFx7/8vvLiFxDt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PTtywvFIBx96FAzPVODbk6PW3XbCQQdad0fLiz11D7urW9nXHP4eqmjCQPEHZEcb3NFysR49JMxz5SNKm9VPgZzYcQjE4ZOzKy1u8qtt3Jmv8fCEZcyOZDoHkJEsNHcjDBuvuO6bCvlG/DRSuW9Dvly74tHZUumOOG3LUWo7L4U5gAwHHHGsxMESkvOKC40DEd8GsEXRxqI6D1VNka+P1ODtzGzOD7t66XGX3sdyypaguATHhbJvg1UPR9FN3x7WxjbYsc/ezSqRwkA9b4QclqE8aiEJeH/5UseQITs5F81X/+tQSPa6g73f0zHpPaqUhMa3VrppDRMkNxscKQzU8wDZo7q6+zSmtFGntN6GcwOECwM5gOw+fd6lNW31QG6lADLytTHhwkAOILt0N3cv5XZWe6gXZNqhEGEgB5B2jOfw2LLAvmad3bX2pu1QYSAHkLZM7TDZsYD4NDn2YpJeccHCQA4g7Vja4bFtgeJ6D5WNNqdtcXD8TgM5gLRtaofRjgWa3LC9yl5M0jtK+p0GcgBpx8oOT1QWyKt209Aa2ds2hbpczM7Iwrvr4AAyKlM7zHYsEKVz0+5uIAeQdizs8Ni2gIyL8icxSbeNnZv9go0wkANI26Z2GKOxwJ56D+VRODdmGMgBZDRWdnhtW6C6WWeX/Zjk/jDQ/wHkSLPJ/mcrgQAAAABJRU5ErkJggg=="},JYp7:function(Ke,ce,F){"use strict";F.d(ce,"a",function(){return ee});var ee;(function(P){function R(t){return t&&typeof t=="object"&&typeof t[Symbol.iterator]=="function"}P.is=R;const U=Object.freeze([]);function A(){return U}P.empty=A;function*I(t){yield t}P.single=I;function W(t){return t||U}P.from=W;function j(t){return!t||t[Symbol.iterator]().next().done===!0}P.isEmpty=j;function e(t){return t[Symbol.iterator]().next().value}P.first=e;function C(t,_){for(const p of t)if(_(p))return!0;return!1}P.some=C;function f(t,_){for(const p of t)if(_(p))return p;return}P.find=f;function*h(t,_){for(const p of t)_(p)&&(yield p)}P.filter=h;function*l(t,_){let p=0;for(const v of t)yield _(v,p++)}P.map=l;function*i(...t){for(const _ of t)for(const p of _)yield p}P.concat=i;function*s(t){for(const _ of t)for(const p of _)yield p}P.concatNested=s;function u(t,_,p){let v=p;for(const x of t)v=_(v,x);return v}P.reduce=u;function*o(t,_,p=t.length){for(_<0&&(_+=t.length),p<0?p+=t.length:p>t.length&&(p=t.length);_<p;_++)yield t[_]}P.slice=o;function a(t,_=Number.POSITIVE_INFINITY){const p=[];if(_===0)return[p,t];const v=t[Symbol.iterator]();for(let x=0;x<_;x++){const T=v.next();if(T.done)return[p,P.empty()];p.push(T.value)}return[p,{[Symbol.iterator](){return v}}]}P.consume=a;function n(t,_,p=(v,x)=>v===x){const v=t[Symbol.iterator](),x=_[Symbol.iterator]();for(;;){const T=v.next(),b=x.next();if(T.done!==b.done)return!1;if(T.done)return!0;if(!p(T.value,b.value))return!1}}P.equals=n})(ee||(ee={}))},KOXS:function(Ke,ce,F){Ke.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(Ke,ce,F){"use strict";F.d(ce,"b",function(){return t}),F.d(ce,"a",function(){return p});var ee=F("1OyB"),P=F("vuIU"),R=F("Ji7U"),U=F("LK+K"),A=F("q1tI"),I=F("rePB"),W=F("Ff2n"),j=F("ODXe"),e=F("4IlW"),C=F("bX4T"),f=F("YrtM"),h=F("TSYQ"),l=F.n(h),i=F("+nKL"),s=F("8OUc"),u=function(K,Y){var ie=K.prefixCls,re=K.id,Te=K.flattenOptions,_e=K.childrenAsData,we=K.values,Ce=K.searchValue,Re=K.multiple,ue=K.defaultActiveFirstOption,q=K.height,Fe=K.itemHeight,We=K.notFoundContent,He=K.open,Ge=K.menuItemSelectedIcon,it=K.virtual,De=K.onSelect,Ue=K.onToggleOpen,Xe=K.onActiveValue,$=K.onScroll,me=K.onMouseEnter,xe="".concat(ie,"-item"),Ee=Object(f.a)(function(){return Te},[He,Te],function(Ne,pe){return pe[0]&&Ne[1]!==pe[1]}),Ie=A.useRef(null),Be=function(pe){pe.preventDefault()},Je=function(pe){Ie.current&&Ie.current.scrollTo({index:pe})},ze=function(pe){for(var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,de=Ee.length,z=0;z<de;z+=1){var J=(pe+z*he+de)%de,Q=Ee[J],te=Q.group,be=Q.data;if(!te&&!be.disabled)return J}return-1},ut=A.useState(function(){return ze(0)}),et=Object(j.a)(ut,2),Ze=et[0],Ve=et[1],Le=function(pe){Ve(pe);var he=Ee[pe];if(!he){Xe(null,-1);return}Xe(he.data.value,pe)};A.useEffect(function(){Le(ue!==!1?ze(0):-1)},[Ee.length,Ce]),A.useEffect(function(){var Ne=setTimeout(function(){if(!Re&&He&&we.size===1){var pe=Array.from(we)[0],he=Ee.findIndex(function(de){var z=de.data;return z.value===pe});Le(he),Je(he)}});return function(){return clearTimeout(Ne)}},[He]);var dt=function(pe){pe!==void 0&&De(pe,{selected:!we.has(pe)}),Re||Ue(!1)};if(A.useImperativeHandle(Y,function(){return{onKeyDown:function(pe){var he=pe.which;switch(he){case e.a.UP:case e.a.DOWN:{var de=0;if(he===e.a.UP?de=-1:he===e.a.DOWN&&(de=1),de!==0){var z=ze(Ze+de,de);Je(z),Le(z)}break}case e.a.ENTER:{var J=Ee[Ze];J&&!J.data.disabled?dt(J.data.value):dt(void 0),He&&pe.preventDefault();break}case e.a.ESC:Ue(!1)}},onKeyUp:function(){},scrollTo:function(pe){Je(pe)}}}),Ee.length===0)return A.createElement("div",{role:"listbox",id:"".concat(re,"_list"),className:"".concat(xe,"-empty"),onMouseDown:Be},We);function Ae(Ne){var pe=Ee[Ne];if(!pe)return null;var he=pe.data||{},de=he.value,z=he.label,J=he.children,Q=Object(C.a)(he,!0),te=_e?J:z;return pe?A.createElement("div",Object.assign({"aria-label":typeof te=="string"?te:null},Q,{key:Ne,role:"option",id:"".concat(re,"_list_").concat(Ne),"aria-selected":we.has(de)}),de):null}return A.createElement(A.Fragment,null,A.createElement("div",{role:"listbox",id:"".concat(re,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ae(Ze-1),Ae(Ze),Ae(Ze+1)),A.createElement(i.a,{itemKey:"key",ref:Ie,data:Ee,height:q,itemHeight:Fe,fullHeight:!1,onMouseDown:Be,onScroll:$,virtual:it,onMouseEnter:me},function(Ne,pe){var he,de=Ne.group,z=Ne.groupOption,J=Ne.data,Q=J.label,te=J.key;if(de)return A.createElement("div",{className:l()(xe,"".concat(xe,"-group"))},Q!==void 0?Q:te);var be=J.disabled,Oe=J.value,Pe=J.title,tt=J.children,ct=J.style,qe=J.className,gt=Object(W.a)(J,["disabled","value","title","children","style","className"]),bt=we.has(Oe),at="".concat(xe,"-option"),Et=l()(xe,at,qe,(he={},Object(I.a)(he,"".concat(at,"-grouped"),z),Object(I.a)(he,"".concat(at,"-active"),Ze===pe&&!be),Object(I.a)(he,"".concat(at,"-disabled"),be),Object(I.a)(he,"".concat(at,"-selected"),bt),he)),pt=_e?tt:Q,yt=!Ge||typeof Ge=="function"||bt;return A.createElement("div",Object.assign({},gt,{"aria-selected":bt,className:Et,title:Pe,onMouseMove:function(){if(Ze===pe||be)return;Le(pe)},onClick:function(){be||dt(Oe)},style:ct}),A.createElement("div",{className:"".concat(at,"-content")},pt||Oe),A.isValidElement(Ge)||bt,yt&&A.createElement(s.a,{className:"".concat(xe,"-option-state"),customizeIcon:Ge,customizeIconProps:{isSelected:bt}},bt?"\u2713":null))}))},o=A.forwardRef(u);o.displayName="OptionList";var a=o,n=function(){return null};n.isSelectOption=!0;var t=n,_=function(){return null};_.isSelectOptGroup=!0;var p=_,v=F("VTBJ"),x=F("Zm9Q");function T(O){var K=O.key,Y=O.props,ie=Y.children,re=Y.value,Te=Object(W.a)(Y,["children","value"]);return Object(v.a)({key:K,value:re!==void 0?re:K,children:ie},Te)}function b(O){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(x.a)(O).map(function(Y,ie){if(!A.isValidElement(Y)||!Y.type)return null;var re=Y.type.isSelectOptGroup,Te=Y.key,_e=Y.props,we=_e.children,Ce=Object(W.a)(_e,["children"]);return K||!re?T(Y):Object(v.a)(Object(v.a)({key:"__RC_SELECT_GRP__".concat(Te===null?ie:Te,"__"),label:Te},Ce),{},{options:b(we)})}).filter(function(Y){return Y})}var d=F("2Qr1"),g=F("qNPg"),c=F("U8pU"),y=F("Kwbf"),r=F("WKfj");function w(O){var K=O.mode,Y=O.options,ie=O.children,re=O.backfill,Te=O.allowClear,_e=O.placeholder,we=O.getInputElement,Ce=O.showSearch,Re=O.onSearch,ue=O.defaultOpen,q=O.autoFocus,Fe=O.labelInValue,We=O.value,He=O.inputValue,Ge=O.optionLabelProp,it=K==="multiple"||K==="tags",De=Ce!==void 0?Ce:it||K==="combobox",Ue=Y||b(ie);if(Object(y.a)(K!=="tags"||Ue.every(function(xe){return!xe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),K==="tags"||K==="combobox"){var Xe=Ue.some(function(xe){return xe.options?xe.options.some(function(Ee){return typeof("value"in Ee?Ee.value:Ee.key)=="number"}):typeof("value"in xe?xe.value:xe.key)=="number"});Object(y.a)(!Xe,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(y.a)(K!=="combobox"||!Ge,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(y.a)(K==="combobox"||!re,"`backfill` only works with `combobox` mode."),Object(y.a)(K==="combobox"||!we,"`getInputElement` only work with `combobox` mode."),Object(y.b)(K!=="combobox"||!we||!Te||!_e,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Re&&!De&&K!=="combobox"&&K!=="tags"&&Object(y.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(y.b)(!ue||q,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),We!=null){var $=Object(r.d)(We);Object(y.a)(!Fe||$.every(function(xe){return Object(c.a)(xe)==="object"&&("key"in xe||"value"in xe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(y.a)(!it||Array.isArray(We),"`value` should be array when `mode` is `multiple` or `tags`")}if(ie){var me=null;Object(x.a)(ie).some(function(xe){if(!A.isValidElement(xe)||!xe.type)return!1;var Ee=xe.type;if(Ee.isSelectOption)return!1;if(Ee.isSelectOptGroup){var Ie=Object(x.a)(xe.props.children).every(function(Be){return!A.isValidElement(Be)||!xe.type||Be.type.isSelectOption?!0:(me=Be.type,!1)});return!Ie}return me=Ee,!0}),me&&Object(y.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(me.displayName||me.name||me,"`.")),Object(y.a)(He===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var D=w,L=Object(g.a)({prefixCls:"rc-select",components:{optionList:a},convertChildrenToData:b,flattenOptions:d.d,getLabeledValue:d.e,filterOptions:d.b,isValueDisabled:d.g,findValueOption:d.c,warningProps:D,fillOptionsWithMissingValue:d.a}),S=function(O){Object(R.a)(Y,O);var K=Object(U.a)(Y);function Y(){var ie;return Object(ee.a)(this,Y),ie=K.apply(this,arguments),ie.selectRef=A.createRef(),ie.focus=function(){ie.selectRef.current.focus()},ie.blur=function(){ie.selectRef.current.blur()},ie}return Object(P.a)(Y,[{key:"render",value:function(){return A.createElement(L,Object.assign({ref:this.selectRef},this.props))}}]),Y}(A.Component);S.Option=t,S.OptGroup=p;var M=S,H=ce.c=M},LicW:function(Ke,ce,F){"use strict";var ee=F("T2oS"),P=F("W9HT"),R=F("5Dmo"),U=F("3S7+"),A=F("q1tI"),I=F.n(A),W=F("ZJlW"),j=F.n(W),e=F("m3rI"),C=F("TSYQ"),f=F.n(C),h=F("1vsH"),l=F("z4EP"),i=F.n(l),s=F("+GGh"),u=F.n(s),o=F("cFMs"),a=F.n(o),n=F("BdwD"),t=function(p){var v=p.className,x=p.dataSource,T=x===void 0?[]:x,b=p.col,d=b===void 0?4:b,g=p.right,c=p.bottom,y=c===void 0?23:c,r=p.precision,w=r===void 0?0:r,D=p.wrapWidth,L=D===void 0?1200:D,S=p.trackEventItems,M=p.loading,H=Math.floor((L-(d-1)*g)/d);return I.a.createElement(P.a,{spinning:M},I.a.createElement("div",{className:f()(j.a.list,v)},!!T.length&&T.map(function(O,K){var Y=O.name,ie=O.id,re=O.identifier,Te=O.featured,_e=O.school_name,we=O.image_url,Ce=O.excellent;return I.a.createElement("div",{key:ie,className:j.a.wrap,style:{width:H,marginRight:(1+K)%d===0?0:g+w,marginBottom:y}},I.a.createElement("a",{target:"_blank",href:"/paths/".concat(re),className:j.a.li,onClick:function(ue){ue.preventDefault(),S&&Object(h.cb)([S]),Object(h.S)("/paths/".concat(re))}},I.a.createElement("div",{className:j.a.img},I.a.createElement("img",{className:j.a.cover,src:"".concat(e.a.IMG_SERVER,"/").concat(we)}),Te===1&&I.a.createElement("img",{className:j.a.sign,src:i.a}),Te===2&&I.a.createElement("img",{className:j.a.sign,src:""}),Te===3&&I.a.createElement("img",{className:j.a.sign,src:u.a}),Te===4&&I.a.createElement("img",{className:j.a.sign,src:""}),Te===5&&I.a.createElement("img",{className:j.a.sign,src:a.a})),I.a.createElement("div",{className:j.a.name},I.a.createElement(U.a,{title:Y},I.a.createElement("span",{className:j.a.e},Y))),I.a.createElement(U.a,{title:"\u53D1\u5E03\u5355\u4F4D\uFF1A".concat(_e)},I.a.createElement("div",{className:j.a.unit},I.a.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),_e)),I.a.createElement("div",{className:j.a.tags},I.a.createElement(U.a,{placement:"bottom",title:"\u7AE0\u8282\u6570"},I.a.createElement("span",null,I.a.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),I.a.createElement("span",null,O.stages_count))),I.a.createElement(U.a,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},I.a.createElement("span",null,I.a.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),I.a.createElement("span",null,O.members_count))),Ce&&I.a.createElement("div",{className:j.a.tag},"\u5F00\u653E\u8BFE\u7A0B"))))}),!T.length&&I.a.createElement(n.a,null)))};ce.a=t},MEgm:function(Ke,ce){Ke.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALAAAAA8CAYAAADGxTD9AAAAAXNSR0IArs4c6QAAFoFJREFUeF7tXQl4k1W6fv8sTbqvlJa2tJSy74ugsiMqq4AKIlDUueNwR2dGHR0XdLwixW3uuF6Xq3O9o15nxuUiIIsCsijK1pa20NJ937eke5tmmec7f/40TfInaUNK6+R7nj5Jk7Of93z/t55w8JBnBYbwCnBDeOyeoXtWAB4Ae0AwpFeA+1SWbbA1A07KQSID6JWT0ivAyThIpBwgBSQy4+fCq0T4jANnrEdlWFkpjK/0ndAetd/znpMaTO0LZcz74tsxti0xjqVXfeNYZcZyxvHSuK3GbDYX03iMbbLy5nOz+pzGbGDrwpfj52DQG2DQAwad8Gcwvudf9ToDQN/pDdBrDYBFWfqMry/UAytP9fjPjJ/rYVHf2L7Qph4GaA0tOj1UnBYqvd6gMugMKr0OKoOOq+UMhhQ5DGfHPRNWMaSRaxy8bQBzPGAZAI3AFMAoAIJtnBnA2WaagdlU39iOAKKeje85FKY2TYDkwWh+APi2ebD0AJ8HMn/AzAHFA4x9Jxwss7bN5yXUpbnwB4SvY3Nu9LmwLr36NIKWAEhA1BlMgOUBCAZYBtJe761Byx+A3vV54Av1efDrtUawm4G+N+D5MfUcHH5s7H890KnqNjRWNGkaqlXqhgp1VV1JwxkOSJUAqUB0xk4s0Q4FgIty4KEweM8Yba+ARCmBzBuQeksgVXKQKugVkAdIoRwhhU+EHJycg0GrNz01Whs6UJhegtLsCmi7tI0GYC8H7osYTPhuO2Z3D9a19gB4sO6Mm8flFSKBd4QcyuFS+MbKIfOWMM6v69KjIq8WhVlFaKpvAQe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Qri2D57a/VyBBkMNanSOw1WNCt0bSUh82FZXHgD3cwM81VxbAT10yNWlQm+6vceupKuTQTJ7J7ZYGZE9AHZtHzy1XViBSn0B1Hpnr5jlziZh642WV7V6AOzCBniqurYCnWhDodZ2upGtliXA9l3Y9r75dx4Au7YHntourkChLhOdDjxzPV1wKl8oxpn/Fp0HwC5ugKe6ayvQbGhAuc75SwY5cB8lIfFeoVcPgF1bf09tl1fAgDxdut0wS+supIt2Y8v3zELxqSz7ajsnXZ6Sp4F/rRVoMFShRmf/yq3eK8JljcSE6dsxu9sD4H8trAzK2eqgQ54uDXohPdyJUXLgnkxC4sseADuxWJ4i7l+Ban0JGvW2U+9t9c4B7QZIJ3oA7P698fTgxAo0GepRobN/qaFlMxy4/f8E90wA8RE2tUgAAAAASUVORK5CYII="},MI8n:function(Ke,ce,F){"use strict";F.d(ce,"c",function(){return A}),F.d(ce,"b",function(){return e}),F.d(ce,"e",function(){return C}),F.d(ce,"a",function(){return f}),F.d(ce,"d",function(){return h}),F.d(ce,"f",function(){return l});var ee=F("/cxE"),P=F("pmY6"),R=F("24hK"),U=F("5Y4S"),A;(function(i){i.None=()=>P.a.None;function s(w){return(D,L=null,S)=>{let M=!1,H;return H=w(O=>M?void 0:(H?H.dispose():M=!0,D.call(L,O)),null,S),M&&H.dispose(),H}}i.once=s;function u(w,D){return p((L,S=null,M)=>w(H=>L.call(S,D(H)),null,M))}i.map=u;function o(w,D){return p((L,S=null,M)=>w(H=>{D(H),L.call(S,H)},null,M))}i.forEach=o;function a(w,D){return p((L,S=null,M)=>w(H=>D(H)&&L.call(S,H),null,M))}i.filter=a;function n(w){return w}i.signal=n;function t(...w){return(D,L=null,S)=>Object(P.e)(...w.map(M=>M(H=>D.call(L,H),null,S)))}i.any=t;function _(w,D,L){let S=L;return u(w,M=>(S=D(S,M),S))}i.reduce=_;function p(w){let D;const L=new e({onFirstListenerAdd(){D=w(L.fire,L)},onLastListenerRemove(){D.dispose()}});return L.event}function v(w,D,L=100,S=!1,M){let H,O,K,Y=0;const ie=new e({leakWarningThreshold:M,onFirstListenerAdd(){H=w(re=>{Y++,O=D(O,re),S&&!K&&(ie.fire(O),O=void 0),clearTimeout(K),K=setTimeout(()=>{const Te=O;O=void 0,K=void 0,(!S||Y>1)&&ie.fire(Te),Y=0},L)})},onLastListenerRemove(){H.dispose()}});return ie.event}i.debounce=v;function x(w,D=(L,S)=>L===S){let L=!0,S;return a(w,M=>{const H=L||!D(M,S);return L=!1,S=M,H})}i.latch=x;function T(w,D){return[i.filter(w,D),i.filter(w,L=>!D(L))]}i.split=T;function b(w,D=!1,L=[]){let S=L.slice(),M=w(K=>{S?S.push(K):O.fire(K)});const H=()=>{S&&S.forEach(K=>O.fire(K)),S=null},O=new e({onFirstListenerAdd(){M||(M=w(K=>O.fire(K)))},onFirstListenerDidAdd(){S&&(D?setTimeout(H):H())},onLastListenerRemove(){M&&M.dispose(),M=null}});return O.event}i.buffer=b;class d{constructor(w){this.event=w}map(w){return new d(u(this.event,w))}forEach(w){return new d(o(this.event,w))}filter(w){return new d(a(this.event,w))}reduce(w,D){return new d(_(this.event,w,D))}latch(){return new d(x(this.event))}debounce(w,D=100,L=!1,S){return new d(v(this.event,w,D,L,S))}on(w,D,L){return this.event(w,D,L)}once(w,D,L){return s(this.event)(w,D,L)}}function g(w){return new d(w)}i.chain=g;function c(w,D,L=S=>S){const S=(...K)=>O.fire(L(...K)),M=()=>w.on(D,S),H=()=>w.removeListener(D,S),O=new e({onFirstListenerAdd:M,onLastListenerRemove:H});return O.event}i.fromNodeEventEmitter=c;function y(w,D,L=S=>S){const S=(...K)=>O.fire(L(...K)),M=()=>w.addEventListener(D,S),H=()=>w.removeEventListener(D,S),O=new e({onFirstListenerAdd:M,onLastListenerRemove:H});return O.event}i.fromDOMEventEmitter=y;function r(w){return new Promise(D=>s(w)(D))}i.toPromise=r})(A||(A={}));class I{constructor(i){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${i}_${I._idPool++}`}start(i){this._stopWatch=new U.a(!0),this._listenerCount=i}stop(){if(this._stopWatch){const i=this._stopWatch.elapsed();this._elapsedOverall+=i,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${i.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}I._idPool=0;let W=-1;class j{constructor(i,s=Math.random().toString(18).slice(2,5)){this.customThreshold=i,this.name=s,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(i){let s=W;if(typeof this.customThreshold=="number"&&(s=this.customThreshold),s<=0||i<s)return;this._stacks||(this._stacks=new Map);const u=new Error().stack.split(`
|
|
`).slice(3).join(`
|
|
`),o=this._stacks.get(u)||0;if(this._stacks.set(u,o+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=s*.5;let a,n=0;for(const[t,_]of this._stacks)(!a||n<_)&&(a=t,n=_);console.warn(`[${this.name}] potential listener LEAK detected, having ${i} listeners already. MOST frequent listener (${n}):`),console.warn(a)}return()=>{const a=this._stacks.get(u)||0;this._stacks.set(u,a-1)}}}class e{constructor(i){var s;this._disposed=!1,this._options=i,this._leakageMon=W>0?new j(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((s=this._options)===null||s===void 0?void 0:s._profName)?new I(this._options._profName):void 0}get event(){return this._event||(this._event=(i,s,u)=>{var o;this._listeners||(this._listeners=new R.a);const a=this._listeners.isEmpty();a&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const n=this._listeners.push(s?[i,s]:i);a&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,i,s);const t=(o=this._leakageMon)===null||o===void 0?void 0:o.check(this._listeners.size),_=Object(P.i)(()=>{if(t&&t(),!this._disposed&&(n(),this._options&&this._options.onLastListenerRemove)){const p=this._listeners&&!this._listeners.isEmpty();p||this._options.onLastListenerRemove(this)}});return u instanceof P.b?u.add(_):Array.isArray(u)&&u.push(_),_}),this._event}fire(i){var s,u;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new R.a);for(let o of this._listeners)this._deliveryQueue.push([o,i]);for((s=this._perfMon)===null||s===void 0||s.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[o,a]=this._deliveryQueue.shift();try{typeof o=="function"?o.call(void 0,a):o[0].call(o[1],a)}catch(n){Object(ee.f)(n)}}(u=this._perfMon)===null||u===void 0||u.stop()}}dispose(){var i,s,u,o,a;this._disposed||(this._disposed=!0,(i=this._listeners)===null||i===void 0||i.clear(),(s=this._deliveryQueue)===null||s===void 0||s.clear(),(o=(u=this._options)===null||u===void 0?void 0:u.onLastListenerRemove)===null||o===void 0||o.call(u),(a=this._leakageMon)===null||a===void 0||a.dispose())}}class C extends e{constructor(i){super(i);this._isPaused=0,this._eventQueue=new R.a,this._mergeFn=i==null?void 0:i.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const i=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(i))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(i){this._listeners&&(this._isPaused!==0?this._eventQueue.push(i):super.fire(i))}}class f extends C{constructor(i){var s;super(i);this._delay=(s=i.delay)!==null&&s!==void 0?s:100}fire(i){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(i)}}class h{constructor(){this.buffers=[]}wrapEvent(i){return(s,u,o)=>i(a=>{const n=this.buffers[this.buffers.length-1];n?n.push(()=>s.call(u,a)):s.call(u,a)},void 0,o)}bufferEvents(i){const s=[];this.buffers.push(s);const u=i();return this.buffers.pop(),s.forEach(o=>o()),u}}class l{constructor(){this.listening=!1,this.inputEvent=A.None,this.inputEventListener=P.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(i){this.inputEvent=i,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=i(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(Ke,ce,F){"use strict";(function(ee,P){F.d(ce,"b",function(){return u}),F.d(ce,"i",function(){return t}),F.d(ce,"f",function(){return _}),F.d(ce,"d",function(){return p}),F.d(ce,"g",function(){return v}),F.d(ce,"h",function(){return x}),F.d(ce,"c",function(){return T}),F.d(ce,"k",function(){return b}),F.d(ce,"j",function(){return d}),F.d(ce,"a",function(){return g}),F.d(ce,"e",function(){return r});var R;const U="en";let A=!1,I=!1,W=!1,j=!1,e=!1,C=!1,f=!1,h,l=U,i,s;const u=typeof self=="object"?self:typeof ee=="object"?ee:{};let o;typeof u.vscode!="undefined"&&typeof u.vscode.process!="undefined"?o=u.vscode.process:typeof P!="undefined"&&(o=P);const a=typeof((R=o==null?void 0:o.versions)===null||R===void 0?void 0:R.electron)=="string"&&o.type==="renderer";if(typeof navigator=="object"&&!a)s=navigator.userAgent,A=s.indexOf("Windows")>=0,I=s.indexOf("Macintosh")>=0,f=(s.indexOf("Macintosh")>=0||s.indexOf("iPad")>=0||s.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,W=s.indexOf("Linux")>=0,C=!0,h=navigator.language,l=h;else if(typeof o=="object"){A=o.platform==="win32",I=o.platform==="darwin",W=o.platform==="linux",j=W&&!!o.env.SNAP&&!!o.env.SNAP_REVISION,h=U,l=U;const w=o.env.VSCODE_NLS_CONFIG;if(w)try{const D=JSON.parse(w),L=D.availableLanguages["*"];h=D.locale,l=L||U,i=D._translationsConfigFile}catch(D){}e=!0}else console.error("Unable to resolve platform.");let n=0;I?n=1:A?n=3:W&&(n=2);const t=A,_=I,p=W,v=e,x=C,T=f,b=s,d=function(){if(u.setImmediate)return u.setImmediate.bind(u);if(typeof u.postMessage=="function"&&!u.importScripts){let L=[];u.addEventListener("message",M=>{if(M.data&&M.data.vscodeSetImmediateId)for(let H=0,O=L.length;H<O;H++){const K=L[H];if(K.id===M.data.vscodeSetImmediateId){L.splice(H,1),K.callback();return}}});let S=0;return M=>{const H=++S;L.push({id:H,callback:M}),u.postMessage({vscodeSetImmediateId:H},"*")}}if(typeof(o==null?void 0:o.nextTick)=="function")return o.nextTick.bind(o);const D=Promise.resolve();return L=>D.then(L)}(),g=I||f?2:A?1:3;let c=!0,y=!1;function r(){if(!y){y=!0;const w=new Uint8Array(2);w[0]=1,w[1]=2;const D=new Uint16Array(w.buffer);c=D[0]===(2<<8)+1}return c}}).call(this,F("IyRk"),F("Q2Ig"))},N0LK:function(Ke,ce,F){"use strict";F.d(ce,"C",function(){return ee}),F.d(ce,"v",function(){return R}),F.d(ce,"s",function(){return U}),F.d(ce,"t",function(){return A}),F.d(ce,"U",function(){return I}),F.d(ce,"J",function(){return W}),F.d(ce,"O",function(){return j}),F.d(ce,"p",function(){return e}),F.d(ce,"T",function(){return C}),F.d(ce,"q",function(){return f}),F.d(ce,"N",function(){return h}),F.d(ce,"M",function(){return l}),F.d(ce,"Q",function(){return i}),F.d(ce,"u",function(){return s}),F.d(ce,"x",function(){return u}),F.d(ce,"I",function(){return o}),F.d(ce,"f",function(){return a}),F.d(ce,"h",function(){return n}),F.d(ce,"g",function(){return t}),F.d(ce,"i",function(){return _}),F.d(ce,"G",function(){return p}),F.d(ce,"H",function(){return v}),F.d(ce,"r",function(){return x}),F.d(ce,"R",function(){return T}),F.d(ce,"d",function(){return b}),F.d(ce,"e",function(){return d}),F.d(ce,"E",function(){return g}),F.d(ce,"F",function(){return c}),F.d(ce,"j",function(){return y}),F.d(ce,"z",function(){return r}),F.d(ce,"K",function(){return D}),F.d(ce,"L",function(){return L}),F.d(ce,"m",function(){return M}),F.d(ce,"k",function(){return O}),F.d(ce,"A",function(){return Y}),F.d(ce,"a",function(){return ie}),F.d(ce,"n",function(){return re}),F.d(ce,"l",function(){return Te}),F.d(ce,"D",function(){return _e}),F.d(ce,"B",function(){return we}),F.d(ce,"b",function(){return Ce}),F.d(ce,"S",function(){return Re}),F.d(ce,"o",function(){return ue}),F.d(ce,"P",function(){return q}),F.d(ce,"w",function(){return Fe}),F.d(ce,"c",function(){return We}),F.d(ce,"y",function(){return it});function ee($){return!$||typeof $!="string"?!0:$.trim().length===0}const P=/{(\d+)}/g;function R($,...me){return me.length===0?$:$.replace(P,function(xe,Ee){const Ie=parseInt(Ee,10);return isNaN(Ie)||Ie<0||Ie>=me.length?xe:me[Ie]})}function U($){return $.replace(/[<>&]/g,function(me){switch(me){case"<":return"<";case">":return">";case"&":return"&";default:return me}})}function A($){return $.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function I($,me=" "){const xe=W($,me);return j(xe,me)}function W($,me){if(!$||!me)return $;const xe=me.length;if(xe===0||$.length===0)return $;let Ee=0;for(;$.indexOf(me,Ee)===Ee;)Ee=Ee+xe;return $.substring(Ee)}function j($,me){if(!$||!me)return $;const xe=me.length,Ee=$.length;if(xe===0||Ee===0)return $;let Ie=Ee,Be=-1;for(;!(Be=$.lastIndexOf(me,Ie-1),Be===-1||Be+xe!==Ie);){if(Be===0)return"";Ie=Be}return $.substring(0,Ie)}function e($){return $.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function C($){return $.replace(/\*/g,"")}function f($,me,xe={}){if(!$)throw new Error("Cannot create regex from empty string");me||($=A($)),xe.wholeWord&&(/\B/.test($.charAt(0))||($="\\b"+$),/\B/.test($.charAt($.length-1))||($=$+"\\b"));let Ee="";return xe.global&&(Ee+="g"),xe.matchCase||(Ee+="i"),xe.multiline&&(Ee+="m"),xe.unicode&&(Ee+="u"),new RegExp($,Ee)}function h($){if($.source==="^"||$.source==="^$"||$.source==="$"||$.source==="^\\s*$")return!1;const me=$.exec("");return!!(me&&$.lastIndex===0)}function l($){return($.global?"g":"")+($.ignoreCase?"i":"")+($.multiline?"m":"")+($.unicode?"u":"")}function i($){return $.split(/\r\n|\r|\n/)}function s($){for(let me=0,xe=$.length;me<xe;me++){const Ee=$.charCodeAt(me);if(Ee!==32&&Ee!==9)return me}return-1}function u($,me=0,xe=$.length){for(let Ee=me;Ee<xe;Ee++){const Ie=$.charCodeAt(Ee);if(Ie!==32&&Ie!==9)return $.substring(me,Ee)}return $.substring(me,xe)}function o($,me=$.length-1){for(let xe=me;xe>=0;xe--){const Ee=$.charCodeAt(xe);if(Ee!==32&&Ee!==9)return xe}return-1}function a($,me){return $<me?-1:$>me?1:0}function n($,me,xe=0,Ee=$.length,Ie=0,Be=me.length){for(;xe<Ee&&Ie<Be;xe++,Ie++){let ut=$.charCodeAt(xe),et=me.charCodeAt(Ie);if(ut<et)return-1;if(ut>et)return 1}const Je=Ee-xe,ze=Be-Ie;return Je<ze?-1:Je>ze?1:0}function t($,me){return _($,me,0,$.length,0,me.length)}function _($,me,xe=0,Ee=$.length,Ie=0,Be=me.length){for(;xe<Ee&&Ie<Be;xe++,Ie++){let ut=$.charCodeAt(xe),et=me.charCodeAt(Ie);if(ut===et)continue;if(ut>=128||et>=128)return n($.toLowerCase(),me.toLowerCase(),xe,Ee,Ie,Be);p(ut)&&(ut-=32),p(et)&&(et-=32);const Ze=ut-et;if(Ze===0)continue;return Ze}const Je=Ee-xe,ze=Be-Ie;return Je<ze?-1:Je>ze?1:0}function p($){return $>=97&&$<=122}function v($){return $>=65&&$<=90}function x($,me){return $.length===me.length&&_($,me)===0}function T($,me){const xe=me.length;return me.length>$.length?!1:_($,me,0,xe)===0}function b($,me){let xe,Ee=Math.min($.length,me.length);for(xe=0;xe<Ee;xe++)if($.charCodeAt(xe)!==me.charCodeAt(xe))return xe;return Ee}function d($,me){let xe,Ee=Math.min($.length,me.length);const Ie=$.length-1,Be=me.length-1;for(xe=0;xe<Ee;xe++)if($.charCodeAt(Ie-xe)!==me.charCodeAt(Be-xe))return xe;return Ee}function g($){return 55296<=$&&$<=56319}function c($){return 56320<=$&&$<=57343}function y($,me){return($-55296<<10)+(me-56320)+65536}function r($,me,xe){const Ee=$.charCodeAt(xe);if(g(Ee)&&xe+1<me){const Ie=$.charCodeAt(xe+1);if(c(Ie))return y(Ee,Ie)}return Ee}function w($,me){const xe=$.charCodeAt(me-1);if(c(xe)&&me>1){const Ee=$.charCodeAt(me-2);if(g(Ee))return y(Ee,xe)}return xe}function D($,me){const xe=He.getInstance(),Ee=me,Ie=$.length,Be=r($,Ie,me);me+=Be>=65536?2:1;let Je=xe.getGraphemeBreakType(Be);for(;me<Ie;){const ze=r($,Ie,me),ut=xe.getGraphemeBreakType(ze);if(We(Je,ut))break;me+=ze>=65536?2:1,Je=ut}return me-Ee}function L($,me){const xe=He.getInstance(),Ee=me,Ie=w($,me);me-=Ie>=65536?2:1;let Be=xe.getGraphemeBreakType(Ie);for(;me>0;){const Je=w($,me),ze=xe.getGraphemeBreakType(Je);if(We(ze,Be))break;me-=Je>=65536?2:1,Be=ze}return Ee-me}const S=/(?:[\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 M($){return S.test($)}const H=/(?:[\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 O($){return H.test($)}const K=/^[\t\n\r\x20-\x7E]*$/;function Y($){return K.test($)}const ie=/[\u2028\u2029]/;function re($){return ie.test($)}function Te($){for(let me=0,xe=$.length;me<xe;me++)if(_e($.charCodeAt(me)))return!0;return!1}function _e($){return $=+$,$>=11904&&$<=55215||$>=63744&&$<=64255||$>=65281&&$<=65374}function we($){return $>=127462&&$<=127487||$===8986||$===8987||$===9200||$===9203||$>=9728&&$<=10175||$===11088||$===11093||$>=127744&&$<=128591||$>=128640&&$<=128764||$>=128992&&$<=129003||$>=129280&&$<=129535||$>=129648&&$<=129750}const Ce=String.fromCharCode(65279);function Re($){return!!($&&$.length>0&&$.charCodeAt(0)===65279)}function ue($,me=!1){return $?(me&&($=$.replace(/\\./g,"")),$.toLowerCase()!==$):!1}function q($){const me=90-65+1;return $=$%(2*me),$<me?String.fromCharCode(97+$):String.fromCharCode(65+$-me)}function Fe($){const me=He.getInstance();return me.getGraphemeBreakType($)}function We($,me){return $===0?me!==5&&me!==7:$===2&&me===3?!1:$===4||$===2||$===3||(me===4||me===2||me===3)?!0:$===8&&(me===8||me===9||me===11||me===12)||(($===11||$===9)&&(me===9||me===10)||(($===12||$===10)&&me===10||(me===5||me===13||(me===7||($===1||$===13&&me===14)))))?!1:!($===6&&me===6)}class He{constructor(){this._data=Ge()}static getInstance(){return He._INSTANCE||(He._INSTANCE=new He),He._INSTANCE}getGraphemeBreakType($){if($<32)return $===10?3:$===13?2:4;if($<127)return 0;const me=this._data,xe=me.length/3;let Ee=1;for(;Ee<=xe;)if($<me[3*Ee])Ee=2*Ee;else if($>me[3*Ee+1])Ee=2*Ee+1;else return me[3*Ee+2];return 0}}He._INSTANCE=null;function Ge(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function it($,me){if($===0)return 0;const xe=De($,me);if(xe!==void 0)return xe;const Ee=w(me,$);return $-=Ue(Ee),$}function De($,me){let xe=w(me,$);for($-=Ue(xe);Xe(xe)||xe===65039||xe===8419;){if($===0)return;xe=w(me,$),$-=Ue(xe)}if(!we(xe))return;if($>=0){const Ee=w(me,$);Ee===8205&&($-=Ue(Ee))}return $}function Ue($){return $>=65536?2:1}function Xe($){return 127995<=$&&$<=127999}},NQs2:function(Ke,ce,F){Ke.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"}},Nf5h:function(Ke,ce,F){"use strict";F.d(ce,"a",function(){return j}),F.d(ce,"h",function(){return s}),F.d(ce,"l",function(){return n}),F.d(ce,"e",function(){return T}),F.d(ce,"i",function(){return c}),F.d(ce,"j",function(){return ue}),F.d(ce,"c",function(){return q.a}),F.d(ce,"b",function(){return it}),F.d(ce,"g",function(){return $}),F.d(ce,"f",function(){return Ie}),F.d(ce,"k",function(){return dt}),F.d(ce,"d",function(){return he});var ee=F("q1tI"),P=F.n(ee),R=F("NQs2"),U=F.n(R),A=F("ygoZ"),I=F.n(A),W=function(z){var J=z.dataSource,Q=J===void 0?[]:J,te=z.img,be=z.imgWidth,Oe=be===void 0?346:be,Pe=z.title,tt=z.sunTitle,ct=z.bannerExtraContent;return P.a.createElement("div",{className:U.a.banner},P.a.createElement("div",{className:U.a.content},P.a.createElement("aside",null,P.a.createElement("p",null,P.a.createElement("b",null,Pe),P.a.createElement("span",null,tt)),Q.length>0&&P.a.createElement("div",{className:U.a.btns},Q.map(function(qe,gt){return P.a.createElement("div",{key:gt,onClick:qe.click},qe.name,qe.sign?P.a.createElement("img",{src:I.a,width:39}):null)})),ct),P.a.createElement("img",{style:{marginTop:33,marginRight:38},src:te,width:Oe})))},j=W,e=F("tJVT"),C=F("6nfa"),f=F.n(C),h=F("TSYQ"),l=F.n(h),i=function(z){var J=z.dataSource,Q=J===void 0?[]:J,te=z.value,be=z.onChange,Oe=z.className,Pe=z.title,tt=z.titleWidth,ct=tt===void 0?41:tt,qe=z.style,gt=qe===void 0?{}:qe,bt=z.fontColor,at=bt===void 0?"#6A7283":bt,Et=Object(ee.useState)(0),pt=Object(e.a)(Et,2),yt=pt[0],$e=pt[1],ft=Object(ee.useState)(!1),Dt=Object(e.a)(ft,2),Ct=Dt[0],nt=Dt[1],Tt=Object(ee.useRef)(null);return Object(ee.useEffect)(function(){if(Q.length!==0){var ot;(Tt==null||((ot=Tt.current)===null||ot===void 0)?void 0:ot.clientHeight)>92?$e(1):$e(0)}Q.length===0&&$e(0)},[Q]),P.a.createElement("div",{className:l()(f.a.row,Oe),style:gt},P.a.createElement("div",{style:{width:ct,marginTop:Ct?12:4},className:f.a.title},Pe),P.a.createElement("div",{className:Ct?"".concat(f.a.tagsWrap," ").concat(f.a.tagsBorderWrap):f.a.tagsWrap},P.a.createElement("div",{className:f.a.bar,style:yt>0?{height:yt===1?92:"auto",overflow:yt===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},P.a.createElement("div",{className:f.a.name,ref:Tt},Q==null?void 0:Q.map(function(ot){return P.a.createElement("span",{onClick:function(){return be(ot.id)},key:ot.id,title:ot.name,style:{color:at},className:te===ot.id?f.a.active:""},ot.name)}))),!!yt&&P.a.createElement(ee.Fragment,null,yt===1?P.a.createElement("div",{onClick:function(){var ht;$e(2),(Tt==null||((ht=Tt.current)===null||ht===void 0)?void 0:ht.clientHeight)>205?nt(!0):nt(!1)},className:f.a.action},"\u5C55\u5F00",P.a.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):P.a.createElement("div",{onClick:function(){$e(1),nt(!1)},className:f.a.action},"\u6536\u8D77",P.a.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},s=i,u=F("cz0n"),o=F.n(u),a=function(z){var J=z.dataSource,Q=J===void 0?[]:J,te=z.value,be=z.onChange,Oe=z.className;return P.a.createElement("div",{className:l()(o.a.tabs,Oe)},Q.map(function(Pe){return P.a.createElement("span",{onClick:function(){return be(Pe.id)},className:te===Pe.id?o.a.active:"",key:Pe.id},Pe.name)}))},n=a,t=F("5NDa"),_=F("5rEg"),p=F("KOXS"),v=F.n(p),x=function(z){var J,Q=z.dataSource,te=Q===void 0?[]:Q,be=z.value,Oe=z.onChange,Pe=z.className,tt=z.style,ct=tt===void 0?{}:tt,qe=z.placeholder,gt=Object(ee.useState)(""),bt=Object(e.a)(gt,2),at=bt[0],Et=bt[1],pt=Object(ee.useState)(""),yt=Object(e.a)(pt,2),$e=yt[0],ft=yt[1];Object(ee.useEffect)(function(){var nt;(nt=JSON.stringify(be))!==null&&nt!==void 0&&nt.includes("{")?(Et(be.id),ft(be.value)):ft(be)},[be]);var Dt=function(){Oe($e||null,at||"")},Ct=function(Tt){if(Tt===at)return;Et(Tt),Oe($e,Tt)};return P.a.createElement("div",{className:l()(v.a.input,Pe),style:ct},!!te.length&&P.a.createElement("div",{className:v.a.dropdown},P.a.createElement("div",{className:v.a.text},(J=te.find(function(nt){return nt.id===at}))===null||J===void 0?void 0:J.name,P.a.createElement("i",{className:"iconfont icon-zhankai4"}),P.a.createElement("b",{className:v.a.b1}),P.a.createElement("b",{className:v.a.b2})),P.a.createElement("div",{className:v.a.menu},te.map(function(nt,Tt){return P.a.createElement("div",{key:Tt,onClick:function(){return Ct(nt.id)}},nt.name)}))),P.a.createElement(_.a,{onPressEnter:Dt,value:$e,onChange:function(Tt){return ft(Tt.target.value||"")},bordered:!1,placeholder:qe}),P.a.createElement("i",{onClick:Dt,className:"iconfont icon-sousuo9 font14 pl10 current"}))},T=x,b=F("f9pc"),d=F.n(b),g=function(z){var J=z.value,Q=z.onChange,te=z.className,be=z.total,Oe=z.pageSize,Pe=z.style,tt=Pe===void 0?{}:Pe,ct=J<2,qe=J>=Math.ceil(be/Oe);return be<=Oe?P.a.createElement(P.a.Fragment,null):P.a.createElement("div",{className:l()(d.a.quickPager,te),style:tt},P.a.createElement("div",{onClick:function(){ct||Q(J-1,"prev")},className:ct?d.a.disabled:""},"\u4E0A\u4E00\u9875"),P.a.createElement("div",{onClick:function(){qe||Q(J+1,"next")},className:qe?d.a.disabled:""},"\u4E0B\u4E00\u9875"))},c=g,y=F("T2oS"),r=F("W9HT"),w=F("pC0b"),D=F("GzdX"),L=F("5Dmo"),S=F("3S7+"),M=F("Oe0F"),H=F.n(M),O=F("m3rI"),K=F("1vsH"),Y=F("JAbv"),ie=F.n(Y),re=F("Bq7L"),Te=F.n(re),_e=F("MEgm"),we=F.n(_e),Ce=F("BdwD"),Re=function(z){var J=z.className,Q=z.dataSource,te=Q===void 0?[]:Q,be=z.col,Oe=be===void 0?4:be,Pe=z.right,tt=z.bottom,ct=tt===void 0?23:tt,qe=z.precision,gt=qe===void 0?0:qe,bt=z.wrapWidth,at=bt===void 0?1200:bt,Et=z.trackEventItems,pt=z.loading,yt=Math.floor((at-(Oe-1)*Pe)/Oe);return P.a.createElement(r.a,{spinning:pt},P.a.createElement("div",{className:l()(H.a.list,J)},!!te.length&&te.map(function($e,ft){var Dt=$e.name,Ct=$e.id,nt=$e.identifier,Tt=$e.power,ot=$e.cover_image_id,ht=$e.pic;return P.a.createElement("div",{className:H.a.wrap,key:Ct,style:{width:yt,marginRight:(1+ft)%Oe===0?0:Pe+gt,marginBottom:ct}},P.a.createElement("a",{target:"_blank",href:"/shixuns/".concat(nt,"/challenges"),className:H.a.li,onClick:function(Jt){Jt.preventDefault(),Et&&Object(K.cb)([Et]),Tt&&Object(K.S)("/shixuns/".concat(nt,"/challenges"))}},P.a.createElement("div",{className:H.a.img},P.a.createElement("img",{className:H.a.cover,src:ot?"".concat(O.a.API_SERVER,"/api/attachments/").concat(ot):"".concat(O.a.IMG_SERVER,"/").concat(ht)}),$e.is_jupyter&&P.a.createElement("img",{className:H.a.sign,src:ie.a}),$e.is_jupyter_lab&&P.a.createElement("img",{className:H.a.sign,src:Te.a}),$e.is_unity_3d&&P.a.createElement("img",{className:H.a.sign,src:we.a})),P.a.createElement("div",{className:H.a.name},P.a.createElement(S.a,{title:Dt||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},P.a.createElement("span",{className:H.a.e},Dt||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),P.a.createElement("div",{className:H.a.tags},P.a.createElement(S.a,{placement:"bottom",title:"\u5173\u5361\u6570"},P.a.createElement("span",null,P.a.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr3"}),P.a.createElement("span",null,$e.challenges_count))),!!$e.myshixuns_count&&P.a.createElement(S.a,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},P.a.createElement("span",null,P.a.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),P.a.createElement("span",null,$e.myshixuns_count))),P.a.createElement(S.a,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},P.a.createElement("span",null,P.a.createElement("span",null,$e.level))),P.a.createElement("div",{className:H.a.rate},P.a.createElement(D.a,{allowHalf:!0,disabled:!0,defaultValue:$e.score_info}),P.a.createElement("span",null,"\xA0",$e.score_info?"".concat($e.score_info,"\u5206"):"5\u5206")))),!Tt&&P.a.createElement("div",{className:H.a.lockWrap},P.a.createElement("img",{src:"".concat(O.a.IMG_SERVER,"/images/educoder/icon/lockclose.svg")}),P.a.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!te.length&&P.a.createElement(Ce.a,null)))},ue=Re,q=F("LicW"),Fe=F("iL++"),We=F.n(Fe),He=F("xiVL"),Ge=function(z){var J=z.className,Q=z.dataSource,te=Q===void 0?[]:Q,be=z.col,Oe=be===void 0?4:be,Pe=z.right,tt=z.bottom,ct=tt===void 0?23:tt,qe=z.precision,gt=qe===void 0?0:qe,bt=z.wrapWidth,at=bt===void 0?1200:bt,Et=z.trackEventItems,pt=z.loading,yt=Math.floor((at-(Oe-1)*Pe)/Oe);return P.a.createElement(r.a,{spinning:pt},P.a.createElement("div",{className:l()(We.a.list,J)},!!te.length&&te.map(function($e,ft){var Dt=$e.subject_identifier,Ct=$e.id,nt=$e.identifier,Tt=$e.power,ot=$e.is_public!=0&&$e.is_public;return P.a.createElement("div",{className:We.a.wrap,key:Ct,style:{width:yt,marginRight:(1+ft)%Oe===0?0:Pe+gt,marginBottom:ct}},P.a.createElement("a",{className:We.a.li,onClick:function(Ot){Ot.preventDefault()}},P.a.createElement("div",{className:We.a.top},P.a.createElement(S.a,{title:$e.name},P.a.createElement("div",{className:We.a.name},$e.name)),P.a.createElement("img",{className:We.a.img,src:O.a.IMG_SERVER+"/images/"+$e.avatar_url}),P.a.createElement("div",{className:We.a.text},$e.creator),Dt&&P.a.createElement("div",{className:We.a.btns},P.a.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),P.a.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),ot&&P.a.createElement("div",{className:We.a.sign},"\u516C\u5F00")),P.a.createElement("div",{className:We.a.bottom},$e.visits>0&&P.a.createElement(S.a,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},P.a.createElement("span",null,P.a.createElement("i",{className:"iconfont icon-liulanyan"}),P.a.createElement("span",null,$e.visits))),$e.course_members_count>0&&P.a.createElement(S.a,{title:"\u6210\u5458",placement:"bottom"},P.a.createElement("span",null,P.a.createElement("i",{className:"iconfont icon-chengyuan"}),$e.course_members_count)),$e.tasks_count>0&&P.a.createElement(S.a,{title:"\u4F5C\u4E1A",placement:"bottom"},P.a.createElement("span",null,P.a.createElement("i",{className:"iconfont icon-zuoye"}),$e.tasks_count)),$e.is_end?P.a.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):P.a.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),P.a.createElement("div",{className:We.a.lockWrap},$e.is_accessible?P.a.createElement(P.a.Fragment,null,Dt&&P.a.createElement("div",{onClick:function(){return Object(K.S)("/paths/".concat(Dt))}},"\u8FDB\u5165\u5B9E\u8DF5\u8BFE\u7A0B"),P.a.createElement("div",{onClick:function(Ot){Et&&Object(K.cb)([Et]),Object(K.S)($e.first_category_url)}},"\u8FDB\u5165\u6559\u5B66\u8BFE\u5802")):P.a.createElement(P.a.Fragment,null,P.a.createElement("img",{src:"".concat(O.a.IMG_SERVER,"/images/educoder/icon/lockclose.svg")}),P.a.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165"))))}),!te.length&&P.a.createElement(Ce.a,null)))},it=Ge,De=F("f0W+"),Ue=F.n(De),Xe=function(z){var J=z.dataSource,Q=J===void 0?[]:J,te=z.value,be=z.onChange,Oe=z.className,Pe=z.style,tt=Pe===void 0?{}:Pe,ct=z.tabBarExtraContent;return P.a.createElement("div",{className:l()(Ue.a.tabs,Oe),style:tt},P.a.createElement("div",{className:Ue.a.tabsWrap},Q.map(function(qe,gt){return P.a.createElement("div",{onClick:function(){return be(qe.id)},className:te===qe.id?Ue.a.active:"",key:gt},qe.name)})),P.a.createElement("div",{className:Ue.a.tabBar},ct))},$=Xe,me=F("9JIy"),xe=F.n(me),Ee=function(z){var J=z.className,Q=z.style,te=Q===void 0?{}:Q,be=z.children;return P.a.createElement("div",{className:l()(xe.a.table,J),style:te},be)},Ie=Ee,Be=F("qVdP"),Je=F("jsC+"),ze=F("lUTK"),ut=F("BvKs"),et=F("8WcF"),Ze=F.n(et),Ve=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}],Le=function(z){var J,Q=z.sortValue,te=z.dropValue,be=z.className,Oe=z.onSort,Pe=z.onDrop,tt=z.dataSource,ct=tt===void 0?Ve:tt;return P.a.createElement("div",{className:l()(Ze.a.orderWrap,be)},P.a.createElement(Je.a,{overlay:P.a.createElement(ut.a,null,ct.map(function(qe,gt){return P.a.createElement(ut.a.Item,{key:gt,onClick:function(){return Pe(qe.id)}},qe.name)}))},P.a.createElement("span",{className:Ze.a.orderTextWrap},(J=ct.find(function(qe){return te===qe.id}))===null||J===void 0?void 0:J.name)),P.a.createElement("span",{className:Ze.a.orderIconWrap},P.a.createElement("span",{className:Ze.a.orderAsc},P.a.createElement("i",{className:Q==="asc"?"iconfont icon-sanjiaoxing-up font12 ".concat(Ze.a.cursorPointer," ").concat(Ze.a.active):"iconfont icon-sanjiaoxing-up font12 ".concat(Ze.a.cursorPointer),onClick:function(){return Oe(Q==="asc"?"desc":"asc")}})),P.a.createElement("span",{className:Ze.a.orderDesc},P.a.createElement("i",{className:Q==="desc"?"iconfont icon-sanjiaoxing-down font12 ".concat(Ze.a.cursorPointer," ").concat(Ze.a.active):"iconfont icon-sanjiaoxing-down font12 ".concat(Ze.a.cursorPointer),onClick:function(){return Oe(Q==="asc"?"desc":"asc")}}))))},dt=Le,Ae=F("siWv"),Ne=F.n(Ae),pe=function(z){var J=z.className,Q=z.style,te=z.children,be=z.onClick;return P.a.createElement("div",{onClick:be,className:l()(Ne.a.btn,J),style:Q},te)},he=pe},Nska:function(Ke,ce,F){Ke.exports={title:"title___18s87",radioWrap:"radioWrap___3ZobS",radio:"radio___19YEl",colorFF0000:"colorFF0000___2BuLq",pagination:"pagination___18hXH"}},Oe0F:function(Ke,ce,F){Ke.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(Ke,ce){/**
|
|
* @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 F,ee,P,R=!1,U,A;window.PR_SHOULD_USE_CONTINUATION=!0;var I,W;(function(){var j=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"],f=[C,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],h=[f,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],l=[f,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],i=[f,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],s="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",u=[f,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],o="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",a=[e,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],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"],_=[h,i,l,u,o,a,n,t],p=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,v="str",x="kwd",T="com",b="typ",d="lit",g="pun",c="pln",y="tag",r="dec",w="src",D="atn",L="atv",S="nocode",M="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function H(De){for(var Ue=0,Xe=!1,$=!1,me=0,xe=De.length;me<xe;++me){var Ee=De[me];if(Ee.ignoreCase)$=!0;else if(/[a-z]/i.test(Ee.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Xe=!0,$=!1;break}}var Ie={b:8,t:9,n:10,v:11,f:12,r:13};function Be(Ze){var Ve=Ze.charCodeAt(0);if(Ve!==92)return Ve;var Le=Ze.charAt(1);return Ve=Ie[Le],Ve||("0"<=Le&&Le<="7"?parseInt(Ze.substring(1),8):Le==="u"||Le==="x"?parseInt(Ze.substring(2),16):Ze.charCodeAt(1))}function Je(Ze){if(Ze<32)return(Ze<16?"\\x0":"\\x")+Ze.toString(16);var Ve=String.fromCharCode(Ze);return Ve==="\\"||Ve==="-"||Ve==="]"||Ve==="^"?"\\"+Ve:Ve}function ze(Ze){var Ve=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")),Le=[],dt=Ve[0]==="^",Ae=["["];dt&&Ae.push("^");for(var Ne=dt?1:0,pe=Ve.length;Ne<pe;++Ne){var he=Ve[Ne];if(/\\[bdsw]/i.test(he))Ae.push(he);else{var de=Be(he),z;Ne+2<pe&&Ve[Ne+1]==="-"?(z=Be(Ve[Ne+2]),Ne+=2):z=de,Le.push([de,z]),z<65||de>122||(z<65||de>90||Le.push([Math.max(65,de)|32,Math.min(z,90)|32]),z<97||de>122||Le.push([Math.max(97,de)&~32,Math.min(z,122)&~32]))}}Le.sort(function(be,Oe){return be[0]-Oe[0]||Oe[1]-be[1]});for(var J=[],Q=[],Ne=0;Ne<Le.length;++Ne){var te=Le[Ne];te[0]<=Q[1]+1?Q[1]=Math.max(Q[1],te[1]):J.push(Q=te)}for(var Ne=0;Ne<J.length;++Ne){var te=J[Ne];Ae.push(Je(te[0])),te[1]>te[0]&&(te[1]+1>te[0]&&Ae.push("-"),Ae.push(Je(te[1])))}return Ae.push("]"),Ae.join("")}function ut(Ze){for(var Ve=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")),Le=Ve.length,dt=[],Ae=0,Ne=0;Ae<Le;++Ae){var pe=Ve[Ae];if(pe==="(")++Ne;else if(pe.charAt(0)==="\\"){var he=+pe.substring(1);he&&(he<=Ne?dt[he]=-1:Ve[Ae]=Je(he))}}for(var Ae=1;Ae<dt.length;++Ae)dt[Ae]===-1&&(dt[Ae]=++Ue);for(var Ae=0,Ne=0;Ae<Le;++Ae){var pe=Ve[Ae];if(pe==="(")++Ne,dt[Ne]||(Ve[Ae]="(?:");else if(pe.charAt(0)==="\\"){var he=+pe.substring(1);he&&he<=Ne&&(Ve[Ae]="\\"+dt[he])}}for(var Ae=0;Ae<Le;++Ae)Ve[Ae]==="^"&&Ve[Ae+1]!=="^"&&(Ve[Ae]="");if(Ze.ignoreCase&&Xe)for(var Ae=0;Ae<Le;++Ae){var pe=Ve[Ae],de=pe.charAt(0);pe.length>=2&&de==="["?Ve[Ae]=ze(pe):de!=="\\"&&(Ve[Ae]=pe.replace(/[a-zA-Z]/g,function(Q){var te=Q.charCodeAt(0);return"["+String.fromCharCode(te&~32,te|32)+"]"}))}return Ve.join("")}for(var et=[],me=0,xe=De.length;me<xe;++me){var Ee=De[me];if(Ee.global||Ee.multiline)throw new Error(""+Ee);et.push("(?:"+ut(Ee)+")")}return new RegExp(et.join("|"),$?"gi":"g")}function O(De,Ue){var Xe=/(?:^|\s)nocode(?:\s|$)/,$=[],me=0,xe=[],Ee=0;function Ie(Be){var Je=Be.nodeType;if(Je==1){if(Xe.test(Be.className))return;for(var ze=Be.firstChild;ze;ze=ze.nextSibling)Ie(ze);var ut=Be.nodeName.toLowerCase();(ut==="br"||ut==="li")&&($[Ee]=`
|
|
`,xe[Ee<<1]=me++,xe[Ee++<<1|1]=Be)}else if(Je==3||Je==4){var et=Be.nodeValue;et.length&&(Ue?et=et.replace(/\r\n?/g,`
|
|
`):et=et.replace(/[ \t\r\n]+/g," "),$[Ee]=et,xe[Ee<<1]=me,me+=et.length,xe[Ee++<<1|1]=Be)}}return Ie(De),{sourceCode:$.join("").replace(/\n$/,""),spans:xe}}function K(De,Ue,Xe,$,me){if(!Xe)return;var xe={sourceNode:De,pre:1,langExtension:null,numberLines:null,sourceCode:Xe,spans:null,basePos:Ue,decorations:null};$(xe),me.push.apply(me,xe.decorations)}var Y=/\S/;function ie(De){for(var Ue=void 0,Xe=De.firstChild;Xe;Xe=Xe.nextSibling){var $=Xe.nodeType;Ue=$===1?Ue?De:Xe:$===3&&Y.test(Xe.nodeValue)?De:Ue}return Ue===De?void 0:Ue}function re(De,Ue){var Xe={},$;(function(){for(var Ee=De.concat(Ue),Ie=[],Be={},Je=0,ze=Ee.length;Je<ze;++Je){var ut=Ee[Je],et=ut[3];if(et)for(var Ze=et.length;--Ze>=0;)Xe[et.charAt(Ze)]=ut;var Ve=ut[1],Le=""+Ve;Be.hasOwnProperty(Le)||(Ie.push(Ve),Be[Le]=null)}Ie.push(/[\0-\uffff]/),$=H(Ie)})();var me=Ue.length,xe=function(Ee){for(var Ie=Ee.sourceCode,Be=Ee.basePos,Je=Ee.sourceNode,ze=[Be,c],ut=0,et=Ie.match($)||[],Ze={},Ve=0,Le=et.length;Ve<Le;++Ve){var dt=et[Ve],Ae=Ze[dt],Ne=void 0,pe;if(typeof Ae=="string")pe=!1;else{var he=Xe[dt.charAt(0)];if(he)Ne=dt.match(he[1]),Ae=he[0];else{for(var de=0;de<me;++de)if(he=Ue[de],Ne=dt.match(he[1]),Ne){Ae=he[0];break}Ne||(Ae=c)}pe=Ae.length>=5&&Ae.substring(0,5)==="lang-",pe&&!(Ne&&typeof Ne[1]=="string")&&(pe=!1,Ae=w),pe||(Ze[dt]=Ae)}var z=ut;if(ut+=dt.length,!pe)ze.push(Be+z,Ae);else{var J=Ne[1],Q=dt.indexOf(J),te=Q+J.length;Ne[2]&&(te=dt.length-Ne[2].length,Q=te-J.length);var be=Ae.substring(5);K(Je,Be+z,dt.substring(0,Q),xe,ze),K(Je,Be+z+Q,J,q(be,J),ze),K(Je,Be+z+te,dt.substring(te),xe,ze)}}Ee.decorations=ze};return xe}function Te(De){var Ue=[],Xe=[];De.tripleQuotedStrings?Ue.push([v,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):De.multiLineStrings?Ue.push([v,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ue.push([v,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),De.verbatimStrings&&Xe.push([v,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var $=De.hashComments;$&&(De.cStyleComments?($>1?Ue.push([T,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ue.push([T,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Xe.push([v,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ue.push([T,/^#[^\r\n]*/,null,"#"])),De.cStyleComments&&(Xe.push([T,/^\/\/[^\r\n]*/,null]),Xe.push([T,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var me=De.regexLiterals;if(me){var xe=me>1?"":`
|
|
\r`,Ee=xe?".":"[\\S\\s]",Ie="/(?=[^/*"+xe+"])(?:[^/\\x5B\\x5C"+xe+"]|\\x5C"+Ee+"|\\x5B(?:[^\\x5C\\x5D"+xe+"]|\\x5C"+Ee+")*(?:\\x5D|$))+/";Xe.push(["lang-regex",RegExp("^"+M+"("+Ie+")")])}var Be=De.types;Be&&Xe.push([b,Be]);var Je=(""+De.keywords).replace(/^ | $/g,"");Je.length&&Xe.push([x,new RegExp("^(?:"+Je.replace(/[\s,]+/g,"|")+")\\b"),null]),Ue.push([c,/^\s+/,null,` \r
|
|
\xA0`]);var ze="^.[^\\s\\w.$@'\"`/\\\\]*";return De.regexLiterals&&(ze+="(?!s*/)"),Xe.push([d,/^@[a-z_$][a-z_$@0-9]*/i,null],[b,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[c,/^[a-z_$][a-z_$@0-9]*/i,null],[d,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[c,/^\\[\s\S]?/,null],[g,new RegExp(ze),null]),re(Ue,Xe)}var _e=Te({keywords:_,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function we(De,Ue,Xe){for(var $=/(?:^|\s)nocode(?:\s|$)/,me=/\r\n?|\n/,xe=De.ownerDocument,Ee=xe.createElement("li");De.firstChild;)Ee.appendChild(De.firstChild);var Ie=[Ee];function Be(Ve){var Le=Ve.nodeType;if(Le==1&&!$.test(Ve.className))if(Ve.nodeName==="br")Je(Ve),Ve.parentNode&&Ve.parentNode.removeChild(Ve);else for(var dt=Ve.firstChild;dt;dt=dt.nextSibling)Be(dt);else if((Le==3||Le==4)&&Xe){var Ae=Ve.nodeValue,Ne=Ae.match(me);if(Ne){var pe=Ae.substring(0,Ne.index);Ve.nodeValue=pe;var he=Ae.substring(Ne.index+Ne[0].length);if(he){var de=Ve.parentNode;de.insertBefore(xe.createTextNode(he),Ve.nextSibling)}Je(Ve),pe||Ve.parentNode.removeChild(Ve)}}}function Je(Ve){for(;!Ve.nextSibling;)if(Ve=Ve.parentNode,!Ve)return;function Le(Ne,pe){var he=pe?Ne.cloneNode(!1):Ne,de=Ne.parentNode;if(de){var z=Le(de,1),J=Ne.nextSibling;z.appendChild(he);for(var Q=J;Q;Q=J)J=Q.nextSibling,z.appendChild(Q)}return he}for(var dt=Le(Ve.nextSibling,0),Ae;(Ae=dt.parentNode)&&Ae.nodeType===1;)dt=Ae;Ie.push(dt)}for(var ze=0;ze<Ie.length;++ze)Be(Ie[ze]);Ue===(Ue|0)&&Ie[0].setAttribute("value",Ue);var ut=xe.createElement("ol");ut.className="linenums";for(var et=Math.max(0,Ue-1|0)||0,ze=0,Ze=Ie.length;ze<Ze;++ze)Ee=Ie[ze],Ee.className="L"+(ze+et)%10,Ee.firstChild||Ee.appendChild(xe.createTextNode("\xA0")),ut.appendChild(Ee);De.appendChild(ut)}function Ce(De){var Ue=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Ue=Ue&&+Ue[1]<=8;var Xe=/\n/g,$=De.sourceCode,me=$.length,xe=0,Ee=De.spans,Ie=Ee.length,Be=0,Je=De.decorations,ze=Je.length,ut=0;Je[ze]=me;var et,Ze;for(Ze=et=0;Ze<ze;)Je[Ze]!==Je[Ze+2]?(Je[et++]=Je[Ze++],Je[et++]=Je[Ze++]):Ze+=2;for(ze=et,Ze=et=0;Ze<ze;){for(var Ve=Je[Ze],Le=Je[Ze+1],dt=Ze+2;dt+2<=ze&&Je[dt+1]===Le;)dt+=2;Je[et++]=Ve,Je[et++]=Le,Ze=dt}ze=Je.length=et;var Ae=De.sourceNode,Ne="";Ae&&(Ne=Ae.style.display,Ae.style.display="none");try{for(var pe=null;Be<Ie;){var he=Ee[Be],de=Ee[Be+2]||me,z=Je[ut+2]||me,dt=Math.min(de,z),J=Ee[Be+1],Q;if(J.nodeType!==1&&(Q=$.substring(xe,dt))){Ue&&(Q=Q.replace(Xe,"\r")),J.nodeValue=Q;var te=J.ownerDocument,be=te.createElement("span");be.className=Je[ut+1];var Oe=J.parentNode;Oe.replaceChild(be,J),be.appendChild(J),xe<de&&(Ee[Be+1]=J=te.createTextNode($.substring(dt,de)),Oe.insertBefore(J,be.nextSibling))}xe=dt,xe>=de&&(Be+=2),xe>=z&&(ut+=2)}}finally{Ae&&(Ae.style.display=Ne)}}var Re={};function ue(De,Ue){for(var Xe=Ue.length;--Xe>=0;){var $=Ue[Xe];Re.hasOwnProperty($)?j.console&&console.warn("cannot override language handler %s",$):Re[$]=De}}function q(De,Ue){return De&&Re.hasOwnProperty(De)||(De=/^\s*</.test(Ue)?"default-markup":"default-code"),Re[De]}ue(_e,["default-code"]),ue(re([],[[c,/^[^<?]+/],[r,/^<!\w[^>]*(?:>|$)/],[T,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[g,/^(?:<[%?]|[%?]>)/],["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"]),ue(re([[c,/^[\s]+/,null,` \r
|
|
`],[L,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[y,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[D,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[g,/^[=<>\/]+/],["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"]),ue(re([],[[L,/^[\s\S]+/]]),["uq.val"]),ue(Te({keywords:h,hashComments:!0,cStyleComments:!0,types:p}),["c","cc","cpp","cxx","cyc","m"]),ue(Te({keywords:"null,true,false"}),["json"]),ue(Te({keywords:i,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:p}),["cs"]),ue(Te({keywords:l,cStyleComments:!0}),["java"]),ue(Te({keywords:t,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ue(Te({keywords:a,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ue(Te({keywords:o,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ue(Te({keywords:n,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ue(Te({keywords:u,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ue(Te({keywords:s,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ue(re([],[[v,/^[\s\S]+/]]),["regex"]);function Fe(De){var Ue=De.langExtension;try{var Xe=O(De.sourceNode,De.pre),$=Xe.sourceCode;De.sourceCode=$,De.spans=Xe.spans,De.basePos=0,q(Ue,$)(De),Ce(De)}catch(me){j.console&&console.log(me&&me.stack||me)}}function We(De,Ue,Xe){var $=Xe||!1,me=Ue||null,xe=document.createElement("div");xe.innerHTML="<pre>"+De+"</pre>",xe=xe.firstChild,$&&we(xe,$,!0);var Ee={langExtension:me,numberLines:$,sourceNode:xe,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Fe(Ee),xe.innerHTML}function He(De,Ue){var Xe=Ue||document.body,$=Xe.ownerDocument||document;function me(he){return Xe.getElementsByTagName(he)}for(var xe=[me("pre"),me("code"),me("xmp")],Ee=[],Ie=0;Ie<xe.length;++Ie)for(var Be=0,Je=xe[Ie].length;Be<Je;++Be)Ee.push(xe[Ie][Be]);xe=null;var ze=Date;ze.now||(ze={now:function(){return+new Date}});var ut=0,et=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ze=/\bprettyprint\b/,Ve=/\bprettyprinted\b/,Le=/pre|xmp/i,dt=/^code$/i,Ae=/^(?:pre|code|xmp)$/i,Ne={};function pe(){for(var he=j.PR_SHOULD_USE_CONTINUATION?ze.now()+250:Infinity;ut<Ee.length&&ze.now()<he;ut++){for(var de=Ee[ut],z=Ne,J=de;J=J.previousSibling;){var Q=J.nodeType,te=(Q===7||Q===8)&&J.nodeValue;if(te?!/^\??prettify\b/.test(te):Q!==3||/\S/.test(J.nodeValue))break;if(te){z={},te.replace(/\b(\w+)=([\w:.%+-]+)/g,function($e,ft,Dt){z[ft]=Dt});break}}var be=de.className;if((z!==Ne||Ze.test(be))&&!Ve.test(be)){for(var Oe=!1,Pe=de.parentNode;Pe;Pe=Pe.parentNode){var tt=Pe.tagName;if(Ae.test(tt)&&Pe.className&&Ze.test(Pe.className)){Oe=!0;break}}if(!Oe){de.className+=" prettyprinted";var ct=z.lang;if(!ct){ct=be.match(et);var qe;!ct&&(qe=ie(de))&&dt.test(qe.tagName)&&(ct=qe.className.match(et)),ct&&(ct=ct[1])}var gt;if(Le.test(de.tagName))gt=1;else{var bt=de.currentStyle,at=$.defaultView,Et=bt?bt.whiteSpace:at&&at.getComputedStyle?at.getComputedStyle(de,null).getPropertyValue("white-space"):0;gt=Et&&Et.substring(0,3)==="pre"}var pt=z.linenums;(pt=pt==="true"||+pt)||(pt=be.match(/\blinenums\b(?::(\d+))?/),pt=pt?pt[1]&&pt[1].length?+pt[1]:!0:!1),pt&&we(de,pt,gt);var yt={langExtension:ct,sourceNode:de,numberLines:pt,pre:gt,sourceCode:null,basePos:null,spans:null,decorations:null};Fe(yt)}}}ut<Ee.length?j.setTimeout(pe,250):typeof De=="function"&&De()}pe()}var Ge=j.PR={createSimpleLexer:re,registerLangHandler:ue,sourceDecorator:Te,PR_ATTRIB_NAME:D,PR_ATTRIB_VALUE:L,PR_COMMENT:T,PR_DECLARATION:r,PR_KEYWORD:x,PR_LITERAL:d,PR_NOCODE:S,PR_PLAIN:c,PR_PUNCTUATION:g,PR_SOURCE:w,PR_STRING:v,PR_TAG:y,PR_TYPE:b,prettyPrintOne:R?j.prettyPrintOne=We:I=We,prettyPrint:W=R?j.prettyPrint=He:W=He},it=j.define;typeof it=="function"&&it.amd&&it("google-code-prettify",[],function(){return Ge})})()},T8No:function(Ke,ce,F){"use strict";F.d(ce,"a",function(){return W}),F.d(ce,"e",function(){return j}),F.d(ce,"c",function(){return g}),F.d(ce,"b",function(){return c}),F.d(ce,"d",function(){return y}),F.d(ce,"f",function(){return D});var ee=F("MNsG"),P=F("N0LK"),R=F("Cg/j");let U=ee.k||"";const A=new Map;A.set("false",!1),A.set("true",!0),A.set("isMac",ee.f),A.set("isLinux",ee.d),A.set("isWindows",ee.i),A.set("isWeb",ee.h),A.set("isMacNative",ee.f&&!ee.h),A.set("isEdge",U.indexOf("Edg/")>=0),A.set("isFirefox",U.indexOf("Firefox")>=0),A.set("isChrome",U.indexOf("Chrome")>=0),A.set("isSafari",U.indexOf("Safari")>=0);const I=Object.prototype.hasOwnProperty;class W{static has(S){return h.create(S)}static equals(S,M){return l.create(S,M)}static regex(S,M){return v.create(S,M)}static not(S){return o.create(S)}static and(...S){return b.create(S,null)}static or(...S){return d.create(S,null,!0)}static deserialize(S,M=!1){return S?this._deserializeOrExpression(S,M):void 0}static _deserializeOrExpression(S,M){let H=S.split("||");return d.create(H.map(O=>this._deserializeAndExpression(O,M)),null,!0)}static _deserializeAndExpression(S,M){let H=S.split("&&");return b.create(H.map(O=>this._deserializeOne(O,M)),null)}static _deserializeOne(S,M){if(S=S.trim(),S.indexOf("!=")>=0){let H=S.split("!=");return u.create(H[0].trim(),this._deserializeValue(H[1],M))}if(S.indexOf("==")>=0){let H=S.split("==");return l.create(H[0].trim(),this._deserializeValue(H[1],M))}if(S.indexOf("=~")>=0){let H=S.split("=~");return v.create(H[0].trim(),this._deserializeRegexValue(H[1],M))}if(S.indexOf(" in ")>=0){let H=S.split(" in ");return i.create(H[0].trim(),H[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(S)){const H=S.split(">=");return t.create(H[0].trim(),H[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(S)){const H=S.split(">");return n.create(H[0].trim(),H[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(S)){const H=S.split("<=");return p.create(H[0].trim(),H[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(S)){const H=S.split("<");return _.create(H[0].trim(),H[1].trim())}return/^\!\s*/.test(S)?o.create(S.substr(1).trim()):h.create(S)}static _deserializeValue(S,M){if(S=S.trim(),S==="true")return!0;if(S==="false")return!1;let H=/^'([^']*)'$/.exec(S);return H?H[1].trim():S}static _deserializeRegexValue(S,M){if(Object(P.C)(S)){if(M)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let H=S.indexOf("/"),O=S.lastIndexOf("/");if(H===O||H<0){if(M)throw new Error(`bad regexp-value '${S}', missing /-enclosure`);return console.warn(`bad regexp-value '${S}', missing /-enclosure`),null}let K=S.slice(H+1,O),Y=S[O+1]==="i"?"i":"";try{return new RegExp(K,Y)}catch(ie){if(M)throw new Error(`bad regexp-value '${S}', parse error: ${ie}`);return console.warn(`bad regexp-value '${S}', parse error: ${ie}`),null}}}function j(S,M){const H=S?S.substituteConstants():void 0,O=M?M.substituteConstants():void 0;return!H&&!O?!0:!H||!O?!1:H.equals(O)}function e(S,M){return S.cmp(M)}class C{constructor(){this.type=0}cmp(S){return this.type-S.type}equals(S){return S.type===this.type}substituteConstants(){return this}evaluate(S){return!1}serialize(){return"false"}keys(){return[]}negate(){return f.INSTANCE}}C.INSTANCE=new C;class f{constructor(){this.type=1}cmp(S){return this.type-S.type}equals(S){return S.type===this.type}substituteConstants(){return this}evaluate(S){return!0}serialize(){return"true"}keys(){return[]}negate(){return C.INSTANCE}}f.INSTANCE=new f;class h{constructor(S,M){this.key=S,this.negated=M,this.type=2}static create(S,M=null){const H=A.get(S);return typeof H=="boolean"?H?f.INSTANCE:C.INSTANCE:new h(S,M)}cmp(S){return S.type!==this.type?this.type-S.type:r(this.key,S.key)}equals(S){return S.type===this.type?this.key===S.key:!1}substituteConstants(){const S=A.get(this.key);return typeof S=="boolean"?S?f.INSTANCE:C.INSTANCE:this}evaluate(S){return!!S.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=o.create(this.key,this)),this.negated}}class l{constructor(S,M,H){this.key=S,this.value=M,this.negated=H,this.type=4}static create(S,M,H=null){if(typeof M=="boolean")return M?h.create(S,H):o.create(S,H);const O=A.get(S);if(typeof O=="boolean"){const K=O?"true":"false";return M===K?f.INSTANCE:C.INSTANCE}return new l(S,M,H)}cmp(S){return S.type!==this.type?this.type-S.type:w(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){const S=A.get(this.key);if(typeof S=="boolean"){const M=S?"true":"false";return this.value===M?f.INSTANCE:C.INSTANCE}return this}evaluate(S){return S.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=u.create(this.key,this.value,this)),this.negated}}class i{constructor(S,M){this.key=S,this.valueKey=M,this.type=10,this.negated=null}static create(S,M){return new i(S,M)}cmp(S){return S.type!==this.type?this.type-S.type:w(this.key,this.valueKey,S.key,S.valueKey)}equals(S){return S.type===this.type?this.key===S.key&&this.valueKey===S.valueKey:!1}substituteConstants(){return this}evaluate(S){const M=S.getValue(this.valueKey),H=S.getValue(this.key);return Array.isArray(M)?M.indexOf(H)>=0:typeof H=="string"&&typeof M=="object"&&M!==null?I.call(M,H):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=s.create(this)),this.negated}}class s{constructor(S){this._actual=S,this.type=11}static create(S){return new s(S)}cmp(S){return S.type!==this.type?this.type-S.type:this._actual.cmp(S._actual)}equals(S){return S.type===this.type?this._actual.equals(S._actual):!1}substituteConstants(){return this}evaluate(S){return!this._actual.evaluate(S)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class u{constructor(S,M,H){this.key=S,this.value=M,this.negated=H,this.type=5}static create(S,M,H=null){if(typeof M=="boolean")return M?o.create(S,H):h.create(S,H);const O=A.get(S);if(typeof O=="boolean"){const K=O?"true":"false";return M===K?C.INSTANCE:f.INSTANCE}return new u(S,M,H)}cmp(S){return S.type!==this.type?this.type-S.type:w(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){const S=A.get(this.key);if(typeof S=="boolean"){const M=S?"true":"false";return this.value===M?C.INSTANCE:f.INSTANCE}return this}evaluate(S){return S.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=l.create(this.key,this.value,this)),this.negated}}class o{constructor(S,M){this.key=S,this.negated=M,this.type=3}static create(S,M=null){const H=A.get(S);return typeof H=="boolean"?H?C.INSTANCE:f.INSTANCE:new o(S,M)}cmp(S){return S.type!==this.type?this.type-S.type:r(this.key,S.key)}equals(S){return S.type===this.type?this.key===S.key:!1}substituteConstants(){const S=A.get(this.key);return typeof S=="boolean"?S?C.INSTANCE:f.INSTANCE:this}evaluate(S){return!S.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=h.create(this.key,this)),this.negated}}function a(S,M){if(typeof S=="string"){const H=parseFloat(S);isNaN(H)||(S=H)}return typeof S=="string"||typeof S=="number"?M(S):C.INSTANCE}class n{constructor(S,M,H){this.key=S,this.value=M,this.negated=H,this.type=12}static create(S,M,H=null){return a(M,O=>new n(S,O,H))}cmp(S){return S.type!==this.type?this.type-S.type:w(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){return this}evaluate(S){return typeof this.value=="string"?!1:parseFloat(S.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=p.create(this.key,this.value,this)),this.negated}}class t{constructor(S,M,H){this.key=S,this.value=M,this.negated=H,this.type=13}static create(S,M,H=null){return a(M,O=>new t(S,O,H))}cmp(S){return S.type!==this.type?this.type-S.type:w(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){return this}evaluate(S){return typeof this.value=="string"?!1:parseFloat(S.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=_.create(this.key,this.value,this)),this.negated}}class _{constructor(S,M,H){this.key=S,this.value=M,this.negated=H,this.type=14}static create(S,M,H=null){return a(M,O=>new _(S,O,H))}cmp(S){return S.type!==this.type?this.type-S.type:w(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){return this}evaluate(S){return typeof this.value=="string"?!1:parseFloat(S.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 p{constructor(S,M,H){this.key=S,this.value=M,this.negated=H,this.type=15}static create(S,M,H=null){return a(M,O=>new p(S,O,H))}cmp(S){return S.type!==this.type?this.type-S.type:w(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){return this}evaluate(S){return typeof this.value=="string"?!1:parseFloat(S.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 v{constructor(S,M){this.key=S,this.regexp=M,this.type=7,this.negated=null}static create(S,M){return new v(S,M)}cmp(S){if(S.type!==this.type)return this.type-S.type;if(this.key<S.key)return-1;if(this.key>S.key)return 1;const M=this.regexp?this.regexp.source:"",H=S.regexp?S.regexp.source:"";return M<H?-1:M>H?1:0}equals(S){if(S.type===this.type){const M=this.regexp?this.regexp.source:"",H=S.regexp?S.regexp.source:"";return this.key===S.key&&M===H}return!1}substituteConstants(){return this}evaluate(S){let M=S.getValue(this.key);return this.regexp?this.regexp.test(M):!1}serialize(){const S=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${S}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=x.create(this)),this.negated}}class x{constructor(S){this._actual=S,this.type=8}static create(S){return new x(S)}cmp(S){return S.type!==this.type?this.type-S.type:this._actual.cmp(S._actual)}equals(S){return S.type===this.type?this._actual.equals(S._actual):!1}substituteConstants(){return this}evaluate(S){return!this._actual.evaluate(S)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function T(S){let M=null;for(let H=0,O=S.length;H<O;H++){const K=S[H].substituteConstants();if(S[H]!==K&&M===null){M=[];for(let Y=0;Y<H;Y++)M[Y]=S[Y]}M!==null&&(M[H]=K)}return M===null?S:M}class b{constructor(S,M){this.expr=S,this.negated=M,this.type=6}static create(S,M){return b._normalizeArr(S,M)}cmp(S){if(S.type!==this.type)return this.type-S.type;if(this.expr.length<S.expr.length)return-1;if(this.expr.length>S.expr.length)return 1;for(let M=0,H=this.expr.length;M<H;M++){const O=e(this.expr[M],S.expr[M]);if(O!==0)return O}return 0}equals(S){if(S.type===this.type){if(this.expr.length!==S.expr.length)return!1;for(let M=0,H=this.expr.length;M<H;M++)if(!this.expr[M].equals(S.expr[M]))return!1;return!0}return!1}substituteConstants(){const S=T(this.expr);return S===this.expr?this:b.create(S,this.negated)}evaluate(S){for(let M=0,H=this.expr.length;M<H;M++)if(!this.expr[M].evaluate(S))return!1;return!0}static _normalizeArr(S,M){const H=[];let O=!1;for(const K of S){if(!K)continue;if(K.type===1){O=!0;continue}if(K.type===0)return C.INSTANCE;if(K.type===6){H.push(...K.expr);continue}H.push(K)}if(H.length===0&&O)return f.INSTANCE;if(H.length===0)return;if(H.length===1)return H[0];H.sort(e);for(let K=1;K<H.length;K++)H[K-1].equals(H[K])&&(H.splice(K,1),K--);if(H.length===1)return H[0];for(;H.length>1;){const K=H[H.length-1];if(K.type!==9)break;H.pop();const Y=H.pop(),ie=H.length===0,re=d.create(K.expr.map(Te=>b.create([Te,Y],null)),null,ie);re&&(H.push(re),H.sort(e))}return H.length===1?H[0]:new b(H,M)}serialize(){return this.expr.map(S=>S.serialize()).join(" && ")}keys(){const S=[];for(let M of this.expr)S.push(...M.keys());return S}negate(){if(!this.negated){const S=[];for(let M of this.expr)S.push(M.negate());this.negated=d.create(S,this,!0)}return this.negated}}class d{constructor(S,M){this.expr=S,this.negated=M,this.type=9}static create(S,M,H){return d._normalizeArr(S,M,H)}cmp(S){if(S.type!==this.type)return this.type-S.type;if(this.expr.length<S.expr.length)return-1;if(this.expr.length>S.expr.length)return 1;for(let M=0,H=this.expr.length;M<H;M++){const O=e(this.expr[M],S.expr[M]);if(O!==0)return O}return 0}equals(S){if(S.type===this.type){if(this.expr.length!==S.expr.length)return!1;for(let M=0,H=this.expr.length;M<H;M++)if(!this.expr[M].equals(S.expr[M]))return!1;return!0}return!1}substituteConstants(){const S=T(this.expr);return S===this.expr?this:d.create(S,this.negated,!1)}evaluate(S){for(let M=0,H=this.expr.length;M<H;M++)if(this.expr[M].evaluate(S))return!0;return!1}static _normalizeArr(S,M,H){let O=[],K=!1;if(S){for(let Y=0,ie=S.length;Y<ie;Y++){const re=S[Y];if(!re)continue;if(re.type===0){K=!0;continue}if(re.type===1)return f.INSTANCE;if(re.type===9){O=O.concat(re.expr);continue}O.push(re)}if(O.length===0&&K)return C.INSTANCE;O.sort(e)}if(O.length===0)return;if(O.length===1)return O[0];for(let Y=1;Y<O.length;Y++)O[Y-1].equals(O[Y])&&(O.splice(Y,1),Y--);if(O.length===1)return O[0];if(H){for(let Y=0;Y<O.length;Y++)for(let ie=Y+1;ie<O.length;ie++)D(O[Y],O[ie])&&(O.splice(ie,1),ie--);if(O.length===1)return O[0]}return new d(O,M)}serialize(){return this.expr.map(S=>S.serialize()).join(" || ")}keys(){const S=[];for(let M of this.expr)S.push(...M.keys());return S}negate(){if(!this.negated){let S=[];for(let M of this.expr)S.push(M.negate());for(;S.length>1;){const M=S.shift(),H=S.shift(),O=[];for(const Y of L(M))for(const ie of L(H))O.push(b.create([Y,ie],null));const K=S.length===0;S.unshift(d.create(O,null,K))}this.negated=S[0]}return this.negated}}class g extends h{constructor(S,M,H){super(S,null);this._defaultValue=M,typeof H=="object"?g._info.push(Object.assign(Object.assign({},H),{key:S})):H!==!0&&g._info.push({key:S,description:H,type:M!=null?typeof M:void 0})}static all(){return g._info.values()}bindTo(S){return S.createKey(this.key,this._defaultValue)}getValue(S){return S.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(S){return l.create(this.key,S)}}g._info=[];const c=Object(R.c)("contextKeyService"),y="setContext";function r(S,M){return S<M?-1:S>M?1:0}function w(S,M,H,O){return S<H?-1:S>H?1:M<O?-1:M>O?1:0}function D(S,M){if(M.type===6&&S.type!==9&&S.type!==6){for(const K of M.expr)if(S.equals(K))return!0}const H=S.negate(),O=L(H).concat(L(M));O.sort(e);for(let K=0;K<O.length;K++){const Y=O[K],ie=Y.negate();for(let re=K+1;re<O.length;re++){const Te=O[re];if(ie.equals(Te))return!0}}return!1}function L(S){return S.type===9?S.expr:[S]}},TH5o:function(Ke,ce,F){Ke.exports={flex_box_center:"flex_box_center___3GqS0",flex_space_between:"flex_space_between___J0TSL",flex_box_vertical_center:"flex_box_vertical_center___1hGQt",flex_box_center_end:"flex_box_center_end___2BGk7",flex_box_column:"flex_box_column___X8bTp",wrap:"wrap___3FzyO",modal:"modal___ehJY-",titleWrap:"titleWrap___1KDOt",required:"required___2aR13",title:"title___2VI2o",colorGray:"colorGray___2cNP7",choiceWrap:"choiceWrap___1LG0q",answer:"answer___1uaMH",activeAnswer:"activeAnswer___3ga3N",deleteIcon:"deleteIcon___2cI8z",addIcon:"addIcon___1ADAc",editorWrap:"editorWrap___2t-bW",htmlWrap:"htmlWrap___NOSJQ",radio:"radio___3oQjn",color333:"color333___1pQl0",color999:"color999___2XYCx",questionType:"questionType___2RPnW",questionChoices:"questionChoices___1tt_F"}},TXwP:function(Ke,ce,F){var ee,P;(function(){var R;(function(){"use strict";var A=[,,function(e){function C(l){this.__parent=l,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 l=new C(this.__parent);return l.set_indent(this.__indent_count,this.__alignment_count),l},C.prototype.item=function(l){return l<0?this.__items[this.__items.length+l]:this.__items[l]},C.prototype.has_match=function(l){for(var i=this.__items.length-1;i>=0;i--)if(this.__items[i].match(l))return!0;return!1},C.prototype.set_indent=function(l,i){this.is_empty()&&(this.__indent_count=l||0,this.__alignment_count=i||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 l=this.__parent.current_line;return l.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),l.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),l.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,l.__items[0]===" "&&(l.__items.splice(0,1),l.__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(l){this.__items.push(l);var i=l.lastIndexOf(`
|
|
`);i!==-1?this.__character_count=l.length-i:this.__character_count+=l.length},C.prototype.pop=function(){var l=null;return this.is_empty()||(l=this.__items.pop(),this.__character_count-=l.length),l},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 l="";return this.is_empty()?this.__parent.indent_empty_lines&&(l=this.__parent.get_indent_string(this.__indent_count)):(l=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),l+=this.__items.join("")),l};function f(l,i){this.__cache=[""],this.__indent_size=l.indent_size,this.__indent_string=l.indent_char,l.indent_with_tabs||(this.__indent_string=new Array(l.indent_size+1).join(l.indent_char)),i=i||"",l.indent_level>0&&(i=new Array(l.indent_level+1).join(this.__indent_string)),this.__base_string=i,this.__base_string_length=i.length}f.prototype.get_indent_size=function(l,i){var s=this.__base_string_length;return i=i||0,l<0&&(s=0),s+=l*this.__indent_size,s+=i,s},f.prototype.get_indent_string=function(l,i){var s=this.__base_string;return i=i||0,l<0&&(l=0,s=""),i+=l*this.__indent_size,this.__ensure_cache(i),s+=this.__cache[i],s},f.prototype.__ensure_cache=function(l){for(;l>=this.__cache.length;)this.__add_column()},f.prototype.__add_column=function(){var l=this.__cache.length,i=0,s="";this.__indent_size&&l>=this.__indent_size&&(i=Math.floor(l/this.__indent_size),l-=i*this.__indent_size,s=new Array(i+1).join(this.__indent_string)),l&&(s+=new Array(l+1).join(" ")),this.__cache.push(s)};function h(l,i){this.__indent_cache=new f(l,i),this.raw=!1,this._end_with_newline=l.end_with_newline,this.indent_size=l.indent_size,this.wrap_line_length=l.wrap_line_length,this.indent_empty_lines=l.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()}h.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},h.prototype.get_line_number=function(){return this.__lines.length},h.prototype.get_indent_string=function(l,i){return this.__indent_cache.get_indent_string(l,i)},h.prototype.get_indent_size=function(l,i){return this.__indent_cache.get_indent_size(l,i)},h.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},h.prototype.add_new_line=function(l){return this.is_empty()||!l&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},h.prototype.get_code=function(l){this.trim(!0);var i=this.current_line.pop();i&&(i[i.length-1]===`
|
|
`&&(i=i.replace(/\n+$/g,"")),this.current_line.push(i)),this._end_with_newline&&this.__add_outputline();var s=this.__lines.join(`
|
|
`);return l!==`
|
|
`&&(s=s.replace(/[\n]/g,l)),s},h.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},h.prototype.set_indent=function(l,i){return l=l||0,i=i||0,this.next_line.set_indent(l,i),this.__lines.length>1?(this.current_line.set_indent(l,i),!0):(this.current_line.set_indent(),!1)},h.prototype.add_raw_token=function(l){for(var i=0;i<l.newlines;i++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(l.whitespace_before),this.current_line.push(l.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},h.prototype.add_token=function(l){this.__add_space_before_token(),this.current_line.push(l),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},h.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(" "))},h.prototype.remove_indent=function(l){for(var i=this.__lines.length;l<i;)this.__lines[l]._remove_indent(),l++;this.current_line._remove_wrap_indent()},h.prototype.trim=function(l){for(l=l===void 0?!1:l,this.current_line.trim();l&&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},h.prototype.just_added_newline=function(){return this.current_line.is_empty()},h.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},h.prototype.ensure_empty_line_above=function(l,i){for(var s=this.__lines.length-2;s>=0;){var u=this.__lines[s];if(u.is_empty())break;if(u.item(0).indexOf(l)!==0&&u.item(-1)!==i){this.__lines.splice(s+1,0,new C(this)),this.previous_line=this.__lines[this.__lines.length-2];break}s--}},e.exports.Output=h},,,,function(e){function C(l,i){this.raw_options=f(l,i),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(l,i){var s=this.raw_options[l],u=i||[];return typeof s=="object"?s!==null&&typeof s.concat=="function"&&(u=s.concat()):typeof s=="string"&&(u=s.split(/[^a-zA-Z0-9_\/\-]+/)),u},C.prototype._get_boolean=function(l,i){var s=this.raw_options[l],u=s===void 0?!!i:!!s;return u},C.prototype._get_characters=function(l,i){var s=this.raw_options[l],u=i||"";return typeof s=="string"&&(u=s.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),u},C.prototype._get_number=function(l,i){var s=this.raw_options[l];i=parseInt(i,10),isNaN(i)&&(i=0);var u=parseInt(s,10);return isNaN(u)&&(u=i),u},C.prototype._get_selection=function(l,i,s){var u=this._get_selection_list(l,i,s);if(u.length!==1)throw new Error("Invalid Option Value: The option '"+l+`' can only be one of the following values:
|
|
`+i+`
|
|
You passed in: '`+this.raw_options[l]+"'");return u[0]},C.prototype._get_selection_list=function(l,i,s){if(!i||i.length===0)throw new Error("Selection list cannot be empty.");if(s=s||[i[0]],!this._is_valid_selection(s,i))throw new Error("Invalid Default Value!");var u=this._get_array(l,s);if(!this._is_valid_selection(u,i))throw new Error("Invalid Option Value: The option '"+l+`' can contain only the following values:
|
|
`+i+`
|
|
You passed in: '`+this.raw_options[l]+"'");return u},C.prototype._is_valid_selection=function(l,i){return l.length&&i.length&&!l.some(function(s){return i.indexOf(s)===-1})};function f(l,i){var s={};l=h(l);var u;for(u in l)u!==i&&(s[u]=l[u]);if(i&&l[i])for(u in l[i])s[u]=l[i][u];return s}function h(l){var i={},s;for(s in l){var u=s.replace(/-/g,"_");i[u]=l[s]}return i}e.exports.Options=C,e.exports.normalizeOpts=h,e.exports.mergeOpts=f},,function(e){var C=RegExp.prototype.hasOwnProperty("sticky");function f(h){this.__input=h||"",this.__input_length=this.__input.length,this.__position=0}f.prototype.restart=function(){this.__position=0},f.prototype.back=function(){this.__position>0&&(this.__position-=1)},f.prototype.hasNext=function(){return this.__position<this.__input_length},f.prototype.next=function(){var h=null;return this.hasNext()&&(h=this.__input.charAt(this.__position),this.__position+=1),h},f.prototype.peek=function(h){var l=null;return h=h||0,h+=this.__position,h>=0&&h<this.__input_length&&(l=this.__input.charAt(h)),l},f.prototype.__match=function(h,l){h.lastIndex=l;var i=h.exec(this.__input);return i&&!(C&&h.sticky)&&(i.index!==l&&(i=null)),i},f.prototype.test=function(h,l){return l=l||0,l+=this.__position,l>=0&&l<this.__input_length?!!this.__match(h,l):!1},f.prototype.testChar=function(h,l){var i=this.peek(l);return h.lastIndex=0,i!==null&&h.test(i)},f.prototype.match=function(h){var l=this.__match(h,this.__position);return l?this.__position+=l[0].length:l=null,l},f.prototype.read=function(h,l,i){var s="",u;return h&&(u=this.match(h),u&&(s+=u[0])),l&&(u||!h)&&(s+=this.readUntil(l,i)),s},f.prototype.readUntil=function(h,l){var i="",s=this.__position;h.lastIndex=this.__position;var u=h.exec(this.__input);return u?(s=u.index,l&&(s+=u[0].length)):s=this.__input_length,i=this.__input.substring(this.__position,s),this.__position=s,i},f.prototype.readUntilAfter=function(h){return this.readUntil(h,!0)},f.prototype.get_regexp=function(h,l){var i=null,s="g";return l&&C&&(s="y"),typeof h=="string"&&h!==""?i=new RegExp(h,s):h&&(i=new RegExp(h.source,s)),i},f.prototype.get_literal_regexp=function(h){return RegExp(h.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},f.prototype.peekUntilAfter=function(h){var l=this.__position,i=this.readUntilAfter(h);return this.__position=l,i},f.prototype.lookBack=function(h){var l=this.__position-1;return l>=h.length&&this.__input.substring(l-h.length,l).toLowerCase()===h},e.exports.InputScanner=f},,,,,function(e){function C(f,h){f=typeof f=="string"?f:f.source,h=typeof h=="string"?h:h.source,this.__directives_block_pattern=new RegExp(f+/ beautify( \w+[:]\w+)+ /.source+h,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(f+/\sbeautify\signore:end\s/.source+h,"g")}C.prototype.get_directives=function(f){if(!f.match(this.__directives_block_pattern))return null;var h={};this.__directive_pattern.lastIndex=0;for(var l=this.__directive_pattern.exec(f);l;)h[l[1]]=l[2],l=this.__directive_pattern.exec(f);return h},C.prototype.readIgnored=function(f){return f.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=C},,function(e,C,f){var h=f(16).Beautifier,l=f(17).Options;function i(s,u){var o=new h(s,u);return o.beautify()}e.exports=i,e.exports.defaultOptions=function(){return new l}},function(e,C,f){var h=f(17).Options,l=f(2).Output,i=f(8).InputScanner,s=f(13).Directives,u=new s(/\/\*/,/\*\//),o=/\r\n|[\r\n]/,a=/\r\n|[\r\n]/g,n=/\s/,t=/(?:\s|\n)+/g,_=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,p=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function v(x,T){this._source_text=x||"",this._options=new h(T),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"]}v.prototype.eatString=function(x){var T="";for(this._ch=this._input.next();this._ch;){if(T+=this._ch,this._ch==="\\")T+=this._input.next();else if(x.indexOf(this._ch)!==-1||this._ch===`
|
|
`)break;this._ch=this._input.next()}return T},v.prototype.eatWhitespace=function(x){for(var T=n.test(this._input.peek()),b=0;n.test(this._input.peek());)this._ch=this._input.next(),x&&this._ch===`
|
|
`&&((b===0||b<this._options.max_preserve_newlines)&&(b++,this._output.add_new_line(!0)));return T},v.prototype.foundNestedPseudoClass=function(){for(var x=0,T=1,b=this._input.peek(T);b;){if(b==="{")return!0;if(b==="(")x+=1;else if(b===")"){if(x===0)return!1;x-=1}else if(b===";"||b==="}")return!1;T++,b=this._input.peek(T)}return!1},v.prototype.print_string=function(x){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(x)},v.prototype.preserveSingleSpace=function(x){x&&(this._output.space_before_token=!0)},v.prototype.indent=function(){this._indentLevel++},v.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},v.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var x=this._source_text,T=this._options.eol;T==="auto"&&(T=`
|
|
`,x&&o.test(x||"")&&(T=x.match(o)[0])),x=x.replace(a,`
|
|
`);var b=x.match(/^[\t ]*/)[0];this._output=new l(this._options,b),this._input=new i(x),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var d=0,g=!1,c=!1,y=!1,r=!1,w=!1,D=!1,L=this._ch,S=!1,M,H,O;M=this._input.read(t),H=M!=="",O=L,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),L=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var K=this._input.read(_),Y=u.get_directives(K);Y&&Y.ignore==="start"&&(K+=u.readIgnored(this._input)),this.print_string(K),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(p)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(H),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var ie=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ie.match(/[ :]$/)&&(ie=this.eatString(": ").replace(/\s$/,""),this.print_string(ie),this._output.space_before_token=!0),ie=ie.replace(/\s$/,""),ie==="extend"?r=!0:ie==="import"&&(w=!0),ie in this.NESTED_AT_RULE?(this._nestedLevel+=1,ie in this.CONDITIONAL_GROUP_RULE&&(y=!0)):!g&&d===0&&ie.indexOf(":")!==-1&&(c=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(H),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")c&&(c=!1,this.outdent()),y?(y=!1,g=this._indentLevel>=this._nestedLevel):g=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&g&&(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)):(O==="("?this._output.space_before_token=!1:O!==","&&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(),O==="{"&&this._output.trim(!0),w=!1,r=!1,c&&(this.outdent(),c=!1),this.print_string(this._ch),g=!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])){S=!0;break}(g||y)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!r&&d===0?(this.print_string(":"),c||(c=!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 Te=O==='"'||O==="'";this.preserveSingleSpace(Te||H),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")S=!1,d===0?(c&&(this.outdent(),c=!1),r=!1,w=!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(),d++,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(")")),d&&(d--,this.outdent()));else{var _e=!1;this._input.lookBack("with")&&(_e=!0),this.preserveSingleSpace(H||_e),this.print_string(this._ch),c&&O==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),D=!0):(this.eatWhitespace(),d++,this.indent())}else if(this._ch===")")d&&(d--,this.outdent()),D&&this._input.peek()===";"&&this._options.selector_separator_newline&&(D=!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&&(!c||D)&&d===0&&!w&&!r?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!c&&d===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(H),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 we=O==='"'||O==="'";this.preserveSingleSpace(we||H),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
`&&S&&this._output.add_new_line()}var Ce=this._output.get_code(T);return Ce},e.exports.Beautifier=v},function(e,C,f){var h=f(6).Options;function l(i){h.call(this,i,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var s=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||s;var u=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var o=0;o<u.length;o++)u[o]!=="expand"?this.brace_style="collapse":this.brace_style=u[o]}l.prototype=new h,e.exports.Options=l}],I={};function W(e){var C=I[e];if(C!==void 0)return C.exports;var f=I[e]={exports:{}};return A[e](f,f.exports,W),f.exports}var j=W(15);R=j})();var U=R;!(ee=[],P=function(){return{css_beautify:U}}.apply(ce,ee),P!==void 0&&(Ke.exports=P))})()},Vhoy:function(Ke,ce,F){"use strict";F.d(ce,"d",function(){return U}),F.d(ce,"e",function(){return A}),F.d(ce,"c",function(){return I}),F.d(ce,"b",function(){return W}),F.d(ce,"a",function(){return j});var ee=F("MI8n");class P{constructor(){this._icons=new Map,this._onDidRegister=new ee.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 R=new P,U=R;function A(e,C){return new W(e,C)}function I(e){return e?e.replace(/\$\((.*?)\)/g,(C,f)=>` ${f} `).trim():""}class W{constructor(e,C,f){this.id=e,this.definition=C,this.description=f,R.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var j;(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 f(i){if(i instanceof W)return["codicon","codicon-"+i.id];const s=C.exec(i.id);if(!s)return f(W.error);let[,u,o]=s;const a=["codicon","codicon-"+u];return o&&a.push("codicon-modifier-"+o.substr(1)),a}e.asClassNameArray=f;function h(i){return f(i).join(" ")}e.asClassName=h;function l(i){return"."+f(i).join(".")}e.asCSSSelector=l})(j||(j={})),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"})}(W||(W={}))},Y1PL:function(Ke,ce,F){"use strict";F.r(ce),F.d(ce,"ResizableTextArea",function(){return ie});var ee=F("wx14"),P=F("1OyB"),R=F("vuIU"),U=F("Ji7U"),A=F("LK+K"),I=F("q1tI"),W=F("VTBJ"),j=F("rePB"),e=F("Zm9Q"),C=F("Kwbf"),f=F("c+Xe"),h=F("m+aA"),l=F("bdgK"),i=new Map;function s(_e){_e.forEach(function(we){var Ce,Re=we.target;(Ce=i.get(Re))===null||Ce===void 0||Ce.forEach(function(ue){return ue(Re)})})}var u=new l.default(s),o=null,a=null;function n(_e,we){i.has(_e)||(i.set(_e,new Set),u.observe(_e)),i.get(_e).add(we)}function t(_e,we){i.has(_e)&&(i.get(_e).delete(we),i.get(_e).size||(u.unobserve(_e),i.delete(_e)))}var _=function(_e){Object(U.a)(Ce,_e);var we=Object(A.a)(Ce);function Ce(){return Object(P.a)(this,Ce),we.apply(this,arguments)}return Object(R.a)(Ce,[{key:"render",value:function(){return this.props.children}}]),Ce}(I.Component),p=I.createContext(null);function v(_e){var we=_e.children,Ce=_e.onBatchResize,Re=I.useRef(0),ue=I.useRef([]),q=I.useContext(p),Fe=I.useCallback(function(We,He,Ge){Re.current+=1;var it=Re.current;ue.current.push({size:We,element:He,data:Ge}),Promise.resolve().then(function(){it===Re.current&&(Ce==null||Ce(ue.current),ue.current=[])}),q==null||q(We,He,Ge)},[Ce,q]);return I.createElement(p.Provider,{value:Fe},we)}function x(_e){var we=_e.children,Ce=_e.disabled,Re=I.useRef(null),ue=I.useRef(null),q=I.useContext(p),Fe=I.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),We=I.isValidElement(we)&&Object(f.c)(we),He=We?we.ref:null,Ge=I.useMemo(function(){return Object(f.a)(He,Re)},[He,Re]),it=I.useRef(_e);it.current=_e;var De=I.useCallback(function(Ue){var Xe=it.current,$=Xe.onResize,me=Xe.data,xe=Ue.getBoundingClientRect(),Ee=xe.width,Ie=xe.height,Be=Ue.offsetWidth,Je=Ue.offsetHeight,ze=Math.floor(Ee),ut=Math.floor(Ie);if(Fe.current.width!==ze||Fe.current.height!==ut||Fe.current.offsetWidth!==Be||Fe.current.offsetHeight!==Je){var et={width:ze,height:ut,offsetWidth:Be,offsetHeight:Je};Fe.current=et;var Ze=Be===Math.round(Ee)?Ee:Be,Ve=Je===Math.round(Ie)?Ie:Je,Le=Object(W.a)(Object(W.a)({},et),{},{offsetWidth:Ze,offsetHeight:Ve});q==null||q(Le,Ue,me),$&&Promise.resolve().then(function(){$(Le,Ue)})}},[]);return I.useEffect(function(){var Ue=Object(h.a)(Re.current)||Object(h.a)(ue.current);return Ue&&!Ce&&n(Ue,De),function(){return t(Ue,De)}},[Re.current,Ce]),I.createElement(_,{ref:ue},We?I.cloneElement(we,{ref:Ge}):we)}var T="rc-observer-key";function b(_e){var we=_e.children,Ce=Object(e.a)(we);return Ce.map(function(Re,ue){var q=(Re==null?void 0:Re.key)||"".concat(T,"-").concat(ue);return I.createElement(x,Object(ee.a)({},_e,{key:q}),Re)})}b.Collection=v;var d=b,g=F("bT9E"),c=F("TSYQ"),y=F.n(c),r=`
|
|
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
|
|
`,w=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],D={},L;function S(_e){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ce=_e.getAttribute("id")||_e.getAttribute("data-reactid")||_e.getAttribute("name");if(we&&D[Ce])return D[Ce];var Re=window.getComputedStyle(_e),ue=Re.getPropertyValue("box-sizing")||Re.getPropertyValue("-moz-box-sizing")||Re.getPropertyValue("-webkit-box-sizing"),q=parseFloat(Re.getPropertyValue("padding-bottom"))+parseFloat(Re.getPropertyValue("padding-top")),Fe=parseFloat(Re.getPropertyValue("border-bottom-width"))+parseFloat(Re.getPropertyValue("border-top-width")),We=w.map(function(Ge){return"".concat(Ge,":").concat(Re.getPropertyValue(Ge))}).join(";"),He={sizingStyle:We,paddingSize:q,borderSize:Fe,boxSizing:ue};return we&&Ce&&(D[Ce]=He),He}function M(_e){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Re=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;L||(L=document.createElement("textarea"),L.setAttribute("tab-index","-1"),L.setAttribute("aria-hidden","true"),document.body.appendChild(L)),_e.getAttribute("wrap")?L.setAttribute("wrap",_e.getAttribute("wrap")):L.removeAttribute("wrap");var ue=S(_e,we),q=ue.paddingSize,Fe=ue.borderSize,We=ue.boxSizing,He=ue.sizingStyle;L.setAttribute("style","".concat(He,";").concat(r)),L.value=_e.value||_e.placeholder||"";var Ge=Number.MIN_SAFE_INTEGER,it=Number.MAX_SAFE_INTEGER,De=L.scrollHeight,Ue;if(We==="border-box"?De+=Fe:We==="content-box"&&(De-=q),Ce!==null||Re!==null){L.value=" ";var Xe=L.scrollHeight-q;Ce!==null&&(Ge=Xe*Ce,We==="border-box"&&(Ge=Ge+q+Fe),De=Math.max(Ge,De)),Re!==null&&(it=Xe*Re,We==="border-box"&&(it=it+q+Fe),Ue=De>it?"":"hidden",De=Math.min(it,De))}return{height:De,minHeight:Ge,maxHeight:it,overflowY:Ue,resize:"none"}}var H=F("Gytx"),O=F.n(H),K;(function(_e){_e[_e.NONE=0]="NONE",_e[_e.RESIZING=1]="RESIZING",_e[_e.RESIZED=2]="RESIZED"})(K||(K={}));var Y=function(_e){Object(U.a)(Ce,_e);var we=Object(A.a)(Ce);function Ce(Re){var ue;return Object(P.a)(this,Ce),ue=we.call(this,Re),ue.nextFrameActionId=void 0,ue.resizeFrameId=void 0,ue.textArea=void 0,ue.saveTextArea=function(q){ue.textArea=q},ue.handleResize=function(q){var Fe=ue.state.resizeStatus,We=ue.props,He=We.autoSize,Ge=We.onResize;if(Fe!==K.NONE)return;typeof Ge=="function"&&Ge(q),He&&ue.resizeOnNextFrame()},ue.resizeOnNextFrame=function(){cancelAnimationFrame(ue.nextFrameActionId),ue.nextFrameActionId=requestAnimationFrame(ue.resizeTextarea)},ue.resizeTextarea=function(){var q=ue.props.autoSize;if(!q||!ue.textArea)return;var Fe=q.minRows,We=q.maxRows,He=M(ue.textArea,!1,Fe,We);ue.setState({textareaStyles:He,resizeStatus:K.RESIZING},function(){cancelAnimationFrame(ue.resizeFrameId),ue.resizeFrameId=requestAnimationFrame(function(){ue.setState({resizeStatus:K.RESIZED},function(){ue.resizeFrameId=requestAnimationFrame(function(){ue.setState({resizeStatus:K.NONE}),ue.fixFirefoxAutoScroll()})})})})},ue.renderTextArea=function(){var q=ue.props,Fe=q.prefixCls,We=Fe===void 0?"rc-textarea":Fe,He=q.autoSize,Ge=q.onResize,it=q.className,De=q.disabled,Ue=ue.state,Xe=Ue.textareaStyles,$=Ue.resizeStatus,me=Object(g.a)(ue.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),xe=y()(We,it,Object(j.a)({},"".concat(We,"-disabled"),De));"value"in me&&(me.value=me.value||"");var Ee=Object(W.a)(Object(W.a)(Object(W.a)({},ue.props.style),Xe),$===K.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return I.createElement(d,{onResize:ue.handleResize,disabled:!(He||Ge)},I.createElement("textarea",Object(ee.a)({},me,{className:xe,style:Ee,ref:ue.saveTextArea})))},ue.state={textareaStyles:{},resizeStatus:K.NONE},ue}return Object(R.a)(Ce,[{key:"componentDidUpdate",value:function(ue){(ue.value!==this.props.value||!O()(ue.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 ue=this.textArea.selectionStart,q=this.textArea.selectionEnd;this.textArea.setSelectionRange(ue,q)}}catch(Fe){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Ce}(I.Component),ie=Y,re=function(_e){Object(U.a)(Ce,_e);var we=Object(A.a)(Ce);function Ce(Re){var ue;Object(P.a)(this,Ce),ue=we.call(this,Re),ue.resizableTextArea=void 0,ue.focus=function(){ue.resizableTextArea.textArea.focus()},ue.saveTextArea=function(Fe){ue.resizableTextArea=Fe},ue.handleChange=function(Fe){var We=ue.props.onChange;ue.setValue(Fe.target.value,function(){ue.resizableTextArea.resizeTextarea()}),We&&We(Fe)},ue.handleKeyDown=function(Fe){var We=ue.props,He=We.onPressEnter,Ge=We.onKeyDown;Fe.keyCode===13&&He&&He(Fe),Ge&&Ge(Fe)};var q=typeof Re.value=="undefined"||Re.value===null?Re.defaultValue:Re.value;return ue.state={value:q},ue}return Object(R.a)(Ce,[{key:"setValue",value:function(ue,q){"value"in this.props||this.setState({value:ue},q)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return I.createElement(ie,Object(ee.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(ue){return"value"in ue?{value:ue.value}:null}}]),Ce}(I.Component),Te=ce.default=re},ZJlW:function(Ke,ce,F){Ke.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(Ke,ce,F){"use strict";F.d(ce,"a",function(){return H});var ee=F("k1fw"),P=F("oBTY"),R=F("miYZ"),U=F("tsqr"),A=F("rAM+"),I=F("tJVT"),W=F("PpiC"),j=F("q1tI"),e=F.n(j),C=F("bdgK"),f=F("9og8"),h=F("WmNS"),l=F.n(h),i={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},s={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},u={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
`)}]},o={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
`)}]},a=F("5VLF"),n=F.n(a),t={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},_=function(K,Y){return Y.map(function(ie){return{label:ie,kind:K.languages.CompletionItemKind.Keyword,insertText:ie}})},p=function(K){return Object.keys(t.tables).map(function(Y){return{label:Y,kind:K.languages.CompletionItemKind.Variable,insertText:Y}})},v=function(K,Y){var ie=t.tables[K];return ie?ie.map(function(re){return{label:re,kind:Y.languages.CompletionItemKind.Field,insertText:re}}):[]};function x(O,K,Y,ie,re){var Te=K.getWordUntilPosition(Y),_e={startLineNumber:Y.lineNumber,endLineNumber:Y.lineNumber,startColumn:Te.startColumn,endColumn:Te.endColumn},we=ie.map(function(Ce){return{label:Ce,kind:O.languages.CompletionItemKind.Keyword,insertText:Ce,insertTextRules:O.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:_e}});return re.map(function(Ce){we.push(Object(ee.a)(Object(ee.a)({},Ce),{},{range:_e}))}),we}var T=function(O){t.languages.map(function(re){return O.languages.registerDocumentFormattingEditProvider(re,{provideDocumentFormattingEdits:function(_e,we,Ce){return Object(f.a)(l.a.mark(function Re(){var ue;return l.a.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return ue=n()(_e.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),Fe.abrupt("return",[{range:_e.getFullModelRange(),text:ue}]);case 2:case"end":return Fe.stop()}},Re)}))()}}),re});var K=u.quickKey.map(function(re){return{label:re.label,kind:O.languages.CompletionItemKind.Method,insertText:re.content,insertTextRules:O.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),Y=o.quickKey.map(function(re){return{label:re.label,kind:O.languages.CompletionItemKind.Method,insertText:re.content,insertTextRules:O.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),ie=s.quickKey.map(function(re){return{label:re.label,kind:O.languages.CompletionItemKind.Method,insertText:re.content,insertTextRules:O.languages.CompletionItemInsertTextRule.InsertAsSnippet}});O.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Te,_e){var we=Te.getWordUntilPosition(_e),Ce={startLineNumber:_e.lineNumber,endLineNumber:_e.lineNumber,startColumn:we.startColumn,endColumn:we.endColumn},Re=Te.getLineContent(_e.lineNumber).substring(we.startColumn-2,we.endColumn);return{suggestions:[].concat(Object(P.a)(u.keywords.map(function(ue){return{label:ue,kind:O.languages.CompletionItemKind.Function,documentation:ue,insertText:ue,insertTextRules:O.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ce}})),Object(P.a)(u.quickKey.map(function(ue){return{label:ue.label,kind:O.languages.CompletionItemKind.Function,documentation:ue.content,insertText:Re.startsWith("#")?ue.content.replace(/#/,""):ue.content,insertTextRules:O.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ce}})))}}}),O.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Te,_e){var we=Te.getWordUntilPosition(_e),Ce={startLineNumber:_e.lineNumber,endLineNumber:_e.lineNumber,startColumn:we.startColumn,endColumn:we.endColumn};return{suggestions:Object(P.a)(i.keywords.map(function(Re){return{label:Re,kind:O.languages.CompletionItemKind.Function,documentation:Re,insertText:Re,insertTextRules:O.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ce}}))}}}),O.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Te,_e){var we=Te.getWordUntilPosition(_e),Ce={startLineNumber:_e.lineNumber,endLineNumber:_e.lineNumber,startColumn:we.startColumn,endColumn:we.endColumn},Re=Te.getLineContent(_e.lineNumber).substring(we.startColumn-2,we.endColumn);return{suggestions:[].concat(Object(P.a)(s.keywords.map(function(ue){return{label:ue,kind:O.languages.CompletionItemKind.Function,documentation:ue,insertText:ue,insertTextRules:O.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ce}})),Object(P.a)(s.quickKey.map(function(ue){return{label:ue.label,kind:O.languages.CompletionItemKind.Function,documentation:ue.content,insertText:Re.startsWith("#")?ue.content.replace(/#/,""):ue.content,insertTextRules:O.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ce}})))}}}),O.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Te,_e){var we=Te.getWordUntilPosition(_e),Ce={startLineNumber:_e.lineNumber,endLineNumber:_e.lineNumber,startColumn:we.startColumn,endColumn:we.endColumn},Re=Te.getLineContent(_e.lineNumber).substring(we.startColumn-2,we.endColumn);return{suggestions:[].concat(Object(P.a)(o.keywords.map(function(ue){return{label:ue,kind:O.languages.CompletionItemKind.Function,documentation:ue,insertText:ue,insertTextRules:O.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ce}})),Object(P.a)(o.quickKey.map(function(ue){return{label:ue.label,kind:O.languages.CompletionItemKind.Function,documentation:ue.content,insertText:Re.startsWith("#")?ue.content.replace(/#/,""):ue.content,insertTextRules:O.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ce}})))}}})},b="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",d=F("fjLI"),g=F("LvDl"),c=F("+ua5");function y(O){return/^\d+$/.test(O)?"".concat(O,"px"):O}function r(){}var w=!1,D={"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 L(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],K=O;if(Array.isArray(O)){for(var Y=0;Y<O.length;Y++){var ie=D[O[Y]];if(ie)return ie}return K[0]}return D[K]||K}var S=null,M=ce.b=function(O){var K=O.width,Y=K===void 0?"100%":K,ie=O.height,re=ie===void 0?"100%":ie,Te=O.value,_e=O.language,we=_e===void 0?"javascript":_e,Ce=O.style,Re=Ce===void 0?{}:Ce,ue=O.options,q=ue===void 0?{}:ue,Fe=O.overrideServices,We=Fe===void 0?{}:Fe,He=O.theme,Ge=He===void 0?"vs-dark":He,it=O.onEditBlur,De=O.onSave,Ue=O.autoHeight,Xe=Ue===void 0?!1:Ue,$=O.forbidCopy,me=$===void 0?!1:$,xe=O.onChange,Ee=xe===void 0?r:xe,Ie=O.editorDidMount,Be=Ie===void 0?r:Ie,Je=O.onFocus,ze=Je===void 0?r:Je,ut=O.filename,et=ut===void 0?"educoder.txt":ut,Ze=O.errorLine,Ve=O.errorContent,Le=Ve===void 0?"":Ve,dt=Object(W.a)(O,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),Ae=Object(j.useRef)(),Ne=Object(j.useRef)({}),pe=Object(j.useRef)(),he=Object(j.useRef)(),de=Object(j.useRef)(!1),z=Object(j.useRef)(),J=Object(j.useState)(!1),Q=Object(I.a)(J,2),te=Q[0],be=Q[1];function Oe(){var ot;return Ae.current&&(ot=new C.default(function(ht){var Ot=Object(A.a)(ht),Jt;try{for(Ot.s();!(Jt=Ot.n()).done;){var on=Jt.value;(on.target.offsetHeight>0||on.target.offsetWidth>0)&&Ne.current.instance.layout()}}catch($t){Ot.e($t)}finally{Ot.f()}}),ot.observe(Ae.current)),ot}function Pe(){U.b.warn(decodeURIComponent(b))}var tt=function(){var ht=Ne.current.instance;if(Te!=null&&ht&&te){var Ot=ht.getModel();Ot&&Te!==Ot.getValue()&&(w=!0,Ot.setValue(Te),ht.layout(),w=!1)}};Object(j.useEffect)(function(){he.current&&clearTimeout(he.current),he.current=setTimeout(function(){tt()},500)},[Te,te,Ne.current]),Object(j.useEffect)(function(){if(Ze&&Ne.current&&Ne.current.instance){var ot=Ne.current.instance;ot.changeViewZones(function(Ot){var Jt=document.createElement("div");Jt.style.padding="10px 20px",Jt.style.width="calc(100% - 20px)",Jt.className="my-error-line-wrp",Jt.innerHTML=Le,Ot.addZone({afterLineNumber:Ze||11,heightInLines:3,domNode:Jt})});var ht={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}};ot.addOverlayWidget(ht),ot.revealPositionInCenter({lineNumber:20,column:1})}},[Ze,Ne.current,te]);function ct(){var ot=Ne.current.instance;if(ot){var ht=ot.getSelection(),Ot=Ne.current.pastePos||{},Jt=new S.Range(Ot.startLineNumber||ht.endLineNumber,Ot.startColumn||ht.endColumn,Ot.endLineNumber||ht.endLineNumber,Ot.endColumn||ht.endColumn);setTimeout(function(){ot.executeEdits("",[{range:Jt,text:""}])},300)}}function qe(ot){(window.navigator.platform.match("Mac")?ot.metaKey:ot.ctrlKey)&&ot.keyCode==83&&(ot.preventDefault(),De())}var gt=function(){if(Xe&&Ne.current.instance){var ht=Ne.current.instance.getContentHeight();nt(ht<re?re:ht)}else nt(re)};function bt(ot){var ht=document.createEvent("MouseEvents");ht.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),ot.dispatchEvent(ht)}function at(ot,ht){var Ot=window.URL||window.webkitURL||window,Jt=new Blob([ht]),on=document.createElementNS("http://www.w3.org/1999/xhtml","a");on.href=Ot.createObjectURL(Jt),on.download=ot,bt(on)}Object(j.useEffect)(function(){gt()},[gt]),Object(j.useEffect)(function(){Ae.current&&!te&&Promise.all([F.e(16),F.e(28)]).then(F.t.bind(null,"M/lh",7)).then(function(ot){try{S=ot,Ne.current.instance=S.editor.create(Ae.current,{value:Te,language:L(we),theme:Ge,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},We);var ht=Ne.current.instance,Ot=d.d._menuItems,Jt=Object(P.a)(Ot).find(function(Qt){return Qt[0]._debugName=="EditorContext"}),on=Jt[1],$t=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],On=function(mn,Tn){var Ft=mn._first;do{var _t,st,Lt=Tn.includes((_t=Ft.element)===null||_t===void 0||((st=_t.command)===null||st===void 0)?void 0:st.id);Lt&&mn._remove(Ft)}while(Ft=Ft.next)};if(Be(ht,S),setTimeout(function(){gt(),Ne.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){at(et||"educoder.txt",ht.getValue())}}),ht.getDomNode().addEventListener("input",function(){pe.current.autoFormat&&ht.getAction("editor.action.formatDocument").run()})},500),Ne.current.subscription=ht.onDidChangeModelContent(function(Qt){de.current?clearTimeout(z.current):(gt(),Ee(ht.getValue(),Qt)),z.current=setTimeout(function(){de.current=!1},500)}),window.Monaco||T(S,L(we)),me&&(On(on,$t),Ae.current.classList.add("noCopyPaste"),ht.onKeyDown(function(Qt){var mn=Qt.keyCode,Tn=Qt.ctrlKey,Ft=Qt.metaKey;(mn===33||mn===52)&&(Ft||Tn)&&(Pe(),Qt.preventDefault())})),window.Monaco=S,it&&ht.onDidBlurEditorWidget(function(){it(ht.getValue())}),ze&&ht.onDidFocusEditorText(function(){ze(ht.getValue())}),me){ht.addCommand(S.KeyMod.CtrlCmd|S.KeyCode.KEY_V,function(){return Pe(),null}),ht.onDidPaste(function(Qt){Ne.current.pastePos=Qt});try{window.addEventListener("paste",ct)}catch(Qt){}}var Un=Oe();return be(!0),function(){var Qt=Ne.current.instance;Qt.dispose();var mn=Qt.getModel();mn&&mn.dispose(),Ne.current.subscription&&Ne.current.subscription.dispose(),me&&window.removeEventListener("paste",ct),Un.unobserve(Ae.current)}}catch(Qt){}})},[]),Object(j.useEffect)(function(){var ot=Ne.current.instance;if(ot&&te)return document.addEventListener("keydown",qe,!1),function(){document.removeEventListener("keydown",qe)}},[De,te]),Object(j.useEffect)(function(){var ot=Ne.current.instance;if(ot&&te){var ht=L(we);S.editor.setModelLanguage(ot.getModel(),ht),console.log("language:",we,ot.getModel(),ht)}},[we,te]),Object(j.useEffect)(function(){var ot=Ne.current.instance;ot&&te&&S.editor.setTheme(Ge)},[Ge,te]),Object(j.useEffect)(function(){var ot=Ne.current.instance;pe.current=q,ot&&te&&(ot.updateOptions(Object(ee.a)({},q)),setTimeout(function(){ot.getModel().updateOptions(Object(ee.a)({},q))},200))},[JSON.stringify(q),te]),Object(j.useEffect)(function(){var ot=Ne.current.instance;ot&&te&&ot.layout()},[Y,re,te]);var Et=Object(j.useState)(y(Y)),pt=Object(I.a)(Et,2),yt=pt[0],$e=pt[1],ft=Object(j.useState)(y(re)),Dt=Object(I.a)(ft,2),Ct=Dt[0],nt=Dt[1],Tt=Object(ee.a)(Object(ee.a)({},Re),{},{width:yt,height:Ct});return e.a.createElement("div",{className:"my-monaco-editor",ref:Ae,style:Tt})};function H(O){var K=O.width,Y=K===void 0?"100%":K,ie=O.height,re=ie===void 0?"100%":ie,Te=O.original,_e=O.modified,we=O.language,Ce=O.options,Re=Ce===void 0?{}:Ce,ue=Object(j.useRef)(),q=Object(j.useState)(null),Fe=Object(I.a)(q,2),We=Fe[0],He=Fe[1];function Ge(Xe){var $;return ue.current&&($=new C.default(function(me){var xe=Object(A.a)(me),Ee;try{for(xe.s();!(Ee=xe.n()).done;){var Ie=Ee.value;(Ie.target.offsetHeight>0||Ie.target.offsetWidth>0)&&Xe.layout()}}catch(Be){xe.e(Be)}finally{xe.f()}}),$.observe(ue.current)),$}Object(j.useEffect)(function(){ue.current&&Promise.all([F.e(16),F.e(28)]).then(F.t.bind(null,"M/lh",7)).then(function(Xe){S=Xe;var $=S.editor.createDiffEditor(ue.current,Object(ee.a)(Object(ee.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},Re),{},{wordWrap:!0}));He($);var me=Ge($);return function(){$.dispose();var xe=$.getModel();xe&&xe.dispose(),me.unobserve(ue.current)}})},[]),Object(j.useEffect)(function(){We&&We.setModel({original:S.editor.createModel(Te,we),modified:S.editor.createModel(_e,we)})},[Te,_e,we,We]);var it=y(Y),De=y(re),Ue={width:it,height:De};return e.a.createElement("div",{className:"my-diff-editor",ref:ue,style:Ue})}},ZpRC:function(Ke,ce,F){"use strict";function ee(f){return typeof f=="object"&&f!=null&&f.nodeType===1}function P(f,h){return(!h||f!=="hidden")&&f!=="visible"&&f!=="clip"}function R(f,h){if(f.clientHeight<f.scrollHeight||f.clientWidth<f.scrollWidth){var l=getComputedStyle(f,null);return P(l.overflowY,h)||P(l.overflowX,h)||function(i){var s=function(u){if(!u.ownerDocument||!u.ownerDocument.defaultView)return null;try{return u.ownerDocument.defaultView.frameElement}catch(o){return null}}(i);return!!s&&(s.clientHeight<i.scrollHeight||s.clientWidth<i.scrollWidth)}(f)}return!1}function U(f,h,l,i,s,u,o,a){return u<f&&o>h||u>f&&o<h?0:u<=f&&a<=l||o>=h&&a>=l?u-f-i:o>h&&a<l||u<f&&a>l?o-h+s:0}var A=function(f,h){var l=window,i=h.scrollMode,s=h.block,u=h.inline,o=h.boundary,a=h.skipOverflowHiddenElements,n=typeof o=="function"?o:function(Xe){return Xe!==o};if(!ee(f))throw new TypeError("Invalid target");for(var t=document.scrollingElement||document.documentElement,_=[],p=f;ee(p)&&n(p);){if((p=p.parentElement)===t){_.push(p);break}p!=null&&p===document.body&&R(p)&&!R(document.documentElement)||p!=null&&R(p,a)&&_.push(p)}for(var v=l.visualViewport?l.visualViewport.width:innerWidth,x=l.visualViewport?l.visualViewport.height:innerHeight,T=window.scrollX||pageXOffset,b=window.scrollY||pageYOffset,d=f.getBoundingClientRect(),g=d.height,c=d.width,y=d.top,r=d.right,w=d.bottom,D=d.left,L=s==="start"||s==="nearest"?y:s==="end"?w:y+g/2,S=u==="center"?D+c/2:u==="end"?r:D,M=[],H=0;H<_.length;H++){var O=_[H],K=O.getBoundingClientRect(),Y=K.height,ie=K.width,re=K.top,Te=K.right,_e=K.bottom,we=K.left;if(i==="if-needed"&&y>=0&&D>=0&&w<=x&&r<=v&&y>=re&&w<=_e&&D>=we&&r<=Te)return M;var Ce=getComputedStyle(O),Re=parseInt(Ce.borderLeftWidth,10),ue=parseInt(Ce.borderTopWidth,10),q=parseInt(Ce.borderRightWidth,10),Fe=parseInt(Ce.borderBottomWidth,10),We=0,He=0,Ge="offsetWidth"in O?O.offsetWidth-O.clientWidth-Re-q:0,it="offsetHeight"in O?O.offsetHeight-O.clientHeight-ue-Fe:0;if(t===O)We=s==="start"?L:s==="end"?L-x:s==="nearest"?U(b,b+x,x,ue,Fe,b+L,b+L+g,g):L-x/2,He=u==="start"?S:u==="center"?S-v/2:u==="end"?S-v:U(T,T+v,v,Re,q,T+S,T+S+c,c),We=Math.max(0,We+b),He=Math.max(0,He+T);else{We=s==="start"?L-re-ue:s==="end"?L-_e+Fe+it:s==="nearest"?U(re,_e,Y,ue,Fe+it,L,L+g,g):L-(re+Y/2)+it/2,He=u==="start"?S-we-Re:u==="center"?S-(we+ie/2)+Ge/2:u==="end"?S-Te+q+Ge:U(we,Te,ie,Re,q+Ge,S,S+c,c);var De=O.scrollLeft,Ue=O.scrollTop;L+=Ue-(We=Math.max(0,Math.min(Ue+We,O.scrollHeight-Y+it))),S+=De-(He=Math.max(0,Math.min(De+He,O.scrollWidth-ie+Ge)))}M.push({el:O,top:We,left:He})}return M};function I(f){return f===Object(f)&&Object.keys(f).length!==0}function W(f,h){h===void 0&&(h="auto");var l="scrollBehavior"in document.body.style;f.forEach(function(i){var s=i.el,u=i.top,o=i.left;s.scroll&&l?s.scroll({top:u,left:o,behavior:h}):(s.scrollTop=u,s.scrollLeft=o)})}function j(f){return f===!1?{block:"end",inline:"nearest"}:I(f)?f:{block:"start",inline:"nearest"}}function e(f,h){var l=!f.ownerDocument.documentElement.contains(f);if(I(h)&&typeof h.behavior=="function")return h.behavior(l?[]:A(f,h));if(l)return;var i=j(h);return W(A(f,i),i.behavior)}var C=ce.a=e},bT9E:function(Ke,ce,F){"use strict";F.d(ce,"a",function(){return P});var ee=F("VTBJ");function P(R,U){var A=Object(ee.a)({},R);return Array.isArray(U)&&U.forEach(function(I){delete A[I]}),A}},cFMs:function(Ke,ce){Ke.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJgAAAA4CAYAAAAB3jHPAAAAAXNSR0IArs4c6QAAIABJREFUeF61XQl4VdW1/m9GIAlhDGEIBATB2aetvCfYwYoDqKioVZGi4vxq9VlHVNSqtCA+obaKoBat4gRiHVBQBH2aiG3VKgIhYQhhyEQIhAwkuee8b49n7X32ubkRe7+PL3c4e5999vr3v/619jqHGH7gl+/7qdhSdAI8nAJgFHx/FHwUwPdyAOQAfgZ8X55V/mWf2b8YxF/+Ir/xj+R7/V4ed6jt2blUn3ocpG91fjU+dQwdl++RmWT9qWug79Wl0WPJ5fL+AcTYG/aKyXlhf8VH4zt1jB4faWfblfZL+1LHGedVX6r+aGd6kMEYla1CWIqJIR/qy/f/kY6y9vGAdzmAcfC83BBAFGgMoBAj6AtVxrYARo2r+yJANABJjGqDIQRkBV4FYPbZ08MXb+hY1Htybn5NtH1UG8cxDEzqawUs/Vl1G5OLT9lUmk0BRYNDfS87UH0rYKohG1anHxxwMPqmA3Oghp+PXKNaE98XYH5FUVe04BYg9lv4fm8+UzYD8YsiKzaKiZSROgIA/Z1eTKg9WZr2OUNglTOvgaJWqQSfcU0EYOq6ovpTz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AAAAASUVORK5CYII="},cz0n:function(Ke,ce,F){Ke.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(Ke,ce,F){Ke.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(Ke,ce,F){Ke.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"}},fJjg:function(Ke,ce,F){"use strict";var ee=F("2qtc"),P=F("kLXV"),R=F("7Kak"),U=F("9yH6"),A=F("k1fw"),I=F("miYZ"),W=F("tsqr"),j=F("9og8"),e=F("tJVT"),C=F("PpiC"),f=F("5NDa"),h=F("5rEg"),l=F("WmNS"),i=F.n(l),s=F("q1tI"),u=F.n(s),o=F("9kvl"),a=F("Nska"),n=F.n(a),t=F("1vsH"),_=F("Nf5h"),p=F("Fhpe"),v=F.n(p),x=h.a.Search,T=function(d){var g=d.userDetail,c=d.globalSetting,y=d.loading,r=d.dispatch,w=Object(C.a)(d,["userDetail","globalSetting","loading","dispatch"]),D=Object(s.useState)(""),L=Object(e.a)(D,2),S=L[0],M=L[1],H=Object(s.useState)([]),O=Object(e.a)(H,2),K=O[0],Y=O[1],ie=Object(s.useState)(),re=Object(e.a)(ie,2),Te=re[0],_e=re[1],we=Object(s.useState)(!1),Ce=Object(e.a)(we,2),Re=Ce[0],ue=Ce[1];Object(s.useEffect)(function(){q()},[]);var q=function(){var We=Object(j.a)(i.a.mark(function He(){var Ge;return i.a.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return De.next=2,r({type:"userDetail/topicGetCourseList",payload:{search:S}});case 2:Ge=De.sent,Ge&&Y((Ge==null?void 0:Ge.courses)||[]);case 4:case"end":return De.stop()}},He)}));return function(){return We.apply(this,arguments)}}(),Fe=function(){var We=Object(j.a)(i.a.mark(function He(){var Ge,it,De,Ue,Xe;return i.a.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:if(Te){me.next=4;break}return W.b.info("\u60A8\u9700\u8981\u521B\u5EFA\u8BFE\u5802\uFF0C\u624D\u80FD\u53D1\u9001"),ue(!0),me.abrupt("return");case 4:return me.next=6,r({type:"userDetail/topicSendToClass",payload:Object(A.a)({course_id:Te},(Ge=g.actionTabs)===null||Ge===void 0?void 0:Ge.params)});case 6:it=me.sent,r({type:"userDetail/setActionTabs",payload:{}}),it&&it.status===0&&(Xe={normal:"common_homework",group:"group_homework",exercise:"exercise",poll:"poll"},Object(t.S)("/classrooms/".concat(Te,"/").concat(Xe[(De=g.actionTabs)===null||De===void 0||((Ue=De.params)===null||Ue===void 0)?void 0:Ue.object_type])));case 9:case"end":return me.stop()}},He)}));return function(){return We.apply(this,arguments)}}();return u.a.createElement(P.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:g.actionTabs.key==="UserDetail-SendToClass",title:"\u53D1\u9001\u81F3\u8BFE\u5802",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",confirmLoading:y["userDetail/sendToClass"],width:600,onOk:Fe,wrapClassName:v.a.CustomCss,onCancel:function(){r({type:"userDetail/setActionTabs",payload:{}})}},u.a.createElement("div",{className:n.a.wrap},u.a.createElement("div",{className:"mb10"},u.a.createElement(_.e,{placeholder:"\u8BF7\u8F93\u5165\u8BFE\u5802\u540D\u79F0\u7684\u5173\u952E\u5B57\u8FDB\u884C\u641C\u7D22",value:S,style:{width:500},onChange:function(He){M(He),q()}})),u.a.createElement("div",{className:n.a.radioWrap},u.a.createElement(U.a.Group,{value:Te,onChange:function(He){_e(He.target.value),ue(!1)}},K.map(function(We,He){return u.a.createElement(U.a,{className:n.a.radio,value:We.course_id,key:We.course_id},We.course_name)}))),u.a.createElement("div",{className:n.a.title},"\u6E29\u99A8\u63D0\u793A\uFF1A\u9009\u62E9\u7684\u9898\u5C06\u4F1A\u53D1\u9001\u5230\u6307\u5B9A\u8BFE\u5802"),Re&&u.a.createElement("div",{className:n.a.colorFF0000},"\u8BF7\u5148\u9009\u62E9\u8BFE\u5802")))};ce.a=Object(o.a)(function(b){var d=b.userDetail,g=b.loading,c=b.globalSetting;return{userDetail:d,globalSetting:c,loading:g.effects}})(T)},fjLI:function(Ke,ce,F){"use strict";F.d(ce,"f",function(){return l}),F.d(ce,"b",function(){return i}),F.d(ce,"a",function(){return s}),F.d(ce,"d",function(){return u}),F.d(ce,"e",function(){return o}),F.d(ce,"c",function(){return a});var ee=F("8HAY"),P=F("Vhoy"),R=F("MI8n"),U=F("JYp7"),A=F("pmY6"),I=F("24hK"),W=F("nnTU"),j=F("T8No"),e=F("Cg/j"),C=F("t9D7"),f=function(n,t,_,p){var v=arguments.length,x=v<3?t:p===null?p=Object.getOwnPropertyDescriptor(t,_):p,T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(n,t,_,p);else for(var b=n.length-1;b>=0;b--)(T=n[b])&&(x=(v<3?T(x):v>3?T(t,_,x):T(t,_))||x);return v>3&&x&&Object.defineProperty(t,_,x),x},h=function(n,t){return function(_,p){t(_,p,n)}};function l(n){return n.command!==void 0}class i{constructor(n){this.id=i._idPool++,this._debugName=n}}i._idPool=0,i.CommandPalette=new i("CommandPalette"),i.EditorContext=new i("EditorContext"),i.SimpleEditorContext=new i("SimpleEditorContext"),i.EditorContextCopy=new i("EditorContextCopy"),i.EditorContextPeek=new i("EditorContextPeek"),i.MenubarEditMenu=new i("MenubarEditMenu"),i.MenubarCopy=new i("MenubarCopy"),i.MenubarGoMenu=new i("MenubarGoMenu"),i.MenubarSelectionMenu=new i("MenubarSelectionMenu"),i.InlineCompletionsActions=new i("InlineCompletionsActions");const s=Object(e.c)("menuService"),u=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new R.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:n=>n===i.CommandPalette}}addCommand(n){return this.addCommands(U.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 _ of n)t=this._commands.delete(_.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,_)=>n.set(_,t)),n}appendMenuItem(n,t){return this.appendMenuItems(U.a.single({id:n,item:t}))}appendMenuItems(n){const t=new Set,_=new I.a;for(const{id:p,item:v}of n){let x=this._menuItems.get(p);x||(x=new I.a,this._menuItems.set(p,x)),_.push(x.push(v)),t.add(p)}return this._onDidChangeMenu.fire(t),Object(A.i)(()=>{if(_.size>0){for(let p of _)p();this._onDidChangeMenu.fire(t),_.clear()}})}getMenuItems(n){let t;return this._menuItems.has(n)?t=[...this._menuItems.get(n)]:t=[],n===i.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(n){const t=new Set;for(const _ of n)l(_)&&(t.add(_.command.id),_.alt&&t.add(_.alt.id));this._commands.forEach((_,p)=>{t.has(p)||n.push({command:_})})}};class o extends ee.e{constructor(n,t,_,p){super(`submenuitem.${n.submenu.id}`,typeof n.title=="string"?n.title:n.title.value,[],"submenu");this.item=n,this._menuService=t,this._contextKeyService=_,this._options=p}get actions(){const n=[],t=this._menuService.createMenu(this.item.submenu,this._contextKeyService),_=t.getActions(this._options);t.dispose();for(const[,p]of _)p.length>0&&(n.push(...p),n.push(new ee.d));return n.length&&n.pop(),n}}let a=class n{constructor(t,_,p,v,x){var T,b;if(this._commandService=x,this.id=t.id,this.label=(p==null?void 0:p.renderShortTitle)&&t.shortTitle?typeof t.shortTitle=="string"?t.shortTitle:t.shortTitle.value:typeof t.title=="string"?t.title:t.title.value,this.tooltip=(b=typeof t.tooltip=="string"?t.tooltip:(T=t.tooltip)===null||T===void 0?void 0:T.value)!==null&&b!==void 0?b:"",this.enabled=!t.precondition||v.contextMatchesRules(t.precondition),this.checked=void 0,t.toggled){const d=t.toggled.condition?t.toggled:{condition:t.toggled};this.checked=v.contextMatchesRules(d.condition),this.checked&&d.tooltip&&(this.tooltip=typeof d.tooltip=="string"?d.tooltip:d.tooltip.value),d.title&&(this.label=typeof d.title=="string"?d.title:d.title.value)}this.item=t,this.alt=_?new n(_,void 0,p,v,x):void 0,this._options=p,C.d.isThemeIcon(t.icon)&&(this.class=P.a.asClassName(t.icon))}dispose(){}run(...t){var _,p;let v=[];return((_=this._options)===null||_===void 0?void 0:_.arg)&&(v=[...v,this._options.arg]),((p=this._options)===null||p===void 0?void 0:p.shouldForwardArgs)&&(v=[...v,...t]),this._commandService.executeCommand(this.id,...v)}};a=f([h(3,j.b),h(4,W.b)],a)},"iL++":function(Ke,ce,F){Ke.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"}},ic2d:function(Ke,ce,F){"use strict";F.d(ce,"a",function(){return U});var ee=F("FWmy"),P=F("746U");class R{constructor(){this.data=new Map}add(A,I){ee.a(P.l(A)),ee.a(P.k(I)),ee.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 U=new R},k3GJ:function(Ke,ce,F){"use strict";F.d(ce,"a",function(){return Ji});var ee=F("rePB"),P=F("ODXe"),R=F("Ff2n"),U=F("VTBJ"),A=F("q1tI"),I=F("TSYQ"),W=F.n(I),j=F("Zm9Q"),e=F("6cGi"),C=F("KQm4"),f=F("xEkU"),h=F.n(f),l=F("t23M");function i(ne){var fe=Object(A.useRef)(),ve=Object(A.useRef)(!1);function se(){for(var V=arguments.length,Z=new Array(V),X=0;X<V;X++)Z[X]=arguments[X];ve.current||(h.a.cancel(fe.current),fe.current=h()(function(){ne.apply(void 0,Z)}))}return Object(A.useEffect)(function(){return function(){ve.current=!0,h.a.cancel(fe.current)}},[]),se}function s(ne){var fe=Object(A.useRef)([]),ve=Object(A.useState)({}),se=Object(P.a)(ve,2),V=se[1],Z=Object(A.useRef)(typeof ne=="function"?ne():ne),X=i(function(){var oe=Z.current;fe.current.forEach(function(ye){oe=ye(oe)}),fe.current=[],Z.current=oe,V({})});function ae(oe){fe.current.push(oe),X()}return[Z.current,ae]}var u=F("4IlW");function o(ne,fe){var ve,se=ne.prefixCls,V=ne.id,Z=ne.active,X=ne.rtl,ae=ne.tab,oe=ae.key,ye=ae.tab,ge=ae.disabled,Se=ae.closeIcon,Me=ne.tabBarGutter,Qe=ne.tabPosition,Ye=ne.closable,rt=ne.renderWrapper,St=ne.removeAriaLabel,kt=ne.editable,It=ne.onClick,Bt=ne.onRemove,Ut=ne.onFocus,Pt="".concat(se,"-tab");A.useEffect(function(){return Bt},[]);var Nt={};Qe==="top"||Qe==="bottom"?Nt[X?"marginLeft":"marginRight"]=Me:Nt.marginBottom=Me;var Vt=kt&&Ye!==!1&&!ge;function Ht(wt){if(ge)return;It(wt)}function pn(wt){wt.preventDefault(),wt.stopPropagation(),kt.onEdit("remove",{key:oe,event:wt})}var nn=A.createElement("div",{key:oe,ref:fe,className:W()(Pt,(ve={},Object(ee.a)(ve,"".concat(Pt,"-with-remove"),Vt),Object(ee.a)(ve,"".concat(Pt,"-active"),Z),Object(ee.a)(ve,"".concat(Pt,"-disabled"),ge),ve)),style:Nt,onClick:Ht},A.createElement("div",{role:"tab","aria-selected":Z,id:V&&"".concat(V,"-tab-").concat(oe),className:"".concat(Pt,"-btn"),"aria-controls":V&&"".concat(V,"-panel-").concat(oe),"aria-disabled":ge,tabIndex:ge?null:0,onClick:function(xt){xt.stopPropagation(),Ht(xt)},onKeyDown:function(xt){[u.a.SPACE,u.a.ENTER].includes(xt.which)&&(xt.preventDefault(),Ht(xt))},onFocus:Ut},ye),Vt&&A.createElement("button",{type:"button","aria-label":St||"remove",tabIndex:0,className:"".concat(Pt,"-remove"),onClick:function(xt){xt.stopPropagation(),pn(xt)}},Se||kt.removeIcon||"\xD7"));return rt&&(nn=rt(nn)),nn}var a=A.forwardRef(o),n={width:0,height:0,left:0,top:0};function t(ne,fe,ve){return Object(A.useMemo)(function(){for(var se,V=new Map,Z=fe.get((se=ne[0])===null||se===void 0?void 0:se.key)||n,X=Z.left+Z.width,ae=0;ae<ne.length;ae+=1){var oe=ne[ae].key,ye=fe.get(oe);if(!ye){var ge;ye=fe.get((ge=ne[ae-1])===null||ge===void 0?void 0:ge.key)||n}var Se=V.get(oe)||Object(U.a)({},ye);Se.right=X-Se.left-Se.width,V.set(oe,Se)}return V},[ne.map(function(se){return se.key}).join("_"),fe,ve])}var _={width:0,height:0,left:0,top:0,right:0};function p(ne,fe,ve,se,V){var Z=V.tabs,X=V.tabPosition,ae=V.rtl,oe,ye,ge;["top","bottom"].includes(X)?(oe="width",ye=ae?"right":"left",ge=Math.abs(fe.left)):(oe="height",ye="top",ge=-fe.top);var Se=fe[oe],Me=ve[oe],Qe=se[oe],Ye=Se;return Me+Qe>Se&&(Ye=Se-Qe),Object(A.useMemo)(function(){if(!Z.length)return[0,0];for(var rt=Z.length,St=rt,kt=0;kt<rt;kt+=1){var It=ne.get(Z[kt].key)||_;if(It[ye]+It[oe]>ge+Ye){St=kt-1;break}}for(var Bt=0,Ut=rt-1;Ut>=0;Ut-=1){var Pt=ne.get(Z[Ut].key)||_;if(Pt[ye]<ge){Bt=Ut+1;break}}return[Bt,St]},[ne,ge,Ye,X,Z.map(function(rt){return rt.key}).join("_"),ae])}var v=F("wx14"),x=F("1OyB"),T=F("vuIU"),b=F("JX7q"),d=F("Ji7U"),g=F("LK+K"),c=F("I8Z2"),y=F("bT9E"),r=F("2GS6"),w=F("Gytx"),D=F.n(w),L=F("U8pU"),S=/iPhone/i,M=/iPod/i,H=/iPad/i,O=/\bAndroid(?:.+)Mobile\b/i,K=/Android/i,Y=/\bAndroid(?:.+)SD4930UR\b/i,ie=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,re=/Windows Phone/i,Te=/\bWindows(?:.+)ARM\b/i,_e=/BlackBerry/i,we=/BB10/i,Ce=/Opera Mini/i,Re=/\b(CriOS|Chrome)(?:.+)Mobile/i,ue=/Mobile(?:.+)Firefox\b/i;function q(ne,fe){return ne.test(fe)}function Fe(ne){var fe=ne||(typeof navigator!="undefined"?navigator.userAgent:""),ve=(fe||"").split("[FBAN");if(typeof ve[1]!="undefined"){var se=ve,V=Object(P.a)(se,1);fe=V[0]}if(ve=fe.split("Twitter"),typeof ve[1]!="undefined"){var Z=ve,X=Object(P.a)(Z,1);fe=X[0]}var ae={apple:{phone:q(S,fe)&&!q(re,fe),ipod:q(M,fe),tablet:!q(S,fe)&&q(H,fe)&&!q(re,fe),device:(q(S,fe)||q(M,fe)||q(H,fe))&&!q(re,fe)},amazon:{phone:q(Y,fe),tablet:!q(Y,fe)&&q(ie,fe),device:q(Y,fe)||q(ie,fe)},android:{phone:!q(re,fe)&&q(Y,fe)||!q(re,fe)&&q(O,fe),tablet:!q(re,fe)&&!q(Y,fe)&&!q(O,fe)&&(q(ie,fe)||q(K,fe)),device:!q(re,fe)&&(q(Y,fe)||q(ie,fe)||q(O,fe)||q(K,fe))||q(/\bokhttp\b/i,fe)},windows:{phone:q(re,fe),tablet:q(Te,fe),device:q(re,fe)||q(Te,fe)},other:{blackberry:q(_e,fe),blackberry10:q(we,fe),opera:q(Ce,fe),firefox:q(ue,fe),chrome:q(Re,fe),device:q(_e,fe)||q(we,fe)||q(Ce,fe)||q(ue,fe)||q(Re,fe)},any:null,phone:null,tablet:null};return ae.any=ae.apple.device||ae.android.device||ae.windows.device||ae.other.device,ae.phone=ae.apple.phone||ae.android.phone||ae.windows.phone,ae.tablet=ae.apple.tablet||ae.android.tablet||ae.windows.tablet,ae}var We=Object(U.a)(Object(U.a)({},Fe()),{},{isMobile:Fe}),He=We;function Ge(){}function it(ne,fe,ve){var se=fe||"";return ne.key||"".concat(se,"item_").concat(ve)}function De(ne){return"".concat(ne,"-menu-")}function Ue(ne,fe){var ve=-1;A.Children.forEach(ne,function(se){ve+=1,se&&se.type&&se.type.isMenuItemGroup?A.Children.forEach(se.props.children,function(V){ve+=1,fe(V,ve)}):fe(se,ve)})}function Xe(ne,fe,ve){if(!ne||ve.find)return;A.Children.forEach(ne,function(se){if(se){var V=se.type;if(!V||!(V.isSubMenu||V.isMenuItem||V.isMenuItemGroup))return;fe.indexOf(se.key)!==-1?ve.find=!0:se.props.children&&Xe(se.props.children,fe,ve)}})}var $=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],me=function(fe){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,se=fe&&typeof fe.getBoundingClientRect=="function"&&fe.getBoundingClientRect().width;if(se){if(ve){var V=getComputedStyle(fe),Z=V.marginLeft,X=V.marginRight;se+=+Z.replace("px","")+ +X.replace("px","")}se=+se.toFixed(6)}return se||0},xe=function(fe,ve,se){fe&&Object(L.a)(fe.style)==="object"&&(fe.style[ve]=se)},Ee=function(){return He.any},Ie=F("bdgK"),Be=F("i8i4"),Je=F.n(Be),ze=F("wgJM"),ut=F("l4aY"),et=F("m+aA"),Ze=F("c+Xe"),Ve=F("zT1h"),Le=F("QC+M");function dt(ne,fe,ve){return ve?ne[0]===fe[0]:ne[0]===fe[0]&&ne[1]===fe[1]}function Ae(ne,fe,ve){var se=ne[fe]||{};return Object(U.a)(Object(U.a)({},se),ve)}function Ne(ne,fe,ve,se){for(var V=ve.points,Z=Object.keys(ne),X=0;X<Z.length;X+=1){var ae=Z[X];if(dt(ne[ae].points,V,se))return"".concat(fe,"-placement-").concat(ae)}return""}var pe=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var ne=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(ne)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(ne==null?void 0:ne.substr(0,4)))},he=F("MNnm");function de(ne,fe){var ve={};return ve[ne.toLowerCase()]=fe.toLowerCase(),ve["Webkit".concat(ne)]="webkit".concat(fe),ve["Moz".concat(ne)]="moz".concat(fe),ve["ms".concat(ne)]="MS".concat(fe),ve["O".concat(ne)]="o".concat(fe.toLowerCase()),ve}function z(ne,fe){var ve={animationend:de("Animation","AnimationEnd"),transitionend:de("Transition","TransitionEnd")};return ne&&("AnimationEvent"in fe||delete ve.animationend.animation,"TransitionEvent"in fe||delete ve.transitionend.transition),ve}var J=z(Object(he.a)(),typeof window!="undefined"?window:{}),Q={};if(Object(he.a)()){var te=document.createElement("div");Q=te.style}var be={};function Oe(ne){if(be[ne])return be[ne];var fe=J[ne];if(fe)for(var ve=Object.keys(fe),se=ve.length,V=0;V<se;V+=1){var Z=ve[V];if(Object.prototype.hasOwnProperty.call(fe,Z)&&Z in Q)return be[ne]=fe[Z],be[ne]}return""}var Pe=Oe("animationend"),tt=Oe("transitionend"),ct=!!(Pe&&tt),qe=Pe||"animationend",gt=tt||"transitionend";function bt(ne,fe){if(!ne)return null;if(Object(L.a)(ne)==="object"){var ve=fe.replace(/-\w/g,function(se){return se[1].toUpperCase()});return ne[ve]}return"".concat(ne,"-").concat(fe)}var at="none",Et="appear",pt="enter",yt="leave",$e="none",ft="prepare",Dt="start",Ct="active",nt="end";function Tt(ne){var fe=Object(A.useRef)(!1),ve=Object(A.useState)(ne),se=Object(P.a)(ve,2),V=se[0],Z=se[1];function X(ae){fe.current||Z(ae)}return Object(A.useEffect)(function(){return function(){fe.current=!0}},[]),[V,X]}var ot=Object(he.a)()?A.useLayoutEffect:A.useEffect,ht=ot,Ot=function(){var ne=A.useRef(null);function fe(){ze.a.cancel(ne.current)}function ve(se){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;fe();var Z=Object(ze.a)(function(){V<=1?se({isCanceled:function(){return Z!==ne.current}}):ve(se,V-1)});ne.current=Z}return A.useEffect(function(){return function(){fe()}},[]),[ve,fe]},Jt=[ft,Dt,Ct,nt],on=!1,$t=!0;function On(ne){return ne===Ct||ne===nt}var Un=function(ne,fe){var ve=A.useState($e),se=Object(P.a)(ve,2),V=se[0],Z=se[1],X=Ot(),ae=Object(P.a)(X,2),oe=ae[0],ye=ae[1];function ge(){Z(ft)}return ht(function(){if(V!==$e&&V!==nt){var Se=Jt.indexOf(V),Me=Jt[Se+1],Qe=fe(V);Qe===on?Z(Me):oe(function(Ye){function rt(){if(Ye.isCanceled())return;Z(Me)}Qe===!0?rt():Promise.resolve(Qe).then(rt)})}},[ne,V]),A.useEffect(function(){return function(){ye()}},[]),[ge,V]},Qt=function(ne){var fe=Object(A.useRef)(),ve=Object(A.useRef)(ne);ve.current=ne;var se=A.useCallback(function(X){ve.current(X)},[]);function V(X){X&&(X.removeEventListener(gt,se),X.removeEventListener(qe,se))}function Z(X){fe.current&&fe.current!==X&&V(fe.current),X&&X!==fe.current&&(X.addEventListener(gt,se),X.addEventListener(qe,se),fe.current=X)}return A.useEffect(function(){return function(){V(fe.current)}},[]),[Z,V]};function mn(ne,fe,ve,se){var V=se.motionEnter,Z=V===void 0?!0:V,X=se.motionAppear,ae=X===void 0?!0:X,oe=se.motionLeave,ye=oe===void 0?!0:oe,ge=se.motionDeadline,Se=se.motionLeaveImmediately,Me=se.onAppearPrepare,Qe=se.onEnterPrepare,Ye=se.onLeavePrepare,rt=se.onAppearStart,St=se.onEnterStart,kt=se.onLeaveStart,It=se.onAppearActive,Bt=se.onEnterActive,Ut=se.onLeaveActive,Pt=se.onAppearEnd,Nt=se.onEnterEnd,Vt=se.onLeaveEnd,Ht=se.onVisibleChanged,pn=Tt(),nn=Object(P.a)(pn,2),wt=nn[0],xt=nn[1],Kt=Tt(at),zt=Object(P.a)(Kt,2),mt=zt[0],Yt=zt[1],cn=Tt(null),Xt=Object(P.a)(cn,2),sn=Xt[0],hn=Xt[1],Sn=Object(A.useRef)(!1),Dn=Object(A.useRef)(null),gn=Object(A.useRef)(!1),Mn=Object(A.useRef)(null);function Fn(){var dn=ve();return dn||Mn.current}var Pn=Object(A.useRef)(!1);function Nn(dn){var tn=Fn();if(dn&&!dn.deadline&&dn.target!==tn)return;var Cn;mt===Et&&Pn.current?Cn=Pt==null?void 0:Pt(tn,dn):mt===pt&&Pn.current?Cn=Nt==null?void 0:Nt(tn,dn):mt===yt&&Pn.current&&(Cn=Vt==null?void 0:Vt(tn,dn)),Cn!==!1&&!gn.current&&(Yt(at),hn(null))}var vn=Qt(Nn),Ln=Object(P.a)(vn,1),An=Ln[0],_n=A.useMemo(function(){var dn,tn,Cn;switch(mt){case"appear":return dn={},Object(ee.a)(dn,ft,Me),Object(ee.a)(dn,Dt,rt),Object(ee.a)(dn,Ct,It),dn;case"enter":return tn={},Object(ee.a)(tn,ft,Qe),Object(ee.a)(tn,Dt,St),Object(ee.a)(tn,Ct,Bt),tn;case"leave":return Cn={},Object(ee.a)(Cn,ft,Ye),Object(ee.a)(Cn,Dt,kt),Object(ee.a)(Cn,Ct,Ut),Cn;default:return{}}},[mt]),Wn=Un(mt,function(dn){if(dn===ft){var tn=_n[ft];return tn?tn(Fn()):on}if(ln in _n){var Cn;hn(((Cn=_n[ln])===null||Cn===void 0?void 0:Cn.call(_n,Fn(),null))||null)}return ln===Ct&&(An(Fn()),ge>0&&(clearTimeout(Dn.current),Dn.current=setTimeout(function(){Nn({deadline:!0})},ge))),$t}),Kn=Object(P.a)(Wn,2),Yn=Kn[0],ln=Kn[1],Hn=On(ln);Pn.current=Hn,ht(function(){xt(fe);var dn=Sn.current;if(Sn.current=!0,!ne)return;var tn;!dn&&fe&&ae&&(tn=Et),dn&&fe&&Z&&(tn=pt),(dn&&!fe&&ye||!dn&&Se&&!fe&&ye)&&(tn=yt),tn&&(Yt(tn),Yn())},[fe]),Object(A.useEffect)(function(){(mt===Et&&!ae||mt===pt&&!Z||mt===yt&&!ye)&&Yt(at)},[ae,Z,ye]),Object(A.useEffect)(function(){return function(){clearTimeout(Dn.current),gn.current=!0}},[]),Object(A.useEffect)(function(){wt!==void 0&&mt===at&&(Ht==null||Ht(wt))},[wt,mt]);var Xn=sn;return _n[ft]&&ln===Dt&&(Xn=Object(U.a)({transition:"none"},Xn)),[mt,ln,Xn,wt!=null?wt:fe]}var Tn=function(ne){Object(d.a)(ve,ne);var fe=Object(g.a)(ve);function ve(){return Object(x.a)(this,ve),fe.apply(this,arguments)}return Object(T.a)(ve,[{key:"render",value:function(){return this.props.children}}]),ve}(A.Component),Ft=Tn;function _t(ne){var fe=ne;Object(L.a)(ne)==="object"&&(fe=ne.transitionSupport);function ve(V){return!!(V.motionName&&fe)}var se=A.forwardRef(function(V,Z){var X=V.visible,ae=X===void 0?!0:X,oe=V.removeOnLeave,ye=oe===void 0?!0:oe,ge=V.forceRender,Se=V.children,Me=V.motionName,Qe=V.leavedClassName,Ye=V.eventProps,rt=ve(V),St=Object(A.useRef)(),kt=Object(A.useRef)();function It(){try{return Object(et.a)(St.current||kt.current)}catch(Yt){return null}}var Bt=mn(rt,ae,It,V),Ut=Object(P.a)(Bt,4),Pt=Ut[0],Nt=Ut[1],Vt=Ut[2],Ht=Ut[3],pn=A.useRef(Ht);Ht&&(pn.current=!0);var nn=Object(A.useRef)(Z);nn.current=Z;var wt=A.useCallback(function(Yt){St.current=Yt,Object(Ze.b)(nn.current,Yt)},[]),xt,Kt=Object(U.a)(Object(U.a)({},Ye),{},{visible:ae});if(!Se)xt=null;else if(Pt===at||!ve(V))Ht?xt=Se(Object(U.a)({},Kt),wt):!ye&&pn.current?xt=Se(Object(U.a)(Object(U.a)({},Kt),{},{className:Qe}),wt):ge?xt=Se(Object(U.a)(Object(U.a)({},Kt),{},{style:{display:"none"}}),wt):xt=null;else{var zt,mt;Nt===ft?mt="prepare":On(Nt)?mt="active":Nt===Dt&&(mt="start"),xt=Se(Object(U.a)(Object(U.a)({},Kt),{},{className:W()(bt(Me,Pt),(zt={},Object(ee.a)(zt,bt(Me,"".concat(Pt,"-").concat(mt)),mt),Object(ee.a)(zt,Me,typeof Me=="string"),zt)),style:Vt}),wt)}return A.createElement(Ft,{ref:kt},xt)});return se.displayName="CSSMotion",se}var st=_t(ct),Lt="add",Wt="keep",Zt="remove",Mt="removed";function jt(ne){var fe;return ne&&Object(L.a)(ne)==="object"&&"key"in ne?fe=ne:fe={key:ne},Object(U.a)(Object(U.a)({},fe),{},{key:String(fe.key)})}function Rt(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return ne.map(jt)}function N(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ve=[],se=0,V=fe.length,Z=Rt(ne),X=Rt(fe);Z.forEach(function(ye){for(var ge=!1,Se=se;Se<V;Se+=1){var Me=X[Se];if(Me.key===ye.key){se<Se&&(ve=ve.concat(X.slice(se,Se).map(function(Qe){return Object(U.a)(Object(U.a)({},Qe),{},{status:Lt})})),se=Se),ve.push(Object(U.a)(Object(U.a)({},Me),{},{status:Wt})),se+=1,ge=!0;break}}ge||ve.push(Object(U.a)(Object(U.a)({},ye),{},{status:Zt}))}),se<V&&(ve=ve.concat(X.slice(se).map(function(ye){return Object(U.a)(Object(U.a)({},ye),{},{status:Lt})})));var ae={};ve.forEach(function(ye){var ge=ye.key;ae[ge]=(ae[ge]||0)+1});var oe=Object.keys(ae).filter(function(ye){return ae[ye]>1});return oe.forEach(function(ye){ve=ve.filter(function(ge){var Se=ge.key,Me=ge.status;return Se!==ye||Me!==Zt}),ve.forEach(function(ge){ge.key===ye&&(ge.status=Wt)})}),ve}var m=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function E(ne){var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:st,ve=function(se){Object(d.a)(Z,se);var V=Object(g.a)(Z);function Z(){var X;return Object(x.a)(this,Z),X=V.apply(this,arguments),X.state={keyEntities:[]},X.removeKey=function(ae){X.setState(function(oe){var ye=oe.keyEntities;return{keyEntities:ye.map(function(ge){return ge.key!==ae?ge:Object(U.a)(Object(U.a)({},ge),{},{status:Mt})})}})},X}return Object(T.a)(Z,[{key:"render",value:function(){var ae=this,oe=this.state.keyEntities,ye=this.props,ge=ye.component,Se=ye.children,Me=ye.onVisibleChanged,Qe=Object(R.a)(ye,["component","children","onVisibleChanged"]),Ye=ge||A.Fragment,rt={};return m.forEach(function(St){rt[St]=Qe[St],delete Qe[St]}),delete Qe.keys,A.createElement(Ye,Qe,oe.map(function(St){var kt=St.status,It=Object(R.a)(St,["status"]),Bt=kt===Lt||kt===Wt;return A.createElement(fe,Object(v.a)({},rt,{key:It.key,visible:Bt,eventProps:It,onVisibleChanged:function(Pt){Me==null||Me(Pt,{key:It.key}),Pt||ae.removeKey(It.key)}}),Se)}))}}],[{key:"getDerivedStateFromProps",value:function(ae,oe){var ye=ae.keys,ge=oe.keyEntities,Se=Rt(ye),Me=N(ge,Se);return{keyEntities:Me.filter(function(Qe){var Ye=ge.find(function(rt){var St=rt.key;return Qe.key===St});return!(Ye&&Ye.status===Mt&&Qe.status===Zt)})}}}]),Z}(A.Component);return ve.defaultProps={component:"div"},ve}var k=E(ct),G=st;function B(ne){var fe=ne.prefixCls,ve=ne.motion,se=ne.animation,V=ne.transitionName;return ve||(se?{motionName:"".concat(fe,"-").concat(se)}:V?{motionName:V}:null)}function le(ne){var fe=ne.prefixCls,ve=ne.visible,se=ne.zIndex,V=ne.mask,Z=ne.maskMotion,X=ne.maskAnimation,ae=ne.maskTransitionName;if(!V)return null;var oe={};return(Z||ae||X)&&(oe=Object(U.a)({motionAppear:!0},B({motion:Z,prefixCls:fe,transitionName:ae,animation:X}))),A.createElement(G,Object(v.a)({},oe,{visible:ve,removeOnLeave:!0}),function(ye){var ge=ye.className;return A.createElement("div",{style:{zIndex:se},className:W()("".concat(fe,"-mask"),ge)})})}var ke=F("9mu1"),lt=F("o0o1"),vt=F.n(lt),je=F("HaE+"),At=["measure","align",null,"motion"],en=function(ne,fe){var ve=Object(A.useState)(null),se=Object(P.a)(ve,2),V=se[0],Z=se[1],X=Object(A.useRef)(),ae=Object(A.useRef)(!1);function oe(Se){ae.current||Z(Se)}function ye(){ze.a.cancel(X.current)}function ge(Se){ye(),X.current=Object(ze.a)(function(){oe(function(Me){switch(V){case"align":return"motion";case"motion":return"stable";default:}return Me}),Se==null||Se()})}return Object(A.useEffect)(function(){oe("measure")},[ne]),Object(A.useEffect)(function(){switch(V){case"measure":fe();break;default:}V&&(X.current=Object(ze.a)(Object(je.a)(vt.a.mark(function Se(){var Me,Qe;return vt.a.wrap(function(rt){for(;;)switch(rt.prev=rt.next){case 0:Me=At.indexOf(V),Qe=At[Me+1],Qe&&Me!==-1&&oe(Qe);case 3:case"end":return rt.stop()}},Se)}))))},[V]),Object(A.useEffect)(function(){return function(){ae.current=!0,ye()}},[]),[V,ge]},un=function(ne){var fe=A.useState({width:0,height:0}),ve=Object(P.a)(fe,2),se=ve[0],V=ve[1];function Z(ae){V({width:ae.offsetWidth,height:ae.offsetHeight})}var X=A.useMemo(function(){var ae={};if(ne){var oe=se.width,ye=se.height;ne.indexOf("height")!==-1&&ye?ae.height=ye:ne.indexOf("minHeight")!==-1&&ye&&(ae.minHeight=ye),ne.indexOf("width")!==-1&&oe?ae.width=oe:ne.indexOf("minWidth")!==-1&&oe&&(ae.minWidth=oe)}return ae},[ne,se]);return[X,Z]},Bn=A.forwardRef(function(ne,fe){var ve=ne.visible,se=ne.prefixCls,V=ne.className,Z=ne.style,X=ne.children,ae=ne.zIndex,oe=ne.stretch,ye=ne.destroyPopupOnHide,ge=ne.forceRender,Se=ne.align,Me=ne.point,Qe=ne.getRootDomNode,Ye=ne.getClassNameFromAlign,rt=ne.onAlign,St=ne.onMouseEnter,kt=ne.onMouseLeave,It=ne.onMouseDown,Bt=ne.onTouchStart,Ut=Object(A.useRef)(),Pt=Object(A.useRef)(),Nt=Object(A.useState)(),Vt=Object(P.a)(Nt,2),Ht=Vt[0],pn=Vt[1],nn=un(oe),wt=Object(P.a)(nn,2),xt=wt[0],Kt=wt[1];function zt(){oe&&Kt(Qe())}var mt=en(ve,zt),Yt=Object(P.a)(mt,2),cn=Yt[0],Xt=Yt[1],sn=Object(A.useRef)();function hn(){return Me||Qe}function Sn(){var vn;(vn=Ut.current)===null||vn===void 0||vn.forceAlign()}function Dn(vn,Ln){var An=Ye(Ln);Ht!==An&&pn(An),cn==="align"&&(Ht!==An?Promise.resolve().then(function(){Sn()}):Xt(function(){var _n;(_n=sn.current)===null||_n===void 0||_n.call(sn)}),rt==null||rt(vn,Ln))}var gn=Object(U.a)({},B(ne));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(vn){var Ln=gn[vn];gn[vn]=function(An,_n){return Xt(),Ln==null?void 0:Ln(An,_n)}});function Mn(){return new Promise(function(vn){sn.current=vn})}A.useEffect(function(){!gn.motionName&&cn==="motion"&&Xt()},[gn.motionName,cn]),A.useImperativeHandle(fe,function(){return{forceAlign:Sn,getElement:function(){return Pt.current}}});var Fn=Object(U.a)(Object(U.a)({},xt),{},{zIndex:ae,opacity:cn==="motion"||cn==="stable"||!ve?void 0:0,pointerEvents:cn==="stable"?void 0:"none"},Z),Pn=!0;(Se==null?void 0:Se.points)&&(cn==="align"||cn==="stable")&&(Pn=!1);var Nn=X;return A.Children.count(X)>1&&(Nn=A.createElement("div",{className:"".concat(se,"-content")},X)),A.createElement(G,Object(v.a)({visible:ve,ref:Pt,leavedClassName:"".concat(se,"-hidden")},gn,{onAppearPrepare:Mn,onEnterPrepare:Mn,removeOnLeave:ye,forceRender:ge}),function(vn,Ln){var An=vn.className,_n=vn.style,Wn=W()(se,V,Ht,An);return A.createElement(ke.a,{target:hn(),key:"popup",ref:Ut,monitorWindowResize:!0,disabled:Pn,align:Se,onAlign:Dn},A.createElement("div",{ref:Ln,className:Wn,onMouseEnter:St,onMouseLeave:kt,onMouseDownCapture:It,onTouchStartCapture:Bt,style:Object(U.a)(Object(U.a)({},_n),Fn)},Nn))})});Bn.displayName="PopupInner";var zn=Bn,Rn=A.forwardRef(function(ne,fe){var ve=ne.prefixCls,se=ne.visible,V=ne.zIndex,Z=ne.children,X=ne.mobile;X=X===void 0?{}:X;var ae=X.popupClassName,oe=X.popupStyle,ye=X.popupMotion,ge=ye===void 0?{}:ye,Se=X.popupRender,Me=A.useRef();A.useImperativeHandle(fe,function(){return{forceAlign:function(){},getElement:function(){return Me.current}}});var Qe=Object(U.a)({zIndex:V},oe),Ye=Z;return A.Children.count(Z)>1&&(Ye=A.createElement("div",{className:"".concat(ve,"-content")},Z)),Se&&(Ye=Se(Ye)),A.createElement(G,Object(v.a)({visible:se,ref:Me,removeOnLeave:!0},ge),function(rt,St){var kt=rt.className,It=rt.style,Bt=W()(ve,ae,kt);return A.createElement("div",{ref:St,className:Bt,style:Object(U.a)(Object(U.a)({},It),Qe)},Ye)})});Rn.displayName="MobilePopupInner";var jn=Rn,bi=["visible","mobile"],ri=A.forwardRef(function(ne,fe){var ve=ne.visible,se=ne.mobile,V=Object(R.a)(ne,bi),Z=Object(A.useState)(ve),X=Object(P.a)(Z,2),ae=X[0],oe=X[1],ye=Object(A.useState)(!1),ge=Object(P.a)(ye,2),Se=ge[0],Me=ge[1],Qe=Object(U.a)(Object(U.a)({},V),{},{visible:ae});Object(A.useEffect)(function(){oe(ve),ve&&se&&Me(pe())},[ve,se]);var Ye=Se?A.createElement(jn,Object(v.a)({},Qe,{mobile:se,ref:fe})):A.createElement(zn,Object(v.a)({},Qe,{ref:fe}));return A.createElement("div",null,A.createElement(le,Qe),Ye)});ri.displayName="Popup";var Jn=ri,Vn=A.createContext(null),pi=Vn;function Qn(){}function _i(){return""}function Zn(ne){return ne?ne.ownerDocument:window.document}var Ei=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function Ti(ne){var fe=function(ve){Object(d.a)(V,ve);var se=Object(g.a)(V);function V(Z){var X;Object(x.a)(this,V),X=se.call(this,Z),X.popupRef=A.createRef(),X.triggerRef=A.createRef(),X.attachId=void 0,X.clickOutsideHandler=void 0,X.touchOutsideHandler=void 0,X.contextMenuOutsideHandler1=void 0,X.contextMenuOutsideHandler2=void 0,X.mouseDownTimeout=void 0,X.focusTime=void 0,X.preClickTime=void 0,X.preTouchTime=void 0,X.delayTimer=void 0,X.hasPopupMouseDown=void 0,X.onMouseEnter=function(oe){var ye=X.props.mouseEnterDelay;X.fireEvents("onMouseEnter",oe),X.delaySetPopupVisible(!0,ye,ye?null:oe)},X.onMouseMove=function(oe){X.fireEvents("onMouseMove",oe),X.setPoint(oe)},X.onMouseLeave=function(oe){X.fireEvents("onMouseLeave",oe),X.delaySetPopupVisible(!1,X.props.mouseLeaveDelay)},X.onPopupMouseEnter=function(){X.clearDelayTimer()},X.onPopupMouseLeave=function(oe){var ye;if(oe.relatedTarget&&!oe.relatedTarget.setTimeout&&Object(ut.a)((ye=X.popupRef.current)===null||ye===void 0?void 0:ye.getElement(),oe.relatedTarget))return;X.delaySetPopupVisible(!1,X.props.mouseLeaveDelay)},X.onFocus=function(oe){X.fireEvents("onFocus",oe),X.clearDelayTimer(),X.isFocusToShow()&&(X.focusTime=Date.now(),X.delaySetPopupVisible(!0,X.props.focusDelay))},X.onMouseDown=function(oe){X.fireEvents("onMouseDown",oe),X.preClickTime=Date.now()},X.onTouchStart=function(oe){X.fireEvents("onTouchStart",oe),X.preTouchTime=Date.now()},X.onBlur=function(oe){X.fireEvents("onBlur",oe),X.clearDelayTimer(),X.isBlurToHide()&&X.delaySetPopupVisible(!1,X.props.blurDelay)},X.onContextMenu=function(oe){oe.preventDefault(),X.fireEvents("onContextMenu",oe),X.setPopupVisible(!0,oe)},X.onContextMenuClose=function(){X.isContextMenuToShow()&&X.close()},X.onClick=function(oe){if(X.fireEvents("onClick",oe),X.focusTime){var ye;if(X.preClickTime&&X.preTouchTime?ye=Math.min(X.preClickTime,X.preTouchTime):X.preClickTime?ye=X.preClickTime:X.preTouchTime&&(ye=X.preTouchTime),Math.abs(ye-X.focusTime)<20)return;X.focusTime=0}X.preClickTime=0,X.preTouchTime=0,X.isClickToShow()&&(X.isClickToHide()||X.isBlurToHide())&&oe&&oe.preventDefault&&oe.preventDefault();var ge=!X.state.popupVisible;(X.isClickToHide()&&!ge||ge&&X.isClickToShow())&&X.setPopupVisible(!X.state.popupVisible,oe)},X.onPopupMouseDown=function(){if(X.hasPopupMouseDown=!0,clearTimeout(X.mouseDownTimeout),X.mouseDownTimeout=window.setTimeout(function(){X.hasPopupMouseDown=!1},0),X.context){var oe;(oe=X.context).onPopupMouseDown.apply(oe,arguments)}},X.onDocumentClick=function(oe){if(X.props.mask&&!X.props.maskClosable)return;var ye=oe.target,ge=X.getRootDomNode(),Se=X.getPopupDomNode();(!Object(ut.a)(ge,ye)||X.isContextMenuOnly())&&!Object(ut.a)(Se,ye)&&!X.hasPopupMouseDown&&X.close()},X.getRootDomNode=function(){var oe=X.props.getTriggerDOMNode;if(oe)return oe(X.triggerRef.current);try{var ye=Object(et.a)(X.triggerRef.current);if(ye)return ye}catch(ge){}return Je.a.findDOMNode(Object(b.a)(X))},X.getPopupClassNameFromAlign=function(oe){var ye=[],ge=X.props,Se=ge.popupPlacement,Me=ge.builtinPlacements,Qe=ge.prefixCls,Ye=ge.alignPoint,rt=ge.getPopupClassNameFromAlign;return Se&&Me&&ye.push(Ne(Me,Qe,oe,Ye)),rt&&ye.push(rt(oe)),ye.join(" ")},X.getComponent=function(){var oe=X.props,ye=oe.prefixCls,ge=oe.destroyPopupOnHide,Se=oe.popupClassName,Me=oe.onPopupAlign,Qe=oe.popupMotion,Ye=oe.popupAnimation,rt=oe.popupTransitionName,St=oe.popupStyle,kt=oe.mask,It=oe.maskAnimation,Bt=oe.maskTransitionName,Ut=oe.maskMotion,Pt=oe.zIndex,Nt=oe.popup,Vt=oe.stretch,Ht=oe.alignPoint,pn=oe.mobile,nn=oe.forceRender,wt=X.state,xt=wt.popupVisible,Kt=wt.point,zt=X.getPopupAlign(),mt={};return X.isMouseEnterToShow()&&(mt.onMouseEnter=X.onPopupMouseEnter),X.isMouseLeaveToHide()&&(mt.onMouseLeave=X.onPopupMouseLeave),mt.onMouseDown=X.onPopupMouseDown,mt.onTouchStart=X.onPopupMouseDown,A.createElement(Jn,Object(v.a)({prefixCls:ye,destroyPopupOnHide:ge,visible:xt,point:Ht&&Kt,className:Se,align:zt,onAlign:Me,animation:Ye,getClassNameFromAlign:X.getPopupClassNameFromAlign},mt,{stretch:Vt,getRootDomNode:X.getRootDomNode,style:St,mask:kt,zIndex:Pt,transitionName:rt,maskAnimation:It,maskTransitionName:Bt,maskMotion:Ut,ref:X.popupRef,motion:Qe,mobile:pn,forceRender:nn}),typeof Nt=="function"?Nt():Nt)},X.attachParent=function(oe){ze.a.cancel(X.attachId);var ye=X.props,ge=ye.getPopupContainer,Se=ye.getDocument,Me=X.getRootDomNode(),Qe;ge?(Me||ge.length===0)&&(Qe=ge(Me)):Qe=Se(X.getRootDomNode()).body,Qe?Qe.appendChild(oe):X.attachId=Object(ze.a)(function(){X.attachParent(oe)})},X.getContainer=function(){var oe=X.props.getDocument,ye=oe(X.getRootDomNode()).createElement("div");return ye.style.position="absolute",ye.style.top="0",ye.style.left="0",ye.style.width="100%",X.attachParent(ye),ye},X.setPoint=function(oe){var ye=X.props.alignPoint;if(!ye||!oe)return;X.setState({point:{pageX:oe.pageX,pageY:oe.pageY}})},X.handlePortalUpdate=function(){X.state.prevPopupVisible!==X.state.popupVisible&&X.props.afterPopupVisibleChange(X.state.popupVisible)},X.triggerContextValue={onPopupMouseDown:X.onPopupMouseDown};var ae;return"popupVisible"in Z?ae=!!Z.popupVisible:ae=!!Z.defaultPopupVisible,X.state={prevPopupVisible:ae,popupVisible:ae},Ei.forEach(function(oe){X["fire".concat(oe)]=function(ye){X.fireEvents(oe,ye)}}),X}return Object(T.a)(V,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var X=this.props,ae=this.state;if(ae.popupVisible){var oe;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(oe=X.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Ve.a)(oe,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(oe=oe||X.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Ve.a)(oe,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(oe=oe||X.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Ve.a)(oe,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Ve.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),ze.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var X;return((X=this.popupRef.current)===null||X===void 0?void 0:X.getElement())||null}},{key:"getPopupAlign",value:function(){var X=this.props,ae=X.popupPlacement,oe=X.popupAlign,ye=X.builtinPlacements;return ae&&ye?Ae(ye,ae,oe):oe}},{key:"setPopupVisible",value:function(X,ae){var oe=this.props.alignPoint,ye=this.state.popupVisible;this.clearDelayTimer(),ye!==X&&("popupVisible"in this.props||this.setState({popupVisible:X,prevPopupVisible:ye}),this.props.onPopupVisibleChange(X)),oe&&ae&&X&&this.setPoint(ae)}},{key:"delaySetPopupVisible",value:function(X,ae,oe){var ye=this,ge=ae*1e3;if(this.clearDelayTimer(),ge){var Se=oe?{pageX:oe.pageX,pageY:oe.pageY}:null;this.delayTimer=window.setTimeout(function(){ye.setPopupVisible(X,Se),ye.clearDelayTimer()},ge)}else this.setPopupVisible(X,oe)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(X){var ae=this.props.children.props,oe=this.props;return ae[X]&&oe[X]?this["fire".concat(X)]:ae[X]||oe[X]}},{key:"isClickToShow",value:function(){var X=this.props,ae=X.action,oe=X.showAction;return ae.indexOf("click")!==-1||oe.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var X=this.props.action;return X==="contextMenu"||X.length===1&&X[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var X=this.props,ae=X.action,oe=X.showAction;return ae.indexOf("contextMenu")!==-1||oe.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var X=this.props,ae=X.action,oe=X.hideAction;return ae.indexOf("click")!==-1||oe.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var X=this.props,ae=X.action,oe=X.showAction;return ae.indexOf("hover")!==-1||oe.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var X=this.props,ae=X.action,oe=X.hideAction;return ae.indexOf("hover")!==-1||oe.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var X=this.props,ae=X.action,oe=X.showAction;return ae.indexOf("focus")!==-1||oe.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var X=this.props,ae=X.action,oe=X.hideAction;return ae.indexOf("focus")!==-1||oe.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var X;(X=this.popupRef.current)===null||X===void 0||X.forceAlign()}}},{key:"fireEvents",value:function(X,ae){var oe=this.props.children.props[X];oe&&oe(ae);var ye=this.props[X];ye&&ye(ae)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var X=this.state.popupVisible,ae=this.props,oe=ae.children,ye=ae.forceRender,ge=ae.alignPoint,Se=ae.className,Me=ae.autoDestroy,Qe=A.Children.only(oe),Ye={key:"trigger"};this.isContextMenuToShow()?Ye.onContextMenu=this.onContextMenu:Ye.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(Ye.onClick=this.onClick,Ye.onMouseDown=this.onMouseDown,Ye.onTouchStart=this.onTouchStart):(Ye.onClick=this.createTwoChains("onClick"),Ye.onMouseDown=this.createTwoChains("onMouseDown"),Ye.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(Ye.onMouseEnter=this.onMouseEnter,ge&&(Ye.onMouseMove=this.onMouseMove)):Ye.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?Ye.onMouseLeave=this.onMouseLeave:Ye.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(Ye.onFocus=this.onFocus,Ye.onBlur=this.onBlur):(Ye.onFocus=this.createTwoChains("onFocus"),Ye.onBlur=this.createTwoChains("onBlur"));var rt=W()(Qe&&Qe.props&&Qe.props.className,Se);rt&&(Ye.className=rt);var St=Object(U.a)({},Ye);Object(Ze.c)(Qe)&&(St.ref=Object(Ze.a)(this.triggerRef,Qe.ref));var kt=A.cloneElement(Qe,St),It;return(X||this.popupRef.current||ye)&&(It=A.createElement(ne,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!X&&Me&&(It=null),A.createElement(pi.Provider,{value:this.triggerContextValue},kt,It)}}],[{key:"getDerivedStateFromProps",value:function(X,ae){var oe=X.popupVisible,ye={};return oe!==void 0&&ae.popupVisible!==oe&&(ye.popupVisible=oe,ye.prevPopupVisible=ae.popupVisible),ye}}]),V}(A.Component);return fe.contextType=pi,fe.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:_i,getDocument:Zn,onPopupVisibleChange:Qn,afterPopupVisibleChange:Qn,onPopupAlign:Qn,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},fe}var qn=Ti(Le.a),xn={adjustX:1,adjustY:1},$n={topLeft:{points:["bl","tl"],overflow:xn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:xn,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:xn,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:xn,offset:[4,0]}},xi={topLeft:{points:["bl","tl"],overflow:xn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:xn,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:xn,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:xn,offset:[4,0]}},Bi=$n,yn=0,an={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},bn=function(fe,ve,se){var V=De(ve),Z=fe.getState();fe.setState({defaultActiveFirst:Object(U.a)(Object(U.a)({},Z.defaultActiveFirst),{},Object(ee.a)({},V,se))})},qt=function(ne){Object(d.a)(ve,ne);var fe=Object(g.a)(ve);function ve(se){var V;Object(x.a)(this,ve),V=fe.call(this,se),V.onDestroy=function(ge){V.props.onDestroy(ge)},V.onKeyDown=function(ge){var Se=ge.keyCode,Me=V.menuInstance,Qe=V.props.store,Ye=V.getVisible();if(Se===u.a.ENTER)return V.onTitleClick(ge),bn(Qe,V.props.eventKey,!0),!0;if(Se===u.a.RIGHT)return Ye?Me.onKeyDown(ge):(V.triggerOpenChange(!0),bn(Qe,V.props.eventKey,!0)),!0;if(Se===u.a.LEFT){var rt;if(Ye)rt=Me.onKeyDown(ge);else return;return rt||(V.triggerOpenChange(!1),rt=!0),rt}return Ye&&(Se===u.a.UP||Se===u.a.DOWN)?Me.onKeyDown(ge):void 0},V.onOpenChange=function(ge){V.props.onOpenChange(ge)},V.onPopupVisibleChange=function(ge){V.triggerOpenChange(ge,ge?"mouseenter":"mouseleave")},V.onMouseEnter=function(ge){var Se=V.props,Me=Se.eventKey,Qe=Se.onMouseEnter,Ye=Se.store;bn(Ye,V.props.eventKey,!1),Qe({key:Me,domEvent:ge})},V.onMouseLeave=function(ge){var Se=V.props,Me=Se.parentMenu,Qe=Se.eventKey,Ye=Se.onMouseLeave;Me.subMenuInstance=Object(b.a)(V),Ye({key:Qe,domEvent:ge})},V.onTitleMouseEnter=function(ge){var Se=V.props,Me=Se.eventKey,Qe=Se.onItemHover,Ye=Se.onTitleMouseEnter;Qe({key:Me,hover:!0}),Ye({key:Me,domEvent:ge})},V.onTitleMouseLeave=function(ge){var Se=V.props,Me=Se.parentMenu,Qe=Se.eventKey,Ye=Se.onItemHover,rt=Se.onTitleMouseLeave;Me.subMenuInstance=Object(b.a)(V),Ye({key:Qe,hover:!1}),rt({key:Qe,domEvent:ge})},V.onTitleClick=function(ge){var Se=Object(b.a)(V),Me=Se.props;if(Me.onTitleClick({key:Me.eventKey,domEvent:ge}),Me.triggerSubMenuAction==="hover")return;V.triggerOpenChange(!V.getVisible(),"click"),bn(Me.store,V.props.eventKey,!1)},V.onSubMenuClick=function(ge){typeof V.props.onClick=="function"&&V.props.onClick(V.addKeyPath(ge))},V.onSelect=function(ge){V.props.onSelect(ge)},V.onDeselect=function(ge){V.props.onDeselect(ge)},V.getPrefixCls=function(){return"".concat(V.props.rootPrefixCls,"-submenu")},V.getActiveClassName=function(){return"".concat(V.getPrefixCls(),"-active")},V.getDisabledClassName=function(){return"".concat(V.getPrefixCls(),"-disabled")},V.getSelectedClassName=function(){return"".concat(V.getPrefixCls(),"-selected")},V.getOpenClassName=function(){return"".concat(V.props.rootPrefixCls,"-submenu-open")},V.getVisible=function(){return V.state.isOpen},V.getMode=function(){return V.state.mode},V.saveMenuInstance=function(ge){V.menuInstance=ge},V.addKeyPath=function(ge){return Object(U.a)(Object(U.a)({},ge),{},{keyPath:(ge.keyPath||[]).concat(V.props.eventKey)})},V.triggerOpenChange=function(ge,Se){var Me=V.props.eventKey,Qe=function(){V.onOpenChange({key:Me,item:Object(b.a)(V),trigger:Se,open:ge})};Se==="mouseenter"?V.mouseenterTimeout=setTimeout(function(){Qe()},0):Qe()},V.isChildrenSelected=function(){var ge={find:!1};return Xe(V.props.children,V.props.selectedKeys,ge),ge.find},V.isInlineMode=function(){return V.getMode()==="inline"},V.adjustWidth=function(){if(!V.subMenuTitle||!V.menuInstance)return;var ge=Be.findDOMNode(V.menuInstance);if(ge.offsetWidth>=V.subMenuTitle.offsetWidth)return;ge.style.minWidth="".concat(V.subMenuTitle.offsetWidth,"px")},V.saveSubMenuTitle=function(ge){V.subMenuTitle=ge},V.getBaseProps=function(){var ge=Object(b.a)(V),Se=ge.props,Me=V.getMode();return{mode:Me==="horizontal"?"vertical":Me,visible:V.getVisible(),level:Se.level+1,inlineIndent:Se.inlineIndent,focusable:!1,onClick:V.onSubMenuClick,onSelect:V.onSelect,onDeselect:V.onDeselect,onDestroy:V.onDestroy,selectedKeys:Se.selectedKeys,eventKey:"".concat(Se.eventKey,"-menu-"),openKeys:Se.openKeys,motion:Se.motion,onOpenChange:V.onOpenChange,subMenuOpenDelay:Se.subMenuOpenDelay,parentMenu:Object(b.a)(V),subMenuCloseDelay:Se.subMenuCloseDelay,forceSubMenuRender:Se.forceSubMenuRender,triggerSubMenuAction:Se.triggerSubMenuAction,builtinPlacements:Se.builtinPlacements,defaultActiveFirst:Se.store.getState().defaultActiveFirst[De(Se.eventKey)],multiple:Se.multiple,prefixCls:Se.rootPrefixCls,id:V.internalMenuId,manualRef:V.saveMenuInstance,itemIcon:Se.itemIcon,expandIcon:Se.expandIcon,direction:Se.direction}},V.getMotion=function(ge,Se){var Me=Object(b.a)(V),Qe=Me.haveRendered,Ye=V.props,rt=Ye.motion,St=Ye.rootPrefixCls,kt=Object(U.a)(Object(U.a)({},rt),{},{leavedClassName:"".concat(St,"-hidden"),removeOnLeave:!1,motionAppear:Qe||!Se||ge!=="inline"});return kt};var Z=se.store,X=se.eventKey,ae=Z.getState(),oe=ae.defaultActiveFirst;V.isRootMenu=!1;var ye=!1;return oe&&(ye=oe[X]),bn(Z,X,ye),V.state={mode:se.mode,isOpen:se.isOpen},V}return Object(T.a)(ve,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var V=this,Z=this.props,X=Z.mode,ae=Z.parentMenu,oe=Z.manualRef,ye=Z.isOpen,ge=function(){V.setState({mode:X,isOpen:ye})},Se=ye!==this.state.isOpen,Me=X!==this.state.mode;if((Me||Se)&&(ze.a.cancel(this.updateStateRaf),Me?this.updateStateRaf=Object(ze.a)(ge):ge()),oe&&oe(this),X!=="horizontal"||!(ae==null?void 0:ae.isRootMenu)||!ye)return;this.minWidthTimeout=setTimeout(function(){return V.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var V=this.props,Z=V.onDestroy,X=V.eventKey;Z&&Z(X),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),ze.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(V,Z){var X=this.getBaseProps();return A.createElement(ji,Object(v.a)({},X,{id:this.internalMenuId,className:V,style:Z}),this.props.children)}},{key:"renderChildren",value:function(){var V=this,Z=this.getBaseProps(),X=Z.mode,ae=Z.visible,oe=Z.forceSubMenuRender,ye=Z.direction,ge=this.getMotion(X,ae);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||ae||oe,!this.haveOpened)return A.createElement("div",null);var Se=W()("".concat(Z.prefixCls,"-sub"),Object(ee.a)({},"".concat(Z.prefixCls,"-rtl"),ye==="rtl"));return this.isInlineMode()?A.createElement(G,Object(v.a)({visible:Z.visible,forceRender:oe},ge),function(Me){var Qe=Me.className,Ye=Me.style,rt=W()(Se,Qe);return V.renderPopupMenu(rt,Ye)}):this.renderPopupMenu(Se)}},{key:"render",value:function(){var V,Z,X,ae=Object(U.a)({},this.props),oe=this.getVisible(),ye=this.getPrefixCls(),ge=this.isInlineMode(),Se=this.getMode(),Me=W()(ye,"".concat(ye,"-").concat(Se),(V={},Object(ee.a)(V,ae.className,!!ae.className),Object(ee.a)(V,this.getOpenClassName(),oe),Object(ee.a)(V,this.getActiveClassName(),ae.active||oe&&!ge),Object(ee.a)(V,this.getDisabledClassName(),ae.disabled),Object(ee.a)(V,this.getSelectedClassName(),this.isChildrenSelected()),V));this.internalMenuId||(ae.eventKey?this.internalMenuId="".concat(ae.eventKey,"$Menu"):(yn+=1,this.internalMenuId="$__$".concat(yn,"$Menu")));var Qe={},Ye={},rt={};ae.disabled||(Qe={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},Ye={onClick:this.onTitleClick},rt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var St={},kt=ae.direction,It=kt==="rtl";ge&&(It?St.paddingRight=ae.inlineIndent*ae.level:St.paddingLeft=ae.inlineIndent*ae.level);var Bt={};this.getVisible()&&(Bt={"aria-owns":this.internalMenuId});var Ut=null;Se!=="horizontal"&&(Ut=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Ut=A.createElement(this.props.expandIcon,Object(U.a)({},this.props))));var Pt=A.createElement("div",Object(v.a)({ref:this.saveSubMenuTitle,style:St,className:"".concat(ye,"-title"),role:"button"},rt,Ye,{"aria-expanded":oe},Bt,{"aria-haspopup":"true",title:typeof ae.title=="string"?ae.title:void 0}),ae.title,Ut||A.createElement("i",{className:"".concat(ye,"-arrow")})),Nt=this.renderChildren(),Vt=((Z=ae.parentMenu)===null||Z===void 0?void 0:Z.isRootMenu)?ae.parentMenu.props.getPopupContainer:function(hn){return hn.parentNode},Ht=an[Se],pn=ae.popupOffset?{offset:ae.popupOffset}:{},nn=W()((X={},Object(ee.a)(X,ae.popupClassName,ae.popupClassName&&!ge),Object(ee.a)(X,"".concat(ye,"-rtl"),It),X)),wt=ae.disabled,xt=ae.triggerSubMenuAction,Kt=ae.subMenuOpenDelay,zt=ae.forceSubMenuRender,mt=ae.subMenuCloseDelay,Yt=ae.builtinPlacements;$.forEach(function(hn){return delete ae[hn]}),delete ae.onClick;var cn=It?Object(U.a)(Object(U.a)({},xi),Yt):Object(U.a)(Object(U.a)({},$n),Yt);delete ae.direction;var Xt=this.getBaseProps(),sn=ge?null:this.getMotion(Xt.mode,Xt.visible);return A.createElement("li",Object(v.a)({},ae,Qe,{className:Me,role:"menuitem"}),A.createElement(qn,{prefixCls:ye,popupClassName:W()("".concat(ye,"-popup"),nn),getPopupContainer:Vt,builtinPlacements:cn,popupPlacement:Ht,popupVisible:ge?!1:oe,popupAlign:pn,popup:ge?null:Nt,action:wt||ge?[]:[xt],mouseEnterDelay:Kt,mouseLeaveDelay:mt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:zt,popupMotion:sn},Pt),ge?Nt:null)}}]),ve}(A.Component);qt.defaultProps={onMouseEnter:Ge,onMouseLeave:Ge,onTitleMouseEnter:Ge,onTitleMouseLeave:Ge,onTitleClick:Ge,manualRef:Ge,mode:"vertical",title:""};var In=Object(c.b)(function(ne,fe){var ve=ne.openKeys,se=ne.activeKey,V=ne.selectedKeys,Z=fe.eventKey,X=fe.subMenuKey;return{isOpen:ve.indexOf(Z)>-1,active:se[X]===Z,selectedKeys:V}})(qt);In.isSubMenu=!0;var fn=In,ei="menuitem-overflowed",wn=.5,ai=function(ne){Object(d.a)(ve,ne);var fe=Object(g.a)(ve);function ve(){var se;return Object(x.a)(this,ve),se=fe.apply(this,arguments),se.resizeObserver=null,se.mutationObserver=null,se.originalTotalWidth=0,se.overflowedItems=[],se.menuItemSizes=[],se.cancelFrameId=null,se.state={lastVisibleIndex:void 0},se.childRef=A.createRef(),se.getMenuItemNodes=function(){var V=se.props.prefixCls,Z=se.childRef.current;return Z?[].slice.call(Z.children).filter(function(X){return X.className.split(" ").indexOf("".concat(V,"-overflowed-submenu"))<0}):[]},se.getOverflowedSubMenuItem=function(V,Z,X){var ae=se.props,oe=ae.overflowedIndicator,ye=ae.level,ge=ae.mode,Se=ae.prefixCls,Me=ae.theme;if(ye!==1||ge!=="horizontal")return null;var Qe=se.props.children[0],Ye=Qe.props,rt=Ye.children,St=Ye.title,kt=Ye.style,It=Object(R.a)(Ye,["children","title","style"]),Bt=Object(U.a)({},kt),Ut="".concat(V,"-overflowed-indicator"),Pt="".concat(V,"-overflowed-indicator");Z.length===0&&X!==!0?Bt=Object(U.a)(Object(U.a)({},Bt),{},{display:"none"}):X&&(Bt=Object(U.a)(Object(U.a)({},Bt),{},{visibility:"hidden",position:"absolute"}),Ut="".concat(Ut,"-placeholder"),Pt="".concat(Pt,"-placeholder"));var Nt=Me?"".concat(Se,"-").concat(Me):"",Vt={};return $.forEach(function(Ht){It[Ht]!==void 0&&(Vt[Ht]=It[Ht])}),A.createElement(fn,Object(v.a)({title:oe,className:"".concat(Se,"-overflowed-submenu"),popupClassName:Nt},Vt,{key:Ut,eventKey:Pt,disabled:!1,style:Bt}),Z)},se.setChildrenWidthAndResize=function(){if(se.props.mode!=="horizontal")return;var V=se.childRef.current;if(!V)return;var Z=V.children;if(!Z||Z.length===0)return;var X=V.children[Z.length-1];xe(X,"display","inline-block");var ae=se.getMenuItemNodes(),oe=ae.filter(function(ye){return ye.className.split(" ").indexOf(ei)>=0});oe.forEach(function(ye){xe(ye,"display","inline-block")}),se.menuItemSizes=ae.map(function(ye){return me(ye,!0)}),oe.forEach(function(ye){xe(ye,"display","none")}),se.overflowedIndicatorWidth=me(V.children[V.children.length-1],!0),se.originalTotalWidth=se.menuItemSizes.reduce(function(ye,ge){return ye+ge},0),se.handleResize(),xe(X,"display","none")},se.handleResize=function(){if(se.props.mode!=="horizontal")return;var V=se.childRef.current;if(!V)return;var Z=me(V);se.overflowedItems=[];var X=0,ae;se.originalTotalWidth>Z+wn&&(ae=-1,se.menuItemSizes.forEach(function(oe){X+=oe,X+se.overflowedIndicatorWidth<=Z&&(ae+=1)})),se.setState({lastVisibleIndex:ae})},se}return Object(T.a)(ve,[{key:"componentDidMount",value:function(){var V=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Z=this.childRef.current;if(!Z)return;this.resizeObserver=new Ie.default(function(X){X.forEach(function(){var ae=V.cancelFrameId;cancelAnimationFrame(ae),V.cancelFrameId=requestAnimationFrame(V.setChildrenWidthAndResize)})}),[].slice.call(Z.children).concat(Z).forEach(function(X){V.resizeObserver.observe(X)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){V.resizeObserver.disconnect(),[].slice.call(Z.children).concat(Z).forEach(function(X){V.resizeObserver.observe(X)}),V.setChildrenWidthAndResize()}),this.mutationObserver.observe(Z,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(V){var Z=this,X=this.state.lastVisibleIndex;return(V||[]).reduce(function(ae,oe,ye){var ge=oe;if(Z.props.mode==="horizontal"){var Se=Z.getOverflowedSubMenuItem(oe.props.eventKey,[]);X!==void 0&&Z.props.className.indexOf("".concat(Z.props.prefixCls,"-root"))!==-1&&(ye>X&&(ge=A.cloneElement(oe,{style:{display:"none"},eventKey:"".concat(oe.props.eventKey,"-hidden"),className:"".concat(ei)})),ye===X+1&&(Z.overflowedItems=V.slice(X+1).map(function(Qe){return A.cloneElement(Qe,{key:Qe.props.eventKey,mode:"vertical-left"})}),Se=Z.getOverflowedSubMenuItem(oe.props.eventKey,Z.overflowedItems)));var Me=[].concat(Object(C.a)(ae),[Se,ge]);return ye===V.length-1&&Me.push(Z.getOverflowedSubMenuItem(oe.props.eventKey,[],!0)),Me}return[].concat(Object(C.a)(ae),[ge])},[])}},{key:"render",value:function(){var V=this.props,Z=V.visible,X=V.prefixCls,ae=V.overflowedIndicator,oe=V.mode,ye=V.level,ge=V.tag,Se=V.children,Me=V.theme,Qe=Object(R.a)(V,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Ye=ge;return A.createElement(Ye,Object(v.a)({ref:this.childRef},Qe),this.renderChildren(Se))}}]),ve}(A.Component);ai.defaultProps={tag:"div",className:""};var wi=ai;function Si(ne){return ne.length?ne.every(function(fe){return!!fe.props.disabled}):!0}function mi(ne,fe,ve){var se=ne.getState();ne.setState({activeKey:Object(U.a)(Object(U.a)({},se.activeKey),{},Object(ee.a)({},fe,ve))})}function ti(ne){return ne.eventKey||"0-menu-"}function gi(ne,fe){var ve=fe,se=ne.children,V=ne.eventKey;if(ve){var Z;if(Ue(se,function(X,ae){X&&X.props&&!X.props.disabled&&ve===it(X,V,ae)&&(Z=!0)}),Z)return ve}return ve=null,ne.defaultActiveFirst&&Ue(se,function(X,ae){!ve&&X&&!X.props.disabled&&(ve=it(X,V,ae))}),ve}function Tr(ne){if(!ne)return;var fe=this.instanceArray.indexOf(ne);fe!==-1?this.instanceArray[fe]=ne:this.instanceArray.push(ne)}var Fi=function(ne){Object(d.a)(ve,ne);var fe=Object(g.a)(ve);function ve(se){var V;return Object(x.a)(this,ve),V=fe.call(this,se),V.onKeyDown=function(Z,X){var ae=Z.keyCode,oe;if(V.getFlatInstanceArray().forEach(function(ge){ge&&ge.props.active&&ge.onKeyDown&&(oe=ge.onKeyDown(Z))}),oe)return 1;var ye=null;return(ae===u.a.UP||ae===u.a.DOWN)&&(ye=V.step(ae===u.a.UP?-1:1)),ye?(Z.preventDefault(),mi(V.props.store,ti(V.props),ye.props.eventKey),typeof X=="function"&&X(ye),1):void 0},V.onItemHover=function(Z){var X=Z.key,ae=Z.hover;mi(V.props.store,ti(V.props),ae?X:null)},V.onDeselect=function(Z){V.props.onDeselect(Z)},V.onSelect=function(Z){V.props.onSelect(Z)},V.onClick=function(Z){V.props.onClick(Z)},V.onOpenChange=function(Z){V.props.onOpenChange(Z)},V.onDestroy=function(Z){V.props.onDestroy(Z)},V.getFlatInstanceArray=function(){return V.instanceArray},V.step=function(Z){var X=V.getFlatInstanceArray(),ae=V.props.store.getState().activeKey[ti(V.props)],oe=X.length;if(!oe)return null;Z<0&&(X=X.concat().reverse());var ye=-1;if(X.every(function(Qe,Ye){return Qe&&Qe.props.eventKey===ae?(ye=Ye,!1):!0}),!V.props.defaultActiveFirst&&ye!==-1&&Si(X.slice(ye,oe-1)))return;var ge=(ye+1)%oe,Se=ge;do{var Me=X[Se];if(!Me||Me.props.disabled)Se=(Se+1)%oe;else return Me}while(Se!==ge);return null},V.renderCommonMenuItem=function(Z,X,ae){var oe=V.props.store.getState(),ye=Object(b.a)(V),ge=ye.props,Se=it(Z,ge.eventKey,X),Me=Z.props;if(!Me||typeof Z.type=="string")return Z;var Qe=Se===oe.activeKey,Ye=Object(U.a)(Object(U.a)({mode:Me.mode||ge.mode,level:ge.level,inlineIndent:ge.inlineIndent,renderMenuItem:V.renderMenuItem,rootPrefixCls:ge.prefixCls,index:X,parentMenu:ge.parentMenu,manualRef:Me.disabled?void 0:Object(r.a)(Z.ref,Tr.bind(Object(b.a)(V))),eventKey:Se,active:!Me.disabled&&Qe,multiple:ge.multiple,onClick:function(St){(Me.onClick||Ge)(St),V.onClick(St)},onItemHover:V.onItemHover,motion:ge.motion,subMenuOpenDelay:ge.subMenuOpenDelay,subMenuCloseDelay:ge.subMenuCloseDelay,forceSubMenuRender:ge.forceSubMenuRender,onOpenChange:V.onOpenChange,onDeselect:V.onDeselect,onSelect:V.onSelect,builtinPlacements:ge.builtinPlacements,itemIcon:Me.itemIcon||V.props.itemIcon,expandIcon:Me.expandIcon||V.props.expandIcon},ae),{},{direction:ge.direction});return(ge.mode==="inline"||Ee())&&(Ye.triggerSubMenuAction="click"),A.cloneElement(Z,Object(U.a)(Object(U.a)({},Ye),{},{key:Se||X}))},V.renderMenuItem=function(Z,X,ae){if(!Z)return null;var oe=V.props.store.getState(),ye={openKeys:oe.openKeys,selectedKeys:oe.selectedKeys,triggerSubMenuAction:V.props.triggerSubMenuAction,subMenuKey:ae};return V.renderCommonMenuItem(Z,X,ye)},se.store.setState({activeKey:Object(U.a)(Object(U.a)({},se.store.getState().activeKey),{},Object(ee.a)({},se.eventKey,gi(se,se.activeKey)))}),V.instanceArray=[],V}return Object(T.a)(ve,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(V){return this.props.visible||V.visible||this.props.className!==V.className||!D()(this.props.style,V.style)}},{key:"componentDidUpdate",value:function(V){var Z=this.props,X="activeKey"in Z?Z.activeKey:Z.store.getState().activeKey[ti(Z)],ae=gi(Z,X);if(ae!==X)mi(Z.store,ti(Z),ae);else if("activeKey"in V){var oe=gi(V,V.activeKey);ae!==oe&&mi(Z.store,ti(Z),ae)}}},{key:"render",value:function(){var V=this,Z=Object(v.a)({},this.props);this.instanceArray=[];var X=W()(Z.prefixCls,Z.className,"".concat(Z.prefixCls,"-").concat(Z.mode)),ae={className:X,role:Z.role||"menu"};Z.id&&(ae.id=Z.id),Z.focusable&&(ae.tabIndex=0,ae.onKeyDown=this.onKeyDown);var oe=Z.prefixCls,ye=Z.eventKey,ge=Z.visible,Se=Z.level,Me=Z.mode,Qe=Z.overflowedIndicator,Ye=Z.theme;return $.forEach(function(rt){return delete Z[rt]}),delete Z.onClick,A.createElement(wi,Object(v.a)({},Z,{prefixCls:oe,mode:Me,tag:"ul",level:Se,theme:Ye,visible:ge,overflowedIndicator:Qe},ae),Object(j.a)(Z.children).map(function(rt,St){return V.renderMenuItem(rt,St,ye||"0-menu-")}))}}]),ve}(A.Component);Fi.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:Ge};var xr=Object(c.b)()(Fi),ji=xr,wr=F("Kwbf");function Sr(ne,fe,ve){var se=ne.prefixCls,V=ne.motion,Z=ne.defaultMotions,X=Z===void 0?{}:Z,ae=ne.openAnimation,oe=ne.openTransitionName,ye=fe.switchingModeFromInline;if(V)return V;if(Object(L.a)(ae)==="object"&&ae)Object(wr.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof ae=="string")return{motionName:"".concat(se,"-open-").concat(ae)};if(oe)return{motionName:oe};var ge=X[ve];return ge||(ye?null:X.other)}var Hi=function(ne){Object(d.a)(ve,ne);var fe=Object(g.a)(ve);function ve(se){var V;Object(x.a)(this,ve),V=fe.call(this,se),V.onSelect=function(ae){var oe=Object(b.a)(V),ye=oe.props;if(ye.selectable){var ge=V.store.getState(),Se=ge.selectedKeys,Me=ae.key;ye.multiple?Se=Se.concat([Me]):Se=[Me],"selectedKeys"in ye||V.store.setState({selectedKeys:Se}),ye.onSelect(Object(U.a)(Object(U.a)({},ae),{},{selectedKeys:Se}))}},V.onClick=function(ae){var oe=V.getRealMenuMode(),ye=Object(b.a)(V),ge=ye.store,Se=ye.props.onOpenChange;oe!=="inline"&&!("openKeys"in V.props)&&(ge.setState({openKeys:[]}),Se([])),V.props.onClick(ae)},V.onKeyDown=function(ae,oe){V.innerMenu.getWrappedInstance().onKeyDown(ae,oe)},V.onOpenChange=function(ae){var oe=Object(b.a)(V),ye=oe.props,ge=V.store.getState().openKeys.concat(),Se=!1,Me=function(Ye){var rt=!1;if(Ye.open)rt=ge.indexOf(Ye.key)===-1,rt&&ge.push(Ye.key);else{var St=ge.indexOf(Ye.key);rt=St!==-1,rt&&ge.splice(St,1)}Se=Se||rt};Array.isArray(ae)?ae.forEach(Me):Me(ae),Se&&("openKeys"in V.props||V.store.setState({openKeys:ge}),ye.onOpenChange(ge))},V.onDeselect=function(ae){var oe=Object(b.a)(V),ye=oe.props;if(ye.selectable){var ge=V.store.getState().selectedKeys.concat(),Se=ae.key,Me=ge.indexOf(Se);Me!==-1&&ge.splice(Me,1),"selectedKeys"in ye||V.store.setState({selectedKeys:ge}),ye.onDeselect(Object(U.a)(Object(U.a)({},ae),{},{selectedKeys:ge}))}},V.onMouseEnter=function(ae){V.restoreModeVerticalFromInline();var oe=V.props.onMouseEnter;oe&&oe(ae)},V.onTransitionEnd=function(ae){var oe=ae.propertyName==="width"&&ae.target===ae.currentTarget,ye=ae.target.className,ge=Object.prototype.toString.call(ye)==="[object SVGAnimatedString]"?ye.animVal:ye,Se=ae.propertyName==="font-size"&&ge.indexOf("anticon")>=0;(oe||Se)&&V.restoreModeVerticalFromInline()},V.setInnerMenu=function(ae){V.innerMenu=ae},V.isRootMenu=!0;var Z=se.defaultSelectedKeys,X=se.defaultOpenKeys;return"selectedKeys"in se&&(Z=se.selectedKeys||[]),"openKeys"in se&&(X=se.openKeys||[]),V.store=Object(c.c)({selectedKeys:Z,openKeys:X,activeKey:{"0-menu-":gi(se,se.activeKey)}}),V.state={switchingModeFromInline:!1,prevProps:se,inlineOpenKeys:[],store:V.store},V}return Object(T.a)(ve,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(V){var Z=this.props,X=Z.siderCollapsed,ae=Z.inlineCollapsed,oe=Z.onOpenChange;(!V.inlineCollapsed&&ae||!V.siderCollapsed&&X)&&oe([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var V=this.props.collapsedWidth,Z=this.store,X=this.prevOpenKeys,ae=this.getInlineCollapsed()&&(V===0||V==="0"||V==="0px");ae?(this.prevOpenKeys=Z.getState().openKeys.concat(),this.store.setState({openKeys:[]})):X&&(this.store.setState({openKeys:X}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var V=this.props.mode,Z=this.state.switchingModeFromInline,X=this.getInlineCollapsed();return Z&&X?"inline":X?"vertical":V}},{key:"getInlineCollapsed",value:function(){var V=this.props,Z=V.inlineCollapsed,X=V.siderCollapsed;return X!==void 0?X:Z}},{key:"restoreModeVerticalFromInline",value:function(){var V=this.state.switchingModeFromInline;V&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var V=Object(U.a)({},Object(y.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Z=this.getRealMenuMode();return V.className+=" ".concat(V.prefixCls,"-root"),V.direction==="rtl"&&(V.className+=" ".concat(V.prefixCls,"-rtl")),V=Object(U.a)(Object(U.a)({},V),{},{mode:Z,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Sr(this.props,this.state,Z)}),delete V.openAnimation,delete V.openTransitionName,A.createElement(c.a,{store:this.store},A.createElement(ji,Object(v.a)({},V,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(V,Z){var X=Z.prevProps,ae=Z.store,oe=ae.getState(),ye={},ge={prevProps:V};return X.mode==="inline"&&V.mode!=="inline"&&(ge.switchingModeFromInline=!0),"openKeys"in V?ye.openKeys=V.openKeys||[]:((V.inlineCollapsed&&!X.inlineCollapsed||V.siderCollapsed&&!X.siderCollapsed)&&(ge.switchingModeFromInline=!0,ge.inlineOpenKeys=oe.openKeys,ye.openKeys=[]),(!V.inlineCollapsed&&X.inlineCollapsed||!V.siderCollapsed&&X.siderCollapsed)&&(ye.openKeys=Z.inlineOpenKeys,ge.inlineOpenKeys=[])),Object.keys(ye).length&&ae.setState(ye),ge}}]),ve}(A.Component);Hi.defaultProps={selectable:!0,onClick:Ge,onSelect:Ge,onOpenChange:Ge,onDeselect:Ge,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:A.createElement("span",null,"\xB7\xB7\xB7")};var Ar=Hi,Ai=function(ne){Object(d.a)(ve,ne);var fe=Object(g.a)(ve);function ve(){var se;return Object(x.a)(this,ve),se=fe.apply(this,arguments),se.onKeyDown=function(V){var Z=V.keyCode;return Z===u.a.ENTER?(se.onClick(V),!0):void 0},se.onMouseLeave=function(V){var Z=se.props,X=Z.eventKey,ae=Z.onItemHover,oe=Z.onMouseLeave;ae({key:X,hover:!1}),oe({key:X,domEvent:V})},se.onMouseEnter=function(V){var Z=se.props,X=Z.eventKey,ae=Z.onItemHover,oe=Z.onMouseEnter;ae({key:X,hover:!0}),oe({key:X,domEvent:V})},se.onClick=function(V){var Z=se.props,X=Z.eventKey,ae=Z.multiple,oe=Z.onClick,ye=Z.onSelect,ge=Z.onDeselect,Se=Z.isSelected,Me={key:X,keyPath:[X],item:Object(b.a)(se),domEvent:V};oe(Me),ae?Se?ge(Me):ye(Me):Se||ye(Me)},se.saveNode=function(V){se.node=V},se}return Object(T.a)(ve,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var V=this.props;V.onDestroy&&V.onDestroy(V.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var V,Z=Object(U.a)({},this.props),X=W()(this.getPrefixCls(),Z.className,(V={},Object(ee.a)(V,this.getActiveClassName(),!Z.disabled&&Z.active),Object(ee.a)(V,this.getSelectedClassName(),Z.isSelected),Object(ee.a)(V,this.getDisabledClassName(),Z.disabled),V)),ae=Object(U.a)(Object(U.a)({},Z.attribute),{},{title:typeof Z.title=="string"?Z.title:void 0,className:X,role:Z.role||"menuitem","aria-disabled":Z.disabled});Z.role==="option"?ae=Object(U.a)(Object(U.a)({},ae),{},{role:"option","aria-selected":Z.isSelected}):(Z.role===null||Z.role==="none")&&(ae.role="none");var oe={onClick:Z.disabled?null:this.onClick,onMouseLeave:Z.disabled?null:this.onMouseLeave,onMouseEnter:Z.disabled?null:this.onMouseEnter},ye=Object(U.a)({},Z.style);Z.mode==="inline"&&(Z.direction==="rtl"?ye.paddingRight=Z.inlineIndent*Z.level:ye.paddingLeft=Z.inlineIndent*Z.level),$.forEach(function(Se){return delete Z[Se]}),delete Z.direction;var ge=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(ge=A.createElement(this.props.itemIcon,this.props)),A.createElement("li",Object(v.a)({},Object(y.a)(Z,["onClick","onMouseEnter","onMouseLeave","onSelect"]),ae,oe,{style:ye,ref:this.saveNode}),Z.children,ge)}}]),ve}(A.Component);Ai.isMenuItem=!0,Ai.defaultProps={onSelect:Ge,onMouseEnter:Ge,onMouseLeave:Ge,manualRef:Ge};var Cr=Object(c.b)(function(ne,fe){var ve=ne.activeKey,se=ne.selectedKeys,V=fe.eventKey,Z=fe.subMenuKey;return{active:ve[Z]===V,isSelected:Array.isArray(se)?se.indexOf(V)!==-1:se===V}})(Ai),Or=Cr,Ci=function(ne){Object(d.a)(ve,ne);var fe=Object(g.a)(ve);function ve(){var se;return Object(x.a)(this,ve),se=fe.apply(this,arguments),se.renderInnerMenuItem=function(V){var Z=se.props,X=Z.renderMenuItem,ae=Z.index;return X(V,ae,se.props.subMenuKey)},se}return Object(T.a)(ve,[{key:"render",value:function(){var V=Object(v.a)({},this.props),Z=V.className,X=Z===void 0?"":Z,ae=V.rootPrefixCls,oe="".concat(ae,"-item-group-title"),ye="".concat(ae,"-item-group-list"),ge=V.title,Se=V.children;return $.forEach(function(Me){return delete V[Me]}),delete V.direction,A.createElement("li",Object(v.a)({},V,{onClick:function(Qe){return Qe.stopPropagation()},className:"".concat(X," ").concat(ae,"-item-group")}),A.createElement("div",{className:oe,title:typeof ge=="string"?ge:void 0},ge),A.createElement("ul",{className:ye},A.Children.map(Se,this.renderInnerMenuItem)))}}]),ve}(A.Component);Ci.isMenuItemGroup=!0,Ci.defaultProps={disabled:!0};var fa=Ci,Wi=function(fe){var ve=fe.className,se=fe.rootPrefixCls,V=fe.style;return A.createElement("li",{className:"".concat(ve," ").concat(se,"-item-divider"),style:V})};Wi.defaultProps={disabled:!0,className:"",style:{}};var pa=Wi,Rr=Ar,Ir=F("eDIo");function Lr(ne,fe){var ve=ne.prefixCls,se=ne.editable,V=ne.locale,Z=ne.style;return!se||se.showAdd===!1?null:A.createElement("button",{ref:fe,type:"button",className:"".concat(ve,"-nav-add"),style:Z,"aria-label":(V==null?void 0:V.addAriaLabel)||"Add tab",onClick:function(ae){se.onEdit("add",{event:ae})}},se.addIcon||"+")}var Ki=A.forwardRef(Lr);function Dr(ne,fe){var ve=ne.prefixCls,se=ne.id,V=ne.tabs,Z=ne.locale,X=ne.mobile,ae=ne.moreIcon,oe=ae===void 0?"More":ae,ye=ne.moreTransitionName,ge=ne.style,Se=ne.className,Me=ne.editable,Qe=ne.tabBarGutter,Ye=ne.rtl,rt=ne.onTabClick,St=Object(A.useState)(!1),kt=Object(P.a)(St,2),It=kt[0],Bt=kt[1],Ut=Object(A.useState)(null),Pt=Object(P.a)(Ut,2),Nt=Pt[0],Vt=Pt[1],Ht="".concat(se,"-more-popup"),pn="".concat(ve,"-dropdown"),nn=Nt!==null?"".concat(Ht,"-").concat(Nt):null,wt=Z==null?void 0:Z.dropdownAriaLabel,xt=A.createElement(Rr,{onClick:function(sn){var hn=sn.key,Sn=sn.domEvent;rt(hn,Sn),Bt(!1)},id:Ht,tabIndex:-1,role:"listbox","aria-activedescendant":nn,selectedKeys:[Nt],"aria-label":wt!==void 0?wt:"expanded dropdown"},V.map(function(Xt){return A.createElement(Or,{key:Xt.key,id:"".concat(Ht,"-").concat(Xt.key),role:"option","aria-controls":se&&"".concat(se,"-panel-").concat(Xt.key),disabled:Xt.disabled},Xt.tab)}));function Kt(Xt){for(var sn=V.filter(function(Mn){return!Mn.disabled}),hn=sn.findIndex(function(Mn){return Mn.key===Nt})||0,Sn=sn.length,Dn=0;Dn<Sn;Dn+=1){hn=(hn+Xt+Sn)%Sn;var gn=sn[hn];if(!gn.disabled){Vt(gn.key);return}}}function zt(Xt){var sn=Xt.which;if(!It){[u.a.DOWN,u.a.SPACE,u.a.ENTER].includes(sn)&&(Bt(!0),Xt.preventDefault());return}switch(sn){case u.a.UP:Kt(-1),Xt.preventDefault();break;case u.a.DOWN:Kt(1),Xt.preventDefault();break;case u.a.ESC:Bt(!1);break;case u.a.SPACE:case u.a.ENTER:Nt!==null&&rt(Nt,Xt);break}}Object(A.useEffect)(function(){var Xt=document.getElementById(nn);Xt&&Xt.scrollIntoView&&Xt.scrollIntoView(!1)},[Nt]),Object(A.useEffect)(function(){It||Vt(null)},[It]);var mt=Object(ee.a)({},Ye?"marginLeft":"marginRight",Qe);V.length||(mt.visibility="hidden",mt.order=1);var Yt=W()(Object(ee.a)({},"".concat(pn,"-rtl"),Ye)),cn=X?null:A.createElement(Ir.a,{prefixCls:pn,overlay:xt,trigger:["hover"],visible:It,transitionName:ye,onVisibleChange:Bt,overlayClassName:Yt,mouseEnterDelay:.1,mouseLeaveDelay:.1},A.createElement("button",{type:"button",className:"".concat(ve,"-nav-more"),style:mt,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":Ht,id:"".concat(se,"-more"),"aria-expanded":It,onKeyDown:zt},oe));return A.createElement("div",{className:W()("".concat(ve,"-nav-operations"),Se),style:ge,ref:fe},cn,A.createElement(Ki,{prefixCls:ve,locale:Z,editable:Me}))}var Mr=A.forwardRef(Dr),Oi=Object(A.createContext)(null),Pr=.1,Gi=.01,vi=20,zi=Math.pow(.995,vi);function Nr(){var ne=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(ne)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(ne.substr(0,4)))}function kr(ne,fe){var ve=Object(A.useState)(),se=Object(P.a)(ve,2),V=se[0],Z=se[1],X=Object(A.useState)(0),ae=Object(P.a)(X,2),oe=ae[0],ye=ae[1],ge=Object(A.useState)(0),Se=Object(P.a)(ge,2),Me=Se[0],Qe=Se[1],Ye=Object(A.useState)(),rt=Object(P.a)(Ye,2),St=rt[0],kt=rt[1],It=Object(A.useRef)();function Bt(wt){var xt=wt.touches[0],Kt=xt.screenX,zt=xt.screenY;Z({x:Kt,y:zt}),window.clearInterval(It.current)}function Ut(wt){if(!V)return;wt.preventDefault();var xt=wt.touches[0],Kt=xt.screenX,zt=xt.screenY;Z({x:Kt,y:zt});var mt=Kt-V.x,Yt=zt-V.y;fe(mt,Yt);var cn=Date.now();ye(cn),Qe(cn-oe),kt({x:mt,y:Yt})}function Pt(){if(!V)return;if(Z(null),kt(null),St){var wt=St.x/Me,xt=St.y/Me,Kt=Math.abs(wt),zt=Math.abs(xt);if(Math.max(Kt,zt)<Pr)return;var mt=wt,Yt=xt;It.current=window.setInterval(function(){if(Math.abs(mt)<Gi&&Math.abs(Yt)<Gi){window.clearInterval(It.current);return}mt*=zi,Yt*=zi,fe(mt*vi,Yt*vi)},vi)}}var Nt=Object(A.useRef)(0),Vt=Object(A.useRef)(!1),Ht=Object(A.useRef)();function pn(wt){var xt=wt.deltaX,Kt=wt.deltaY,zt=0,mt=Math.abs(xt),Yt=Math.abs(Kt);mt===Yt?zt=Ht.current==="x"?xt:Kt:mt>Yt?(zt=xt,Ht.current="x"):(zt=Kt,Ht.current="y");var cn=Date.now();cn-Nt.current>100&&(Vt.current=!1),(fe(-zt,-zt)||Vt.current)&&(wt.preventDefault(),Vt.current=!0),Nt.current=cn}var nn=Object(A.useRef)(null);nn.current={onTouchStart:Bt,onTouchMove:Ut,onTouchEnd:Pt,onWheel:pn},A.useEffect(function(){function wt(mt){nn.current.onTouchStart(mt)}function xt(mt){nn.current.onTouchMove(mt)}function Kt(mt){nn.current.onTouchEnd(mt)}function zt(mt){nn.current.onWheel(mt)}return document.addEventListener("touchmove",xt,{passive:!1}),document.addEventListener("touchend",Kt,{passive:!1}),ne.current.addEventListener("touchstart",wt,{passive:!1}),ne.current.addEventListener("wheel",zt),function(){document.removeEventListener("touchmove",xt),document.removeEventListener("touchend",Kt)}},[])}function Ur(){var ne=Object(A.useRef)(new Map);function fe(se){return ne.current.has(se)||ne.current.set(se,A.createRef()),ne.current.get(se)}function ve(se){ne.current.delete(se)}return[fe,ve]}function Vi(ne,fe){var ve=A.useRef(ne),se=A.useState({}),V=Object(P.a)(se,2),Z=V[1];function X(ae){var oe=typeof ae=="function"?ae(ve.current):ae;oe!==ve.current&&fe(oe,ve.current),ve.current=oe,Z({})}return[ve.current,X]}var Yi=function(fe){var ve=fe.position,se=fe.prefixCls,V=fe.extra;if(!V)return null;var Z,X=V;return ve==="right"&&(Z=X.right||!X.left&&X||null),ve==="left"&&(Z=X.left||null),Z?A.createElement("div",{className:"".concat(se,"-extra-content")},Z):null};function Br(ne,fe){var ve,se=A.useContext(Oi),V=se.prefixCls,Z=se.tabs,X=ne.className,ae=ne.style,oe=ne.id,ye=ne.animated,ge=ne.activeKey,Se=ne.rtl,Me=ne.extra,Qe=ne.editable,Ye=ne.locale,rt=ne.tabPosition,St=ne.tabBarGutter,kt=ne.children,It=ne.onTabClick,Bt=ne.onTabScroll,Ut=Object(A.useRef)(),Pt=Object(A.useRef)(),Nt=Object(A.useRef)(),Vt=Object(A.useRef)(),Ht=Ur(),pn=Object(P.a)(Ht,2),nn=pn[0],wt=pn[1],xt=rt==="top"||rt==="bottom",Kt=Vi(0,function(rn,Gt){xt&&Bt&&Bt({direction:rn>Gt?"left":"right"})}),zt=Object(P.a)(Kt,2),mt=zt[0],Yt=zt[1],cn=Vi(0,function(rn,Gt){!xt&&Bt&&Bt({direction:rn>Gt?"top":"bottom"})}),Xt=Object(P.a)(cn,2),sn=Xt[0],hn=Xt[1],Sn=Object(A.useState)(0),Dn=Object(P.a)(Sn,2),gn=Dn[0],Mn=Dn[1],Fn=Object(A.useState)(0),Pn=Object(P.a)(Fn,2),Nn=Pn[0],vn=Pn[1],Ln=Object(A.useState)(0),An=Object(P.a)(Ln,2),_n=An[0],Wn=An[1],Kn=Object(A.useState)(0),Yn=Object(P.a)(Kn,2),ln=Yn[0],Hn=Yn[1],Xn=Object(A.useState)(null),dn=Object(P.a)(Xn,2),tn=dn[0],Cn=dn[1],Kr=Object(A.useState)(null),qi=Object(P.a)(Kr,2),ni=qi[0],Gr=qi[1],zr=Object(A.useState)(0),$i=Object(P.a)(zr,2),Vr=$i[0],Yr=$i[1],Xr=Object(A.useState)(0),er=Object(P.a)(Xr,2),Jr=er[0],Qr=er[1],Zr=s(new Map),tr=Object(P.a)(Zr,2),qr=tr[0],$r=tr[1],yi=t(Z,qr,gn),nr="".concat(V,"-nav-operations-hidden"),si=0,oi=0;xt?Se?(si=0,oi=Math.max(0,gn-tn)):(si=Math.min(0,tn-gn),oi=0):(si=Math.min(0,ni-Nn),oi=0);function Ri(rn){return rn<si?[si,!1]:rn>oi?[oi,!1]:[rn,!0]}var ir=Object(A.useRef)(),ea=Object(A.useState)(),rr=Object(P.a)(ea,2),Ii=rr[0],ar=rr[1];function Li(){ar(Date.now())}function Di(){window.clearTimeout(ir.current)}kr(Ut,function(rn,Gt){var En=!1;function kn(ui,ci){ui(function(di){var hi=Ri(di+ci),ii=Object(P.a)(hi,2),ki=ii[0],Ui=ii[1];return En=Ui,ki})}if(xt){if(tn>=gn)return En;kn(Yt,rn)}else{if(ni>=Nn)return En;kn(hn,Gt)}return Di(),Li(),En}),Object(A.useEffect)(function(){return Di(),Ii&&(ir.current=window.setTimeout(function(){ar(0)},100)),Di},[Ii]);function sr(){var rn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ge,Gt=yi.get(rn);if(!Gt)return;if(xt){var En=mt;Se?Gt.right<mt?En=Gt.right:Gt.right+Gt.width>mt+tn&&(En=Gt.right+Gt.width-tn):Gt.left<-mt?En=-Gt.left:Gt.left+Gt.width>-mt+tn&&(En=-(Gt.left+Gt.width-tn)),hn(0),Yt(Ri(En)[0])}else{var kn=sn;Gt.top<-sn?kn=-Gt.top:Gt.top+Gt.height>-sn+ni&&(kn=-(Gt.top+Gt.height-ni)),Yt(0),hn(Ri(kn)[0])}}var ta=p(yi,{width:tn,height:ni,left:mt,top:sn},{width:_n,height:ln},{width:Vr,height:Jr},Object(U.a)(Object(U.a)({},ne),{},{tabs:Z})),or=Object(P.a)(ta,2),na=or[0],ia=or[1],ra=Z.map(function(rn){var Gt=rn.key;return A.createElement(a,{id:oe,prefixCls:V,key:Gt,rtl:Se,tab:rn,closable:rn.closable,editable:Qe,active:Gt===ge,tabPosition:rt,tabBarGutter:St,renderWrapper:kt,removeAriaLabel:Ye==null?void 0:Ye.removeAriaLabel,ref:nn(Gt),onClick:function(kn){It(Gt,kn)},onRemove:function(){wt(Gt)},onFocus:function(){sr(Gt),Li(),Se||(Ut.current.scrollLeft=0),Ut.current.scrollTop=0}})}),Mi=i(function(){var rn,Gt,En,kn,ui,ci,di,hi,ii,ki=((rn=Ut.current)===null||rn===void 0?void 0:rn.offsetWidth)||0,Ui=((Gt=Ut.current)===null||Gt===void 0?void 0:Gt.offsetHeight)||0,mr=((En=Vt.current)===null||En===void 0?void 0:En.offsetWidth)||0,gr=((kn=Vt.current)===null||kn===void 0?void 0:kn.offsetHeight)||0,ca=((ui=Nt.current)===null||ui===void 0?void 0:ui.offsetWidth)||0,da=((ci=Nt.current)===null||ci===void 0?void 0:ci.offsetHeight)||0;Cn(ki),Gr(Ui),Yr(mr),Qr(gr);var vr=(((di=Pt.current)===null||di===void 0?void 0:di.offsetWidth)||0)-mr,yr=(((hi=Pt.current)===null||hi===void 0?void 0:hi.offsetHeight)||0)-gr;Mn(vr),vn(yr);var br=(ii=Nt.current)===null||ii===void 0?void 0:ii.className.includes(nr);Wn(vr-(br?0:ca)),Hn(yr-(br?0:da)),$r(function(){var _r=new Map;return Z.forEach(function(ha){var Er=ha.key,fi=nn(Er).current;fi&&_r.set(Er,{width:fi.offsetWidth,height:fi.offsetHeight,left:fi.offsetLeft,top:fi.offsetTop})}),_r})}),aa=Z.slice(0,na),sa=Z.slice(ia+1),lr=[].concat(Object(C.a)(aa),Object(C.a)(sa)),oa=Object(A.useState)(),ur=Object(P.a)(oa,2),la=ur[0],ua=ur[1],Gn=yi.get(ge),cr=Object(A.useRef)();function dr(){h.a.cancel(cr.current)}Object(A.useEffect)(function(){var rn={};return Gn&&(xt?(Se?rn.right=Gn.right:rn.left=Gn.left,rn.width=Gn.width):(rn.top=Gn.top,rn.height=Gn.height)),dr(),cr.current=h()(function(){ua(rn)}),dr},[Gn,xt,Se]),Object(A.useEffect)(function(){sr()},[ge,Gn,yi,xt]),Object(A.useEffect)(function(){Mi()},[Se,St,ge,Z.map(function(rn){return rn.key}).join("_")]);var hr=!!lr.length,li="".concat(V,"-nav-wrap"),Pi,Ni,fr,pr;return xt?Se?(Ni=mt>0,Pi=mt+tn<gn):(Pi=mt<0,Ni=-mt+tn<gn):(fr=sn<0,pr=-sn+ni<Nn),A.createElement("div",{ref:fe,role:"tablist",className:W()("".concat(V,"-nav"),X),style:ae,onKeyDown:function(){Li()}},A.createElement(Yi,{position:"left",extra:Me,prefixCls:V}),A.createElement(l.a,{onResize:Mi},A.createElement("div",{className:W()(li,(ve={},Object(ee.a)(ve,"".concat(li,"-ping-left"),Pi),Object(ee.a)(ve,"".concat(li,"-ping-right"),Ni),Object(ee.a)(ve,"".concat(li,"-ping-top"),fr),Object(ee.a)(ve,"".concat(li,"-ping-bottom"),pr),ve)),ref:Ut},A.createElement(l.a,{onResize:Mi},A.createElement("div",{ref:Pt,className:"".concat(V,"-nav-list"),style:{transform:"translate(".concat(mt,"px, ").concat(sn,"px)"),transition:Ii?"none":void 0}},ra,A.createElement(Ki,{ref:Vt,prefixCls:V,locale:Ye,editable:Qe,style:{visibility:hr?"hidden":null}}),A.createElement("div",{className:W()("".concat(V,"-ink-bar"),Object(ee.a)({},"".concat(V,"-ink-bar-animated"),ye.inkBar)),style:la}))))),A.createElement(Mr,Object.assign({},ne,{ref:Nt,prefixCls:V,tabs:lr,className:!hr&&nr})),A.createElement(Yi,{position:"right",extra:Me,prefixCls:V}))}var Xi=A.forwardRef(Br);function Fr(ne){var fe=ne.id,ve=ne.activeKey,se=ne.animated,V=ne.tabPosition,Z=ne.rtl,X=ne.destroyInactiveTabPane,ae=A.useContext(Oi),oe=ae.prefixCls,ye=ae.tabs,ge=se.tabPane,Se=ye.findIndex(function(Me){return Me.key===ve});return A.createElement("div",{className:W()("".concat(oe,"-content-holder"))},A.createElement("div",{className:W()("".concat(oe,"-content"),"".concat(oe,"-content-").concat(V),Object(ee.a)({},"".concat(oe,"-content-animated"),ge)),style:Se&&ge?Object(ee.a)({},Z?"marginRight":"marginLeft","-".concat(Se,"00%")):null},ye.map(function(Me){return A.cloneElement(Me.node,{key:Me.key,prefixCls:oe,tabKey:Me.key,id:fe,animated:ge,active:Me.key===ve,destroyInactiveTabPane:X})})))}function Ji(ne){var fe=ne.prefixCls,ve=ne.forceRender,se=ne.className,V=ne.style,Z=ne.id,X=ne.active,ae=ne.animated,oe=ne.destroyInactiveTabPane,ye=ne.tabKey,ge=ne.children,Se=A.useState(ve),Me=Object(P.a)(Se,2),Qe=Me[0],Ye=Me[1];A.useEffect(function(){X?Ye(!0):oe&&Ye(!1)},[X,oe]);var rt={};return X||(ae?(rt.visibility="hidden",rt.height=0,rt.overflowY="hidden"):rt.display="none"),A.createElement("div",{id:Z&&"".concat(Z,"-panel-").concat(ye),role:"tabpanel",tabIndex:X?0:-1,"aria-labelledby":Z&&"".concat(Z,"-tab-").concat(ye),"aria-hidden":!X,style:Object(U.a)(Object(U.a)({},rt),V),className:W()("".concat(fe,"-tabpane"),X&&"".concat(fe,"-tabpane-active"),se)},(X||Qe||ve)&&ge)}var Qi=0;function jr(ne){return Object(j.a)(ne).map(function(fe){if(A.isValidElement(fe)){var ve=fe.key!==void 0?String(fe.key):void 0;return Object(U.a)(Object(U.a)({key:ve},fe.props),{},{node:fe})}return null}).filter(function(fe){return fe})}function Hr(ne,fe){var ve,se=ne.id,V=ne.prefixCls,Z=V===void 0?"rc-tabs":V,X=ne.className,ae=ne.children,oe=ne.direction,ye=ne.activeKey,ge=ne.defaultActiveKey,Se=ne.editable,Me=ne.animated,Qe=ne.tabPosition,Ye=Qe===void 0?"top":Qe,rt=ne.tabBarGutter,St=ne.tabBarStyle,kt=ne.tabBarExtraContent,It=ne.locale,Bt=ne.moreIcon,Ut=ne.moreTransitionName,Pt=ne.destroyInactiveTabPane,Nt=ne.renderTabBar,Vt=ne.onChange,Ht=ne.onTabClick,pn=ne.onTabScroll,nn=Object(R.a)(ne,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),wt=jr(ae),xt=oe==="rtl",Kt;Me===!1?Kt={inkBar:!1,tabPane:!1}:Kt=Object(U.a)({inkBar:!0,tabPane:!1},Me!==!0?Me:null);var zt=Object(A.useState)(!1),mt=Object(P.a)(zt,2),Yt=mt[0],cn=mt[1];Object(A.useEffect)(function(){cn(Nr())},[]);var Xt=Object(e.a)(function(){var ln;return(ln=wt[0])===null||ln===void 0?void 0:ln.key},{value:ye,defaultValue:ge}),sn=Object(P.a)(Xt,2),hn=sn[0],Sn=sn[1],Dn=Object(A.useState)(function(){return wt.findIndex(function(ln){return ln.key===hn})}),gn=Object(P.a)(Dn,2),Mn=gn[0],Fn=gn[1];Object(A.useEffect)(function(){var ln=wt.findIndex(function(Xn){return Xn.key===hn});if(ln===-1){var Hn;ln=Math.max(0,Math.min(Mn,wt.length-1)),Sn((Hn=wt[ln])===null||Hn===void 0?void 0:Hn.key)}Fn(ln)},[wt.map(function(ln){return ln.key}).join("_"),hn,Mn]);var Pn=Object(e.a)(null,{value:se}),Nn=Object(P.a)(Pn,2),vn=Nn[0],Ln=Nn[1],An=Ye;Yt&&!["left","right"].includes(Ye)&&(An="top"),Object(A.useEffect)(function(){se||(Ln("rc-tabs-".concat(Qi)),Qi+=1)},[]);function _n(ln,Hn){Ht==null||Ht(ln,Hn),Sn(ln),Vt==null||Vt(ln)}var Wn={id:vn,activeKey:hn,animated:Kt,tabPosition:An,rtl:xt,mobile:Yt},Kn,Yn=Object(U.a)(Object(U.a)({},Wn),{},{editable:Se,locale:It,moreIcon:Bt,moreTransitionName:Ut,tabBarGutter:rt,onTabClick:_n,onTabScroll:pn,extra:kt,style:St,panes:ae});return Nt?Kn=Nt(Yn,Xi):Kn=A.createElement(Xi,Object.assign({},Yn)),A.createElement(Oi.Provider,{value:{tabs:wt,prefixCls:Z}},A.createElement("div",Object.assign({ref:fe,id:se,className:W()(Z,"".concat(Z,"-").concat(An),(ve={},Object(ee.a)(ve,"".concat(Z,"-mobile"),Yt),Object(ee.a)(ve,"".concat(Z,"-editable"),Se),Object(ee.a)(ve,"".concat(Z,"-rtl"),xt),ve),X)},nn),Kn,A.createElement(Fr,Object.assign({destroyInactiveTabPane:Pt},Wn,{animated:Kt}))))}var Zi=A.forwardRef(Hr);Zi.TabPane=Ji;var Wr=Zi,ma=ce.b=Wr},nEHx:function(Ke,ce,F){"use strict";F.d(ce,"a",function(){return ee});var ee;(function(P){P.DARK="dark",P.LIGHT="light",P.HIGH_CONTRAST="hc"})(ee||(ee={}))},nnTU:function(Ke,ce,F){"use strict";F.d(ce,"b",function(){return W}),F.d(ce,"a",function(){return j});var ee=F("MI8n"),P=F("JYp7"),R=F("pmY6"),U=F("24hK"),A=F("746U"),I=F("Cg/j");const W=Object(I.c)("commandService"),j=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new ee.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 s=[];for(let o of e.description.args)s.push(o.constraint);const u=e.handler;e.handler=function(o,...a){return Object(A.o)(a,s),u(o,...a)}}const{id:f}=e;let h=this._commands.get(f);h||(h=new U.a,this._commands.set(f,h));let l=h.unshift(e),i=Object(R.i)(()=>{l();const s=this._commands.get(f);(s==null?void 0:s.isEmpty())&&this._commands.delete(f)});return this._onDidRegisterCommand.fire(f),i}registerCommandAlias(e,C){return j.registerCommand(e,(f,...h)=>f.get(W).executeCommand(C,...h))}getCommand(e){const C=this._commands.get(e);return!C||C.isEmpty()?void 0:P.a.first(C)}getCommands(){const e=new Map;for(const C of this._commands.keys()){const f=this.getCommand(C);f&&e.set(C,f)}return e}};j.registerCommand("noop",()=>{})},p5ED:function(Ke,ce,F){"use strict";var ee=F("+L6B"),P=F("2/Rp"),R=F("5Dmo"),U=F("3S7+"),A=F("k1fw"),I=F("9og8"),W=F("tJVT"),j=F("WmNS"),e=F.n(j),C=F("q1tI"),f=F.n(C),h=F("vHTk"),l=F.n(h),i=F("yEEn"),s=F("ZW9T"),u=F("1vsH"),o=F("V0Rq"),a=F("m3rI");ce.a=function(n){var t,_,p,v,x,T,b,d=n.editOffice,g=d===void 0?"view":d,c=n.data,y=n.theme,r=n.type,w=n.filename,D=n.monacoEditor,L=n.className,S=n.style,M=n.close,H=n.onClose,O=n.hasMask,K=n.disabledDownload,Y=Object(C.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),ie=Object(W.a)(Y,2),re=ie[0],Te=ie[1],_e=Object(C.useState)(""),we=Object(W.a)(_e,2),Ce=we[0],Re=we[1],ue=Object(C.useState)(),q=Object(W.a)(ue,2),Fe=q[0],We=q[1],He=window.ENV==="build"?"/react/build":"",Ge=a.a.PROXY_SERVER||location.origin,it,De=1024*1024,Ue=10*De,Xe=Object(C.useRef)();(t=c)!==null&&t!==void 0&&t.startsWith("/api")&&r!=="txt"&&(c=a.a.API_SERVER+c),r==="office"&&(it=Object(u.T)(c).filesize,it>Ue&&(r="other")),w&&D&&(D.filename=w),Object(C.useEffect)(function(){var Ee,Ie,Be=(Ee=document.cookie)===null||Ee===void 0||((Ie=Ee.replace(/\s/g,""))===null||Ie===void 0)?void 0:Ie.split(";");Be==null||Be.map(function(Je){var ze=Je.split("=");ze[0]==="_educoder_session"&&Re(ze[1])})},[]),Object(C.useEffect)(function(){r==="office"&&$()},[r,c]);var $=function(){var Ee=Object(I.a)(e.a.mark(function Ie(){var Be,Je,ze;return e.a.wrap(function(et){for(;;)switch(et.prev=et.next){case 0:return console.log("data:",c),Be=c,c.startsWith("http")||(Be=location.origin+Be),Je=new URL(Be).pathname.split("/").pop(),et.next=6,Object(o.W)({attachment_id:Je});case 6:ze=et.sent,We(ze);case 8:case"end":return et.stop()}},Ie)}));return function(){return Ee.apply(this,arguments)}}(),me=function(){if(c.startsWith("http")||c.startsWith("blob:")){xe();return}Object(u.z)(w||"educoder",c,w)},xe=function(){Object(u.x)(w||"educoder",decodeURIComponent(c))};return f.a.createElement("div",{style:Object(A.a)({},S||{}),className:"".concat(O&&l.a.bgBlack," ").concat(r?l.a.wrp:"hide")},M&&f.a.createElement("div",{className:l.a.close,ref:Xe},!K&&f.a.createElement(U.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return Xe.current}},f.a.createElement("span",{onClick:xe},f.a.createElement("i",{className:"icon-quxiaozhiding"}))),f.a.createElement(U.a,{title:"\u5173\u95ED",getPopupContainer:function(){return Xe.current}},f.a.createElement("span",{className:"",onClick:H},f.a.createElement("i",{className:"icon-guanbi1"})))),f.a.createElement("div",{className:"".concat(l.a[L]," ").concat(L," ").concat(l.a.monaco," ").concat(r==="txt"?"show":"hide")},r==="txt"&&f.a.createElement(s.b,D)),r==="audio"&&f.a.createElement("audio",{src:"".concat(((_=c)===null||_===void 0?void 0:_.indexOf("http://"))>-1||((p=c)===null||p===void 0?void 0:p.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(c),autoPlay:!0}),r==="video"&&f.a.createElement(f.a.Fragment,null,((v=c)===null||v===void 0?void 0:v.indexOf("http"))>-1?f.a.createElement("video",{controls:!0,src:"".concat(c),autoPlay:!0}):f.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(c),autoPlay:!0})),r==="office"&&Fe&&f.a.createElement("iframe",{src:"".concat(He,"/office.html?key=").concat(Fe.key,"&url=").concat(Ge+Fe.url,"&callbackUrl=").concat(Ge+Fe.callbackUrl,"&fileType=").concat(Fe.fileType,"&title=").concat(Fe.title,"&model=").concat(g,"&officeServer=").concat(a.a.OFFICE_SERVER,"&disabledDownload=").concat(!!K)}),r==="html"&&f.a.createElement("iframe",{src:c+"&disposition=inline"}),r==="pdf"&&f.a.createElement("iframe",{src:"".concat(He,"/js/pdfview/index.html?url=").concat(c,"&disabledDownload=").concat(!!K)}),r==="image"&&f.a.createElement("img",{src:"".concat(((x=c)===null||x===void 0?void 0:x.indexOf("http://"))>-1||((T=c)===null||T===void 0?void 0:T.indexOf("https://"))>-1||(b=c)!==null&&b!==void 0&&b.startsWith("/api")?"":"data:image/png;base64,").concat(c)}),r==="other"&&f.a.createElement("div",null,f.a.createElement(P.a,{type:"primary",size:"large",onClick:me},f.a.createElement(i.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),r==="download"&&f.a.createElement(P.a,{type:"primary",size:"large",onClick:me},f.a.createElement(i.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},pmY6:function(Ke,ce,F){"use strict";F.d(ce,"h",function(){return C}),F.d(ce,"g",function(){return h}),F.d(ce,"f",function(){return l}),F.d(ce,"e",function(){return i}),F.d(ce,"i",function(){return s}),F.d(ce,"b",function(){return u}),F.d(ce,"a",function(){return o}),F.d(ce,"d",function(){return a}),F.d(ce,"c",function(){return n});var ee=F("C/vA"),P=F("JYp7");const R=!1;let U=null;function A(t){U=t}if(R){const t="__is_disposable_tracked__";A(new class{trackDisposable(_){const p=new Error("Potentially leaked disposable").stack;setTimeout(()=>{_[t]||console.log(p)},3e3)}setParent(_,p){if(_&&_!==o.None)try{_[t]=!0}catch(v){}}markAsDisposed(_){if(_&&_!==o.None)try{_[t]=!0}catch(p){}}markAsSingleton(_){}})}function I(t){return U==null||U.trackDisposable(t),t}function W(t){U==null||U.markAsDisposed(t)}function j(t,_){U==null||U.setParent(t,_)}function e(t,_){if(!U)return;for(const p of t)U.setParent(p,_)}function C(t){return U==null||U.markAsSingleton(t),t}class f extends Error{constructor(t){super(`Encountered errors while disposing of store. Errors: [${t.join(", ")}]`);this.errors=t}}function h(t){return typeof t.dispose=="function"&&t.dispose.length===0}function l(t){if(P.a.is(t)){let _=[];for(const p of t)if(p)try{p.dispose()}catch(v){_.push(v)}if(_.length===1)throw _[0];if(_.length>1)throw new f(_);return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function i(...t){const _=s(()=>l(t));return e(t,_),_}function s(t){const _=I({dispose:Object(ee.a)(()=>{W(_),t()})});return _}class u{constructor(){this._toDispose=new Set,this._isDisposed=!1,I(this)}dispose(){if(this._isDisposed)return;W(this),this._isDisposed=!0,this.clear()}clear(){try{l(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 j(t,this),this._isDisposed?u.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}}u.DISABLE_DISPOSED_WARNING=!1;class o{constructor(){this._store=new u,I(this),j(this._store,this)}dispose(){W(this),this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}}o.None=Object.freeze({dispose(){}});class a{constructor(){this._isDisposed=!1,I(this)}get value(){return this._isDisposed?void 0:this._value}set value(t){var _;if(this._isDisposed||t===this._value)return;(_=this._value)===null||_===void 0||_.dispose(),t&&j(t,this),this._value=t}clear(){this.value=void 0}dispose(){var t;this._isDisposed=!0,W(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&&j(t,null),t}}class n{constructor(t){this.object=t}dispose(){}}},psGv:function(Ke,ce,F){var ee,P;(function(){var R;(function(){"use strict";var W=[,,function(f){function h(s){this.__parent=s,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}h.prototype.clone_empty=function(){var s=new h(this.__parent);return s.set_indent(this.__indent_count,this.__alignment_count),s},h.prototype.item=function(s){return s<0?this.__items[this.__items.length+s]:this.__items[s]},h.prototype.has_match=function(s){for(var u=this.__items.length-1;u>=0;u--)if(this.__items[u].match(s))return!0;return!1},h.prototype.set_indent=function(s,u){this.is_empty()&&(this.__indent_count=s||0,this.__alignment_count=u||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},h.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)},h.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},h.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var s=this.__parent.current_line;return s.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),s.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),s.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,s.__items[0]===" "&&(s.__items.splice(0,1),s.__character_count-=1),!0}return!1},h.prototype.is_empty=function(){return this.__items.length===0},h.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},h.prototype.push=function(s){this.__items.push(s);var u=s.lastIndexOf(`
|
|
`);u!==-1?this.__character_count=s.length-u:this.__character_count+=s.length},h.prototype.pop=function(){var s=null;return this.is_empty()||(s=this.__items.pop(),this.__character_count-=s.length),s},h.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},h.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},h.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},h.prototype.toString=function(){var s="";return this.is_empty()?this.__parent.indent_empty_lines&&(s=this.__parent.get_indent_string(this.__indent_count)):(s=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),s+=this.__items.join("")),s};function l(s,u){this.__cache=[""],this.__indent_size=s.indent_size,this.__indent_string=s.indent_char,s.indent_with_tabs||(this.__indent_string=new Array(s.indent_size+1).join(s.indent_char)),u=u||"",s.indent_level>0&&(u=new Array(s.indent_level+1).join(this.__indent_string)),this.__base_string=u,this.__base_string_length=u.length}l.prototype.get_indent_size=function(s,u){var o=this.__base_string_length;return u=u||0,s<0&&(o=0),o+=s*this.__indent_size,o+=u,o},l.prototype.get_indent_string=function(s,u){var o=this.__base_string;return u=u||0,s<0&&(s=0,o=""),u+=s*this.__indent_size,this.__ensure_cache(u),o+=this.__cache[u],o},l.prototype.__ensure_cache=function(s){for(;s>=this.__cache.length;)this.__add_column()},l.prototype.__add_column=function(){var s=this.__cache.length,u=0,o="";this.__indent_size&&s>=this.__indent_size&&(u=Math.floor(s/this.__indent_size),s-=u*this.__indent_size,o=new Array(u+1).join(this.__indent_string)),s&&(o+=new Array(s+1).join(" ")),this.__cache.push(o)};function i(s,u){this.__indent_cache=new l(s,u),this.raw=!1,this._end_with_newline=s.end_with_newline,this.indent_size=s.indent_size,this.wrap_line_length=s.wrap_line_length,this.indent_empty_lines=s.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new h(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}i.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},i.prototype.get_line_number=function(){return this.__lines.length},i.prototype.get_indent_string=function(s,u){return this.__indent_cache.get_indent_string(s,u)},i.prototype.get_indent_size=function(s,u){return this.__indent_cache.get_indent_size(s,u)},i.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},i.prototype.add_new_line=function(s){return this.is_empty()||!s&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},i.prototype.get_code=function(s){this.trim(!0);var u=this.current_line.pop();u&&(u[u.length-1]===`
|
|
`&&(u=u.replace(/\n+$/g,"")),this.current_line.push(u)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
|
|
`);return s!==`
|
|
`&&(o=o.replace(/[\n]/g,s)),o},i.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},i.prototype.set_indent=function(s,u){return s=s||0,u=u||0,this.next_line.set_indent(s,u),this.__lines.length>1?(this.current_line.set_indent(s,u),!0):(this.current_line.set_indent(),!1)},i.prototype.add_raw_token=function(s){for(var u=0;u<s.newlines;u++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(s.whitespace_before),this.current_line.push(s.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},i.prototype.add_token=function(s){this.__add_space_before_token(),this.current_line.push(s),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},i.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(" "))},i.prototype.remove_indent=function(s){for(var u=this.__lines.length;s<u;)this.__lines[s]._remove_indent(),s++;this.current_line._remove_wrap_indent()},i.prototype.trim=function(s){for(s=s===void 0?!1:s,this.current_line.trim();s&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},i.prototype.just_added_newline=function(){return this.current_line.is_empty()},i.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},i.prototype.ensure_empty_line_above=function(s,u){for(var o=this.__lines.length-2;o>=0;){var a=this.__lines[o];if(a.is_empty())break;if(a.item(0).indexOf(s)!==0&&a.item(-1)!==u){this.__lines.splice(o+1,0,new h(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},f.exports.Output=i},function(f){function h(l,i,s,u){this.type=l,this.text=i,this.comments_before=null,this.newlines=s||0,this.whitespace_before=u||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}f.exports.Token=h},,,function(f){function h(s,u){this.raw_options=l(s,u),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"])}h.prototype._get_array=function(s,u){var o=this.raw_options[s],a=u||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(a=o.concat()):typeof o=="string"&&(a=o.split(/[^a-zA-Z0-9_\/\-]+/)),a},h.prototype._get_boolean=function(s,u){var o=this.raw_options[s],a=o===void 0?!!u:!!o;return a},h.prototype._get_characters=function(s,u){var o=this.raw_options[s],a=u||"";return typeof o=="string"&&(a=o.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),a},h.prototype._get_number=function(s,u){var o=this.raw_options[s];u=parseInt(u,10),isNaN(u)&&(u=0);var a=parseInt(o,10);return isNaN(a)&&(a=u),a},h.prototype._get_selection=function(s,u,o){var a=this._get_selection_list(s,u,o);if(a.length!==1)throw new Error("Invalid Option Value: The option '"+s+`' can only be one of the following values:
|
|
`+u+`
|
|
You passed in: '`+this.raw_options[s]+"'");return a[0]},h.prototype._get_selection_list=function(s,u,o){if(!u||u.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[u[0]],!this._is_valid_selection(o,u))throw new Error("Invalid Default Value!");var a=this._get_array(s,o);if(!this._is_valid_selection(a,u))throw new Error("Invalid Option Value: The option '"+s+`' can contain only the following values:
|
|
`+u+`
|
|
You passed in: '`+this.raw_options[s]+"'");return a},h.prototype._is_valid_selection=function(s,u){return s.length&&u.length&&!s.some(function(o){return u.indexOf(o)===-1})};function l(s,u){var o={};s=i(s);var a;for(a in s)a!==u&&(o[a]=s[a]);if(u&&s[u])for(a in s[u])o[a]=s[u][a];return o}function i(s){var u={},o;for(o in s){var a=o.replace(/-/g,"_");u[a]=s[o]}return u}f.exports.Options=h,f.exports.normalizeOpts=i,f.exports.mergeOpts=l},,function(f){var h=RegExp.prototype.hasOwnProperty("sticky");function l(i){this.__input=i||"",this.__input_length=this.__input.length,this.__position=0}l.prototype.restart=function(){this.__position=0},l.prototype.back=function(){this.__position>0&&(this.__position-=1)},l.prototype.hasNext=function(){return this.__position<this.__input_length},l.prototype.next=function(){var i=null;return this.hasNext()&&(i=this.__input.charAt(this.__position),this.__position+=1),i},l.prototype.peek=function(i){var s=null;return i=i||0,i+=this.__position,i>=0&&i<this.__input_length&&(s=this.__input.charAt(i)),s},l.prototype.__match=function(i,s){i.lastIndex=s;var u=i.exec(this.__input);return u&&!(h&&i.sticky)&&(u.index!==s&&(u=null)),u},l.prototype.test=function(i,s){return s=s||0,s+=this.__position,s>=0&&s<this.__input_length?!!this.__match(i,s):!1},l.prototype.testChar=function(i,s){var u=this.peek(s);return i.lastIndex=0,u!==null&&i.test(u)},l.prototype.match=function(i){var s=this.__match(i,this.__position);return s?this.__position+=s[0].length:s=null,s},l.prototype.read=function(i,s,u){var o="",a;return i&&(a=this.match(i),a&&(o+=a[0])),s&&(a||!i)&&(o+=this.readUntil(s,u)),o},l.prototype.readUntil=function(i,s){var u="",o=this.__position;i.lastIndex=this.__position;var a=i.exec(this.__input);return a?(o=a.index,s&&(o+=a[0].length)):o=this.__input_length,u=this.__input.substring(this.__position,o),this.__position=o,u},l.prototype.readUntilAfter=function(i){return this.readUntil(i,!0)},l.prototype.get_regexp=function(i,s){var u=null,o="g";return s&&h&&(o="y"),typeof i=="string"&&i!==""?u=new RegExp(i,o):i&&(u=new RegExp(i.source,o)),u},l.prototype.get_literal_regexp=function(i){return RegExp(i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},l.prototype.peekUntilAfter=function(i){var s=this.__position,u=this.readUntilAfter(i);return this.__position=s,u},l.prototype.lookBack=function(i){var s=this.__position-1;return s>=i.length&&this.__input.substring(s-i.length,s).toLowerCase()===i},f.exports.InputScanner=l},function(f,h,l){var i=l(8).InputScanner,s=l(3).Token,u=l(10).TokenStream,o=l(11).WhitespacePattern,a={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},n=function(t,_){this._input=new i(t),this._options=_||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};n.prototype.tokenize=function(){this._input.restart(),this.__tokens=new u,this._reset();for(var t,_=new s(a.START,""),p=null,v=[],x=new u;_.type!==a.EOF;){for(t=this._get_next_token(_,p);this._is_comment(t);)x.add(t),t=this._get_next_token(_,p);x.isEmpty()||(t.comments_before=x,x=new u),t.parent=p,this._is_opening(t)?(v.push(p),p=t):p&&this._is_closing(t,p)&&(t.opened=p,p.closed=t,p=v.pop(),t.parent=p),t.previous=_,_.next=t,this.__tokens.add(t),_=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,_){this._readWhitespace();var p=this._input.read(/.+/g);return p?this._create_token(a.RAW,p):this._create_token(a.EOF,"")},n.prototype._is_comment=function(t){return!1},n.prototype._is_opening=function(t){return!1},n.prototype._is_closing=function(t,_){return!1},n.prototype._create_token=function(t,_){var p=new s(t,_,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return p},n.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},f.exports.Tokenizer=n,f.exports.TOKEN=a},function(f){function h(l){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=l}h.prototype.restart=function(){this.__position=0},h.prototype.isEmpty=function(){return this.__tokens_length===0},h.prototype.hasNext=function(){return this.__position<this.__tokens_length},h.prototype.next=function(){var l=null;return this.hasNext()&&(l=this.__tokens[this.__position],this.__position+=1),l},h.prototype.peek=function(l){var i=null;return l=l||0,l+=this.__position,l>=0&&l<this.__tokens_length&&(i=this.__tokens[l]),i},h.prototype.add=function(l){this.__parent_token&&(l.parent=this.__parent_token),this.__tokens.push(l),this.__tokens_length+=1},f.exports.TokenStream=h},function(f,h,l){var i=l(12).Pattern;function s(u,o){i.call(this,u,o),o?this._line_regexp=this._input.get_regexp(o._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}s.prototype=new i,s.prototype.__set_whitespace_patterns=function(u,o){u+="\\t ",o+="\\n\\r",this._match_pattern=this._input.get_regexp("["+u+o+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+o+"]")},s.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var u=this._input.read(this._match_pattern);if(u===" ")this.whitespace_before_token=" ";else if(u){var o=this.__split(this._newline_regexp,u);this.newline_count=o.length-1,this.whitespace_before_token=o[this.newline_count]}return u},s.prototype.matching=function(u,o){var a=this._create();return a.__set_whitespace_patterns(u,o),a._update(),a},s.prototype._create=function(){return new s(this._input,this)},s.prototype.__split=function(u,o){u.lastIndex=0;for(var a=0,n=[],t=u.exec(o);t;)n.push(o.substring(a,t.index)),a=t.index+t[0].length,t=u.exec(o);return a<o.length?n.push(o.substring(a,o.length)):n.push(""),n},f.exports.WhitespacePattern=s},function(f){function h(l,i){this._input=l,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,i&&(this._starting_pattern=this._input.get_regexp(i._starting_pattern,!0),this._match_pattern=this._input.get_regexp(i._match_pattern,!0),this._until_pattern=this._input.get_regexp(i._until_pattern),this._until_after=i._until_after)}h.prototype.read=function(){var l=this._input.read(this._starting_pattern);return(!this._starting_pattern||l)&&(l+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),l},h.prototype.read_match=function(){return this._input.match(this._match_pattern)},h.prototype.until_after=function(l){var i=this._create();return i._until_after=!0,i._until_pattern=this._input.get_regexp(l),i._update(),i},h.prototype.until=function(l){var i=this._create();return i._until_after=!1,i._until_pattern=this._input.get_regexp(l),i._update(),i},h.prototype.starting_with=function(l){var i=this._create();return i._starting_pattern=this._input.get_regexp(l,!0),i._update(),i},h.prototype.matching=function(l){var i=this._create();return i._match_pattern=this._input.get_regexp(l,!0),i._update(),i},h.prototype._create=function(){return new h(this._input,this)},h.prototype._update=function(){},f.exports.Pattern=h},function(f){function h(l,i){l=typeof l=="string"?l:l.source,i=typeof i=="string"?i:i.source,this.__directives_block_pattern=new RegExp(l+/ beautify( \w+[:]\w+)+ /.source+i,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(l+/\sbeautify\signore:end\s/.source+i,"g")}h.prototype.get_directives=function(l){if(!l.match(this.__directives_block_pattern))return null;var i={};this.__directive_pattern.lastIndex=0;for(var s=this.__directive_pattern.exec(l);s;)i[s[1]]=s[2],s=this.__directive_pattern.exec(l);return i},h.prototype.readIgnored=function(l){return l.readUntilAfter(this.__directives_end_ignore_pattern)},f.exports.Directives=h},function(f,h,l){var i=l(12).Pattern,s={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function u(o,a){i.call(this,o,a),this.__template_pattern=null,this._disabled=Object.assign({},s),this._excluded=Object.assign({},s),a&&(this.__template_pattern=this._input.get_regexp(a.__template_pattern),this._excluded=Object.assign(this._excluded,a._excluded),this._disabled=Object.assign(this._disabled,a._disabled));var n=new i(o);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}/)}}u.prototype=new i,u.prototype._create=function(){return new u(this._input,this)},u.prototype._update=function(){this.__set_templated_pattern()},u.prototype.disable=function(o){var a=this._create();return a._disabled[o]=!0,a._update(),a},u.prototype.read_options=function(o){var a=this._create();for(var n in s)a._disabled[n]=o.templating.indexOf(n)===-1;return a._update(),a},u.prototype.exclude=function(o){var a=this._create();return a._excluded[o]=!0,a._update(),a},u.prototype.read=function(){var o="";this._match_pattern?o=this._input.read(this._starting_pattern):o=this._input.read(this._starting_pattern,this.__template_pattern);for(var a=this._read_template();a;)this._match_pattern?a+=this._input.read(this._match_pattern):a+=this._input.readUntil(this.__template_pattern),o+=a,a=this._read_template();return this._until_after&&(o+=this._input.readUntilAfter(this._until_pattern)),o},u.prototype.__set_templated_pattern=function(){var o=[];this._disabled.php||o.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||o.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||o.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(o.push(this.__patterns.django._starting_pattern.source),o.push(this.__patterns.django_value._starting_pattern.source),o.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||o.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&o.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+o.join("|")+")")},u.prototype._read_template=function(){var o="",a=this._input.peek();if(a==="<"){var n=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&n==="?"&&(o=o||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&n==="%"&&(o=o||this.__patterns.erb.read())}else a==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(o=o||this.__patterns.handlebars_comment.read(),o=o||this.__patterns.handlebars_unescaped.read(),o=o||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(o=o||this.__patterns.django_value.read()),this._excluded.django||(o=o||this.__patterns.django_comment.read(),o=o||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(o=o||this.__patterns.smarty_comment.read(),o=o||this.__patterns.smarty_literal.read(),o=o||this.__patterns.smarty.read()));return o},f.exports.TemplatablePattern=u},,,,function(f,h,l){var i=l(19).Beautifier,s=l(20).Options;function u(o,a,n,t){var _=new i(o,a,n,t);return _.beautify()}f.exports=u,f.exports.defaultOptions=function(){return new s}},function(f,h,l){var i=l(20).Options,s=l(2).Output,u=l(21).Tokenizer,o=l(21).TOKEN,a=/\r\n|[\r\n]/,n=/\r\n|[\r\n]/g,t=function(y,r){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=y.max_preserve_newlines,this.preserve_newlines=y.preserve_newlines,this._output=new s(y,r)};t.prototype.current_line_has_match=function(y){return this._output.current_line.has_match(y)},t.prototype.set_space_before_token=function(y,r){this._output.space_before_token=y,this._output.non_breaking_space=r},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(y){this._output.add_raw_token(y)},t.prototype.print_preserved_newlines=function(y){var r=0;y.type!==o.TEXT&&y.previous.type!==o.TEXT&&(r=y.newlines?1:0),this.preserve_newlines&&(r=y.newlines<this.max_preserve_newlines+1?y.newlines:this.max_preserve_newlines+1);for(var w=0;w<r;w++)this.print_newline(w>0);return r!==0},t.prototype.traverse_whitespace=function(y){return y.whitespace_before||y.newlines?(this.print_preserved_newlines(y)||(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(y){this._output.add_new_line(y)},t.prototype.print_token=function(y){y.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(y.text))},t.prototype.indent=function(){this.indent_level++},t.prototype.get_full_indent=function(y){return y=this.indent_level+(y||0),y<1?"":this._output.get_indent_string(y)};var _=function(y){for(var r=null,w=y.next;w.type!==o.EOF&&y.closed!==w;){if(w.type===o.ATTRIBUTE&&w.text==="type"){w.next&&w.next.type===o.EQUALS&&w.next.next&&w.next.next.type===o.VALUE&&(r=w.next.next.text);break}w=w.next}return r},p=function(y,r){var w=null,D=null;return r.closed?(y==="script"?w="text/javascript":y==="style"&&(w="text/css"),w=_(r)||w,w.search("text/css")>-1?D="css":w.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?D="javascript":w.search(/(text|application|dojo)\/(x-)?(html)/)>-1?D="html":w.search(/test\/null/)>-1&&(D="null"),D):null};function v(y,r){return r.indexOf(y)!==-1}function x(y,r,w){this.parent=y||null,this.tag=r?r.tag_name:"",this.indent_level=w||0,this.parser_token=r||null}function T(y){this._printer=y,this._current_frame=null}T.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},T.prototype.record_tag=function(y){var r=new x(this._current_frame,y,this._printer.indent_level);this._current_frame=r},T.prototype._try_pop_frame=function(y){var r=null;return y&&(r=y.parser_token,this._printer.indent_level=y.indent_level,this._current_frame=y.parent),r},T.prototype._get_frame=function(y,r){for(var w=this._current_frame;w&&!(y.indexOf(w.tag)!==-1);){if(r&&r.indexOf(w.tag)!==-1){w=null;break}w=w.parent}return w},T.prototype.try_pop=function(y,r){var w=this._get_frame([y],r);return this._try_pop_frame(w)},T.prototype.indent_to_tag=function(y){var r=this._get_frame(y);r&&(this._printer.indent_level=r.indent_level)};function b(y,r,w,D){this._source_text=y||"",r=r||{},this._js_beautify=w,this._css_beautify=D,this._tag_stack=null;var L=new i(r,"html");this._options=L,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"}b.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var y=this._source_text,r=this._options.eol;this._options.eol==="auto"&&(r=`
|
|
`,y&&a.test(y)&&(r=y.match(a)[0])),y=y.replace(n,`
|
|
`);var w=y.match(/^[\t ]*/)[0],D={text:"",type:""},L=new d,S=new t(this._options,w),M=new u(y,this._options).tokenize();this._tag_stack=new T(S);for(var H=null,O=M.next();O.type!==o.EOF;)O.type===o.TAG_OPEN||O.type===o.COMMENT?(H=this._handle_tag_open(S,O,L,D),L=H):O.type===o.ATTRIBUTE||O.type===o.EQUALS||O.type===o.VALUE||O.type===o.TEXT&&!L.tag_complete?H=this._handle_inside_tag(S,O,L,M):O.type===o.TAG_CLOSE?H=this._handle_tag_close(S,O,L):O.type===o.TEXT?H=this._handle_text(S,O,L):S.add_raw_token(O),D=H,O=M.next();var K=S._output.get_code(r);return K},b.prototype._handle_tag_close=function(y,r,w){var D={text:r.text,type:r.type};return y.alignment_size=0,w.tag_complete=!0,y.set_space_before_token(r.newlines||r.whitespace_before!=="",!0),w.is_unformatted?y.add_raw_token(r):(w.tag_start_char==="<"&&(y.set_space_before_token(r.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&w.has_wrapped_attrs&&y.print_newline(!1)),y.print_token(r)),w.indent_content&&!(w.is_unformatted||w.is_content_unformatted)&&(y.indent(),w.indent_content=!1),!w.is_inline_element&&!(w.is_unformatted||w.is_content_unformatted)&&y.set_wrap_point(),D},b.prototype._handle_inside_tag=function(y,r,w,D){var L=w.has_wrapped_attrs,S={text:r.text,type:r.type};if(y.set_space_before_token(r.newlines||r.whitespace_before!=="",!0),w.is_unformatted)y.add_raw_token(r);else if(w.tag_start_char==="{"&&r.type===o.TEXT)y.print_preserved_newlines(r)?(r.newlines=0,y.add_raw_token(r)):y.print_token(r);else{if(r.type===o.ATTRIBUTE?(y.set_space_before_token(!0),w.attr_count+=1):(r.type===o.EQUALS||r.type===o.VALUE&&r.previous.type===o.EQUALS)&&y.set_space_before_token(!1),r.type===o.ATTRIBUTE&&w.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(y.traverse_whitespace(r),L=L||r.newlines!==0),this._is_wrap_attributes_force)){var M=w.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&w.attr_count===1){var H=!0,O=0,K;do{if(K=D.peek(O),K.type===o.ATTRIBUTE){H=!1;break}O+=1}while(O<4&&K.type!==o.EOF&&K.type!==o.TAG_CLOSE);M=!H}M&&(y.print_newline(!1),L=!0)}y.print_token(r),L=L||y.previous_token_wrapped(),w.has_wrapped_attrs=L}return S},b.prototype._handle_text=function(y,r,w){var D={text:r.text,type:"TK_CONTENT"};return w.custom_beautifier_name?this._print_custom_beatifier_text(y,r,w):w.is_unformatted||w.is_content_unformatted?y.add_raw_token(r):(y.traverse_whitespace(r),y.print_token(r)),D},b.prototype._print_custom_beatifier_text=function(y,r,w){var D=this;if(r.text!==""){var L=r.text,S,M=1,H="",O="";w.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?S=this._js_beautify:w.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?S=this._css_beautify:w.custom_beautifier_name==="html"&&(S=function(_e,we){var Ce=new b(_e,we,D._js_beautify,D._css_beautify);return Ce.beautify()}),this._options.indent_scripts==="keep"?M=0:this._options.indent_scripts==="separate"&&(M=-y.indent_level);var K=y.get_full_indent(M);if(L=L.replace(/\n[ \t]*$/,""),w.custom_beautifier_name!=="html"&&L[0]==="<"&&L.match(/^(<!--|<!\[CDATA\[)/)){var Y=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(L);if(!Y){y.add_raw_token(r);return}H=K+Y[1]+`
|
|
`,L=Y[4],Y[5]&&(O=K+Y[5]),L=L.replace(/\n[ \t]*$/,""),(Y[2]||Y[3].indexOf(`
|
|
`)!==-1)&&(Y=Y[3].match(/[ \t]+$/),Y&&(r.whitespace_before=Y[0]))}if(L)if(S){var ie=function(){this.eol=`
|
|
`};ie.prototype=this._options.raw_options;var re=new ie;L=S(K+L,re)}else{var Te=r.whitespace_before;Te&&(L=L.replace(new RegExp(`
|
|
(`+Te+")?","g"),`
|
|
`)),L=K+L.replace(/\n/g,`
|
|
`+K)}H&&(L?L=H+L+`
|
|
`+O:L=H+O),y.print_newline(!1),L&&(r.text=L,r.whitespace_before="",r.newlines=0,y.add_raw_token(r),y.print_newline(!0))}},b.prototype._handle_tag_open=function(y,r,w,D){var L=this._get_tag_open_token(r);return(w.is_unformatted||w.is_content_unformatted)&&!w.is_empty_element&&r.type===o.TAG_OPEN&&r.text.indexOf("</")===0?(y.add_raw_token(r),L.start_tag_token=this._tag_stack.try_pop(L.tag_name)):(y.traverse_whitespace(r),this._set_tag_position(y,r,L,w,D),L.is_inline_element||y.set_wrap_point(),y.print_token(r)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(L.alignment_size=r.text.length+1),!L.tag_complete&&!L.is_unformatted&&(y.alignment_size=L.alignment_size),L};var d=function(y,r){if(this.parent=y||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!r)this.tag_complete=!0;else{var w;this.tag_start_char=r.text[0],this.text=r.text,this.tag_start_char==="<"?(w=r.text.match(/^<([^\s>]*)/),this.tag_check=w?w[1]:""):(w=r.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=w?w[1]:"",(r.text.startsWith("{{#>")||r.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&r.next!==null?this.tag_check=r.next.text.split(" ")[0]:this.tag_check=r.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),r.type===o.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||r.closed&&r.closed.text==="/>";var D=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(D=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(D)))}};b.prototype._get_tag_open_token=function(y){var r=new d(this._tag_stack.get_parser_token(),y);return r.alignment_size=this._options.wrap_attributes_indent_size,r.is_end_tag=r.is_end_tag||v(r.tag_check,this._options.void_elements),r.is_empty_element=r.tag_complete||r.is_start_tag&&r.is_end_tag,r.is_unformatted=!r.tag_complete&&v(r.tag_check,this._options.unformatted),r.is_content_unformatted=!r.is_empty_element&&v(r.tag_check,this._options.content_unformatted),r.is_inline_element=v(r.tag_name,this._options.inline)||r.tag_name.includes("-")||r.tag_start_char==="{",r},b.prototype._set_tag_position=function(y,r,w,D,L){if(w.is_empty_element||(w.is_end_tag?w.start_tag_token=this._tag_stack.try_pop(w.tag_name):(this._do_optional_end_element(w)&&(w.is_inline_element||y.print_newline(!1)),this._tag_stack.record_tag(w),(w.tag_name==="script"||w.tag_name==="style")&&!(w.is_unformatted||w.is_content_unformatted)&&(w.custom_beautifier_name=p(w.tag_check,r)))),v(w.tag_check,this._options.extra_liners)&&(y.print_newline(!1),y._output.just_added_blankline()||y.print_newline(!0)),w.is_empty_element){if(w.tag_start_char==="{"&&w.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),w.indent_content=!0;var S=y.current_line_has_match(/{{#if/);S||y.print_newline(!1)}w.tag_name==="!--"&&L.type===o.TAG_CLOSE&&D.is_end_tag&&w.text.indexOf(`
|
|
`)===-1||(w.is_inline_element||w.is_unformatted||y.print_newline(!1),this._calcluate_parent_multiline(y,w))}else if(w.is_end_tag){var M=!1;M=w.start_tag_token&&w.start_tag_token.multiline_content,M=M||!w.is_inline_element&&!(D.is_inline_element||D.is_unformatted)&&!(L.type===o.TAG_CLOSE&&w.start_tag_token===D)&&L.type!=="TK_CONTENT",(w.is_content_unformatted||w.is_unformatted)&&(M=!1),M&&y.print_newline(!1)}else w.indent_content=!w.custom_beautifier_name,w.tag_start_char==="<"&&(w.tag_name==="html"?w.indent_content=this._options.indent_inner_html:w.tag_name==="head"?w.indent_content=this._options.indent_head_inner_html:w.tag_name==="body"&&(w.indent_content=this._options.indent_body_inner_html)),!(w.is_inline_element||w.is_unformatted)&&(L.type!=="TK_CONTENT"||w.is_content_unformatted)&&y.print_newline(!1),this._calcluate_parent_multiline(y,w)},b.prototype._calcluate_parent_multiline=function(y,r){r.parent&&y._output.just_added_newline()&&!((r.is_inline_element||r.is_unformatted)&&r.parent.is_inline_element)&&(r.parent.multiline_content=!0)};var g=["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"],c=["a","audio","del","ins","map","noscript","video"];b.prototype._do_optional_end_element=function(y){var r=null;if(y.is_empty_element||!y.is_start_tag||!y.parent)return;if(y.tag_name==="body")r=r||this._tag_stack.try_pop("head");else if(y.tag_name==="li")r=r||this._tag_stack.try_pop("li",["ol","ul"]);else if(y.tag_name==="dd"||y.tag_name==="dt")r=r||this._tag_stack.try_pop("dt",["dl"]),r=r||this._tag_stack.try_pop("dd",["dl"]);else if(y.parent.tag_name==="p"&&g.indexOf(y.tag_name)!==-1){var w=y.parent.parent;(!w||c.indexOf(w.tag_name)===-1)&&(r=r||this._tag_stack.try_pop("p"))}else y.tag_name==="rp"||y.tag_name==="rt"?(r=r||this._tag_stack.try_pop("rt",["ruby","rtc"]),r=r||this._tag_stack.try_pop("rp",["ruby","rtc"])):y.tag_name==="optgroup"?r=r||this._tag_stack.try_pop("optgroup",["select"]):y.tag_name==="option"?r=r||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):y.tag_name==="colgroup"?r=r||this._tag_stack.try_pop("caption",["table"]):y.tag_name==="thead"?(r=r||this._tag_stack.try_pop("caption",["table"]),r=r||this._tag_stack.try_pop("colgroup",["table"])):y.tag_name==="tbody"||y.tag_name==="tfoot"?(r=r||this._tag_stack.try_pop("caption",["table"]),r=r||this._tag_stack.try_pop("colgroup",["table"]),r=r||this._tag_stack.try_pop("thead",["table"]),r=r||this._tag_stack.try_pop("tbody",["table"])):y.tag_name==="tr"?(r=r||this._tag_stack.try_pop("caption",["table"]),r=r||this._tag_stack.try_pop("colgroup",["table"]),r=r||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(y.tag_name==="th"||y.tag_name==="td")&&(r=r||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),r=r||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return y.parent=this._tag_stack.get_parser_token(),r},f.exports.Beautifier=b},function(f,h,l){var i=l(6).Options;function s(u){i.call(this,u,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}s.prototype=new i,f.exports.Options=s},function(f,h,l){var i=l(9).Tokenizer,s=l(9).TOKEN,u=l(13).Directives,o=l(14).TemplatablePattern,a=l(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:s.START,RAW:s.RAW,EOF:s.EOF},t=new u(/<\!--/,/-->/),_=function(p,v){i.call(this,p,v),this._current_tag_name="";var x=new o(this._input).read_options(this._options),T=new a(this._input);if(this.__patterns={word:x.until(/[\n\r\t <]/),single_quote:x.until_after(/'/),double_quote:x.until_after(/"/),attribute:x.until(/[\n\r\t =>]|\/>/),element_name:x.until(/[\n\r\t >\/]/),handlebars_comment:T.starting_with(/{{!--/).until_after(/--}}/),handlebars:T.starting_with(/{{/).until_after(/}}/),handlebars_open:T.until(/[\n\r\t }]/),handlebars_raw_close:T.until(/}}/),comment:T.starting_with(/<!--/).until_after(/-->/),cdata:T.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:T.starting_with(/<!\[/).until_after(/]>/),processing:T.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 b=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=T.matching(b).until_after(b)}};_.prototype=new i,_.prototype._is_comment=function(p){return!1},_.prototype._is_opening=function(p){return p.type===n.TAG_OPEN},_.prototype._is_closing=function(p,v){return p.type===n.TAG_CLOSE&&v&&((p.text===">"||p.text==="/>")&&v.text[0]==="<"||p.text==="}}"&&v.text[0]==="{"&&v.text[1]==="{")},_.prototype._reset=function(){this._current_tag_name=""},_.prototype._get_next_token=function(p,v){var x=null;this._readWhitespace();var T=this._input.peek();return T===null?this._create_token(n.EOF,""):(x=x||this._read_open_handlebars(T,v),x=x||this._read_attribute(T,p,v),x=x||this._read_close(T,v),x=x||this._read_raw_content(T,p,v),x=x||this._read_content_word(T),x=x||this._read_comment_or_cdata(T),x=x||this._read_processing(T),x=x||this._read_open(T,v),x=x||this._create_token(n.UNKNOWN,this._input.next()),x)},_.prototype._read_comment_or_cdata=function(p){var v=null,x=null,T=null;if(p==="<"){var b=this._input.peek(1);b==="!"&&(x=this.__patterns.comment.read(),x?(T=t.get_directives(x),T&&T.ignore==="start"&&(x+=t.readIgnored(this._input))):x=this.__patterns.cdata.read()),x&&(v=this._create_token(n.COMMENT,x),v.directives=T)}return v},_.prototype._read_processing=function(p){var v=null,x=null,T=null;if(p==="<"){var b=this._input.peek(1);(b==="!"||b==="?")&&(x=this.__patterns.conditional_comment.read(),x=x||this.__patterns.processing.read()),x&&(v=this._create_token(n.COMMENT,x),v.directives=T)}return v},_.prototype._read_open=function(p,v){var x=null,T=null;return v||p==="<"&&(x=this._input.next(),this._input.peek()==="/"&&(x+=this._input.next()),x+=this.__patterns.element_name.read(),T=this._create_token(n.TAG_OPEN,x)),T},_.prototype._read_open_handlebars=function(p,v){var x=null,T=null;return v||this._options.indent_handlebars&&p==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(x=this.__patterns.handlebars_comment.read(),x=x||this.__patterns.handlebars.read(),T=this._create_token(n.COMMENT,x)):(x=this.__patterns.handlebars_open.read(),T=this._create_token(n.TAG_OPEN,x))),T},_.prototype._read_close=function(p,v){var x=null,T=null;return v&&(v.text[0]==="<"&&(p===">"||p==="/"&&this._input.peek(1)===">")?(x=this._input.next(),p==="/"&&(x+=this._input.next()),T=this._create_token(n.TAG_CLOSE,x)):v.text[0]==="{"&&p==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),T=this._create_token(n.TAG_CLOSE,"}}"))),T},_.prototype._read_attribute=function(p,v,x){var T=null,b="";if(x&&x.text[0]==="<")if(p==="=")T=this._create_token(n.EQUALS,this._input.next());else if(p==='"'||p==="'"){var d=this._input.next();p==='"'?d+=this.__patterns.double_quote.read():d+=this.__patterns.single_quote.read(),T=this._create_token(n.VALUE,d)}else b=this.__patterns.attribute.read(),b&&(v.type===n.EQUALS?T=this._create_token(n.VALUE,b):T=this._create_token(n.ATTRIBUTE,b));return T},_.prototype._is_content_unformatted=function(p){return this._options.void_elements.indexOf(p)===-1&&(this._options.content_unformatted.indexOf(p)!==-1||this._options.unformatted.indexOf(p)!==-1)},_.prototype._read_raw_content=function(p,v,x){var T="";if(x&&x.text[0]==="{")T=this.__patterns.handlebars_raw_close.read();else if(v.type===n.TAG_CLOSE&&v.opened.text[0]==="<"&&v.text[0]!=="/"){var b=v.opened.text.substr(1).toLowerCase();if(b==="script"||b==="style"){var d=this._read_comment_or_cdata(p);if(d)return d.type=n.TEXT,d;T=this._input.readUntil(new RegExp("</"+b+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(b)&&(T=this._input.readUntil(new RegExp("</"+b+"[\\n\\r\\t ]*?>","ig")))}return T?this._create_token(n.TEXT,T):null},_.prototype._read_content_word=function(p){var v="";if(this._options.unformatted_content_delimiter&&(p===this._options.unformatted_content_delimiter[0]&&(v=this.__patterns.unformatted_content_delimiter.read())),v||(v=this.__patterns.word.read()),v)return this._create_token(n.TEXT,v)},f.exports.Tokenizer=_,f.exports.TOKEN=n}],j={};function e(f){var h=j[f];if(h!==void 0)return h.exports;var l=j[f]={exports:{}};return W[f](l,l.exports,e),l.exports}var C=e(18);R=C})();var U=R;if(!0)!(ee=[F,F("6UM0"),F("TXwP")],P=function(W){var j=F("6UM0"),e=F("TXwP");return{html_beautify:function(C,f){return U(C,f,j.js_beautify,e.css_beautify)}}}.apply(ce,ee),P!==void 0&&(Ke.exports=P));else var A,I})()},"rAM+":function(Ke,ce,F){"use strict";F.d(ce,"a",function(){return P});var ee=F("Qw5x");function P(R,U){var A;if(typeof Symbol=="undefined"||R[Symbol.iterator]==null){if(Array.isArray(R)||(A=Object(ee.a)(R))||U&&R&&typeof R.length=="number"){A&&(R=A);var I=0,W=function(){};return{s:W,n:function(){return I>=R.length?{done:!0}:{done:!1,value:R[I++]}},e:function(h){throw h},f:W}}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 j=!0,e=!1,C;return{s:function(){A=R[Symbol.iterator]()},n:function(){var h=A.next();return j=h.done,h},e:function(h){e=!0,C=h},f:function(){try{!j&&A.return!=null&&A.return()}finally{if(e)throw C}}}}},rUJ1:function(Ke,ce){const F=/[&<>"']/,ee=/[&<>"']/g,P=/[<>"']|&(?!#?\w+;)/,R=/[<>"']|&(?!#?\w+;)/g,U={"&":"&","<":"<",">":">",'"':""","'":"'"},A=T=>U[T];function I(T,b){if(b){if(F.test(T))return T.replace(ee,A)}else if(P.test(T))return T.replace(R,A);return T}const W=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function j(T){return T.replace(W,(b,d)=>(d=d.toLowerCase(),d==="colon"?":":d.charAt(0)==="#"?d.charAt(1)==="x"?String.fromCharCode(parseInt(d.substring(2),16)):String.fromCharCode(+d.substring(1)):""))}const e=/(^|[^\[])\^/g;function C(T,b){T=T.source||T,b=b||"";const d={replace:(g,c)=>(c=c.source||c,c=c.replace(e,"$1"),T=T.replace(g,c),d),getRegex:()=>new RegExp(T,b)};return d}const f=/[^\w:]/g,h=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function l(T,b,d){if(T){let g;try{g=decodeURIComponent(j(d)).replace(f,"").toLowerCase()}catch(c){return null}if(g.indexOf("javascript:")===0||g.indexOf("vbscript:")===0||g.indexOf("data:")===0)return null}b&&!h.test(d)&&(d=a(b,d));try{d=encodeURI(d).replace(/%25/g,"%")}catch(g){return null}return d}const i={},s=/^[^:]+:\/*[^/]*$/,u=/^([^:]+:)[\s\S]*$/,o=/^([^:]+:\/*[^/]*)[\s\S]*$/;function a(T,b){i[" "+T]||(s.test(T)?i[" "+T]=T+"/":i[" "+T]=p(T,"/",!0)),T=i[" "+T];const d=T.indexOf(":")===-1;return b.substring(0,2)==="//"?d?b:T.replace(u,"$1")+b:b.charAt(0)==="/"?d?b:T.replace(o,"$1")+b:T+b}const n={exec:function(){}};function t(T){let b=1,d,g;for(;b<arguments.length;b++){d=arguments[b];for(g in d)Object.prototype.hasOwnProperty.call(d,g)&&(T[g]=d[g])}return T}function _(T,b){const d=T.replace(/\|/g,(y,r,w)=>{let D=!1,L=r;for(;--L>=0&&w[L]==="\\";)D=!D;return D?"|":" |"}),g=d.split(/ \|/);let c=0;if(g.length>b)g.splice(b);else for(;g.length<b;)g.push("");for(;c<g.length;c++)g[c]=g[c].trim().replace(/\\\|/g,"|");return g}function p(T,b,d){const g=T.length;if(g===0)return"";let c=0;for(;c<g;){const y=T.charAt(g-c-1);if(y===b&&!d)c++;else if(y!==b&&d)c++;else break}return T.substr(0,g-c)}function v(T,b){if(T.indexOf(b[1])===-1)return-1;const d=T.length;let g=0,c=0;for(;c<d;c++)if(T[c]==="\\")c++;else if(T[c]===b[0])g++;else if(T[c]===b[1]&&(g--,g<0))return c;return-1}function x(T){T&&T.sanitize&&!T.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")}Ke.exports={escape:I,unescape:j,edit:C,cleanUrl:l,resolveUrl:a,noopTest:n,merge:t,splitCells:_,rtrim:p,findClosingBracket:v,checkSanitizeDeprecation:x}},siWv:function(Ke,ce,F){Ke.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"}},t23M:function(Ke,ce,F){"use strict";var ee=F("VTBJ"),P=F("1OyB"),R=F("vuIU"),U=F("Ji7U"),A=F("LK+K"),I=F("q1tI"),W=F.n(I),j=F("m+aA"),e=F("Zm9Q"),C=F("Kwbf"),f=F("c+Xe"),h=F("bdgK"),l="rc-observer-key",i=function(s){Object(U.a)(o,s);var u=Object(A.a)(o);function o(){var a;return Object(P.a)(this,o),a=u.apply(this,arguments),a.resizeObserver=null,a.childNode=null,a.currentElement=null,a.state={width:0,height:0,offsetHeight:0,offsetWidth:0},a.onResize=function(n){var t=a.props.onResize,_=n[0].target,p=_.getBoundingClientRect(),v=p.width,x=p.height,T=_.offsetWidth,b=_.offsetHeight,d=Math.floor(v),g=Math.floor(x);if(a.state.width!==d||a.state.height!==g||a.state.offsetWidth!==T||a.state.offsetHeight!==b){var c={width:d,height:g,offsetWidth:T,offsetHeight:b};a.setState(c),t&&Promise.resolve().then(function(){t(Object(ee.a)(Object(ee.a)({},c),{},{offsetWidth:T,offsetHeight:b}))})}},a.setChildNode=function(n){a.childNode=n},a}return Object(R.a)(o,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var n=this.props.disabled;if(n){this.destroyObserver();return}var t=Object(j.a)(this.childNode||this),_=t!==this.currentElement;_&&(this.destroyObserver(),this.currentElement=t),!this.resizeObserver&&t&&(this.resizeObserver=new h.default(this.onResize),this.resizeObserver.observe(t))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var n=this.props.children,t=Object(e.a)(n);if(t.length>1)Object(C.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(t.length===0)return Object(C.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var _=t[0];if(I.isValidElement(_)&&Object(f.c)(_)){var p=_.ref;t[0]=I.cloneElement(_,{ref:Object(f.a)(p,this.setChildNode)})}return t.length===1?t[0]:t.map(function(v,x){return!I.isValidElement(v)||"key"in v&&v.key!==null?v:I.cloneElement(v,{key:"".concat(l,"-").concat(x)})})}}]),o}(I.Component);i.displayName="ResizeObserver",ce.a=i},t9D7:function(Ke,ce,F){"use strict";F.d(ce,"b",function(){return W}),F.d(ce,"g",function(){return e}),F.d(ce,"d",function(){return C}),F.d(ce,"e",function(){return f}),F.d(ce,"a",function(){return h}),F.d(ce,"f",function(){return s}),F.d(ce,"c",function(){return u});var ee=F("Vhoy"),P=F("MI8n"),R=F("pmY6"),U=F("Cg/j"),A=F("ic2d"),I=F("nEHx");const W=Object(U.c)("themeService");var j;(function(o){function a(n){return n&&typeof n=="object"&&typeof n.id=="string"}o.isThemeColor=a})(j||(j={}));function e(o){return{id:o}}var C;(function(o){function a(x){return x&&typeof x=="object"&&typeof x.id=="string"&&(typeof x.color=="undefined"||j.isThemeColor(x.color))}o.isThemeIcon=a;const n=new RegExp(`^\\$\\((${ee.a.iconNameExpression}(?:${ee.a.iconModifierExpression})?)\\)$`);function t(x){const T=n.exec(x);if(!T)return;let[,b]=T;return{id:b}}o.fromString=t;function _(x,T){let b=x.id;const d=b.lastIndexOf("~");return d!==-1&&(b=b.substring(0,d)),T&&(b=`${b}~${T}`),{id:b}}o.modify=_;function p(x,T){var b,d;return x.id===T.id&&((b=x.color)===null||b===void 0?void 0:b.id)===((d=T.color)===null||d===void 0?void 0:d.id)}o.isEqual=p;function v(x,T){return{id:x.id,color:T?e(T):void 0}}o.asThemeIcon=v,o.asClassNameArray=ee.a.asClassNameArray,o.asClassName=ee.a.asClassName,o.asCSSSelector=ee.a.asCSSSelector})(C||(C={}));function f(o){switch(o){case I.a.DARK:return"vs-dark";case I.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const h={ThemingContribution:"base.contributions.theming"};class l{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new P.b}onColorThemeChange(o){return this.themingParticipants.push(o),this.onThemingParticipantAddedEmitter.fire(o),Object(R.i)(()=>{const a=this.themingParticipants.indexOf(o);this.themingParticipants.splice(a,1)})}getThemingParticipants(){return this.themingParticipants}}let i=new l;A.a.add(h.ThemingContribution,i);function s(o){return i.onColorThemeChange(o)}class u extends R.a{constructor(o){super();this.themeService=o,this.theme=o.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(a=>this.onThemeChange(a)))}onThemeChange(o){this.theme=o,this.updateStyles()}updateStyles(){}}},ulZh:function(Ke,ce,F){typeof window!="undefined"&&function(P,R){Ke.exports=R()}(this,function(){return function(ee){var P={};function R(U){if(P[U])return P[U].exports;var A=P[U]={i:U,l:!1,exports:{}};return ee[U].call(A.exports,A,A.exports,R),A.l=!0,A.exports}return R.m=ee,R.c=P,R.d=function(U,A,I){R.o(U,A)||Object.defineProperty(U,A,{enumerable:!0,get:I})},R.r=function(U){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(U,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(U,"__esModule",{value:!0})},R.t=function(U,A){if(A&1&&(U=R(U)),A&8)return U;if(A&4&&typeof U=="object"&&U&&U.__esModule)return U;var I=Object.create(null);if(R.r(I),Object.defineProperty(I,"default",{enumerable:!0,value:U}),A&2&&typeof U!="string")for(var W in U)R.d(I,W,function(j){return U[j]}.bind(null,W));return I},R.n=function(U){var A=U&&U.__esModule?function(){return U.default}:function(){return U};return R.d(A,"a",A),A},R.o=function(U,A){return Object.prototype.hasOwnProperty.call(U,A)},R.p="/dist/",R(R.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(ee,P,R){"use strict";var U=Object.prototype.hasOwnProperty,A="~";function I(){}Object.create&&(I.prototype=Object.create(null),new I().__proto__||(A=!1));function W(f,h,l){this.fn=f,this.context=h,this.once=l||!1}function j(f,h,l,i,s){if(typeof l!="function")throw new TypeError("The listener must be a function");var u=new W(l,i||f,s),o=A?A+h:h;return f._events[o]?f._events[o].fn?f._events[o]=[f._events[o],u]:f._events[o].push(u):(f._events[o]=u,f._eventsCount++),f}function e(f,h){--f._eventsCount===0?f._events=new I:delete f._events[h]}function C(){this._events=new I,this._eventsCount=0}C.prototype.eventNames=function(){var h=[],l,i;if(this._eventsCount===0)return h;for(i in l=this._events)U.call(l,i)&&h.push(A?i.slice(1):i);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(l)):h},C.prototype.listeners=function(h){var l=A?A+h:h,i=this._events[l];if(!i)return[];if(i.fn)return[i.fn];for(var s=0,u=i.length,o=new Array(u);s<u;s++)o[s]=i[s].fn;return o},C.prototype.listenerCount=function(h){var l=A?A+h:h,i=this._events[l];return i?i.fn?1:i.length:0},C.prototype.emit=function(h,l,i,s,u,o){var a=A?A+h:h;if(!this._events[a])return!1;var n=this._events[a],t=arguments.length,_,p;if(n.fn){n.once&&this.removeListener(h,n.fn,void 0,!0);switch(t){case 1:return n.fn.call(n.context),!0;case 2:return n.fn.call(n.context,l),!0;case 3:return n.fn.call(n.context,l,i),!0;case 4:return n.fn.call(n.context,l,i,s),!0;case 5:return n.fn.call(n.context,l,i,s,u),!0;case 6:return n.fn.call(n.context,l,i,s,u,o),!0}for(p=1,_=new Array(t-1);p<t;p++)_[p-1]=arguments[p];n.fn.apply(n.context,_)}else{var v=n.length,x;for(p=0;p<v;p++){n[p].once&&this.removeListener(h,n[p].fn,void 0,!0);switch(t){case 1:n[p].fn.call(n[p].context);break;case 2:n[p].fn.call(n[p].context,l);break;case 3:n[p].fn.call(n[p].context,l,i);break;case 4:n[p].fn.call(n[p].context,l,i,s);break;default:if(!_)for(x=1,_=new Array(t-1);x<t;x++)_[x-1]=arguments[x];n[p].fn.apply(n[p].context,_)}}}return!0},C.prototype.on=function(h,l,i){return j(this,h,l,i,!1)},C.prototype.once=function(h,l,i){return j(this,h,l,i,!0)},C.prototype.removeListener=function(h,l,i,s){var u=A?A+h:h;if(!this._events[u])return this;if(!l)return e(this,u),this;var o=this._events[u];if(o.fn)o.fn===l&&(!s||o.once)&&(!i||o.context===i)&&e(this,u);else{for(var a=0,n=[],t=o.length;a<t;a++)(o[a].fn!==l||s&&!o[a].once||i&&o[a].context!==i)&&n.push(o[a]);n.length?this._events[u]=n.length===1?n[0]:n:e(this,u)}return this},C.prototype.removeAllListeners=function(h){var l;return h?(l=A?A+h:h,this._events[l]&&e(this,l)):(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,ee.exports=C},"./node_modules/url-toolkit/src/url-toolkit.js":function(ee,P,R){(function(U){var A=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,I=/^([^\/?#]*)([^]*)$/,W=/(?:\/|^)\.(?=\/)/g,j=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,e={buildAbsoluteURL:function(C,f,h){if(h=h||{},C=C.trim(),f=f.trim(),!f){if(!h.alwaysNormalize)return C;var l=e.parseURL(C);if(!l)throw new Error("Error trying to parse base URL.");return l.path=e.normalizePath(l.path),e.buildURLFromParts(l)}var i=e.parseURL(f);if(!i)throw new Error("Error trying to parse relative URL.");if(i.scheme)return h.alwaysNormalize?(i.path=e.normalizePath(i.path),e.buildURLFromParts(i)):f;var s=e.parseURL(C);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&s.path[0]!=="/"){var u=I.exec(s.path);s.netLoc=u[1],s.path=u[2]}s.netLoc&&!s.path&&(s.path="/");var o={scheme:s.scheme,netLoc:i.netLoc,path:null,params:i.params,query:i.query,fragment:i.fragment};if(!i.netLoc&&(o.netLoc=s.netLoc,i.path[0]!=="/"))if(!i.path)o.path=s.path,i.params||(o.params=s.params,i.query||(o.query=s.query));else{var a=s.path,n=a.substring(0,a.lastIndexOf("/")+1)+i.path;o.path=e.normalizePath(n)}return o.path===null&&(o.path=h.alwaysNormalize?e.normalizePath(i.path):i.path),e.buildURLFromParts(o)},parseURL:function(C){var f=A.exec(C);return f?{scheme:f[1]||"",netLoc:f[2]||"",path:f[3]||"",params:f[4]||"",query:f[5]||"",fragment:f[6]||""}:null},normalizePath:function(C){for(C=C.split("").reverse().join("").replace(W,"");C.length!==(C=C.replace(j,"")).length;);return C.split("").reverse().join("")},buildURLFromParts:function(C){return C.scheme+C.netLoc+C.path+C.params+C.query+C.fragment}};ee.exports=e})(this)},"./node_modules/webworkify-webpack/index.js":function(ee,P,R){function U(h){var l={};function i(u){if(l[u])return l[u].exports;var o=l[u]={i:u,l:!1,exports:{}};return h[u].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=h,i.c=l,i.i=function(u){return u},i.d=function(u,o,a){i.o(u,o)||Object.defineProperty(u,o,{configurable:!1,enumerable:!0,get:a})},i.r=function(u){Object.defineProperty(u,"__esModule",{value:!0})},i.n=function(u){var o=u&&u.__esModule?function(){return u.default}:function(){return u};return i.d(o,"a",o),o},i.o=function(u,o){return Object.prototype.hasOwnProperty.call(u,o)},i.p="/",i.oe=function(u){throw console.error(u),u};var s=i(i.s=ENTRY_MODULE);return s.default||s}var A="[\\.|\\-|\\+|\\w|/|@]+",I="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+A+").*?\\)";function W(h){return(h+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function j(h){return!isNaN(1*h)}function e(h,l,i){var s={};s[i]=[];var u=l.toString(),o=u.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!o)return s;for(var a=o[1],n=new RegExp("(\\\\n|\\W)"+W(a)+I,"g"),t;t=n.exec(u);){if(t[3]==="dll-reference")continue;s[i].push(t[3])}for(n=new RegExp("\\("+W(a)+'\\("(dll-reference\\s('+A+'))"\\)\\)'+I,"g");t=n.exec(u);)h[t[2]]||(s[i].push(t[1]),h[t[2]]=R(t[1]).m),s[t[2]]=s[t[2]]||[],s[t[2]].push(t[4]);for(var _=Object.keys(s),p=0;p<_.length;p++)for(var v=0;v<s[_[p]].length;v++)j(s[_[p]][v])&&(s[_[p]][v]=1*s[_[p]][v]);return s}function C(h){var l=Object.keys(h);return l.reduce(function(i,s){return i||h[s].length>0},!1)}function f(h,l){for(var i={main:[l]},s={main:[]},u={main:{}};C(i);)for(var o=Object.keys(i),a=0;a<o.length;a++){var n=o[a],t=i[n],_=t.pop();if(u[n]=u[n]||{},u[n][_]||!h[n][_])continue;u[n][_]=!0,s[n]=s[n]||[],s[n].push(_);for(var p=e(h,h[n][_],n),v=Object.keys(p),x=0;x<v.length;x++)i[v[x]]=i[v[x]]||[],i[v[x]]=i[v[x]].concat(p[v[x]])}return s}ee.exports=function(h,l){l=l||{};var i={main:R.m},s=l.all?{main:Object.keys(i.main)}:f(i,h),u="";Object.keys(s).filter(function(_){return _!=="main"}).forEach(function(_){for(var p=0;s[_][p];)p++;s[_].push(p),i[_][p]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",u=u+"var "+_+" = ("+U.toString().replace("ENTRY_MODULE",JSON.stringify(p))+")({"+s[_].map(function(v){return""+JSON.stringify(v)+": "+i[_][v].toString()}).join(",")+`});
|
|
`}),u=u+"new (("+U.toString().replace("ENTRY_MODULE",JSON.stringify(h))+")({"+s.main.map(function(_){return""+JSON.stringify(_)+": "+i.main[_].toString()}).join(",")+"}))(self);";var o=new window.Blob([u],{type:"text/javascript"});if(l.bare)return o;var a=window.URL||window.webkitURL||window.mozURL||window.msURL,n=a.createObjectURL(o),t=new window.Worker(n);return t.objectURL=n,t}},"./src/config.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"hlsDefaultConfig",function(){return x}),R.d(P,"mergeConfig",function(){return b}),R.d(P,"enableStreamingMode",function(){return d});var U=R("./src/controller/abr-controller.ts"),A=R("./src/controller/audio-stream-controller.ts"),I=R("./src/controller/audio-track-controller.ts"),W=R("./src/controller/subtitle-stream-controller.ts"),j=R("./src/controller/subtitle-track-controller.ts"),e=R("./src/controller/buffer-controller.ts"),C=R("./src/controller/timeline-controller.ts"),f=R("./src/controller/cap-level-controller.ts"),h=R("./src/controller/fps-controller.ts"),l=R("./src/controller/eme-controller.ts"),i=R("./src/controller/cmcd-controller.ts"),s=R("./src/utils/xhr-loader.ts"),u=R("./src/utils/fetch-loader.ts"),o=R("./src/utils/cues.ts"),a=R("./src/utils/mediakeys-helper.ts"),n=R("./src/utils/logger.ts");function t(){return t=Object.assign||function(g){for(var c=1;c<arguments.length;c++){var y=arguments[c];for(var r in y)Object.prototype.hasOwnProperty.call(y,r)&&(g[r]=y[r])}return g},t.apply(this,arguments)}function _(g,c){var y=Object.keys(g);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(g);c&&(r=r.filter(function(w){return Object.getOwnPropertyDescriptor(g,w).enumerable})),y.push.apply(y,r)}return y}function p(g){for(var c=1;c<arguments.length;c++){var y=arguments[c]!=null?arguments[c]:{};c%2?_(Object(y),!0).forEach(function(r){v(g,r,y[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(y)):_(Object(y)).forEach(function(r){Object.defineProperty(g,r,Object.getOwnPropertyDescriptor(y,r))})}return g}function v(g,c,y){return c in g?Object.defineProperty(g,c,{value:y,enumerable:!0,configurable:!0,writable:!0}):g[c]=y,g}var x=p(p({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:s.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:U.default,bufferController:e.default,capLevelController:f.default,fpsController:h.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:a.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},T()),{},{subtitleStreamController:W.SubtitleStreamController,subtitleTrackController:j.default,timelineController:C.TimelineController,audioStreamController:A.default,audioTrackController:I.default,emeController:l.default,cmcdController:i.default});function T(){return{cueHandler:o.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function b(g,c){if((c.liveSyncDurationCount||c.liveMaxLatencyDurationCount)&&(c.liveSyncDuration||c.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(c.liveMaxLatencyDurationCount!==void 0&&(c.liveSyncDurationCount===void 0||c.liveMaxLatencyDurationCount<=c.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(c.liveMaxLatencyDuration!==void 0&&(c.liveSyncDuration===void 0||c.liveMaxLatencyDuration<=c.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return t({},g,c)}function d(g){var c=g.loader;if(c!==u.default&&c!==s.default)n.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),g.progressive=!1;else{var y=Object(u.fetchSupported)();y&&(g.loader=u.default,g.progressive=!0,g.enableSoftwareAES=!0,n.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(ee,P,R){"use strict";R.r(P);var U=R("./src/polyfills/number.ts"),A=R("./src/utils/ewma-bandwidth-estimator.ts"),I=R("./src/events.ts"),W=R("./src/utils/buffer-helper.ts"),j=R("./src/errors.ts"),e=R("./src/types/loader.ts"),C=R("./src/utils/logger.ts");function f(i,s){for(var u=0;u<s.length;u++){var o=s[u];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(i,o.key,o)}}function h(i,s,u){return s&&f(i.prototype,s),u&&f(i,u),i}var l=function(){function i(u){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=u;var o=u.config;this.bwEstimator=new A.default(o.abrEwmaSlowVoD,o.abrEwmaFastVoD,o.abrEwmaDefaultEstimate),this.registerListeners()}var s=i.prototype;return s.registerListeners=function(){var o=this.hls;o.on(I.Events.FRAG_LOADING,this.onFragLoading,this),o.on(I.Events.FRAG_LOADED,this.onFragLoaded,this),o.on(I.Events.FRAG_BUFFERED,this.onFragBuffered,this),o.on(I.Events.LEVEL_LOADED,this.onLevelLoaded,this),o.on(I.Events.ERROR,this.onError,this)},s.unregisterListeners=function(){var o=this.hls;o.off(I.Events.FRAG_LOADING,this.onFragLoading,this),o.off(I.Events.FRAG_LOADED,this.onFragLoaded,this),o.off(I.Events.FRAG_BUFFERED,this.onFragBuffered,this),o.off(I.Events.LEVEL_LOADED,this.onLevelLoaded,this),o.off(I.Events.ERROR,this.onError,this)},s.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},s.onFragLoading=function(o,a){var n=a.frag;if(n.type===e.PlaylistLevelType.MAIN&&!this.timer){var t;this.fragCurrent=n,this.partCurrent=(t=a.part)!=null?t:null,this.timer=self.setInterval(this.onCheck,100)}},s.onLevelLoaded=function(o,a){var n=this.hls.config;a.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD)},s._abandonRulesCheck=function(){var o=this.fragCurrent,a=this.partCurrent,n=this.hls,t=n.autoLevelEnabled,_=n.config,p=n.media;if(!o||!p)return;var v=a?a.stats:o.stats,x=a?a.duration:o.duration;if(v.aborted){C.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!t||p.paused||!p.playbackRate||!p.readyState)return;var T=performance.now()-v.loading.start,b=Math.abs(p.playbackRate);if(T<=500*x/b)return;var d=n.levels,g=n.minAutoLevel,c=d[o.level],y=v.total||Math.max(v.loaded,Math.round(x*c.maxBitrate/8)),r=Math.max(1,v.bwEstimate?v.bwEstimate/8:v.loaded*1e3/T),w=(y-v.loaded)/r,D=p.currentTime,L=(W.BufferHelper.bufferInfo(p,D,_.maxBufferHole).end-D)/b;if(L>=2*x/b||w<=L)return;var S=Number.POSITIVE_INFINITY,M;for(M=o.level-1;M>g;M--){var H=d[M].maxBitrate;if(S=x*H/(8*.8*r),S<L)break}if(S>=w)return;var O=this.bwEstimator.getEstimate();C.logger.warn("Fragment "+o.sn+(a?" part "+a.index:"")+" of level "+o.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+M+`
|
|
Current BW estimate: `+(Object(U.isFiniteNumber)(O)?(O/1024).toFixed(3):"Unknown")+` Kb/s
|
|
Estimated load time for current fragment: `+w.toFixed(3)+` s
|
|
Estimated load time for the next fragment: `+S.toFixed(3)+` s
|
|
Time to underbuffer: `+L.toFixed(3)+" s"),n.nextLoadLevel=M,this.bwEstimator.sample(T,v.loaded),this.clearTimer(),o.loader&&(this.fragCurrent=this.partCurrent=null,o.loader.abort()),n.trigger(I.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:o,part:a,stats:v})},s.onFragLoaded=function(o,a){var n=a.frag,t=a.part;if(n.type===e.PlaylistLevelType.MAIN&&Object(U.isFiniteNumber)(n.sn)){var _=t?t.stats:n.stats,p=t?t.duration:n.duration;if(this.clearTimer(),this.lastLoadedFragLevel=n.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var v=this.hls.levels[n.level],x=(v.loaded?v.loaded.bytes:0)+_.loaded,T=(v.loaded?v.loaded.duration:0)+p;v.loaded={bytes:x,duration:T},v.realBitrate=Math.round(8*x/T)}if(n.bitrateTest){var b={stats:_,frag:n,part:t,id:n.type};this.onFragBuffered(I.Events.FRAG_BUFFERED,b),n.bitrateTest=!1}}},s.onFragBuffered=function(o,a){var n=a.frag,t=a.part,_=t?t.stats:n.stats;if(_.aborted)return;if(n.type!==e.PlaylistLevelType.MAIN||n.sn==="initSegment")return;var p=_.parsing.end-_.loading.start;this.bwEstimator.sample(p,_.loaded),_.bwEstimate=this.bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=p/1e3:this.bitrateTestDelay=0},s.onError=function(o,a){switch(a.details){case j.ErrorDetails.FRAG_LOAD_ERROR:case j.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},s.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},s.getNextABRAutoLevel=function(){var o=this.fragCurrent,a=this.partCurrent,n=this.hls,t=n.maxAutoLevel,_=n.config,p=n.minAutoLevel,v=n.media,x=a?a.duration:o?o.duration:0,T=v?v.currentTime:0,b=v&&v.playbackRate!==0?Math.abs(v.playbackRate):1,d=this.bwEstimator?this.bwEstimator.getEstimate():_.abrEwmaDefaultEstimate,g=(W.BufferHelper.bufferInfo(v,T,_.maxBufferHole).end-T)/b,c=this.findBestLevel(d,p,t,g,_.abrBandWidthFactor,_.abrBandWidthUpFactor);if(c>=0)return c;C.logger.trace((g?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var y=x?Math.min(x,_.maxStarvationDelay):_.maxStarvationDelay,r=_.abrBandWidthFactor,w=_.abrBandWidthUpFactor;if(!g){var D=this.bitrateTestDelay;if(D){var L=x?Math.min(x,_.maxLoadingDelay):_.maxLoadingDelay;y=L-D,C.logger.trace("bitrate test took "+Math.round(1e3*D)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*y)+" ms"),r=w=1}}return c=this.findBestLevel(d,p,t,g+y,r,w),Math.max(c,0)},s.findBestLevel=function(o,a,n,t,_,p){for(var v,x=this.fragCurrent,T=this.partCurrent,b=this.lastLoadedFragLevel,d=this.hls.levels,g=d[b],c=!!(g!=null&&(v=g.details)!==null&&v!==void 0&&v.live),y=g==null?void 0:g.codecSet,r=T?T.duration:x?x.duration:0,w=n;w>=a;w--){var D=d[w];if(!D||y&&D.codecSet!==y)continue;var L=D.details,S=(T?L==null?void 0:L.partTarget:L==null?void 0:L.averagetargetduration)||r,M=void 0;w<=b?M=_*o:M=p*o;var H=d[w].maxBitrate,O=H*S/M;if(C.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+w+"/"+Math.round(M)+"/"+H+"/"+S+"/"+t+"/"+O),M>H&&(!O||c&&!this.bitrateTestDelay||O<t))return w}return-1},h(i,[{key:"nextAutoLevel",get:function(){var o=this._nextAutoLevel,a=this.bwEstimator;if(o!==-1&&(!a||!a.canEstimate()))return o;var n=this.getNextABRAutoLevel();return o!==-1&&(n=Math.min(o,n)),n},set:function(o){this._nextAutoLevel=o}}]),i}();P.default=l},"./src/controller/audio-stream-controller.ts":function(ee,P,R){"use strict";R.r(P);var U=R("./src/polyfills/number.ts"),A=R("./src/controller/base-stream-controller.ts"),I=R("./src/events.ts"),W=R("./src/utils/buffer-helper.ts"),j=R("./src/controller/fragment-tracker.ts"),e=R("./src/types/level.ts"),C=R("./src/types/loader.ts"),f=R("./src/loader/fragment.ts"),h=R("./src/demux/chunk-cache.ts"),l=R("./src/demux/transmuxer-interface.ts"),i=R("./src/types/transmuxer.ts"),s=R("./src/controller/fragment-finders.ts"),u=R("./src/utils/discontinuities.ts"),o=R("./src/errors.ts"),a=R("./src/utils/logger.ts");function n(){return n=Object.assign||function(x){for(var T=1;T<arguments.length;T++){var b=arguments[T];for(var d in b)Object.prototype.hasOwnProperty.call(b,d)&&(x[d]=b[d])}return x},n.apply(this,arguments)}function t(x,T){x.prototype=Object.create(T.prototype),x.prototype.constructor=x,_(x,T)}function _(x,T){return _=Object.setPrototypeOf||function(d,g){return d.__proto__=g,d},_(x,T)}var p=100,v=function(x){t(T,x);function T(d,g){var c;return c=x.call(this,d,g,"[audio-stream-controller]")||this,c.videoBuffer=null,c.videoTrackCC=-1,c.waitingVideoCC=-1,c.audioSwitch=!1,c.trackId=-1,c.waitingData=null,c.mainDetails=null,c.bufferFlushed=!1,c._registerListeners(),c}var b=T.prototype;return b.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},b._registerListeners=function(){var g=this.hls;g.on(I.Events.MEDIA_ATTACHED,this.onMediaAttached,this),g.on(I.Events.MEDIA_DETACHING,this.onMediaDetaching,this),g.on(I.Events.MANIFEST_LOADING,this.onManifestLoading,this),g.on(I.Events.LEVEL_LOADED,this.onLevelLoaded,this),g.on(I.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),g.on(I.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),g.on(I.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),g.on(I.Events.ERROR,this.onError,this),g.on(I.Events.BUFFER_RESET,this.onBufferReset,this),g.on(I.Events.BUFFER_CREATED,this.onBufferCreated,this),g.on(I.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),g.on(I.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),g.on(I.Events.FRAG_BUFFERED,this.onFragBuffered,this)},b._unregisterListeners=function(){var g=this.hls;g.off(I.Events.MEDIA_ATTACHED,this.onMediaAttached,this),g.off(I.Events.MEDIA_DETACHING,this.onMediaDetaching,this),g.off(I.Events.MANIFEST_LOADING,this.onManifestLoading,this),g.off(I.Events.LEVEL_LOADED,this.onLevelLoaded,this),g.off(I.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),g.off(I.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),g.off(I.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),g.off(I.Events.ERROR,this.onError,this),g.off(I.Events.BUFFER_RESET,this.onBufferReset,this),g.off(I.Events.BUFFER_CREATED,this.onBufferCreated,this),g.off(I.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),g.off(I.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),g.off(I.Events.FRAG_BUFFERED,this.onFragBuffered,this)},b.onInitPtsFound=function(g,c){var y=c.frag,r=c.id,w=c.initPTS;if(r==="main"){var D=y.cc;this.initPTS[y.cc]=w,this.log("InitPTS for cc: "+D+" found from main: "+w),this.videoTrackCC=D,this.state===A.State.WAITING_INIT_PTS&&this.tick()}},b.startLoad=function(g){if(!this.levels){this.startPosition=g,this.state=A.State.STOPPED;return}var c=this.lastCurrentTime;this.stopLoad(),this.setInterval(p),this.fragLoadError=0,c>0&&g===-1?(this.log("Override startPosition with lastCurrentTime @"+c.toFixed(3)),this.state=A.State.IDLE):(this.loadedmetadata=!1,this.state=A.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=g,this.tick()},b.doTick=function(){switch(this.state){case A.State.IDLE:this.doTickIdle();break;case A.State.WAITING_TRACK:{var g,c=this.levels,y=this.trackId,r=c==null||((g=c[y])===null||g===void 0)?void 0:g.details;if(r){if(this.waitForCdnTuneIn(r))break;this.state=A.State.WAITING_INIT_PTS}break}case A.State.FRAG_LOADING_WAITING_RETRY:{var w,D=performance.now(),L=this.retryDate;(!L||D>=L||(w=this.media)!==null&&w!==void 0&&w.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=A.State.IDLE);break}case A.State.WAITING_INIT_PTS:{var S=this.waitingData;if(S){var M=S.frag,H=S.part,O=S.cache,K=S.complete;if(this.initPTS[M.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=A.State.FRAG_LOADING;var Y=O.flush(),ie={frag:M,part:H,payload:Y,networkDetails:null};this._handleFragmentLoadProgress(ie),K&&x.prototype._handleFragmentLoadComplete.call(this,ie)}else if(this.videoTrackCC!==this.waitingVideoCC)a.logger.log("Waiting fragment cc ("+M.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var re=this.getLoadPosition(),Te=W.BufferHelper.bufferInfo(this.mediaBuffer,re,this.config.maxBufferHole),_e=Object(s.fragmentWithinToleranceTest)(Te.end,this.config.maxFragLookUpTolerance,M);_e<0&&(a.logger.log("Waiting fragment cc ("+M.cc+") @ "+M.start+" cancelled because another fragment at "+Te.end+" is needed"),this.clearWaitingFragment())}}else this.state=A.State.IDLE}}this.onTickEnd()},b.clearWaitingFragment=function(){var g=this.waitingData;g&&(this.fragmentTracker.removeFragment(g.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=A.State.IDLE)},b.onTickEnd=function(){var g=this.media;if(!g||!g.readyState)return;var c=this.mediaBuffer?this.mediaBuffer:g,y=c.buffered;!this.loadedmetadata&&y.length&&(this.loadedmetadata=!0),this.lastCurrentTime=g.currentTime},b.doTickIdle=function(){var g,c,y=this.hls,r=this.levels,w=this.media,D=this.trackId,L=y.config;if(!r||!r[D])return;if(!w&&(this.startFragRequested||!L.startFragPrefetch))return;var S=r[D],M=S.details;if(!M||M.live&&this.levelLastLoaded!==D||this.waitForCdnTuneIn(M)){this.state=A.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,f.ElementaryStreamTypes.AUDIO,C.PlaylistLevelType.AUDIO));var H=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,C.PlaylistLevelType.AUDIO);if(H===null)return;var O=H.len,K=this.getMaxBufferLength(),Y=this.audioSwitch;if(O>=K&&!Y)return;if(!Y&&this._streamEnded(H,M)){y.trigger(I.Events.BUFFER_EOS,{type:"audio"}),this.state=A.State.ENDED;return}var ie=M.fragments,re=ie[0].start,Te=H.end;if(Y){var _e=this.getLoadPosition();Te=_e,M.PTSKnown&&_e<re&&((H.end>re||H.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),w.currentTime=re+.05))}var we=this.getNextFragment(Te,M);if(!we){this.bufferFlushed=!0;return}((g=we.decryptdata)===null||g===void 0?void 0:g.keyFormat)==="identity"&&!((c=we.decryptdata)!==null&&c!==void 0&&c.key)?this.loadKey(we,M):this.loadFragment(we,M,Te)},b.getMaxBufferLength=function(){var g=x.prototype.getMaxBufferLength.call(this),c=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,C.PlaylistLevelType.MAIN);return c===null?g:Math.max(g,c.len)},b.onMediaDetaching=function(){this.videoBuffer=null,x.prototype.onMediaDetaching.call(this)},b.onAudioTracksUpdated=function(g,c){var y=c.audioTracks;this.resetTransmuxer(),this.levels=y.map(function(r){return new e.Level(r)})},b.onAudioTrackSwitching=function(g,c){var y=!!c.url;this.trackId=c.id;var r=this.fragCurrent;r!=null&&r.loader&&r.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),y?this.setInterval(p):this.resetTransmuxer(),y?(this.audioSwitch=!0,this.state=A.State.IDLE):this.state=A.State.STOPPED,this.tick()},b.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},b.onLevelLoaded=function(g,c){this.mainDetails=c.details},b.onAudioTrackLoaded=function(g,c){var y,r=this.levels,w=c.details,D=c.id;if(!r){this.warn("Audio tracks were reset while loading level "+D);return}this.log("Track "+D+" loaded ["+w.startSN+","+w.endSN+"],duration:"+w.totalduration);var L=r[D],S=0;if(w.live||(y=L.details)!==null&&y!==void 0&&y.live){var M=this.mainDetails;if(w.fragments[0]||(w.deltaUpdateFailed=!0),w.deltaUpdateFailed||!M)return;!L.details&&w.hasProgramDateTime&&M.hasProgramDateTime?(Object(u.alignMediaPlaylistByPDT)(w,M),S=w.fragments[0].start):S=this.alignPlaylists(w,L.details)}L.details=w,this.levelLastLoaded=D,!this.startFragRequested&&(this.mainDetails||!w.live)&&this.setStartPosition(L.details,S),this.state===A.State.WAITING_TRACK&&!this.waitForCdnTuneIn(w)&&(this.state=A.State.IDLE),this.tick()},b._handleFragmentLoadProgress=function(g){var c,y=g.frag,r=g.part,w=g.payload,D=this.config,L=this.trackId,S=this.levels;if(!S){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+y.sn+" of level "+y.level+" will not be buffered");return}var M=S[L];console.assert(M,"Audio track is defined on fragment load progress");var H=M.details;console.assert(H,"Audio track details are defined on fragment load progress");var O=D.defaultAudioCodec||M.audioCodec||"mp4a.40.2",K=this.transmuxer;K||(K=this.transmuxer=new l.default(this.hls,C.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var Y=this.initPTS[y.cc],ie=(c=y.initSegment)===null||c===void 0?void 0:c.data;if(Y!==void 0){var re=!1,Te=r?r.index:-1,_e=Te!==-1,we=new i.ChunkMetadata(y.level,y.sn,y.stats.chunkCount,w.byteLength,Te,_e);K.push(w,ie,O,"",y,r,H.totalduration,re,we,Y)}else{a.logger.log("Unknown video PTS for cc "+y.cc+", waiting for video PTS before demuxing audio frag "+y.sn+" of ["+H.startSN+" ,"+H.endSN+"],track "+L);var Ce=this.waitingData=this.waitingData||{frag:y,part:r,cache:new h.default,complete:!1},Re=Ce.cache;Re.push(new Uint8Array(w)),this.waitingVideoCC=this.videoTrackCC,this.state=A.State.WAITING_INIT_PTS}},b._handleFragmentLoadComplete=function(g){if(this.waitingData){this.waitingData.complete=!0;return}x.prototype._handleFragmentLoadComplete.call(this,g)},b.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},b.onBufferCreated=function(g,c){var y=c.tracks.audio;y&&(this.mediaBuffer=y.buffer),c.tracks.video&&(this.videoBuffer=c.tracks.video.buffer)},b.onFragBuffered=function(g,c){var y=c.frag,r=c.part;if(y.type!==C.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(y)){this.warn("Fragment "+y.sn+(r?" p: "+r.index:"")+" of level "+y.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}y.sn!=="initSegment"&&(this.fragPrevious=y,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(I.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(y,r)},b.onError=function(g,c){switch(c.details){case o.ErrorDetails.FRAG_LOAD_ERROR:case o.ErrorDetails.FRAG_LOAD_TIMEOUT:case o.ErrorDetails.KEY_LOAD_ERROR:case o.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(C.PlaylistLevelType.AUDIO,c);break;case o.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case o.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==A.State.ERROR&&this.state!==A.State.STOPPED&&(this.state=c.fatal?A.State.ERROR:A.State.IDLE,this.warn(c.details+" while loading frag, switching to "+this.state+" state"));break;case o.ErrorDetails.BUFFER_FULL_ERROR:if(c.parent==="audio"&&(this.state===A.State.PARSING||this.state===A.State.PARSED)){var y=!0,r=this.getFwdBufferInfo(this.mediaBuffer,C.PlaylistLevelType.AUDIO);r&&r.len>.5&&(y=!this.reduceMaxBufferLength(r.len)),y&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,x.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},b.onBufferFlushed=function(g,c){var y=c.type;y===f.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},b._handleTransmuxComplete=function(g){var c,y="audio",r=this.hls,w=g.remuxResult,D=g.chunkMeta,L=this.getCurrentContext(D);if(!L){this.warn("The loading context changed while buffering fragment "+D.sn+" of level "+D.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(D.level);return}var S=L.frag,M=L.part,H=w.audio,O=w.text,K=w.id3,Y=w.initSegment;if(this.fragContextChanged(S))return;if(this.state=A.State.PARSING,this.audioSwitch&&H&&this.completeAudioSwitch(),Y!=null&&Y.tracks&&(this._bufferInitSegment(Y.tracks,S,D),r.trigger(I.Events.FRAG_PARSING_INIT_SEGMENT,{frag:S,id:y,tracks:Y.tracks})),H){var ie=H.startPTS,re=H.endPTS,Te=H.startDTS,_e=H.endDTS;M&&(M.elementaryStreams[f.ElementaryStreamTypes.AUDIO]={startPTS:ie,endPTS:re,startDTS:Te,endDTS:_e}),S.setElementaryStreamInfo(f.ElementaryStreamTypes.AUDIO,ie,re,Te,_e),this.bufferFragmentData(H,S,M,D)}if(K!=null&&(c=K.samples)!==null&&c!==void 0&&c.length){var we=n({frag:S,id:y},K);r.trigger(I.Events.FRAG_PARSING_METADATA,we)}if(O){var Ce=n({frag:S,id:y},O);r.trigger(I.Events.FRAG_PARSING_USERDATA,Ce)}},b._bufferInitSegment=function(g,c,y){if(this.state!==A.State.PARSING)return;g.video&&delete g.video;var r=g.audio;if(!r)return;r.levelCodec=r.codec,r.id="audio",this.log("Init audio buffer, container:"+r.container+", codecs[parsed]=["+r.codec+"]"),this.hls.trigger(I.Events.BUFFER_CODECS,g);var w=r.initSegment;if(w!=null&&w.byteLength){var D={type:"audio",frag:c,part:null,chunkMeta:y,parent:c.type,data:w};this.hls.trigger(I.Events.BUFFER_APPENDING,D)}this.tick()},b.loadFragment=function(g,c,y){var r=this.fragmentTracker.getState(g);this.fragCurrent=g,(this.audioSwitch||r===j.FragmentState.NOT_LOADED||r===j.FragmentState.PARTIAL)&&(g.sn==="initSegment"?this._loadInitSegment(g):c.live&&!Object(U.isFiniteNumber)(this.initPTS[g.cc])?(this.log("Waiting for video PTS in continuity counter "+g.cc+" of live stream before loading audio fragment "+g.sn+" of level "+this.trackId),this.state=A.State.WAITING_INIT_PTS):(this.startFragRequested=!0,x.prototype.loadFragment.call(this,g,c,y)))},b.completeAudioSwitch=function(){var g=this.hls,c=this.media,y=this.trackId;c&&(this.log("Switching audio track : flushing all audio"),x.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,g.trigger(I.Events.AUDIO_TRACK_SWITCHED,{id:y})},T}(A.default);P.default=v},"./src/controller/audio-track-controller.ts":function(ee,P,R){"use strict";R.r(P);var U=R("./src/events.ts"),A=R("./src/errors.ts"),I=R("./src/controller/base-playlist-controller.ts"),W=R("./src/types/loader.ts");function j(l,i){for(var s=0;s<i.length;s++){var u=i[s];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(l,u.key,u)}}function e(l,i,s){return i&&j(l.prototype,i),s&&j(l,s),l}function C(l,i){l.prototype=Object.create(i.prototype),l.prototype.constructor=l,f(l,i)}function f(l,i){return f=Object.setPrototypeOf||function(u,o){return u.__proto__=o,u},f(l,i)}var h=function(l){C(i,l);function i(u){var o;return o=l.call(this,u,"[audio-track-controller]")||this,o.tracks=[],o.groupId=null,o.tracksInGroup=[],o.trackId=-1,o.trackName="",o.selectDefaultTrack=!0,o.registerListeners(),o}var s=i.prototype;return s.registerListeners=function(){var o=this.hls;o.on(U.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(U.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.on(U.Events.LEVEL_LOADING,this.onLevelLoading,this),o.on(U.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),o.on(U.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),o.on(U.Events.ERROR,this.onError,this)},s.unregisterListeners=function(){var o=this.hls;o.off(U.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.off(U.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.off(U.Events.LEVEL_LOADING,this.onLevelLoading,this),o.off(U.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),o.off(U.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),o.off(U.Events.ERROR,this.onError,this)},s.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,l.prototype.destroy.call(this)},s.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},s.onManifestParsed=function(o,a){this.tracks=a.audioTracks||[]},s.onAudioTrackLoaded=function(o,a){var n=a.id,t=a.details,_=this.tracksInGroup[n];if(!_){this.warn("Invalid audio track id "+n);return}var p=_.details;_.details=a.details,this.log("audioTrack "+n+" loaded ["+t.startSN+"-"+t.endSN+"]"),n===this.trackId&&(this.retryCount=0,this.playlistLoaded(n,a,p))},s.onLevelLoading=function(o,a){this.switchLevel(a.level)},s.onLevelSwitching=function(o,a){this.switchLevel(a.level)},s.switchLevel=function(o){var a=this.hls.levels[o];if(!(a!=null&&a.audioGroupIds))return;var n=a.audioGroupIds[a.urlId];if(this.groupId!==n){this.groupId=n;var t=this.tracks.filter(function(p){return!n||p.groupId===n});this.selectDefaultTrack&&!t.some(function(p){return p.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=t;var _={audioTracks:t};this.log("Updating audio tracks, "+t.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(U.Events.AUDIO_TRACKS_UPDATED,_),this.selectInitialTrack()}},s.onError=function(o,a){if(l.prototype.onError.call(this,o,a),a.fatal||!a.context)return;a.context.type===W.PlaylistContextType.AUDIO_TRACK&&a.context.id===this.trackId&&a.context.groupId===this.groupId&&this.retryLoadingOrFail(a)},s.setAudioTrack=function(o){var a=this.tracksInGroup;if(o<0||o>=a.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var n=a[this.trackId];this.log("Now switching to audio-track index "+o);var t=a[o],_=t.id,p=t.groupId,v=p===void 0?"":p,x=t.name,T=t.type,b=t.url;if(this.trackId=o,this.trackName=x,this.selectDefaultTrack=!1,this.hls.trigger(U.Events.AUDIO_TRACK_SWITCHING,{id:_,groupId:v,name:x,type:T,url:b}),t.details&&!t.details.live)return;var d=this.switchParams(t.url,n==null?void 0:n.details);this.loadPlaylist(d)},s.selectInitialTrack=function(){var o=this.tracksInGroup;console.assert(o.length,"Initial audio track should be selected when tracks are known");var a=this.trackName,n=this.findTrackId(a)||this.findTrackId();n!==-1?this.setAudioTrack(n):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(U.Events.ERROR,{type:A.ErrorTypes.MEDIA_ERROR,details:A.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},s.findTrackId=function(o){for(var a=this.tracksInGroup,n=0;n<a.length;n++){var t=a[n];if((!this.selectDefaultTrack||t.default)&&(!o||o===t.name))return t.id}return-1},s.loadPlaylist=function(o){var a=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(a)){var n=a.id,t=a.groupId,_=a.url;if(o)try{_=o.addDirectives(_)}catch(p){this.warn("Could not construct new URL with HLS Delivery Directives: "+p)}this.log("loading audio-track playlist for id: "+n),this.clearTimer(),this.hls.trigger(U.Events.AUDIO_TRACK_LOADING,{url:_,id:n,groupId:t,deliveryDirectives:o||null})}},e(i,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(o){this.selectDefaultTrack=!1,this.setAudioTrack(o)}}]),i}(I.default);P.default=h},"./src/controller/base-playlist-controller.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"default",function(){return e});var U=R("./src/polyfills/number.ts"),A=R("./src/types/level.ts"),I=R("./src/controller/level-helper.ts"),W=R("./src/utils/logger.ts"),j=R("./src/errors.ts"),e=function(){function C(h,l){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=W.logger.log.bind(W.logger,l+":"),this.warn=W.logger.warn.bind(W.logger,l+":"),this.hls=h}var f=C.prototype;return f.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},f.onError=function(l,i){i.fatal&&i.type===j.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},f.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},f.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},f.stopLoad=function(){this.canLoad=!1,this.clearTimer()},f.switchParams=function(l,i){var s=i==null?void 0:i.renditionReports;if(s)for(var u=0;u<s.length;u++){var o=s[u],a=""+o.URI;if(a===l.substr(-a.length)){var n=parseInt(o["LAST-MSN"]),t=parseInt(o["LAST-PART"]);if(i&&this.hls.config.lowLatencyMode){var _=Math.min(i.age-i.partTarget,i.targetduration);t!==void 0&&_>i.partTarget&&(t+=1)}if(Object(U.isFiniteNumber)(n))return new A.HlsUrlParameters(n,Object(U.isFiniteNumber)(t)?t:void 0,A.HlsSkip.No)}}},f.loadPlaylist=function(l){},f.shouldLoadTrack=function(l){return this.canLoad&&l&&!!l.url&&(!l.details||l.details.live)},f.playlistLoaded=function(l,i,s){var u=this,o=i.details,a=i.stats,n=a.loading.end?Math.max(0,self.performance.now()-a.loading.end):0;if(o.advancedDateTime=Date.now()-n,o.live||s!=null&&s.live){if(o.reloaded(s),s&&this.log("live playlist "+l+" "+(o.advanced?"REFRESHED "+o.lastPartSn+"-"+o.lastPartIndex:"MISSED")),s&&o.fragments.length>0&&Object(I.mergeDetails)(s,o),!this.canLoad||!o.live)return;var t,_=void 0,p=void 0;if(o.canBlockReload&&o.endSN&&o.advanced){var v=this.hls.config.lowLatencyMode,x=o.lastPartSn,T=o.endSN,b=o.lastPartIndex,d=b!==-1,g=x===T,c=v?0:b;d?(_=g?T+1:x,p=g?c:b+1):_=T+1;var y=o.age,r=y+o.ageHeader,w=Math.min(r-o.partTarget,o.targetduration*1.5);if(w>0){if(s&&w>s.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+s.tuneInGoal+" to: "+w+" with playlist age: "+o.age),w=0;else{var D=Math.floor(w/o.targetduration);if(_+=D,p!==void 0){var L=Math.round(w%o.targetduration/o.partTarget);p+=L}this.log("CDN Tune-in age: "+o.ageHeader+"s last advanced "+y.toFixed(2)+"s goal: "+w+" skip sn "+D+" to part "+p)}o.tuneInGoal=w}if(t=this.getDeliveryDirectives(o,i.deliveryDirectives,_,p),v||!g){this.loadPlaylist(t);return}}else t=this.getDeliveryDirectives(o,i.deliveryDirectives,_,p);var S=Object(I.computeReloadInterval)(o,a);_!==void 0&&o.canBlockReload&&(S-=o.partTarget||1),this.log("reload live playlist "+l+" in "+Math.round(S)+" ms"),this.timer=self.setTimeout(function(){return u.loadPlaylist(t)},S)}else this.clearTimer()},f.getDeliveryDirectives=function(l,i,s,u){var o=Object(A.getSkipValue)(l,s);return i!=null&&i.skip&&l.deltaUpdateFailed&&(s=i.msn,u=i.part,o=A.HlsSkip.No),new A.HlsUrlParameters(s,u,o)},f.retryLoadingOrFail=function(l){var i=this,s=this.hls.config,u=this.retryCount<s.levelLoadingMaxRetry;if(u){var o;if(this.retryCount++,l.details.indexOf("LoadTimeOut")>-1&&(o=l.context)!==null&&o!==void 0&&o.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+l.details+'"'),this.loadPlaylist();else{var a=Math.min(Math.pow(2,this.retryCount)*s.levelLoadingRetryDelay,s.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return i.loadPlaylist()},a),this.warn("retry playlist loading #"+this.retryCount+" in "+a+' ms after "'+l.details+'"')}}else this.warn('cannot recover from error "'+l.details+'"'),this.clearTimer(),l.fatal=!0;return u},C}()},"./src/controller/base-stream-controller.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"State",function(){return T}),R.d(P,"default",function(){return b});var U=R("./src/polyfills/number.ts"),A=R("./src/task-loop.ts"),I=R("./src/controller/fragment-tracker.ts"),W=R("./src/utils/buffer-helper.ts"),j=R("./src/utils/logger.ts"),e=R("./src/events.ts"),C=R("./src/errors.ts"),f=R("./src/types/transmuxer.ts"),h=R("./src/utils/mp4-tools.ts"),l=R("./src/utils/discontinuities.ts"),i=R("./src/controller/fragment-finders.ts"),s=R("./src/controller/level-helper.ts"),u=R("./src/loader/fragment-loader.ts"),o=R("./src/crypt/decrypter.ts"),a=R("./src/utils/time-ranges.ts"),n=R("./src/types/loader.ts");function t(d,g){for(var c=0;c<g.length;c++){var y=g[c];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(d,y.key,y)}}function _(d,g,c){return g&&t(d.prototype,g),c&&t(d,c),d}function p(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}function v(d,g){d.prototype=Object.create(g.prototype),d.prototype.constructor=d,x(d,g)}function x(d,g){return x=Object.setPrototypeOf||function(y,r){return y.__proto__=r,y},x(d,g)}var T={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"},b=function(d){v(g,d);function g(y,r,w){var D;return D=d.call(this)||this,D.hls=void 0,D.fragPrevious=null,D.fragCurrent=null,D.fragmentTracker=void 0,D.transmuxer=null,D._state=T.STOPPED,D.media=void 0,D.mediaBuffer=void 0,D.config=void 0,D.bitrateTest=!1,D.lastCurrentTime=0,D.nextLoadPosition=0,D.startPosition=0,D.loadedmetadata=!1,D.fragLoadError=0,D.retryDate=0,D.levels=null,D.fragmentLoader=void 0,D.levelLastLoaded=null,D.startFragRequested=!1,D.decrypter=void 0,D.initPTS=[],D.onvseeking=null,D.onvended=null,D.logPrefix="",D.log=void 0,D.warn=void 0,D.logPrefix=w,D.log=j.logger.log.bind(j.logger,w+":"),D.warn=j.logger.warn.bind(j.logger,w+":"),D.hls=y,D.fragmentLoader=new u.default(y.config),D.fragmentTracker=r,D.config=y.config,D.decrypter=new o.default(y,y.config),y.on(e.Events.KEY_LOADED,D.onKeyLoaded,p(D)),D}var c=g.prototype;return c.doTick=function(){this.onTickEnd()},c.onTickEnd=function(){},c.startLoad=function(r){},c.stopLoad=function(){this.fragmentLoader.abort();var r=this.fragCurrent;r&&this.fragmentTracker.removeFragment(r),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=T.STOPPED},c._streamEnded=function(r,w){var D=this.fragCurrent,L=this.fragmentTracker;if(!w.live&&D&&D.sn===w.endSN&&!r.nextStart){var S=L.getState(D);return S===I.FragmentState.PARTIAL||S===I.FragmentState.OK}return!1},c.onMediaAttached=function(r,w){var D=this.media=this.mediaBuffer=w.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),D.addEventListener("seeking",this.onvseeking),D.addEventListener("ended",this.onvended);var L=this.config;this.levels&&L.autoStartLoad&&this.state===T.STOPPED&&this.startLoad(L.startPosition)},c.onMediaDetaching=function(){var r=this.media;r!=null&&r.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),r&&(r.removeEventListener("seeking",this.onvseeking),r.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},c.onMediaSeeking=function(){var r=this.config,w=this.fragCurrent,D=this.media,L=this.mediaBuffer,S=this.state,M=D?D.currentTime:0,H=W.BufferHelper.bufferInfo(L||D,M,r.maxBufferHole);if(this.log("media seeking to "+(Object(U.isFiniteNumber)(M)?M.toFixed(3):M)+", state: "+S),S===T.ENDED)this.resetLoadingState();else if(w&&!H.len){var O=r.maxFragLookUpTolerance,K=w.start-O,Y=w.start+w.duration+O,ie=M>Y;(M<K||ie)&&(ie&&w.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),w.loader.abort()),this.resetLoadingState())}D&&(this.lastCurrentTime=M),!this.loadedmetadata&&!H.len&&(this.nextLoadPosition=this.startPosition=M),this.tickImmediate()},c.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},c.onKeyLoaded=function(r,w){if(this.state!==T.KEY_LOADING||w.frag!==this.fragCurrent||!this.levels)return;this.state=T.IDLE;var D=this.levels[w.frag.level].details;D&&this.loadFragment(w.frag,D,w.frag.start)},c.onHandlerDestroying=function(){this.stopLoad(),d.prototype.onHandlerDestroying.call(this)},c.onHandlerDestroyed=function(){this.state=T.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,d.prototype.onHandlerDestroyed.call(this)},c.loadKey=function(r,w){this.log("Loading key for "+r.sn+" of ["+w.startSN+"-"+w.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+r.level),this.state=T.KEY_LOADING,this.fragCurrent=r,this.hls.trigger(e.Events.KEY_LOADING,{frag:r})},c.loadFragment=function(r,w,D){this._loadFragForPlayback(r,w,D)},c._loadFragForPlayback=function(r,w,D){var L=this,S=function(H){if(L.fragContextChanged(r)){L.warn("Fragment "+r.sn+(H.part?" p: "+H.part.index:"")+" of level "+r.level+" was dropped during download."),L.fragmentTracker.removeFragment(r);return}r.stats.chunkCount++,L._handleFragmentLoadProgress(H)};this._doFragLoad(r,w,D,S).then(function(M){if(!M)return;L.fragLoadError=0;var H=L.state;if(L.fragContextChanged(r)){(H===T.FRAG_LOADING||H===T.BACKTRACKING||!L.fragCurrent&&H===T.PARSING)&&(L.fragmentTracker.removeFragment(r),L.state=T.IDLE);return}if("payload"in M&&(L.log("Loaded fragment "+r.sn+" of level "+r.level),L.hls.trigger(e.Events.FRAG_LOADED,M),L.state===T.BACKTRACKING)){L.fragmentTracker.backtrack(r,M),L.resetFragmentLoading(r);return}L._handleFragmentLoadComplete(M)}).catch(function(M){L.warn(M),L.resetFragmentLoading(r)})},c.flushMainBuffer=function(r,w,D){if(D===void 0&&(D=null),!(r-w))return;var L={startOffset:r,endOffset:w,type:D};this.fragLoadError=0,this.hls.trigger(e.Events.BUFFER_FLUSHING,L)},c._loadInitSegment=function(r){var w=this;this._doFragLoad(r).then(function(D){if(!D||w.fragContextChanged(r)||!w.levels)throw new Error("init load aborted");return D}).then(function(D){var L=w.hls,S=D.payload,M=r.decryptdata;if(S&&S.byteLength>0&&M&&M.key&&M.iv&&M.method==="AES-128"){var H=self.performance.now();return w.decrypter.webCryptoDecrypt(new Uint8Array(S),M.key.buffer,M.iv.buffer).then(function(O){var K=self.performance.now();return L.trigger(e.Events.FRAG_DECRYPTED,{frag:r,payload:O,stats:{tstart:H,tdecrypt:K}}),D.payload=O,D})}return D}).then(function(D){var L=w.fragCurrent,S=w.hls,M=w.levels;if(!M)throw new Error("init load aborted, missing levels");var H=M[r.level].details;console.assert(H,"Level details are defined when init segment is loaded");var O=r.stats;w.state=T.IDLE,w.fragLoadError=0,r.data=new Uint8Array(D.payload),O.parsing.start=O.buffering.start=self.performance.now(),O.parsing.end=O.buffering.end=self.performance.now(),D.frag===L&&S.trigger(e.Events.FRAG_BUFFERED,{stats:O,frag:L,part:null,id:r.type}),w.tick()}).catch(function(D){w.warn(D),w.resetFragmentLoading(r)})},c.fragContextChanged=function(r){var w=this.fragCurrent;return!r||!w||r.level!==w.level||r.sn!==w.sn||r.urlId!==w.urlId},c.fragBufferedComplete=function(r,w){var D=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+r.type+" sn: "+r.sn+(w?" part: "+w.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+r.level+" "+a.default.toString(W.BufferHelper.getBuffered(D))),this.state=T.IDLE,this.tick()},c._handleFragmentLoadComplete=function(r){var w=this.transmuxer;if(!w)return;var D=r.frag,L=r.part,S=r.partsLoaded,M=!S||S.length===0||S.some(function(O){return!O}),H=new f.ChunkMetadata(D.level,D.sn,D.stats.chunkCount+1,0,L?L.index:-1,!M);w.flush(H)},c._handleFragmentLoadProgress=function(r){},c._doFragLoad=function(r,w,D,L){var S=this;if(D===void 0&&(D=null),!this.levels)throw new Error("frag load aborted, missing levels");if(D=Math.max(r.start,D||0),this.config.lowLatencyMode&&w){var M=w.partList;if(M&&L){D>r.end&&w.fragmentHint&&(r=w.fragmentHint);var H=this.getNextPart(M,r,D);if(H>-1){var O=M[H];return this.log("Loading part sn: "+r.sn+" p: "+O.index+" cc: "+r.cc+" of playlist ["+w.startSN+"-"+w.endSN+"] parts [0-"+H+"-"+(M.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+r.level+", target: "+parseFloat(D.toFixed(3))),this.nextLoadPosition=O.start+O.duration,this.state=T.FRAG_LOADING,this.hls.trigger(e.Events.FRAG_LOADING,{frag:r,part:M[H],targetBufferTime:D}),this.doFragPartsLoad(r,M,H,L).catch(function(K){return S.handleFragLoadError(K)})}else if(!r.url||this.loadedEndOfParts(M,D))return Promise.resolve(null)}}return this.log("Loading fragment "+r.sn+" cc: "+r.cc+" "+(w?"of ["+w.startSN+"-"+w.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+r.level+", target: "+parseFloat(D.toFixed(3))),Object(U.isFiniteNumber)(r.sn)&&!this.bitrateTest&&(this.nextLoadPosition=r.start+r.duration),this.state=T.FRAG_LOADING,this.hls.trigger(e.Events.FRAG_LOADING,{frag:r,targetBufferTime:D}),this.fragmentLoader.load(r,L).catch(function(K){return S.handleFragLoadError(K)})},c.doFragPartsLoad=function(r,w,D,L){var S=this;return new Promise(function(M,H){var O=[],K=function Y(ie){var re=w[ie];S.fragmentLoader.loadPart(r,re,L).then(function(Te){O[re.index]=Te;var _e=Te.part;S.hls.trigger(e.Events.FRAG_LOADED,Te);var we=w[ie+1];if(we&&we.fragment===r)Y(ie+1);else return M({frag:r,part:_e,partsLoaded:O})}).catch(H)};K(D)})},c.handleFragLoadError=function(r){var w=r.data;return w&&w.details===C.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(w.frag,w.part):this.hls.trigger(e.Events.ERROR,w),null},c._handleTransmuxerFlush=function(r){var w=this.getCurrentContext(r);if(!w||this.state!==T.PARSING){this.fragCurrent||(this.state=T.IDLE);return}var D=w.frag,L=w.part,S=w.level,M=self.performance.now();D.stats.parsing.end=M,L&&(L.stats.parsing.end=M),this.updateLevelTiming(D,L,S,r.partial)},c.getCurrentContext=function(r){var w=this.levels,D=r.level,L=r.sn,S=r.part;if(!w||!w[D])return this.warn("Levels object was unset while buffering fragment "+L+" of level "+D+". The current chunk will not be buffered."),null;var M=w[D],H=S>-1?Object(s.getPartWith)(M,L,S):null,O=H?H.fragment:Object(s.getFragmentWithSN)(M,L,this.fragCurrent);return O?{frag:O,part:H,level:M}:null},c.bufferFragmentData=function(r,w,D,L){if(!r||this.state!==T.PARSING)return;var S=r.data1,M=r.data2,H=S;if(S&&M&&(H=Object(h.appendUint8Array)(S,M)),!H||!H.length)return;var O={type:r.type,frag:w,part:D,chunkMeta:L,parent:w.type,data:H};this.hls.trigger(e.Events.BUFFER_APPENDING,O),r.dropped&&r.independent&&!D&&this.flushBufferGap(w)},c.flushBufferGap=function(r){var w=this.media;if(!w)return;if(!W.BufferHelper.isBuffered(w,w.currentTime)){this.flushMainBuffer(0,r.start);return}var D=w.currentTime,L=W.BufferHelper.bufferInfo(w,D,0),S=r.duration,M=Math.min(this.config.maxFragLookUpTolerance*2,S*.25),H=Math.max(Math.min(r.start-M,L.end-M),D+M);r.start-H>M&&this.flushMainBuffer(H,r.start)},c.getFwdBufferInfo=function(r,w){var D=this.config,L=this.getLoadPosition();if(!Object(U.isFiniteNumber)(L))return null;var S=W.BufferHelper.bufferInfo(r,L,D.maxBufferHole);if(S.len===0&&S.nextStart!==void 0){var M=this.fragmentTracker.getBufferedFrag(L,w);if(M&&S.nextStart<M.end)return W.BufferHelper.bufferInfo(r,L,Math.max(S.nextStart,D.maxBufferHole))}return S},c.getMaxBufferLength=function(r){var w=this.config,D;return r?D=Math.max(8*w.maxBufferSize/r,w.maxBufferLength):D=w.maxBufferLength,Math.min(D,w.maxMaxBufferLength)},c.reduceMaxBufferLength=function(r){var w=this.config,D=r||w.maxBufferLength;return w.maxMaxBufferLength>=D?(w.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+w.maxMaxBufferLength+"s"),!0):!1},c.getNextFragment=function(r,w){var D,L,S=w.fragments,M=S.length;if(!M)return null;var H=this.config,O=S[0].start,K;if(w.live){var Y=H.initialLiveManifestSize;if(M<Y)return this.warn("Not enough fragments to start playback (have: "+M+", need: "+Y+")"),null;!w.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(K=this.getInitialLiveFragment(w,S),this.startPosition=K?this.hls.liveSyncPosition||K.start:r)}else r<=O&&(K=S[0]);if(!K){var ie=H.lowLatencyMode?w.partEnd:w.fragmentEnd;K=this.getFragmentAtPosition(r,ie,w)}return(D=K)!==null&&D!==void 0&&D.initSegment&&!((L=K)!==null&&L!==void 0&&L.initSegment.data)&&!this.bitrateTest&&(K=K.initSegment),K},c.getNextPart=function(r,w,D){for(var L=-1,S=!1,M=!0,H=0,O=r.length;H<O;H++){var K=r[H];if(M=M&&!K.independent,L>-1&&D<K.start)break;var Y=K.loaded;!Y&&(S||K.independent||M)&&K.fragment===w&&(L=H),S=Y}return L},c.loadedEndOfParts=function(r,w){var D=r[r.length-1];return D&&w>D.start&&D.loaded},c.getInitialLiveFragment=function(r,w){var D=this.fragPrevious,L=null;if(D){if(r.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+D.programDateTime),L=Object(i.findFragmentByPDT)(w,D.endProgramDateTime,this.config.maxFragLookUpTolerance)),!L){var S=D.sn+1;if(S>=r.startSN&&S<=r.endSN){var M=w[S-r.startSN];D.cc===M.cc&&(L=M,this.log("Live playlist, switching playlist, load frag with next SN: "+L.sn))}L||(L=Object(i.findFragWithCC)(w,D.cc),L&&this.log("Live playlist, switching playlist, load frag with same CC: "+L.sn))}}else{var H=this.hls.liveSyncPosition;H!==null&&(L=this.getFragmentAtPosition(H,this.bitrateTest?r.fragmentEnd:r.edge,r))}return L},c.getFragmentAtPosition=function(r,w,D){var L=this.config,S=this.fragPrevious,M=D.fragments,H=D.endSN,O=D.fragmentHint,K=L.maxFragLookUpTolerance,Y=!!(L.lowLatencyMode&&D.partList&&O);Y&&O&&!this.bitrateTest&&(M=M.concat(O),H=O.sn);var ie;if(r<w){var re=r>w-K?0:K;ie=Object(i.findFragmentByPTS)(S,M,r,re)}else ie=M[M.length-1];if(ie){var Te=ie.sn-D.startSN,_e=S&&ie.level===S.level,we=M[Te+1],Ce=this.fragmentTracker.getState(ie);if(Ce===I.FragmentState.BACKTRACKED){ie=null;for(var Re=Te;M[Re]&&this.fragmentTracker.getState(M[Re])===I.FragmentState.BACKTRACKED;)S?ie=M[Re--]:ie=M[--Re];ie||(ie=we)}else S&&ie.sn===S.sn&&!Y&&(_e&&(ie.sn<H&&this.fragmentTracker.getState(we)!==I.FragmentState.OK?(this.log("SN "+ie.sn+" just loaded, load next one: "+we.sn),ie=we):ie=null))}return ie},c.synchronizeToLiveEdge=function(r){var w=this.config,D=this.media;if(!D)return;var L=this.hls.liveSyncPosition,S=D.currentTime,M=r.fragments[0].start,H=r.edge,O=S>=M-w.maxFragLookUpTolerance&&S<=H;if(L!==null&&D.duration>L&&(S<L||!O)){var K=w.liveMaxLatencyDuration!==void 0?w.liveMaxLatencyDuration:w.liveMaxLatencyDurationCount*r.targetduration;(!O&&D.readyState<4||S<H-K)&&(this.loadedmetadata||(this.nextLoadPosition=L),D.readyState&&(this.warn("Playback: "+S.toFixed(3)+" is located too far from the end of live sliding playlist: "+H+", reset currentTime to : "+L.toFixed(3)),D.currentTime=L))}},c.alignPlaylists=function(r,w){var D=this.levels,L=this.levelLastLoaded,S=this.fragPrevious,M=L!==null?D[L]:null,H=r.fragments.length;if(!H)return this.warn("No fragments in live playlist"),0;var O=r.fragments[0].start,K=!w,Y=r.alignedSliding&&Object(U.isFiniteNumber)(O);if(K||!Y&&!O){Object(l.alignStream)(S,M,r);var ie=r.fragments[0].start;return this.log("Live playlist sliding: "+ie.toFixed(2)+" start-sn: "+(w?w.startSN:"na")+"->"+r.startSN+" prev-sn: "+(S?S.sn:"na")+" fragments: "+H),ie}return O},c.waitForCdnTuneIn=function(r){var w=3;return r.live&&r.canBlockReload&&r.tuneInGoal>Math.max(r.partHoldBack,r.partTarget*w)},c.setStartPosition=function(r,w){var D=this.startPosition;if(D<w&&(D=-1),D===-1||this.lastCurrentTime===-1){var L=r.startTimeOffset;Object(U.isFiniteNumber)(L)?(D=w+L,L<0&&(D+=r.totalduration),D=Math.min(Math.max(w,D),w+r.totalduration),this.log("Start time offset "+L+" found in playlist, adjust startPosition to "+D),this.startPosition=D):r.live?D=this.hls.liveSyncPosition||w:this.startPosition=D=0,this.lastCurrentTime=D}this.nextLoadPosition=D},c.getLoadPosition=function(){var r=this.media,w=0;return this.loadedmetadata&&r?w=r.currentTime:this.nextLoadPosition&&(w=this.nextLoadPosition),w},c.handleFragLoadAborted=function(r,w){this.transmuxer&&r.sn!=="initSegment"&&r.stats.aborted&&(this.warn("Fragment "+r.sn+(w?" part"+w.index:"")+" of level "+r.level+" was aborted"),this.resetFragmentLoading(r))},c.resetFragmentLoading=function(r){(!this.fragCurrent||!this.fragContextChanged(r))&&(this.state=T.IDLE)},c.onFragmentOrKeyLoadError=function(r,w){if(w.fatal)return;var D=w.frag;if(!D||D.type!==r)return;var L=this.fragCurrent;console.assert(L&&D.sn===L.sn&&D.level===L.level&&D.urlId===L.urlId,"Frag load error must match current frag to retry");var S=this.config;if(this.fragLoadError+1<=S.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(D.level))return;var M=Math.min(Math.pow(2,this.fragLoadError)*S.fragLoadingRetryDelay,S.fragLoadingMaxRetryTimeout);this.warn("Fragment "+D.sn+" of "+r+" "+D.level+" failed to load, retrying in "+M+"ms"),this.retryDate=self.performance.now()+M,this.fragLoadError++,this.state=T.FRAG_LOADING_WAITING_RETRY}else w.levelRetry?(r===n.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=T.IDLE):(j.logger.error(w.details+" reaches max retry, redispatch as fatal ..."),w.fatal=!0,this.hls.stopLoad(),this.state=T.ERROR)},c.afterBufferFlushed=function(r,w,D){if(!r)return;var L=W.BufferHelper.getBuffered(r);this.fragmentTracker.detectEvictedFragments(w,L,D),this.state===T.ENDED&&this.resetLoadingState()},c.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=T.IDLE},c.resetLiveStartWhenNotLoaded=function(r){if(!this.loadedmetadata){this.startFragRequested=!1;var w=this.levels?this.levels[r].details:null;if(w!=null&&w.live)return this.startPosition=-1,this.setStartPosition(w,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},c.updateLevelTiming=function(r,w,D,L){var S=this,M=D.details;console.assert(!!M,"level.details must be defined");var H=Object.keys(r.elementaryStreams).reduce(function(O,K){var Y=r.elementaryStreams[K];if(Y){var ie=Y.endPTS-Y.startPTS;if(ie<=0)return S.warn("Could not parse fragment "+r.sn+" "+K+" duration reliably ("+ie+") resetting transmuxer to fallback to playlist timing"),S.resetTransmuxer(),O||!1;var re=L?0:Object(s.updateFragPTSDTS)(M,r,Y.startPTS,Y.endPTS,Y.startDTS,Y.endDTS);return S.hls.trigger(e.Events.LEVEL_PTS_UPDATED,{details:M,level:D,drift:re,type:K,frag:r,start:Y.startPTS,end:Y.endPTS}),!0}return O},!1);H?(this.state=T.PARSED,this.hls.trigger(e.Events.FRAG_PARSED,{frag:r,part:w})):this.resetLoadingState()},c.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},_(g,[{key:"state",get:function(){return this._state},set:function(r){var w=this._state;w!==r&&(this._state=r,this.log(w+"->"+r))}}]),g}(A.default)},"./src/controller/buffer-controller.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"default",function(){return i});var U=R("./src/polyfills/number.ts"),A=R("./src/events.ts"),I=R("./src/utils/logger.ts"),W=R("./src/errors.ts"),j=R("./src/utils/buffer-helper.ts"),e=R("./src/utils/mediasource-helper.ts"),C=R("./src/loader/fragment.ts"),f=R("./src/controller/buffer-operation-queue.ts"),h=Object(e.getMediaSource)(),l=/([ha]vc.)(?:\.[^.,]+)+/,i=function(){function s(o){var a=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var n=a.hls,t=a.media,_=a.mediaSource;I.logger.log("[buffer-controller]: Media source opened"),t&&(a.updateMediaElementDuration(),n.trigger(A.Events.MEDIA_ATTACHED,{media:t})),_&&_.removeEventListener("sourceopen",a._onMediaSourceOpen),a.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=o,this._initSourceBuffer(),this.registerListeners()}var u=s.prototype;return u.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},u.destroy=function(){this.unregisterListeners(),this.details=null},u.registerListeners=function(){var a=this.hls;a.on(A.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.on(A.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(A.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(A.Events.BUFFER_RESET,this.onBufferReset,this),a.on(A.Events.BUFFER_APPENDING,this.onBufferAppending,this),a.on(A.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.on(A.Events.BUFFER_EOS,this.onBufferEos,this),a.on(A.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),a.on(A.Events.LEVEL_UPDATED,this.onLevelUpdated,this),a.on(A.Events.FRAG_PARSED,this.onFragParsed,this),a.on(A.Events.FRAG_CHANGED,this.onFragChanged,this)},u.unregisterListeners=function(){var a=this.hls;a.off(A.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.off(A.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(A.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(A.Events.BUFFER_RESET,this.onBufferReset,this),a.off(A.Events.BUFFER_APPENDING,this.onBufferAppending,this),a.off(A.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.off(A.Events.BUFFER_EOS,this.onBufferEos,this),a.off(A.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),a.off(A.Events.LEVEL_UPDATED,this.onLevelUpdated,this),a.off(A.Events.FRAG_PARSED,this.onFragParsed,this),a.off(A.Events.FRAG_CHANGED,this.onFragChanged,this)},u._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new f.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},u.onManifestParsed=function(a,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")},u.onMediaAttaching=function(a,n){var t=this.media=n.media;if(t&&h){var _=this.mediaSource=new h;_.addEventListener("sourceopen",this._onMediaSourceOpen),_.addEventListener("sourceended",this._onMediaSourceEnded),_.addEventListener("sourceclose",this._onMediaSourceClose),t.src=self.URL.createObjectURL(_),this._objectUrl=t.src}},u.onMediaDetaching=function(){var a=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(_){I.logger.warn("[buffer-controller]: onMediaDetaching: "+_.message+" while calling endOfStream")}this.onBufferReset(),n.removeEventListener("sourceopen",this._onMediaSourceOpen),n.removeEventListener("sourceended",this._onMediaSourceEnded),n.removeEventListener("sourceclose",this._onMediaSourceClose),a&&(t&&self.URL.revokeObjectURL(t),a.src===t?(a.removeAttribute("src"),a.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)},u.onBufferReset=function(){var a=this;this.getSourceBufferTypes().forEach(function(n){var t=a.sourceBuffer[n];try{t&&(a.removeBufferListeners(n),a.mediaSource&&a.mediaSource.removeSourceBuffer(t),a.sourceBuffer[n]=void 0)}catch(_){I.logger.warn("[buffer-controller]: Failed to reset the "+n+" buffer",_)}}),this._initSourceBuffer()},u.onBufferCodecs=function(a,n){var t=this,_=this.getSourceBufferTypes().length;if(Object.keys(n).forEach(function(p){if(_){var v=t.tracks[p];if(v&&typeof v.buffer.changeType=="function"){var x=n[p],T=x.codec,b=x.levelCodec,d=x.container,g=(v.levelCodec||v.codec).replace(l,"$1"),c=(b||T).replace(l,"$1");if(g!==c){var y=d+";codecs="+(b||T);t.appendChangeType(p,y)}}}else t.pendingTracks[p]=n[p]}),_)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},u.appendChangeType=function(a,n){var t=this,_=this.operationQueue,p={execute:function(){var x=t.sourceBuffer[a];x&&(I.logger.log("[buffer-controller]: changing "+a+" sourceBuffer type to "+n),x.changeType(n)),_.shiftAndExecuteNext(a)},onStart:function(){},onComplete:function(){},onError:function(x){I.logger.warn("[buffer-controller]: Failed to change "+a+" SourceBuffer type",x)}};_.append(p,a)},u.onBufferAppending=function(a,n){var t=this,_=this.hls,p=this.operationQueue,v=this.tracks,x=n.data,T=n.type,b=n.frag,d=n.part,g=n.chunkMeta,c=g.buffering[T],y=self.performance.now();c.start=y;var r=b.stats.buffering,w=d?d.stats.buffering:null;r.start===0&&(r.start=y),w&&w.start===0&&(w.start=y);var D=v.audio,L=T==="audio"&&g.id===1&&(D==null?void 0:D.container)==="audio/mpeg",S={execute:function(){if(c.executeStart=self.performance.now(),L){var H=t.sourceBuffer[T];if(H){var O=b.start-H.timestampOffset;Math.abs(O)>=.1&&(I.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+b.start+" (delta: "+O+") sn: "+b.sn+")"),H.timestampOffset=b.start)}}t.appendExecutor(x,T)},onStart:function(){},onComplete:function(){var H=self.performance.now();c.executeEnd=c.end=H,r.first===0&&(r.first=H),w&&w.first===0&&(w.first=H);var O=t.sourceBuffer,K={};for(var Y in O)K[Y]=j.BufferHelper.getBuffered(O[Y]);t.appendError=0,t.hls.trigger(A.Events.BUFFER_APPENDED,{type:T,frag:b,part:d,chunkMeta:g,parent:b.type,timeRanges:K})},onError:function(H){I.logger.error("[buffer-controller]: Error encountered while trying to append to the "+T+" SourceBuffer",H);var O={type:W.ErrorTypes.MEDIA_ERROR,parent:b.type,details:W.ErrorDetails.BUFFER_APPEND_ERROR,err:H,fatal:!1};H.code===DOMException.QUOTA_EXCEEDED_ERR?O.details=W.ErrorDetails.BUFFER_FULL_ERROR:(t.appendError++,O.details=W.ErrorDetails.BUFFER_APPEND_ERROR,t.appendError>_.config.appendErrorMaxRetry&&(I.logger.error("[buffer-controller]: Failed "+_.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),O.fatal=!0)),_.trigger(A.Events.ERROR,O)}};p.append(S,T)},u.onBufferFlushing=function(a,n){var t=this,_=this.operationQueue,p=function(x){return{execute:t.removeExecutor.bind(t,x,n.startOffset,n.endOffset),onStart:function(){},onComplete:function(){t.hls.trigger(A.Events.BUFFER_FLUSHED,{type:x})},onError:function(b){I.logger.warn("[buffer-controller]: Failed to remove from "+x+" SourceBuffer",b)}}};n.type?_.append(p(n.type),n.type):this.getSourceBufferTypes().forEach(function(v){_.append(p(v),v)})},u.onFragParsed=function(a,n){var t=this,_=n.frag,p=n.part,v=[],x=p?p.elementaryStreams:_.elementaryStreams;x[C.ElementaryStreamTypes.AUDIOVIDEO]?v.push("audiovideo"):(x[C.ElementaryStreamTypes.AUDIO]&&v.push("audio"),x[C.ElementaryStreamTypes.VIDEO]&&v.push("video"));var T=function(){var d=self.performance.now();_.stats.buffering.end=d,p&&(p.stats.buffering.end=d);var g=p?p.stats:_.stats;t.hls.trigger(A.Events.FRAG_BUFFERED,{frag:_,part:p,stats:g,id:_.type})};v.length===0&&I.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+_.type+" level: "+_.level+" sn: "+_.sn),this.blockBuffers(T,v)},u.onFragChanged=function(a,n){this.flushBackBuffer()},u.onBufferEos=function(a,n){var t=this,_=this.getSourceBufferTypes().reduce(function(p,v){var x=t.sourceBuffer[v];return(!n.type||n.type===v)&&(x&&!x.ended&&(x.ended=!0,I.logger.log("[buffer-controller]: "+v+" sourceBuffer now EOS"))),p&&!!(!x||x.ended)},!0);_&&this.blockBuffers(function(){var p=t.mediaSource;if(!p||p.readyState!=="open")return;p.endOfStream()})},u.onLevelUpdated=function(a,n){var t=n.details;if(!t.fragments.length)return;this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},u.flushBackBuffer=function(){var a=this.hls,n=this.details,t=this.media,_=this.sourceBuffer;if(!t||n===null)return;var p=this.getSourceBufferTypes();if(!p.length)return;var v=n.live&&a.config.liveBackBufferLength!==null?a.config.liveBackBufferLength:a.config.backBufferLength;if(!Object(U.isFiniteNumber)(v)||v<0)return;var x=t.currentTime,T=n.levelTargetDuration,b=Math.max(v,T),d=Math.floor(x/T)*T-b;p.forEach(function(g){var c=_[g];if(c){var y=j.BufferHelper.getBuffered(c);y.length>0&&d>y.start(0)&&(a.trigger(A.Events.BACK_BUFFER_REACHED,{bufferEnd:d}),n.live&&a.trigger(A.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:d}),a.trigger(A.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:d,type:g}))}})},u.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var a=this.details,n=this.hls,t=this.media,_=this.mediaSource,p=a.fragments[0].start+a.totalduration,v=t.duration,x=Object(U.isFiniteNumber)(_.duration)?_.duration:0;a.live&&n.config.liveDurationInfinity?(I.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),_.duration=Infinity,this.updateSeekableRange(a)):(p>x&&p>v||!Object(U.isFiniteNumber)(v))&&(I.logger.log("[buffer-controller]: Updating Media Source duration to "+p.toFixed(3)),_.duration=p)},u.updateSeekableRange=function(a){var n=this.mediaSource,t=a.fragments,_=t.length;if(_&&a.live&&n!==null&&n!==void 0&&n.setLiveSeekableRange){var p=Math.max(0,t[0].start),v=Math.max(p,p+a.totalduration);n.setLiveSeekableRange(p,v)}},u.checkPendingTracks=function(){var a=this.bufferCodecEventsExpected,n=this.operationQueue,t=this.pendingTracks,_=Object.keys(t).length;if(_&&!a||_===2){this.createSourceBuffers(t),this.pendingTracks={};var p=this.getSourceBufferTypes();if(p.length===0){this.hls.trigger(A.Events.ERROR,{type:W.ErrorTypes.MEDIA_ERROR,details:W.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}p.forEach(function(v){n.executeNext(v)})}},u.createSourceBuffers=function(a){var n=this.sourceBuffer,t=this.mediaSource;if(!t)throw Error("createSourceBuffers called when mediaSource was null");var _=0;for(var p in a)if(!n[p]){var v=a[p];if(!v)throw Error("source buffer exists for track "+p+", however track does not");var x=v.levelCodec||v.codec,T=v.container+";codecs="+x;I.logger.log("[buffer-controller]: creating sourceBuffer("+T+")");try{var b=n[p]=t.addSourceBuffer(T),d=p;this.addBufferListener(d,"updatestart",this._onSBUpdateStart),this.addBufferListener(d,"updateend",this._onSBUpdateEnd),this.addBufferListener(d,"error",this._onSBUpdateError),this.tracks[p]={buffer:b,codec:x,container:v.container,levelCodec:v.levelCodec,id:v.id},_++}catch(g){I.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+g.message),this.hls.trigger(A.Events.ERROR,{type:W.ErrorTypes.MEDIA_ERROR,details:W.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:g,mimeType:T})}}_&&this.hls.trigger(A.Events.BUFFER_CREATED,{tracks:this.tracks})},u._onSBUpdateStart=function(a){var n=this.operationQueue,t=n.current(a);t.onStart()},u._onSBUpdateEnd=function(a){var n=this.operationQueue,t=n.current(a);t.onComplete(),n.shiftAndExecuteNext(a)},u._onSBUpdateError=function(a,n){I.logger.error("[buffer-controller]: "+a+" SourceBuffer error",n),this.hls.trigger(A.Events.ERROR,{type:W.ErrorTypes.MEDIA_ERROR,details:W.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var t=this.operationQueue.current(a);t&&t.onError(n)},u.removeExecutor=function(a,n,t){var _=this.media,p=this.mediaSource,v=this.operationQueue,x=this.sourceBuffer,T=x[a];if(!_||!p||!T){I.logger.warn("[buffer-controller]: Attempting to remove from the "+a+" SourceBuffer, but it does not exist"),v.shiftAndExecuteNext(a);return}var b=Object(U.isFiniteNumber)(_.duration)?_.duration:Infinity,d=Object(U.isFiniteNumber)(p.duration)?p.duration:Infinity,g=Math.max(0,n),c=Math.min(t,b,d);c>g?(I.logger.log("[buffer-controller]: Removing ["+g+","+c+"] from the "+a+" SourceBuffer"),console.assert(!T.updating,a+" sourceBuffer must not be updating"),T.remove(g,c)):v.shiftAndExecuteNext(a)},u.appendExecutor=function(a,n){var t=this.operationQueue,_=this.sourceBuffer,p=_[n];if(!p){I.logger.warn("[buffer-controller]: Attempting to append to the "+n+" SourceBuffer, but it does not exist"),t.shiftAndExecuteNext(n);return}p.ended=!1,console.assert(!p.updating,n+" sourceBuffer must not be updating"),p.appendBuffer(a)},u.blockBuffers=function(a,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(a);return}var _=this.operationQueue,p=n.map(function(v){return _.appendBlocker(v)});Promise.all(p).then(function(){a(),n.forEach(function(v){var x=t.sourceBuffer[v];(!x||!x.updating)&&_.shiftAndExecuteNext(v)})})},u.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},u.addBufferListener=function(a,n,t){var _=this.sourceBuffer[a];if(!_)return;var p=t.bind(this,a);this.listeners[a].push({event:n,listener:p}),_.addEventListener(n,p)},u.removeBufferListeners=function(a){var n=this.sourceBuffer[a];if(!n)return;this.listeners[a].forEach(function(t){n.removeEventListener(t.event,t.listener)})},s}()},"./src/controller/buffer-operation-queue.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"default",function(){return A});var U=R("./src/utils/logger.ts"),A=function(){function I(j){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=j}var W=I.prototype;return W.append=function(e,C){var f=this.queues[C];f.push(e),f.length===1&&this.buffers[C]&&this.executeNext(C)},W.insertAbort=function(e,C){var f=this.queues[C];f.unshift(e),this.executeNext(C)},W.appendBlocker=function(e){var C,f=new Promise(function(l){C=l}),h={execute:C,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(h,e),f},W.executeNext=function(e){var C=this.buffers,f=this.queues,h=C[e],l=f[e];if(l.length){var i=l[0];try{i.execute()}catch(s){U.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),i.onError(s),(!h||!h.updating)&&(l.shift(),this.executeNext(e))}}},W.shiftAndExecuteNext=function(e){this.queues[e].shift(),this.executeNext(e)},W.current=function(e){return this.queues[e][0]},I}()},"./src/controller/cap-level-controller.ts":function(ee,P,R){"use strict";R.r(P);var U=R("./src/events.ts");function A(j,e){for(var C=0;C<e.length;C++){var f=e[C];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(j,f.key,f)}}function I(j,e,C){return e&&A(j.prototype,e),C&&A(j,C),j}var W=function(){function j(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=j.prototype;return e.setStreamController=function(f){this.streamController=f},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 f=this.hls;f.on(U.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),f.on(U.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),f.on(U.Events.MANIFEST_PARSED,this.onManifestParsed,this),f.on(U.Events.BUFFER_CODECS,this.onBufferCodecs,this),f.on(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},e.unregisterListener=function(){var f=this.hls;f.off(U.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),f.off(U.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),f.off(U.Events.MANIFEST_PARSED,this.onManifestParsed,this),f.off(U.Events.BUFFER_CODECS,this.onBufferCodecs,this),f.off(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},e.onFpsDropLevelCapping=function(f,h){j.isLevelAllowed(h.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(h.droppedLevel)},e.onMediaAttaching=function(f,h){this.media=h.media instanceof HTMLVideoElement?h.media:null},e.onManifestParsed=function(f,h){var l=this.hls;this.restrictedLevels=[],this.firstLevel=h.firstLevel,l.config.capLevelToPlayerSize&&h.video&&this.startCapping()},e.onBufferCodecs=function(f,h){var l=this.hls;l.config.capLevelToPlayerSize&&h.video&&this.startCapping()},e.onMediaDetaching=function(){this.stopCapping()},e.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var f=this.hls.levels;if(f.length){var h=this.hls;h.autoLevelCapping=this.getMaxLevel(f.length-1),h.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=h.autoLevelCapping}}},e.getMaxLevel=function(f){var h=this,l=this.hls.levels;if(!l.length)return-1;var i=l.filter(function(s,u){return j.isLevelAllowed(u,h.restrictedLevels)&&u<=f});return this.clientRect=null,j.getMaxLevelByMediaSize(i,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 f=this.media,h={width:0,height:0};if(f){var l=f.getBoundingClientRect();h.width=l.width,h.height=l.height,!h.width&&!h.height&&(h.width=l.right-l.left||f.width||0,h.height=l.bottom-l.top||f.height||0)}return this.clientRect=h,h},j.isLevelAllowed=function(f,h){return h===void 0&&(h=[]),h.indexOf(f)===-1},j.getMaxLevelByMediaSize=function(f,h,l){if(!f||!f.length)return-1;for(var i=function(n,t){return t?n.width!==t.width||n.height!==t.height:!0},s=f.length-1,u=0;u<f.length;u+=1){var o=f[u];if((o.width>=h||o.height>=l)&&i(o,f[u+1])){s=u;break}}return s},I(j,[{key:"mediaWidth",get:function(){return this.getDimensions().width*j.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*j.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var f=1;try{f=self.devicePixelRatio}catch(h){}return f}}]),j}();P.default=W},"./src/controller/cmcd-controller.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"default",function(){return i});var U=R("./src/events.ts"),A=R("./src/types/cmcd.ts"),I=R("./src/utils/buffer-helper.ts"),W=R("./src/utils/logger.ts");function j(s,u){for(var o=0;o<u.length;o++){var a=u[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(s,a.key,a)}}function e(s,u,o){return u&&j(s.prototype,u),o&&j(s,o),s}function C(s,u){var o=typeof Symbol!="undefined"&&s[Symbol.iterator]||s["@@iterator"];if(o)return(o=o.call(s)).next.bind(o);if(Array.isArray(s)||(o=f(s))||u&&s&&typeof s.length=="number"){o&&(s=o);var a=0;return function(){return a>=s.length?{done:!0}:{done:!1,value:s[a++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(s,u){if(!s)return;if(typeof s=="string")return h(s,u);var o=Object.prototype.toString.call(s).slice(8,-1);if(o==="Object"&&s.constructor&&(o=s.constructor.name),o==="Map"||o==="Set")return Array.from(s);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return h(s,u)}function h(s,u){(u==null||u>s.length)&&(u=s.length);for(var o=0,a=new Array(u);o<u;o++)a[o]=s[o];return a}function l(){return l=Object.assign||function(s){for(var u=1;u<arguments.length;u++){var o=arguments[u];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(s[a]=o[a])}return s},l.apply(this,arguments)}var i=function(){function s(o){var a=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){a.initialized&&(a.starved=!0),a.buffering=!0},this.onPlaying=function(){a.initialized||(a.initialized=!0),a.buffering=!1},this.applyPlaylistData=function(_){try{a.apply(_,{ot:A.CMCDObjectType.MANIFEST,su:!a.initialized})}catch(p){W.logger.warn("Could not generate manifest CMCD data.",p)}},this.applyFragmentData=function(_){try{var p=_.frag,v=a.hls.levels[p.level],x=a.getObjectType(p),T={d:p.duration*1e3,ot:x};(x===A.CMCDObjectType.VIDEO||x===A.CMCDObjectType.AUDIO||x==A.CMCDObjectType.MUXED)&&(T.br=v.bitrate/1e3,T.tb=a.getTopBandwidth(x),T.bl=a.getBufferLength(x)),a.apply(_,T)}catch(b){W.logger.warn("Could not generate segment CMCD data.",b)}},this.hls=o;var n=this.config=o.config,t=n.cmcd;t!=null&&(n.pLoader=this.createPlaylistLoader(),n.fLoader=this.createFragmentLoader(),this.sid=t.sessionId||s.uuid(),this.cid=t.contentId,this.useHeaders=t.useHeaders===!0,this.registerListeners())}var u=s.prototype;return u.registerListeners=function(){var a=this.hls;a.on(U.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.on(U.Events.MEDIA_DETACHED,this.onMediaDetached,this),a.on(U.Events.BUFFER_CREATED,this.onBufferCreated,this)},u.unregisterListeners=function(){var a=this.hls;a.off(U.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.off(U.Events.MEDIA_DETACHED,this.onMediaDetached,this),a.off(U.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},u.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},u.onMediaAttached=function(a,n){this.media=n.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},u.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},u.onBufferCreated=function(a,n){var t,_;this.audioBuffer=(t=n.tracks.audio)===null||t===void 0?void 0:t.buffer,this.videoBuffer=(_=n.tracks.video)===null||_===void 0?void 0:_.buffer},u.createData=function(){var a;return{v:A.CMCDVersion,sf:A.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(a=this.media)===null||a===void 0?void 0:a.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},u.apply=function(a,n){n===void 0&&(n={}),l(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 _=s.toHeaders(n);if(!Object.keys(_).length)return;a.headers||(a.headers={}),l(a.headers,_)}else{var p=s.toQuery(n);if(!p)return;a.url=s.appendQueryToUri(a.url,p)}},u.getObjectType=function(a){var n=a.type;return n==="subtitle"?A.CMCDObjectType.TIMED_TEXT:a.sn==="initSegment"?A.CMCDObjectType.INIT:n==="audio"?A.CMCDObjectType.AUDIO:n==="main"?this.hls.audioTracks.length?A.CMCDObjectType.VIDEO:A.CMCDObjectType.MUXED:void 0},u.getTopBandwidth=function(a){for(var n=0,t=a===A.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,_=C(t),p;!(p=_()).done;){var v=p.value;v.bitrate>n&&(n=v.bitrate)}return n>0?n:NaN},u.getBufferLength=function(a){var n=this.hls.media,t=a===A.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!t||!n)return NaN;var _=I.BufferHelper.bufferInfo(t,n.currentTime,this.config.maxBufferHole);return _.len*1e3},u.createPlaylistLoader=function(){var a=this.config.pLoader,n=this.applyPlaylistData,t=a||this.config.loader;return function(){function _(v){this.loader=void 0,this.loader=new t(v)}var p=_.prototype;return p.destroy=function(){this.loader.destroy()},p.abort=function(){this.loader.abort()},p.load=function(x,T,b){n(x),this.loader.load(x,T,b)},e(_,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),_}()},u.createFragmentLoader=function(){var a=this.config.fLoader,n=this.applyFragmentData,t=a||this.config.loader;return function(){function _(v){this.loader=void 0,this.loader=new t(v)}var p=_.prototype;return p.destroy=function(){this.loader.destroy()},p.abort=function(){this.loader.abort()},p.load=function(x,T,b){n(x),this.loader.load(x,T,b)},e(_,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),_}()},s.uuid=function(){var a=URL.createObjectURL(new Blob),n=a.toString();return URL.revokeObjectURL(a),n.substr(n.lastIndexOf("/")+1)},s.serialize=function(a){for(var n=[],t=function(L){return!Number.isNaN(L)&&L!=null&&L!==""&&L!==!1},_=function(L){return Math.round(L)},p=function(L){return _(L/100)*100},v=function(L){return encodeURIComponent(L)},x={br:_,d:_,bl:p,dl:p,mtp:p,nor:v,rtp:p,tb:_},T=Object.keys(a||{}).sort(),b=C(T),d;!(d=b()).done;){var g=d.value,c=a[g];if(!t(c))continue;if(g==="v"&&c===1)continue;if(g=="pr"&&c===1)continue;var y=x[g];y&&(c=y(c));var r=typeof c,w=void 0;g==="ot"||g==="sf"||g==="st"?w=g+"="+c:r==="boolean"?w=g:r==="number"?w=g+"="+c:w=g+"="+JSON.stringify(c),n.push(w)}return n.join(",")},s.toHeaders=function(a){for(var n=Object.keys(a),t={},_=["Object","Request","Session","Status"],p=[{},{},{},{}],v={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},x=0,T=n;x<T.length;x++){var b=T[x],d=v[b]!=null?v[b]:1;p[d][b]=a[b]}for(var g=0;g<p.length;g++){var c=s.serialize(p[g]);c&&(t["CMCD-"+_[g]]=c)}return t},s.toQuery=function(a){return"CMCD="+encodeURIComponent(s.serialize(a))},s.appendQueryToUri=function(a,n){if(!n)return a;var t=a.includes("?")?"&":"?";return""+a+t+n},s}()},"./src/controller/eme-controller.ts":function(ee,P,R){"use strict";R.r(P);var U=R("./src/events.ts"),A=R("./src/errors.ts"),I=R("./src/utils/logger.ts"),W=R("./src/utils/mediakeys-helper.ts");function j(i,s){for(var u=0;u<s.length;u++){var o=s[u];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(i,o.key,o)}}function e(i,s,u){return s&&j(i.prototype,s),u&&j(i,u),i}var C=3,f=function(s,u,o){var a={audioCapabilities:[],videoCapabilities:[]};return s.forEach(function(n){a.audioCapabilities.push({contentType:'audio/mp4; codecs="'+n+'"',robustness:o.audioRobustness||""})}),u.forEach(function(n){a.videoCapabilities.push({contentType:'video/mp4; codecs="'+n+'"',robustness:o.videoRobustness||""})}),[a]},h=function(s,u,o,a){switch(s){case W.KeySystems.WIDEVINE:return f(u,o,a);default:throw new Error("Unknown key-system: "+s)}},l=function(){function i(u){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=u,this._config=u.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 s=i.prototype;return s.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},s._registerListeners=function(){this.hls.on(U.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(U.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(U.Events.MANIFEST_PARSED,this.onManifestParsed,this)},s._unregisterListeners=function(){this.hls.off(U.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(U.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(U.Events.MANIFEST_PARSED,this.onManifestParsed,this)},s.getLicenseServerUrl=function(o){switch(o){case W.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+o+'"')},s._attemptKeySystemAccess=function(o,a,n){var t=this,_=h(o,a,n,this._drmSystemOptions);I.logger.log("Requesting encrypted media key-system access");var p=this.requestMediaKeySystemAccess(o,_);this.mediaKeysPromise=p.then(function(v){return t._onMediaKeySystemAccessObtained(o,v)}),p.catch(function(v){I.logger.error('Failed to obtain key-system "'+o+'" access:',v)})},s._onMediaKeySystemAccessObtained=function(o,a){var n=this;I.logger.log('Access for key-system "'+o+'" obtained');var t={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:a,mediaKeySystemDomain:o};this._mediaKeysList.push(t);var _=Promise.resolve().then(function(){return a.createMediaKeys()}).then(function(p){return t.mediaKeys=p,I.logger.log('Media-keys created for key-system "'+o+'"'),n._onMediaKeysCreated(),p});return _.catch(function(p){I.logger.error("Failed to create media-keys:",p)}),_},s._onMediaKeysCreated=function(){var o=this;this._mediaKeysList.forEach(function(a){a.mediaKeysSession||(a.mediaKeysSession=a.mediaKeys.createSession(),o._onNewMediaKeySession(a.mediaKeysSession))})},s._onNewMediaKeySession=function(o){var a=this;I.logger.log("New key-system session "+o.sessionId),o.addEventListener("message",function(n){a._onKeySessionMessage(o,n.message)},!1)},s._onKeySessionMessage=function(o,a){I.logger.log("Got EME message event, creating license request"),this._requestLicense(a,function(n){I.logger.log("Received license data (length: "+(n&&n.byteLength)+"), updating key-session"),o.update(n)})},s.onMediaEncrypted=function(o){var a=this;if(I.logger.log('Media is encrypted using "'+o.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(U.Events.ERROR,{type:A.ErrorTypes.KEY_SYSTEM_ERROR,details:A.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var n=function(_){if(!a._media)return;a._attemptSetMediaKeys(_),a._generateRequestWithPreferredKeySession(o.initDataType,o.initData)};this.mediaKeysPromise.then(n).catch(n)},s._attemptSetMediaKeys=function(o){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var a=this._mediaKeysList[0];if(!a||!a.mediaKeys){I.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(U.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(a.mediaKeys),this._hasSetMediaKeys=!0}},s._generateRequestWithPreferredKeySession=function(o,a){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(U.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 _=t.mediaKeysSession;if(!_){I.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(U.Events.ERROR,{type:A.ErrorTypes.KEY_SYSTEM_ERROR,details:A.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!a){I.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(U.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 "'+o+'" init data type'),t.mediaKeysSessionInitialized=!0,_.generateRequest(o,a).then(function(){I.logger.debug("Key-session generation succeeded")}).catch(function(p){I.logger.error("Error generating key-session request:",p),n.hls.trigger(U.Events.ERROR,{type:A.ErrorTypes.KEY_SYSTEM_ERROR,details:A.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},s._createLicenseXhr=function(o,a,n){var t=new XMLHttpRequest;t.responseType="arraybuffer",t.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,t,o,a,n);var _=this._licenseXhrSetup;if(_)try{_.call(this.hls,t,o),_=void 0}catch(p){I.logger.error(p)}try{t.readyState||t.open("POST",o,!0),_&&_.call(this.hls,t,o)}catch(p){throw new Error("issue setting up KeySystem license XHR "+p)}return t},s._onLicenseRequestReadyStageChange=function(o,a,n,t){switch(o.readyState){case 4:if(o.status===200){this._requestLicenseFailureCount=0,I.logger.log("License request succeeded");var _=o.response,p=this._licenseResponseCallback;if(p)try{_=p.call(this.hls,o,a)}catch(x){I.logger.error(x)}t(_)}else{if(I.logger.error("License Request XHR failed ("+a+"). Status: "+o.status+" ("+o.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>C){this.hls.trigger(U.Events.ERROR,{type:A.ErrorTypes.KEY_SYSTEM_ERROR,details:A.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var v=C-this._requestLicenseFailureCount+1;I.logger.warn("Retrying license request, "+v+" attempts left"),this._requestLicense(n,t)}break}},s._generateLicenseRequestChallenge=function(o,a){switch(o.mediaKeySystemDomain){case W.KeySystems.WIDEVINE:return a}throw new Error("unsupported key-system: "+o.mediaKeySystemDomain)},s._requestLicense=function(o,a){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(U.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),_=this._createLicenseXhr(t,o,a);I.logger.log("Sending license request to URL: "+t);var p=this._generateLicenseRequestChallenge(n,o);_.send(p)}catch(v){I.logger.error("Failure requesting DRM license: "+v),this.hls.trigger(U.Events.ERROR,{type:A.ErrorTypes.KEY_SYSTEM_ERROR,details:A.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},s.onMediaAttached=function(o,a){if(!this._emeEnabled)return;var n=a.media;this._media=n,n.addEventListener("encrypted",this._onMediaEncrypted)},s.onMediaDetached=function(){var o=this._media,a=this._mediaKeysList;if(!o)return;o.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(a.map(function(n){if(n.mediaKeysSession)return n.mediaKeysSession.close().catch(function(){})})).then(function(){return o.setMediaKeys(null)}).catch(function(){})},s.onManifestParsed=function(o,a){if(!this._emeEnabled)return;var n=a.levels.map(function(_){return _.audioCodec}).filter(function(_){return!!_}),t=a.levels.map(function(_){return _.videoCodec}).filter(function(_){return!!_});this._attemptKeySystemAccess(W.KeySystems.WIDEVINE,n,t)},e(i,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),i}();P.default=l},"./src/controller/fps-controller.ts":function(ee,P,R){"use strict";R.r(P);var U=R("./src/events.ts"),A=R("./src/utils/logger.ts"),I=function(){function W(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 j=W.prototype;return j.setStreamController=function(C){this.streamController=C},j.registerListeners=function(){this.hls.on(U.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},j.unregisterListeners=function(){this.hls.off(U.Events.MEDIA_ATTACHING,this.onMediaAttaching)},j.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},j.onMediaAttaching=function(C,f){var h=this.hls.config;if(h.capLevelOnFPSDrop){var l=f.media instanceof self.HTMLVideoElement?f.media:null;this.media=l,l&&typeof l.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),h.fpsDroppedMonitoringPeriod)}},j.checkFPS=function(C,f,h){var l=performance.now();if(f){if(this.lastTime){var i=l-this.lastTime,s=h-this.lastDroppedFrames,u=f-this.lastDecodedFrames,o=1e3*s/i,a=this.hls;if(a.trigger(U.Events.FPS_DROP,{currentDropped:s,currentDecoded:u,totalDroppedFrames:h}),o>0&&s>a.config.fpsDroppedMonitoringThreshold*u){var n=a.currentLevel;A.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+n),n>0&&(a.autoLevelCapping===-1||a.autoLevelCapping>=n)&&(n=n-1,a.trigger(U.Events.FPS_DROP_LEVEL_CAPPING,{level:n,droppedLevel:a.currentLevel}),a.autoLevelCapping=n,this.streamController.nextLevelSwitch())}}this.lastTime=l,this.lastDroppedFrames=h,this.lastDecodedFrames=f}},j.checkFPSInterval=function(){var C=this.media;if(C)if(this.isVideoPlaybackQualityAvailable){var f=C.getVideoPlaybackQuality();this.checkFPS(C,f.totalVideoFrames,f.droppedVideoFrames)}else this.checkFPS(C,C.webkitDecodedFrameCount,C.webkitDroppedFrameCount)},W}();P.default=I},"./src/controller/fragment-finders.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"findFragmentByPDT",function(){return I}),R.d(P,"findFragmentByPTS",function(){return W}),R.d(P,"fragmentWithinToleranceTest",function(){return j}),R.d(P,"pdtWithinToleranceTest",function(){return e}),R.d(P,"findFragWithCC",function(){return C});var U=R("./src/polyfills/number.ts"),A=R("./src/utils/binary-search.ts");function I(f,h,l){if(h===null||!Array.isArray(f)||!f.length||!Object(U.isFiniteNumber)(h))return null;var i=f[0].programDateTime;if(h<(i||0))return null;var s=f[f.length-1].endProgramDateTime;if(h>=(s||0))return null;l=l||0;for(var u=0;u<f.length;++u){var o=f[u];if(e(h,l,o))return o}return null}function W(f,h,l,i){l===void 0&&(l=0),i===void 0&&(i=0);var s=null;if(f?s=h[f.sn-h[0].sn+1]||null:l===0&&h[0].start===0&&(s=h[0]),s&&j(l,i,s)===0)return s;var u=A.default.search(h,j.bind(null,l,i));return u||s}function j(f,h,l){f===void 0&&(f=0),h===void 0&&(h=0);var i=Math.min(h,l.duration+(l.deltaPTS?l.deltaPTS:0));return l.start+l.duration-i<=f?1:l.start-i>f&&l.start?-1:0}function e(f,h,l){var i=Math.min(h,l.duration+(l.deltaPTS?l.deltaPTS:0))*1e3,s=l.endProgramDateTime||0;return s-i>f}function C(f,h){return A.default.search(f,function(l){return l.cc<h?1:l.cc>h?-1:0})}},"./src/controller/fragment-tracker.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"FragmentState",function(){return I}),R.d(P,"FragmentTracker",function(){return W});var U=R("./src/events.ts"),A=R("./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 W=function(){function C(h){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=h,this._registerListeners()}var f=C.prototype;return f._registerListeners=function(){var l=this.hls;l.on(U.Events.BUFFER_APPENDED,this.onBufferAppended,this),l.on(U.Events.FRAG_BUFFERED,this.onFragBuffered,this),l.on(U.Events.FRAG_LOADED,this.onFragLoaded,this)},f._unregisterListeners=function(){var l=this.hls;l.off(U.Events.BUFFER_APPENDED,this.onBufferAppended,this),l.off(U.Events.FRAG_BUFFERED,this.onFragBuffered,this),l.off(U.Events.FRAG_LOADED,this.onFragLoaded,this)},f.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},f.getAppendedFrag=function(l,i){if(i===A.PlaylistLevelType.MAIN){var s=this.activeFragment,u=this.activeParts;if(!s)return null;if(u)for(var o=u.length;o--;){var a=u[o],n=a?a.end:s.appendedPTS;if(a.start<=l&&n!==void 0&&l<=n)return o>9&&(this.activeParts=u.slice(o-9)),a}else if(s.start<=l&&s.appendedPTS!==void 0&&l<=s.appendedPTS)return s}return this.getBufferedFrag(l,i)},f.getBufferedFrag=function(l,i){for(var s=this.fragments,u=Object.keys(s),o=u.length;o--;){var a=s[u[o]];if((a==null?void 0:a.body.type)===i&&a.buffered){var n=a.body;if(n.start<=l&&l<=n.end)return n}}return null},f.detectEvictedFragments=function(l,i,s){var u=this;Object.keys(this.fragments).forEach(function(o){var a=u.fragments[o];if(!a)return;if(!a.buffered){a.body.type===s&&u.removeFragment(a.body);return}var n=a.range[l];if(!n)return;n.time.some(function(t){var _=!u.isTimeBuffered(t.startPTS,t.endPTS,i);return _&&u.removeFragment(a.body),_})})},f.detectPartialFragments=function(l){var i=this,s=this.timeRanges,u=l.frag,o=l.part;if(!s||u.sn==="initSegment")return;var a=e(u),n=this.fragments[a];if(!n)return;Object.keys(s).forEach(function(t){var _=u.elementaryStreams[t];if(!_)return;var p=s[t],v=o!==null||_.partial===!0;n.range[t]=i.getBufferedTimes(u,o,v,p)}),n.backtrack=n.loaded=null,Object.keys(n.range).length?n.buffered=!0:this.removeFragment(n.body)},f.fragBuffered=function(l){var i=e(l),s=this.fragments[i];s&&(s.backtrack=s.loaded=null,s.buffered=!0)},f.getBufferedTimes=function(l,i,s,u){for(var o={time:[],partial:s},a=i?i.start:l.start,n=i?i.end:l.end,t=l.minEndPTS||n,_=l.maxStartPTS||a,p=0;p<u.length;p++){var v=u.start(p)-this.bufferPadding,x=u.end(p)+this.bufferPadding;if(_>=v&&t<=x){o.time.push({startPTS:Math.max(a,u.start(p)),endPTS:Math.min(n,u.end(p))});break}else if(a<x&&n>v)o.partial=!0,o.time.push({startPTS:Math.max(a,u.start(p)),endPTS:Math.min(n,u.end(p))});else if(n<=v)break}return o},f.getPartialFragment=function(l){var i=null,s,u,o,a=0,n=this.bufferPadding,t=this.fragments;return Object.keys(t).forEach(function(_){var p=t[_];if(!p)return;j(p)&&(u=p.body.start-n,o=p.body.end+n,l>=u&&l<=o&&(s=Math.min(l-u,o-l),a<=s&&(i=p.body,a=s)))}),i},f.getState=function(l){var i=e(l),s=this.fragments[i];return s?s.buffered?j(s)?I.PARTIAL:I.OK:s.backtrack?I.BACKTRACKED:I.APPENDING:I.NOT_LOADED},f.backtrack=function(l,i){var s=e(l),u=this.fragments[s];if(!u||u.backtrack)return null;var o=u.backtrack=i||u.loaded;return u.loaded=null,o},f.getBacktrackData=function(l){var i=e(l),s=this.fragments[i];if(s){var u,o=s.backtrack;if(o!=null&&(u=o.payload)!==null&&u!==void 0&&u.byteLength)return o;this.removeFragment(l)}return null},f.isTimeBuffered=function(l,i,s){for(var u,o,a=0;a<s.length;a++){if(u=s.start(a)-this.bufferPadding,o=s.end(a)+this.bufferPadding,l>=u&&i<=o)return!0;if(i<=u)return!1}return!1},f.onFragLoaded=function(l,i){var s=i.frag,u=i.part;if(s.sn==="initSegment"||s.bitrateTest||u)return;var o=e(s);this.fragments[o]={body:s,loaded:i,backtrack:null,buffered:!1,range:Object.create(null)}},f.onBufferAppended=function(l,i){var s=this,u=i.frag,o=i.part,a=i.timeRanges;if(u.type===A.PlaylistLevelType.MAIN)if(this.activeFragment=u,o){var n=this.activeParts;n||(this.activeParts=n=[]),n.push(o)}else this.activeParts=null;this.timeRanges=a,Object.keys(a).forEach(function(t){var _=a[t];if(s.detectEvictedFragments(t,_),!o)for(var p=0;p<_.length;p++)u.appendedPTS=Math.max(_.end(p),u.appendedPTS||0)})},f.onFragBuffered=function(l,i){this.detectPartialFragments(i)},f.hasFragment=function(l){var i=e(l);return!!this.fragments[i]},f.removeFragmentsInRange=function(l,i,s){var u=this;Object.keys(this.fragments).forEach(function(o){var a=u.fragments[o];if(!a)return;if(a.buffered){var n=a.body;n.type===s&&n.start<i&&n.end>l&&u.removeFragment(n)}})},f.removeFragment=function(l){var i=e(l);l.stats.loaded=0,l.clearElementaryStreamInfo(),delete this.fragments[i]},f.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},C}();function j(C){var f,h;return C.buffered&&(((f=C.range.video)===null||f===void 0?void 0:f.partial)||((h=C.range.audio)===null||h===void 0?void 0:h.partial))}function e(C){return C.type+"_"+C.level+"_"+C.urlId+"_"+C.sn}},"./src/controller/gap-controller.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"STALL_MINIMUM_DURATION_MS",function(){return j}),R.d(P,"MAX_START_GAP_JUMP",function(){return e}),R.d(P,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return C}),R.d(P,"SKIP_BUFFER_RANGE_START",function(){return f}),R.d(P,"default",function(){return h});var U=R("./src/utils/buffer-helper.ts"),A=R("./src/errors.ts"),I=R("./src/events.ts"),W=R("./src/utils/logger.ts"),j=250,e=2,C=.1,f=.05,h=function(){function l(s,u,o,a){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=s,this.media=u,this.fragmentTracker=o,this.hls=a}var i=l.prototype;return i.destroy=function(){this.hls=this.fragmentTracker=this.media=null},i.poll=function(u){var o=this.config,a=this.media,n=this.stalled,t=a.currentTime,_=a.seeking,p=this.seeking&&!_,v=!this.seeking&&_;if(this.seeking=_,t!==u){if(this.moved=!0,n!==null){if(this.stallReported){var x=self.performance.now()-n;W.logger.warn("playback not stuck anymore @"+t+", after "+Math.round(x)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((v||p)&&(this.stalled=null),a.paused||a.ended||a.playbackRate===0||!U.BufferHelper.getBuffered(a).length)return;var T=U.BufferHelper.bufferInfo(a,t,0),b=T.len>0,d=T.nextStart||0;if(!b&&!d)return;if(_){var g=T.len>e,c=!d||d-t>e&&!this.fragmentTracker.getPartialFragment(t);if(g||c)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var y,r=Math.max(d,T.start||0)-t,w=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,D=w==null||((y=w.details)===null||y===void 0)?void 0:y.live,L=D?w.details.targetduration*2:e;if(r>0&&r<=L){this._trySkipBufferHole(null);return}}var S=self.performance.now();if(n===null){this.stalled=S;return}var M=S-n;!_&&M>=j&&this._reportStall(T.len);var H=U.BufferHelper.bufferInfo(a,t,o.maxBufferHole);this._tryFixBufferStall(H,M)},i._tryFixBufferStall=function(u,o){var a=this.config,n=this.fragmentTracker,t=this.media,_=t.currentTime,p=n.getPartialFragment(_);if(p){var v=this._trySkipBufferHole(p);if(v)return}u.len>a.maxBufferHole&&o>a.highBufferWatchdogPeriod*1e3&&(W.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},i._reportStall=function(u){var o=this.hls,a=this.media,n=this.stallReported;n||(this.stallReported=!0,W.logger.warn("Playback stalling at @"+a.currentTime+" due to low buffer (buffer="+u+")"),o.trigger(I.Events.ERROR,{type:A.ErrorTypes.MEDIA_ERROR,details:A.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:u}))},i._trySkipBufferHole=function(u){for(var o=this.config,a=this.hls,n=this.media,t=n.currentTime,_=0,p=U.BufferHelper.getBuffered(n),v=0;v<p.length;v++){var x=p.start(v);if(t+o.maxBufferHole>=_&&t<x){var T=Math.max(x+f,n.currentTime+C);return W.logger.warn("skipping hole, adjusting currentTime from "+t+" to "+T),this.moved=!0,this.stalled=null,n.currentTime=T,u&&a.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 "+T,frag:u}),T}_=p.end(v)}return 0},i._tryNudgeBuffer=function(){var u=this.config,o=this.hls,a=this.media,n=a.currentTime,t=(this.nudgeRetry||0)+1;if(this.nudgeRetry=t,t<u.nudgeMaxRetry){var _=n+t*u.nudgeOffset;W.logger.warn("Nudging 'currentTime' from "+n+" to "+_),a.currentTime=_,o.trigger(I.Events.ERROR,{type:A.ErrorTypes.MEDIA_ERROR,details:A.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else W.logger.error("Playhead still not moving while enough data buffered @"+n+" after "+u.nudgeMaxRetry+" nudges"),o.trigger(I.Events.ERROR,{type:A.ErrorTypes.MEDIA_ERROR,details:A.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},l}()},"./src/controller/id3-track-controller.ts":function(ee,P,R){"use strict";R.r(P);var U=R("./src/events.ts"),A=R("./src/utils/texttrack-utils.ts"),I=R("./src/demux/id3.ts"),W=.25,j=function(){function e(f){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=f,this._registerListeners()}var C=e.prototype;return C.destroy=function(){this._unregisterListeners()},C._registerListeners=function(){var h=this.hls;h.on(U.Events.MEDIA_ATTACHED,this.onMediaAttached,this),h.on(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this),h.on(U.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),h.on(U.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},C._unregisterListeners=function(){var h=this.hls;h.off(U.Events.MEDIA_ATTACHED,this.onMediaAttached,this),h.off(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this),h.off(U.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),h.off(U.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},C.onMediaAttached=function(h,l){this.media=l.media},C.onMediaDetaching=function(){if(!this.id3Track)return;Object(A.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},C.getID3Track=function(h){if(!this.media)return;for(var l=0;l<h.length;l++){var i=h[l];if(i.kind==="metadata"&&i.label==="id3")return Object(A.sendAddTrackEvent)(i,this.media),i}return this.media.addTextTrack("metadata","id3")},C.onFragParsingMetadata=function(h,l){if(!this.media)return;var i=l.frag,s=l.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var u=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,o=0;o<s.length;o++){var a=I.getID3Frames(s[o].data);if(a){var n=s[o].pts,t=o<s.length-1?s[o+1].pts:i.end,_=t-n;_<=0&&(t=n+W);for(var p=0;p<a.length;p++){var v=a[p];if(!I.isTimeStampFrame(v)){var x=new u(n,t,"");x.value=v,this.id3Track.addCue(x)}}}}},C.onBufferFlushing=function(h,l){var i=l.startOffset,s=l.endOffset,u=l.type;if(!u||u==="audio"){var o=this.id3Track;o&&Object(A.removeCuesInRange)(o,i,s)}},e}();P.default=j},"./src/controller/latency-controller.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"default",function(){return e});var U=R("./src/errors.ts"),A=R("./src/events.ts"),I=R("./src/utils/logger.ts");function W(C,f){for(var h=0;h<f.length;h++){var l=f[h];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(C,l.key,l)}}function j(C,f,h){return f&&W(C.prototype,f),h&&W(C,h),C}var e=function(){function C(h){var l=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 l.timeupdate()},this.hls=h,this.config=h.config,this.registerListeners()}var f=C.prototype;return f.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},f.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)},f.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)},f.onMediaAttached=function(l,i){this.media=i.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},f.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},f.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},f.onLevelUpdated=function(l,i){var s=i.details;this.levelDetails=s,s.advanced&&this.timeupdate(),!s.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},f.onError=function(l,i){if(i.details!==U.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,I.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},f.timeupdate=function(){var l=this.media,i=this.levelDetails;if(!l||!i)return;this.currentTime=l.currentTime;var s=this.computeLatency();if(s===null)return;this._latency=s;var u=this.config,o=u.lowLatencyMode,a=u.maxLiveSyncPlaybackRate;if(!o||a===1)return;var n=this.targetLatency;if(n===null)return;var t=s-n,_=Math.min(this.maxLatency,n+i.targetduration),p=t<_;if(i.live&&p&&t>.05&&this.forwardBufferLength>1){var v=Math.min(2,Math.max(1,a)),x=Math.round(2/(1+Math.exp(-.75*t-this.edgeStalled))*20)/20;l.playbackRate=Math.min(v,Math.max(1,x))}else l.playbackRate!==1&&l.playbackRate!==0&&(l.playbackRate=1)},f.estimateLiveEdge=function(){var l=this.levelDetails;return l===null?null:l.edge+l.age},f.computeLatency=function(){var l=this.estimateLiveEdge();return l===null?null:l-this.currentTime},j(C,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var l=this.config,i=this.levelDetails;return l.liveMaxLatencyDuration!==void 0?l.liveMaxLatencyDuration:i?l.liveMaxLatencyDurationCount*i.targetduration:0}},{key:"targetLatency",get:function(){var l=this.levelDetails;if(l===null)return null;var i=l.holdBack,s=l.partHoldBack,u=l.targetduration,o=this.config,a=o.liveSyncDuration,n=o.liveSyncDurationCount,t=o.lowLatencyMode,_=this.hls.userConfig,p=t&&s||i;(_.liveSyncDuration||_.liveSyncDurationCount||p===0)&&(p=a!==void 0?a:n*u);var v=u,x=1;return p+Math.min(this.stallCount*x,v)}},{key:"liveSyncPosition",get:function(){var l=this.estimateLiveEdge(),i=this.targetLatency,s=this.levelDetails;if(l===null||i===null||s===null)return null;var u=s.edge,o=l-i-this.edgeStalled,a=u-s.totalduration,n=u-(this.config.lowLatencyMode&&s.partTarget||s.targetduration);return Math.min(Math.max(a,o),n)}},{key:"drift",get:function(){var l=this.levelDetails;return l===null?1:l.drift}},{key:"edgeStalled",get:function(){var l=this.levelDetails;if(l===null)return 0;var i=(this.config.lowLatencyMode&&l.partTarget||l.targetduration)*3;return Math.max(l.age-i,0)}},{key:"forwardBufferLength",get:function(){var l=this.media,i=this.levelDetails;if(!l||!i)return 0;var s=l.buffered.length;return s?l.buffered.end(s-1):i.edge-this.currentTime}}]),C}()},"./src/controller/level-controller.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"default",function(){return o});var U=R("./src/types/level.ts"),A=R("./src/events.ts"),I=R("./src/errors.ts"),W=R("./src/utils/codecs.ts"),j=R("./src/controller/level-helper.ts"),e=R("./src/controller/base-playlist-controller.ts"),C=R("./src/types/loader.ts");function f(){return f=Object.assign||function(a){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var _ in t)Object.prototype.hasOwnProperty.call(t,_)&&(a[_]=t[_])}return a},f.apply(this,arguments)}function h(a,n){for(var t=0;t<n.length;t++){var _=n[t];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(a,_.key,_)}}function l(a,n,t){return n&&h(a.prototype,n),t&&h(a,t),a}function i(a,n){a.prototype=Object.create(n.prototype),a.prototype.constructor=a,s(a,n)}function s(a,n){return s=Object.setPrototypeOf||function(_,p){return _.__proto__=p,_},s(a,n)}var u=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),o=function(a){i(n,a);function n(_){var p;return p=a.call(this,_,"[level-controller]")||this,p._levels=[],p._firstLevel=-1,p._startLevel=void 0,p.currentLevelIndex=-1,p.manualLevelIndex=-1,p.onParsedComplete=void 0,p._registerListeners(),p}var t=n.prototype;return t._registerListeners=function(){var p=this.hls;p.on(A.Events.MANIFEST_LOADED,this.onManifestLoaded,this),p.on(A.Events.LEVEL_LOADED,this.onLevelLoaded,this),p.on(A.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),p.on(A.Events.FRAG_LOADED,this.onFragLoaded,this),p.on(A.Events.ERROR,this.onError,this)},t._unregisterListeners=function(){var p=this.hls;p.off(A.Events.MANIFEST_LOADED,this.onManifestLoaded,this),p.off(A.Events.LEVEL_LOADED,this.onLevelLoaded,this),p.off(A.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),p.off(A.Events.FRAG_LOADED,this.onFragLoaded,this),p.off(A.Events.ERROR,this.onError,this)},t.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,a.prototype.destroy.call(this)},t.startLoad=function(){var p=this._levels;p.forEach(function(v){v.loadError=0}),a.prototype.startLoad.call(this)},t.onManifestLoaded=function(p,v){var x=[],T=[],b=[],d,g={},c,y=!1,r=!1,w=!1;if(v.levels.forEach(function(M){var H=M.attrs;y=y||!!(M.width&&M.height),r=r||!!M.videoCodec,w=w||!!M.audioCodec,u&&M.audioCodec&&M.audioCodec.indexOf("mp4a.40.34")!==-1&&(M.audioCodec=void 0);var O=M.bitrate+"-"+M.attrs.RESOLUTION+"-"+M.attrs.CODECS;c=g[O],c?c.url.push(M.url):(c=new U.Level(M),g[O]=c,x.push(c)),H&&(H.AUDIO&&Object(j.addGroupId)(c,"audio",H.AUDIO),H.SUBTITLES&&Object(j.addGroupId)(c,"text",H.SUBTITLES))}),(y||r)&&w&&(x=x.filter(function(M){var H=M.videoCodec,O=M.width,K=M.height;return!!H||!!(O&&K)})),x=x.filter(function(M){var H=M.audioCodec,O=M.videoCodec;return(!H||Object(W.isCodecSupportedInMp4)(H,"audio"))&&(!O||Object(W.isCodecSupportedInMp4)(O,"video"))}),v.audioTracks&&(T=v.audioTracks.filter(function(M){return!M.audioCodec||Object(W.isCodecSupportedInMp4)(M.audioCodec,"audio")}),Object(j.assignTrackIdsByGroup)(T)),v.subtitles&&(b=v.subtitles,Object(j.assignTrackIdsByGroup)(b)),x.length>0){d=x[0].bitrate,x.sort(function(M,H){return M.bitrate-H.bitrate}),this._levels=x;for(var D=0;D<x.length;D++)if(x[D].bitrate===d){this._firstLevel=D,this.log("manifest loaded, "+x.length+" level(s) found, first bitrate: "+d);break}var L=w&&!r,S={levels:x,audioTracks:T,subtitleTracks:b,firstLevel:this._firstLevel,stats:v.stats,audio:w,video:r,altAudio:!L&&T.some(function(M){return!!M.url})};this.hls.trigger(A.Events.MANIFEST_PARSED,S),(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:v.url,reason:"no level with compatible codecs found in manifest"})},t.onError=function(p,v){if(a.prototype.onError.call(this,p,v),v.fatal)return;var x=v.context,T=this._levels[this.currentLevelIndex];if(x&&(x.type===C.PlaylistContextType.AUDIO_TRACK&&T.audioGroupIds&&x.groupId===T.audioGroupIds[T.urlId]||x.type===C.PlaylistContextType.SUBTITLE_TRACK&&T.textGroupIds&&x.groupId===T.textGroupIds[T.urlId])){this.redundantFailover(this.currentLevelIndex);return}var b=!1,d=!0,g;switch(v.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(v.frag){var c=this._levels[v.frag.level];c?(c.fragmentError++,c.fragmentError>this.hls.config.fragLoadingMaxRetry&&(g=v.frag.level)):g=v.frag.level}break;case I.ErrorDetails.LEVEL_LOAD_ERROR:case I.ErrorDetails.LEVEL_LOAD_TIMEOUT:x&&(x.deliveryDirectives&&(d=!1),g=x.level),b=!0;break;case I.ErrorDetails.REMUX_ALLOC_ERROR:g=v.level,b=!0;break}g!==void 0&&this.recoverLevel(v,g,b,d)},t.recoverLevel=function(p,v,x,T){var b=p.details,d=this._levels[v];if(d.loadError++,x){var g=this.retryLoadingOrFail(p);if(g)p.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(T){var c=d.url.length;if(c>1&&d.loadError<c)p.levelRetry=!0,this.redundantFailover(v);else if(this.manualLevelIndex===-1){var y=v===0?this._levels.length-1:v-1;this.currentLevelIndex!==y&&this._levels[y].loadError===0&&(this.warn(b+": switch to "+y),p.levelRetry=!0,this.hls.nextAutoLevel=y)}}},t.redundantFailover=function(p){var v=this._levels[p],x=v.url.length;if(x>1){var T=(v.urlId+1)%x;this.warn("Switching to redundant URL-id "+T),this._levels.forEach(function(b){b.urlId=T}),this.level=p}},t.onFragLoaded=function(p,v){var x=v.frag;if(x!==void 0&&x.type===C.PlaylistLevelType.MAIN){var T=this._levels[x.level];T!==void 0&&(T.fragmentError=0,T.loadError=0)}},t.onLevelLoaded=function(p,v){var x,T=v.level,b=v.details,d=this._levels[T];if(!d){var g;this.warn("Invalid level index "+T),(g=v.deliveryDirectives)!==null&&g!==void 0&&g.skip&&(b.deltaUpdateFailed=!0);return}T===this.currentLevelIndex?(d.fragmentError===0&&(d.loadError=0,this.retryCount=0),this.playlistLoaded(T,v,d.details)):(x=v.deliveryDirectives)!==null&&x!==void 0&&x.skip&&(b.deltaUpdateFailed=!0)},t.onAudioTrackSwitched=function(p,v){var x=this.hls.levels[this.currentLevelIndex];if(!x)return;if(x.audioGroupIds){for(var T=-1,b=this.hls.audioTracks[v.id].groupId,d=0;d<x.audioGroupIds.length;d++)if(x.audioGroupIds[d]===b){T=d;break}T!==x.urlId&&(x.urlId=T,this.startLoad())}},t.loadPlaylist=function(p){var v=this.currentLevelIndex,x=this._levels[v];if(this.canLoad&&x&&x.url.length>0){var T=x.urlId,b=x.url[T];if(p)try{b=p.addDirectives(b)}catch(d){this.warn("Could not construct new URL with HLS Delivery Directives: "+d)}this.log("Attempt loading level index "+v+(p?" at sn "+p.msn+" part "+p.part:"")+" with URL-id "+T+" "+b),this.clearTimer(),this.hls.trigger(A.Events.LEVEL_LOADING,{url:b,level:v,id:T,deliveryDirectives:p||null})}},t.removeLevel=function(p,v){var x=function(d,g){return g!==v},T=this._levels.filter(function(b,d){return d!==p?!0:b.url.length>1&&v!==void 0?(b.url=b.url.filter(x),b.audioGroupIds&&(b.audioGroupIds=b.audioGroupIds.filter(x)),b.textGroupIds&&(b.textGroupIds=b.textGroupIds.filter(x)),b.urlId=0,!0):!1}).map(function(b,d){var g=b.details;return g!=null&&g.fragments&&g.fragments.forEach(function(c){c.level=d}),b});this._levels=T,this.hls.trigger(A.Events.LEVELS_UPDATED,{levels:T})},l(n,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(p){var v,x=this._levels;if(x.length===0)return;if(this.currentLevelIndex===p&&(v=x[p])!==null&&v!==void 0&&v.details)return;if(p<0||p>=x.length){var T=p<0;if(this.hls.trigger(A.Events.ERROR,{type:I.ErrorTypes.OTHER_ERROR,details:I.ErrorDetails.LEVEL_SWITCH_ERROR,level:p,fatal:T,reason:"invalid level idx"}),T)return;p=Math.min(p,x.length-1)}this.clearTimer();var b=this.currentLevelIndex,d=x[b],g=x[p];this.log("switching to level "+p+" from "+b),this.currentLevelIndex=p;var c=f({},g,{level:p,maxBitrate:g.maxBitrate,uri:g.uri,urlId:g.urlId});delete c._urlId,this.hls.trigger(A.Events.LEVEL_SWITCHING,c);var y=g.details;if(!y||y.live){var r=this.switchParams(g.uri,d==null?void 0:d.details);this.loadPlaylist(r)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(p){this.manualLevelIndex=p,this._startLevel===void 0&&(this._startLevel=p),p!==-1&&(this.level=p)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(p){this._firstLevel=p}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var p=this.hls.config.startLevel;return p!==void 0?p:this._firstLevel}else return this._startLevel},set:function(p){this._startLevel=p}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(p){this.level=p,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=p)}}]),n}(e.default)},"./src/controller/level-helper.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"addGroupId",function(){return I}),R.d(P,"assignTrackIdsByGroup",function(){return W}),R.d(P,"updatePTS",function(){return j}),R.d(P,"updateFragPTSDTS",function(){return C}),R.d(P,"mergeDetails",function(){return f}),R.d(P,"mapPartIntersection",function(){return h}),R.d(P,"mapFragmentIntersection",function(){return l}),R.d(P,"adjustSliding",function(){return i}),R.d(P,"addSliding",function(){return s}),R.d(P,"computeReloadInterval",function(){return u}),R.d(P,"getFragmentWithSN",function(){return o}),R.d(P,"getPartWith",function(){return a});var U=R("./src/polyfills/number.ts"),A=R("./src/utils/logger.ts");function I(n,t,_){switch(t){case"audio":n.audioGroupIds||(n.audioGroupIds=[]),n.audioGroupIds.push(_);break;case"text":n.textGroupIds||(n.textGroupIds=[]),n.textGroupIds.push(_);break}}function W(n){var t={};n.forEach(function(_){var p=_.groupId||"";_.id=t[p]=t[p]||0,t[p]++})}function j(n,t,_){var p=n[t],v=n[_];e(p,v)}function e(n,t){var _=t.startPTS;if(Object(U.isFiniteNumber)(_)){var p=0,v;t.sn>n.sn?(p=_-n.start,v=n):(p=n.start-_,v=t),v.duration!==p&&(v.duration=p)}else if(t.sn>n.sn){var x=n.cc===t.cc;x&&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,_,p,v,x){var T=p-_;T<=0&&(A.logger.warn("Fragment should have a positive duration",t),p=_+t.duration,x=v+t.duration);var b=_,d=p,g=t.startPTS,c=t.endPTS;if(Object(U.isFiniteNumber)(g)){var y=Math.abs(g-_);Object(U.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(y,t.deltaPTS):t.deltaPTS=y,b=Math.max(_,g),_=Math.min(_,g),v=Math.min(v,t.startDTS),d=Math.min(p,c),p=Math.max(p,c),x=Math.max(x,t.endDTS)}t.duration=p-_;var r=_-t.start;t.appendedPTS=p,t.start=t.startPTS=_,t.maxStartPTS=b,t.startDTS=v,t.endPTS=p,t.minEndPTS=d,t.endDTS=x;var w=t.sn;if(!n||w<n.startSN||w>n.endSN)return 0;var D,L=w-n.startSN,S=n.fragments;for(S[L]=t,D=L;D>0;D--)e(S[D],S[D-1]);for(D=L;D<S.length-1;D++)e(S[D],S[D+1]);return n.fragmentHint&&e(S[S.length-1],n.fragmentHint),n.PTSKnown=n.alignedSliding=!0,r}function f(n,t){for(var _=null,p=n.fragments,v=p.length-1;v>=0;v--){var x=p[v].initSegment;if(x){_=x;break}}n.fragmentHint&&delete n.fragmentHint.endPTS;var T=0,b;if(l(n,t,function(D,L){D.relurl&&(T=D.cc-L.cc),Object(U.isFiniteNumber)(D.startPTS)&&Object(U.isFiniteNumber)(D.endPTS)&&(L.start=L.startPTS=D.startPTS,L.startDTS=D.startDTS,L.appendedPTS=D.appendedPTS,L.maxStartPTS=D.maxStartPTS,L.endPTS=D.endPTS,L.endDTS=D.endDTS,L.minEndPTS=D.minEndPTS,L.duration=D.endPTS-D.startPTS,L.duration&&(b=L),t.PTSKnown=t.alignedSliding=!0),L.elementaryStreams=D.elementaryStreams,L.loader=D.loader,L.stats=D.stats,L.urlId=D.urlId,D.initSegment&&(L.initSegment=D.initSegment,_=D.initSegment)}),_){var d=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments;d.forEach(function(D){var L;(!D.initSegment||D.initSegment.relurl===((L=_)===null||L===void 0?void 0:L.relurl))&&(D.initSegment=_)})}if(t.skippedSegments&&(t.deltaUpdateFailed=t.fragments.some(function(D){return!D}),t.deltaUpdateFailed)){A.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var g=t.skippedSegments;g--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}var c=t.fragments;if(T){A.logger.warn("discontinuity sliding from playlist, take drift into account");for(var y=0;y<c.length;y++)c[y].cc+=T}t.skippedSegments&&(t.startCC=t.fragments[0].cc),h(n.partList,t.partList,function(D,L){L.elementaryStreams=D.elementaryStreams,L.stats=D.stats}),b?C(t,b,b.startPTS,b.endPTS,b.startDTS,b.endDTS):i(n,t),c.length&&(t.totalduration=t.edge-c[0].start),t.driftStartTime=n.driftStartTime,t.driftStart=n.driftStart;var r=t.advancedDateTime;if(t.advanced&&r){var w=t.edge;t.driftStart||(t.driftStartTime=r,t.driftStart=w),t.driftEndTime=r,t.driftEnd=w}else t.driftEndTime=n.driftEndTime,t.driftEnd=n.driftEnd,t.advancedDateTime=n.advancedDateTime}function h(n,t,_){if(n&&t)for(var p=0,v=0,x=n.length;v<=x;v++){var T=n[v],b=t[v+p];T&&b&&T.index===b.index&&T.fragment.sn===b.fragment.sn?_(T,b):p--}}function l(n,t,_){for(var p=t.skippedSegments,v=Math.max(n.startSN,t.startSN)-t.startSN,x=(n.fragmentHint?1:0)+(p?t.endSN:Math.min(n.endSN,t.endSN))-t.startSN,T=t.startSN-n.startSN,b=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,d=n.fragmentHint?n.fragments.concat(n.fragmentHint):n.fragments,g=v;g<=x;g++){var c=d[T+g],y=b[g];p&&!y&&g<p&&(y=t.fragments[g]=c),c&&y&&_(c,y)}}function i(n,t){var _=t.startSN+t.skippedSegments-n.startSN,p=n.fragments;if(_<0||_>=p.length)return;s(t,p[_].start)}function s(n,t){if(t){for(var _=n.fragments,p=n.skippedSegments;p<_.length;p++)_[p].start+=t;n.fragmentHint&&(n.fragmentHint.start+=t)}}function u(n,t){var _=1e3*n.levelTargetDuration,p=_/2,v=n.age,x=v>0&&v<_*3,T=t.loading.end-t.loading.start,b,d=n.availabilityDelay;if(n.updated===!1)if(x){var g=333*n.misses;b=Math.max(Math.min(p,T*2),g),n.availabilityDelay=(n.availabilityDelay||0)+b}else b=p;else x?(d=Math.min(d||_/2,v),n.availabilityDelay=d,b=d+_-v):b=_-T;return Math.round(b)}function o(n,t,_){if(!n||!n.details)return null;var p=n.details,v=p.fragments[t-p.startSN];return v||(v=p.fragmentHint,v&&v.sn===t?v:t<p.startSN&&_&&_.sn===t?_:null)}function a(n,t,_){if(!n||!n.details)return null;var p=n.details.partList;if(p)for(var v=p.length;v--;){var x=p[v];if(x.index===_&&x.fragment.sn===t)return x}return null}},"./src/controller/stream-controller.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"default",function(){return p});var U=R("./src/polyfills/number.ts"),A=R("./src/controller/base-stream-controller.ts"),I=R("./src/is-supported.ts"),W=R("./src/events.ts"),j=R("./src/utils/buffer-helper.ts"),e=R("./src/controller/fragment-tracker.ts"),C=R("./src/types/loader.ts"),f=R("./src/loader/fragment.ts"),h=R("./src/demux/transmuxer-interface.ts"),l=R("./src/types/transmuxer.ts"),i=R("./src/controller/gap-controller.ts"),s=R("./src/errors.ts"),u=R("./src/utils/logger.ts");function o(v,x){for(var T=0;T<x.length;T++){var b=x[T];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,b.key,b)}}function a(v,x,T){return x&&o(v.prototype,x),T&&o(v,T),v}function n(v,x){v.prototype=Object.create(x.prototype),v.prototype.constructor=v,t(v,x)}function t(v,x){return t=Object.setPrototypeOf||function(b,d){return b.__proto__=d,b},t(v,x)}var _=100,p=function(v){n(x,v);function x(b,d){var g;return g=v.call(this,b,d,"[stream-controller]")||this,g.audioCodecSwap=!1,g.gapController=null,g.level=-1,g._forceStartLoad=!1,g.altAudio=!1,g.audioOnly=!1,g.fragPlaying=null,g.onvplaying=null,g.onvseeked=null,g.fragLastKbps=0,g.stalled=!1,g.couldBacktrack=!1,g.audioCodecSwitch=!1,g.videoBuffer=null,g._registerListeners(),g}var T=x.prototype;return T._registerListeners=function(){var d=this.hls;d.on(W.Events.MEDIA_ATTACHED,this.onMediaAttached,this),d.on(W.Events.MEDIA_DETACHING,this.onMediaDetaching,this),d.on(W.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.on(W.Events.MANIFEST_PARSED,this.onManifestParsed,this),d.on(W.Events.LEVEL_LOADING,this.onLevelLoading,this),d.on(W.Events.LEVEL_LOADED,this.onLevelLoaded,this),d.on(W.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),d.on(W.Events.ERROR,this.onError,this),d.on(W.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),d.on(W.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),d.on(W.Events.BUFFER_CREATED,this.onBufferCreated,this),d.on(W.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),d.on(W.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),d.on(W.Events.FRAG_BUFFERED,this.onFragBuffered,this)},T._unregisterListeners=function(){var d=this.hls;d.off(W.Events.MEDIA_ATTACHED,this.onMediaAttached,this),d.off(W.Events.MEDIA_DETACHING,this.onMediaDetaching,this),d.off(W.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.off(W.Events.MANIFEST_PARSED,this.onManifestParsed,this),d.off(W.Events.LEVEL_LOADED,this.onLevelLoaded,this),d.off(W.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),d.off(W.Events.ERROR,this.onError,this),d.off(W.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),d.off(W.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),d.off(W.Events.BUFFER_CREATED,this.onBufferCreated,this),d.off(W.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),d.off(W.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),d.off(W.Events.FRAG_BUFFERED,this.onFragBuffered,this)},T.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},T.startLoad=function(d){if(this.levels){var g=this.lastCurrentTime,c=this.hls;if(this.stopLoad(),this.setInterval(_),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var y=c.startLevel;y===-1&&(c.config.testBandwidth?(y=0,this.bitrateTest=!0):y=c.nextAutoLevel),this.level=c.nextLoadLevel=y,this.loadedmetadata=!1}g>0&&d===-1&&(this.log("Override startPosition with lastCurrentTime @"+g.toFixed(3)),d=g),this.state=A.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=d,this.tick()}else this._forceStartLoad=!0,this.state=A.State.STOPPED},T.stopLoad=function(){this._forceStartLoad=!1,v.prototype.stopLoad.call(this)},T.doTick=function(){switch(this.state){case A.State.IDLE:this.doTickIdle();break;case A.State.WAITING_LEVEL:{var d,g=this.levels,c=this.level,y=g==null||((d=g[c])===null||d===void 0)?void 0:d.details;if(y&&(!y.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(y))break;this.state=A.State.IDLE;break}break}case A.State.FRAG_LOADING_WAITING_RETRY:{var r,w=self.performance.now(),D=this.retryDate;(!D||w>=D||(r=this.media)!==null&&r!==void 0&&r.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=A.State.IDLE)}break;default:break}this.onTickEnd()},T.onTickEnd=function(){v.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},T.doTickIdle=function(){var d,g,c=this.hls,y=this.levelLastLoaded,r=this.levels,w=this.media,D=c.config,L=c.nextLoadLevel;if(y===null||!w&&(this.startFragRequested||!D.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!r||!r[L])return;var S=r[L];this.level=c.nextLoadLevel=L;var M=S.details;if(!M||this.state===A.State.WAITING_LEVEL||M.live&&this.levelLastLoaded!==L){this.state=A.State.WAITING_LEVEL;return}var H=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:w,C.PlaylistLevelType.MAIN);if(H===null)return;var O=H.len,K=this.getMaxBufferLength(S.maxBitrate);if(O>=K)return;if(this._streamEnded(H,M)){var Y={};this.altAudio&&(Y.type="video"),this.hls.trigger(W.Events.BUFFER_EOS,Y),this.state=A.State.ENDED;return}var ie=H.end,re=this.getNextFragment(ie,M);if(this.couldBacktrack&&!this.fragPrevious&&re&&re.sn!=="initSegment"){var Te=re.sn-M.startSN;Te>1&&(re=M.fragments[Te-1],this.fragmentTracker.removeFragment(re))}if(re&&this.fragmentTracker.getState(re)===e.FragmentState.OK&&this.nextLoadPosition>ie){var _e=this.audioOnly&&!this.altAudio?f.ElementaryStreamTypes.AUDIO:f.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(w,_e,C.PlaylistLevelType.MAIN),re=this.getNextFragment(this.nextLoadPosition,M)}if(!re)return;re.initSegment&&!re.initSegment.data&&!this.bitrateTest&&(re=re.initSegment),((d=re.decryptdata)===null||d===void 0?void 0:d.keyFormat)==="identity"&&!((g=re.decryptdata)!==null&&g!==void 0&&g.key)?this.loadKey(re,M):this.loadFragment(re,M,ie)},T.loadFragment=function(d,g,c){var y,r=this.fragmentTracker.getState(d);if(this.fragCurrent=d,r===e.FragmentState.BACKTRACKED){var w=this.fragmentTracker.getBacktrackData(d);if(w){this._handleFragmentLoadProgress(w),this._handleFragmentLoadComplete(w);return}else r=e.FragmentState.NOT_LOADED}r===e.FragmentState.NOT_LOADED||r===e.FragmentState.PARTIAL?d.sn==="initSegment"?this._loadInitSegment(d):this.bitrateTest?(d.bitrateTest=!0,this.log("Fragment "+d.sn+" of level "+d.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(d)):(this.startFragRequested=!0,v.prototype.loadFragment.call(this,d,g,c)):r===e.FragmentState.APPENDING?this.reduceMaxBufferLength(d.duration)&&this.fragmentTracker.removeFragment(d):((y=this.media)===null||y===void 0?void 0:y.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},T.getAppendedFrag=function(d){var g=this.fragmentTracker.getAppendedFrag(d,C.PlaylistLevelType.MAIN);return g&&"fragment"in g?g.fragment:g},T.getBufferedFrag=function(d){return this.fragmentTracker.getBufferedFrag(d,C.PlaylistLevelType.MAIN)},T.followingBufferedFrag=function(d){return d?this.getBufferedFrag(d.end+.5):null},T.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},T.nextLevelSwitch=function(){var d=this.levels,g=this.media;if(g!=null&&g.readyState){var c,y=this.getAppendedFrag(g.currentTime);if(y&&y.start>1&&this.flushMainBuffer(0,y.start-1),!g.paused&&d){var r=this.hls.nextLoadLevel,w=d[r],D=this.fragLastKbps;D&&this.fragCurrent?c=this.fragCurrent.duration*w.maxBitrate/(1e3*D)+1:c=0}else c=0;var L=this.getBufferedFrag(g.currentTime+c);if(L){var S=this.followingBufferedFrag(L);if(S){this.abortCurrentFrag();var M=S.maxStartPTS?S.maxStartPTS:S.start,H=S.duration,O=Math.max(L.end,M+Math.min(Math.max(H-this.config.maxFragLookUpTolerance,H*.5),H*.75));this.flushMainBuffer(O,Number.POSITIVE_INFINITY)}}}},T.abortCurrentFrag=function(){var d=this.fragCurrent;this.fragCurrent=null,d!=null&&d.loader&&d.loader.abort(),this.state===A.State.KEY_LOADING&&(this.state=A.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},T.flushMainBuffer=function(d,g){v.prototype.flushMainBuffer.call(this,d,g,this.altAudio?"video":null)},T.onMediaAttached=function(d,g){v.prototype.onMediaAttached.call(this,d,g);var c=g.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),c.addEventListener("playing",this.onvplaying),c.addEventListener("seeked",this.onvseeked),this.gapController=new i.default(this.config,c,this.fragmentTracker,this.hls)},T.onMediaDetaching=function(){var d=this.media;d&&(d.removeEventListener("playing",this.onvplaying),d.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),v.prototype.onMediaDetaching.call(this)},T.onMediaPlaying=function(){this.tick()},T.onMediaSeeked=function(){var d=this.media,g=d?d.currentTime:null;Object(U.isFiniteNumber)(g)&&this.log("Media seeked to "+g.toFixed(3)),this.tick()},T.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(W.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},T.onManifestParsed=function(d,g){var c=!1,y=!1,r;g.levels.forEach(function(w){r=w.audioCodec,r&&(r.indexOf("mp4a.40.2")!==-1&&(c=!0),r.indexOf("mp4a.40.5")!==-1&&(y=!0))}),this.audioCodecSwitch=c&&y&&!Object(I.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=g.levels,this.startFragRequested=!1},T.onLevelLoading=function(d,g){var c=this.levels;if(!c||this.state!==A.State.IDLE)return;var y=c[g.level];(!y.details||y.details.live&&this.levelLastLoaded!==g.level||this.waitForCdnTuneIn(y.details))&&(this.state=A.State.WAITING_LEVEL)},T.onLevelLoaded=function(d,g){var c,y=this.levels,r=g.level,w=g.details,D=w.totalduration;if(!y){this.warn("Levels were reset while loading level "+r);return}this.log("Level "+r+" loaded ["+w.startSN+","+w.endSN+"], cc ["+w.startCC+", "+w.endCC+"] duration:"+D);var L=this.fragCurrent;L&&(this.state===A.State.FRAG_LOADING||this.state===A.State.FRAG_LOADING_WAITING_RETRY)&&(L.level!==g.level&&L.loader&&(this.state=A.State.IDLE,L.loader.abort()));var S=y[r],M=0;if(w.live||(c=S.details)!==null&&c!==void 0&&c.live){if(w.fragments[0]||(w.deltaUpdateFailed=!0),w.deltaUpdateFailed)return;M=this.alignPlaylists(w,S.details)}if(S.details=w,this.levelLastLoaded=r,this.hls.trigger(W.Events.LEVEL_UPDATED,{details:w,level:r}),this.state===A.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(w))return;this.state=A.State.IDLE}this.startFragRequested?w.live&&this.synchronizeToLiveEdge(w):this.setStartPosition(w,M),this.tick()},T._handleFragmentLoadProgress=function(d){var g,c=d.frag,y=d.part,r=d.payload,w=this.levels;if(!w){this.warn("Levels were reset while fragment load was in progress. Fragment "+c.sn+" of level "+c.level+" will not be buffered");return}var D=w[c.level],L=D.details;if(!L){this.warn("Dropping fragment "+c.sn+" of level "+c.level+" after level details were reset");return}var S=D.videoCodec,M=L.PTSKnown||!L.live,H=(g=c.initSegment)===null||g===void 0?void 0:g.data,O=this._getAudioCodec(D),K=this.transmuxer=this.transmuxer||new h.default(this.hls,C.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),Y=y?y.index:-1,ie=Y!==-1,re=new l.ChunkMetadata(c.level,c.sn,c.stats.chunkCount,r.byteLength,Y,ie),Te=this.initPTS[c.cc];K.push(r,H,O,S,c,y,L.totalduration,M,re,Te)},T.onAudioTrackSwitching=function(d,g){var c=this.altAudio,y=!!g.url,r=g.id;if(!y){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var w=this.fragCurrent;w!=null&&w.loader&&(this.log("Switching to main audio track, cancel main fragment load"),w.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var D=this.hls;c&&D.trigger(W.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),D.trigger(W.Events.AUDIO_TRACK_SWITCHED,{id:r})}},T.onAudioTrackSwitched=function(d,g){var c=g.id,y=!!this.hls.audioTracks[c].url;if(y){var r=this.videoBuffer;r&&this.mediaBuffer!==r&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=r)}this.altAudio=y,this.tick()},T.onBufferCreated=function(d,g){var c=g.tracks,y,r,w=!1;for(var D in c){var L=c[D];if(L.id==="main"){if(r=D,y=L,D==="video"){var S=c[D];S&&(this.videoBuffer=S.buffer)}}else w=!0}w&&y?(this.log("Alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=y.buffer):this.mediaBuffer=this.media},T.onFragBuffered=function(d,g){var c=g.frag,y=g.part;if(c&&c.type!==C.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(c)){this.warn("Fragment "+c.sn+(y?" p: "+y.index:"")+" of level "+c.level+" finished buffering, but was aborted. state: "+this.state),this.state===A.State.PARSED&&(this.state=A.State.IDLE);return}var r=y?y.stats:c.stats;this.fragLastKbps=Math.round(8*r.total/(r.buffering.end-r.loading.first)),c.sn!=="initSegment"&&(this.fragPrevious=c),this.fragBufferedComplete(c,y)},T.onError=function(d,g){switch(g.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.MAIN,g);break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==A.State.ERROR&&(g.fatal?(this.warn(""+g.details),this.state=A.State.ERROR):!g.levelRetry&&this.state===A.State.WAITING_LEVEL&&(this.state=A.State.IDLE));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if(g.parent==="main"&&(this.state===A.State.PARSING||this.state===A.State.PARSED)){var c=!0,y=this.getFwdBufferInfo(this.media,C.PlaylistLevelType.MAIN);y&&y.len>.5&&(c=!this.reduceMaxBufferLength(y.len)),c&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},T.checkBuffer=function(){var d=this.media,g=this.gapController;if(!d||!g||!d.readyState)return;var c=j.BufferHelper.getBuffered(d);!this.loadedmetadata&&c.length?(this.loadedmetadata=!0,this.seekToStartPos()):g.poll(this.lastCurrentTime),this.lastCurrentTime=d.currentTime},T.onFragLoadEmergencyAborted=function(){this.state=A.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},T.onBufferFlushed=function(d,g){var c=g.type;if(c!==f.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var y=(c===f.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(y,c,C.PlaylistLevelType.MAIN)}},T.onLevelsUpdated=function(d,g){this.levels=g.levels},T.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},T.seekToStartPos=function(){var d=this.media,g=d.currentTime,c=this.startPosition;if(c>=0&&g<c){if(d.seeking){u.logger.log("could not seek to "+c+", already seeking at "+g);return}var y=j.BufferHelper.getBuffered(d),r=y.length?y.start(0):0,w=r-c;w>0&&(w<this.config.maxBufferHole||w<this.config.maxFragLookUpTolerance)&&(u.logger.log("adjusting start position by "+w+" to match buffer start"),c+=w,this.startPosition=c),this.log("seek to target start position "+c+" from current time "+g),d.currentTime=c}},T._getAudioCodec=function(d){var g=this.config.defaultAudioCodec||d.audioCodec;return this.audioCodecSwap&&g&&(this.log("Swapping audio codec"),g.indexOf("mp4a.40.5")!==-1?g="mp4a.40.2":g="mp4a.40.5"),g},T._loadBitrateTestFrag=function(d){var g=this;this._doFragLoad(d).then(function(c){var y=g.hls;if(!c||y.nextLoadLevel||g.fragContextChanged(d))return;g.fragLoadError=0,g.state=A.State.IDLE,g.startFragRequested=!1,g.bitrateTest=!1;var r=d.stats;r.parsing.start=r.parsing.end=r.buffering.start=r.buffering.end=self.performance.now(),y.trigger(W.Events.FRAG_LOADED,c)})},T._handleTransmuxComplete=function(d){var g,c="main",y=this.hls,r=d.remuxResult,w=d.chunkMeta,D=this.getCurrentContext(w);if(!D){this.warn("The loading context changed while buffering fragment "+w.sn+" of level "+w.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(w.level);return}var L=D.frag,S=D.part,M=D.level,H=r.video,O=r.text,K=r.id3,Y=r.initSegment,ie=this.altAudio?void 0:r.audio;if(this.fragContextChanged(L))return;if(this.state=A.State.PARSING,Y){Y.tracks&&(this._bufferInitSegment(M,Y.tracks,L,w),y.trigger(W.Events.FRAG_PARSING_INIT_SEGMENT,{frag:L,id:c,tracks:Y.tracks}));var re=Y.initPTS,Te=Y.timescale;Object(U.isFiniteNumber)(re)&&(this.initPTS[L.cc]=re,y.trigger(W.Events.INIT_PTS_FOUND,{frag:L,id:c,initPTS:re,timescale:Te}))}if(H&&r.independent!==!1){if(M.details){var _e=H.startPTS,we=H.endPTS,Ce=H.startDTS,Re=H.endDTS;if(S)S.elementaryStreams[H.type]={startPTS:_e,endPTS:we,startDTS:Ce,endDTS:Re};else if(H.firstKeyFrame&&H.independent&&(this.couldBacktrack=!0),H.dropped&&H.independent){var ue=this.getLoadPosition()+this.config.maxBufferHole;if(ue<_e){this.backtrack(L);return}L.setElementaryStreamInfo(H.type,L.start,we,L.start,Re,!0)}L.setElementaryStreamInfo(H.type,_e,we,Ce,Re),this.bufferFragmentData(H,L,S,w)}}else if(r.independent===!1){this.backtrack(L);return}if(ie){var q=ie.startPTS,Fe=ie.endPTS,We=ie.startDTS,He=ie.endDTS;S&&(S.elementaryStreams[f.ElementaryStreamTypes.AUDIO]={startPTS:q,endPTS:Fe,startDTS:We,endDTS:He}),L.setElementaryStreamInfo(f.ElementaryStreamTypes.AUDIO,q,Fe,We,He),this.bufferFragmentData(ie,L,S,w)}if(K!=null&&(g=K.samples)!==null&&g!==void 0&&g.length){var Ge={frag:L,id:c,samples:K.samples};y.trigger(W.Events.FRAG_PARSING_METADATA,Ge)}if(O){var it={frag:L,id:c,samples:O.samples};y.trigger(W.Events.FRAG_PARSING_USERDATA,it)}},T._bufferInitSegment=function(d,g,c,y){var r=this;if(this.state!==A.State.PARSING)return;this.audioOnly=!!g.audio&&!g.video,this.altAudio&&!this.audioOnly&&delete g.audio;var w=g.audio,D=g.video,L=g.audiovideo;if(w){var S=d.audioCodec,M=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(S&&(S.indexOf("mp4a.40.5")!==-1?S="mp4a.40.2":S="mp4a.40.5"),w.metadata.channelCount!==1&&M.indexOf("firefox")===-1&&(S="mp4a.40.5")),M.indexOf("android")!==-1&&w.container!=="audio/mpeg"&&(S="mp4a.40.2",this.log("Android: force audio codec to "+S)),d.audioCodec&&d.audioCodec!==S&&this.log('Swapping manifest audio codec "'+d.audioCodec+'" for "'+S+'"'),w.levelCodec=S,w.id="main",this.log("Init audio buffer, container:"+w.container+", codecs[selected/level/parsed]=["+(S||"")+"/"+(d.audioCodec||"")+"/"+w.codec+"]")}D&&(D.levelCodec=d.videoCodec,D.id="main",this.log("Init video buffer, container:"+D.container+", codecs[level/parsed]=["+(d.videoCodec||"")+"/"+D.codec+"]")),L&&this.log("Init audiovideo buffer, container:"+L.container+", codecs[level/parsed]=["+(d.attrs.CODECS||"")+"/"+L.codec+"]"),this.hls.trigger(W.Events.BUFFER_CODECS,g),Object.keys(g).forEach(function(H){var O=g[H],K=O.initSegment;K!=null&&K.byteLength&&r.hls.trigger(W.Events.BUFFER_APPENDING,{type:H,data:K,frag:c,part:null,chunkMeta:y,parent:c.type})}),this.tick()},T.backtrack=function(d){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(d);var g=this.fragmentTracker.backtrack(d);this.fragPrevious=null,this.nextLoadPosition=d.start,g?this.resetFragmentLoading(d):this.state=A.State.BACKTRACKING},T.checkFragmentChanged=function(){var d=this.media,g=null;if(d&&d.readyState>1&&d.seeking===!1){var c=d.currentTime;if(j.BufferHelper.isBuffered(d,c)?g=this.getAppendedFrag(c):j.BufferHelper.isBuffered(d,c+.1)&&(g=this.getAppendedFrag(c+.1)),g){var y=this.fragPlaying,r=g.level;(!y||g.sn!==y.sn||y.level!==r||g.urlId!==y.urlId)&&(this.hls.trigger(W.Events.FRAG_CHANGED,{frag:g}),(!y||y.level!==r)&&this.hls.trigger(W.Events.LEVEL_SWITCHED,{level:r}),this.fragPlaying=g)}}},a(x,[{key:"nextLevel",get:function(){var d=this.nextBufferedFrag;return d?d.level:-1}},{key:"currentLevel",get:function(){var d=this.media;if(d){var g=this.getAppendedFrag(d.currentTime);if(g)return g.level}return-1}},{key:"nextBufferedFrag",get:function(){var d=this.media;if(d){var g=this.getAppendedFrag(d.currentTime);return this.followingBufferedFrag(g)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),x}(A.default)},"./src/controller/subtitle-stream-controller.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"SubtitleStreamController",function(){return n});var U=R("./src/events.ts"),A=R("./src/utils/logger.ts"),I=R("./src/utils/buffer-helper.ts"),W=R("./src/controller/fragment-finders.ts"),j=R("./src/utils/discontinuities.ts"),e=R("./src/controller/level-helper.ts"),C=R("./src/controller/fragment-tracker.ts"),f=R("./src/controller/base-stream-controller.ts"),h=R("./src/types/loader.ts"),l=R("./src/types/level.ts");function i(t,_){for(var p=0;p<_.length;p++){var v=_[p];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(t,v.key,v)}}function s(t,_,p){return _&&i(t.prototype,_),p&&i(t,p),t}function u(t,_){t.prototype=Object.create(_.prototype),t.prototype.constructor=t,o(t,_)}function o(t,_){return o=Object.setPrototypeOf||function(v,x){return v.__proto__=x,v},o(t,_)}var a=500,n=function(t){u(_,t);function _(v,x){var T;return T=t.call(this,v,x,"[subtitle-stream-controller]")||this,T.levels=[],T.currentTrackId=-1,T.tracksBuffered=[],T.mainDetails=null,T._registerListeners(),T}var p=_.prototype;return p.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},p._registerListeners=function(){var x=this.hls;x.on(U.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.on(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.on(U.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.on(U.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.on(U.Events.ERROR,this.onError,this),x.on(U.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),x.on(U.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),x.on(U.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),x.on(U.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),x.on(U.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},p._unregisterListeners=function(){var x=this.hls;x.off(U.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.off(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.off(U.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.off(U.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.off(U.Events.ERROR,this.onError,this),x.off(U.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),x.off(U.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),x.off(U.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),x.off(U.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),x.off(U.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},p.startLoad=function(){this.stopLoad(),this.state=f.State.IDLE,this.setInterval(a),this.tick()},p.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},p.onLevelLoaded=function(x,T){this.mainDetails=T.details},p.onSubtitleFragProcessed=function(x,T){var b=T.frag,d=T.success;if(this.fragPrevious=b,this.state=f.State.IDLE,!d)return;var g=this.tracksBuffered[this.currentTrackId];if(!g)return;for(var c,y=b.start,r=0;r<g.length;r++)if(y>=g[r].start&&y<=g[r].end){c=g[r];break}var w=b.start+b.duration;c?c.end=w:(c={start:y,end:w},g.push(c)),this.fragmentTracker.fragBuffered(b)},p.onBufferFlushing=function(x,T){var b=T.startOffset,d=T.endOffset;if(b===0&&d!==Number.POSITIVE_INFINITY){var g=this.currentTrackId,c=this.levels;if(!c.length||!c[g]||!c[g].details)return;var y=c[g].details,r=y.targetduration,w=d-r;if(w<=0)return;T.endOffsetSubtitles=Math.max(0,w),this.tracksBuffered.forEach(function(D){for(var L=0;L<D.length;){if(D[L].end<=w){D.shift();continue}else if(D[L].start<w)D[L].start=w;else break;L++}}),this.fragmentTracker.removeFragmentsInRange(b,w,h.PlaylistLevelType.SUBTITLE)}},p.onError=function(x,T){var b,d=T.frag;if(!d||d.type!==h.PlaylistLevelType.SUBTITLE)return;(b=this.fragCurrent)!==null&&b!==void 0&&b.loader&&this.fragCurrent.loader.abort(),this.state=f.State.IDLE},p.onSubtitleTracksUpdated=function(x,T){var b=this,d=T.subtitleTracks;this.tracksBuffered=[],this.levels=d.map(function(g){return new l.Level(g)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(g){b.tracksBuffered[g.id]=[]}),this.mediaBuffer=null},p.onSubtitleTrackSwitch=function(x,T){if(this.currentTrackId=T.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var b=this.levels[this.currentTrackId];b!=null&&b.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,b&&this.setInterval(a)},p.onSubtitleTrackLoaded=function(x,T){var b,d=T.details,g=T.id,c=this.currentTrackId,y=this.levels;if(!y.length)return;var r=y[c];if(g>=y.length||g!==c||!r)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,d.live||(b=r.details)!==null&&b!==void 0&&b.live){var w=this.mainDetails;if(d.deltaUpdateFailed||!w)return;var D=w.fragments[0];if(!r.details)d.hasProgramDateTime&&w.hasProgramDateTime?Object(j.alignMediaPlaylistByPDT)(d,w):D&&Object(e.addSliding)(d,D.start);else{var L=this.alignPlaylists(d,r.details);L===0&&D&&Object(e.addSliding)(d,D.start)}}if(r.details=d,this.levelLastLoaded=g,this.tick(),d.live&&!this.fragCurrent&&this.media&&this.state===f.State.IDLE){var S=Object(W.findFragmentByPTS)(null,d.fragments,this.media.currentTime,0);S||(this.warn("Subtitle playlist not aligned with playback"),r.details=void 0)}},p._handleFragmentLoadComplete=function(x){var T=x.frag,b=x.payload,d=T.decryptdata,g=this.hls;if(this.fragContextChanged(T))return;if(b&&b.byteLength>0&&d&&d.key&&d.iv&&d.method==="AES-128"){var c=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(b),d.key.buffer,d.iv.buffer).then(function(y){var r=performance.now();g.trigger(U.Events.FRAG_DECRYPTED,{frag:T,payload:y,stats:{tstart:c,tdecrypt:r}})})}},p.doTick=function(){if(!this.media){this.state=f.State.IDLE;return}if(this.state===f.State.IDLE){var x,T=this.currentTrackId,b=this.levels;if(!b.length||!b[T]||!b[T].details)return;var d=b[T].details,g=d.targetduration,c=this.config,y=this.media,r=I.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,y.currentTime-g,c.maxBufferHole),w=r.end,D=r.len,L=this.getMaxBufferLength()+g;if(D>L)return;console.assert(d,"Subtitle track details are defined on idle subtitle stream controller tick");var S=d.fragments,M=S.length,H=d.edge,O,K=this.fragPrevious;if(w<H){var Y=c.maxFragLookUpTolerance;K&&d.hasProgramDateTime&&(O=Object(W.findFragmentByPDT)(S,K.endProgramDateTime,Y)),O||(O=Object(W.findFragmentByPTS)(K,S,w,Y),!O&&K&&K.start<S[0].start&&(O=S[0]))}else O=S[M-1];(x=O)!==null&&x!==void 0&&x.encrypted?(A.logger.log("Loading key for "+O.sn),this.state=f.State.KEY_LOADING,this.hls.trigger(U.Events.KEY_LOADING,{frag:O})):O&&this.fragmentTracker.getState(O)===C.FragmentState.NOT_LOADED&&this.loadFragment(O,d,w)}},p.loadFragment=function(x,T,b){this.fragCurrent=x,t.prototype.loadFragment.call(this,x,T,b)},s(_,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),_}(f.default)},"./src/controller/subtitle-track-controller.ts":function(ee,P,R){"use strict";R.r(P);var U=R("./src/events.ts"),A=R("./src/utils/texttrack-utils.ts"),I=R("./src/controller/base-playlist-controller.ts"),W=R("./src/types/loader.ts");function j(i,s){for(var u=0;u<s.length;u++){var o=s[u];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(i,o.key,o)}}function e(i,s,u){return s&&j(i.prototype,s),u&&j(i,u),i}function C(i,s){i.prototype=Object.create(s.prototype),i.prototype.constructor=i,f(i,s)}function f(i,s){return f=Object.setPrototypeOf||function(o,a){return o.__proto__=a,o},f(i,s)}var h=function(i){C(s,i);function s(o){var a;return a=i.call(this,o,"[subtitle-track-controller]")||this,a.media=null,a.tracks=[],a.groupId=null,a.tracksInGroup=[],a.trackId=-1,a.selectDefaultTrack=!0,a.queuedDefaultTrack=-1,a.trackChangeListener=function(){return a.onTextTracksChanged()},a.asyncPollTrackChange=function(){return a.pollTrackChange(0)},a.useTextTrackPolling=!1,a.subtitlePollingInterval=-1,a.subtitleDisplay=!0,a.registerListeners(),a}var u=s.prototype;return u.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,i.prototype.destroy.call(this)},u.registerListeners=function(){var a=this.hls;a.on(U.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.on(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(U.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(U.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(U.Events.LEVEL_LOADING,this.onLevelLoading,this),a.on(U.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),a.on(U.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),a.on(U.Events.ERROR,this.onError,this)},u.unregisterListeners=function(){var a=this.hls;a.off(U.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.off(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(U.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(U.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(U.Events.LEVEL_LOADING,this.onLevelLoading,this),a.off(U.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),a.off(U.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),a.off(U.Events.ERROR,this.onError,this)},u.onMediaAttached=function(a,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)},u.pollTrackChange=function(a){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,a)},u.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var a=l(this.media.textTracks);a.forEach(function(n){Object(A.clearCurrentCues)(n)}),this.subtitleTrack=-1,this.media=null},u.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},u.onManifestParsed=function(a,n){this.tracks=n.subtitleTracks},u.onSubtitleTrackLoaded=function(a,n){var t=n.id,_=n.details,p=this.trackId,v=this.tracksInGroup[p];if(!v){this.warn("Invalid subtitle track id "+t);return}var x=v.details;v.details=n.details,this.log("subtitle track "+t+" loaded ["+_.startSN+"-"+_.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,n,x))},u.onLevelLoading=function(a,n){this.switchLevel(n.level)},u.onLevelSwitching=function(a,n){this.switchLevel(n.level)},u.switchLevel=function(a){var n=this.hls.levels[a];if(!(n!=null&&n.textGroupIds))return;var t=n.textGroupIds[n.urlId];if(this.groupId!==t){var _=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,p=this.tracks.filter(function(T){return!t||T.groupId===t});this.tracksInGroup=p;var v=this.findTrackId(_==null?void 0:_.name)||this.findTrackId();this.groupId=t;var x={subtitleTracks:p};this.log("Updating subtitle tracks, "+p.length+' track(s) found in "'+t+'" group-id'),this.hls.trigger(U.Events.SUBTITLE_TRACKS_UPDATED,x),v!==-1&&this.setSubtitleTrack(v,_)}},u.findTrackId=function(a){for(var n=this.tracksInGroup,t=0;t<n.length;t++){var _=n[t];if((!this.selectDefaultTrack||_.default)&&(!a||a===_.name))return _.id}return-1},u.onError=function(a,n){if(i.prototype.onError.call(this,a,n),n.fatal||!n.context)return;n.context.type===W.PlaylistContextType.SUBTITLE_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},u.loadPlaylist=function(a){var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var t=n.id,_=n.groupId,p=n.url;if(a)try{p=a.addDirectives(p)}catch(v){this.warn("Could not construct new URL with HLS Delivery Directives: "+v)}this.log("Loading subtitle playlist for id "+t),this.hls.trigger(U.Events.SUBTITLE_TRACK_LOADING,{url:p,id:t,groupId:_,deliveryDirectives:a||null})}},u.toggleTrackModes=function(a){var n=this,t=this.media,_=this.subtitleDisplay,p=this.trackId;if(!t)return;var v=l(t.textTracks),x=v.filter(function(d){return d.groupId===n.groupId});if(a===-1)[].slice.call(v).forEach(function(d){d.mode="disabled"});else{var T=x[p];T&&(T.mode="disabled")}var b=x[a];b&&(b.mode=_?"showing":"hidden")},u.setSubtitleTrack=function(a,n){var t,_=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=a;return}if(this.trackId!==a&&this.toggleTrackModes(a),this.trackId===a&&(a===-1||(t=_[a])!==null&&t!==void 0&&t.details)||a<-1||a>=_.length)return;this.clearTimer();var p=_[a];if(this.log("Switching to subtitle track "+a),this.trackId=a,p){var v=p.id,x=p.groupId,T=x===void 0?"":x,b=p.name,d=p.type,g=p.url;this.hls.trigger(U.Events.SUBTITLE_TRACK_SWITCH,{id:v,groupId:T,name:b,type:d,url:g});var c=this.switchParams(p.url,n==null?void 0:n.details);this.loadPlaylist(c)}else this.hls.trigger(U.Events.SUBTITLE_TRACK_SWITCH,{id:a})},u.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var a=-1,n=l(this.media.textTracks),t=0;t<n.length;t++)if(n[t].mode==="hidden")a=t;else if(n[t].mode==="showing"){a=t;break}this.subtitleTrack!==a&&(this.subtitleTrack=a)},e(s,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(a){this.selectDefaultTrack=!1;var n=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(a,n)}}]),s}(I.default);function l(i){for(var s=[],u=0;u<i.length;u++){var o=i[u];o.kind==="subtitles"&&o.label&&s.push(i[u])}return s}P.default=h},"./src/controller/timeline-controller.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"TimelineController",function(){return l});var U=R("./src/polyfills/number.ts"),A=R("./src/events.ts"),I=R("./src/utils/cea-608-parser.ts"),W=R("./src/utils/output-filter.ts"),j=R("./src/utils/webvtt-parser.ts"),e=R("./src/utils/texttrack-utils.ts"),C=R("./src/utils/imsc1-ttml-parser.ts"),f=R("./src/types/loader.ts"),h=R("./src/utils/logger.ts"),l=function(){function o(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=u(),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 W.default(this,"textTrack1"),_=new W.default(this,"textTrack2"),p=new W.default(this,"textTrack3"),v=new W.default(this,"textTrack4");this.cea608Parser1=new I.default(1,t,_),this.cea608Parser2=new I.default(3,p,v)}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 a=o.prototype;return a.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},a.addCues=function(t,_,p,v,x){for(var T=!1,b=x.length;b--;){var d=x[b],g=s(d[0],d[1],_,p);if(g>=0&&(d[0]=Math.min(d[0],_),d[1]=Math.max(d[1],p),T=!0,g/(p-_)>.5))return}if(T||x.push([_,p]),this.config.renderTextTracksNatively){var c=this.captionsTracks[t];this.Cues.newCue(c,_,p,v)}else{var y=this.Cues.newCue(null,_,p,v);this.hls.trigger(A.Events.CUES_PARSED,{type:"captions",cues:y,track:t})}},a.onInitPtsFound=function(t,_){var p=this,v=_.frag,x=_.id,T=_.initPTS,b=_.timescale,d=this.unparsedVttFrags;x==="main"&&(this.initPTS[v.cc]=T,this.timescale[v.cc]=b),d.length&&(this.unparsedVttFrags=[],d.forEach(function(g){p.onFragLoaded(A.Events.FRAG_LOADED,g)}))},a.getExistingTrack=function(t){var _=this.media;if(_)for(var p=0;p<_.textTracks.length;p++){var v=_.textTracks[p];if(v[t])return v}return null},a.createCaptionsTrack=function(t){this.config.renderTextTracksNatively?this.createNativeTrack(t):this.createNonNativeTrack(t)},a.createNativeTrack=function(t){if(this.captionsTracks[t])return;var _=this.captionsProperties,p=this.captionsTracks,v=this.media,x=_[t],T=x.label,b=x.languageCode,d=this.getExistingTrack(t);if(d)p[t]=d,Object(e.clearCurrentCues)(p[t]),Object(e.sendAddTrackEvent)(p[t],v);else{var g=this.createTextTrack("captions",T,b);g&&(g[t]=!0,p[t]=g)}},a.createNonNativeTrack=function(t){if(this.nonNativeCaptionsTracks[t])return;var _=this.captionsProperties[t];if(!_)return;var p=_.label,v={_id:t,label:p,kind:"captions",default:_.media?!!_.media.default:!1,closedCaptions:_.media};this.nonNativeCaptionsTracks[t]=v,this.hls.trigger(A.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[v]})},a.createTextTrack=function(t,_,p){var v=this.media;return v?v.addTextTrack(t,_,p):void 0},a.onMediaAttaching=function(t,_){this.media=_.media,this._cleanTracks()},a.onMediaDetaching=function(){var t=this.captionsTracks;Object.keys(t).forEach(function(_){Object(e.clearCurrentCues)(t[_]),delete t[_]}),this.nonNativeCaptionsTracks={}},a.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=u(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},a._cleanTracks=function(){var t=this.media;if(!t)return;var _=t.textTracks;if(_)for(var p=0;p<_.length;p++)Object(e.clearCurrentCues)(_[p])},a.onSubtitleTracksUpdated=function(t,_){var p=this;this.textTracks=[];var v=_.subtitleTracks||[],x=v.some(function(g){return g.textCodec===C.IMSC1_CODEC});if(this.config.enableWebVTT||x&&this.config.enableIMSC1){var T=this.tracks&&v&&this.tracks.length===v.length;if(this.tracks=v||[],this.config.renderTextTracksNatively){var b=this.media?this.media.textTracks:[];this.tracks.forEach(function(g,c){var y;if(c<b.length){for(var r=null,w=0;w<b.length;w++)if(i(b[w],g)){r=b[w];break}r&&(y=r)}y?Object(e.clearCurrentCues)(y):(y=p.createTextTrack("subtitles",g.name,g.lang),y&&(y.mode="disabled")),y&&(y.groupId=g.groupId,p.textTracks.push(y))})}else if(!T&&this.tracks&&this.tracks.length){var d=this.tracks.map(function(g){return{label:g.name,kind:g.type.toLowerCase(),default:g.default,subtitleTrack:g}});this.hls.trigger(A.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:d})}}},a.onManifestLoaded=function(t,_){var p=this;this.config.enableCEA708Captions&&_.captions&&_.captions.forEach(function(v){var x=/(?:CC|SERVICE)([1-4])/.exec(v.instreamId);if(!x)return;var T="textTrack"+x[1],b=p.captionsProperties[T];if(!b)return;b.label=v.name,v.lang&&(b.languageCode=v.lang),b.media=v})},a.onFragLoading=function(t,_){var p=this.cea608Parser1,v=this.cea608Parser2,x=this.lastSn,T=this.lastPartIndex;if(!this.enabled||!(p&&v))return;if(_.frag.type===f.PlaylistLevelType.MAIN){var b,d,g=_.frag.sn,c=(b=_==null||((d=_.part)===null||d===void 0)?void 0:d.index)!=null?b:-1;g===x+1||g===x&&c===T+1||(p.reset(),v.reset()),this.lastSn=g,this.lastPartIndex=c}},a.onFragLoaded=function(t,_){var p=_.frag,v=_.payload,x=this.initPTS,T=this.unparsedVttFrags;if(p.type===f.PlaylistLevelType.SUBTITLE)if(v.byteLength){if(!Object(U.isFiniteNumber)(x[p.cc])){T.push(_),x.length&&this.hls.trigger(A.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:p,error:new Error("Missing initial subtitle PTS")});return}var b=p.decryptdata;if(b==null||b.key==null||b.method!=="AES-128"){var d=this.tracks[p.level],g=this.vttCCs;g[p.cc]||(g[p.cc]={start:p.start,prevCC:this.prevCC,new:!0},this.prevCC=p.cc),d&&d.textCodec===C.IMSC1_CODEC?this._parseIMSC1(p,v):this._parseVTTs(p,v,g)}}else this.hls.trigger(A.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:p,error:new Error("Empty subtitle payload")})},a._parseIMSC1=function(t,_){var p=this,v=this.hls;Object(C.parseIMSC1)(_,this.initPTS[t.cc],this.timescale[t.cc],function(x){p._appendCues(x,t.level),v.trigger(A.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(x){h.logger.log("Failed to parse IMSC1: "+x),v.trigger(A.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:x})})},a._parseVTTs=function(t,_,p){var v=this,x=this.hls;Object(j.parseWebVTT)(_,this.initPTS[t.cc],this.timescale[t.cc],p,t.cc,t.start,function(T){v._appendCues(T,t.level),x.trigger(A.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(T){v._fallbackToIMSC1(t,_),h.logger.log("Failed to parse VTT cue: "+T),x.trigger(A.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:T})})},a._fallbackToIMSC1=function(t,_){var p=this,v=this.tracks[t.level];v.textCodec||Object(C.parseIMSC1)(_,this.initPTS[t.cc],this.timescale[t.cc],function(){v.textCodec=C.IMSC1_CODEC,p._parseIMSC1(t,_)},function(){v.textCodec="wvtt"})},a._appendCues=function(t,_){var p=this.hls;if(this.config.renderTextTracksNatively){var v=this.textTracks[_];if(v.mode==="disabled")return;t.forEach(function(b){return Object(e.addCueToTrack)(v,b)})}else{var x=this.tracks[_],T=x.default?"default":"subtitles"+_;p.trigger(A.Events.CUES_PARSED,{type:"subtitles",cues:t,track:T})}},a.onFragDecrypted=function(t,_){var p=_.frag;if(p.type===f.PlaylistLevelType.SUBTITLE){if(!Object(U.isFiniteNumber)(this.initPTS[p.cc])){this.unparsedVttFrags.push(_);return}this.onFragLoaded(A.Events.FRAG_LOADED,_)}},a.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},a.onFragParsingUserdata=function(t,_){var p=this.cea608Parser1,v=this.cea608Parser2;if(!this.enabled||!(p&&v))return;for(var x=0;x<_.samples.length;x++){var T=_.samples[x].bytes;if(T){var b=this.extractCea608Data(T);p.addData(_.samples[x].pts,b[0]),v.addData(_.samples[x].pts,b[1])}}},a.onBufferFlushing=function(t,_){var p=_.startOffset,v=_.endOffset,x=_.endOffsetSubtitles,T=_.type,b=this.media;if(!b||b.currentTime<v)return;if(!T||T==="video"){var d=this.captionsTracks;Object.keys(d).forEach(function(c){return Object(e.removeCuesInRange)(d[c],p,v)})}if(this.config.renderTextTracksNatively&&(p===0&&x!==void 0)){var g=this.textTracks;Object.keys(g).forEach(function(c){return Object(e.removeCuesInRange)(g[c],p,x)})}},a.extractCea608Data=function(t){for(var _=t[0]&31,p=2,v=[[],[]],x=0;x<_;x++){var T=t[p++],b=127&t[p++],d=127&t[p++],g=(4&T)!==0,c=3&T;if(b===0&&d===0)continue;g&&((c===0||c===1)&&(v[c].push(b),v[c].push(d)))}return v},o}();function i(o,a){return o&&o.label===a.name&&!(o.textTrack1||o.textTrack2)}function s(o,a,n,t){return Math.min(a,t)-Math.max(o,n)}function u(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"default",function(){return U});var U=function(){function A(W,j){this.subtle=void 0,this.aesIV=void 0,this.subtle=W,this.aesIV=j}var I=A.prototype;return I.decrypt=function(j,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,j)},A}()},"./src/crypt/aes-decryptor.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"removePadding",function(){return A}),R.d(P,"default",function(){return I});var U=R("./src/utils/typed-array.ts");function A(W){var j=W.byteLength,e=j&&new DataView(W.buffer).getUint8(j-1);return e?Object(U.sliceUint8)(W,0,j-e):W}var I=function(){function W(){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 j=W.prototype;return j.uint8ArrayToUint32Array_=function(C){for(var f=new DataView(C),h=new Uint32Array(4),l=0;l<4;l++)h[l]=f.getUint32(l*4);return h},j.initTable=function(){var C=this.sBox,f=this.invSBox,h=this.subMix,l=h[0],i=h[1],s=h[2],u=h[3],o=this.invSubMix,a=o[0],n=o[1],t=o[2],_=o[3],p=new Uint32Array(256),v=0,x=0,T=0;for(T=0;T<256;T++)T<128?p[T]=T<<1:p[T]=T<<1^283;for(T=0;T<256;T++){var b=x^x<<1^x<<2^x<<3^x<<4;b=b>>>8^b&255^99,C[v]=b,f[b]=v;var d=p[v],g=p[d],c=p[g],y=p[b]*257^b*16843008;l[v]=y<<24|y>>>8,i[v]=y<<16|y>>>16,s[v]=y<<8|y>>>24,u[v]=y,y=c*16843009^g*65537^d*257^v*16843008,a[b]=y<<24|y>>>8,n[b]=y<<16|y>>>16,t[b]=y<<8|y>>>24,_[b]=y,v?(v=d^p[p[p[c^d]]],x^=p[p[x]]):v=x=1}},j.expandKey=function(C){for(var f=this.uint8ArrayToUint32Array_(C),h=!0,l=0;l<f.length&&h;)h=f[l]===this.key[l],l++;if(h)return;this.key=f;var i=this.keySize=f.length;if(i!==4&&i!==6&&i!==8)throw new Error("Invalid aes key size="+i);var s=this.ksRows=(i+6+1)*4,u,o,a=this.keySchedule=new Uint32Array(s),n=this.invKeySchedule=new Uint32Array(s),t=this.sBox,_=this.rcon,p=this.invSubMix,v=p[0],x=p[1],T=p[2],b=p[3],d,g;for(u=0;u<s;u++){if(u<i){d=a[u]=f[u];continue}g=d,u%i===0?(g=g<<8|g>>>24,g=t[g>>>24]<<24|t[g>>>16&255]<<16|t[g>>>8&255]<<8|t[g&255],g^=_[u/i|0]<<24):i>6&&u%i===4&&(g=t[g>>>24]<<24|t[g>>>16&255]<<16|t[g>>>8&255]<<8|t[g&255]),a[u]=d=(a[u-i]^g)>>>0}for(o=0;o<s;o++)u=s-o,o&3?g=a[u]:g=a[u-4],o<4||u<=4?n[o]=g:n[o]=v[t[g>>>24]]^x[t[g>>>16&255]]^T[t[g>>>8&255]]^b[t[g&255]],n[o]=n[o]>>>0},j.networkToHostOrderSwap=function(C){return C<<24|(C&65280)<<8|(C&16711680)>>8|C>>>24},j.decrypt=function(C,f,h){for(var l=this.keySize+6,i=this.invKeySchedule,s=this.invSBox,u=this.invSubMix,o=u[0],a=u[1],n=u[2],t=u[3],_=this.uint8ArrayToUint32Array_(h),p=_[0],v=_[1],x=_[2],T=_[3],b=new Int32Array(C),d=new Int32Array(b.length),g,c,y,r,w,D,L,S,M,H,O,K,Y,ie,re=this.networkToHostOrderSwap;f<b.length;){for(M=re(b[f]),H=re(b[f+1]),O=re(b[f+2]),K=re(b[f+3]),w=M^i[0],D=K^i[1],L=O^i[2],S=H^i[3],Y=4,ie=1;ie<l;ie++)g=o[w>>>24]^a[D>>16&255]^n[L>>8&255]^t[S&255]^i[Y],c=o[D>>>24]^a[L>>16&255]^n[S>>8&255]^t[w&255]^i[Y+1],y=o[L>>>24]^a[S>>16&255]^n[w>>8&255]^t[D&255]^i[Y+2],r=o[S>>>24]^a[w>>16&255]^n[D>>8&255]^t[L&255]^i[Y+3],w=g,D=c,L=y,S=r,Y=Y+4;g=s[w>>>24]<<24^s[D>>16&255]<<16^s[L>>8&255]<<8^s[S&255]^i[Y],c=s[D>>>24]<<24^s[L>>16&255]<<16^s[S>>8&255]<<8^s[w&255]^i[Y+1],y=s[L>>>24]<<24^s[S>>16&255]<<16^s[w>>8&255]<<8^s[D&255]^i[Y+2],r=s[S>>>24]<<24^s[w>>16&255]<<16^s[D>>8&255]<<8^s[L&255]^i[Y+3],d[f]=re(g^p),d[f+1]=re(r^v),d[f+2]=re(y^x),d[f+3]=re(c^T),p=M,v=H,x=O,T=K,f=f+4}return d.buffer},W}()},"./src/crypt/decrypter.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"default",function(){return f});var U=R("./src/crypt/aes-crypto.ts"),A=R("./src/crypt/fast-aes-key.ts"),I=R("./src/crypt/aes-decryptor.ts"),W=R("./src/utils/logger.ts"),j=R("./src/utils/mp4-tools.ts"),e=R("./src/utils/typed-array.ts"),C=16,f=function(){function h(i,s,u){var o=u===void 0?{}:u,a=o.removePKCS7Padding,n=a===void 0?!0:a;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=i,this.config=s,this.removePKCS7Padding=n,n)try{var t=self.crypto;t&&(this.subtle=t.subtle||t.webkitSubtle)}catch(_){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var l=h.prototype;return l.destroy=function(){this.observer=null},l.isSync=function(){return this.config.enableSoftwareAES},l.flush=function(){var s=this.currentResult;if(!s){this.reset();return}var u=new Uint8Array(s);return this.reset(),this.removePKCS7Padding?Object(I.removePadding)(u):u},l.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},l.decrypt=function(s,u,o,a){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(s),u,o);var n=this.flush();n&&a(n.buffer)}else this.webCryptoDecrypt(new Uint8Array(s),u,o).then(a)},l.softwareDecrypt=function(s,u,o){var a=this.currentIV,n=this.currentResult,t=this.remainderData;this.logOnce("JS AES decrypt"),t&&(s=Object(j.appendUint8Array)(t,s),this.remainderData=null);var _=this.getValidChunk(s);if(!_.length)return null;a&&(o=a);var p=this.softwareDecrypter;p||(p=this.softwareDecrypter=new I.default),p.expandKey(u);var v=n;return this.currentResult=p.decrypt(_.buffer,0,o),this.currentIV=Object(e.sliceUint8)(_,-16).buffer,v||null},l.webCryptoDecrypt=function(s,u,o){var a=this,n=this.subtle;return(this.key!==u||!this.fastAesKey)&&(this.key=u,this.fastAesKey=new A.default(n,u)),this.fastAesKey.expandKey().then(function(t){if(!n)return Promise.reject(new Error("web crypto not initialized"));var _=new U.default(n,o);return _.decrypt(s.buffer,t)}).catch(function(t){return a.onWebCryptoError(t,s,u,o)})},l.onWebCryptoError=function(s,u,o,a){return W.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",s),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(u,o,a)},l.getValidChunk=function(s){var u=s,o=s.length-s.length%C;return o!==s.length&&(u=Object(e.sliceUint8)(s,0,o),this.remainderData=Object(e.sliceUint8)(s,o)),u},l.logOnce=function(s){if(!this.logEnabled)return;W.logger.log("[decrypter.ts]: "+s),this.logEnabled=!1},h}()},"./src/crypt/fast-aes-key.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"default",function(){return U});var U=function(){function A(W,j){this.subtle=void 0,this.key=void 0,this.subtle=W,this.key=j}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(ee,P,R){"use strict";R.r(P);var U=R("./src/demux/base-audio-demuxer.ts"),A=R("./src/demux/adts.ts"),I=R("./src/utils/logger.ts"),W=R("./src/demux/id3.ts");function j(f,h){f.prototype=Object.create(h.prototype),f.prototype.constructor=f,e(f,h)}function e(f,h){return e=Object.setPrototypeOf||function(i,s){return i.__proto__=s,i},e(f,h)}var C=function(f){j(h,f);function h(i,s){var u;return u=f.call(this)||this,u.observer=void 0,u.config=void 0,u.observer=i,u.config=s,u}var l=h.prototype;return l.resetInitSegment=function(s,u,o){f.prototype.resetInitSegment.call(this,s,u,o),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:s,duration:o,inputTimeScale:9e4,dropped:0}},h.probe=function(s){if(!s)return!1;for(var u=W.getID3Data(s,0)||[],o=u.length,a=s.length;o<a;o++)if(A.probe(s,o))return I.logger.log("ADTS sync word found !"),!0;return!1},l.canParse=function(s,u){return A.canParse(s,u)},l.appendFrame=function(s,u,o){A.initTrackConfig(s,this.observer,u,o,s.manifestCodec);var a=A.appendFrame(s,u,o,this.initPTS,this.frameIndex);if(a&&a.missing===0)return a},h}(U.default);C.minProbeByteLength=9,P.default=C},"./src/demux/adts.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"getAudioConfig",function(){return W}),R.d(P,"isHeaderPattern",function(){return j}),R.d(P,"getHeaderLength",function(){return e}),R.d(P,"getFullFrameLength",function(){return C}),R.d(P,"canGetFrameLength",function(){return f}),R.d(P,"isHeader",function(){return h}),R.d(P,"canParse",function(){return l}),R.d(P,"probe",function(){return i}),R.d(P,"initTrackConfig",function(){return s}),R.d(P,"getFrameDuration",function(){return u}),R.d(P,"parseFrameHeader",function(){return o}),R.d(P,"appendFrame",function(){return a});var U=R("./src/utils/logger.ts"),A=R("./src/errors.ts"),I=R("./src/events.ts");function W(n,t,_,p){var v,x,T,b,d=navigator.userAgent.toLowerCase(),g=p,c=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];v=((t[_+2]&192)>>>6)+1;var y=(t[_+2]&60)>>>2;if(y>c.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:"+y});return}return T=(t[_+2]&1)<<2,T|=(t[_+3]&192)>>>6,U.logger.log("manifest codec:"+p+", ADTS type:"+v+", samplingIndex:"+y),/firefox/i.test(d)?y>=6?(v=5,b=new Array(4),x=y-3):(v=2,b=new Array(2),x=y):d.indexOf("android")!==-1?(v=2,b=new Array(2),x=y):(v=5,b=new Array(4),p&&(p.indexOf("mp4a.40.29")!==-1||p.indexOf("mp4a.40.5")!==-1)||!p&&y>=6?x=y-3:((p&&p.indexOf("mp4a.40.2")!==-1&&(y>=6&&T===1||/vivaldi/i.test(d))||!p&&T===1)&&(v=2,b=new Array(2)),x=y)),b[0]=v<<3,b[0]|=(y&14)>>1,b[1]|=(y&1)<<7,b[1]|=T<<3,v===5&&(b[1]|=(x&14)>>1,b[2]=(x&1)<<7,b[2]|=2<<2,b[3]=0),{config:b,samplerate:c[y],channelCount:T,codec:"mp4a.40."+v,manifestCodec:g}}function j(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 f(n,t){return t+5<n.length}function h(n,t){return t+1<n.length&&j(n,t)}function l(n,t){return f(n,t)&&j(n,t)&&C(n,t)<=n.length-t}function i(n,t){if(h(n,t)){var _=e(n,t);if(t+_>=n.length)return!1;var p=C(n,t);if(p<=_)return!1;var v=t+p;return v===n.length||h(n,v)}return!1}function s(n,t,_,p,v){if(!n.samplerate){var x=W(t,_,p,v);if(!x)return;n.config=x.config,n.samplerate=x.samplerate,n.channelCount=x.channelCount,n.codec=x.codec,n.manifestCodec=x.manifestCodec,U.logger.log("parsed codec:"+n.codec+", rate:"+x.samplerate+", channels:"+x.channelCount)}}function u(n){return 1024*9e4/n}function o(n,t,_,p,v){var x=e(n,t),T=C(n,t);if(T-=x,T>0){var b=_+p*v;return{headerLength:x,frameLength:T,stamp:b}}}function a(n,t,_,p,v){var x=u(n.samplerate),T=o(t,_,p,v,x);if(T){var b=T.frameLength,d=T.headerLength,g=T.stamp,c=d+b,y=Math.max(0,_+c-t.length),r;y?(r=new Uint8Array(c-d),r.set(t.subarray(_+d,t.length),0)):r=t.subarray(_+d,_+c);var w={unit:r,pts:g};return y||n.samples.push(w),{sample:w,length:c,missing:y}}}},"./src/demux/base-audio-demuxer.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"initPTSFn",function(){return C});var U=R("./src/polyfills/number.ts"),A=R("./src/demux/id3.ts"),I=R("./src/demux/dummy-demuxed-track.ts"),W=R("./src/utils/mp4-tools.ts"),j=R("./src/utils/typed-array.ts"),e=function(){function f(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var h=f.prototype;return h.resetInitSegment=function(i,s,u){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},h.resetTimeStamp=function(){},h.resetContiguity=function(){},h.canParse=function(i,s){return!1},h.appendFrame=function(i,s,u){},h.demux=function(i,s){this.cachedData&&(i=Object(W.appendUint8Array)(this.cachedData,i),this.cachedData=null);var u=A.getID3Data(i,0),o=u?u.length:0,a,n,t=this._audioTrack,_=this._id3Track,p=u?A.getTimeStamp(u):void 0,v=i.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=C(p,s)),u&&u.length>0&&_.samples.push({pts:this.initPTS,dts:this.initPTS,data:u}),n=this.initPTS;o<v;){if(this.canParse(i,o)){var x=this.appendFrame(t,i,o);x?(this.frameIndex++,n=x.sample.pts,o+=x.length,a=o):o=v}else A.canParse(i,o)?(u=A.getID3Data(i,o),_.samples.push({pts:n,dts:n,data:u}),o+=u.length,a=o):o++;if(o===v&&a!==v){var T=Object(j.sliceUint8)(i,a);this.cachedData?this.cachedData=Object(W.appendUint8Array)(this.cachedData,T):this.cachedData=T}}return{audioTrack:t,avcTrack:Object(I.dummyTrack)(),id3Track:_,textTrack:Object(I.dummyTrack)()}},h.demuxSampleAes=function(i,s,u){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},h.flush=function(i){var s=this.cachedData;return s&&(this.cachedData=null,this.demux(s,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(I.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(I.dummyTrack)()}},h.destroy=function(){},f}(),C=function(h,l){return Object(U.isFiniteNumber)(h)?h*90:l*9e4};P.default=e},"./src/demux/chunk-cache.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"default",function(){return U});var U=function(){function I(){this.chunks=[],this.dataLength=0}var W=I.prototype;return W.push=function(e){this.chunks.push(e),this.dataLength+=e.length},W.flush=function(){var e=this.chunks,C=this.dataLength,f;if(e.length)e.length===1?f=e[0]:f=A(e,C);else return new Uint8Array(0);return this.reset(),f},W.reset=function(){this.chunks.length=0,this.dataLength=0},I}();function A(I,W){for(var j=new Uint8Array(W),e=0,C=0;C<I.length;C++){var f=I[C];j.set(f,e),e+=f.length}return j}},"./src/demux/dummy-demuxed-track.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"dummyTrack",function(){return U});function U(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(ee,P,R){"use strict";R.r(P);var U=R("./src/utils/logger.ts"),A=function(){function I(j){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=j,this.bytesAvailable=j.byteLength,this.word=0,this.bitsAvailable=0}var W=I.prototype;return W.loadWord=function(){var e=this.data,C=this.bytesAvailable,f=e.byteLength-C,h=new Uint8Array(4),l=Math.min(4,C);if(l===0)throw new Error("no bytes available");h.set(e.subarray(f,f+l)),this.word=new DataView(h.buffer).getUint32(0),this.bitsAvailable=l*8,this.bytesAvailable-=l},W.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)},W.readBits=function(e){var C=Math.min(this.bitsAvailable,e),f=this.word>>>32-C;return e>32&&U.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?f<<C|this.readBits(C):f},W.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()},W.skipUEG=function(){this.skipBits(1+this.skipLZ())},W.skipEG=function(){this.skipBits(1+this.skipLZ())},W.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},W.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},W.readBoolean=function(){return this.readBits(1)===1},W.readUByte=function(){return this.readBits(8)},W.readUShort=function(){return this.readBits(16)},W.readUInt=function(){return this.readBits(32)},W.skipScalingList=function(e){for(var C=8,f=8,h,l=0;l<e;l++)f!==0&&(h=this.readEG(),f=(C+h+256)%256),C=f===0?C:f},W.readSPS=function(){var e=0,C=0,f=0,h=0,l,i,s,u=this.readUByte.bind(this),o=this.readBits.bind(this),a=this.readUEG.bind(this),n=this.readBoolean.bind(this),t=this.skipBits.bind(this),_=this.skipEG.bind(this),p=this.skipUEG.bind(this),v=this.skipScalingList.bind(this);u();var x=u();if(o(5),t(3),u(),p(),x===100||x===110||x===122||x===244||x===44||x===83||x===86||x===118||x===128){var T=a();if(T===3&&t(1),p(),p(),t(1),n())for(i=T!==3?8:12,s=0;s<i;s++)n()&&(s<6?v(16):v(64))}p();var b=a();if(b===0)a();else if(b===1)for(t(1),_(),_(),l=a(),s=0;s<l;s++)_();p(),t(1);var d=a(),g=a(),c=o(1);c===0&&t(1),t(1),n()&&(e=a(),C=a(),f=a(),h=a());var y=[1,1];if(n()&&n()){var r=u();switch(r){case 1:y=[1,1];break;case 2:y=[12,11];break;case 3:y=[10,11];break;case 4:y=[16,11];break;case 5:y=[40,33];break;case 6:y=[24,11];break;case 7:y=[20,11];break;case 8:y=[32,11];break;case 9:y=[80,33];break;case 10:y=[18,11];break;case 11:y=[15,11];break;case 12:y=[64,33];break;case 13:y=[160,99];break;case 14:y=[4,3];break;case 15:y=[3,2];break;case 16:y=[2,1];break;case 255:{y=[u()<<8|u(),u()<<8|u()];break}}}return{width:Math.ceil((d+1)*16-e*2-C*2),height:(2-c)*(g+1)*16-(c?2:4)*(f+h),pixelRatio:y}},W.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},I}();P.default=A},"./src/demux/id3.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"isHeader",function(){return U}),R.d(P,"isFooter",function(){return A}),R.d(P,"getID3Data",function(){return I}),R.d(P,"canParse",function(){return j}),R.d(P,"getTimeStamp",function(){return e}),R.d(P,"isTimeStampFrame",function(){return C}),R.d(P,"getID3Frames",function(){return h}),R.d(P,"decodeFrame",function(){return l}),R.d(P,"utf8ArrayToStr",function(){return a}),R.d(P,"testables",function(){return n});var U=function(v,x){return x+10<=v.length&&(v[x]===73&&v[x+1]===68&&v[x+2]===51&&(v[x+3]<255&&v[x+4]<255&&(v[x+6]<128&&v[x+7]<128&&v[x+8]<128&&v[x+9]<128)))},A=function(v,x){return x+10<=v.length&&(v[x]===51&&v[x+1]===68&&v[x+2]===73&&(v[x+3]<255&&v[x+4]<255&&(v[x+6]<128&&v[x+7]<128&&v[x+8]<128&&v[x+9]<128)))},I=function(v,x){for(var T=x,b=0;U(v,x);){b+=10;var d=W(v,x+6);b+=d,A(v,x+10)&&(b+=10),x+=b}return b>0?v.subarray(T,T+b):void 0},W=function(v,x){var T=0;return T=(v[x]&127)<<21,T|=(v[x+1]&127)<<14,T|=(v[x+2]&127)<<7,T|=v[x+3]&127,T},j=function(v,x){return U(v,x)&&W(v,x+6)+10<=v.length-x},e=function(v){for(var x=h(v),T=0;T<x.length;T++){var b=x[T];if(C(b))return o(b)}return},C=function(v){return v&&v.key==="PRIV"&&v.info==="com.apple.streaming.transportStreamTimestamp"},f=function(v){var x=String.fromCharCode(v[0],v[1],v[2],v[3]),T=W(v,4),b=10;return{type:x,size:T,data:v.subarray(b,b+T)}},h=function(v){for(var x=0,T=[];U(v,x);){var b=W(v,x+6);x+=10;for(var d=x+b;x+8<d;){var g=f(v.subarray(x)),c=l(g);c&&T.push(c),x+=g.size+10}A(v,x)&&(x+=10)}return T},l=function(v){return v.type==="PRIV"?i(v):v.type[0]==="W"?u(v):s(v)},i=function(v){if(v.size<2)return;var x=a(v.data,!0),T=new Uint8Array(v.data.subarray(x.length+1));return{key:v.type,info:x,data:T.buffer}},s=function(v){if(v.size<2)return;if(v.type==="TXXX"){var x=1,T=a(v.data.subarray(x),!0);x+=T.length+1;var b=a(v.data.subarray(x));return{key:v.type,info:T,data:b}}var d=a(v.data.subarray(1));return{key:v.type,data:d}},u=function(v){if(v.type==="WXXX"){if(v.size<2)return;var x=1,T=a(v.data.subarray(x),!0);x+=T.length+1;var b=a(v.data.subarray(x));return{key:v.type,info:T,data:b}}var d=a(v.data);return{key:v.type,data:d}},o=function(v){if(v.data.byteLength===8){var x=new Uint8Array(v.data),T=x[3]&1,b=(x[4]<<23)+(x[5]<<15)+(x[6]<<7)+x[7];return b/=45,T&&(b+=4772185884e-2),Math.round(b)}return},a=function(v,x){x===void 0&&(x=!1);var T=_();if(T){var b=T.decode(v);if(x){var d=b.indexOf("\0");return d!==-1?b.substring(0,d):b}return b.replace(/\0/g,"")}for(var g=v.length,c,y,r,w="",D=0;D<g;){if(c=v[D++],c===0&&x)return w;if(c===0||c===3)continue;switch(c>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:w+=String.fromCharCode(c);break;case 12:case 13:y=v[D++],w+=String.fromCharCode((c&31)<<6|y&63);break;case 14:y=v[D++],r=v[D++],w+=String.fromCharCode((c&15)<<12|(y&63)<<6|(r&63)<<0);break;default:}}return w},n={decodeTextFrame:s},t;function _(){return!t&&typeof self.TextDecoder!="undefined"&&(t=new self.TextDecoder("utf-8")),t}},"./src/demux/mp3demuxer.ts":function(ee,P,R){"use strict";R.r(P);var U=R("./src/demux/base-audio-demuxer.ts"),A=R("./src/demux/id3.ts"),I=R("./src/utils/logger.ts"),W=R("./src/demux/mpegaudio.ts");function j(f,h){f.prototype=Object.create(h.prototype),f.prototype.constructor=f,e(f,h)}function e(f,h){return e=Object.setPrototypeOf||function(i,s){return i.__proto__=s,i},e(f,h)}var C=function(f){j(h,f);function h(){return f.apply(this,arguments)||this}var l=h.prototype;return l.resetInitSegment=function(s,u,o){f.prototype.resetInitSegment.call(this,s,u,o),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:s,duration:o,inputTimeScale:9e4,dropped:0}},h.probe=function(s){if(!s)return!1;for(var u=A.getID3Data(s,0)||[],o=u.length,a=s.length;o<a;o++)if(W.probe(s,o))return I.logger.log("MPEG Audio sync word found !"),!0;return!1},l.canParse=function(s,u){return W.canParse(s,u)},l.appendFrame=function(s,u,o){return this.initPTS===null?void 0:W.appendFrame(s,u,o,this.initPTS,this.frameIndex)},h}(U.default);C.minProbeByteLength=4,P.default=C},"./src/demux/mp4demuxer.ts":function(ee,P,R){"use strict";R.r(P);var U=R("./src/utils/mp4-tools.ts"),A=R("./src/demux/dummy-demuxed-track.ts"),I=function(){function W(e,C){this.remainderData=null,this.config=void 0,this.config=C}var j=W.prototype;return j.resetTimeStamp=function(){},j.resetInitSegment=function(){},j.resetContiguity=function(){},W.probe=function(C){return Object(U.findBox)({data:C,start:0,end:Math.min(C.length,16384)},["moof"]).length>0},j.demux=function(C){var f=C,h=Object(A.dummyTrack)();if(this.config.progressive){this.remainderData&&(f=Object(U.appendUint8Array)(this.remainderData,C));var l=Object(U.segmentValidRange)(f);this.remainderData=l.remainder,h.samples=l.valid||new Uint8Array}else h.samples=f;return{audioTrack:Object(A.dummyTrack)(),avcTrack:h,id3Track:Object(A.dummyTrack)(),textTrack:Object(A.dummyTrack)()}},j.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)()}},j.demuxSampleAes=function(C,f,h){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},j.destroy=function(){},W}();I.minProbeByteLength=1024,P.default=I},"./src/demux/mpegaudio.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"appendFrame",function(){return e}),R.d(P,"parseHeader",function(){return C}),R.d(P,"isHeaderPattern",function(){return f}),R.d(P,"isHeader",function(){return h}),R.d(P,"canParse",function(){return l}),R.d(P,"probe",function(){return i});var U=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],W=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],j=[0,1,1,4];function e(s,u,o,a,n){if(o+24>u.length)return;var t=C(u,o);if(t&&o+t.frameLength<=u.length){var _=t.samplesPerFrame*9e4/t.sampleRate,p=a+n*_,v={unit:u.subarray(o,o+t.frameLength),pts:p,dts:p};return s.config=[],s.channelCount=t.channelCount,s.samplerate=t.sampleRate,s.samples.push(v),{sample:v,length:t.frameLength,missing:0}}}function C(s,u){var o=s[u+1]>>3&3,a=s[u+1]>>1&3,n=s[u+2]>>4&15,t=s[u+2]>>2&3;if(o!==1&&n!==0&&n!==15&&t!==3){var _=s[u+2]>>1&1,p=s[u+3]>>6,v=o===3?3-a:a===3?3:4,x=A[v*14+n-1]*1e3,T=o===3?0:o===2?1:2,b=I[T*3+t],d=p===3?1:2,g=W[o][a],c=j[a],y=g*8*c,r=Math.floor(g*x/b+_)*c;if(U===null){var w=navigator.userAgent||"",D=w.match(/Chrome\/(\d+)/i);U=D?parseInt(D[1]):0}var L=!!U&&U<=87;return L&&a===2&&x>=224e3&&p===0&&(s[u+3]=s[u+3]|128),{sampleRate:b,channelCount:d,frameLength:r,samplesPerFrame:y}}}function f(s,u){return s[u]===255&&(s[u+1]&224)===224&&(s[u+1]&6)!==0}function h(s,u){return u+1<s.length&&f(s,u)}function l(s,u){var o=4;return f(s,u)&&o<=s.length-u}function i(s,u){if(u+1<s.length&&f(s,u)){var o=4,a=C(s,u),n=o;a!=null&&a.frameLength&&(n=a.frameLength);var t=u+n;return t===s.length||h(s,t)}return!1}},"./src/demux/sample-aes.ts":function(ee,P,R){"use strict";R.r(P);var U=R("./src/crypt/decrypter.ts"),A=R("./src/demux/tsdemuxer.ts"),I=function(){function W(e,C,f){this.keyData=void 0,this.decrypter=void 0,this.keyData=f,this.decrypter=new U.default(e,C,{removePKCS7Padding:!1})}var j=W.prototype;return j.decryptBuffer=function(C,f){this.decrypter.decrypt(C,this.keyData.key.buffer,this.keyData.iv.buffer,f)},j.decryptAacSample=function(C,f,h,l){var i=C[f].unit,s=i.subarray(16,i.length-i.length%16),u=s.buffer.slice(s.byteOffset,s.byteOffset+s.length),o=this;this.decryptBuffer(u,function(a){var n=new Uint8Array(a);i.set(n,16),l||o.decryptAacSamples(C,f+1,h)})},j.decryptAacSamples=function(C,f,h){for(;;f++){if(f>=C.length){h();return}if(C[f].unit.length<32)continue;var l=this.decrypter.isSync();if(this.decryptAacSample(C,f,h,l),!l)return}},j.getAvcEncryptedData=function(C){for(var f=Math.floor((C.length-48)/160)*16+16,h=new Int8Array(f),l=0,i=32;i<=C.length-16;i+=160,l+=16)h.set(C.subarray(i,i+16),l);return h},j.getAvcDecryptedUnit=function(C,f){for(var h=new Uint8Array(f),l=0,i=32;i<=C.length-16;i+=160,l+=16)C.set(h.subarray(l,l+16),i);return C},j.decryptAvcSample=function(C,f,h,l,i,s){var u=Object(A.discardEPB)(i.data),o=this.getAvcEncryptedData(u),a=this;this.decryptBuffer(o.buffer,function(n){i.data=a.getAvcDecryptedUnit(u,n),s||a.decryptAvcSamples(C,f,h+1,l)})},j.decryptAvcSamples=function(C,f,h,l){if(C instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;f++,h=0){if(f>=C.length){l();return}for(var i=C[f].units;!(h>=i.length);h++){var s=i[h];if(s.data.length<=48||s.type!==1&&s.type!==5)continue;var u=this.decrypter.isSync();if(this.decryptAvcSample(C,f,h,l,s,u),!u)return}}},W}();P.default=I},"./src/demux/transmuxer-interface.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"default",function(){return i});var U=R("./node_modules/webworkify-webpack/index.js"),A=R.n(U),I=R("./src/events.ts"),W=R("./src/demux/transmuxer.ts"),j=R("./src/utils/logger.ts"),e=R("./src/errors.ts"),C=R("./src/utils/mediasource-helper.ts"),f=R("./node_modules/eventemitter3/index.js"),h=R.n(f),l=Object(C.getMediaSource)()||{isTypeSupported:function(){return!1}},i=function(){function s(o,a,n,t){var _=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=o,this.id=a,this.onTransmuxComplete=n,this.onFlush=t;var p=o.config,v=function(g,c){c=c||{},c.frag=_.frag,c.id=_.id,o.trigger(g,c)};this.observer=new f.EventEmitter,this.observer.on(I.Events.FRAG_DECRYPTED,v),this.observer.on(I.Events.ERROR,v);var x={mp4:l.isTypeSupported("video/mp4"),mpeg:l.isTypeSupported("audio/mpeg"),mp3:l.isTypeSupported('audio/mp4; codecs="mp3"')},T=navigator.vendor;if(p.enableWorker&&typeof Worker!="undefined"){j.logger.log("demuxing in webworker");var b;try{b=this.worker=U("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),b.addEventListener("message",this.onwmsg),b.onerror=function(d){o.trigger(I.Events.ERROR,{type:e.ErrorTypes.OTHER_ERROR,details:e.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(d.message+" ("+d.filename+":"+d.lineno+")")})},b.postMessage({cmd:"init",typeSupported:x,vendor:T,id:a,config:JSON.stringify(p)})}catch(d){j.logger.warn("Error in worker:",d),j.logger.error("Error while initializing DemuxerWorker, fallback to inline"),b&&self.URL.revokeObjectURL(b.objectURL),this.transmuxer=new W.default(this.observer,x,p,T,a),this.worker=null}}else this.transmuxer=new W.default(this.observer,x,p,T,a)}var u=s.prototype;return u.destroy=function(){var a=this.worker;if(a)a.removeEventListener("message",this.onwmsg),a.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},u.push=function(a,n,t,_,p,v,x,T,b,d){var g=this;b.transmuxing.start=self.performance.now();var c=this.transmuxer,y=this.worker,r=v?v.start:p.start,w=p.decryptdata,D=this.frag,L=!(D&&p.cc===D.cc),S=!(D&&b.level===D.level),M=D?b.sn-D.sn:-1,H=this.part?b.part-this.part.index:1,O=!S&&(M===1||M===0&&H===1),K=self.performance.now();(S||M||p.stats.parsing.start===0)&&(p.stats.parsing.start=K),v&&(H||!O)&&(v.stats.parsing.start=K);var Y=new W.TransmuxState(L,O,T,S,r);if(!O||L){j.logger.log("[transmuxer-interface, "+p.type+"]: Starting new transmux session for sn: "+b.sn+" p: "+b.part+" level: "+b.level+" id: "+b.id+`
|
|
discontinuity: `+L+`
|
|
trackSwitch: `+S+`
|
|
contiguous: `+O+`
|
|
accurateTimeOffset: `+T+`
|
|
timeOffset: `+r);var ie=new W.TransmuxConfig(t,_,n,x,d);this.configureTransmuxer(ie)}if(this.frag=p,this.part=v,y)y.postMessage({cmd:"demux",data:a,decryptdata:w,chunkMeta:b,state:Y},a instanceof ArrayBuffer?[a]:[]);else if(c){var re=c.push(a,w,b,Y);Object(W.isPromise)(re)?re.then(function(Te){g.handleTransmuxComplete(Te)}):this.handleTransmuxComplete(re)}},u.flush=function(a){var n=this;a.transmuxing.start=self.performance.now();var t=this.transmuxer,_=this.worker;if(_)_.postMessage({cmd:"flush",chunkMeta:a});else if(t){var p=t.flush(a);Object(W.isPromise)(p)?p.then(function(v){n.handleFlushResult(v,a)}):this.handleFlushResult(p,a)}},u.handleFlushResult=function(a,n){var t=this;a.forEach(function(_){t.handleTransmuxComplete(_)}),this.onFlush(n)},u.onWorkerMessage=function(a){var n=a.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}}},u.configureTransmuxer=function(a){var n=this.worker,t=this.transmuxer;n?n.postMessage({cmd:"configure",config:a}):t&&t.configure(a)},u.handleTransmuxComplete=function(a){a.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(a)},s}()},"./src/demux/transmuxer-worker.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"default",function(){return e});var U=R("./src/demux/transmuxer.ts"),A=R("./src/events.ts"),I=R("./src/utils/logger.ts"),W=R("./node_modules/eventemitter3/index.js"),j=R.n(W);function e(i){var s=new W.EventEmitter,u=function(a,n){i.postMessage({event:a,data:n})};s.on(A.Events.FRAG_DECRYPTED,u),s.on(A.Events.ERROR,u),i.addEventListener("message",function(o){var a=o.data;switch(a.cmd){case"init":{var n=JSON.parse(a.config);i.transmuxer=new U.default(s,a.typeSupported,n,a.vendor,a.id),Object(I.enableLogs)(n.debug),u("init",null);break}case"configure":{i.transmuxer.configure(a.config);break}case"demux":{var t=i.transmuxer.push(a.data,a.decryptdata,a.chunkMeta,a.state);Object(U.isPromise)(t)?t.then(function(v){C(i,v)}):C(i,t);break}case"flush":{var _=a.chunkMeta,p=i.transmuxer.flush(_);Object(U.isPromise)(p)?p.then(function(v){h(i,v,_)}):h(i,p,_);break}default:break}})}function C(i,s){if(l(s.remuxResult))return;var u=[],o=s.remuxResult,a=o.audio,n=o.video;a&&f(u,a),n&&f(u,n),i.postMessage({event:"transmuxComplete",data:s},u)}function f(i,s){s.data1&&i.push(s.data1.buffer),s.data2&&i.push(s.data2.buffer)}function h(i,s,u){s.forEach(function(o){C(i,o)}),i.postMessage({event:"flush",data:u})}function l(i){return!i.audio&&!i.video&&!i.text&&!i.id3&&!i.initSegment}},"./src/demux/transmuxer.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"default",function(){return n}),R.d(P,"isPromise",function(){return p}),R.d(P,"TransmuxConfig",function(){return v}),R.d(P,"TransmuxState",function(){return x});var U=R("./src/events.ts"),A=R("./src/errors.ts"),I=R("./src/crypt/decrypter.ts"),W=R("./src/demux/aacdemuxer.ts"),j=R("./src/demux/mp4demuxer.ts"),e=R("./src/demux/tsdemuxer.ts"),C=R("./src/demux/mp3demuxer.ts"),f=R("./src/remux/mp4-remuxer.ts"),h=R("./src/remux/passthrough-remuxer.ts"),l=R("./src/demux/chunk-cache.ts"),i=R("./src/utils/mp4-tools.ts"),s=R("./src/utils/logger.ts"),u;try{u=self.performance.now.bind(self.performance)}catch(T){s.logger.debug("Unable to use Performance API on this environment"),u=self.Date.now}var o=[{demux:e.default,remux:f.default},{demux:j.default,remux:h.default},{demux:W.default,remux:f.default},{demux:C.default,remux:f.default}],a=1024;o.forEach(function(T){var b=T.demux;a=Math.max(a,b.minProbeByteLength)});var n=function(){function T(d,g,c,y,r){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 l.default,this.observer=d,this.typeSupported=g,this.config=c,this.vendor=y,this.id=r}var b=T.prototype;return b.configure=function(g){this.transmuxConfig=g,this.decrypter&&this.decrypter.reset()},b.push=function(g,c,y,r){var w=this,D=y.transmuxing;D.executeStart=u();var L=new Uint8Array(g),S=this.cache,M=this.config,H=this.currentTransmuxState,O=this.transmuxConfig;r&&(this.currentTransmuxState=r);var K=t(L,c);if(K&&K.method==="AES-128"){var Y=this.getDecrypter();if(M.enableSoftwareAES){var ie=Y.softwareDecrypt(L,K.key.buffer,K.iv.buffer);if(!ie)return D.executeEnd=u(),_(y);L=new Uint8Array(ie)}else return this.decryptionPromise=Y.webCryptoDecrypt(L,K.key.buffer,K.iv.buffer).then(function(Ue){var Xe=w.push(Ue,null,y);return w.decryptionPromise=null,Xe}),this.decryptionPromise}var re=r||H,Te=re.contiguous,_e=re.discontinuity,we=re.trackSwitch,Ce=re.accurateTimeOffset,Re=re.timeOffset,ue=O.audioCodec,q=O.videoCodec,Fe=O.defaultInitPts,We=O.duration,He=O.initSegmentData;if((_e||we)&&this.resetInitSegment(He,ue,q,We),_e&&this.resetInitialTimestamp(Fe),Te||this.resetContiguity(),this.needsProbing(L,_e,we)){if(S.dataLength){var Ge=S.flush();L=Object(i.appendUint8Array)(Ge,L)}this.configureTransmuxer(L,O)}var it=this.transmux(L,K,Re,Ce,y),De=this.currentTransmuxState;return De.contiguous=!0,De.discontinuity=!1,De.trackSwitch=!1,D.executeEnd=u(),it},b.flush=function(g){var c=this,y=g.transmuxing;y.executeStart=u();var r=this.decrypter,w=this.cache,D=this.currentTransmuxState,L=this.decryptionPromise;if(L)return L.then(function(){return c.flush(g)});var S=[],M=D.timeOffset;if(r){var H=r.flush();H&&S.push(this.push(H,null,g))}var O=w.dataLength;w.reset();var K=this.demuxer,Y=this.remuxer;if(!K||!Y)return O>=a&&this.observer.emit(U.Events.ERROR,U.Events.ERROR,{type:A.ErrorTypes.MEDIA_ERROR,details:A.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),y.executeEnd=u(),[_(g)];var ie=K.flush(M);return p(ie)?ie.then(function(re){return c.flushRemux(S,re,g),S}):(this.flushRemux(S,ie,g),S)},b.flushRemux=function(g,c,y){var r=c.audioTrack,w=c.avcTrack,D=c.id3Track,L=c.textTrack,S=this.currentTransmuxState,M=S.accurateTimeOffset,H=S.timeOffset;s.logger.log("[transmuxer.ts]: Flushed fragment "+y.sn+(y.part>-1?" p: "+y.part:"")+" of level "+y.level);var O=this.remuxer.remux(r,w,D,L,H,M,!0,this.id);g.push({remuxResult:O,chunkMeta:y}),y.transmuxing.executeEnd=u()},b.resetInitialTimestamp=function(g){var c=this.demuxer,y=this.remuxer;if(!c||!y)return;c.resetTimeStamp(g),y.resetTimeStamp(g)},b.resetContiguity=function(){var g=this.demuxer,c=this.remuxer;if(!g||!c)return;g.resetContiguity(),c.resetNextTimestamp()},b.resetInitSegment=function(g,c,y,r){var w=this.demuxer,D=this.remuxer;if(!w||!D)return;w.resetInitSegment(c,y,r),D.resetInitSegment(g,c,y)},b.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},b.transmux=function(g,c,y,r,w){var D;return c&&c.method==="SAMPLE-AES"?D=this.transmuxSampleAes(g,c,y,r,w):D=this.transmuxUnencrypted(g,y,r,w),D},b.transmuxUnencrypted=function(g,c,y,r){var w=this.demuxer.demux(g,c,!1,!this.config.progressive),D=w.audioTrack,L=w.avcTrack,S=w.id3Track,M=w.textTrack,H=this.remuxer.remux(D,L,S,M,c,y,!1,this.id);return{remuxResult:H,chunkMeta:r}},b.transmuxSampleAes=function(g,c,y,r,w){var D=this;return this.demuxer.demuxSampleAes(g,c,y).then(function(L){var S=D.remuxer.remux(L.audioTrack,L.avcTrack,L.id3Track,L.textTrack,y,r,!1,D.id);return{remuxResult:S,chunkMeta:w}})},b.configureTransmuxer=function(g,c){for(var y=this.config,r=this.observer,w=this.typeSupported,D=this.vendor,L=c.audioCodec,S=c.defaultInitPts,M=c.duration,H=c.initSegmentData,O=c.videoCodec,K,Y=0,ie=o.length;Y<ie;Y++)if(o[Y].demux.probe(g)){K=o[Y];break}K||(s.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),K={demux:j.default,remux:h.default});var re=this.demuxer,Te=this.remuxer,_e=K.remux,we=K.demux;(!Te||!(Te instanceof _e))&&(this.remuxer=new _e(r,y,w,D)),(!re||!(re instanceof we))&&(this.demuxer=new we(r,y,w),this.probe=we.probe),this.resetInitSegment(H,L,O,M),this.resetInitialTimestamp(S)},b.needsProbing=function(g,c,y){return!this.demuxer||!this.remuxer||c||y},b.getDecrypter=function(){var g=this.decrypter;return g||(g=this.decrypter=new I.default(this.observer,this.config)),g},T}();function t(T,b){var d=null;return T.byteLength>0&&b!=null&&b.key!=null&&b.iv!==null&&b.method!=null&&(d=b),d}var _=function(b){return{remuxResult:{},chunkMeta:b}};function p(T){return"then"in T&&T.then instanceof Function}var v=function(b,d,g,c,y){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=b,this.videoCodec=d,this.initSegmentData=g,this.duration=c,this.defaultInitPts=y},x=function(b,d,g,c,y){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=b,this.contiguous=d,this.accurateTimeOffset=g,this.trackSwitch=c,this.timeOffset=y}},"./src/demux/tsdemuxer.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"discardEPB",function(){return _});var U=R("./src/demux/adts.ts"),A=R("./src/demux/mpegaudio.ts"),I=R("./src/demux/exp-golomb.ts"),W=R("./src/demux/id3.ts"),j=R("./src/demux/sample-aes.ts"),e=R("./src/events.ts"),C=R("./src/utils/mp4-tools.ts"),f=R("./src/utils/logger.ts"),h=R("./src/errors.ts"),l={video:1,audio:2,id3:3,text:4},i=function(){function p(x,T,b){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=x,this.config=T,this.typeSupported=b}p.probe=function(T){var b=p.syncOffset(T);return b<0?!1:(b&&f.logger.warn("MPEG2-TS detected but first sync word found @ offset "+b+", junk ahead ?"),!0)},p.syncOffset=function(T){for(var b=Math.min(1e3,T.length-3*188),d=0;d<b;){if(T[d]===71&&T[d+188]===71&&T[d+2*188]===71)return d;d++}return-1},p.createTrack=function(T,b){return{container:T==="video"||T==="audio"?"video/mp2t":void 0,type:T,id:l[T],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:T==="audio"?b:void 0}};var v=p.prototype;return v.resetInitSegment=function(T,b,d){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=p.createTrack("video",d),this._audioTrack=p.createTrack("audio",d),this._id3Track=p.createTrack("id3",d),this._txtTrack=p.createTrack("text",d),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=T,this.videoCodec=b,this._duration=d},v.resetTimeStamp=function(){},v.resetContiguity=function(){var T=this._audioTrack,b=this._avcTrack,d=this._id3Track;T&&(T.pesData=null),b&&(b.pesData=null),d&&(d.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},v.demux=function(T,b,d,g){d===void 0&&(d=!1),g===void 0&&(g=!1),d||(this.sampleAes=null);var c,y=this._avcTrack,r=this._audioTrack,w=this._id3Track,D=y.pid,L=y.pesData,S=r.pid,M=w.pid,H=r.pesData,O=w.pesData,K=!1,Y=this.pmtParsed,ie=this._pmtId,re=T.length;if(this.remainderData&&(T=Object(C.appendUint8Array)(this.remainderData,T),re=T.length,this.remainderData=null),re<188&&!g)return this.remainderData=T,{audioTrack:r,avcTrack:y,id3Track:w,textTrack:this._txtTrack};var Te=Math.max(0,p.syncOffset(T));re-=(re+Te)%188,re<T.byteLength&&!g&&(this.remainderData=new Uint8Array(T.buffer,re,T.buffer.byteLength-re));for(var _e=Te;_e<re;_e+=188)if(T[_e]===71){var we=!!(T[_e+1]&64),Ce=((T[_e+1]&31)<<8)+T[_e+2],Re=(T[_e+3]&48)>>4,ue=void 0;if(Re>1){if(ue=_e+5+T[_e+4],ue===_e+188)continue}else ue=_e+4;switch(Ce){case D:we&&(L&&(c=a(L))&&this.parseAVCPES(c,!1),L={data:[],size:0}),L&&(L.data.push(T.subarray(ue,_e+188)),L.size+=_e+188-ue);break;case S:we&&(H&&(c=a(H))&&(r.isAAC?this.parseAACPES(c):this.parseMPEGPES(c)),H={data:[],size:0}),H&&(H.data.push(T.subarray(ue,_e+188)),H.size+=_e+188-ue);break;case M:we&&(O&&(c=a(O))&&this.parseID3PES(c),O={data:[],size:0}),O&&(O.data.push(T.subarray(ue,_e+188)),O.size+=_e+188-ue);break;case 0:we&&(ue+=T[ue]+1),ie=this._pmtId=u(T,ue);break;case ie:{we&&(ue+=T[ue]+1);var q=o(T,ue,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,d);D=q.avc,D>0&&(y.pid=D),S=q.audio,S>0&&(r.pid=S,r.isAAC=q.isAAC),M=q.id3,M>0&&(w.pid=M),K&&!Y&&(f.logger.log("reparse from beginning"),K=!1,_e=Te-188),Y=this.pmtParsed=!0;break}case 17:case 8191:break;default:K=!0;break}}else this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});y.pesData=L,r.pesData=H,w.pesData=O;var Fe={audioTrack:r,avcTrack:y,id3Track:w,textTrack:this._txtTrack};return g&&this.extractRemainingSamples(Fe),Fe},v.flush=function(){var T=this.remainderData;this.remainderData=null;var b;return T?b=this.demux(T,-1,!1,!0):b={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(b),this.sampleAes?this.decrypt(b,this.sampleAes):b},v.extractRemainingSamples=function(T){var b=T.audioTrack,d=T.avcTrack,g=T.id3Track,c=d.pesData,y=b.pesData,r=g.pesData,w;c&&(w=a(c))?(this.parseAVCPES(w,!0),d.pesData=null):d.pesData=c,y&&(w=a(y))?(b.isAAC?this.parseAACPES(w):this.parseMPEGPES(w),b.pesData=null):(y!=null&&y.size&&f.logger.log("last AAC PES packet truncated,might overlap between fragments"),b.pesData=y),r&&(w=a(r))?(this.parseID3PES(w),g.pesData=null):g.pesData=r},v.demuxSampleAes=function(T,b,d){var g=this.demux(T,d,!0,!this.config.progressive),c=this.sampleAes=new j.default(this.observer,this.config,b);return this.decrypt(g,c)},v.decrypt=function(T,b){return new Promise(function(d){var g=T.audioTrack,c=T.avcTrack;g.samples&&g.isAAC?b.decryptAacSamples(g.samples,0,function(){c.samples?b.decryptAvcSamples(c.samples,0,0,function(){d(T)}):d(T)}):c.samples&&b.decryptAvcSamples(c.samples,0,0,function(){d(T)})})},v.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},v.parseAVCPES=function(T,b){var d=this,g=this._avcTrack,c=this.parseAVCNALu(T.data),y=!1,r=this.avcSample,w,D=!1;T.data=null,r&&c.length&&!g.audFound&&(n(r,g),r=this.avcSample=s(!1,T.pts,T.dts,"")),c.forEach(function(L){switch(L.type){case 1:{w=!0,r||(r=d.avcSample=s(!0,T.pts,T.dts,"")),y&&(r.debug+="NDR "),r.frame=!0;var S=L.data;if(D&&S.length>4){var M=new I.default(S).readSliceType();(M===2||M===4||M===7||M===9)&&(r.key=!0)}break}case 5:w=!0,r||(r=d.avcSample=s(!0,T.pts,T.dts,"")),y&&(r.debug+="IDR "),r.key=!0,r.frame=!0;break;case 6:{w=!0,y&&r&&(r.debug+="SEI ");var H=new I.default(_(L.data));H.readUByte();for(var O=0,K=0,Y=!1,ie=0;!Y&&H.bytesAvailable>1;){O=0;do ie=H.readUByte(),O+=ie;while(ie===255);K=0;do ie=H.readUByte(),K+=ie;while(ie===255);if(O===4&&H.bytesAvailable!==0){Y=!0;var re=H.readUByte();if(re===181){var Te=H.readUShort();if(Te===49){var _e=H.readUInt();if(_e===1195456820){var we=H.readUByte();if(we===3){for(var Ce=H.readUByte(),Re=H.readUByte(),ue=31&Ce,q=[Ce,Re],Fe=0;Fe<ue;Fe++)q.push(H.readUByte()),q.push(H.readUByte()),q.push(H.readUByte());t(d._txtTrack.samples,{type:3,pts:T.pts,bytes:q})}}}}}else if(O===5&&H.bytesAvailable!==0){if(Y=!0,K>16){for(var We=[],He=0;He<16;He++)We.push(H.readUByte().toString(16)),(He===3||He===5||He===7||He===9)&&We.push("-");for(var Ge=K-16,it=new Uint8Array(Ge),De=0;De<Ge;De++)it[De]=H.readUByte();t(d._txtTrack.samples,{pts:T.pts,payloadType:O,uuid:We.join(""),userData:Object(W.utf8ArrayToStr)(it),userDataBytes:it})}}else if(K<H.bytesAvailable)for(var Ue=0;Ue<K;Ue++)H.readUByte()}break}case 7:if(w=!0,D=!0,y&&r&&(r.debug+="SPS "),!g.sps){var Xe=new I.default(L.data),$=Xe.readSPS();g.width=$.width,g.height=$.height,g.pixelRatio=$.pixelRatio,g.sps=[L.data],g.duration=d._duration;for(var me=L.data.subarray(1,4),xe="avc1.",Ee=0;Ee<3;Ee++){var Ie=me[Ee].toString(16);Ie.length<2&&(Ie="0"+Ie),xe+=Ie}g.codec=xe}break;case 8:w=!0,y&&r&&(r.debug+="PPS "),g.pps||(g.pps=[L.data]);break;case 9:w=!1,g.audFound=!0,r&&n(r,g),r=d.avcSample=s(!1,T.pts,T.dts,y?"AUD ":"");break;case 12:w=!1;break;default:w=!1,r&&(r.debug+="unknown NAL "+L.type+" ");break}if(r&&w){var Be=r.units;Be.push(L)}}),b&&r&&(n(r,g),this.avcSample=null)},v.getLastNalUnit=function(){var T,b=this.avcSample,d;if(!b||b.units.length===0){var g=this._avcTrack.samples;b=g[g.length-1]}if((T=b)!==null&&T!==void 0&&T.units){var c=b.units;d=c[c.length-1]}return d},v.parseAVCNALu=function(T){var b=T.byteLength,d=this._avcTrack,g=d.naluState||0,c=g,y=[],r=0,w,D,L,S=-1,M=0;for(g===-1&&(S=0,M=T[0]&31,g=0,r=1);r<b;){if(w=T[r++],!g){g=w?0:1;continue}if(g===1){g=w?0:2;continue}if(!w)g=3;else if(w===1){if(S>=0){var H={data:T.subarray(S,r-g-1),type:M};y.push(H)}else{var O=this.getLastNalUnit();if(O&&(c&&r<=4-c&&(O.state&&(O.data=O.data.subarray(0,O.data.byteLength-c))),D=r-g-1,D>0)){var K=new Uint8Array(O.data.byteLength+D);K.set(O.data,0),K.set(T.subarray(0,D),O.data.byteLength),O.data=K,O.state=0}}r<b?(L=T[r]&31,S=r,M=L,g=0):g=-1}else g=0}if(S>=0&&g>=0){var Y={data:T.subarray(S,b),type:M,state:g};y.push(Y)}if(y.length===0){var ie=this.getLastNalUnit();if(ie){var re=new Uint8Array(ie.data.byteLength+T.byteLength);re.set(ie.data,0),re.set(T,ie.data.byteLength),ie.data=re}}return d.naluState=g,y},v.parseAACPES=function(T){var b=0,d=this._audioTrack,g=this.aacOverFlow,c=T.data;if(g){this.aacOverFlow=null;var y=g.sample.unit.byteLength,r=Math.min(g.missing,y),w=y-r;g.sample.unit.set(c.subarray(0,r),w),d.samples.push(g.sample),b=g.missing}var D,L;for(D=b,L=c.length;D<L-1&&!U.isHeader(c,D);D++);if(D!==b){var S,M;if(D<L-1?(S="AAC PES did not start with ADTS header,offset:"+D,M=!1):(S="no ADTS header found in AAC PES",M=!0),f.logger.warn("parsing error:"+S),this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:M,reason:S}),M)return}U.initTrackConfig(d,this.observer,c,D,this.audioCodec);var H;if(T.pts!==void 0)H=T.pts;else if(g){var O=U.getFrameDuration(d.samplerate);H=g.sample.pts+O}else{f.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var K=0;D<L;)if(U.isHeader(c,D)){if(D+5<L){var Y=U.appendFrame(d,c,D,H,K);if(Y)if(Y.missing)this.aacOverFlow=Y;else{D+=Y.length,K++;continue}}break}else D++},v.parseMPEGPES=function(T){var b=T.data,d=b.length,g=0,c=0,y=T.pts;if(y===void 0){f.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;c<d;)if(A.isHeader(b,c)){var r=A.appendFrame(this._audioTrack,b,c,y,g);if(r)c+=r.length,g++;else break}else c++},v.parseID3PES=function(T){if(T.pts===void 0){f.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(T)},p}();i.minProbeByteLength=188;function s(p,v,x,T){return{key:p,frame:!1,pts:v,dts:x,units:[],debug:T,length:0}}function u(p,v){return(p[v+10]&31)<<8|p[v+11]}function o(p,v,x,T){var b={audio:-1,avc:-1,id3:-1,isAAC:!0},d=(p[v+1]&15)<<8|p[v+2],g=v+3+d-4,c=(p[v+10]&15)<<8|p[v+11];for(v+=12+c;v<g;){var y=(p[v+1]&31)<<8|p[v+2];switch(p[v]){case 207:if(!T){f.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:b.audio===-1&&(b.audio=y);break;case 21:b.id3===-1&&(b.id3=y);break;case 219:if(!T){f.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:b.avc===-1&&(b.avc=y);break;case 3:case 4:x?b.audio===-1&&(b.audio=y,b.isAAC=!1):f.logger.log("MPEG audio found, not supported in this browser");break;case 36:f.logger.warn("Unsupported HEVC stream type found");break;default:break}v+=((p[v+3]&15)<<8|p[v+4])+5}return b}function a(p){var v=0,x,T,b,d,g,c=p.data;if(!p||p.size===0)return null;for(;c[0].length<19&&c.length>1;){var y=new Uint8Array(c[0].length+c[1].length);y.set(c[0]),y.set(c[1],c[0].length),c[0]=y,c.splice(1,1)}x=c[0];var r=(x[0]<<16)+(x[1]<<8)+x[2];if(r===1){if(T=(x[4]<<8)+x[5],T&&T>p.size-6)return null;var w=x[7];w&192&&(d=(x[9]&14)*536870912+(x[10]&255)*4194304+(x[11]&254)*16384+(x[12]&255)*128+(x[13]&254)/2,w&64?(g=(x[14]&14)*536870912+(x[15]&255)*4194304+(x[16]&254)*16384+(x[17]&255)*128+(x[18]&254)/2,d-g>60*9e4&&(f.logger.warn(Math.round((d-g)/9e4)+"s delta between PTS and DTS, align them"),d=g)):g=d),b=x[8];var D=b+9;if(p.size<=D)return null;p.size-=D;for(var L=new Uint8Array(p.size),S=0,M=c.length;S<M;S++){x=c[S];var H=x.byteLength;if(D)if(D>H){D-=H;continue}else x=x.subarray(D),H-=D,D=0;L.set(x,v),v+=H}return T&&(T-=b+3),{data:L,pts:d,dts:g,len:T}}return null}function n(p,v){if(p.units.length&&p.frame){if(p.pts===void 0){var x=v.samples,T=x.length;if(T){var b=x[T-1];p.pts=b.pts,p.dts=b.dts}else{v.dropped++;return}}v.samples.push(p)}p.debug.length&&f.logger.log(p.pts+"/"+p.dts+":"+p.debug)}function t(p,v){var x=p.length;if(x>0){if(v.pts>=p[x-1].pts)p.push(v);else for(var T=x-1;T>=0;T--)if(v.pts<p[T].pts){p.splice(T,0,v);break}}else p.push(v)}function _(p){for(var v=p.byteLength,x=[],T=1;T<v-2;)p[T]===0&&p[T+1]===0&&p[T+2]===3?(x.push(T+2),T+=2):T++;if(x.length===0)return p;var b=v-x.length,d=new Uint8Array(b),g=0;for(T=0;T<b;g++,T++)g===x[0]&&(g++,x.shift()),d[T]=p[g];return d}P.default=i},"./src/errors.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"ErrorTypes",function(){return U}),R.d(P,"ErrorDetails",function(){return A});var U;(function(I){I.NETWORK_ERROR="networkError",I.MEDIA_ERROR="mediaError",I.KEY_SYSTEM_ERROR="keySystemError",I.MUX_ERROR="muxError",I.OTHER_ERROR="otherError"})(U||(U={}));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(ee,P,R){"use strict";R.r(P),R.d(P,"Events",function(){return U});var U;(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"})(U||(U={}))},"./src/hls.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"default",function(){return p});var U=R("./node_modules/url-toolkit/src/url-toolkit.js"),A=R.n(U),I=R("./src/loader/playlist-loader.ts"),W=R("./src/loader/key-loader.ts"),j=R("./src/controller/id3-track-controller.ts"),e=R("./src/controller/latency-controller.ts"),C=R("./src/controller/level-controller.ts"),f=R("./src/controller/fragment-tracker.ts"),h=R("./src/controller/stream-controller.ts"),l=R("./src/is-supported.ts"),i=R("./src/utils/logger.ts"),s=R("./src/config.ts"),u=R("./node_modules/eventemitter3/index.js"),o=R.n(u),a=R("./src/events.ts"),n=R("./src/errors.ts");function t(v,x){for(var T=0;T<x.length;T++){var b=x[T];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(v,b.key,b)}}function _(v,x,T){return x&&t(v.prototype,x),T&&t(v,T),v}var p=function(){v.isSupported=function(){return Object(l.isSupported)()};function v(T){T===void 0&&(T={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new u.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 b=this.config=Object(s.mergeConfig)(v.DefaultConfig,T);this.userConfig=T,Object(i.enableLogs)(b.debug),this._autoLevelCapping=-1,b.progressive&&Object(s.enableStreamingMode)(b);var d=b.abrController,g=b.bufferController,c=b.capLevelController,y=b.fpsController,r=this.abrController=new d(this),w=this.bufferController=new g(this),D=this.capLevelController=new c(this),L=new y(this),S=new I.default(this),M=new W.default(this),H=new j.default(this),O=this.levelController=new C.default(this),K=new f.FragmentTracker(this),Y=this.streamController=new h.default(this,K);D.setStreamController(Y),L.setStreamController(Y);var ie=[O,Y];this.networkControllers=ie;var re=[S,M,r,w,D,L,H,K];this.audioTrackController=this.createController(b.audioTrackController,null,ie),this.createController(b.audioStreamController,K,ie),this.subtitleTrackController=this.createController(b.subtitleTrackController,null,ie),this.createController(b.subtitleStreamController,K,ie),this.createController(b.timelineController,null,re),this.emeController=this.createController(b.emeController,null,re),this.cmcdController=this.createController(b.cmcdController,null,re),this.latencyController=this.createController(e.default,null,re),this.coreComponents=re}var x=v.prototype;return x.createController=function(b,d,g){if(b){var c=d?new b(this,d):new b(this);return g&&g.push(c),c}return null},x.on=function(b,d,g){g===void 0&&(g=this),this._emitter.on(b,d,g)},x.once=function(b,d,g){g===void 0&&(g=this),this._emitter.once(b,d,g)},x.removeAllListeners=function(b){this._emitter.removeAllListeners(b)},x.off=function(b,d,g,c){g===void 0&&(g=this),this._emitter.off(b,d,g,c)},x.listeners=function(b){return this._emitter.listeners(b)},x.emit=function(b,d,g){return this._emitter.emit(b,d,g)},x.trigger=function(b,d){if(this.config.debug)return this.emit(b,b,d);try{return this.emit(b,b,d)}catch(g){i.logger.error("An internal error happened while handling event "+b+'. Error message: "'+g.message+'". Here is a stacktrace:',g),this.trigger(a.Events.ERROR,{type:n.ErrorTypes.OTHER_ERROR,details:n.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:b,error:g})}return!1},x.listenerCount=function(b){return this._emitter.listenerCount(b)},x.destroy=function(){i.logger.log("destroy"),this.trigger(a.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(b){return b.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(b){return b.destroy()}),this.coreComponents.length=0},x.attachMedia=function(b){i.logger.log("attachMedia"),this._media=b,this.trigger(a.Events.MEDIA_ATTACHING,{media:b})},x.detachMedia=function(){i.logger.log("detachMedia"),this.trigger(a.Events.MEDIA_DETACHING,void 0),this._media=null},x.loadSource=function(b){this.stopLoad();var d=this.media,g=this.url,c=this.url=U.buildAbsoluteURL(self.location.href,b,{alwaysNormalize:!0});i.logger.log("loadSource:"+c),d&&g&&g!==c&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(d)),this.trigger(a.Events.MANIFEST_LOADING,{url:b})},x.startLoad=function(b){b===void 0&&(b=-1),i.logger.log("startLoad("+b+")"),this.networkControllers.forEach(function(d){d.startLoad(b)})},x.stopLoad=function(){i.logger.log("stopLoad"),this.networkControllers.forEach(function(b){b.stopLoad()})},x.swapAudioCodec=function(){i.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},x.recoverMediaError=function(){i.logger.log("recoverMediaError");var b=this._media;this.detachMedia(),b&&this.attachMedia(b)},x.removeLevel=function(b,d){d===void 0&&(d=0),this.levelController.removeLevel(b,d)},_(v,[{key:"levels",get:function(){var b=this.levelController.levels;return b||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(b){i.logger.log("set currentLevel:"+b),this.loadLevel=b,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(b){i.logger.log("set nextLevel:"+b),this.levelController.manualLevel=b,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(b){i.logger.log("set loadLevel:"+b),this.levelController.manualLevel=b}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(b){this.levelController.nextLoadLevel=b}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(b){i.logger.log("set firstLevel:"+b),this.levelController.firstLevel=b}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(b){i.logger.log("set startLevel:"+b),b!==-1&&(b=Math.max(b,this.minAutoLevel)),this.levelController.startLevel=b}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(b){var d=!!b;d!==this.config.capLevelToPlayerSize&&(d?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=d)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(b){this._autoLevelCapping!==b&&(i.logger.log("set autoLevelCapping:"+b),this._autoLevelCapping=b)}},{key:"bandwidthEstimate",get:function(){var b=this.abrController.bwEstimator;return b?b.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var b=this.levels,d=this.config.minAutoBitrate;if(!b)return 0;for(var g=b.length,c=0;c<g;c++)if(b[c].maxBitrate>d)return c;return 0}},{key:"maxAutoLevel",get:function(){var b=this.levels,d=this.autoLevelCapping,g;return d===-1&&b&&b.length?g=b.length-1:g=d,g}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(b){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,b)}},{key:"audioTracks",get:function(){var b=this.audioTrackController;return b?b.audioTracks:[]}},{key:"audioTrack",get:function(){var b=this.audioTrackController;return b?b.audioTrack:-1},set:function(b){var d=this.audioTrackController;d&&(d.audioTrack=b)}},{key:"subtitleTracks",get:function(){var b=this.subtitleTrackController;return b?b.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var b=this.subtitleTrackController;return b?b.subtitleTrack:-1},set:function(b){var d=this.subtitleTrackController;d&&(d.subtitleTrack=b)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var b=this.subtitleTrackController;return b?b.subtitleDisplay:!1},set:function(b){var d=this.subtitleTrackController;d&&(d.subtitleDisplay=b)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(b){this.config.lowLatencyMode=b}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return a.Events}},{key:"ErrorTypes",get:function(){return n.ErrorTypes}},{key:"ErrorDetails",get:function(){return n.ErrorDetails}},{key:"DefaultConfig",get:function(){return v.defaultConfig?v.defaultConfig:s.hlsDefaultConfig},set:function(b){v.defaultConfig=b}}]),v}();p.defaultConfig=void 0},"./src/is-supported.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"isSupported",function(){return I}),R.d(P,"changeTypeSupported",function(){return W});var U=R("./src/utils/mediasource-helper.ts");function A(){return self.SourceBuffer||self.WebKitSourceBuffer}function I(){var j=Object(U.getMediaSource)();if(!j)return!1;var e=A(),C=j&&typeof j.isTypeSupported=="function"&&j.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),f=!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function";return!!C&&!!f}function W(){var j,e=A();return typeof(e==null||((j=e.prototype)===null||j===void 0)?void 0:j.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"default",function(){return i}),R.d(P,"LoadError",function(){return u});var U=R("./src/polyfills/number.ts"),A=R("./src/errors.ts");function I(o,a){o.prototype=Object.create(a.prototype),o.prototype.constructor=o,f(o,a)}function W(o){var a=typeof Map=="function"?new Map:void 0;return W=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 a!="undefined"){if(a.has(t))return a.get(t);a.set(t,_)}function _(){return j(t,arguments,h(this).constructor)}return _.prototype=Object.create(t.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),f(_,t)},W(o)}function j(o,a,n){return e()?j=Reflect.construct:j=function(_,p,v){var x=[null];x.push.apply(x,p);var T=Function.bind.apply(_,x),b=new T;return v&&f(b,v.prototype),b},j.apply(null,arguments)}function e(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(o){return!1}}function C(o){return Function.toString.call(o).indexOf("[native code]")!==-1}function f(o,a){return f=Object.setPrototypeOf||function(t,_){return t.__proto__=_,t},f(o,a)}function h(o){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},h(o)}var l=Math.pow(2,17),i=function(){function o(n){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=n}var a=o.prototype;return a.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},a.abort=function(){this.loader&&this.loader.abort()},a.load=function(t,_){var p=this,v=t.url;if(!v)return Promise.reject(new u({type:A.ErrorTypes.NETWORK_ERROR,details:A.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(v?"part list":"url")));this.abort();var x=this.config,T=x.fLoader,b=x.loader;return new Promise(function(d,g){p.loader&&p.loader.destroy();var c=p.loader=t.loader=T?new T(x):new b(x),y=s(t),r={timeout:x.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:x.fragLoadingMaxRetryTimeout,highWaterMark:l};t.stats=c.stats,c.load(y,r,{onSuccess:function(D,L,S,M){p.resetLoader(t,c),d({frag:t,part:null,payload:D.data,networkDetails:M})},onError:function(D,L,S){p.resetLoader(t,c),g(new u({type:A.ErrorTypes.NETWORK_ERROR,details:A.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:D,networkDetails:S}))},onAbort:function(D,L,S){p.resetLoader(t,c),g(new u({type:A.ErrorTypes.NETWORK_ERROR,details:A.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:S}))},onTimeout:function(D,L,S){p.resetLoader(t,c),g(new u({type:A.ErrorTypes.NETWORK_ERROR,details:A.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:S}))},onProgress:function(D,L,S,M){_&&_({frag:t,part:null,payload:S,networkDetails:M})}})})},a.loadPart=function(t,_,p){var v=this;this.abort();var x=this.config,T=x.fLoader,b=x.loader;return new Promise(function(d,g){v.loader&&v.loader.destroy();var c=v.loader=t.loader=T?new T(x):new b(x),y=s(t,_),r={timeout:x.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:x.fragLoadingMaxRetryTimeout,highWaterMark:l};_.stats=c.stats,c.load(y,r,{onSuccess:function(D,L,S,M){v.resetLoader(t,c),v.updateStatsFromPart(t,_);var H={frag:t,part:_,payload:D.data,networkDetails:M};p(H),d(H)},onError:function(D,L,S){v.resetLoader(t,c),g(new u({type:A.ErrorTypes.NETWORK_ERROR,details:A.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:_,response:D,networkDetails:S}))},onAbort:function(D,L,S){t.stats.aborted=_.stats.aborted,v.resetLoader(t,c),g(new u({type:A.ErrorTypes.NETWORK_ERROR,details:A.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:_,networkDetails:S}))},onTimeout:function(D,L,S){v.resetLoader(t,c),g(new u({type:A.ErrorTypes.NETWORK_ERROR,details:A.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:_,networkDetails:S}))}})})},a.updateStatsFromPart=function(t,_){var p=t.stats,v=_.stats,x=v.total;if(p.loaded+=v.loaded,x){var T=Math.round(t.duration/_.duration),b=Math.min(Math.round(p.loaded/x),T),d=T-b,g=d*Math.round(p.loaded/b);p.total=p.loaded+g}else p.total=Math.max(p.loaded,p.total);var c=p.loading,y=v.loading;c.start?c.first+=y.first-y.start:(c.start=y.start,c.first=y.first),c.end=y.end},a.resetLoader=function(t,_){t.loader=null,this.loader===_&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),_.destroy()},o}();function s(o,a){a===void 0&&(a=null);var n=a||o,t={frag:o,part:a,responseType:"arraybuffer",url:n.url,headers:{},rangeStart:0,rangeEnd:0},_=n.byteRangeStartOffset,p=n.byteRangeEndOffset;return Object(U.isFiniteNumber)(_)&&Object(U.isFiniteNumber)(p)&&(t.rangeStart=_,t.rangeEnd=p),t}var u=function(o){I(a,o);function a(n){for(var t,_=arguments.length,p=new Array(_>1?_-1:0),v=1;v<_;v++)p[v-1]=arguments[v];return t=o.call.apply(o,[this].concat(p))||this,t.data=void 0,t.data=n,t}return a}(W(Error))},"./src/loader/fragment.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"ElementaryStreamTypes",function(){return i}),R.d(P,"BaseSegment",function(){return s}),R.d(P,"Fragment",function(){return u}),R.d(P,"Part",function(){return o});var U=R("./src/polyfills/number.ts"),A=R("./node_modules/url-toolkit/src/url-toolkit.js"),I=R.n(A),W=R("./src/utils/logger.ts"),j=R("./src/loader/level-key.ts"),e=R("./src/loader/load-stats.ts");function C(a,n){a.prototype=Object.create(n.prototype),a.prototype.constructor=a,f(a,n)}function f(a,n){return f=Object.setPrototypeOf||function(_,p){return _.__proto__=p,_},f(a,n)}function h(a,n){for(var t=0;t<n.length;t++){var _=n[t];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(a,_.key,_)}}function l(a,n,t){return n&&h(a.prototype,n),t&&h(a,t),a}var i;(function(a){a.AUDIO="audio",a.VIDEO="video",a.AUDIOVIDEO="audiovideo"})(i||(i={}));var s=function(){function a(t){var _;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(_={},_[i.AUDIO]=null,_[i.VIDEO]=null,_[i.AUDIOVIDEO]=null,_),this.baseurl=t}var n=a.prototype;return n.setByteRange=function(_,p){var v=_.split("@",2),x=[];v.length===1?x[0]=p?p.byteRangeEndOffset:0:x[0]=parseInt(v[1]),x[1]=parseInt(v[0])+x[0],this._byteRange=x},l(a,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(A.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(_){this._url=_}}]),a}(),u=function(a){C(n,a);function n(_,p){var v;return v=a.call(this,p)||this,v._decryptdata=null,v.rawProgramDateTime=null,v.programDateTime=null,v.tagList=[],v.duration=0,v.sn=0,v.levelkey=void 0,v.type=void 0,v.loader=null,v.level=-1,v.cc=0,v.startPTS=void 0,v.endPTS=void 0,v.appendedPTS=void 0,v.startDTS=void 0,v.endDTS=void 0,v.start=0,v.deltaPTS=void 0,v.maxStartPTS=void 0,v.minEndPTS=void 0,v.stats=new e.LoadStats,v.urlId=0,v.data=void 0,v.bitrateTest=!1,v.title=null,v.initSegment=null,v.type=_,v}var t=n.prototype;return t.createInitializationVector=function(p){for(var v=new Uint8Array(16),x=12;x<16;x++)v[x]=p>>8*(15-x)&255;return v},t.setDecryptDataFromLevelKey=function(p,v){var x=p;return(p==null?void 0:p.method)==="AES-128"&&p.uri&&!p.iv&&(x=j.LevelKey.fromURI(p.uri),x.method=p.method,x.iv=this.createInitializationVector(v),x.keyFormat="identity"),x},t.setElementaryStreamInfo=function(p,v,x,T,b,d){d===void 0&&(d=!1);var g=this.elementaryStreams,c=g[p];if(!c){g[p]={startPTS:v,endPTS:x,startDTS:T,endDTS:b,partial:d};return}c.startPTS=Math.min(c.startPTS,v),c.endPTS=Math.max(c.endPTS,x),c.startDTS=Math.min(c.startDTS,T),c.endDTS=Math.max(c.endDTS,b)},t.clearElementaryStreamInfo=function(){var p=this.elementaryStreams;p[i.AUDIO]=null,p[i.VIDEO]=null,p[i.AUDIOVIDEO]=null},l(n,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var p=this.sn;typeof p!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&W.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),p=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,p)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(U.isFiniteNumber)(this.programDateTime))return null;var p=Object(U.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+p*1e3}},{key:"encrypted",get:function(){var p;return!!((p=this.decryptdata)!==null&&p!==void 0&&p.keyFormat&&this.decryptdata.uri)}}]),n}(s),o=function(a){C(n,a);function n(t,_,p,v,x){var T;T=a.call(this,p)||this,T.fragOffset=0,T.duration=0,T.gap=!1,T.independent=!1,T.relurl=void 0,T.fragment=void 0,T.index=void 0,T.stats=new e.LoadStats,T.duration=t.decimalFloatingPoint("DURATION"),T.gap=t.bool("GAP"),T.independent=t.bool("INDEPENDENT"),T.relurl=t.enumeratedString("URI"),T.fragment=_,T.index=v;var b=t.enumeratedString("BYTERANGE");return b&&T.setByteRange(b,x),x&&(T.fragOffset=x.fragOffset+x.duration),T}return l(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 _=this.elementaryStreams;return!!(_.audio||_.video||_.audiovideo)}}]),n}(s)},"./src/loader/key-loader.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"default",function(){return W});var U=R("./src/events.ts"),A=R("./src/errors.ts"),I=R("./src/utils/logger.ts"),W=function(){function j(C){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=C,this._registerListeners()}var e=j.prototype;return e._registerListeners=function(){this.hls.on(U.Events.KEY_LOADING,this.onKeyLoading,this)},e._unregisterListeners=function(){this.hls.off(U.Events.KEY_LOADING,this.onKeyLoading)},e.destroy=function(){this._unregisterListeners();for(var f in this.loaders){var h=this.loaders[f];h&&h.destroy()}this.loaders={}},e.onKeyLoading=function(f,h){var l=h.frag,i=l.type,s=this.loaders[i];if(!l.decryptdata){I.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var u=l.decryptdata.uri;if(u!==this.decrypturl||this.decryptkey===null){var o=this.hls.config;if(s&&(I.logger.warn("abort previous key loader for type:"+i),s.abort()),!u){I.logger.warn("key uri is falsy");return}var a=o.loader,n=l.loader=this.loaders[i]=new a(o);this.decrypturl=u,this.decryptkey=null;var t={url:u,frag:l,responseType:"arraybuffer"},_={timeout:o.fragLoadingTimeOut,maxRetry:0,retryDelay:o.fragLoadingRetryDelay,maxRetryDelay:o.fragLoadingMaxRetryTimeout,highWaterMark:0},p={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};n.load(t,_,p)}else this.decryptkey&&(l.decryptdata.key=this.decryptkey,this.hls.trigger(U.Events.KEY_LOADED,{frag:l}))},e.loadsuccess=function(f,h,l){var i=l.frag;if(!i.decryptdata){I.logger.error("after key load, decryptdata unset");return}this.decryptkey=i.decryptdata.key=new Uint8Array(f.data),i.loader=null,delete this.loaders[i.type],this.hls.trigger(U.Events.KEY_LOADED,{frag:i})},e.loaderror=function(f,h){var l=h.frag,i=l.loader;i&&i.abort(),delete this.loaders[l.type],this.hls.trigger(U.Events.ERROR,{type:A.ErrorTypes.NETWORK_ERROR,details:A.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:l,response:f})},e.loadtimeout=function(f,h){var l=h.frag,i=l.loader;i&&i.abort(),delete this.loaders[l.type],this.hls.trigger(U.Events.ERROR,{type:A.ErrorTypes.NETWORK_ERROR,details:A.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:l})},j}()},"./src/loader/level-details.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"LevelDetails",function(){return j});var U=R("./src/polyfills/number.ts");function A(e,C){for(var f=0;f<C.length;f++){var h=C[f];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(e,h.key,h)}}function I(e,C,f){return C&&A(e.prototype,C),f&&A(e,f),e}var W=10,j=function(){function e(f){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=f}var C=e.prototype;return C.reloaded=function(h){if(!h){this.advanced=!0,this.updated=!0;return}var l=this.lastPartSn-h.lastPartSn,i=this.lastPartIndex-h.lastPartIndex;this.updated=this.endSN!==h.endSN||!!i||!!l,this.advanced=this.endSN>h.endSN||l>0||l===0&&i>0,this.updated||this.advanced?this.misses=Math.floor(h.misses*.6):this.misses=h.misses+1,this.availabilityDelay=h.availabilityDelay},I(e,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(U.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||W}},{key:"drift",get:function(){var h=this.driftEndTime-this.driftStartTime;if(h>0){var l=this.driftEnd-this.driftStart;return l*1e3/h}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var h;return(h=this.partList)!==null&&h!==void 0&&h.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var h;return(h=this.fragments)!==null&&h!==void 0&&h.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 h;return(h=this.partList)!==null&&h!==void 0&&h.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var h;return(h=this.partList)!==null&&h!==void 0&&h.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),e}()},"./src/loader/level-key.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"LevelKey",function(){return j});var U=R("./node_modules/url-toolkit/src/url-toolkit.js"),A=R.n(U);function I(e,C){for(var f=0;f<C.length;f++){var h=C[f];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(e,h.key,h)}}function W(e,C,f){return C&&I(e.prototype,C),f&&I(e,f),e}var j=function(){e.fromURL=function(f,h){return new e(f,h)},e.fromURI=function(f){return new e(f)};function e(C,f){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,f?this._uri=Object(U.buildAbsoluteURL)(C,f,{alwaysNormalize:!0}):this._uri=C}return W(e,[{key:"uri",get:function(){return this._uri}}]),e}()},"./src/loader/load-stats.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"LoadStats",function(){return U});var U=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(ee,P,R){"use strict";R.r(P),R.d(P,"default",function(){return n});var U=R("./src/polyfills/number.ts"),A=R("./node_modules/url-toolkit/src/url-toolkit.js"),I=R.n(A),W=R("./src/loader/fragment.ts"),j=R("./src/loader/level-details.ts"),e=R("./src/loader/level-key.ts"),C=R("./src/utils/attr-list.ts"),f=R("./src/utils/logger.ts"),h=R("./src/utils/codecs.ts"),l=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,i=/#EXT-X-MEDIA:(.*)/g,s=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),u=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),o=/\.(mp4|m4s|m4v|m4a)$/i;function a(x){var T,b;return o.test((T=(b=A.parseURL(x))===null||b===void 0?void 0:b.path)!=null?T:"")}var n=function(){function x(){}return x.findGroup=function(b,d){for(var g=0;g<b.length;g++){var c=b[g];if(c.id===d)return c}},x.convertAVC1ToAVCOTI=function(b){var d=b.split(".");if(d.length>2){var g=d.shift()+".";return g+=parseInt(d.shift()).toString(16),g+=("000"+parseInt(d.shift()).toString(16)).substr(-4),g}return b},x.resolve=function(b,d){return A.buildAbsoluteURL(d,b,{alwaysNormalize:!0})},x.parseMasterPlaylist=function(b,d){var g=[],c={},y=!1;l.lastIndex=0;for(var r;(r=l.exec(b))!=null;)if(r[1]){var w=new C.AttrList(r[1]),D={attrs:w,bitrate:w.decimalInteger("AVERAGE-BANDWIDTH")||w.decimalInteger("BANDWIDTH"),name:w.NAME,url:x.resolve(r[2],d)},L=w.decimalResolution("RESOLUTION");L&&(D.width=L.width,D.height=L.height),t((w.CODECS||"").split(/[ ,]+/).filter(function(M){return M}),D),D.videoCodec&&D.videoCodec.indexOf("avc1")!==-1&&(D.videoCodec=x.convertAVC1ToAVCOTI(D.videoCodec)),g.push(D)}else if(r[3]){var S=new C.AttrList(r[3]);S["DATA-ID"]&&(y=!0,c[S["DATA-ID"]]=S)}return{levels:g,sessionData:y?c:null}},x.parseMasterPlaylistMedia=function(b,d,g,c){c===void 0&&(c=[]);var y,r=[],w=0;for(i.lastIndex=0;(y=i.exec(b))!==null;){var D=new C.AttrList(y[1]);if(D.TYPE===g){var L={attrs:D,bitrate:0,id:w++,groupId:D["GROUP-ID"],instreamId:D["INSTREAM-ID"],name:D.NAME||D.LANGUAGE||"",type:g,default:D.bool("DEFAULT"),autoselect:D.bool("AUTOSELECT"),forced:D.bool("FORCED"),lang:D.LANGUAGE,url:D.URI?x.resolve(D.URI,d):""};if(c.length){var S=x.findGroup(c,L.groupId)||c[0];_(L,S,"audioCodec"),_(L,S,"textCodec")}r.push(L)}}return r},x.parseLevelPlaylist=function(b,d,g,c,y){var r=new j.LevelDetails(d),w=r.fragments,D=null,L=0,S=0,M=0,H=0,O=null,K=new W.Fragment(c,d),Y,ie,re,Te=-1,_e=!1;for(s.lastIndex=0,r.m3u8=b;(Y=s.exec(b))!==null;){_e&&(_e=!1,K=new W.Fragment(c,d),K.start=M,K.sn=L,K.cc=H,K.level=g,D&&(K.initSegment=D,K.rawProgramDateTime=D.rawProgramDateTime));var we=Y[1];if(we){K.duration=parseFloat(we);var Ce=(" "+Y[2]).slice(1);K.title=Ce||null,K.tagList.push(Ce?["INF",we,Ce]:["INF",we])}else if(Y[3])Object(U.isFiniteNumber)(K.duration)&&(K.start=M,re&&(K.levelkey=re),K.sn=L,K.level=g,K.cc=H,K.urlId=y,w.push(K),K.relurl=(" "+Y[3]).slice(1),v(K,O),O=K,M+=K.duration,L++,S=0,_e=!0);else if(Y[4]){var Re=(" "+Y[4]).slice(1);O?K.setByteRange(Re,O):K.setByteRange(Re)}else if(Y[5])K.rawProgramDateTime=(" "+Y[5]).slice(1),K.tagList.push(["PROGRAM-DATE-TIME",K.rawProgramDateTime]),Te===-1&&(Te=w.length);else{if(Y=Y[0].match(u),!Y){f.logger.warn("No matches on slow regex match for level playlist!");continue}for(ie=1;ie<Y.length&&!(typeof Y[ie]!="undefined");ie++);var ue=(" "+Y[ie]).slice(1),q=(" "+Y[ie+1]).slice(1),Fe=Y[ie+2]?(" "+Y[ie+2]).slice(1):"";switch(ue){case"PLAYLIST-TYPE":r.type=q.toUpperCase();break;case"MEDIA-SEQUENCE":L=r.startSN=parseInt(q);break;case"SKIP":{var We=new C.AttrList(q),He=We.decimalInteger("SKIPPED-SEGMENTS");if(Object(U.isFiniteNumber)(He)){r.skippedSegments=He;for(var Ge=He;Ge--;)w.unshift(null);L+=He}var it=We.enumeratedString("RECENTLY-REMOVED-DATERANGES");it&&(r.recentlyRemovedDateranges=it.split(" "));break}case"TARGETDURATION":r.targetduration=parseFloat(q);break;case"VERSION":r.version=parseInt(q);break;case"EXTM3U":break;case"ENDLIST":r.live=!1;break;case"#":(q||Fe)&&K.tagList.push(Fe?[q,Fe]:[q]);break;case"DIS":H++;case"GAP":K.tagList.push([ue]);break;case"BITRATE":K.tagList.push([ue,q]);break;case"DISCONTINUITY-SEQ":H=parseInt(q);break;case"KEY":{var De,Ue=new C.AttrList(q),Xe=Ue.enumeratedString("METHOD"),$=Ue.URI,me=Ue.hexadecimalInteger("IV"),xe=Ue.enumeratedString("KEYFORMATVERSIONS"),Ee=Ue.enumeratedString("KEYID"),Ie=(De=Ue.enumeratedString("KEYFORMAT"))!=null?De:"identity",Be=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(Be.indexOf(Ie)>-1){f.logger.warn("Keyformat "+Ie+" is not supported from the manifest");continue}else if(Ie!=="identity")continue;Xe&&(re=e.LevelKey.fromURL(d,$),$&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Xe)>=0&&(re.method=Xe,re.keyFormat=Ie,Ee&&(re.keyID=Ee),xe&&(re.keyFormatVersions=xe),re.iv=me));break}case"START":{var Je=new C.AttrList(q),ze=Je.decimalFloatingPoint("TIME-OFFSET");Object(U.isFiniteNumber)(ze)&&(r.startTimeOffset=ze);break}case"MAP":{var ut=new C.AttrList(q);K.relurl=ut.URI,ut.BYTERANGE&&K.setByteRange(ut.BYTERANGE),K.level=g,K.sn="initSegment",re&&(K.levelkey=re),K.initSegment=null,D=K,_e=!0;break}case"SERVER-CONTROL":{var et=new C.AttrList(q);r.canBlockReload=et.bool("CAN-BLOCK-RELOAD"),r.canSkipUntil=et.optionalFloat("CAN-SKIP-UNTIL",0),r.canSkipDateRanges=r.canSkipUntil>0&&et.bool("CAN-SKIP-DATERANGES"),r.partHoldBack=et.optionalFloat("PART-HOLD-BACK",0),r.holdBack=et.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Ze=new C.AttrList(q);r.partTarget=Ze.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ve=r.partList;Ve||(Ve=r.partList=[]);var Le=S>0?Ve[Ve.length-1]:void 0,dt=S++,Ae=new W.Part(new C.AttrList(q),K,d,dt,Le);Ve.push(Ae),K.duration+=Ae.duration;break}case"PRELOAD-HINT":{var Ne=new C.AttrList(q);r.preloadHint=Ne;break}case"RENDITION-REPORT":{var pe=new C.AttrList(q);r.renditionReports=r.renditionReports||[],r.renditionReports.push(pe);break}default:f.logger.warn("line parsed but not handled: "+Y);break}}}O&&!O.relurl?(w.pop(),M-=O.duration,r.partList&&(r.fragmentHint=O)):r.partList&&(v(K,O),K.cc=H,r.fragmentHint=K);var he=w.length,de=w[0],z=w[he-1];if(M+=r.skippedSegments*r.targetduration,M>0&&he&&z){r.averagetargetduration=M/he;var J=z.sn;r.endSN=J!=="initSegment"?J:0,de&&(r.startCC=de.cc,de.initSegment||r.fragments.every(function(Q){return Q.relurl&&a(Q.relurl)})&&(f.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),K=new W.Fragment(c,d),K.relurl=z.relurl,K.level=g,K.sn="initSegment",de.initSegment=K,r.needSidxRanges=!0))}else r.endSN=0,r.startCC=0;return r.fragmentHint&&(M+=r.fragmentHint.duration),r.totalduration=M,r.endCC=H,Te>0&&p(w,Te),r},x}();function t(x,T){["video","audio","text"].forEach(function(b){var d=x.filter(function(c){return Object(h.isCodecType)(c,b)});if(d.length){var g=d.filter(function(c){return c.lastIndexOf("avc1",0)===0||c.lastIndexOf("mp4a",0)===0});T[b+"Codec"]=g.length>0?g[0]:d[0],x=x.filter(function(c){return d.indexOf(c)===-1})}}),T.unknownCodecs=x}function _(x,T,b){var d=T[b];d&&(x[b]=d)}function p(x,T){for(var b=x[T],d=T;d--;){var g=x[d];if(!g)return;g.programDateTime=b.programDateTime-g.duration*1e3,b=g}}function v(x,T){x.rawProgramDateTime?x.programDateTime=Date.parse(x.rawProgramDateTime):T!=null&&T.programDateTime&&(x.programDateTime=T.endProgramDateTime),Object(U.isFiniteNumber)(x.programDateTime)||(x.programDateTime=null,x.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(ee,P,R){"use strict";R.r(P);var U=R("./src/polyfills/number.ts"),A=R("./src/events.ts"),I=R("./src/errors.ts"),W=R("./src/utils/logger.ts"),j=R("./src/utils/mp4-tools.ts"),e=R("./src/loader/m3u8-parser.ts"),C=R("./src/types/loader.ts"),f=R("./src/utils/attr-list.ts");function h(s){var u=s.type;switch(u){case C.PlaylistContextType.AUDIO_TRACK:return C.PlaylistLevelType.AUDIO;case C.PlaylistContextType.SUBTITLE_TRACK:return C.PlaylistLevelType.SUBTITLE;default:return C.PlaylistLevelType.MAIN}}function l(s,u){var o=s.url;return(o===void 0||o.indexOf("data:")===0)&&(o=u.url),o}var i=function(){function s(o){this.hls=void 0,this.loaders=Object.create(null),this.hls=o,this.registerListeners()}var u=s.prototype;return u.registerListeners=function(){var a=this.hls;a.on(A.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(A.Events.LEVEL_LOADING,this.onLevelLoading,this),a.on(A.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),a.on(A.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},u.unregisterListeners=function(){var a=this.hls;a.off(A.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(A.Events.LEVEL_LOADING,this.onLevelLoading,this),a.off(A.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),a.off(A.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},u.createInternalLoader=function(a){var n=this.hls.config,t=n.pLoader,_=n.loader,p=t||_,v=new p(n);return a.loader=v,this.loaders[a.type]=v,v},u.getInternalLoader=function(a){return this.loaders[a.type]},u.resetInternalLoader=function(a){this.loaders[a]&&delete this.loaders[a]},u.destroyInternalLoaders=function(){for(var a in this.loaders){var n=this.loaders[a];n&&n.destroy(),this.resetInternalLoader(a)}},u.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},u.onManifestLoading=function(a,n){var t=n.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:C.PlaylistContextType.MANIFEST,url:t,deliveryDirectives:null})},u.onLevelLoading=function(a,n){var t=n.id,_=n.level,p=n.url,v=n.deliveryDirectives;this.load({id:t,groupId:null,level:_,responseType:"text",type:C.PlaylistContextType.LEVEL,url:p,deliveryDirectives:v})},u.onAudioTrackLoading=function(a,n){var t=n.id,_=n.groupId,p=n.url,v=n.deliveryDirectives;this.load({id:t,groupId:_,level:null,responseType:"text",type:C.PlaylistContextType.AUDIO_TRACK,url:p,deliveryDirectives:v})},u.onSubtitleTrackLoading=function(a,n){var t=n.id,_=n.groupId,p=n.url,v=n.deliveryDirectives;this.load({id:t,groupId:_,level:null,responseType:"text",type:C.PlaylistContextType.SUBTITLE_TRACK,url:p,deliveryDirectives:v})},u.load=function(a){var n,t=this.hls.config,_=this.getInternalLoader(a);if(_){var p=_.context;if(p&&p.url===a.url){W.logger.trace("[playlist-loader]: playlist request ongoing");return}W.logger.log("[playlist-loader]: aborting previous loader for type: "+a.type),_.abort()}var v,x,T,b;switch(a.type){case C.PlaylistContextType.MANIFEST:v=t.manifestLoadingMaxRetry,x=t.manifestLoadingTimeOut,T=t.manifestLoadingRetryDelay,b=t.manifestLoadingMaxRetryTimeout;break;case C.PlaylistContextType.LEVEL:case C.PlaylistContextType.AUDIO_TRACK:case C.PlaylistContextType.SUBTITLE_TRACK:v=0,x=t.levelLoadingTimeOut;break;default:v=t.levelLoadingMaxRetry,x=t.levelLoadingTimeOut,T=t.levelLoadingRetryDelay,b=t.levelLoadingMaxRetryTimeout;break}if(_=this.createInternalLoader(a),(n=a.deliveryDirectives)!==null&&n!==void 0&&n.part){var d;if(a.type===C.PlaylistContextType.LEVEL&&a.level!==null?d=this.hls.levels[a.level].details:a.type===C.PlaylistContextType.AUDIO_TRACK&&a.id!==null?d=this.hls.audioTracks[a.id].details:a.type===C.PlaylistContextType.SUBTITLE_TRACK&&a.id!==null&&(d=this.hls.subtitleTracks[a.id].details),d){var g=d.partTarget,c=d.targetduration;g&&c&&(x=Math.min(Math.max(g*3,c*.8)*1e3,x))}}var y={timeout:x,maxRetry:v,retryDelay:T,maxRetryDelay:b,highWaterMark:0},r={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};_.load(a,y,r)},u.loadsuccess=function(a,n,t,_){if(_===void 0&&(_=null),t.isSidxRequest){this.handleSidxRequest(a,t),this.handlePlaylistLoaded(a,n,t,_);return}this.resetInternalLoader(t.type);var p=a.data;if(p.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(a,t,"no EXTM3U delimiter",_);return}n.parsing.start=performance.now(),p.indexOf("#EXTINF:")>0||p.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(a,n,t,_):this.handleMasterPlaylist(a,n,t,_)},u.loaderror=function(a,n,t){t===void 0&&(t=null),this.handleNetworkError(n,t,!1,a)},u.loadtimeout=function(a,n,t){t===void 0&&(t=null),this.handleNetworkError(n,t,!0)},u.handleMasterPlaylist=function(a,n,t,_){var p=this.hls,v=a.data,x=l(a,t),T=e.default.parseMasterPlaylist(v,x),b=T.levels,d=T.sessionData;if(!b.length){this.handleManifestParsingError(a,t,"no level found in manifest",_);return}var g=b.map(function(L){return{id:L.attrs.AUDIO,audioCodec:L.audioCodec}}),c=b.map(function(L){return{id:L.attrs.SUBTITLES,textCodec:L.textCodec}}),y=e.default.parseMasterPlaylistMedia(v,x,"AUDIO",g),r=e.default.parseMasterPlaylistMedia(v,x,"SUBTITLES",c),w=e.default.parseMasterPlaylistMedia(v,x,"CLOSED-CAPTIONS");if(y.length){var D=y.some(function(L){return!L.url});!D&&b[0].audioCodec&&!b[0].attrs.AUDIO&&(W.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),y.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new f.AttrList({}),bitrate:0,url:""}))}p.trigger(A.Events.MANIFEST_LOADED,{levels:b,audioTracks:y,subtitles:r,captions:w,url:x,stats:n,networkDetails:_,sessionData:d})},u.handleTrackOrLevelPlaylist=function(a,n,t,_){var p=this.hls,v=t.id,x=t.level,T=t.type,b=l(a,t),d=Object(U.isFiniteNumber)(v)?v:0,g=Object(U.isFiniteNumber)(x)?x:d,c=h(t),y=e.default.parseLevelPlaylist(a.data,b,g,c,d);if(!y.fragments.length){p.trigger(A.Events.ERROR,{type:I.ErrorTypes.NETWORK_ERROR,details:I.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:b,reason:"no fragments found in level",level:typeof t.level=="number"?t.level:void 0});return}if(T===C.PlaylistContextType.MANIFEST){var r={attrs:new f.AttrList({}),bitrate:0,details:y,name:"",url:b};p.trigger(A.Events.MANIFEST_LOADED,{levels:[r],audioTracks:[],url:b,stats:n,networkDetails:_,sessionData:null})}if(n.parsing.end=performance.now(),y.needSidxRanges){var w,D=(w=y.fragments[0].initSegment)===null||w===void 0?void 0:w.url;this.load({url:D,isSidxRequest:!0,type:T,level:x,levelDetails:y,id:v,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}t.levelDetails=y,this.handlePlaylistLoaded(a,n,t,_)},u.handleSidxRequest=function(a,n){var t=Object(j.parseSegmentIndex)(new Uint8Array(a.data));if(!t)return;var _=t.references,p=n.levelDetails;_.forEach(function(v,x){var T=v.info,b=p.fragments[x];b.byteRange.length===0&&b.setByteRange(String(1+T.end-T.start)+"@"+String(T.start)),b.initSegment&&b.initSegment.setByteRange(String(t.moovEndOffset)+"@0")})},u.handleManifestParsingError=function(a,n,t,_){this.hls.trigger(A.Events.ERROR,{type:I.ErrorTypes.NETWORK_ERROR,details:I.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:n.type===C.PlaylistContextType.MANIFEST,url:a.url,reason:t,response:a,context:n,networkDetails:_})},u.handleNetworkError=function(a,n,t,_){t===void 0&&(t=!1),W.logger.warn("[playlist-loader]: A network "+(t?"timeout":"error")+" occurred while loading "+a.type+" level: "+a.level+" id: "+a.id+' group-id: "'+a.groupId+'"');var p=I.ErrorDetails.UNKNOWN,v=!1,x=this.getInternalLoader(a);switch(a.type){case C.PlaylistContextType.MANIFEST:p=t?I.ErrorDetails.MANIFEST_LOAD_TIMEOUT:I.ErrorDetails.MANIFEST_LOAD_ERROR,v=!0;break;case C.PlaylistContextType.LEVEL:p=t?I.ErrorDetails.LEVEL_LOAD_TIMEOUT:I.ErrorDetails.LEVEL_LOAD_ERROR,v=!1;break;case C.PlaylistContextType.AUDIO_TRACK:p=t?I.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:I.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,v=!1;break;case C.PlaylistContextType.SUBTITLE_TRACK:p=t?I.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:I.ErrorDetails.SUBTITLE_LOAD_ERROR,v=!1;break}x&&this.resetInternalLoader(a.type);var T={type:I.ErrorTypes.NETWORK_ERROR,details:p,fatal:v,url:a.url,loader:x,context:a,networkDetails:n};_&&(T.response=_),this.hls.trigger(A.Events.ERROR,T)},u.handlePlaylistLoaded=function(a,n,t,_){var p=t.type,v=t.level,x=t.id,T=t.groupId,b=t.loader,d=t.levelDetails,g=t.deliveryDirectives;if(!(d!=null&&d.targetduration)){this.handleManifestParsingError(a,t,"invalid target duration",_);return}if(!b)return;d.live&&(b.getCacheAge&&(d.ageHeader=b.getCacheAge()||0),(!b.getCacheAge||isNaN(d.ageHeader))&&(d.ageHeader=0));switch(p){case C.PlaylistContextType.MANIFEST:case C.PlaylistContextType.LEVEL:this.hls.trigger(A.Events.LEVEL_LOADED,{details:d,level:v||0,id:x||0,stats:n,networkDetails:_,deliveryDirectives:g});break;case C.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(A.Events.AUDIO_TRACK_LOADED,{details:d,id:x||0,groupId:T||"",stats:n,networkDetails:_,deliveryDirectives:g});break;case C.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(A.Events.SUBTITLE_TRACK_LOADED,{details:d,id:x||0,groupId:T||"",stats:n,networkDetails:_,deliveryDirectives:g});break}},s}();P.default=i},"./src/polyfills/number.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"isFiniteNumber",function(){return U}),R.d(P,"MAX_SAFE_INTEGER",function(){return A});var U=Number.isFinite||function(I){return typeof I=="number"&&isFinite(I)},A=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(ee,P,R){"use strict";R.r(P);var U=function(){function A(){}return A.getSilentFrame=function(W,j){switch(W){case"mp4a.40.2":if(j===1)return new Uint8Array([0,200,0,128,35,128]);if(j===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(j===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(j===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(j===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(j===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(j===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(j===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(j===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}();P.default=U},"./src/remux/mp4-generator.ts":function(ee,P,R){"use strict";R.r(P);var U=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 j;for(j in I.types)I.types.hasOwnProperty(j)&&(I.types[j]=[j.charCodeAt(0),j.charCodeAt(1),j.charCodeAt(2),j.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 f=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),h=new Uint8Array([0,0,0,0,0,0,0,0]);I.STTS=I.STSC=I.STCO=h,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 l=new Uint8Array([105,115,111,109]),i=new Uint8Array([97,118,99,49]),s=new Uint8Array([0,0,0,1]);I.FTYP=I.box(I.types.ftyp,l,s,l,i),I.DINF=I.box(I.types.dinf,I.box(I.types.dref,f))},I.box=function(j){for(var e=8,C=arguments.length,f=new Array(C>1?C-1:0),h=1;h<C;h++)f[h-1]=arguments[h];for(var l=f.length,i=l;l--;)e+=f[l].byteLength;var s=new Uint8Array(e);for(s[0]=e>>24&255,s[1]=e>>16&255,s[2]=e>>8&255,s[3]=e&255,s.set(j,4),l=0,e=8;l<i;l++)s.set(f[l],e),e+=f[l].byteLength;return s},I.hdlr=function(j){return I.box(I.types.hdlr,I.HDLR_TYPES[j])},I.mdat=function(j){return I.box(I.types.mdat,j)},I.mdhd=function(j,e){e*=j;var C=Math.floor(e/(U+1)),f=Math.floor(e%(U+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,j>>24&255,j>>16&255,j>>8&255,j&255,C>>24,C>>16&255,C>>8&255,C&255,f>>24,f>>16&255,f>>8&255,f&255,85,196,0,0]))},I.mdia=function(j){return I.box(I.types.mdia,I.mdhd(j.timescale,j.duration),I.hdlr(j.type),I.minf(j))},I.mfhd=function(j){return I.box(I.types.mfhd,new Uint8Array([0,0,0,0,j>>24,j>>16&255,j>>8&255,j&255]))},I.minf=function(j){return j.type==="audio"?I.box(I.types.minf,I.box(I.types.smhd,I.SMHD),I.DINF,I.stbl(j)):I.box(I.types.minf,I.box(I.types.vmhd,I.VMHD),I.DINF,I.stbl(j))},I.moof=function(j,e,C){return I.box(I.types.moof,I.mfhd(j),I.traf(C,e))},I.moov=function(j){for(var e=j.length,C=[];e--;)C[e]=I.trak(j[e]);return I.box.apply(null,[I.types.moov,I.mvhd(j[0].timescale,j[0].duration)].concat(C).concat(I.mvex(j)))},I.mvex=function(j){for(var e=j.length,C=[];e--;)C[e]=I.trex(j[e]);return I.box.apply(null,[I.types.mvex].concat(C))},I.mvhd=function(j,e){e*=j;var C=Math.floor(e/(U+1)),f=Math.floor(e%(U+1)),h=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,j>>24&255,j>>16&255,j>>8&255,j&255,C>>24,C>>16&255,C>>8&255,C&255,f>>24,f>>16&255,f>>8&255,f&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,h)},I.sdtp=function(j){var e=j.samples||[],C=new Uint8Array(4+e.length),f,h;for(f=0;f<e.length;f++)h=e[f].flags,C[f+4]=h.dependsOn<<4|h.isDependedOn<<2|h.hasRedundancy;return I.box(I.types.sdtp,C)},I.stbl=function(j){return I.box(I.types.stbl,I.stsd(j),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(j){var e=[],C=[],f,h,l;for(f=0;f<j.sps.length;f++)h=j.sps[f],l=h.byteLength,e.push(l>>>8&255),e.push(l&255),e=e.concat(Array.prototype.slice.call(h));for(f=0;f<j.pps.length;f++)h=j.pps[f],l=h.byteLength,C.push(l>>>8&255),C.push(l&255),C=C.concat(Array.prototype.slice.call(h));var i=I.box(I.types.avcC,new Uint8Array([1,e[3],e[4],e[5],252|3,224|j.sps.length].concat(e).concat([j.pps.length]).concat(C))),s=j.width,u=j.height,o=j.pixelRatio[0],a=j.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,s>>8&255,s&255,u>>8&255,u&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]),i,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([o>>24,o>>16&255,o>>8&255,o&255,a>>24,a>>16&255,a>>8&255,a&255])))},I.esds=function(j){var e=j.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(j.config).concat([6,1,2]))},I.mp4a=function(j){var e=j.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,j.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]),I.box(I.types.esds,I.esds(j)))},I.mp3=function(j){var e=j.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,j.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]))},I.stsd=function(j){return j.type==="audio"?!j.isAAC&&j.codec==="mp3"?I.box(I.types.stsd,I.STSD,I.mp3(j)):I.box(I.types.stsd,I.STSD,I.mp4a(j)):I.box(I.types.stsd,I.STSD,I.avc1(j))},I.tkhd=function(j){var e=j.id,C=j.duration*j.timescale,f=j.width,h=j.height,l=Math.floor(C/(U+1)),i=Math.floor(C%(U+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,l>>24,l>>16&255,l>>8&255,l&255,i>>24,i>>16&255,i>>8&255,i&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,f>>8&255,f&255,0,0,h>>8&255,h&255,0,0]))},I.traf=function(j,e){var C=I.sdtp(j),f=j.id,h=Math.floor(e/(U+1)),l=Math.floor(e%(U+1));return I.box(I.types.traf,I.box(I.types.tfhd,new Uint8Array([0,0,0,0,f>>24,f>>16&255,f>>8&255,f&255])),I.box(I.types.tfdt,new Uint8Array([1,0,0,0,h>>24,h>>16&255,h>>8&255,h&255,l>>24,l>>16&255,l>>8&255,l&255])),I.trun(j,C.length+16+20+8+16+8+8),C)},I.trak=function(j){return j.duration=j.duration||4294967295,I.box(I.types.trak,I.tkhd(j),I.mdia(j))},I.trex=function(j){var e=j.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(j,e){var C=j.samples||[],f=C.length,h=12+16*f,l=new Uint8Array(h),i,s,u,o,a,n;for(e+=8+h,l.set([0,0,15,1,f>>>24&255,f>>>16&255,f>>>8&255,f&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255],0),i=0;i<f;i++)s=C[i],u=s.duration,o=s.size,a=s.flags,n=s.cts,l.set([u>>>24&255,u>>>16&255,u>>>8&255,u&255,o>>>24&255,o>>>16&255,o>>>8&255,o&255,a.isLeading<<2|a.dependsOn,a.isDependedOn<<6|a.hasRedundancy<<4|a.paddingValue<<1|a.isNonSync,a.degradPrio&240<<8,a.degradPrio&15,n>>>24&255,n>>>16&255,n>>>8&255,n&255],12+16*i);return I.box(I.types.trun,l)},I.initSegment=function(j){I.types||I.init();var e=I.moov(j),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,P.default=A},"./src/remux/mp4-remuxer.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"default",function(){return n}),R.d(P,"normalizePts",function(){return t});var U=R("./src/polyfills/number.ts"),A=R("./src/remux/aac-helper.ts"),I=R("./src/remux/mp4-generator.ts"),W=R("./src/events.ts"),j=R("./src/errors.ts"),e=R("./src/utils/logger.ts"),C=R("./src/types/loader.ts"),f=R("./src/utils/timescale-conversion.ts");function h(){return h=Object.assign||function(x){for(var T=1;T<arguments.length;T++){var b=arguments[T];for(var d in b)Object.prototype.hasOwnProperty.call(b,d)&&(x[d]=b[d])}return x},h.apply(this,arguments)}var l=10*1e3,i=1024,s=1152,u=null,o=null,a=!1,n=function(){function x(b,d,g,c){if(c===void 0&&(c=""),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=b,this.config=d,this.typeSupported=g,this.ISGenerated=!1,u===null){var y=navigator.userAgent||"",r=y.match(/Chrome\/(\d+)/i);u=r?parseInt(r[1]):0}if(o===null){var w=navigator.userAgent.match(/Safari\/(\d+)/i);o=w?parseInt(w[1]):0}a=!!u&&u<75||!!o&&o<600}var T=x.prototype;return T.destroy=function(){},T.resetTimeStamp=function(d){e.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=d},T.resetNextTimestamp=function(){e.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},T.resetInitSegment=function(){e.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},T.getVideoStartPts=function(d){var g=!1,c=d.reduce(function(y,r){var w=r.pts-y;return w<-4294967296?(g=!0,t(y,r.pts)):w>0?y:r.pts},d[0].pts);return g&&e.logger.debug("PTS rollover detected"),c},T.remux=function(d,g,c,y,r,w,D,L){var S,M,H,O,K,Y,ie=r,re=r,Te=d.pid>-1,_e=g.pid>-1,we=g.samples.length,Ce=d.samples.length>0,Re=we>1,ue=(!Te||Ce)&&(!_e||Re)||this.ISGenerated||D;if(ue){this.ISGenerated||(H=this.generateIS(d,g,r));var q=this.isVideoContiguous,Fe=-1;if(Re&&(Fe=_(g.samples),!q&&this.config.forceKeyFrameOnDiscontinuity))if(Y=!0,Fe>0){e.logger.warn("[mp4-remuxer]: Dropped "+Fe+" out of "+we+" video samples due to a missing keyframe");var We=this.getVideoStartPts(g.samples);g.samples=g.samples.slice(Fe),g.dropped+=Fe,re+=(g.samples[0].pts-We)/(g.timescale||9e4)}else Fe===-1&&(e.logger.warn("[mp4-remuxer]: No keyframe found out of "+we+" video samples"),Y=!1);if(this.ISGenerated){if(Ce&&Re){var He=this.getVideoStartPts(g.samples),Ge=t(d.samples[0].pts,He)-He,it=Ge/g.inputTimeScale;ie+=Math.max(0,it),re+=Math.max(0,-it)}if(Ce){if(d.samplerate||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),H=this.generateIS(d,g,r)),M=this.remuxAudio(d,ie,this.isAudioContiguous,w,_e||Re||L===C.PlaylistLevelType.AUDIO?re:void 0),Re){var De=M?M.endPTS-M.startPTS:0;g.inputTimeScale||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),H=this.generateIS(d,g,r)),S=this.remuxVideo(g,re,q,De)}}else Re&&(S=this.remuxVideo(g,re,q,0));S&&(S.firstKeyFrame=Fe,S.independent=Fe!==-1)}}return this.ISGenerated&&(c.samples.length&&(K=this.remuxID3(c,r)),y.samples.length&&(O=this.remuxText(y,r))),{audio:M,video:S,initSegment:H,independent:Y,text:O,id3:K}},T.generateIS=function(d,g,c){var y=d.samples,r=g.samples,w=this.typeSupported,D={},L=!Object(U.isFiniteNumber)(this._initPTS),S="audio/mp4",M,H,O;if(L&&(M=H=Infinity),d.config&&y.length&&(d.timescale=d.samplerate,d.isAAC||(w.mpeg?(S="audio/mpeg",d.codec=""):w.mp3&&(d.codec="mp3")),D.audio={id:"audio",container:S,codec:d.codec,initSegment:!d.isAAC&&w.mpeg?new Uint8Array(0):I.default.initSegment([d]),metadata:{channelCount:d.channelCount}},L&&(O=d.inputTimeScale,M=H=y[0].pts-Math.round(O*c))),g.sps&&g.pps&&r.length&&(g.timescale=g.inputTimeScale,D.video={id:"main",container:"video/mp4",codec:g.codec,initSegment:I.default.initSegment([g]),metadata:{width:g.width,height:g.height}},L)){O=g.inputTimeScale;var K=this.getVideoStartPts(r),Y=Math.round(O*c);H=Math.min(H,t(r[0].dts,K)-Y),M=Math.min(M,K-Y)}if(Object.keys(D).length)return this.ISGenerated=!0,L&&(this._initPTS=M,this._initDTS=H),{tracks:D,initPTS:M,timescale:O}},T.remuxVideo=function(d,g,c,y){var r=d.inputTimeScale,w=d.samples,D=[],L=w.length,S=this._initPTS,M=this.nextAvcDts,H=8,O,K,Y,ie=Number.POSITIVE_INFINITY,re=Number.NEGATIVE_INFINITY,Te=0,_e=!1;if(!c||M===null){var we=g*r,Ce=w[0].pts-t(w[0].dts,w[0].pts);M=we-Ce}for(var Re=0;Re<L;Re++){var ue=w[Re];if(ue.pts=t(ue.pts-S,M),ue.dts=t(ue.dts-S,M),ue.dts>ue.pts){var q=9e4*.2;Te=Math.max(Math.min(Te,ue.pts-ue.dts),-1*q)}ue.dts<w[Re>0?Re-1:Re].dts&&(_e=!0)}_e&&w.sort(function(gt,bt){var at=gt.dts-bt.dts,Et=gt.pts-bt.pts;return at||Et}),K=w[0].dts,Y=w[w.length-1].dts;var Fe=Math.round((Y-K)/(L-1));if(Te<0){if(Te<Fe*-2){e.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(f.toMsFromMpegTsClock)(-Fe,!0)+" ms");for(var We=Te,He=0;He<L;He++)w[He].dts=We=Math.max(We,w[He].pts-Fe),w[He].pts=Math.max(We,w[He].pts)}else{e.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(f.toMsFromMpegTsClock)(Te,!0)+" ms to overcome this issue");for(var Ge=0;Ge<L;Ge++)w[Ge].dts=w[Ge].dts+Te}K=w[0].dts}if(c){var it=K-M,De=it>Fe,Ue=it<-1;if(De||Ue){De?e.logger.warn("AVC: "+Object(f.toMsFromMpegTsClock)(it,!0)+" ms ("+it+"dts) hole between fragments detected, filling it"):e.logger.warn("AVC: "+Object(f.toMsFromMpegTsClock)(-it,!0)+" ms ("+it+"dts) overlapping between fragments detected"),K=M;var Xe=w[0].pts-it;w[0].dts=K,w[0].pts=Xe,e.logger.log("Video: First PTS/DTS adjusted: "+Object(f.toMsFromMpegTsClock)(Xe,!0)+"/"+Object(f.toMsFromMpegTsClock)(K,!0)+", delta: "+Object(f.toMsFromMpegTsClock)(it,!0)+" ms")}}a&&(K=Math.max(0,K));for(var $=0,me=0,xe=0;xe<L;xe++){for(var Ee=w[xe],Ie=Ee.units,Be=Ie.length,Je=0,ze=0;ze<Be;ze++)Je+=Ie[ze].data.length;me+=Je,$+=Be,Ee.length=Je,Ee.dts=Math.max(Ee.dts,K),Ee.pts=Math.max(Ee.pts,Ee.dts,0),ie=Math.min(Ee.pts,ie),re=Math.max(Ee.pts,re)}Y=w[L-1].dts;var ut=me+4*$+8,et;try{et=new Uint8Array(ut)}catch(gt){this.observer.emit(W.Events.ERROR,W.Events.ERROR,{type:j.ErrorTypes.MUX_ERROR,details:j.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ut,reason:"fail allocating video mdat "+ut});return}var Ze=new DataView(et.buffer);Ze.setUint32(0,ut),et.set(I.default.types.mdat,4);for(var Ve=0;Ve<L;Ve++){for(var Le=w[Ve],dt=Le.units,Ae=0,Ne=0,pe=dt.length;Ne<pe;Ne++){var he=dt[Ne],de=he.data,z=he.data.byteLength;Ze.setUint32(H,z),H+=4,et.set(de,H),H+=z,Ae+=4+z}if(Ve<L-1)O=w[Ve+1].dts-Le.dts;else{var J=this.config,Q=Le.dts-w[Ve>0?Ve-1:Ve].dts;if(J.stretchShortVideoTrack&&this.nextAudioPts!==null){var te=Math.floor(J.maxBufferHole*r),be=(y?ie+y*r:this.nextAudioPts)-Le.pts;be>te?(O=be-Q,O<0&&(O=Q),e.logger.log("[mp4-remuxer]: It is approximately "+be/90+" ms to the next segment; using duration "+O/90+" ms for the last video frame.")):O=Q}else O=Q}var Oe=Math.round(Le.pts-Le.dts);D.push(new p(Le.key,O,Ae,Oe))}if(D.length&&u&&u<70){var Pe=D[0].flags;Pe.dependsOn=2,Pe.isNonSync=0}console.assert(O!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=M=Y+O,this.isVideoContiguous=!0;var tt=I.default.moof(d.sequenceNumber++,K,h({},d,{samples:D})),ct="video",qe={data1:tt,data2:et,startPTS:ie/r,endPTS:(re+O)/r,startDTS:K/r,endDTS:M/r,type:ct,hasAudio:!1,hasVideo:!0,nb:D.length,dropped:d.dropped};return d.samples=[],d.dropped=0,console.assert(et.length,"MDAT length must not be zero"),qe},T.remuxAudio=function(d,g,c,y,r){var w=d.inputTimeScale,D=d.samplerate?d.samplerate:w,L=w/D,S=d.isAAC?i:s,M=S*L,H=this._initPTS,O=!d.isAAC&&this.typeSupported.mpeg,K=[],Y=d.samples,ie=O?0:8,re=this.nextAudioPts||-1,Te=g*w;if(this.isAudioContiguous=c=c||Y.length&&re>0&&(y&&Math.abs(Te-re)<9e3||Math.abs(t(Y[0].pts-H,Te)-re)<20*M),Y.forEach(function(de){de.pts=t(de.pts-H,Te)}),!c||re<0){if(Y=Y.filter(function(de){return de.pts>=0}),!Y.length)return;r===0?re=0:y?re=Math.max(0,Te):re=Y[0].pts}if(d.isAAC)for(var _e=r!==void 0,we=this.config.maxAudioFramesDrift,Ce=0,Re=re;Ce<Y.length;Ce++){var ue=Y[Ce],q=ue.pts,Fe=q-Re,We=Math.abs(1e3*Fe/w);if(Fe<=-we*M&&_e)Ce===0&&(e.logger.warn("Audio frame @ "+(q/w).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*Fe/w)+" ms."),this.nextAudioPts=re=Re=q);else if(Fe>=we*M&&We<l&&_e){var He=Math.round(Fe/M);Re=q-He*M,Re<0&&(He--,Re+=M),Ce===0&&(this.nextAudioPts=re=Re),e.logger.warn("[mp4-remuxer]: Injecting "+He+" audio frame @ "+(Re/w).toFixed(3)+"s due to "+Math.round(1e3*Fe/w)+" ms gap.");for(var Ge=0;Ge<He;Ge++){var it=Math.max(Re,0),De=A.default.getSilentFrame(d.manifestCodec||d.codec,d.channelCount);De||(e.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),De=ue.unit.subarray()),Y.splice(Ce,0,{unit:De,pts:it}),Re+=M,Ce++}}ue.pts=Re,Re+=M}for(var Ue=null,Xe=null,$,me=0,xe=Y.length;xe--;)me+=Y[xe].unit.byteLength;for(var Ee=0,Ie=Y.length;Ee<Ie;Ee++){var Be=Y[Ee],Je=Be.unit,ze=Be.pts;if(Xe!==null){var ut=K[Ee-1];ut.duration=Math.round((ze-Xe)/L)}else if(c&&d.isAAC&&(ze=re),Ue=ze,me>0){me+=ie;try{$=new Uint8Array(me)}catch(de){this.observer.emit(W.Events.ERROR,W.Events.ERROR,{type:j.ErrorTypes.MUX_ERROR,details:j.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:me,reason:"fail allocating audio mdat "+me});return}if(!O){var et=new DataView($.buffer);et.setUint32(0,me),$.set(I.default.types.mdat,4)}}else return;$.set(Je,ie);var Ze=Je.byteLength;ie+=Ze,K.push(new p(!0,S,Ze,0)),Xe=ze}var Ve=K.length;if(!Ve)return;var Le=K[K.length-1];this.nextAudioPts=re=Xe+L*Le.duration;var dt=O?new Uint8Array(0):I.default.moof(d.sequenceNumber++,Ue/L,h({},d,{samples:K}));d.samples=[];var Ae=Ue/w,Ne=re/w,pe="audio",he={data1:dt,data2:$,startPTS:Ae,endPTS:Ne,startDTS:Ae,endDTS:Ne,type:pe,hasAudio:!0,hasVideo:!1,nb:Ve};return this.isAudioContiguous=!0,console.assert($.length,"MDAT length must not be zero"),he},T.remuxEmptyAudio=function(d,g,c,y){var r=d.inputTimeScale,w=d.samplerate?d.samplerate:r,D=r/w,L=this.nextAudioPts,S=(L!==null?L:y.startDTS*r)+this._initDTS,M=y.endDTS*r+this._initDTS,H=D*i,O=Math.ceil((M-S)/H),K=A.default.getSilentFrame(d.manifestCodec||d.codec,d.channelCount);if(e.logger.warn("[mp4-remuxer]: remux empty Audio"),!K){e.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var Y=[],ie=0;ie<O;ie++){var re=S+ie*H;Y.push({unit:K,pts:re,dts:re})}return d.samples=Y,this.remuxAudio(d,g,c,!1)},T.remuxID3=function(d,g){var c=d.samples.length;if(!c)return;for(var y=d.inputTimeScale,r=this._initPTS,w=this._initDTS,D=0;D<c;D++){var L=d.samples[D];L.pts=t(L.pts-r,g*y)/y,L.dts=t(L.dts-w,g*y)/y}var S=d.samples;return d.samples=[],{samples:S}},T.remuxText=function(d,g){var c=d.samples.length;if(!c)return;for(var y=d.inputTimeScale,r=this._initPTS,w=0;w<c;w++){var D=d.samples[w];D.pts=t(D.pts-r,g*y)/y}d.samples.sort(function(S,M){return S.pts-M.pts});var L=d.samples;return d.samples=[],{samples:L}},x}();function t(x,T){var b;if(T===null)return x;for(T<x?b=-8589934592:b=8589934592;Math.abs(x-T)>4294967296;)x+=b;return x}function _(x){for(var T=0;T<x.length;T++)if(x[T].key)return T;return-1}var p=function(T,b,d,g){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=b,this.size=d,this.cts=g,this.flags=new v(T)},v=function(T){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=T?2:1,this.isNonSync=T?0:1}},"./src/remux/passthrough-remuxer.ts":function(ee,P,R){"use strict";R.r(P);var U=R("./src/polyfills/number.ts"),A=R("./src/utils/mp4-tools.ts"),I=R("./src/loader/fragment.ts"),W=R("./src/utils/logger.ts"),j=function(){function f(){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 h=f.prototype;return h.destroy=function(){},h.resetTimeStamp=function(i){this.initPTS=i,this.lastEndDTS=null},h.resetNextTimestamp=function(){this.lastEndDTS=null},h.resetInitSegment=function(i,s,u){this.audioCodec=s,this.videoCodec=u,this.generateInitSegment(i),this.emitInitSegment=!0},h.generateInitSegment=function(i){var s=this.audioCodec,u=this.videoCodec;if(!i||!i.byteLength){this.initTracks=void 0,this.initData=void 0;return}var o=this.initData=Object(A.parseInitSegment)(i);s||(s=C(o.audio,I.ElementaryStreamTypes.AUDIO)),u||(u=C(o.video,I.ElementaryStreamTypes.VIDEO));var a={};o.audio&&o.video?a.audiovideo={container:"video/mp4",codec:s+","+u,initSegment:i,id:"main"}:o.audio?a.audio={container:"audio/mp4",codec:s,initSegment:i,id:"audio"}:o.video?a.video={container:"video/mp4",codec:u,initSegment:i,id:"main"}:W.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=a},h.remux=function(i,s,u,o,a){var n=this.initPTS,t=this.lastEndDTS,_={audio:void 0,video:void 0,text:o,id3:u,initSegment:void 0};Object(U.isFiniteNumber)(t)||(t=this.lastEndDTS=a||0);var p=s.samples;if(!p||!p.length)return _;var v={initPTS:void 0,timescale:1},x=this.initData;if((!x||!x.length)&&(this.generateInitSegment(p),x=this.initData),!x||!x.length)return W.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),_;this.emitInitSegment&&(v.tracks=this.initTracks,this.emitInitSegment=!1),Object(U.isFiniteNumber)(n)||(this.initPTS=v.initPTS=n=e(x,p,t));var T=Object(A.getDuration)(p,x),b=t,d=T+b;Object(A.offsetStartDTS)(x,p,n),T>0?this.lastEndDTS=d:(W.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var g=!!x.audio,c=!!x.video,y="";g&&(y+="audio"),c&&(y+="video");var r={data1:p,startPTS:b,startDTS:b,endPTS:d,endDTS:d,type:y,hasAudio:g,hasVideo:c,nb:1,dropped:0};return _.audio=r.type==="audio"?r:void 0,_.video=r.type!=="audio"?r:void 0,_.text=o,_.id3=u,_.initSegment=v,_},f}(),e=function(h,l,i){return Object(A.getStartDTS)(h,l)-i};function C(f,h){var l=f==null?void 0:f.codec;return l&&l.length>4?l:l==="hvc1"?"hvc1.1.c.L120.90":l==="av01"?"av01.0.04M.08":l==="avc1"||h===I.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}P.default=j},"./src/task-loop.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"default",function(){return U});var U=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(j){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,j),!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(ee,P,R){"use strict";R.r(P),R.d(P,"CMCDVersion",function(){return U}),R.d(P,"CMCDObjectType",function(){return A}),R.d(P,"CMCDStreamingFormat",function(){return I}),R.d(P,"CMCDStreamType",function(){return W});var U=1,A;(function(j){j.MANIFEST="m",j.AUDIO="a",j.VIDEO="v",j.MUXED="av",j.INIT="i",j.CAPTION="c",j.TIMED_TEXT="tt",j.KEY="k",j.OTHER="o"})(A||(A={}));var I;(function(j){j.DASH="d",j.HLS="h",j.SMOOTH="s",j.OTHER="o"})(I||(I={}));var W;(function(j){j.VOD="v",j.LIVE="l"})(W||(W={}))},"./src/types/level.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"HlsSkip",function(){return I}),R.d(P,"getSkipValue",function(){return W}),R.d(P,"HlsUrlParameters",function(){return j}),R.d(P,"Level",function(){return e});function U(C,f){for(var h=0;h<f.length;h++){var l=f[h];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(C,l.key,l)}}function A(C,f,h){return f&&U(C.prototype,f),h&&U(C,h),C}var I;(function(C){C.No="",C.Yes="YES",C.v2="v2"})(I||(I={}));function W(C,f){var h=C.canSkipUntil,l=C.canSkipDateRanges,i=C.endSN,s=f!==void 0?f-i:0;return h&&s<h?l?I.v2:I.Yes:I.No}var j=function(){function C(h,l,i){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=h,this.part=l,this.skip=i}var f=C.prototype;return f.addDirectives=function(l){var i=new self.URL(l);return this.msn!==void 0&&i.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&i.searchParams.set("_HLS_part",this.part.toString()),this.skip&&i.searchParams.set("_HLS_skip",this.skip),i.toString()},C}(),e=function(){function C(f){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=[f.url],this.attrs=f.attrs,this.bitrate=f.bitrate,f.details&&(this.details=f.details),this.id=f.id||0,this.name=f.name,this.width=f.width||0,this.height=f.height||0,this.audioCodec=f.audioCodec,this.videoCodec=f.videoCodec,this.unknownCodecs=f.unknownCodecs,this.codecSet=[f.videoCodec,f.audioCodec].filter(function(h){return h}).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(h){var l=h%this.url.length;this._urlId!==l&&(this.details=void 0,this._urlId=l)}}]),C}()},"./src/types/loader.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"PlaylistContextType",function(){return U}),R.d(P,"PlaylistLevelType",function(){return A});var U;(function(I){I.MANIFEST="manifest",I.LEVEL="level",I.AUDIO_TRACK="audioTrack",I.SUBTITLE_TRACK="subtitleTrack"})(U||(U={}));var A;(function(I){I.MAIN="main",I.AUDIO="audio",I.SUBTITLE="subtitle"})(A||(A={}))},"./src/types/transmuxer.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"ChunkMetadata",function(){return U});var U=function(W,j,e,C,f,h){C===void 0&&(C=0),f===void 0&&(f=-1),h===void 0&&(h=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=A(),this.buffering={audio:A(),video:A(),audiovideo:A()},this.level=W,this.sn=j,this.id=e,this.size=C,this.part=f,this.partial=h};function A(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"AttrList",function(){return I});var U=/^(\d+)x(\d+)$/,A=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,I=function(){function W(e){typeof e=="string"&&(e=W.parseAttrList(e));for(var C in e)e.hasOwnProperty(C)&&(this[C]=e[C])}var j=W.prototype;return j.decimalInteger=function(C){var f=parseInt(this[C],10);return f>Number.MAX_SAFE_INTEGER?Infinity:f},j.hexadecimalInteger=function(C){if(this[C]){var f=(this[C]||"0x").slice(2);f=(f.length&1?"0":"")+f;for(var h=new Uint8Array(f.length/2),l=0;l<f.length/2;l++)h[l]=parseInt(f.slice(l*2,l*2+2),16);return h}else return null},j.hexadecimalIntegerAsNumber=function(C){var f=parseInt(this[C],16);return f>Number.MAX_SAFE_INTEGER?Infinity:f},j.decimalFloatingPoint=function(C){return parseFloat(this[C])},j.optionalFloat=function(C,f){var h=this[C];return h?parseFloat(h):f},j.enumeratedString=function(C){return this[C]},j.bool=function(C){return this[C]==="YES"},j.decimalResolution=function(C){var f=U.exec(this[C]);return f===null?void 0:{width:parseInt(f[1],10),height:parseInt(f[2],10)}},W.parseAttrList=function(C){var f,h={},l='"';for(A.lastIndex=0;(f=A.exec(C))!==null;){var i=f[2];i.indexOf(l)===0&&i.lastIndexOf(l)===i.length-1&&(i=i.slice(1,-1)),h[f[1]]=i}return h},W}()},"./src/utils/binary-search.ts":function(ee,P,R){"use strict";R.r(P);var U={search:function(I,W){for(var j=0,e=I.length-1,C=null,f=null;j<=e;){C=(j+e)/2|0,f=I[C];var h=W(f);if(h>0)j=C+1;else if(h<0)e=C-1;else return f}return null}};P.default=U},"./src/utils/buffer-helper.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"BufferHelper",function(){return I});var U=R("./src/utils/logger.ts"),A={length:0,start:function(){return 0},end:function(){return 0}},I=function(){function W(){}return W.isBuffered=function(e,C){try{if(e){for(var f=W.getBuffered(e),h=0;h<f.length;h++)if(C>=f.start(h)&&C<=f.end(h))return!0}}catch(l){}return!1},W.bufferInfo=function(e,C,f){try{if(e){var h=W.getBuffered(e),l=[],i;for(i=0;i<h.length;i++)l.push({start:h.start(i),end:h.end(i)});return this.bufferedInfo(l,C,f)}}catch(s){}return{len:0,start:C,end:C,nextStart:void 0}},W.bufferedInfo=function(e,C,f){C=Math.max(0,C),e.sort(function(v,x){var T=v.start-x.start;return T||x.end-v.end});var h=[];if(f)for(var l=0;l<e.length;l++){var i=h.length;if(i){var s=h[i-1].end;e[l].start-s<f?e[l].end>s&&(h[i-1].end=e[l].end):h.push(e[l])}else h.push(e[l])}else h=e;for(var u=0,o,a=C,n=C,t=0;t<h.length;t++){var _=h[t].start,p=h[t].end;if(C+f>=_&&C<p)a=_,n=p,u=n-C;else if(C+f<_){o=_;break}}return{len:u,start:a||0,end:n||0,nextStart:o}},W.getBuffered=function(e){try{return e.buffered}catch(C){return U.logger.log("failed to get media.buffered",C),A}},W}()},"./src/utils/cea-608-parser.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"Row",function(){return n}),R.d(P,"CaptionScreen",function(){return t});var U=R("./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(d){var g=d;return A.hasOwnProperty(d)&&(g=A[d]),String.fromCharCode(g)},W=15,j=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},f={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},h={25:2,26:4,29:6,30:8,31:10,27:13,28:15},l=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],i;(function(b){b[b.ERROR=0]="ERROR",b[b.TEXT=1]="TEXT",b[b.WARNING=2]="WARNING",b[b.INFO=2]="INFO",b[b.DEBUG=3]="DEBUG",b[b.DATA=3]="DATA"})(i||(i={}));var s=function(){function b(){this.time=null,this.verboseLevel=i.ERROR}var d=b.prototype;return d.log=function(c,y){this.verboseLevel>=c&&U.logger.log(this.time+" ["+c+"] "+y)},b}(),u=function(d){for(var g=[],c=0;c<d.length;c++)g.push(d[c].toString(16));return g},o=function(){function b(g,c,y,r,w){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=g||"white",this.underline=c||!1,this.italics=y||!1,this.background=r||"black",this.flash=w||!1}var d=b.prototype;return d.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},d.setStyles=function(c){for(var y=["foreground","underline","italics","background","flash"],r=0;r<y.length;r++){var w=y[r];c.hasOwnProperty(w)&&(this[w]=c[w])}},d.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},d.equals=function(c){return this.foreground===c.foreground&&this.underline===c.underline&&this.italics===c.italics&&this.background===c.background&&this.flash===c.flash},d.copy=function(c){this.foreground=c.foreground,this.underline=c.underline,this.italics=c.italics,this.background=c.background,this.flash=c.flash},d.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},b}(),a=function(){function b(g,c,y,r,w,D){this.uchar=void 0,this.penState=void 0,this.uchar=g||" ",this.penState=new o(c,y,r,w,D)}var d=b.prototype;return d.reset=function(){this.uchar=" ",this.penState.reset()},d.setChar=function(c,y){this.uchar=c,this.penState.copy(y)},d.setPenState=function(c){this.penState.copy(c)},d.equals=function(c){return this.uchar===c.uchar&&this.penState.equals(c.penState)},d.copy=function(c){this.uchar=c.uchar,this.penState.copy(c.penState)},d.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},b}(),n=function(){function b(g){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var c=0;c<j;c++)this.chars.push(new a);this.logger=g,this.pos=0,this.currPenState=new o}var d=b.prototype;return d.equals=function(c){for(var y=!0,r=0;r<j;r++)if(!this.chars[r].equals(c.chars[r])){y=!1;break}return y},d.copy=function(c){for(var y=0;y<j;y++)this.chars[y].copy(c.chars[y])},d.isEmpty=function(){for(var c=!0,y=0;y<j;y++)if(!this.chars[y].isEmpty()){c=!1;break}return c},d.setCursor=function(c){this.pos!==c&&(this.pos=c),this.pos<0?(this.logger.log(i.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>j&&(this.logger.log(i.DEBUG,"Too large cursor position "+this.pos),this.pos=j)},d.moveCursor=function(c){var y=this.pos+c;if(c>1)for(var r=this.pos+1;r<y+1;r++)this.chars[r].setPenState(this.currPenState);this.setCursor(y)},d.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},d.insertChar=function(c){c>=144&&this.backSpace();var y=I(c);if(this.pos>=j){this.logger.log(i.ERROR,"Cannot insert "+c.toString(16)+" ("+y+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(y,this.currPenState),this.moveCursor(1)},d.clearFromPos=function(c){var y;for(y=c;y<j;y++)this.chars[y].reset()},d.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},d.clearToEndOfRow=function(){this.clearFromPos(this.pos)},d.getTextString=function(){for(var c=[],y=!0,r=0;r<j;r++){var w=this.chars[r].uchar;w!==" "&&(y=!1),c.push(w)}return y?"":c.join("")},d.setPenStyles=function(c){this.currPenState.setStyles(c);var y=this.chars[this.pos];y.setPenState(this.currPenState)},b}(),t=function(){function b(g){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var c=0;c<W;c++)this.rows.push(new n(g));this.logger=g,this.currRow=W-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var d=b.prototype;return d.reset=function(){for(var c=0;c<W;c++)this.rows[c].clear();this.currRow=W-1},d.equals=function(c){for(var y=!0,r=0;r<W;r++)if(!this.rows[r].equals(c.rows[r])){y=!1;break}return y},d.copy=function(c){for(var y=0;y<W;y++)this.rows[y].copy(c.rows[y])},d.isEmpty=function(){for(var c=!0,y=0;y<W;y++)if(!this.rows[y].isEmpty()){c=!1;break}return c},d.backSpace=function(){var c=this.rows[this.currRow];c.backSpace()},d.clearToEndOfRow=function(){var c=this.rows[this.currRow];c.clearToEndOfRow()},d.insertChar=function(c){var y=this.rows[this.currRow];y.insertChar(c)},d.setPen=function(c){var y=this.rows[this.currRow];y.setPenStyles(c)},d.moveCursor=function(c){var y=this.rows[this.currRow];y.moveCursor(c)},d.setCursor=function(c){this.logger.log(i.INFO,"setCursor: "+c);var y=this.rows[this.currRow];y.setCursor(c)},d.setPAC=function(c){this.logger.log(i.INFO,"pacData = "+JSON.stringify(c));var y=c.row-1;if(this.nrRollUpRows&&y<this.nrRollUpRows-1&&(y=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==y){for(var r=0;r<W;r++)this.rows[r].clear();var w=this.currRow+1-this.nrRollUpRows,D=this.lastOutputScreen;if(D){var L=D.rows[w].cueStartTime,S=this.logger.time;if(L&&S!==null&&L<S)for(var M=0;M<this.nrRollUpRows;M++)this.rows[y-this.nrRollUpRows+M+1].copy(D.rows[w+M])}}this.currRow=y;var H=this.rows[this.currRow];if(c.indent!==null){var O=c.indent,K=Math.max(O-1,0);H.setCursor(c.indent),c.color=H.chars[K].penState.foreground}var Y={foreground:c.color,underline:c.underline,italics:c.italics,background:"black",flash:!1};this.setPen(Y)},d.setBkgData=function(c){this.logger.log(i.INFO,"bkgData = "+JSON.stringify(c)),this.backSpace(),this.setPen(c),this.insertChar(32)},d.setRollUpRows=function(c){this.nrRollUpRows=c},d.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(i.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(i.TEXT,this.getDisplayText());var c=this.currRow+1-this.nrRollUpRows,y=this.rows.splice(c,1)[0];y.clear(),this.rows.splice(this.currRow,0,y),this.logger.log(i.INFO,"Rolling up")},d.getDisplayText=function(c){c=c||!1;for(var y=[],r="",w=-1,D=0;D<W;D++){var L=this.rows[D].getTextString();L&&(w=D+1,c?y.push("Row "+w+": '"+L+"'"):y.push(L.trim()))}return y.length>0&&(c?r="["+y.join(" | ")+"]":r=y.join(`
|
|
`)),r},d.getTextAndFormat=function(){return this.rows},b}(),_=function(){function b(g,c,y){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=g,this.outputFilter=c,this.mode=null,this.verbose=0,this.displayedMemory=new t(y),this.nonDisplayedMemory=new t(y),this.lastOutputScreen=new t(y),this.currRollUpRow=this.displayedMemory.rows[W-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=y}var d=b.prototype;return d.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[W-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},d.getHandler=function(){return this.outputFilter},d.setHandler=function(c){this.outputFilter=c},d.setPAC=function(c){this.writeScreen.setPAC(c)},d.setBkgData=function(c){this.writeScreen.setBkgData(c)},d.setMode=function(c){if(c===this.mode)return;this.mode=c,this.logger.log(i.INFO,"MODE="+c),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=c},d.insertChars=function(c){for(var y=0;y<c.length;y++)this.writeScreen.insertChar(c[y]);var r=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(i.INFO,r+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(i.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},d.ccRCL=function(){this.logger.log(i.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},d.ccBS=function(){if(this.logger.log(i.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},d.ccAOF=function(){},d.ccAON=function(){},d.ccDER=function(){this.logger.log(i.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},d.ccRU=function(c){this.logger.log(i.INFO,"RU("+c+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(c)},d.ccFON=function(){this.logger.log(i.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},d.ccRDC=function(){this.logger.log(i.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},d.ccTR=function(){this.logger.log(i.INFO,"TR"),this.setMode("MODE_TEXT")},d.ccRTD=function(){this.logger.log(i.INFO,"RTD"),this.setMode("MODE_TEXT")},d.ccEDM=function(){this.logger.log(i.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},d.ccCR=function(){this.logger.log(i.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},d.ccENM=function(){this.logger.log(i.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},d.ccEOC=function(){if(this.logger.log(i.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var c=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=c,this.writeScreen=this.nonDisplayedMemory,this.logger.log(i.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},d.ccTO=function(c){this.logger.log(i.INFO,"TO("+c+") - Tab Offset"),this.writeScreen.moveCursor(c)},d.ccMIDROW=function(c){var y={flash:!1};if(y.underline=c%2===1,y.italics=c>=46,y.italics)y.foreground="white";else{var r=Math.floor(c/2)-16,w=["white","green","blue","cyan","red","yellow","magenta"];y.foreground=w[r]}this.logger.log(i.INFO,"MIDROW: "+JSON.stringify(y)),this.writeScreen.setPen(y)},d.outputDataUpdate=function(c){c===void 0&&(c=!1);var y=this.logger.time;if(y===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=y:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,y,this.lastOutputScreen),c&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:y),this.lastOutputScreen.copy(this.displayedMemory))},d.cueSplitAtTime=function(c){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,c,this.displayedMemory),this.cueStartTime=c))},b}(),p=function(){function b(g,c,y){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var r=new s;this.channels=[null,new _(g,c,r),new _(g+1,y,r)],this.cmdHistory=T(),this.logger=r}var d=b.prototype;return d.getHandler=function(c){return this.channels[c].getHandler()},d.setHandler=function(c,y){this.channels[c].setHandler(y)},d.addData=function(c,y){var r,w,D,L=!1;this.logger.time=c;for(var S=0;S<y.length;S+=2){if(w=y[S]&127,D=y[S+1]&127,w===0&&D===0)continue;if(this.logger.log(i.DATA,"["+u([y[S],y[S+1]])+"] -> ("+u([w,D])+")"),r=this.parseCmd(w,D),r||(r=this.parseMidrow(w,D)),r||(r=this.parsePAC(w,D)),r||(r=this.parseBackgroundAttributes(w,D)),!r&&(L=this.parseChars(w,D),L)){var M=this.currentChannel;if(M&&M>0){var H=this.channels[M];H.insertChars(L)}else this.logger.log(i.WARNING,"No channel found yet. TEXT-MODE?")}!r&&!L&&this.logger.log(i.WARNING,"Couldn't parse cleaned data "+u([w,D])+" orig: "+u([y[S],y[S+1]]))}},d.parseCmd=function(c,y){var r=this.cmdHistory,w=(c===20||c===28||c===21||c===29)&&y>=32&&y<=47,D=(c===23||c===31)&&y>=33&&y<=35;if(!(w||D))return!1;if(x(c,y,r))return v(null,null,r),this.logger.log(i.DEBUG,"Repeated command ("+u([c,y])+") is dropped"),!0;var L=c===20||c===21||c===23?1:2,S=this.channels[L];return c===20||c===21||c===28||c===29?y===32?S.ccRCL():y===33?S.ccBS():y===34?S.ccAOF():y===35?S.ccAON():y===36?S.ccDER():y===37?S.ccRU(2):y===38?S.ccRU(3):y===39?S.ccRU(4):y===40?S.ccFON():y===41?S.ccRDC():y===42?S.ccTR():y===43?S.ccRTD():y===44?S.ccEDM():y===45?S.ccCR():y===46?S.ccENM():y===47&&S.ccEOC():S.ccTO(y-32),v(c,y,r),this.currentChannel=L,!0},d.parseMidrow=function(c,y){var r=0;if((c===17||c===25)&&y>=32&&y<=47){if(c===17?r=1:r=2,r!==this.currentChannel)return this.logger.log(i.ERROR,"Mismatch channel in midrow parsing"),!1;var w=this.channels[r];return w?(w.ccMIDROW(y),this.logger.log(i.DEBUG,"MIDROW ("+u([c,y])+")"),!0):!1}return!1},d.parsePAC=function(c,y){var r,w=this.cmdHistory,D=(c>=17&&c<=23||c>=25&&c<=31)&&y>=64&&y<=127,L=(c===16||c===24)&&y>=64&&y<=95;if(!(D||L))return!1;if(x(c,y,w))return v(null,null,w),!0;var S=c<=23?1:2;y>=64&&y<=95?r=S===1?e[c]:f[c]:r=S===1?C[c]:h[c];var M=this.channels[S];return M?(M.setPAC(this.interpretPAC(r,y)),v(c,y,w),this.currentChannel=S,!0):!1},d.interpretPAC=function(c,y){var r,w={color:null,italics:!1,indent:null,underline:!1,row:c};return y>95?r=y-96:r=y-64,w.underline=(r&1)===1,r<=13?w.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(w.italics=!0,w.color="white"):w.indent=Math.floor((r-16)/2)*4,w},d.parseChars=function(c,y){var r,w=null,D=null;if(c>=25?(r=2,D=c-8):(r=1,D=c),D>=17&&D<=19){var L;D===17?L=y+80:D===18?L=y+112:L=y+144,this.logger.log(i.INFO,"Special char '"+I(L)+"' in channel "+r),w=[L]}else c>=32&&c<=127&&(w=y===0?[c]:[c,y]);if(w){var S=u(w);this.logger.log(i.DEBUG,"Char codes = "+S.join(",")),v(c,y,this.cmdHistory)}return w},d.parseBackgroundAttributes=function(c,y){var r=(c===16||c===24)&&y>=32&&y<=47,w=(c===23||c===31)&&y>=45&&y<=47;if(!(r||w))return!1;var D,L={};c===16||c===24?(D=Math.floor((y-32)/2),L.background=l[D],y%2===1&&(L.background=L.background+"_semi")):y===45?L.background="transparent":(L.foreground="black",y===47&&(L.underline=!0));var S=c<=23?1:2,M=this.channels[S];return M.setBkgData(L),v(c,y,this.cmdHistory),!0},d.reset=function(){for(var c=0;c<Object.keys(this.channels).length;c++){var y=this.channels[c];y&&y.reset()}this.cmdHistory=T()},d.cueSplitAtTime=function(c){for(var y=0;y<this.channels.length;y++){var r=this.channels[y];r&&r.cueSplitAtTime(c)}},b}();function v(b,d,g){g.a=b,g.b=d}function x(b,d,g){return g.a===b&&g.b===d}function T(){return{a:null,b:null}}P.default=p},"./src/utils/codecs.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"isCodecType",function(){return A}),R.d(P,"isCodecSupportedInMp4",function(){return I});var U={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(W,j){var e=U[j];return!!e&&e[W.slice(0,4)]===!0}function I(W,j){return MediaSource.isTypeSupported((j||"video")+'/mp4;codecs="'+W+'"')}},"./src/utils/cues.ts":function(ee,P,R){"use strict";R.r(P);var U=R("./src/utils/vttparser.ts"),A=R("./src/utils/webvtt-parser.ts"),I=R("./src/utils/texttrack-utils.ts"),W=/\s/,j={newCue:function(C,f,h,l){for(var i=[],s,u,o,a,n,t=self.VTTCue||self.TextTrackCue,_=0;_<l.rows.length;_++)if(s=l.rows[_],o=!0,a=0,n="",!s.isEmpty()){for(var p=0;p<s.chars.length;p++)W.test(s.chars[p].uchar)&&o?a++:(n+=s.chars[p].uchar,o=!1);s.cueStartTime=f,f===h&&(h+=1e-4),a>=16?a--:a++;var v=Object(U.fixLineBreaks)(n.trim()),x=Object(A.generateCueId)(f,h,v);(!C||!C.cues||!C.cues.getCueById(x))&&(u=new t(f,h,v),u.id=x,u.line=_+1,u.align="left",u.position=10+Math.min(80,Math.floor(a*8/32)*10),i.push(u))}return C&&i.length&&(i.sort(function(T,b){return T.line==="auto"||b.line==="auto"?0:T.line>8&&b.line>8?b.line-T.line:T.line-b.line}),i.forEach(function(T){return Object(I.addCueToTrack)(C,T)})),i}};P.default=j},"./src/utils/discontinuities.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"findFirstFragWithCC",function(){return W}),R.d(P,"shouldAlignOnDiscontinuities",function(){return j}),R.d(P,"findDiscontinuousReferenceFrag",function(){return e}),R.d(P,"adjustSlidingStart",function(){return f}),R.d(P,"alignStream",function(){return h}),R.d(P,"alignPDT",function(){return i}),R.d(P,"alignFragmentByPDTDelta",function(){return s}),R.d(P,"alignMediaPlaylistByPDT",function(){return u});var U=R("./src/polyfills/number.ts"),A=R("./src/utils/logger.ts"),I=R("./src/controller/level-helper.ts");function W(o,a){for(var n=null,t=0,_=o.length;t<_;t++){var p=o[t];if(p&&p.cc===a){n=p;break}}return n}function j(o,a,n){return!!(a.details&&(n.endCC>n.startCC||o&&o.cc<n.startCC))}function e(o,a){var n=o.fragments,t=a.fragments;if(!t.length||!n.length){A.logger.log("No fragments to align");return}var _=W(n,t[0].cc);if(!_||_&&!_.startPTS){A.logger.log("No frag in previous level to align on");return}return _}function C(o,a){if(o){var n=o.start+a;o.start=o.startPTS=n,o.endPTS=n+o.duration}}function f(o,a){for(var n=a.fragments,t=0,_=n.length;t<_;t++)C(n[t],o);a.fragmentHint&&C(a.fragmentHint,o),a.alignedSliding=!0}function h(o,a,n){if(!a)return;l(o,n,a),!n.alignedSliding&&a.details&&i(n,a.details),!n.alignedSliding&&a.details&&!n.skippedSegments&&Object(I.adjustSliding)(a.details,n)}function l(o,a,n){if(j(o,n,a)){var t=e(n.details,a);t&&Object(U.isFiniteNumber)(t.start)&&(A.logger.log("Adjusting PTS using last level due to CC increase within current level "+a.url),f(t.start,a))}}function i(o,a){if(!a.fragments.length||!o.hasProgramDateTime||!a.hasProgramDateTime)return;var n=a.fragments[0].programDateTime,t=o.fragments[0].programDateTime,_=(t-n)/1e3+a.fragments[0].start;_&&Object(U.isFiniteNumber)(_)&&(A.logger.log("Adjusting PTS using programDateTime delta "+(t-n)+"ms, sliding:"+_.toFixed(3)+" "+o.url+" "),f(_,o))}function s(o,a){var n=o.programDateTime;if(!n)return;var t=(n-a)/1e3;o.start=o.startPTS=t,o.endPTS=t+o.duration}function u(o,a){if(!a.fragments.length||!o.hasProgramDateTime||!a.hasProgramDateTime)return;var n=a.fragments[0].programDateTime,t=a.fragments[0].start,_=n-t*1e3;o.fragments.forEach(function(p){s(p,_)}),o.fragmentHint&&s(o.fragmentHint,_),o.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(ee,P,R){"use strict";R.r(P);var U=R("./src/utils/ewma.ts"),A=function(){function I(j,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 U.default(j),this.fast_=new U.default(e)}var W=I.prototype;return W.update=function(e,C){var f=this.slow_,h=this.fast_;this.slow_.halfLife!==e&&(this.slow_=new U.default(e,f.getEstimate(),f.getTotalWeight())),this.fast_.halfLife!==C&&(this.fast_=new U.default(C,h.getEstimate(),h.getTotalWeight()))},W.sample=function(e,C){e=Math.max(e,this.minDelayMs_);var f=8*C,h=e/1e3,l=f/h;this.fast_.sample(h,l),this.slow_.sample(h,l)},W.canEstimate=function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_},W.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},W.destroy=function(){},I}();P.default=A},"./src/utils/ewma.ts":function(ee,P,R){"use strict";R.r(P);var U=function(){function A(W,j,e){j===void 0&&(j=0),e===void 0&&(e=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=W,this.alpha_=W?Math.exp(Math.log(.5)/W):0,this.estimate_=j,this.totalWeight_=e}var I=A.prototype;return I.sample=function(j,e){var C=Math.pow(this.alpha_,j);this.estimate_=e*(1-C)+C*this.estimate_,this.totalWeight_+=j},I.getTotalWeight=function(){return this.totalWeight_},I.getEstimate=function(){if(this.alpha_){var j=1-Math.pow(this.alpha_,this.totalWeight_);if(j)return this.estimate_/j}return this.estimate_},A}();P.default=U},"./src/utils/fetch-loader.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"fetchSupported",function(){return s});var U=R("./src/polyfills/number.ts"),A=R("./src/loader/load-stats.ts"),I=R("./src/demux/chunk-cache.ts");function W(t,_){t.prototype=Object.create(_.prototype),t.prototype.constructor=t,h(t,_)}function j(t){var _=typeof Map=="function"?new Map:void 0;return j=function(v){if(v===null||!f(v))return v;if(typeof v!="function")throw new TypeError("Super expression must either be null or a function");if(typeof _!="undefined"){if(_.has(v))return _.get(v);_.set(v,x)}function x(){return e(v,arguments,l(this).constructor)}return x.prototype=Object.create(v.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),h(x,v)},j(t)}function e(t,_,p){return C()?e=Reflect.construct:e=function(x,T,b){var d=[null];d.push.apply(d,T);var g=Function.bind.apply(x,d),c=new g;return b&&h(c,b.prototype),c},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 f(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function h(t,_){return h=Object.setPrototypeOf||function(v,x){return v.__proto__=x,v},h(t,_)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(p){return p.__proto__||Object.getPrototypeOf(p)},l(t)}function i(){return i=Object.assign||function(t){for(var _=1;_<arguments.length;_++){var p=arguments[_];for(var v in p)Object.prototype.hasOwnProperty.call(p,v)&&(t[v]=p[v])}return t},i.apply(this,arguments)}function s(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(t){}return!1}var u=function(){function t(p){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=p.fetchSetup||a,this.controller=new self.AbortController,this.stats=new A.LoadStats}var _=t.prototype;return _.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},_.abortInternal=function(){var v=this.response;(!v||!v.ok)&&(this.stats.aborted=!0,this.controller.abort())},_.abort=function(){var v;this.abortInternal(),(v=this.callbacks)!==null&&v!==void 0&&v.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},_.load=function(v,x,T){var b=this,d=this.stats;if(d.loading.start)throw new Error("Loader can only be used once.");d.loading.start=self.performance.now();var g=o(v,this.controller.signal),c=T.onProgress,y=v.responseType==="arraybuffer",r=y?"byteLength":"length";this.context=v,this.config=x,this.callbacks=T,this.request=this.fetchSetup(v,g),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){b.abortInternal(),T.onTimeout(d,v,b.response)},x.timeout),self.fetch(this.request).then(function(w){if(b.response=b.loader=w,!w.ok){var D=w.status,L=w.statusText;throw new n(L||"fetch, bad network response",D,w)}return d.loading.first=Math.max(self.performance.now(),d.loading.start),d.total=parseInt(w.headers.get("Content-Length")||"0"),c&&Object(U.isFiniteNumber)(x.highWaterMark)?b.loadProgressively(w,d,v,x.highWaterMark,c):y?w.arrayBuffer():w.text()}).then(function(w){var D=b.response;self.clearTimeout(b.requestTimeout),d.loading.end=Math.max(self.performance.now(),d.loading.first),d.loaded=d.total=w[r];var L={url:D.url,data:w};c&&!Object(U.isFiniteNumber)(x.highWaterMark)&&c(d,v,w,D),T.onSuccess(L,d,v,D)}).catch(function(w){if(self.clearTimeout(b.requestTimeout),d.aborted)return;var D=w.code||0;T.onError({code:D,text:w.message},v,w.details)})},_.getCacheAge=function(){var v=null;if(this.response){var x=this.response.headers.get("age");v=x?parseFloat(x):null}return v},_.loadProgressively=function(v,x,T,b,d){b===void 0&&(b=0);var g=new I.default,c=v.body.getReader(),y=function r(){return c.read().then(function(w){if(w.done)return g.dataLength&&d(x,T,g.flush(),v),Promise.resolve(new ArrayBuffer(0));var D=w.value,L=D.length;return x.loaded+=L,L<b||g.dataLength?(g.push(D),g.dataLength>=b&&d(x,T,g.flush(),v)):d(x,T,D,v),r()}).catch(function(){return Promise.reject()})};return y()},t}();function o(t,_){var p={method:"GET",mode:"cors",credentials:"same-origin",signal:_,headers:new self.Headers(i({},t.headers))};return t.rangeEnd&&p.headers.set("Range","bytes="+t.rangeStart+"-"+String(t.rangeEnd-1)),p}function a(t,_){return new self.Request(t.url,_)}var n=function(t){W(_,t);function _(p,v,x){var T;return T=t.call(this,p)||this,T.code=void 0,T.details=void 0,T.code=v,T.details=x,T}return _}(j(Error));P.default=u},"./src/utils/imsc1-ttml-parser.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"IMSC1_CODEC",function(){return f}),R.d(P,"parseIMSC1",function(){return s});var U=R("./src/utils/mp4-tools.ts"),A=R("./src/utils/vttparser.ts"),I=R("./src/utils/vttcue.ts"),W=R("./src/demux/id3.ts"),j=R("./src/utils/timescale-conversion.ts"),e=R("./src/utils/webvtt-parser.ts");function C(){return C=Object.assign||function(b){for(var d=1;d<arguments.length;d++){var g=arguments[d];for(var c in g)Object.prototype.hasOwnProperty.call(g,c)&&(b[c]=g[c])}return b},C.apply(this,arguments)}var f="stpp.ttml.im1t",h=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,l=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,i={left:"start",center:"center",right:"end",start:"start",end:"end"};function s(b,d,g,c,y){var r=Object(U.findBox)(new Uint8Array(b),["mdat"]);if(r.length===0){y(new Error("Could not parse IMSC1 mdat"));return}var w=r[0],D=Object(W.utf8ArrayToStr)(new Uint8Array(b,w.start,w.end-w.start)),L=Object(j.toTimescaleFromScale)(d,1,g);try{c(u(D,L))}catch(S){y(S)}}function u(b,d){var g=new DOMParser,c=g.parseFromString(b,"text/xml"),y=c.getElementsByTagName("tt")[0];if(!y)throw new Error("Invalid ttml");var r={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},w=Object.keys(r).reduce(function(H,O){return H[O]=y.getAttribute("ttp:"+O)||r[O],H},{}),D=y.getAttribute("xml:space")!=="preserve",L=a(o(y,"styling","style")),S=a(o(y,"layout","region")),M=o(y,"body","[begin]");return[].map.call(M,function(H){var O=n(H,D);if(!O||!H.hasAttribute("begin"))return null;var K=v(H.getAttribute("begin"),w),Y=v(H.getAttribute("dur"),w),ie=v(H.getAttribute("end"),w);if(K===null)throw p(H);if(ie===null){if(Y===null)throw p(H);ie=K+Y}var re=new I.default(K-d,ie-d,O);re.id=Object(e.generateCueId)(re.startTime,re.endTime,re.text);var Te=S[H.getAttribute("region")],_e=L[H.getAttribute("style")];re.position=10,re.size=80;var we=t(Te,_e),Ce=we.textAlign;if(Ce){var Re=i[Ce];Re&&(re.lineAlign=Re),re.align=Ce}return C(re,we),re}).filter(function(H){return H!==null})}function o(b,d,g){var c=b.getElementsByTagName(d)[0];return c?[].slice.call(c.querySelectorAll(g)):[]}function a(b){return b.reduce(function(d,g){var c=g.getAttribute("xml:id");return c&&(d[c]=g),d},{})}function n(b,d){return[].slice.call(b.childNodes).reduce(function(g,c,y){var r;return c.nodeName==="br"&&y?g+`
|
|
`:(r=c.childNodes)!==null&&r!==void 0&&r.length?n(c,d):d?g+c.textContent.trim().replace(/\s+/g," "):g+c.textContent},"")}function t(b,d){var g="http://www.w3.org/ns/ttml#styling",c=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return c.reduce(function(y,r){var w=_(d,g,r)||_(b,g,r);return w&&(y[r]=w),y},{})}function _(b,d,g){return b.hasAttributeNS(d,g)?b.getAttributeNS(d,g):null}function p(b){return new Error("Could not parse ttml timestamp "+b)}function v(b,d){if(!b)return null;var g=Object(A.parseTimeStamp)(b);return g===null&&(h.test(b)?g=x(b,d):l.test(b)&&(g=T(b,d))),g}function x(b,d){var g=h.exec(b),c=(g[4]|0)+(g[5]|0)/d.subFrameRate;return(g[1]|0)*3600+(g[2]|0)*60+(g[3]|0)+c/d.frameRate}function T(b,d){var g=l.exec(b),c=Number(g[1]),y=g[2];switch(y){case"h":return c*3600;case"m":return c*60;case"ms":return c*1e3;case"f":return c/d.frameRate;case"t":return c/d.tickRate}return c}},"./src/utils/logger.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"enableLogs",function(){return e}),R.d(P,"logger",function(){return C});var U=function(){},A={trace:U,debug:U,log:U,warn:U,info:U,error:U},I=A;function W(f){var h=self.console[f];return h?h.bind(self.console,"["+f+"] >"):U}function j(f){for(var h=arguments.length,l=new Array(h>1?h-1:0),i=1;i<h;i++)l[i-1]=arguments[i];l.forEach(function(s){I[s]=f[s]?f[s].bind(f):W(s)})}function e(f){if(self.console&&f===!0||typeof f=="object"){j(f,"debug","log","info","warn","error");try{I.log()}catch(h){I=A}}else I=A}var C=I},"./src/utils/mediakeys-helper.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"KeySystems",function(){return U}),R.d(P,"requestMediaKeySystemAccess",function(){return A});var U;(function(I){I.WIDEVINE="com.widevine.alpha",I.PLAYREADY="com.microsoft.playready"})(U||(U={}));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(ee,P,R){"use strict";R.r(P),R.d(P,"getMediaSource",function(){return U});function U(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"bin2str",function(){return j}),R.d(P,"readUint16",function(){return e}),R.d(P,"readUint32",function(){return C}),R.d(P,"writeUint32",function(){return f}),R.d(P,"findBox",function(){return h}),R.d(P,"parseSegmentIndex",function(){return l}),R.d(P,"parseInitSegment",function(){return i}),R.d(P,"getStartDTS",function(){return s}),R.d(P,"getDuration",function(){return u}),R.d(P,"computeRawDurationFromSamples",function(){return o}),R.d(P,"offsetStartDTS",function(){return a}),R.d(P,"segmentValidRange",function(){return n}),R.d(P,"appendUint8Array",function(){return t});var U=R("./src/utils/typed-array.ts"),A=R("./src/loader/fragment.ts"),I=Math.pow(2,32)-1,W=[].push;function j(_){return String.fromCharCode.apply(null,_)}function e(_,p){"data"in _&&(p+=_.start,_=_.data);var v=_[p]<<8|_[p+1];return v<0?65536+v:v}function C(_,p){"data"in _&&(p+=_.start,_=_.data);var v=_[p]<<24|_[p+1]<<16|_[p+2]<<8|_[p+3];return v<0?4294967296+v:v}function f(_,p,v){"data"in _&&(p+=_.start,_=_.data),_[p]=v>>24,_[p+1]=v>>16&255,_[p+2]=v>>8&255,_[p+3]=v&255}function h(_,p){var v=[];if(!p.length)return v;var x,T,b;"data"in _?(x=_.data,T=_.start,b=_.end):(x=_,T=0,b=x.byteLength);for(var d=T;d<b;){var g=C(x,d),c=j(x.subarray(d+4,d+8)),y=g>1?d+g:b;if(c===p[0])if(p.length===1)v.push({data:x,start:d+8,end:y});else{var r=h({data:x,start:d+8,end:y},p.slice(1));r.length&&W.apply(v,r)}d=y}return v}function l(_){var p=h(_,["moov"]),v=p[0],x=v?v.end:null,T=h(_,["sidx"]);if(!T||!T[0])return null;var b=[],d=T[0],g=d.data[0],c=g===0?8:16,y=C(d,c);c+=4;var r=0,w=0;g===0?c+=8:c+=16,c+=2;var D=d.end+w,L=e(d,c);c+=2;for(var S=0;S<L;S++){var M=c,H=C(d,M);M+=4;var O=H&2147483647,K=(H&2147483648)>>>31;if(K===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var Y=C(d,M);M+=4,b.push({referenceSize:O,subsegmentDuration:Y,info:{duration:Y/y,start:D,end:D+O-1}}),D+=O,M+=4,c=M}return{earliestPresentationTime:r,timescale:y,version:g,referencesCount:L,references:b,moovEndOffset:x}}function i(_){for(var p=[],v=h(_,["moov","trak"]),x=0;x<v.length;x++){var T=v[x],b=h(T,["tkhd"])[0];if(b){var d=b.data[b.start],g=d===0?12:20,c=C(b,g),y=h(T,["mdia","mdhd"])[0];if(y){d=y.data[y.start],g=d===0?12:20;var r=C(y,g),w=h(T,["mdia","hdlr"])[0];if(w){var D=j(w.data.subarray(w.start+8,w.start+12)),L={soun:A.ElementaryStreamTypes.AUDIO,vide:A.ElementaryStreamTypes.VIDEO}[D];if(L){var S=h(T,["mdia","minf","stbl","stsd"])[0],M=void 0;S&&(M=j(S.data.subarray(S.start+12,S.start+16))),p[c]={timescale:r,type:L},p[L]={timescale:r,id:c,codec:M}}}}}}var H=h(_,["moov","mvex","trex"]);return H.forEach(function(O){var K=C(O,4),Y=p[K];Y&&(Y.default={duration:C(O,12),flags:C(O,20)})}),p}function s(_,p){return h(p,["moof","traf"]).reduce(function(v,x){var T=h(x,["tfdt"])[0],b=T.data[T.start],d=h(x,["tfhd"]).reduce(function(g,c){var y=C(c,4),r=_[y];if(r){var w=C(T,4);b===1&&(w*=Math.pow(2,32),w+=C(T,8));var D=r.timescale||9e4,L=w/D;if(isFinite(L)&&(g===null||L<g))return L}return g},null);return d!==null&&isFinite(d)&&(v===null||d<v)?d:v},null)||0}function u(_,p){for(var v=0,x=0,T=0,b=h(_,["moof","traf"]),d=0;d<b.length;d++){var g=b[d],c=h(g,["tfhd"])[0],y=C(c,4),r=p[y];if(!r)continue;var w=r.default,D=C(c,0)|(w==null?void 0:w.flags),L=w==null?void 0:w.duration;D&8&&(D&2?L=C(c,12):L=C(c,8));for(var S=r.timescale||9e4,M=h(g,["trun"]),H=0;H<M.length;H++){if(L){var O=C(M[H],4);v=L*O}else v=o(M[H]);r.type===A.ElementaryStreamTypes.VIDEO?x+=v/S:r.type===A.ElementaryStreamTypes.AUDIO&&(T+=v/S)}}if(x===0&&T===0){var K=l(_);if(K!=null&&K.references)return K.references.reduce(function(Y,ie){return Y+ie.info.duration||0},0)}return x||T}function o(_){var p=C(_,0),v=8;p&1&&(v+=4),p&4&&(v+=4);for(var x=0,T=C(_,4),b=0;b<T;b++){if(p&256){var d=C(_,v);x+=d,v+=4}p&512&&(v+=4),p&1024&&(v+=4),p&2048&&(v+=4)}return x}function a(_,p,v){h(p,["moof","traf"]).forEach(function(x){h(x,["tfhd"]).forEach(function(T){var b=C(T,4),d=_[b];if(!d)return;var g=d.timescale||9e4;h(x,["tfdt"]).forEach(function(c){var y=c.data[c.start],r=C(c,4);if(y===0)f(c,4,r-v*g);else{r*=Math.pow(2,32),r+=C(c,8),r-=v*g,r=Math.max(r,0);var w=Math.floor(r/(I+1)),D=Math.floor(r%(I+1));f(c,4,w),f(c,8,D)}})})})}function n(_){var p={valid:null,remainder:null},v=h(_,["moof"]);if(v){if(v.length<2)return p.remainder=_,p}else return p;var x=v[v.length-1];return p.valid=Object(U.sliceUint8)(_,0,x.start-8),p.remainder=Object(U.sliceUint8)(_,x.start-8),p}function t(_,p){var v=new Uint8Array(_.length+p.length);return v.set(_),v.set(p,_.length),v}},"./src/utils/output-filter.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"default",function(){return U});var U=function(){function A(W,j){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=W,this.trackName=j}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(j,e,C){(this.startTime===null||this.startTime>j)&&(this.startTime=j),this.endTime=e,this.screen=C,this.timelineController.createCaptionsTrack(this.trackName)},I.reset=function(){this.cueRanges=[]},A}()},"./src/utils/texttrack-utils.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"sendAddTrackEvent",function(){return A}),R.d(P,"addCueToTrack",function(){return I}),R.d(P,"clearCurrentCues",function(){return W}),R.d(P,"removeCuesInRange",function(){return j}),R.d(P,"getCuesInRange",function(){return C});var U=R("./src/utils/logger.ts");function A(f,h){var l;try{l=new Event("addtrack")}catch(i){l=document.createEvent("Event"),l.initEvent("addtrack",!1,!1)}l.track=f,h.dispatchEvent(l)}function I(f,h){var l=f.mode;if(l==="disabled"&&(f.mode="hidden"),f.cues&&!f.cues.getCueById(h.id))try{if(f.addCue(h),!f.cues.getCueById(h.id))throw new Error("addCue is failed for: "+h)}catch(s){U.logger.debug("[texttrack-utils]: "+s);var i=new self.TextTrackCue(h.startTime,h.endTime,h.text);i.id=h.id,f.addCue(i)}l==="disabled"&&(f.mode=l)}function W(f){var h=f.mode;if(h==="disabled"&&(f.mode="hidden"),f.cues)for(var l=f.cues.length;l--;)f.removeCue(f.cues[l]);h==="disabled"&&(f.mode=h)}function j(f,h,l){var i=f.mode;if(i==="disabled"&&(f.mode="hidden"),f.cues&&f.cues.length>0)for(var s=C(f.cues,h,l),u=0;u<s.length;u++)f.removeCue(s[u]);i==="disabled"&&(f.mode=i)}function e(f,h){if(h<f[0].startTime)return 0;var l=f.length-1;if(h>f[l].endTime)return-1;for(var i=0,s=l;i<=s;){var u=Math.floor((s+i)/2);if(h<f[u].startTime)s=u-1;else if(h>f[u].startTime&&i<l)i=u+1;else return u}return f[i].startTime-h<h-f[s].startTime?i:s}function C(f,h,l){var i=[],s=e(f,h);if(s>-1)for(var u=s,o=f.length;u<o;u++){var a=f[u];if(a.startTime>=h&&a.endTime<=l)i.push(a);else if(a.startTime>l)return i}return i}},"./src/utils/time-ranges.ts":function(ee,P,R){"use strict";R.r(P);var U={toString:function(I){for(var W="",j=I.length,e=0;e<j;e++)W+="["+I.start(e).toFixed(3)+","+I.end(e).toFixed(3)+"]";return W}};P.default=U},"./src/utils/timescale-conversion.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"toTimescaleFromBase",function(){return A}),R.d(P,"toTimescaleFromScale",function(){return I}),R.d(P,"toMsFromMpegTsClock",function(){return W}),R.d(P,"toMpegTsClockFromTimescale",function(){return j});var U=9e4;function A(e,C,f,h){f===void 0&&(f=1),h===void 0&&(h=!1);var l=e*C*f;return h?Math.round(l):l}function I(e,C,f,h){return f===void 0&&(f=1),h===void 0&&(h=!1),A(e,C,1/f,h)}function W(e,C){return C===void 0&&(C=!1),A(e,1e3,1/U,C)}function j(e,C){return C===void 0&&(C=1),A(e,U,1/C)}},"./src/utils/typed-array.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"sliceUint8",function(){return U});function U(A,I,W){return Uint8Array.prototype.slice?A.slice(I,W):new Uint8Array(Array.prototype.slice.call(A,I,W))}},"./src/utils/vttcue.ts":function(ee,P,R){"use strict";R.r(P),P.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var U=["","lr","rl"],A=["start","middle","end","left","right"];function I(f,h){if(typeof h!="string")return!1;if(!Array.isArray(f))return!1;var l=h.toLowerCase();return~f.indexOf(l)?l:!1}function W(f){return I(U,f)}function j(f){return I(A,f)}function e(f){for(var h=arguments.length,l=new Array(h>1?h-1:0),i=1;i<h;i++)l[i-1]=arguments[i];for(var s=1;s<arguments.length;s++){var u=arguments[s];for(var o in u)f[o]=u[o]}return f}function C(f,h,l){var i=this,s={enumerable:!0};i.hasBeenReset=!1;var u="",o=!1,a=f,n=h,t=l,_=null,p="",v=!0,x="auto",T="start",b=50,d="middle",g=50,c="middle";Object.defineProperty(i,"id",e({},s,{get:function(){return u},set:function(r){u=""+r}})),Object.defineProperty(i,"pauseOnExit",e({},s,{get:function(){return o},set:function(r){o=!!r}})),Object.defineProperty(i,"startTime",e({},s,{get:function(){return a},set:function(r){if(typeof r!="number")throw new TypeError("Start time must be set to a number.");a=r,this.hasBeenReset=!0}})),Object.defineProperty(i,"endTime",e({},s,{get:function(){return n},set:function(r){if(typeof r!="number")throw new TypeError("End time must be set to a number.");n=r,this.hasBeenReset=!0}})),Object.defineProperty(i,"text",e({},s,{get:function(){return t},set:function(r){t=""+r,this.hasBeenReset=!0}})),Object.defineProperty(i,"region",e({},s,{get:function(){return _},set:function(r){_=r,this.hasBeenReset=!0}})),Object.defineProperty(i,"vertical",e({},s,{get:function(){return p},set:function(r){var w=W(r);if(w===!1)throw new SyntaxError("An invalid or illegal string was specified.");p=w,this.hasBeenReset=!0}})),Object.defineProperty(i,"snapToLines",e({},s,{get:function(){return v},set:function(r){v=!!r,this.hasBeenReset=!0}})),Object.defineProperty(i,"line",e({},s,{get:function(){return x},set:function(r){if(typeof r!="number"&&r!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");x=r,this.hasBeenReset=!0}})),Object.defineProperty(i,"lineAlign",e({},s,{get:function(){return T},set:function(r){var w=j(r);if(!w)throw new SyntaxError("An invalid or illegal string was specified.");T=w,this.hasBeenReset=!0}})),Object.defineProperty(i,"position",e({},s,{get:function(){return b},set:function(r){if(r<0||r>100)throw new Error("Position must be between 0 and 100.");b=r,this.hasBeenReset=!0}})),Object.defineProperty(i,"positionAlign",e({},s,{get:function(){return d},set:function(r){var w=j(r);if(!w)throw new SyntaxError("An invalid or illegal string was specified.");d=w,this.hasBeenReset=!0}})),Object.defineProperty(i,"size",e({},s,{get:function(){return g},set:function(r){if(r<0||r>100)throw new Error("Size must be between 0 and 100.");g=r,this.hasBeenReset=!0}})),Object.defineProperty(i,"align",e({},s,{get:function(){return c},set:function(r){var w=j(r);if(!w)throw new SyntaxError("An invalid or illegal string was specified.");c=w,this.hasBeenReset=!0}})),i.displayState=void 0}return C.prototype.getCueAsHTML=function(){var f=self.WebVTT;return f.convertCueToDOMTree(self,this.text)},C}()},"./src/utils/vttparser.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"parseTimeStamp",function(){return I}),R.d(P,"fixLineBreaks",function(){return h}),R.d(P,"VTTParser",function(){return l});var U=R("./src/utils/vttcue.ts"),A=function(){function i(){}var s=i.prototype;return s.decode=function(o,a){if(!o)return"";if(typeof o!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(o))},i}();function I(i){function s(o,a,n,t){return(o|0)*3600+(a|0)*60+(n|0)+parseFloat(t||0)}var u=i.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return u?parseFloat(u[2])>59?s(u[2],u[3],0,u[4]):s(u[1],u[2],u[3],u[4]):null}var W=function(){function i(){this.values=Object.create(null)}var s=i.prototype;return s.set=function(o,a){!this.get(o)&&a!==""&&(this.values[o]=a)},s.get=function(o,a,n){return n?this.has(o)?this.values[o]:a[n]:this.has(o)?this.values[o]:a},s.has=function(o){return o in this.values},s.alt=function(o,a,n){for(var t=0;t<n.length;++t)if(a===n[t]){this.set(o,a);break}},s.integer=function(o,a){/^-?\d+$/.test(a)&&this.set(o,parseInt(a,10))},s.percent=function(o,a){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(a)){var n=parseFloat(a);if(n>=0&&n<=100)return this.set(o,n),!0}return!1},i}();function j(i,s,u,o){var a=o?i.split(o):[i];for(var n in a){if(typeof a[n]!="string")continue;var t=a[n].split(u);if(t.length!==2)continue;var _=t[0],p=t[1];s(_,p)}}var e=new U.default(0,0,""),C=e.align==="middle"?"middle":"center";function f(i,s,u){var o=i;function a(){var _=I(i);if(_===null)throw new Error("Malformed timestamp: "+o);return i=i.replace(/^[^\sa-zA-Z-]+/,""),_}function n(_,p){var v=new W;j(_,function(b,d){var g;switch(b){case"region":for(var c=u.length-1;c>=0;c--)if(u[c].id===d){v.set(b,u[c].region);break}break;case"vertical":v.alt(b,d,["rl","lr"]);break;case"line":g=d.split(","),v.integer(b,g[0]),v.percent(b,g[0])&&v.set("snapToLines",!1),v.alt(b,g[0],["auto"]),g.length===2&&v.alt("lineAlign",g[1],["start",C,"end"]);break;case"position":g=d.split(","),v.percent(b,g[0]),g.length===2&&v.alt("positionAlign",g[1],["start",C,"end","line-left","line-right","auto"]);break;case"size":v.percent(b,d);break;case"align":v.alt(b,d,["start",C,"end","left","right"]);break}},/:/,/\s/),p.region=v.get("region",null),p.vertical=v.get("vertical","");var x=v.get("line","auto");x==="auto"&&e.line===-1&&(x=-1),p.line=x,p.lineAlign=v.get("lineAlign","start"),p.snapToLines=v.get("snapToLines",!0),p.size=v.get("size",100),p.align=v.get("align",C);var T=v.get("position","auto");T==="auto"&&e.position===50&&(T=p.align==="start"||p.align==="left"?0:p.align==="end"||p.align==="right"?100:50),p.position=T}function t(){i=i.replace(/^\s+/,"")}if(t(),s.startTime=a(),t(),i.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+o);i=i.substr(3),t(),s.endTime=a(),t(),n(i,s)}function h(i){return i.replace(/<br(?: \/)?>/gi,`
|
|
`)}var l=function(){function i(){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 s=i.prototype;return s.parse=function(o){var a=this;o&&(a.buffer+=a.decoder.decode(o,{stream:!0}));function n(){var T=a.buffer,b=0;for(T=h(T);b<T.length&&T[b]!=="\r"&&T[b]!==`
|
|
`;)++b;var d=T.substr(0,b);return T[b]==="\r"&&++b,T[b]===`
|
|
`&&++b,a.buffer=T.substr(b),d}function t(T){j(T,function(b,d){},/:/)}try{var _="";if(a.state==="INITIAL"){if(!/\r\n|\n/.test(a.buffer))return this;_=n();var p=_.match(/^()?WEBVTT([ \t].*)?$/);if(!p||!p[0])throw new Error("Malformed WebVTT signature.");a.state="HEADER"}for(var v=!1;a.buffer;){if(!/\r\n|\n/.test(a.buffer))return this;v?v=!1:_=n();switch(a.state){case"HEADER":/:/.test(_)?t(_):_||(a.state="ID");continue;case"NOTE":_||(a.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(_)){a.state="NOTE";break}if(!_)continue;if(a.cue=new U.default(0,0,""),a.state="CUE",_.indexOf("-->")===-1){a.cue.id=_;continue}case"CUE":if(!a.cue){a.state="BADCUE";continue}try{f(_,a.cue,a.regionList)}catch(T){a.cue=null,a.state="BADCUE";continue}a.state="CUETEXT";continue;case"CUETEXT":{var x=_.indexOf("-->")!==-1;if(!_||x&&(v=!0)){a.oncue&&a.cue&&a.oncue(a.cue),a.cue=null,a.state="ID";continue}if(a.cue===null)continue;a.cue.text&&(a.cue.text+=`
|
|
`),a.cue.text+=_}continue;case"BADCUE":_||(a.state="ID")}}}catch(T){a.state==="CUETEXT"&&a.cue&&a.oncue&&a.oncue(a.cue),a.cue=null,a.state=a.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},s.flush=function(){var o=this;try{if((o.cue||o.state==="HEADER")&&(o.buffer+=`
|
|
|
|
`,o.parse()),o.state==="INITIAL"||o.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(a){o.onparsingerror&&o.onparsingerror(a)}return o.onflush&&o.onflush(),this},i}()},"./src/utils/webvtt-parser.ts":function(ee,P,R){"use strict";R.r(P),R.d(P,"generateCueId",function(){return l}),R.d(P,"parseWebVTT",function(){return s});var U=R("./src/polyfills/number.ts"),A=R("./src/utils/vttparser.ts"),I=R("./src/demux/id3.ts"),W=R("./src/utils/timescale-conversion.ts"),j=R("./src/remux/mp4-remuxer.ts"),e=/\r\n|\n\r|\n|\r/g,C=function(o,a,n){return n===void 0&&(n=0),o.substr(n,a.length)===a},f=function(o){var a=parseInt(o.substr(-3)),n=parseInt(o.substr(-6,2)),t=parseInt(o.substr(-9,2)),_=o.length>9?parseInt(o.substr(0,o.indexOf(":"))):0;if(!Object(U.isFiniteNumber)(a)||!Object(U.isFiniteNumber)(n)||!Object(U.isFiniteNumber)(t)||!Object(U.isFiniteNumber)(_))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+o);return a+=1e3*n,a+=60*1e3*t,a+=60*60*1e3*_,a},h=function(o){for(var a=5381,n=o.length;n;)a=a*33^o.charCodeAt(--n);return(a>>>0).toString()};function l(u,o,a){return h(u.toString())+h(o.toString())+h(a)}var i=function(o,a,n){var t=o[a],_=o[t.prevCC];if(!_||!_.new&&t.new){o.ccOffset=o.presentationOffset=t.start,t.new=!1;return}for(;(p=_)!==null&&p!==void 0&&p.new;){var p;o.ccOffset+=t.start-_.start,t.new=!1,t=_,_=o[t.prevCC]}o.presentationOffset=n};function s(u,o,a,n,t,_,p,v){var x=new A.VTTParser,T=Object(I.utf8ArrayToStr)(new Uint8Array(u)).trim().replace(e,`
|
|
`).split(`
|
|
`),b=[],d=Object(W.toMpegTsClockFromTimescale)(o,a),g="00:00.000",c=0,y=0,r,w=!0,D=!1;x.oncue=function(L){var S=n[t],M=n.ccOffset,H=(c-d)/9e4;if(S!=null&&S.new&&(y!==void 0?M=n.ccOffset=S.start:i(n,t,H)),H&&(M=H-n.presentationOffset),D){var O=L.endTime-L.startTime,K=Object(j.normalizePts)((L.startTime+M-y)*9e4,_*9e4)/9e4;L.startTime=K,L.endTime=K+O}var Y=L.text.trim();L.text=decodeURIComponent(encodeURIComponent(Y)),L.id||(L.id=l(L.startTime,L.endTime,Y)),L.endTime>0&&b.push(L)},x.onparsingerror=function(L){r=L},x.onflush=function(){if(r){v(r);return}p(b)},T.forEach(function(L){if(w)if(C(L,"X-TIMESTAMP-MAP=")){w=!1,D=!0,L.substr(16).split(",").forEach(function(S){C(S,"LOCAL:")?g=S.substr(6):C(S,"MPEGTS:")&&(c=parseInt(S.substr(7)))});try{y=f(g)/1e3}catch(S){D=!1,r=S}return}else L===""&&(w=!1);x.parse(L+`
|
|
`)}),x.flush()}},"./src/utils/xhr-loader.ts":function(ee,P,R){"use strict";R.r(P);var U=R("./src/utils/logger.ts"),A=R("./src/loader/load-stats.ts"),I=/^age:\s*[\d.]+\s*$/m,W=function(){function j(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=j.prototype;return e.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},e.abortInternal=function(){var f=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),f&&(f.onreadystatechange=null,f.onprogress=null,f.readyState!==4&&(this.stats.aborted=!0,f.abort()))},e.abort=function(){var f;this.abortInternal(),(f=this.callbacks)!==null&&f!==void 0&&f.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},e.load=function(f,h,l){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=f,this.config=h,this.callbacks=l,this.retryDelay=h.retryDelay,this.loadInternal()},e.loadInternal=function(){var f=this.config,h=this.context;if(!f)return;var l=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0;var s=this.xhrSetup;try{if(s)try{s(l,h.url)}catch(a){l.open("GET",h.url,!0),s(l,h.url)}l.readyState||l.open("GET",h.url,!0);var u=this.context.headers;if(u)for(var o in u)l.setRequestHeader(o,u[o])}catch(a){this.callbacks.onError({code:l.status,text:a.message},h,l);return}h.rangeEnd&&l.setRequestHeader("Range","bytes="+h.rangeStart+"-"+(h.rangeEnd-1)),l.onreadystatechange=this.readystatechange.bind(this),l.onprogress=this.loadprogress.bind(this),l.responseType=h.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),f.timeout),l.send()},e.readystatechange=function(){var f=this.context,h=this.loader,l=this.stats;if(!f||!h)return;var i=h.readyState,s=this.config;if(l.aborted)return;if(i>=2)if(self.clearTimeout(this.requestTimeout),l.loading.first===0&&(l.loading.first=Math.max(self.performance.now(),l.loading.start)),i===4){h.onreadystatechange=null,h.onprogress=null;var u=h.status;if(u>=200&&u<300){l.loading.end=Math.max(self.performance.now(),l.loading.first);var o,a;if(f.responseType==="arraybuffer"?(o=h.response,a=o.byteLength):(o=h.responseText,a=o.length),l.loaded=l.total=a,!this.callbacks)return;var n=this.callbacks.onProgress;if(n&&n(l,f,o,h),!this.callbacks)return;var t={url:h.responseURL,data:o};this.callbacks.onSuccess(t,l,f,h)}else l.retry>=s.maxRetry||u>=400&&u<499?(U.logger.error(u+" while loading "+f.url),this.callbacks.onError({code:u,text:h.statusText},f,h)):(U.logger.warn(u+" while loading "+f.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,s.maxRetryDelay),l.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.timeout)},e.loadtimeout=function(){U.logger.warn("timeout while loading "+this.context.url);var f=this.callbacks;f&&(this.abortInternal(),f.onTimeout(this.stats,this.context,this.loader))},e.loadprogress=function(f){var h=this.stats;h.loaded=f.loaded,f.lengthComputable&&(h.total=f.total)},e.getCacheAge=function(){var f=null;if(this.loader&&I.test(this.loader.getAllResponseHeaders())){var h=this.loader.getResponseHeader("age");f=h?parseFloat(h):null}return f},j}();P.default=W}}).default})},vHTk:function(Ke,ce,F){Ke.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},xiVL:function(Ke,ce){Ke.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXWmQXFd1/s59r3t6nX00o93GluV9AQNxiAkIB0OMISFsFQqSAhOohFR+JKmEQPILClJZfpEfIUAChFQSHIJxnGDiDYwsb8KRLUuWZcmSxqN9pJF6nV7eSZ373u1509Mzvd2eGVt6VV2z9Ht3+9459+yX8Bq4mDmWK2GLqla3MvFWZt4KpjVMSBNzGoQ0M6WJkJbpMiNDxBkwMkyUIUYGxCeJaB8x7fMcZ18yiv1EVHy1Lw+9GicwO8tXlSrlbSB6O4HfANAmZlY250JEHsBHGLQTzA9H3chDfX2012Yfy9HWqwJgZh7NF6vvY/a2gWkbgyeWY3Hq+yDQcRA/RKQeSsSce4jo9EqMo50+Vy3AzNxXKFTv9MAfB/AuZo60M7Fe30tEZQA/UqBvx+POvUQ02+s+O2l/1QGcy5Xe6Cn1SXj8YYAHO5nU8j9DM1D0b8rzvpFMRp9a/v4X73HVAJwplN9GHj7P4NtW0wK1OxYCPcAKX0rHI4+0+2wv7l9xgHPFyrs9j78A5l/sxQRXrE2ix5SiLyZj7v+s2BgArBjA+XzpzR7oq8x880ouQK/7JqKnFfiziUT0iV731aj9ZQeYmYez+fJXiOguZl72/ldkkYmYmb+eSkT+lIjOLOcYlm2BBcx8sfoJz+O/BHhkOSe5evqiaaXoT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5HWCvUlFfvWiGWMYFQpQzzXSoAfxlWD1w0X1y33tPEkyy33CPk6/TBx8yF7f05pDjuIrOzuaaVUoExxKT43a5akFCtVys3+Wcwweu1dbHV+LxN3VhPsEx8jANGfOAh4eiL5x0iHPeG47YtAv+9I3xp9f0yIvLDAw6ySIY/ExSnpkqVcels/x/syLgtXHpx9bhlF2CO/tanVuzHHfPqmJVOf0nNdr5SFP7D02Eb/3iEfkdtdsbFeCXbtYfXlDGueU85iKZsjXZklnpyZdpGmgWFcS4pGsQnzvuOBG/4CzXFX/Qp+zZi28pPzkZHeNIS337X2+Qp+IckWajb1RsyXWffqOeN8tRH+rKyWOhsSBnYyYziiCAa0k8EQKb2kF01acPc3akXS8IbsW1Onf6AnVib16ewqWz21vq9qu2yNPeqL7thW7xZ65391jcV1jE/1qKFcaeCfDwOYeK9D83nv32/wHzrWgvjJ8Q7AAAAABJRU5ErkJggg=="},"yk+Y":function(Ke,ce,F){Ke.exports={flex_box_center:"flex_box_center___3U2fC",flex_space_between:"flex_space_between___2zP9S",flex_box_vertical_center:"flex_box_vertical_center___uOmOs",flex_box_center_end:"flex_box_center_end___3GcNF",flex_box_column:"flex_box_column___2Cblz",bg:"bg___RGKf9",containerTitle:"containerTitle___1cbbY",containerDesc:"containerDesc___3pXZB",listItem:"listItem___1dV67",info:"info___11SBC",title:"title___2B6We",titleLeft:"titleLeft___z4lzQ",titleRight:"titleRight___3YUHg",acitons:"acitons___2oKqA",export:"export___3oj3I"}},z4EP:function(Ke,ce){Ke.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJgAAAA4CAYAAAAB3jHPAAAAAXNSR0IArs4c6QAAIABJREFUeF7dXQd4FdeV/ucJid5MMRgjRAeBBDZg0zFG9NiwMbis635O2WQ32WyS3Q1J1glxId6NU522ceLEsZMYMM1U0wWmG0RRo4MkRC+mCklv9rvn3nPLvHlPT5RsvM9F0nsz86b885///OfcOx5u8cv3/RQcX3pvtDo6zPf8HhGgh+957eH7jQE09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